@readme/markdown 11.1.1 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Code/index.tsx +4 -3
- package/components/CodeTabs/index.tsx +5 -2
- package/dist/10.node.js +419 -207
- package/dist/10.node.js.map +1 -1
- package/dist/101.node.js +23 -0
- package/dist/101.node.js.map +1 -0
- package/dist/109.node.js +63 -0
- package/dist/109.node.js.map +1 -0
- package/dist/197.node.js +63 -0
- package/dist/197.node.js.map +1 -0
- package/dist/213.node.js +23 -0
- package/dist/213.node.js.map +1 -0
- package/dist/{580.node.js → 259.node.js} +98 -79
- package/dist/259.node.js.map +1 -0
- package/dist/339.node.js +4 -4
- package/dist/{912.node.js → 356.node.js} +154 -150
- package/dist/356.node.js.map +1 -0
- package/dist/357.node.js +1352 -0
- package/dist/357.node.js.map +1 -0
- package/dist/387.node.js +23 -0
- package/dist/387.node.js.map +1 -0
- package/dist/398.node.js +63 -0
- package/dist/398.node.js.map +1 -0
- package/dist/{805.node.js → 405.node.js} +110 -91
- package/dist/405.node.js.map +1 -0
- package/dist/{23.node.js → 434.node.js} +178 -118
- package/dist/434.node.js.map +1 -0
- package/dist/{550.node.js → 470.node.js} +105 -80
- package/dist/470.node.js.map +1 -0
- package/dist/{870.node.js → 474.node.js} +84 -77
- package/dist/474.node.js.map +1 -0
- package/dist/{649.node.js → 483.node.js} +70 -67
- package/dist/483.node.js.map +1 -0
- package/dist/486.node.js +23865 -25247
- package/dist/486.node.js.map +1 -1
- package/dist/{982.node.js → 524.node.js} +124 -88
- package/dist/524.node.js.map +1 -0
- package/dist/53.node.js +506 -0
- package/dist/53.node.js.map +1 -0
- package/dist/{898.node.js → 561.node.js} +54 -52
- package/dist/561.node.js.map +1 -0
- package/dist/579.node.js +23 -0
- package/dist/579.node.js.map +1 -0
- package/dist/{881.node.js → 680.node.js} +202 -142
- package/dist/680.node.js.map +1 -0
- package/dist/{915.node.js → 7.node.js} +265 -1210
- package/dist/7.node.js.map +1 -0
- package/dist/{188.node.js → 705.node.js} +135 -132
- package/dist/705.node.js.map +1 -0
- package/dist/713.node.js +23 -0
- package/dist/713.node.js.map +1 -0
- package/dist/{135.node.js → 720.node.js} +230 -138
- package/dist/720.node.js.map +1 -0
- package/dist/{364.node.js → 763.node.js} +488 -432
- package/dist/763.node.js.map +1 -0
- package/dist/{572.node.js → 828.node.js} +229 -185
- package/dist/828.node.js.map +1 -0
- package/dist/{311.node.js → 834.node.js} +106 -104
- package/dist/834.node.js.map +1 -0
- package/dist/{359.node.js → 863.node.js} +290 -236
- package/dist/863.node.js.map +1 -0
- package/dist/872.node.js +630 -0
- package/dist/872.node.js.map +1 -0
- package/dist/879.node.js +61 -0
- package/dist/879.node.js.map +1 -0
- package/dist/{371.node.js → 880.node.js} +401 -400
- package/dist/880.node.js.map +1 -0
- package/dist/{214.node.js → 894.node.js} +116 -114
- package/dist/894.node.js.map +1 -0
- package/dist/{890.node.js → 90.node.js} +134 -129
- package/dist/90.node.js.map +1 -0
- package/dist/{855.node.js → 901.node.js} +510 -522
- package/dist/901.node.js.map +1 -0
- package/dist/903.node.js +23 -0
- package/dist/903.node.js.map +1 -0
- package/dist/{38.node.js → 929.node.js} +920 -442
- package/dist/929.node.js.map +1 -0
- package/dist/941.node.js +23 -0
- package/dist/941.node.js.map +1 -0
- package/dist/995.node.js +2 -2
- package/dist/hooks/useHydrated/index.d.ts +6 -0
- package/dist/main.js +26 -8
- package/dist/main.node.js +32 -6
- package/dist/main.node.js.map +1 -1
- package/package.json +3 -3
- package/dist/122.node.js +0 -23
- package/dist/122.node.js.map +0 -1
- package/dist/135.node.js.map +0 -1
- package/dist/136.node.js +0 -23
- package/dist/136.node.js.map +0 -1
- package/dist/188.node.js.map +0 -1
- package/dist/214.node.js.map +0 -1
- package/dist/23.node.js.map +0 -1
- package/dist/311.node.js.map +0 -1
- package/dist/354.node.js +0 -23
- package/dist/354.node.js.map +0 -1
- package/dist/359.node.js.map +0 -1
- package/dist/364.node.js.map +0 -1
- package/dist/371.node.js.map +0 -1
- package/dist/38.node.js.map +0 -1
- package/dist/391.node.js +0 -522
- package/dist/391.node.js.map +0 -1
- package/dist/462.node.js +0 -23
- package/dist/462.node.js.map +0 -1
- package/dist/48.node.js +0 -57
- package/dist/48.node.js.map +0 -1
- package/dist/537.node.js +0 -59
- package/dist/537.node.js.map +0 -1
- package/dist/550.node.js.map +0 -1
- package/dist/572.node.js.map +0 -1
- package/dist/580.node.js.map +0 -1
- package/dist/649.node.js.map +0 -1
- package/dist/740.node.js +0 -23
- package/dist/740.node.js.map +0 -1
- package/dist/741.node.js +0 -23
- package/dist/741.node.js.map +0 -1
- package/dist/779.node.js +0 -57
- package/dist/779.node.js.map +0 -1
- package/dist/805.node.js.map +0 -1
- package/dist/855.node.js.map +0 -1
- package/dist/870.node.js.map +0 -1
- package/dist/874.node.js +0 -57
- package/dist/874.node.js.map +0 -1
- package/dist/881.node.js.map +0 -1
- package/dist/890.node.js.map +0 -1
- package/dist/898.node.js.map +0 -1
- package/dist/912.node.js.map +0 -1
- package/dist/915.node.js.map +0 -1
- package/dist/982.node.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
exports.id =
|
|
2
|
-
exports.ids = [
|
|
1
|
+
exports.id = 7;
|
|
2
|
+
exports.ids = [7];
|
|
3
3
|
exports.modules = {
|
|
4
4
|
|
|
5
5
|
/***/ 7799:
|
|
@@ -6244,1100 +6244,74 @@ module.exports = Emitter;
|
|
|
6244
6244
|
|
|
6245
6245
|
/***/ }),
|
|
6246
6246
|
|
|
6247
|
-
/***/
|
|
6247
|
+
/***/ 5007:
|
|
6248
6248
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6249
6249
|
|
|
6250
6250
|
"use strict";
|
|
6251
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6251
6252
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6252
|
-
/* harmony export */
|
|
6253
|
+
/* harmony export */ render: () => (/* binding */ render2)
|
|
6253
6254
|
/* harmony export */ });
|
|
6254
|
-
/* harmony import */ var
|
|
6255
|
-
/* harmony import */ var
|
|
6256
|
-
/* harmony import */ var
|
|
6257
|
-
/* harmony import */ var
|
|
6258
|
-
/* harmony import */ var
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
}, "trace"),
|
|
6279
|
-
yy: {},
|
|
6280
|
-
symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 },
|
|
6281
|
-
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
|
|
6282
|
-
productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
|
|
6283
|
-
performAction: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
6284
|
-
var $0 = $$.length - 1;
|
|
6285
|
-
switch (yystate) {
|
|
6286
|
-
case 6:
|
|
6287
|
-
case 7:
|
|
6288
|
-
return yy;
|
|
6289
|
-
break;
|
|
6290
|
-
case 8:
|
|
6291
|
-
yy.getLogger().trace("Stop NL ");
|
|
6292
|
-
break;
|
|
6293
|
-
case 9:
|
|
6294
|
-
yy.getLogger().trace("Stop EOF ");
|
|
6295
|
-
break;
|
|
6296
|
-
case 11:
|
|
6297
|
-
yy.getLogger().trace("Stop NL2 ");
|
|
6298
|
-
break;
|
|
6299
|
-
case 12:
|
|
6300
|
-
yy.getLogger().trace("Stop EOF2 ");
|
|
6301
|
-
break;
|
|
6302
|
-
case 15:
|
|
6303
|
-
yy.getLogger().info("Node: ", $$[$0].id);
|
|
6304
|
-
yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
|
|
6305
|
-
break;
|
|
6306
|
-
case 16:
|
|
6307
|
-
yy.getLogger().trace("Icon: ", $$[$0]);
|
|
6308
|
-
yy.decorateNode({ icon: $$[$0] });
|
|
6309
|
-
break;
|
|
6310
|
-
case 17:
|
|
6311
|
-
case 21:
|
|
6312
|
-
yy.decorateNode({ class: $$[$0] });
|
|
6313
|
-
break;
|
|
6314
|
-
case 18:
|
|
6315
|
-
yy.getLogger().trace("SPACELIST");
|
|
6316
|
-
break;
|
|
6317
|
-
case 19:
|
|
6318
|
-
yy.getLogger().trace("Node: ", $$[$0].id);
|
|
6319
|
-
yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
|
|
6320
|
-
break;
|
|
6321
|
-
case 20:
|
|
6322
|
-
yy.decorateNode({ icon: $$[$0] });
|
|
6323
|
-
break;
|
|
6324
|
-
case 25:
|
|
6325
|
-
yy.getLogger().trace("node found ..", $$[$0 - 2]);
|
|
6326
|
-
this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
|
6327
|
-
break;
|
|
6328
|
-
case 26:
|
|
6329
|
-
this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT };
|
|
6330
|
-
break;
|
|
6331
|
-
case 27:
|
|
6332
|
-
yy.getLogger().trace("node found ..", $$[$0 - 3]);
|
|
6333
|
-
this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
|
6334
|
-
break;
|
|
6335
|
-
}
|
|
6336
|
-
}, "anonymous"),
|
|
6337
|
-
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])],
|
|
6338
|
-
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
6339
|
-
parseError: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
|
|
6340
|
-
if (hash.recoverable) {
|
|
6341
|
-
this.trace(str);
|
|
6342
|
-
} else {
|
|
6343
|
-
var error = new Error(str);
|
|
6344
|
-
error.hash = hash;
|
|
6345
|
-
throw error;
|
|
6346
|
-
}
|
|
6347
|
-
}, "parseError"),
|
|
6348
|
-
parse: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parse(input) {
|
|
6349
|
-
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
6350
|
-
var args = lstack.slice.call(arguments, 1);
|
|
6351
|
-
var lexer2 = Object.create(this.lexer);
|
|
6352
|
-
var sharedState = { yy: {} };
|
|
6353
|
-
for (var k in this.yy) {
|
|
6354
|
-
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
6355
|
-
sharedState.yy[k] = this.yy[k];
|
|
6356
|
-
}
|
|
6357
|
-
}
|
|
6358
|
-
lexer2.setInput(input, sharedState.yy);
|
|
6359
|
-
sharedState.yy.lexer = lexer2;
|
|
6360
|
-
sharedState.yy.parser = this;
|
|
6361
|
-
if (typeof lexer2.yylloc == "undefined") {
|
|
6362
|
-
lexer2.yylloc = {};
|
|
6363
|
-
}
|
|
6364
|
-
var yyloc = lexer2.yylloc;
|
|
6365
|
-
lstack.push(yyloc);
|
|
6366
|
-
var ranges = lexer2.options && lexer2.options.ranges;
|
|
6367
|
-
if (typeof sharedState.yy.parseError === "function") {
|
|
6368
|
-
this.parseError = sharedState.yy.parseError;
|
|
6369
|
-
} else {
|
|
6370
|
-
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
6371
|
-
}
|
|
6372
|
-
function popStack(n) {
|
|
6373
|
-
stack.length = stack.length - 2 * n;
|
|
6374
|
-
vstack.length = vstack.length - n;
|
|
6375
|
-
lstack.length = lstack.length - n;
|
|
6376
|
-
}
|
|
6377
|
-
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(popStack, "popStack");
|
|
6378
|
-
function lex() {
|
|
6379
|
-
var token;
|
|
6380
|
-
token = tstack.pop() || lexer2.lex() || EOF;
|
|
6381
|
-
if (typeof token !== "number") {
|
|
6382
|
-
if (token instanceof Array) {
|
|
6383
|
-
tstack = token;
|
|
6384
|
-
token = tstack.pop();
|
|
6385
|
-
}
|
|
6386
|
-
token = self.symbols_[token] || token;
|
|
6387
|
-
}
|
|
6388
|
-
return token;
|
|
6255
|
+
/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(416);
|
|
6256
|
+
/* harmony import */ var cytoscape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8786);
|
|
6257
|
+
/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3457);
|
|
6258
|
+
/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__);
|
|
6259
|
+
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(796);
|
|
6260
|
+
|
|
6261
|
+
|
|
6262
|
+
// src/rendering-util/layout-algorithms/cose-bilkent/cytoscape-setup.ts
|
|
6263
|
+
|
|
6264
|
+
|
|
6265
|
+
|
|
6266
|
+
cytoscape__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.use((cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2___default()));
|
|
6267
|
+
function addNodes(nodes, cy) {
|
|
6268
|
+
nodes.forEach((node) => {
|
|
6269
|
+
const nodeData = {
|
|
6270
|
+
id: node.id,
|
|
6271
|
+
labelText: node.label,
|
|
6272
|
+
height: node.height,
|
|
6273
|
+
width: node.width,
|
|
6274
|
+
padding: node.padding ?? 0
|
|
6275
|
+
};
|
|
6276
|
+
Object.keys(node).forEach((key) => {
|
|
6277
|
+
if (!["id", "label", "height", "width", "padding", "x", "y"].includes(key)) {
|
|
6278
|
+
nodeData[key] = node[key];
|
|
6389
6279
|
}
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
if (symbol === null || typeof symbol == "undefined") {
|
|
6398
|
-
symbol = lex();
|
|
6399
|
-
}
|
|
6400
|
-
action = table[state] && table[state][symbol];
|
|
6401
|
-
}
|
|
6402
|
-
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
6403
|
-
var errStr = "";
|
|
6404
|
-
expected = [];
|
|
6405
|
-
for (p in table[state]) {
|
|
6406
|
-
if (this.terminals_[p] && p > TERROR) {
|
|
6407
|
-
expected.push("'" + this.terminals_[p] + "'");
|
|
6408
|
-
}
|
|
6409
|
-
}
|
|
6410
|
-
if (lexer2.showPosition) {
|
|
6411
|
-
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
6412
|
-
} else {
|
|
6413
|
-
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
6414
|
-
}
|
|
6415
|
-
this.parseError(errStr, {
|
|
6416
|
-
text: lexer2.match,
|
|
6417
|
-
token: this.terminals_[symbol] || symbol,
|
|
6418
|
-
line: lexer2.yylineno,
|
|
6419
|
-
loc: yyloc,
|
|
6420
|
-
expected
|
|
6421
|
-
});
|
|
6422
|
-
}
|
|
6423
|
-
if (action[0] instanceof Array && action.length > 1) {
|
|
6424
|
-
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
6425
|
-
}
|
|
6426
|
-
switch (action[0]) {
|
|
6427
|
-
case 1:
|
|
6428
|
-
stack.push(symbol);
|
|
6429
|
-
vstack.push(lexer2.yytext);
|
|
6430
|
-
lstack.push(lexer2.yylloc);
|
|
6431
|
-
stack.push(action[1]);
|
|
6432
|
-
symbol = null;
|
|
6433
|
-
if (!preErrorSymbol) {
|
|
6434
|
-
yyleng = lexer2.yyleng;
|
|
6435
|
-
yytext = lexer2.yytext;
|
|
6436
|
-
yylineno = lexer2.yylineno;
|
|
6437
|
-
yyloc = lexer2.yylloc;
|
|
6438
|
-
if (recovering > 0) {
|
|
6439
|
-
recovering--;
|
|
6440
|
-
}
|
|
6441
|
-
} else {
|
|
6442
|
-
symbol = preErrorSymbol;
|
|
6443
|
-
preErrorSymbol = null;
|
|
6444
|
-
}
|
|
6445
|
-
break;
|
|
6446
|
-
case 2:
|
|
6447
|
-
len = this.productions_[action[1]][1];
|
|
6448
|
-
yyval.$ = vstack[vstack.length - len];
|
|
6449
|
-
yyval._$ = {
|
|
6450
|
-
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
6451
|
-
last_line: lstack[lstack.length - 1].last_line,
|
|
6452
|
-
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
6453
|
-
last_column: lstack[lstack.length - 1].last_column
|
|
6454
|
-
};
|
|
6455
|
-
if (ranges) {
|
|
6456
|
-
yyval._$.range = [
|
|
6457
|
-
lstack[lstack.length - (len || 1)].range[0],
|
|
6458
|
-
lstack[lstack.length - 1].range[1]
|
|
6459
|
-
];
|
|
6460
|
-
}
|
|
6461
|
-
r = this.performAction.apply(yyval, [
|
|
6462
|
-
yytext,
|
|
6463
|
-
yyleng,
|
|
6464
|
-
yylineno,
|
|
6465
|
-
sharedState.yy,
|
|
6466
|
-
action[1],
|
|
6467
|
-
vstack,
|
|
6468
|
-
lstack
|
|
6469
|
-
].concat(args));
|
|
6470
|
-
if (typeof r !== "undefined") {
|
|
6471
|
-
return r;
|
|
6472
|
-
}
|
|
6473
|
-
if (len) {
|
|
6474
|
-
stack = stack.slice(0, -1 * len * 2);
|
|
6475
|
-
vstack = vstack.slice(0, -1 * len);
|
|
6476
|
-
lstack = lstack.slice(0, -1 * len);
|
|
6477
|
-
}
|
|
6478
|
-
stack.push(this.productions_[action[1]][0]);
|
|
6479
|
-
vstack.push(yyval.$);
|
|
6480
|
-
lstack.push(yyval._$);
|
|
6481
|
-
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
6482
|
-
stack.push(newState);
|
|
6483
|
-
break;
|
|
6484
|
-
case 3:
|
|
6485
|
-
return true;
|
|
6486
|
-
}
|
|
6280
|
+
});
|
|
6281
|
+
cy.add({
|
|
6282
|
+
group: "nodes",
|
|
6283
|
+
data: nodeData,
|
|
6284
|
+
position: {
|
|
6285
|
+
x: node.x ?? 0,
|
|
6286
|
+
y: node.y ?? 0
|
|
6487
6287
|
}
|
|
6488
|
-
|
|
6489
|
-
}, "parse")
|
|
6490
|
-
};
|
|
6491
|
-
var lexer = /* @__PURE__ */ function() {
|
|
6492
|
-
var lexer2 = {
|
|
6493
|
-
EOF: 1,
|
|
6494
|
-
parseError: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
|
|
6495
|
-
if (this.yy.parser) {
|
|
6496
|
-
this.yy.parser.parseError(str, hash);
|
|
6497
|
-
} else {
|
|
6498
|
-
throw new Error(str);
|
|
6499
|
-
}
|
|
6500
|
-
}, "parseError"),
|
|
6501
|
-
// resets the lexer, sets new input
|
|
6502
|
-
setInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(input, yy) {
|
|
6503
|
-
this.yy = yy || this.yy || {};
|
|
6504
|
-
this._input = input;
|
|
6505
|
-
this._more = this._backtrack = this.done = false;
|
|
6506
|
-
this.yylineno = this.yyleng = 0;
|
|
6507
|
-
this.yytext = this.matched = this.match = "";
|
|
6508
|
-
this.conditionStack = ["INITIAL"];
|
|
6509
|
-
this.yylloc = {
|
|
6510
|
-
first_line: 1,
|
|
6511
|
-
first_column: 0,
|
|
6512
|
-
last_line: 1,
|
|
6513
|
-
last_column: 0
|
|
6514
|
-
};
|
|
6515
|
-
if (this.options.ranges) {
|
|
6516
|
-
this.yylloc.range = [0, 0];
|
|
6517
|
-
}
|
|
6518
|
-
this.offset = 0;
|
|
6519
|
-
return this;
|
|
6520
|
-
}, "setInput"),
|
|
6521
|
-
// consumes and returns one char from the input
|
|
6522
|
-
input: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6523
|
-
var ch = this._input[0];
|
|
6524
|
-
this.yytext += ch;
|
|
6525
|
-
this.yyleng++;
|
|
6526
|
-
this.offset++;
|
|
6527
|
-
this.match += ch;
|
|
6528
|
-
this.matched += ch;
|
|
6529
|
-
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
6530
|
-
if (lines) {
|
|
6531
|
-
this.yylineno++;
|
|
6532
|
-
this.yylloc.last_line++;
|
|
6533
|
-
} else {
|
|
6534
|
-
this.yylloc.last_column++;
|
|
6535
|
-
}
|
|
6536
|
-
if (this.options.ranges) {
|
|
6537
|
-
this.yylloc.range[1]++;
|
|
6538
|
-
}
|
|
6539
|
-
this._input = this._input.slice(1);
|
|
6540
|
-
return ch;
|
|
6541
|
-
}, "input"),
|
|
6542
|
-
// unshifts one char (or a string) into the input
|
|
6543
|
-
unput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(ch) {
|
|
6544
|
-
var len = ch.length;
|
|
6545
|
-
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
6546
|
-
this._input = ch + this._input;
|
|
6547
|
-
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
6548
|
-
this.offset -= len;
|
|
6549
|
-
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
6550
|
-
this.match = this.match.substr(0, this.match.length - 1);
|
|
6551
|
-
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
6552
|
-
if (lines.length - 1) {
|
|
6553
|
-
this.yylineno -= lines.length - 1;
|
|
6554
|
-
}
|
|
6555
|
-
var r = this.yylloc.range;
|
|
6556
|
-
this.yylloc = {
|
|
6557
|
-
first_line: this.yylloc.first_line,
|
|
6558
|
-
last_line: this.yylineno + 1,
|
|
6559
|
-
first_column: this.yylloc.first_column,
|
|
6560
|
-
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
6561
|
-
};
|
|
6562
|
-
if (this.options.ranges) {
|
|
6563
|
-
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
6564
|
-
}
|
|
6565
|
-
this.yyleng = this.yytext.length;
|
|
6566
|
-
return this;
|
|
6567
|
-
}, "unput"),
|
|
6568
|
-
// When called from action, caches matched text and appends it on next action
|
|
6569
|
-
more: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6570
|
-
this._more = true;
|
|
6571
|
-
return this;
|
|
6572
|
-
}, "more"),
|
|
6573
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
6574
|
-
reject: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6575
|
-
if (this.options.backtrack_lexer) {
|
|
6576
|
-
this._backtrack = true;
|
|
6577
|
-
} else {
|
|
6578
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
6579
|
-
text: "",
|
|
6580
|
-
token: null,
|
|
6581
|
-
line: this.yylineno
|
|
6582
|
-
});
|
|
6583
|
-
}
|
|
6584
|
-
return this;
|
|
6585
|
-
}, "reject"),
|
|
6586
|
-
// retain first n characters of the match
|
|
6587
|
-
less: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(n) {
|
|
6588
|
-
this.unput(this.match.slice(n));
|
|
6589
|
-
}, "less"),
|
|
6590
|
-
// displays already matched input, i.e. for error messages
|
|
6591
|
-
pastInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6592
|
-
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
6593
|
-
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
6594
|
-
}, "pastInput"),
|
|
6595
|
-
// displays upcoming input, i.e. for error messages
|
|
6596
|
-
upcomingInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6597
|
-
var next = this.match;
|
|
6598
|
-
if (next.length < 20) {
|
|
6599
|
-
next += this._input.substr(0, 20 - next.length);
|
|
6600
|
-
}
|
|
6601
|
-
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
6602
|
-
}, "upcomingInput"),
|
|
6603
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
6604
|
-
showPosition: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6605
|
-
var pre = this.pastInput();
|
|
6606
|
-
var c = new Array(pre.length + 1).join("-");
|
|
6607
|
-
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
6608
|
-
}, "showPosition"),
|
|
6609
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
6610
|
-
test_match: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(match, indexed_rule) {
|
|
6611
|
-
var token, lines, backup;
|
|
6612
|
-
if (this.options.backtrack_lexer) {
|
|
6613
|
-
backup = {
|
|
6614
|
-
yylineno: this.yylineno,
|
|
6615
|
-
yylloc: {
|
|
6616
|
-
first_line: this.yylloc.first_line,
|
|
6617
|
-
last_line: this.last_line,
|
|
6618
|
-
first_column: this.yylloc.first_column,
|
|
6619
|
-
last_column: this.yylloc.last_column
|
|
6620
|
-
},
|
|
6621
|
-
yytext: this.yytext,
|
|
6622
|
-
match: this.match,
|
|
6623
|
-
matches: this.matches,
|
|
6624
|
-
matched: this.matched,
|
|
6625
|
-
yyleng: this.yyleng,
|
|
6626
|
-
offset: this.offset,
|
|
6627
|
-
_more: this._more,
|
|
6628
|
-
_input: this._input,
|
|
6629
|
-
yy: this.yy,
|
|
6630
|
-
conditionStack: this.conditionStack.slice(0),
|
|
6631
|
-
done: this.done
|
|
6632
|
-
};
|
|
6633
|
-
if (this.options.ranges) {
|
|
6634
|
-
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
6635
|
-
}
|
|
6636
|
-
}
|
|
6637
|
-
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
6638
|
-
if (lines) {
|
|
6639
|
-
this.yylineno += lines.length;
|
|
6640
|
-
}
|
|
6641
|
-
this.yylloc = {
|
|
6642
|
-
first_line: this.yylloc.last_line,
|
|
6643
|
-
last_line: this.yylineno + 1,
|
|
6644
|
-
first_column: this.yylloc.last_column,
|
|
6645
|
-
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
6646
|
-
};
|
|
6647
|
-
this.yytext += match[0];
|
|
6648
|
-
this.match += match[0];
|
|
6649
|
-
this.matches = match;
|
|
6650
|
-
this.yyleng = this.yytext.length;
|
|
6651
|
-
if (this.options.ranges) {
|
|
6652
|
-
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
6653
|
-
}
|
|
6654
|
-
this._more = false;
|
|
6655
|
-
this._backtrack = false;
|
|
6656
|
-
this._input = this._input.slice(match[0].length);
|
|
6657
|
-
this.matched += match[0];
|
|
6658
|
-
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
6659
|
-
if (this.done && this._input) {
|
|
6660
|
-
this.done = false;
|
|
6661
|
-
}
|
|
6662
|
-
if (token) {
|
|
6663
|
-
return token;
|
|
6664
|
-
} else if (this._backtrack) {
|
|
6665
|
-
for (var k in backup) {
|
|
6666
|
-
this[k] = backup[k];
|
|
6667
|
-
}
|
|
6668
|
-
return false;
|
|
6669
|
-
}
|
|
6670
|
-
return false;
|
|
6671
|
-
}, "test_match"),
|
|
6672
|
-
// return next match in input
|
|
6673
|
-
next: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
|
|
6674
|
-
if (this.done) {
|
|
6675
|
-
return this.EOF;
|
|
6676
|
-
}
|
|
6677
|
-
if (!this._input) {
|
|
6678
|
-
this.done = true;
|
|
6679
|
-
}
|
|
6680
|
-
var token, match, tempMatch, index;
|
|
6681
|
-
if (!this._more) {
|
|
6682
|
-
this.yytext = "";
|
|
6683
|
-
this.match = "";
|
|
6684
|
-
}
|
|
6685
|
-
var rules = this._currentRules();
|
|
6686
|
-
for (var i = 0; i < rules.length; i++) {
|
|
6687
|
-
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
6688
|
-
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
6689
|
-
match = tempMatch;
|
|
6690
|
-
index = i;
|
|
6691
|
-
if (this.options.backtrack_lexer) {
|
|
6692
|
-
token = this.test_match(tempMatch, rules[i]);
|
|
6693
|
-
if (token !== false) {
|
|
6694
|
-
return token;
|
|
6695
|
-
} else if (this._backtrack) {
|
|
6696
|
-
match = false;
|
|
6697
|
-
continue;
|
|
6698
|
-
} else {
|
|
6699
|
-
return false;
|
|
6700
|
-
}
|
|
6701
|
-
} else if (!this.options.flex) {
|
|
6702
|
-
break;
|
|
6703
|
-
}
|
|
6704
|
-
}
|
|
6705
|
-
}
|
|
6706
|
-
if (match) {
|
|
6707
|
-
token = this.test_match(match, rules[index]);
|
|
6708
|
-
if (token !== false) {
|
|
6709
|
-
return token;
|
|
6710
|
-
}
|
|
6711
|
-
return false;
|
|
6712
|
-
}
|
|
6713
|
-
if (this._input === "") {
|
|
6714
|
-
return this.EOF;
|
|
6715
|
-
} else {
|
|
6716
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
6717
|
-
text: "",
|
|
6718
|
-
token: null,
|
|
6719
|
-
line: this.yylineno
|
|
6720
|
-
});
|
|
6721
|
-
}
|
|
6722
|
-
}, "next"),
|
|
6723
|
-
// return next match that has a token
|
|
6724
|
-
lex: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function lex() {
|
|
6725
|
-
var r = this.next();
|
|
6726
|
-
if (r) {
|
|
6727
|
-
return r;
|
|
6728
|
-
} else {
|
|
6729
|
-
return this.lex();
|
|
6730
|
-
}
|
|
6731
|
-
}, "lex"),
|
|
6732
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
6733
|
-
begin: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function begin(condition) {
|
|
6734
|
-
this.conditionStack.push(condition);
|
|
6735
|
-
}, "begin"),
|
|
6736
|
-
// pop the previously active lexer condition state off the condition stack
|
|
6737
|
-
popState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function popState() {
|
|
6738
|
-
var n = this.conditionStack.length - 1;
|
|
6739
|
-
if (n > 0) {
|
|
6740
|
-
return this.conditionStack.pop();
|
|
6741
|
-
} else {
|
|
6742
|
-
return this.conditionStack[0];
|
|
6743
|
-
}
|
|
6744
|
-
}, "popState"),
|
|
6745
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
6746
|
-
_currentRules: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function _currentRules() {
|
|
6747
|
-
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
6748
|
-
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
6749
|
-
} else {
|
|
6750
|
-
return this.conditions["INITIAL"].rules;
|
|
6751
|
-
}
|
|
6752
|
-
}, "_currentRules"),
|
|
6753
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
6754
|
-
topState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function topState(n) {
|
|
6755
|
-
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
6756
|
-
if (n >= 0) {
|
|
6757
|
-
return this.conditionStack[n];
|
|
6758
|
-
} else {
|
|
6759
|
-
return "INITIAL";
|
|
6760
|
-
}
|
|
6761
|
-
}, "topState"),
|
|
6762
|
-
// alias for begin(condition)
|
|
6763
|
-
pushState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function pushState(condition) {
|
|
6764
|
-
this.begin(condition);
|
|
6765
|
-
}, "pushState"),
|
|
6766
|
-
// return the number of states currently on the stack
|
|
6767
|
-
stateStackSize: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function stateStackSize() {
|
|
6768
|
-
return this.conditionStack.length;
|
|
6769
|
-
}, "stateStackSize"),
|
|
6770
|
-
options: { "case-insensitive": true },
|
|
6771
|
-
performAction: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
6772
|
-
var YYSTATE = YY_START;
|
|
6773
|
-
switch ($avoiding_name_collisions) {
|
|
6774
|
-
case 0:
|
|
6775
|
-
yy.getLogger().trace("Found comment", yy_.yytext);
|
|
6776
|
-
return 6;
|
|
6777
|
-
break;
|
|
6778
|
-
case 1:
|
|
6779
|
-
return 8;
|
|
6780
|
-
break;
|
|
6781
|
-
case 2:
|
|
6782
|
-
this.begin("CLASS");
|
|
6783
|
-
break;
|
|
6784
|
-
case 3:
|
|
6785
|
-
this.popState();
|
|
6786
|
-
return 16;
|
|
6787
|
-
break;
|
|
6788
|
-
case 4:
|
|
6789
|
-
this.popState();
|
|
6790
|
-
break;
|
|
6791
|
-
case 5:
|
|
6792
|
-
yy.getLogger().trace("Begin icon");
|
|
6793
|
-
this.begin("ICON");
|
|
6794
|
-
break;
|
|
6795
|
-
case 6:
|
|
6796
|
-
yy.getLogger().trace("SPACELINE");
|
|
6797
|
-
return 6;
|
|
6798
|
-
break;
|
|
6799
|
-
case 7:
|
|
6800
|
-
return 7;
|
|
6801
|
-
break;
|
|
6802
|
-
case 8:
|
|
6803
|
-
return 15;
|
|
6804
|
-
break;
|
|
6805
|
-
case 9:
|
|
6806
|
-
yy.getLogger().trace("end icon");
|
|
6807
|
-
this.popState();
|
|
6808
|
-
break;
|
|
6809
|
-
case 10:
|
|
6810
|
-
yy.getLogger().trace("Exploding node");
|
|
6811
|
-
this.begin("NODE");
|
|
6812
|
-
return 19;
|
|
6813
|
-
break;
|
|
6814
|
-
case 11:
|
|
6815
|
-
yy.getLogger().trace("Cloud");
|
|
6816
|
-
this.begin("NODE");
|
|
6817
|
-
return 19;
|
|
6818
|
-
break;
|
|
6819
|
-
case 12:
|
|
6820
|
-
yy.getLogger().trace("Explosion Bang");
|
|
6821
|
-
this.begin("NODE");
|
|
6822
|
-
return 19;
|
|
6823
|
-
break;
|
|
6824
|
-
case 13:
|
|
6825
|
-
yy.getLogger().trace("Cloud Bang");
|
|
6826
|
-
this.begin("NODE");
|
|
6827
|
-
return 19;
|
|
6828
|
-
break;
|
|
6829
|
-
case 14:
|
|
6830
|
-
this.begin("NODE");
|
|
6831
|
-
return 19;
|
|
6832
|
-
break;
|
|
6833
|
-
case 15:
|
|
6834
|
-
this.begin("NODE");
|
|
6835
|
-
return 19;
|
|
6836
|
-
break;
|
|
6837
|
-
case 16:
|
|
6838
|
-
this.begin("NODE");
|
|
6839
|
-
return 19;
|
|
6840
|
-
break;
|
|
6841
|
-
case 17:
|
|
6842
|
-
this.begin("NODE");
|
|
6843
|
-
return 19;
|
|
6844
|
-
break;
|
|
6845
|
-
case 18:
|
|
6846
|
-
return 13;
|
|
6847
|
-
break;
|
|
6848
|
-
case 19:
|
|
6849
|
-
return 22;
|
|
6850
|
-
break;
|
|
6851
|
-
case 20:
|
|
6852
|
-
return 11;
|
|
6853
|
-
break;
|
|
6854
|
-
case 21:
|
|
6855
|
-
this.begin("NSTR2");
|
|
6856
|
-
break;
|
|
6857
|
-
case 22:
|
|
6858
|
-
return "NODE_DESCR";
|
|
6859
|
-
break;
|
|
6860
|
-
case 23:
|
|
6861
|
-
this.popState();
|
|
6862
|
-
break;
|
|
6863
|
-
case 24:
|
|
6864
|
-
yy.getLogger().trace("Starting NSTR");
|
|
6865
|
-
this.begin("NSTR");
|
|
6866
|
-
break;
|
|
6867
|
-
case 25:
|
|
6868
|
-
yy.getLogger().trace("description:", yy_.yytext);
|
|
6869
|
-
return "NODE_DESCR";
|
|
6870
|
-
break;
|
|
6871
|
-
case 26:
|
|
6872
|
-
this.popState();
|
|
6873
|
-
break;
|
|
6874
|
-
case 27:
|
|
6875
|
-
this.popState();
|
|
6876
|
-
yy.getLogger().trace("node end ))");
|
|
6877
|
-
return "NODE_DEND";
|
|
6878
|
-
break;
|
|
6879
|
-
case 28:
|
|
6880
|
-
this.popState();
|
|
6881
|
-
yy.getLogger().trace("node end )");
|
|
6882
|
-
return "NODE_DEND";
|
|
6883
|
-
break;
|
|
6884
|
-
case 29:
|
|
6885
|
-
this.popState();
|
|
6886
|
-
yy.getLogger().trace("node end ...", yy_.yytext);
|
|
6887
|
-
return "NODE_DEND";
|
|
6888
|
-
break;
|
|
6889
|
-
case 30:
|
|
6890
|
-
this.popState();
|
|
6891
|
-
yy.getLogger().trace("node end ((");
|
|
6892
|
-
return "NODE_DEND";
|
|
6893
|
-
break;
|
|
6894
|
-
case 31:
|
|
6895
|
-
this.popState();
|
|
6896
|
-
yy.getLogger().trace("node end (-");
|
|
6897
|
-
return "NODE_DEND";
|
|
6898
|
-
break;
|
|
6899
|
-
case 32:
|
|
6900
|
-
this.popState();
|
|
6901
|
-
yy.getLogger().trace("node end (-");
|
|
6902
|
-
return "NODE_DEND";
|
|
6903
|
-
break;
|
|
6904
|
-
case 33:
|
|
6905
|
-
this.popState();
|
|
6906
|
-
yy.getLogger().trace("node end ((");
|
|
6907
|
-
return "NODE_DEND";
|
|
6908
|
-
break;
|
|
6909
|
-
case 34:
|
|
6910
|
-
this.popState();
|
|
6911
|
-
yy.getLogger().trace("node end ((");
|
|
6912
|
-
return "NODE_DEND";
|
|
6913
|
-
break;
|
|
6914
|
-
case 35:
|
|
6915
|
-
yy.getLogger().trace("Long description:", yy_.yytext);
|
|
6916
|
-
return 20;
|
|
6917
|
-
break;
|
|
6918
|
-
case 36:
|
|
6919
|
-
yy.getLogger().trace("Long description:", yy_.yytext);
|
|
6920
|
-
return 20;
|
|
6921
|
-
break;
|
|
6922
|
-
}
|
|
6923
|
-
}, "anonymous"),
|
|
6924
|
-
rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
|
|
6925
|
-
conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } }
|
|
6926
|
-
};
|
|
6927
|
-
return lexer2;
|
|
6928
|
-
}();
|
|
6929
|
-
parser2.lexer = lexer;
|
|
6930
|
-
function Parser() {
|
|
6931
|
-
this.yy = {};
|
|
6932
|
-
}
|
|
6933
|
-
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(Parser, "Parser");
|
|
6934
|
-
Parser.prototype = parser2;
|
|
6935
|
-
parser2.Parser = Parser;
|
|
6936
|
-
return new Parser();
|
|
6937
|
-
}();
|
|
6938
|
-
parser.parser = parser;
|
|
6939
|
-
var mindmap_default = parser;
|
|
6940
|
-
|
|
6941
|
-
// src/diagrams/mindmap/mindmapDb.ts
|
|
6942
|
-
var nodes = [];
|
|
6943
|
-
var cnt = 0;
|
|
6944
|
-
var elements = {};
|
|
6945
|
-
var clear = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
6946
|
-
nodes = [];
|
|
6947
|
-
cnt = 0;
|
|
6948
|
-
elements = {};
|
|
6949
|
-
}, "clear");
|
|
6950
|
-
var getParent = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(level) {
|
|
6951
|
-
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
6952
|
-
if (nodes[i].level < level) {
|
|
6953
|
-
return nodes[i];
|
|
6954
|
-
}
|
|
6955
|
-
}
|
|
6956
|
-
return null;
|
|
6957
|
-
}, "getParent");
|
|
6958
|
-
var getMindmap = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
6959
|
-
return nodes.length > 0 ? nodes[0] : null;
|
|
6960
|
-
}, "getMindmap");
|
|
6961
|
-
var addNode = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((level, id, descr, type) => {
|
|
6962
|
-
_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("addNode", level, id, descr, type);
|
|
6963
|
-
const conf = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
|
|
6964
|
-
let padding = conf.mindmap?.padding ?? _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .defaultConfig_default */ .UI.mindmap.padding;
|
|
6965
|
-
switch (type) {
|
|
6966
|
-
case nodeType.ROUNDED_RECT:
|
|
6967
|
-
case nodeType.RECT:
|
|
6968
|
-
case nodeType.HEXAGON:
|
|
6969
|
-
padding *= 2;
|
|
6970
|
-
}
|
|
6971
|
-
const node = {
|
|
6972
|
-
id: cnt++,
|
|
6973
|
-
nodeId: (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeText */ .jZ)(id, conf),
|
|
6974
|
-
level,
|
|
6975
|
-
descr: (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeText */ .jZ)(descr, conf),
|
|
6976
|
-
type,
|
|
6977
|
-
children: [],
|
|
6978
|
-
width: conf.mindmap?.maxNodeWidth ?? _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .defaultConfig_default */ .UI.mindmap.maxNodeWidth,
|
|
6979
|
-
padding
|
|
6980
|
-
};
|
|
6981
|
-
const parent = getParent(level);
|
|
6982
|
-
if (parent) {
|
|
6983
|
-
parent.children.push(node);
|
|
6984
|
-
nodes.push(node);
|
|
6985
|
-
} else {
|
|
6986
|
-
if (nodes.length === 0) {
|
|
6987
|
-
nodes.push(node);
|
|
6988
|
-
} else {
|
|
6989
|
-
throw new Error(
|
|
6990
|
-
'There can be only one root. No parent could be found for ("' + node.descr + '")'
|
|
6991
|
-
);
|
|
6992
|
-
}
|
|
6993
|
-
}
|
|
6994
|
-
}, "addNode");
|
|
6995
|
-
var nodeType = {
|
|
6996
|
-
DEFAULT: 0,
|
|
6997
|
-
NO_BORDER: 0,
|
|
6998
|
-
ROUNDED_RECT: 1,
|
|
6999
|
-
RECT: 2,
|
|
7000
|
-
CIRCLE: 3,
|
|
7001
|
-
CLOUD: 4,
|
|
7002
|
-
BANG: 5,
|
|
7003
|
-
HEXAGON: 6
|
|
7004
|
-
};
|
|
7005
|
-
var getType = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((startStr, endStr) => {
|
|
7006
|
-
_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug("In get type", startStr, endStr);
|
|
7007
|
-
switch (startStr) {
|
|
7008
|
-
case "[":
|
|
7009
|
-
return nodeType.RECT;
|
|
7010
|
-
case "(":
|
|
7011
|
-
return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD;
|
|
7012
|
-
case "((":
|
|
7013
|
-
return nodeType.CIRCLE;
|
|
7014
|
-
case ")":
|
|
7015
|
-
return nodeType.CLOUD;
|
|
7016
|
-
case "))":
|
|
7017
|
-
return nodeType.BANG;
|
|
7018
|
-
case "{{":
|
|
7019
|
-
return nodeType.HEXAGON;
|
|
7020
|
-
default:
|
|
7021
|
-
return nodeType.DEFAULT;
|
|
7022
|
-
}
|
|
7023
|
-
}, "getType");
|
|
7024
|
-
var setElementForId = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((id, element) => {
|
|
7025
|
-
elements[id] = element;
|
|
7026
|
-
}, "setElementForId");
|
|
7027
|
-
var decorateNode = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((decoration) => {
|
|
7028
|
-
if (!decoration) {
|
|
7029
|
-
return;
|
|
7030
|
-
}
|
|
7031
|
-
const config = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
|
|
7032
|
-
const node = nodes[nodes.length - 1];
|
|
7033
|
-
if (decoration.icon) {
|
|
7034
|
-
node.icon = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeText */ .jZ)(decoration.icon, config);
|
|
7035
|
-
}
|
|
7036
|
-
if (decoration.class) {
|
|
7037
|
-
node.class = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeText */ .jZ)(decoration.class, config);
|
|
7038
|
-
}
|
|
7039
|
-
}, "decorateNode");
|
|
7040
|
-
var type2Str = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((type) => {
|
|
7041
|
-
switch (type) {
|
|
7042
|
-
case nodeType.DEFAULT:
|
|
7043
|
-
return "no-border";
|
|
7044
|
-
case nodeType.RECT:
|
|
7045
|
-
return "rect";
|
|
7046
|
-
case nodeType.ROUNDED_RECT:
|
|
7047
|
-
return "rounded-rect";
|
|
7048
|
-
case nodeType.CIRCLE:
|
|
7049
|
-
return "circle";
|
|
7050
|
-
case nodeType.CLOUD:
|
|
7051
|
-
return "cloud";
|
|
7052
|
-
case nodeType.BANG:
|
|
7053
|
-
return "bang";
|
|
7054
|
-
case nodeType.HEXAGON:
|
|
7055
|
-
return "hexgon";
|
|
7056
|
-
// cspell: disable-line
|
|
7057
|
-
default:
|
|
7058
|
-
return "no-border";
|
|
7059
|
-
}
|
|
7060
|
-
}, "type2Str");
|
|
7061
|
-
var getLogger = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm, "getLogger");
|
|
7062
|
-
var getElementById = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((id) => elements[id], "getElementById");
|
|
7063
|
-
var db = {
|
|
7064
|
-
clear,
|
|
7065
|
-
addNode,
|
|
7066
|
-
getMindmap,
|
|
7067
|
-
nodeType,
|
|
7068
|
-
getType,
|
|
7069
|
-
setElementForId,
|
|
7070
|
-
decorateNode,
|
|
7071
|
-
type2Str,
|
|
7072
|
-
getLogger,
|
|
7073
|
-
getElementById
|
|
7074
|
-
};
|
|
7075
|
-
var mindmapDb_default = db;
|
|
7076
|
-
|
|
7077
|
-
// src/diagrams/mindmap/mindmapRenderer.ts
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
// src/diagrams/mindmap/svgDraw.ts
|
|
7083
|
-
var MAX_SECTIONS = 12;
|
|
7084
|
-
var defaultBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, elem, node, section) {
|
|
7085
|
-
const rd = 5;
|
|
7086
|
-
elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr(
|
|
7087
|
-
"d",
|
|
7088
|
-
`M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`
|
|
7089
|
-
);
|
|
7090
|
-
elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height);
|
|
7091
|
-
}, "defaultBkg");
|
|
7092
|
-
var rectBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, elem, node) {
|
|
7093
|
-
elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("width", node.width);
|
|
7094
|
-
}, "rectBkg");
|
|
7095
|
-
var cloudBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, elem, node) {
|
|
7096
|
-
const w = node.width;
|
|
7097
|
-
const h = node.height;
|
|
7098
|
-
const r1 = 0.15 * w;
|
|
7099
|
-
const r2 = 0.25 * w;
|
|
7100
|
-
const r3 = 0.35 * w;
|
|
7101
|
-
const r4 = 0.2 * w;
|
|
7102
|
-
elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr(
|
|
7103
|
-
"d",
|
|
7104
|
-
`M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}
|
|
7105
|
-
a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}
|
|
7106
|
-
a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2}
|
|
7107
|
-
|
|
7108
|
-
a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35}
|
|
7109
|
-
a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65}
|
|
7110
|
-
|
|
7111
|
-
a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}
|
|
7112
|
-
a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0}
|
|
7113
|
-
a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}
|
|
7114
|
-
|
|
7115
|
-
a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}
|
|
7116
|
-
a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}
|
|
7117
|
-
|
|
7118
|
-
H0 V0 Z`
|
|
7119
|
-
);
|
|
7120
|
-
}, "cloudBkg");
|
|
7121
|
-
var bangBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, elem, node) {
|
|
7122
|
-
const w = node.width;
|
|
7123
|
-
const h = node.height;
|
|
7124
|
-
const r = 0.15 * w;
|
|
7125
|
-
elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr(
|
|
7126
|
-
"d",
|
|
7127
|
-
`M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1}
|
|
7128
|
-
a${r},${r} 1 0,0 ${w * 0.25},${0}
|
|
7129
|
-
a${r},${r} 1 0,0 ${w * 0.25},${0}
|
|
7130
|
-
a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1}
|
|
7131
|
-
|
|
7132
|
-
a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33}
|
|
7133
|
-
a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34}
|
|
7134
|
-
a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33}
|
|
7135
|
-
|
|
7136
|
-
a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15}
|
|
7137
|
-
a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}
|
|
7138
|
-
a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}
|
|
7139
|
-
a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15}
|
|
7140
|
-
|
|
7141
|
-
a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33}
|
|
7142
|
-
a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34}
|
|
7143
|
-
a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33}
|
|
7144
|
-
|
|
7145
|
-
H0 V0 Z`
|
|
7146
|
-
);
|
|
7147
|
-
}, "bangBkg");
|
|
7148
|
-
var circleBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, elem, node) {
|
|
7149
|
-
elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("r", node.width / 2);
|
|
7150
|
-
}, "circleBkg");
|
|
7151
|
-
function insertPolygonShape(parent, w, h, points, node) {
|
|
7152
|
-
return parent.insert("polygon", ":first-child").attr(
|
|
7153
|
-
"points",
|
|
7154
|
-
points.map(function(d) {
|
|
7155
|
-
return d.x + "," + d.y;
|
|
7156
|
-
}).join(" ")
|
|
7157
|
-
).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")");
|
|
7158
|
-
}
|
|
7159
|
-
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(insertPolygonShape, "insertPolygonShape");
|
|
7160
|
-
var hexagonBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(_db, elem, node) {
|
|
7161
|
-
const h = node.height;
|
|
7162
|
-
const f = 4;
|
|
7163
|
-
const m = h / f;
|
|
7164
|
-
const w = node.width - node.padding + 2 * m;
|
|
7165
|
-
const points = [
|
|
7166
|
-
{ x: m, y: 0 },
|
|
7167
|
-
{ x: w - m, y: 0 },
|
|
7168
|
-
{ x: w, y: -h / 2 },
|
|
7169
|
-
{ x: w - m, y: -h },
|
|
7170
|
-
{ x: m, y: -h },
|
|
7171
|
-
{ x: 0, y: -h / 2 }
|
|
7172
|
-
];
|
|
7173
|
-
insertPolygonShape(elem, w, h, points, node);
|
|
7174
|
-
}, "hexagonBkg");
|
|
7175
|
-
var roundedRectBkg = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, elem, node) {
|
|
7176
|
-
elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width);
|
|
7177
|
-
}, "roundedRectBkg");
|
|
7178
|
-
var drawNode = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(async function(db2, elem, node, fullSection, conf) {
|
|
7179
|
-
const htmlLabels = conf.htmlLabels;
|
|
7180
|
-
const section = fullSection % (MAX_SECTIONS - 1);
|
|
7181
|
-
const nodeElem = elem.append("g");
|
|
7182
|
-
node.section = section;
|
|
7183
|
-
let sectionClass = "section-" + section;
|
|
7184
|
-
if (section < 0) {
|
|
7185
|
-
sectionClass += " section-root";
|
|
7186
|
-
}
|
|
7187
|
-
nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass);
|
|
7188
|
-
const bkgElem = nodeElem.append("g");
|
|
7189
|
-
const textElem = nodeElem.append("g");
|
|
7190
|
-
const description = node.descr.replace(/(<br\/*>)/g, "\n");
|
|
7191
|
-
await (0,_chunk_C3MQ5ANM_mjs__WEBPACK_IMPORTED_MODULE_0__/* .createText */ .GZ)(
|
|
7192
|
-
textElem,
|
|
7193
|
-
description,
|
|
7194
|
-
{
|
|
7195
|
-
useHtmlLabels: htmlLabels,
|
|
7196
|
-
width: node.width,
|
|
7197
|
-
classes: "mindmap-node-label"
|
|
7198
|
-
},
|
|
7199
|
-
conf
|
|
7200
|
-
);
|
|
7201
|
-
if (!htmlLabels) {
|
|
7202
|
-
textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
|
|
7203
|
-
}
|
|
7204
|
-
const bbox = textElem.node().getBBox();
|
|
7205
|
-
const [fontSize] = (0,_chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__/* .parseFontSize */ .I5)(conf.fontSize);
|
|
7206
|
-
node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;
|
|
7207
|
-
node.width = bbox.width + 2 * node.padding;
|
|
7208
|
-
if (node.icon) {
|
|
7209
|
-
if (node.type === db2.nodeType.CIRCLE) {
|
|
7210
|
-
node.height += 50;
|
|
7211
|
-
node.width += 50;
|
|
7212
|
-
const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;");
|
|
7213
|
-
icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon);
|
|
7214
|
-
textElem.attr(
|
|
7215
|
-
"transform",
|
|
7216
|
-
"translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")"
|
|
7217
|
-
);
|
|
7218
|
-
} else {
|
|
7219
|
-
node.width += 50;
|
|
7220
|
-
const orgHeight = node.height;
|
|
7221
|
-
node.height = Math.max(orgHeight, 60);
|
|
7222
|
-
const heightDiff = Math.abs(node.height - orgHeight);
|
|
7223
|
-
const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;");
|
|
7224
|
-
icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon);
|
|
7225
|
-
textElem.attr(
|
|
7226
|
-
"transform",
|
|
7227
|
-
"translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")"
|
|
7228
|
-
);
|
|
7229
|
-
}
|
|
7230
|
-
} else {
|
|
7231
|
-
if (!htmlLabels) {
|
|
7232
|
-
const dx = node.width / 2;
|
|
7233
|
-
const dy = node.padding / 2;
|
|
7234
|
-
textElem.attr("transform", "translate(" + dx + ", " + dy + ")");
|
|
7235
|
-
} else {
|
|
7236
|
-
const dx = (node.width - bbox.width) / 2;
|
|
7237
|
-
const dy = (node.height - bbox.height) / 2;
|
|
7238
|
-
textElem.attr("transform", "translate(" + dx + ", " + dy + ")");
|
|
7239
|
-
}
|
|
7240
|
-
}
|
|
7241
|
-
switch (node.type) {
|
|
7242
|
-
case db2.nodeType.DEFAULT:
|
|
7243
|
-
defaultBkg(db2, bkgElem, node, section);
|
|
7244
|
-
break;
|
|
7245
|
-
case db2.nodeType.ROUNDED_RECT:
|
|
7246
|
-
roundedRectBkg(db2, bkgElem, node, section);
|
|
7247
|
-
break;
|
|
7248
|
-
case db2.nodeType.RECT:
|
|
7249
|
-
rectBkg(db2, bkgElem, node, section);
|
|
7250
|
-
break;
|
|
7251
|
-
case db2.nodeType.CIRCLE:
|
|
7252
|
-
bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")");
|
|
7253
|
-
circleBkg(db2, bkgElem, node, section);
|
|
7254
|
-
break;
|
|
7255
|
-
case db2.nodeType.CLOUD:
|
|
7256
|
-
cloudBkg(db2, bkgElem, node, section);
|
|
7257
|
-
break;
|
|
7258
|
-
case db2.nodeType.BANG:
|
|
7259
|
-
bangBkg(db2, bkgElem, node, section);
|
|
7260
|
-
break;
|
|
7261
|
-
case db2.nodeType.HEXAGON:
|
|
7262
|
-
hexagonBkg(db2, bkgElem, node, section);
|
|
7263
|
-
break;
|
|
7264
|
-
}
|
|
7265
|
-
db2.setElementForId(node.id, nodeElem);
|
|
7266
|
-
return node.height;
|
|
7267
|
-
}, "drawNode");
|
|
7268
|
-
var positionNode = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(db2, node) {
|
|
7269
|
-
const nodeElem = db2.getElementById(node.id);
|
|
7270
|
-
const x = node.x || 0;
|
|
7271
|
-
const y = node.y || 0;
|
|
7272
|
-
nodeElem.attr("transform", "translate(" + x + "," + y + ")");
|
|
7273
|
-
}, "positionNode");
|
|
7274
|
-
|
|
7275
|
-
// src/diagrams/mindmap/mindmapRenderer.ts
|
|
7276
|
-
cytoscape__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.use((cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_5___default()));
|
|
7277
|
-
async function drawNodes(db2, svg, mindmap, section, conf) {
|
|
7278
|
-
await drawNode(db2, svg, mindmap, section, conf);
|
|
7279
|
-
if (mindmap.children) {
|
|
7280
|
-
await Promise.all(
|
|
7281
|
-
mindmap.children.map(
|
|
7282
|
-
(child, index) => drawNodes(db2, svg, child, section < 0 ? index : section, conf)
|
|
7283
|
-
)
|
|
7284
|
-
);
|
|
7285
|
-
}
|
|
7286
|
-
}
|
|
7287
|
-
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(drawNodes, "drawNodes");
|
|
7288
|
-
function drawEdges(edgesEl, cy) {
|
|
7289
|
-
cy.edges().map((edge, id) => {
|
|
7290
|
-
const data = edge.data();
|
|
7291
|
-
if (edge[0]._private.bodyBounds) {
|
|
7292
|
-
const bounds = edge[0]._private.rscratch;
|
|
7293
|
-
_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("Edge: ", id, data);
|
|
7294
|
-
edgesEl.insert("path").attr(
|
|
7295
|
-
"d",
|
|
7296
|
-
`M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `
|
|
7297
|
-
).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth);
|
|
7298
|
-
}
|
|
6288
|
+
});
|
|
7299
6289
|
});
|
|
7300
6290
|
}
|
|
7301
|
-
(0,
|
|
7302
|
-
function
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
type: mindmap.type
|
|
7314
|
-
},
|
|
7315
|
-
position: {
|
|
7316
|
-
x: mindmap.x,
|
|
7317
|
-
y: mindmap.y
|
|
7318
|
-
}
|
|
7319
|
-
});
|
|
7320
|
-
if (mindmap.children) {
|
|
7321
|
-
mindmap.children.forEach((child) => {
|
|
7322
|
-
addNodes(child, cy, conf, level + 1);
|
|
7323
|
-
cy.add({
|
|
7324
|
-
group: "edges",
|
|
7325
|
-
data: {
|
|
7326
|
-
id: `${mindmap.id}_${child.id}`,
|
|
7327
|
-
source: mindmap.id,
|
|
7328
|
-
target: child.id,
|
|
7329
|
-
depth: level,
|
|
7330
|
-
section: child.section
|
|
7331
|
-
}
|
|
7332
|
-
});
|
|
6291
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(addNodes, "addNodes");
|
|
6292
|
+
function addEdges(edges, cy) {
|
|
6293
|
+
edges.forEach((edge) => {
|
|
6294
|
+
const edgeData = {
|
|
6295
|
+
id: edge.id,
|
|
6296
|
+
source: edge.start,
|
|
6297
|
+
target: edge.end
|
|
6298
|
+
};
|
|
6299
|
+
Object.keys(edge).forEach((key) => {
|
|
6300
|
+
if (!["id", "start", "end"].includes(key)) {
|
|
6301
|
+
edgeData[key] = edge[key];
|
|
6302
|
+
}
|
|
7333
6303
|
});
|
|
7334
|
-
|
|
6304
|
+
cy.add({
|
|
6305
|
+
group: "edges",
|
|
6306
|
+
data: edgeData
|
|
6307
|
+
});
|
|
6308
|
+
});
|
|
7335
6309
|
}
|
|
7336
|
-
(0,
|
|
7337
|
-
function
|
|
6310
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(addEdges, "addEdges");
|
|
6311
|
+
function createCytoscapeInstance(data) {
|
|
7338
6312
|
return new Promise((resolve) => {
|
|
7339
|
-
const renderEl = (0,
|
|
7340
|
-
const cy = (0,
|
|
6313
|
+
const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("body").append("div").attr("id", "cy").attr("style", "display:none");
|
|
6314
|
+
const cy = (0,cytoscape__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)({
|
|
7341
6315
|
container: document.getElementById("cy"),
|
|
7342
6316
|
// container to render in
|
|
7343
6317
|
style: [
|
|
@@ -7350,155 +6324,236 @@ function layoutMindmap(node, conf) {
|
|
|
7350
6324
|
]
|
|
7351
6325
|
});
|
|
7352
6326
|
renderEl.remove();
|
|
7353
|
-
addNodes(
|
|
6327
|
+
addNodes(data.nodes, cy);
|
|
6328
|
+
addEdges(data.edges, cy);
|
|
7354
6329
|
cy.nodes().forEach(function(n) {
|
|
7355
6330
|
n.layoutDimensions = () => {
|
|
7356
|
-
const
|
|
7357
|
-
return { w:
|
|
6331
|
+
const nodeData = n.data();
|
|
6332
|
+
return { w: nodeData.width, h: nodeData.height };
|
|
7358
6333
|
};
|
|
7359
6334
|
});
|
|
7360
|
-
|
|
6335
|
+
const layoutConfig = {
|
|
7361
6336
|
name: "cose-bilkent",
|
|
7362
6337
|
// @ts-ignore Types for cose-bilkent are not correct?
|
|
7363
6338
|
quality: "proof",
|
|
7364
6339
|
styleEnabled: false,
|
|
7365
6340
|
animate: false
|
|
7366
|
-
}
|
|
6341
|
+
};
|
|
6342
|
+
cy.layout(layoutConfig).run();
|
|
7367
6343
|
cy.ready((e) => {
|
|
7368
|
-
|
|
6344
|
+
_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.info("Cytoscape ready", e);
|
|
7369
6345
|
resolve(cy);
|
|
7370
6346
|
});
|
|
7371
6347
|
});
|
|
7372
6348
|
}
|
|
7373
|
-
(0,
|
|
7374
|
-
function
|
|
7375
|
-
cy.nodes().map((node
|
|
6349
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(createCytoscapeInstance, "createCytoscapeInstance");
|
|
6350
|
+
function extractPositionedNodes(cy) {
|
|
6351
|
+
return cy.nodes().map((node) => {
|
|
7376
6352
|
const data = node.data();
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
6353
|
+
const position = node.position();
|
|
6354
|
+
const positionedNode = {
|
|
6355
|
+
id: data.id,
|
|
6356
|
+
x: position.x,
|
|
6357
|
+
y: position.y
|
|
6358
|
+
};
|
|
6359
|
+
Object.keys(data).forEach((key) => {
|
|
6360
|
+
if (key !== "id") {
|
|
6361
|
+
positionedNode[key] = data[key];
|
|
6362
|
+
}
|
|
6363
|
+
});
|
|
6364
|
+
return positionedNode;
|
|
7387
6365
|
});
|
|
7388
6366
|
}
|
|
7389
|
-
(0,
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
}
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
|
7432
|
-
const sw = "" + (17 - 3 * i);
|
|
7433
|
-
sections += `
|
|
7434
|
-
.section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
|
|
7435
|
-
fill: ${options["cScale" + i]};
|
|
7436
|
-
}
|
|
7437
|
-
.section-${i - 1} text {
|
|
7438
|
-
fill: ${options["cScaleLabel" + i]};
|
|
7439
|
-
}
|
|
7440
|
-
.node-icon-${i - 1} {
|
|
7441
|
-
font-size: 40px;
|
|
7442
|
-
color: ${options["cScaleLabel" + i]};
|
|
7443
|
-
}
|
|
7444
|
-
.section-edge-${i - 1}{
|
|
7445
|
-
stroke: ${options["cScale" + i]};
|
|
7446
|
-
}
|
|
7447
|
-
.edge-depth-${i - 1}{
|
|
7448
|
-
stroke-width: ${sw};
|
|
7449
|
-
}
|
|
7450
|
-
.section-${i - 1} line {
|
|
7451
|
-
stroke: ${options["cScaleInv" + i]} ;
|
|
7452
|
-
stroke-width: 3;
|
|
7453
|
-
}
|
|
7454
|
-
|
|
7455
|
-
.disabled, .disabled circle, .disabled text {
|
|
7456
|
-
fill: lightgray;
|
|
7457
|
-
}
|
|
7458
|
-
.disabled text {
|
|
7459
|
-
fill: #efefef;
|
|
7460
|
-
}
|
|
7461
|
-
`;
|
|
7462
|
-
}
|
|
7463
|
-
return sections;
|
|
7464
|
-
}, "genSections");
|
|
7465
|
-
var getStyles = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((options) => `
|
|
7466
|
-
.edge {
|
|
7467
|
-
stroke-width: 3;
|
|
6367
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(extractPositionedNodes, "extractPositionedNodes");
|
|
6368
|
+
function extractPositionedEdges(cy) {
|
|
6369
|
+
return cy.edges().map((edge) => {
|
|
6370
|
+
const data = edge.data();
|
|
6371
|
+
const rscratch = edge._private.rscratch;
|
|
6372
|
+
const positionedEdge = {
|
|
6373
|
+
id: data.id,
|
|
6374
|
+
source: data.source,
|
|
6375
|
+
target: data.target,
|
|
6376
|
+
startX: rscratch.startX,
|
|
6377
|
+
startY: rscratch.startY,
|
|
6378
|
+
midX: rscratch.midX,
|
|
6379
|
+
midY: rscratch.midY,
|
|
6380
|
+
endX: rscratch.endX,
|
|
6381
|
+
endY: rscratch.endY
|
|
6382
|
+
};
|
|
6383
|
+
Object.keys(data).forEach((key) => {
|
|
6384
|
+
if (!["id", "source", "target"].includes(key)) {
|
|
6385
|
+
positionedEdge[key] = data[key];
|
|
6386
|
+
}
|
|
6387
|
+
});
|
|
6388
|
+
return positionedEdge;
|
|
6389
|
+
});
|
|
6390
|
+
}
|
|
6391
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(extractPositionedEdges, "extractPositionedEdges");
|
|
6392
|
+
|
|
6393
|
+
// src/rendering-util/layout-algorithms/cose-bilkent/layout.ts
|
|
6394
|
+
async function executeCoseBilkentLayout(data, _config) {
|
|
6395
|
+
_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("Starting cose-bilkent layout algorithm");
|
|
6396
|
+
try {
|
|
6397
|
+
validateLayoutData(data);
|
|
6398
|
+
const cy = await createCytoscapeInstance(data);
|
|
6399
|
+
const positionedNodes = extractPositionedNodes(cy);
|
|
6400
|
+
const positionedEdges = extractPositionedEdges(cy);
|
|
6401
|
+
_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug(`Layout completed: ${positionedNodes.length} nodes, ${positionedEdges.length} edges`);
|
|
6402
|
+
return {
|
|
6403
|
+
nodes: positionedNodes,
|
|
6404
|
+
edges: positionedEdges
|
|
6405
|
+
};
|
|
6406
|
+
} catch (error) {
|
|
6407
|
+
_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.error("Error in cose-bilkent layout algorithm:", error);
|
|
6408
|
+
throw error;
|
|
7468
6409
|
}
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
6410
|
+
}
|
|
6411
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(executeCoseBilkentLayout, "executeCoseBilkentLayout");
|
|
6412
|
+
function validateLayoutData(data) {
|
|
6413
|
+
if (!data) {
|
|
6414
|
+
throw new Error("Layout data is required");
|
|
7472
6415
|
}
|
|
7473
|
-
.
|
|
7474
|
-
|
|
6416
|
+
if (!data.config) {
|
|
6417
|
+
throw new Error("Configuration is required in layout data");
|
|
7475
6418
|
}
|
|
7476
|
-
.
|
|
7477
|
-
|
|
7478
|
-
display: flex;
|
|
7479
|
-
justify-content: center;
|
|
7480
|
-
align-items: center;
|
|
6419
|
+
if (!data.rootNode) {
|
|
6420
|
+
throw new Error("Root node is required");
|
|
7481
6421
|
}
|
|
7482
|
-
.
|
|
7483
|
-
|
|
6422
|
+
if (!data.nodes || !Array.isArray(data.nodes)) {
|
|
6423
|
+
throw new Error("No nodes found in layout data");
|
|
7484
6424
|
}
|
|
7485
|
-
.
|
|
7486
|
-
|
|
7487
|
-
alignment-baseline: middle;
|
|
7488
|
-
text-anchor: middle;
|
|
7489
|
-
dominant-baseline: middle;
|
|
7490
|
-
text-align: center;
|
|
6425
|
+
if (!Array.isArray(data.edges)) {
|
|
6426
|
+
throw new Error("Edges array is required in layout data");
|
|
7491
6427
|
}
|
|
7492
|
-
|
|
7493
|
-
|
|
6428
|
+
return true;
|
|
6429
|
+
}
|
|
6430
|
+
(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(validateLayoutData, "validateLayoutData");
|
|
6431
|
+
|
|
6432
|
+
// src/rendering-util/layout-algorithms/cose-bilkent/render.ts
|
|
6433
|
+
var render = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(async (data4Layout, svg, {
|
|
6434
|
+
insertCluster,
|
|
6435
|
+
insertEdge,
|
|
6436
|
+
insertEdgeLabel,
|
|
6437
|
+
insertMarkers,
|
|
6438
|
+
insertNode,
|
|
6439
|
+
log: log2,
|
|
6440
|
+
positionEdgeLabel
|
|
6441
|
+
}, { algorithm: _algorithm }) => {
|
|
6442
|
+
const nodeDb = {};
|
|
6443
|
+
const clusterDb = {};
|
|
6444
|
+
const element = svg.select("g");
|
|
6445
|
+
insertMarkers(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);
|
|
6446
|
+
const subGraphsEl = element.insert("g").attr("class", "subgraphs");
|
|
6447
|
+
const edgePaths = element.insert("g").attr("class", "edgePaths");
|
|
6448
|
+
const edgeLabels = element.insert("g").attr("class", "edgeLabels");
|
|
6449
|
+
const nodes = element.insert("g").attr("class", "nodes");
|
|
6450
|
+
log2.debug("Inserting nodes into DOM for dimension calculation");
|
|
6451
|
+
await Promise.all(
|
|
6452
|
+
data4Layout.nodes.map(async (node) => {
|
|
6453
|
+
if (node.isGroup) {
|
|
6454
|
+
const clusterNode = { ...node };
|
|
6455
|
+
clusterDb[node.id] = clusterNode;
|
|
6456
|
+
nodeDb[node.id] = clusterNode;
|
|
6457
|
+
await insertCluster(subGraphsEl, node);
|
|
6458
|
+
} else {
|
|
6459
|
+
const nodeWithPosition = { ...node };
|
|
6460
|
+
nodeDb[node.id] = nodeWithPosition;
|
|
6461
|
+
const nodeEl = await insertNode(nodes, node, {
|
|
6462
|
+
config: data4Layout.config,
|
|
6463
|
+
dir: data4Layout.direction || "TB"
|
|
6464
|
+
});
|
|
6465
|
+
const boundingBox = nodeEl.node().getBBox();
|
|
6466
|
+
nodeWithPosition.width = boundingBox.width;
|
|
6467
|
+
nodeWithPosition.height = boundingBox.height;
|
|
6468
|
+
nodeWithPosition.domId = nodeEl;
|
|
6469
|
+
log2.debug(`Node ${node.id} dimensions: ${boundingBox.width}x${boundingBox.height}`);
|
|
6470
|
+
}
|
|
6471
|
+
})
|
|
6472
|
+
);
|
|
6473
|
+
log2.debug("Running cose-bilkent layout algorithm");
|
|
6474
|
+
const updatedLayoutData = {
|
|
6475
|
+
...data4Layout,
|
|
6476
|
+
nodes: data4Layout.nodes.map((node) => {
|
|
6477
|
+
const nodeWithDimensions = nodeDb[node.id];
|
|
6478
|
+
return {
|
|
6479
|
+
...node,
|
|
6480
|
+
width: nodeWithDimensions.width,
|
|
6481
|
+
height: nodeWithDimensions.height
|
|
6482
|
+
};
|
|
6483
|
+
})
|
|
6484
|
+
};
|
|
6485
|
+
const layoutResult = await executeCoseBilkentLayout(updatedLayoutData, data4Layout.config);
|
|
6486
|
+
log2.debug("Positioning nodes based on layout results");
|
|
6487
|
+
layoutResult.nodes.forEach((positionedNode) => {
|
|
6488
|
+
const node = nodeDb[positionedNode.id];
|
|
6489
|
+
if (node?.domId) {
|
|
6490
|
+
node.domId.attr(
|
|
6491
|
+
"transform",
|
|
6492
|
+
`translate(${positionedNode.x}, ${positionedNode.y})`
|
|
6493
|
+
);
|
|
6494
|
+
node.x = positionedNode.x;
|
|
6495
|
+
node.y = positionedNode.y;
|
|
6496
|
+
log2.debug(`Positioned node ${node.id} at center (${positionedNode.x}, ${positionedNode.y})`);
|
|
6497
|
+
}
|
|
6498
|
+
});
|
|
6499
|
+
layoutResult.edges.forEach((positionedEdge) => {
|
|
6500
|
+
const edge = data4Layout.edges.find((e) => e.id === positionedEdge.id);
|
|
6501
|
+
if (edge) {
|
|
6502
|
+
edge.points = [
|
|
6503
|
+
{ x: positionedEdge.startX, y: positionedEdge.startY },
|
|
6504
|
+
{ x: positionedEdge.midX, y: positionedEdge.midY },
|
|
6505
|
+
{ x: positionedEdge.endX, y: positionedEdge.endY }
|
|
6506
|
+
];
|
|
6507
|
+
}
|
|
6508
|
+
});
|
|
6509
|
+
log2.debug("Inserting and positioning edges");
|
|
6510
|
+
await Promise.all(
|
|
6511
|
+
data4Layout.edges.map(async (edge) => {
|
|
6512
|
+
const _edgeLabel = await insertEdgeLabel(edgeLabels, edge);
|
|
6513
|
+
const startNode = nodeDb[edge.start ?? ""];
|
|
6514
|
+
const endNode = nodeDb[edge.end ?? ""];
|
|
6515
|
+
if (startNode && endNode) {
|
|
6516
|
+
const positionedEdge = layoutResult.edges.find((e) => e.id === edge.id);
|
|
6517
|
+
if (positionedEdge) {
|
|
6518
|
+
log2.debug("APA01 positionedEdge", positionedEdge);
|
|
6519
|
+
const edgeWithPath = { ...edge };
|
|
6520
|
+
const paths = insertEdge(
|
|
6521
|
+
edgePaths,
|
|
6522
|
+
edgeWithPath,
|
|
6523
|
+
clusterDb,
|
|
6524
|
+
data4Layout.type,
|
|
6525
|
+
startNode,
|
|
6526
|
+
endNode,
|
|
6527
|
+
data4Layout.diagramId
|
|
6528
|
+
);
|
|
6529
|
+
positionEdgeLabel(edgeWithPath, paths);
|
|
6530
|
+
} else {
|
|
6531
|
+
const edgeWithPath = {
|
|
6532
|
+
...edge,
|
|
6533
|
+
points: [
|
|
6534
|
+
{ x: startNode.x || 0, y: startNode.y || 0 },
|
|
6535
|
+
{ x: endNode.x || 0, y: endNode.y || 0 }
|
|
6536
|
+
]
|
|
6537
|
+
};
|
|
6538
|
+
const paths = insertEdge(
|
|
6539
|
+
edgePaths,
|
|
6540
|
+
edgeWithPath,
|
|
6541
|
+
clusterDb,
|
|
6542
|
+
data4Layout.type,
|
|
6543
|
+
startNode,
|
|
6544
|
+
endNode,
|
|
6545
|
+
data4Layout.diagramId
|
|
6546
|
+
);
|
|
6547
|
+
positionEdgeLabel(edgeWithPath, paths);
|
|
6548
|
+
}
|
|
6549
|
+
}
|
|
6550
|
+
})
|
|
6551
|
+
);
|
|
6552
|
+
log2.debug("Cose-bilkent rendering completed");
|
|
6553
|
+
}, "render");
|
|
7494
6554
|
|
|
7495
|
-
// src/
|
|
7496
|
-
var
|
|
7497
|
-
db: mindmapDb_default,
|
|
7498
|
-
renderer: mindmapRenderer_default,
|
|
7499
|
-
parser: mindmap_default,
|
|
7500
|
-
styles: styles_default
|
|
7501
|
-
};
|
|
6555
|
+
// src/rendering-util/layout-algorithms/cose-bilkent/index.ts
|
|
6556
|
+
var render2 = render;
|
|
7502
6557
|
|
|
7503
6558
|
|
|
7504
6559
|
|
|
@@ -7506,4 +6561,4 @@ var diagram = {
|
|
|
7506
6561
|
|
|
7507
6562
|
};
|
|
7508
6563
|
;
|
|
7509
|
-
//# sourceMappingURL=
|
|
6564
|
+
//# sourceMappingURL=7.node.js.map
|