-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
430 lines (424 loc) · 54.7 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// main.ts
var main_exports = {};
__export(main_exports, {
default: () => NSD_JS
});
module.exports = __toCommonJS(main_exports);
var import_obsidian = require("obsidian");
// src/nassi_svg_api.ts
function createStartEndBlock(x, y, width, height, content) {
const h = 20;
const svgAppendix = `
<rect x="${x}" y="${y}" width="${width}" height="${h}" stroke="black" fill="lightblue" />
<text x="${x + width / 2}" y="${y + height / 2}" font-size="14px" fill="black" text-anchor="middle">${content}</text>
`;
return { svgAppendix, children: [] };
}
function createSequenceBlock(x, y, width, height, content) {
const svgAppendix = `
<rect x="${x}" y="${y}" width="${width}" height="${height}" stroke="black" fill="lightgreen" />
<text x="${x + width / 2}" y="${y + height / 2}" font-size="14px" fill="black" text-anchor="middle">${content}</text>
`;
return { svgAppendix, children: [] };
}
function createDecisionBlock(x, y, width, height, question, answerA, answerB, ratio) {
const h = 20;
const h_extra = h / 2;
let left_offset = width * ratio;
let svgAppendix;
if (ratio === -1) {
left_offset = width * 0.8;
svgAppendix = `
<polygon points="${x},${y} ${x + width},${y} ${x + left_offset},${y + h}" stroke="black" fill="lightyellow" />
<polygon points="${x},${y} ${x},${y + h + h_extra} ${x + left_offset},${y + h + h_extra} ${x + left_offset},${y + h}" stroke="black" fill="lightyellow" />
<text x="${x + left_offset}" y="${y + h / 2}" font-size="14px" fill="black" text-anchor="middle">${question}</text>
<text x="${x + width / 8}" y="${y + h}" font-size="14px" fill="black" text-anchor="middle">${answerA}</text>
`;
} else {
svgAppendix = `
<polygon points="${x},${y} ${x + width},${y} ${x + left_offset},${y + h}" stroke="black" fill="lightyellow" />
<polygon points="${x},${y} ${x},${y + h + h_extra} ${x + left_offset},${y + h + h_extra} ${x + left_offset},${y + h}" stroke="black" fill="lightyellow" />
<polygon points="${x + width},${y} ${x + width},${y + h + h_extra} ${x + left_offset},${y + h + h_extra} ${x + left_offset},${y + h}" stroke="black" fill="lightyellow" />
<text x="${x + left_offset}" y="${y + h / 2}" font-size="14px" fill="black" text-anchor="middle">${question}</text>
<text x="${x + 7 * width / 8}" y="${y + h}" font-size="14px" fill="black" text-anchor="middle">${answerB}</text>
<text x="${x + width / 8}" y="${y + h}" font-size="14px" fill="black" text-anchor="middle">${answerA}</text>
`;
}
const childA = { start_x: x, start_y: y + h + h_extra, width: left_offset, height: height - h - h_extra };
const childB = { start_x: x + left_offset, start_y: y + h + h_extra, width: width - left_offset, height: height - h - h_extra };
return { svgAppendix, children: [childA, childB] };
}
function createPreLoopBlock(x, y, width, height, arguments_) {
const h = 20;
const svgAppendix = `
<polygon points="
${x},${y}
${x + width},${y}
${x + width},${y + h}
${x + h},${y + h}
${x + h},${y + height - h}
${x + width},${y + height - h}
${x + width},${y + height}
${x},${y + height}
${x},${y}
" stroke="black" fill="lightpink" />
<text x="${x + width / 2}" y="${y + h / 2}" font-size="14px" fill="black" text-anchor="middle">${arguments_}</text>
`;
const child = { start_x: x + h, start_y: y + h, width: width - h, height: height - 2 * h };
return { svgAppendix, children: [child] };
}
function createPostLoopBlock(x, y, width, height, arguments_) {
const h = 20;
const svgAppendix = `
<polygon points="
${x},${y}
${x + width},${y}
${x + width},${y + h}
${x + h},${y + h}
${x + h},${y + height - h}
${x + width},${y + height - h}
${x + width},${y + height}
${x},${y + height}
${x},${y}
" stroke="black" fill="lightpink" />
<text x="${x + width / 2}" y="${y + h / 2}" font-size="14px" fill="black" text-anchor="middle">do</text>
<text x="${x + width / 2}" y="${y + height - h / 2}" font-size="14px" fill="black" text-anchor="middle">while(${arguments_})</text>
`;
const child = { start_x: x + h, start_y: y + h, width: width - h, height: height - 2 * h };
return { svgAppendix, children: [child] };
}
// src/converter.ts
function convert(x, y, width, height, tree, name) {
let svg = "";
svg += createStartEndBlock(x, y, width, 20, name).svgAppendix;
let conversion = convert_backend(x, y + 20, width, height - 20, tree);
svg += conversion.svgAppendix;
svg += createStartEndBlock(x, y + 20 + conversion.height, width, 20, "End").svgAppendix;
return { svgString: svg, height: conversion.height + 40 };
}
function convert_backend(x, y, width, height, tree) {
console.log("Converting ", tree);
let svgAppendix = "";
let current_y = y;
for (let block of tree) {
let h = getHeight(block);
if (block.type == -1) {
svgAppendix += createSequenceBlock(x, current_y, width, h, block.name).svgAppendix;
current_y += h;
} else if (block.type == 0) {
svgAppendix += createSequenceBlock(x, current_y, width, h, block.name + "(" + block.arguments[0] + ")").svgAppendix;
current_y += h;
} else if (block.type == 1) {
if (block.branches.length != 1) {
throw new Error("Expected 1 branches, Nassi-Shneiderman diagrams only support single IF or one IF-ELSE statement");
}
var sub_block = createDecisionBlock(x, current_y, width, h, block.name + "(" + block.arguments[0] + ")", "TRUE", "FALSE", -1);
svgAppendix += sub_block.svgAppendix;
var bounds1 = sub_block.children[0];
svgAppendix += convert_backend(bounds1.start_x, bounds1.start_y, bounds1.width, bounds1.height, block.branches[0]).svgAppendix;
current_y += h;
} else if (block.type == 2) {
if (block.branches.length != 2) {
throw new Error("Expected 2 branches, Nassi-Shneiderman diagrams only support single IF or one IF-ELSE statement");
}
let ratio = getMaxChildCount(block.branches[0]) / (getMaxChildCount(block.branches[0]) + getMaxChildCount(block.branches[1]));
console.log("RATIO", ratio);
var sub_block = createDecisionBlock(x, current_y, width, h, block.name + "(" + block.arguments[0] + ")", "TRUE", "FALSE", ratio);
svgAppendix += sub_block.svgAppendix;
var bounds1 = sub_block.children[0];
var bounds2 = sub_block.children[1];
svgAppendix += convert_backend(bounds1.start_x, bounds1.start_y, bounds1.width, bounds1.height, block.branches[0]).svgAppendix;
svgAppendix += convert_backend(bounds2.start_x, bounds2.start_y, bounds2.width, bounds2.height, block.branches[1]).svgAppendix;
current_y += h;
} else if (block.type == 10) {
if (block.branches.length != 1) {
throw new Error("Expected 1 branches, Nassi-Shneiderman diagrams only support single loop");
}
var sub_block = createPreLoopBlock(x, current_y, width, h, block.name + "(" + block.arguments[0] + ")");
svgAppendix += sub_block.svgAppendix;
var bounds1 = sub_block.children[0];
svgAppendix += convert_backend(bounds1.start_x, bounds1.start_y, bounds1.width, bounds1.height, block.branches[0]).svgAppendix;
current_y += h;
} else if (block.type == 11) {
if (block.branches.length != 1) {
throw new Error("Expected 1 branches, Nassi-Shneiderman diagrams only support single loop");
}
var sub_block = createPostLoopBlock(x, current_y, width, h, block.name + "(" + block.arguments[0] + ")");
svgAppendix += sub_block.svgAppendix;
var bounds1 = sub_block.children[0];
svgAppendix += convert_backend(bounds1.start_x, bounds1.start_y, bounds1.width, bounds1.height, block.branches[0]).svgAppendix;
current_y += h;
}
}
return { svgAppendix, height: current_y - y };
}
function getMaxChildCount(branch) {
let counts = [];
for (let block of branch) {
if (block.type == 0 || block.type == -1) {
counts.push(1);
} else if (block.type == 2) {
let countA = getMaxChildCount(block.branches[0]);
let countB = getMaxChildCount(block.branches[1]);
counts.push(countA + countB);
} else {
counts.push(getMaxChildCount(block.branches[0]));
}
}
return Math.max(...counts);
}
function getHeight(block) {
const base_h = 20;
if (block.type == 0 || block.type == -1) {
return base_h;
} else {
let heights = [];
console.log(block);
for (let branch of block.branches) {
let current_heigth = 0;
for (let sub_block of branch) {
current_heigth += getHeight(sub_block);
}
heights.push(current_heigth);
}
if (block.type == 10 || block.type == 11) {
return base_h * 2 + Math.max(...heights);
} else if (block.type == 1 || block.type == 2) {
return base_h * 3 / 2 + Math.max(...heights);
}
}
return 0;
}
// src/compiler.ts
var tokens = ["if", "for", "foreach", "while", "do"];
var branchers = ["{", "}"];
var brackets = ["(", ")"];
function is_token(s) {
return tokens.includes(s);
}
function is_token_prefix(s) {
if (is_token(s)) {
return false;
}
for (let i = 0; i < tokens.length; i++) {
if (tokens[i].startsWith(s)) {
return true;
}
}
return false;
}
function get_arguments(s, i) {
if (s[i] !== brackets[0]) {
console.log(s[i]);
throw new Error("Expected (");
}
let arguments_ = "";
let next_char = s[i + 1];
i += 1;
while (next_char !== brackets[1]) {
arguments_ += s[i];
i++;
next_char = s[i];
}
return { args: arguments_, index: i + 1 };
}
function get_branch(s, i) {
var branch = "";
var open_brackets = 0;
while (open_brackets >= 0) {
if (i > s.length) {
throw new Error("Expected }");
}
branch += s[i];
i++;
if (s[i] === branchers[0]) {
open_brackets++;
} else if (s[i] === branchers[1]) {
open_brackets--;
}
}
return { content: branch, index: i + 1 };
}
function lex_front(s) {
let without_spaces = s.replace(/\s/g, "");
return lex_back(without_spaces);
}
function lex_back(s) {
console.log("Compiling: " + s);
let i = 0;
let current_token = "";
let tokens2 = [];
while (i < s.length) {
while (is_token_prefix(current_token)) {
current_token += s[i];
i++;
}
if (is_token(current_token)) {
if (current_token === "if") {
var type = 1;
let branches2 = [];
let arguments_2 = [];
var current_arguments = get_arguments(s, i);
i = current_arguments.index;
console.log(current_arguments.args);
if (s[i] !== branchers[0]) {
console.log(s[i]);
throw new Error("Expected {");
}
i += 1;
var branch = get_branch(s, i);
i = branch.index;
branches2.push(lex_back(branch.content));
arguments_2.push(current_arguments.args);
while (s.substring(i, i + 6) === "elseif") {
i += 6;
var current_arguments = get_arguments(s, i);
i = current_arguments.index;
if (s[i] !== branchers[0]) {
throw new Error("Expected {");
}
i += 1;
var branch = get_branch(s, i);
i = branch.index;
branches2.push(lex_back(branch.content));
arguments_2.push(current_arguments.args);
}
if (s.substring(i, i + 4) === "else") {
type = 2;
i += 4;
i += 1;
var branch = get_branch(s, i);
i = branch.index;
branches2.push(lex_back(branch.content));
}
tokens2.push({
type,
name: current_token,
arguments: arguments_2,
branches: branches2
});
} else if (current_token === "for" || current_token === "foreach" || current_token === "while") {
var type = 10;
var branches = [];
var arguments_ = [];
var current_arguments = get_arguments(s, i);
i = current_arguments.index;
console.log(current_arguments.args);
if (s[i] !== branchers[0]) {
console.log(s[i]);
throw new Error("Expected {");
}
i += 1;
var branch = get_branch(s, i);
i = branch.index;
branches.push(lex_back(branch.content));
arguments_.push(current_arguments.args);
tokens2.push({
type,
name: current_token,
arguments: arguments_,
branches
});
} else if (current_token == "do") {
var type = 11;
var branches = [];
var arguments_ = [];
if (s[i] !== branchers[0]) {
console.log(s[i]);
throw new Error("Expected {");
}
i += 1;
var branch = get_branch(s, i);
i = branch.index;
branches.push(lex_back(branch.content));
if (s.substring(i, i + 5) !== "while") {
throw new Error("Expected while");
}
i += 5;
var current_arguments = get_arguments(s, i);
arguments_.push(current_arguments.args);
i = current_arguments.index;
tokens2.push({
type,
name: current_token,
arguments: arguments_,
branches
});
}
} else {
while (s[i] != brackets[0] && s[i] != ";") {
if (i >= s.length) {
throw new Error("Expected ( or ;");
}
current_token += s[i];
i++;
}
if (s[i] === ";") {
i++;
tokens2.push({
type: -1,
name: current_token,
arguments: [],
branches: []
});
} else {
var current_arguments = get_arguments(s, i);
i = current_arguments.index;
tokens2.push({
type: 0,
name: current_token,
arguments: [current_arguments.args],
branches: []
});
if (s[i] == ";") {
i += 1;
}
}
}
current_token = "";
}
return tokens2;
}
// main.ts
var DEFAULT_SETTINGS = {
mySetting: "default"
};
var NSD_JS = class extends import_obsidian.Plugin {
async onload() {
this.registerMarkdownCodeBlockProcessor("nsd_js", (source, el, ctx) => {
const tree = lex_front(source);
const svg = convert(0, 0, 650, 1e3, tree, "start");
const innerSvg = svg.svgString;
const height = svg.height;
el.innerHTML = "<svg width='650' height='" + height + "'>" + innerSvg + "</svg>";
});
}
async loadSettings() {
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
}
async saveSettings() {
await this.saveData(this.settings);
}
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50cyIsICJzcmMvbmFzc2lfc3ZnX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A9IHN1Yl9ibG9jay5jaGlsZHJlblswXTtcbiAgICAgICAgICAgIHZhciBib3VuZHMyID0gc3ViX2Jsb2NrLmNoaWxkcmVuWzFdO1xuICAgICAgICAgICAgc3ZnQXBwZW5kaXggKz0gY29udmVydF9iYWNrZW5kKGJvdW5kczEuc3RhcnRfeCwgYm91bmRzMS5zdGFydF95LCBib3VuZHMxLndpZHRoLCBib3VuZHMxLmhlaWdodCwgYmxvY2suYnJhbmNoZXNbMF0pLnN2Z0FwcGVuZGl4O1xuICAgICAgICAgICAgc3ZnQXBwZW5kaXggKz0gY29udmVydF9iYWNrZW5kKGJvdW5kczIuc3RhcnRfeCwgYm91bmRzMi5zdGFydF95LCBib3VuZHMyLndpZHRoLCBib3VuZHMyLmhlaWdodCwgYmxvY2suYnJhbmNoZXNbMV0pLnN2Z0FwcGVuZGl4O1xuICAgICAgICAgICAgY3VycmVudF95ICs9IGhcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChibG9jay50eXBlID09IDEwKSB7IC8vbG9vcHNcbiAgICAgICAgICAgIGlmIChibG9jay5icmFuY2hlcy5sZW5ndGggIT0gMSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgMSBicmFuY2hlcywgTmFzc2ktU2huZWlkZXJtYW4gZGlhZ3JhbXMgb25seSBzdXBwb3J0IHNpbmdsZSBsb29wJylcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBzdWJfYmxvY2sgPSBjcmVhdGVQcmVMb29wQmxvY2soeCwgY3VycmVudF95LCB3aWR0aCwgaCwgYmxvY2submFtZSArICcoJyArIGJsb2NrLmFyZ3VtZW50c1swXSArICcpJyk7XG4gICAgICAgICAgICBzdmdBcHBlbmRpeCArPSBzdWJfYmxvY2suc3ZnQXBwZW5kaXg7XG4gICAgICAgICAgICB2YXIgYm91bmRzMSA9IHN1Yl9ibG9jay5jaGlsZHJlblswXTtcbiAgICAgICAgICAgIHN2Z0FwcGV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oZWlnaHQ6IGN1cnJlbnRfeSAtIHl9XG59XG5cbmZ1bmN0aW9uIGdldE1heENoaWxkQ291bnQoYnJhbmNoIDogdG9rZW5bXSkgOiBudW1iZXIge1xuICAgIGxldCBjb3VudHMgPSBbXVxuICAgIGZvciAobGV0IGJsb2NrIG9mIGJyYW5jaCkge1xuICAgICAgICBpZiAoYmxvY2sudHlwZSA9PSAwIHx8IGJsb2NrLnR5cGUgPT0gLTEpIHtcbiAgICAgICAgICAgIGNvdW50cy5wdXNoKDEpXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoYmxvY2sudHlwZSA9PSAyKSB7XG4gICAgICAgICAgICBsZXQgY291bnRBID0gZ2V0TWF4Q2hpbGRDb3VudChibG9jay5icmFuY2hlc1swXSlcblxuICAgICAgICAgICAgbGV0IGNvdW50QiA9IGdldE1heENoaWxkQ291bnQoYmxvY2suYnJhbmNoZXNbMV0pXG5cbiAgICAgICAgICAgIGNvdW50cy5wdXNoKGNvdW50QSArIGNvdW50QilcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNvdW50cy5wdXNoKGdldE1heENoaWxkQ291bnQoYmxvY2suYnJhbmNoZXNbMF0pKVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBNYXRoLm1heCguLi5jb3VudHMpXG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRIZWlnaHQoYmxvY2sgOiB0b2tlbikge1xuICAgIGNvbnN0IGJhc2VfaCA9IDIwO1xuICAgIGlmIChibG9jay50eXBlID09IDAgfHwgYmxvY2sudHlwZSA9PSAtMSkge1xuICAgICAgICByZXR1cm4gYmFzZV9oXG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICBsZXQgaGVpZ2h0cyA6IG51bWJlcltdID0gW11cbiAgICAgICAgY29uc29sZS5sb2coYmxvY2spXG4gICAgICAgIGZvciAobGV0IGJyYW5jaCBvZiBibG9jay5icmFuY2hlcykge1xuICAgICAgICAgICA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gIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgfScpXG4gICAgICAgIH1cbiAgICAgICAgYnJhbmNoICs9IHNbaV1cbiAgICAgICAgaSsrXG4gICAgICAgIGlmIChzW2ldID09PSBicmFuY2hlcnNbMF0pIHtcbiAgICAgICAgICAgIG9wZW5fYnJhY2tldHMrK1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHNbaV0gPT09IGJyYW5jaGVyc1sxXSkge1xuICAgICAgICAgICAgb3Blbl9icmFja2V0cy0tXG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtjb250ZW50OiBicmFuY2gsIGluZGV4OiBpICsgMX1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGxleF9mcm9udChzIDogc3RyaW5nKSB7XG4gICAgbGV0IHdpdGhvdXRfc3BhY2VzID0gcy5yZXBsYWNlKC9cXHMvZywgJycpICBcbiAgICAvL2xldCB3aXRob3V0X3NwYWNlc19hbmRfc2VtaWNvbG9ucyA9IHdpdGhvdXRfc3BhY2VzLnJlcGxhY2UoLzsvZywgJycpXG4gICAgcmV0dXJuIGxleF9iYWNrKHdpdGhvdXRfc3BhY2VzKVxufVxuXG5mdW5jdGlvbiBsZXhfYmFjayhzIDogc3RyaW5nKSA6IHRva2VuW10ge1xuICAgIGNvbnNvbGUubG9nKFwiQ29tcGlsaW5nOiBcIiArIHMpXG4gICAgbGV0IGkgPSAwXG4gICAgbGV0IGN1cnJlbnRfdG9rZW4gPSAnJ1xuICAgIGxldCB0b2tlbnMgPSBbXVxuICAgIHdoaWxlIChpIDwgcy5sZW5ndGgpIHtcbiAgICAgICAgd2hpbGUgKGlzX3Rva2VuX3ByZWZpeChjdXJyZW50X3Rva2VuKSkge1xuICAgICAgICAgICAgY3VycmVudF90b2tlbiArPSBzW2ldXG4gICAgICAgICAgICBpKytcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNfdG9rZW4oY3VycmVudF90b2tlbikpIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50X3Rva2VuID09PSAnaWYnKSB7XG4gICAgICAgICAgICAgICAgdmFyIHR5cGUgPSAxXG4gICAgICAgICAgICAgICAgbGV0IGJyYW5jaGVzIDogdG9rZW5bXVtdID0gW11cbiAgICAgICAgICAgICAgICBsZXQgYXJndW1lbnRzXyA6IHN0cmluZ1tdID0gW11cblxuICAgICAgICAgICAgICAgIHZhciBjdXJyZW50X2FyZ3VtZW50cyA9IGdldF9hcmd1bWVudHMocywgaSlcbiAgICAgICAgICAgICAgICBpID0gY3VycmVudF9hcmd1bWVudHMuaW5kZXhcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjdXJyZW50X2FyZ3VtZW50cy5hcmdzKVxuXG4gICAgICAgICAgICAgICAgaWYgKHNbaV0gIT09IGJyYW5jaGVyc1swXSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhzW2ldKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0V4cGVjdGVkIHsnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpICs9IDFcbiAgICAgICAgICAgICAgICB2YXIgYnJhbmNoID0gZ2V0X2JyYW5jaChzLCBpKVxuICAgICAgICAgICAgICAgIGkgPSBicmFuY2guaW5kZXhcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBicmFuY2hlcy5wdXNoKGxleF9iYWNrKGJyYW5jaC5jb250ZW50KSlcbiAgICAgICAgICAgICAgICBhcmd1bWVudHNfLnB1c2goY3VycmVudF9hcmd1bWVudHMuYXJncylcblxuICAgICAgICAgICAgICAgIHdoaWxlIChzLnN1YnN0cmluZyhpLCBpICsgNikgPT09ICdlbHNlaWYnKSB7XG4gICAgICAgICAgICAgICAgICAgIGkgKz0gNlxuICAgICAgICAgICAgICAgICAgICB2YXIgY3VycmVudF9hcmd1bWVudHMgPSBnZXRfYXJndW1lbnRzKHMsIGkpXG4gICAgICAgICAgICAgICAgICAgIGkgPSBjdXJyZW50X2FyZ3VtZW50cy5pbmRleFxuICAgICAgICAgICAgICAgICAgICBpZiAoc1tpXSAhPT0gYnJhbmNoZXJzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0V4cGVjdGVkIHsnKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGkgKz0gMVxuICAgICAgICAgICAgICAgICAgICB2YXIgYnJhbmNoID0gZ2V0X2JyYW5jaChzLCBpKVxuICAgICAgICAgICAgICAgICAgICBpID0gYnJhbmNoLmluZGV4XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBicmFuY2hlcy5wdXNoKGxleF9iYWNrKGJyYW5jaC5jb250ZW50KSlcbiAgICAgICAgICAgICAgICAgICAgYXJndW1lbnRzXy5wdXNoKGN1cnJlbnRfYXJndW1lbnRzLmFyZ3MpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzLnN1YnN0cmluZyhpLCBpICsgNCkgPT09ICdlbHNlJykge1xuICAgICAgICAgICAgICAgICAgICB0eXBlID0gMlxuICAgICAgICAgICAgICAgICAgICBpICs9IDRcbiAgICAgICAgICAgICAgICAgICAgaSArPSAxXG4gICAgICAgICAgICAgICAgICAgIHZhciBicmFuY2ggPSBnZXRfYnJhbmNoKHMsIGkpXG4gICAgICAgICAgICAgICAgICAgIGkgPSBicmFuY2guaW5kZXhcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGJyYW5jaGVzLnB1c2gobGV4X2JhY2soYnJhbmNoLmNvbnRlbnQpKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogY3VycmVudF90b2tlbixcbiAgICAgICAgICAgICAgICAgICAgYXJndW1lbnRzOiBhcmd1bWVudHNfLFxuICAgICAgICAgICAgICAgICAgICBicmFuY2hlczogYnJhbmNoZXNcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoY3VycmVudF90b2tlbiA9PT0gJ2ZvcicgfHwgY3VycmVudF90b2tlbiA9PT0gJ2ZvcmVhY2gnIHx8IGN1cnJlbnRfdG9rZW4gPT09ICd3aGlsZScpIHtcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IDEwXG4gICAgICAgICAgICAgICAgdmFyIGJyYW5jaGVzIDogdG9rZW5bXVtdID0gW11cbiAgICAgICAgICAgICAgICB2YXIgYXJndW1lbnRzXyA6IHN0cmluZ1tdID0gW11cblxuICAgICAgICAgICAgICAgIHZhciBjdXJyZW50X2FyZ3VtZW50cyA9IGdldF9hcmd1bWVudHMocywgaSlcbiAgICAgICAgICAgICAgICBpID0gY3VycmVudF9hcmd1bWVudHMuaW5kZXhcblxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGN1cnJlbnRfYXJndW1lbnRzLmFyZ3MpXG5cbiAgICAgICAgICAgICAgICBpZiAoc1tpXSAhPT0gYnJhbmNoZXJzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHNbaV0pXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgeycpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGkgKz0gMVxuICAgICAgICAgICAgICAgIHZhciBicmFuY2ggPSBnZXRfYnJhbmNoKHMsIGkpXG4gICAgICAgICAgICAgICAgaSA9IGJyYW5jaC5pbmRleFxuXG4gICAgICAgICAgICAgICAgYnJhbmNoZXMucHVzaChsZXhfYmFjayhicmFuY2guY29udGVudCkpXG4gICAgICAgICAgICAgICAgYXJndW1lbnRzXy5wdXNoKGN1cnJlbnRfYXJndW1lbnRzLmFyZ3MpXG5cbiAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IGN1cnJlbnRfdG9rZW4sXG4gICAgICAgICAgICAgICAgICAgIGFyZ3VtZW50czogYXJndW1lbnRzXyxcbiAgICAgICAgICAgICAgICAgICAgYnJhbmNoZXM6IGJyYW5jaGVzXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGN1cnJlbnRfdG9rZW4gPT0gJ2RvJykge1xuICAgICAgICAgICAgICAgIHZhciB0eXBlID0gMTFcbiAgICAgICAgICAgICAgICB2YXIgYnJhbmNoZXMgOiB0b2tlbltdW10gPSBbXVxuICAgICAgICAgICAgICAgIHZhciBhcmd1bWVudHNfIDogc3RyaW5nW10gPSBbXVxuXG4gICAgICAgICAgICAgICAgaWYgKHNbaV0gIT09IGJyYW5jaGVyc1swXSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhzW2ldKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0V4cGVjdGVkIHsnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpICs9IDFcbiAgICAgICAgICAgICAgICB2YXIgYnJhbmNoID0gZ2V0X2JyYW5jaChzLCBpKVxuICAgICAgICAgICAgICAgIGkgPSBicmFuY2guaW5kZXhcblxuICAgICAgICAgICAgICAgIGJyYW5jaGVzLnB1c2gobGV4X2JhY2soYnJhbmNoLmNvbnRlbnQpKVxuXG4gICAgICAgICAgICAgICAgaWYgKHMuc3Vic3RyaW5nKGksIGkgKyA1KSAhPT0gJ3doaWxlJykge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0V4cGVjdGVkIHdoaWxlJylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaSArPSA1XG4gICAgICAgICAgICAgICAgdmFyIGN1cnJlbnRfYXJndW1lbnRzID0gZ2V0X2FyZ3VtZW50cyhzLCBpKVxuICAgICAgICAgICAgICAgIGFyZ3VtZW50c18ucHVzaChjdXJyZW50X2FyZ3VtZW50cy5hcmdzKVxuICAgICAgICAgICAgICAgIGkgPSBjdXJyZW50X2FyZ3VtZW50cy5pbmRleFxuXG4gICAgICAgICAgICAgICAgdG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBjdXJyZW50X3Rva2VuLFxuICAgICAgICAgICAgICAgICAgICBhcmd1bWVudHM6IGFyZ3VtZW50c18sXG4gICAgICAgICAgICAgICAgICAgIGJyYW5jaGVzOiBicmFuY2hlc1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB3aGlsZSAoc1tpXSAhPSBicmFja2V0c1swXSAmJiBzW2ldICE9ICc7Jykge1xuICAgICAgICAgICAgICAgIGlmIChpID49IHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgKCBvciA7JylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY3VycmVudF90b2tlbiArPSBzW2ldXG4gICAgICAgICAgICAgICAgaSsrXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoc1tpXSA9PT0gJzsnKSB7XG4gICAgICAgICAgICAgICAgaSsrXG4gICAgICAgICAgICAgICAgdG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAtMSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogY3VycmVudF90b2tlbixcbiAgICAgICAgICAgICAgICAgICAgYXJndW1lbnRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgYnJhbmNoZXM6IFtdXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBjdXJyZW50X2FyZ3VtZW50cyA9IGdldF9hcmd1bWVudHMocywgaSlcbiAgICAgICAgICAgICAgICBpID0gY3VycmVudF9hcmd1bWVudHMuaW5kZXhcbiAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IDAsXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IGN1cnJlbnRfdG9rZW4sXG4gICAgICAgICAgICAgICAgICAgIGFyZ3VtZW50czogW2N1cnJlbnRfYXJndW1lbnRzLmFyZ3NdLFxuICAgICAgICAgICAgICAgICAgICBicmFuY2hlczogW11cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIGlmIChzW2ldID09ICc7Jykge1xuICAgICAgICAgICAgICAgICAgICBpICs9IDFcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY3VycmVudF90b2tlbiA9ICcnXG4gICAgfVxuICAgIHJldHVybiB0b2tlbnNcbn0iXSwKICAibWFwcGluZ3MiOiAiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUEsc0JBQTRGOzs7QUNLckYsU0FBUyxvQkFBb0IsR0FBVyxHQUFXLE9BQWUsUUFBZ0IsU0FBd0I7QUFDN0csUUFBTSxJQUFJO0FBQ1YsUUFBTSxjQUFjO0FBQUEsbUJBQ0wsU0FBUyxhQUFhLGtCQUFrQjtBQUFBLG1CQUN4QyxJQUFJLFFBQVEsU0FBUyxJQUFJLFNBQVMseURBQXlEO0FBQUE7QUFFMUcsU0FBTyxFQUFFLGFBQWEsVUFBVSxDQUFDLEVBQUU7QUFDdkM7QUFFTyxTQUFTLG9CQUFvQixHQUF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