@kong-ui-public/documentation 1.4.17-pr.2665.525593492.0 → 1.4.17
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/dist/_basePickBy-BCsiP0lE-DJBdvZNn.js +151 -0
- package/dist/{_baseUniq-SAfYgIkf-buEvGj9H.js → _baseUniq-CsvgMmt0-CCBG5z_B.js} +165 -165
- package/dist/arc-DYb5Ak6k-js8YHzj6.js +83 -0
- package/dist/architecture-U656AL7Q-LZu-yAfZ-CQD6AyxA.js +5 -0
- package/dist/architectureDiagram-KFL7JDKH-BK_an8l5-D20M_MXF.js +4665 -0
- package/dist/blockDiagram-ZYB65J3Q-C0KtqCEe-pwEm3-ie.js +2265 -0
- package/dist/{c4Diagram-6F5ED5ID-D5yqWyf0-DzlUmurv.js → c4Diagram-AAMF2YG6-DYHWlrmc-C6NWDsTV.js} +4 -4
- package/dist/{channel-bVcNKbrJ-NqcPkfCx.js → channel-3QVQMCTA-BwyrTaJi.js} +1 -1
- package/dist/{chunk-TMUBEWPD-BRIzn5gH-alZ9Sg3f.js → chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js} +1 -1
- package/dist/{chunk-KFBOBJHC-nixdujtH-CrTZo7r-.js → chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js} +1 -1
- package/dist/chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js +19 -0
- package/dist/chunk-JBRWN2VN-CHua2TSC-BYWS19Oz.js +1374 -0
- package/dist/chunk-LXBSTHXV-CoED0jHL-Cc8w4JL1.js +1382 -0
- package/dist/chunk-NRVI72HA-DxsqT4Dt-Bo_vu9qn.js +20 -0
- package/dist/{chunk-ASOPGD6M-B5bA_saK-BiT875Ve.js → chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js} +1 -1
- package/dist/chunk-WVR4S24B-C4HIWky3-CkJ0DHSJ.js +8 -0
- package/dist/classDiagram-3BZAVTQC-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/classDiagram-v2-QTMF73CY-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/{clone-_5SW34SG-DOuhA6mG.js → clone-C0dvnYv6-BozdSvey.js} +1 -1
- package/dist/cytoscape.esm-CjI2IsL8-DYIumutE.js +18721 -0
- package/dist/{dagre-4EVJKHTY-CcAruc30-B3UMlKNl.js → dagre-2BBEFEWP-Bh_bYuL8-Cej31YXN.js} +53 -53
- package/dist/defaultLocale-D7EN2tov-CK6dgF7Y.js +171 -0
- package/dist/diagram-4IRLE6MV-34TaesxP-XfF-gcP2.js +533 -0
- package/dist/diagram-GUPCWM2R-Cr4-5_uX-B8mxM1Uc.js +143 -0
- package/dist/diagram-RP2FKANI-COpvHjzI-C-_mZxuk.js +221 -0
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +860 -399
- package/dist/erDiagram-HZWUO2LU-Cu2MerRS-KziSgDQg.js +840 -0
- package/dist/flowDiagram-THRYKUMA-CfrQTB8C-BYn8LF24.js +1627 -0
- package/dist/ganttDiagram-WV7ZQ7D5-gkieebY_-C7YOriZ4.js +2504 -0
- package/dist/gitGraph-F6HP7TQM-suE5ufvy-CQDQV2yP.js +5 -0
- package/dist/{gitGraphDiagram-NRZ2UAAF-B-t90-9e-BkGPAEnk.js → gitGraphDiagram-OJR772UL-CYA7EIoU-Bqc1qZk4.js} +103 -103
- package/dist/{graph-BYZMvqpu-BXRs5843.js → graph-B_1gOUDz-Dm6REFzZ.js} +2 -2
- package/dist/{index-CMZig9xg.js → index-BDD0CD9m.js} +9834 -9540
- package/dist/info-NVLQJR56-CdsHk-Jf-tf8zb8tD.js +5 -0
- package/dist/infoDiagram-6WOFNB3A-ajp3t5Lm-D80dGo5F.js +24 -0
- package/dist/{journeyDiagram-G5WM74LC-BE7U42Ad-y6YegUqL.js → journeyDiagram-FFXJYRFH-kgCEEPLo-CakI8CyJ.js} +357 -333
- package/dist/{kanban-definition-QRCXZQQD-C-5-UNRm-BOYYKTAB.js → kanban-definition-KOZQBZVT-CmM4CHe6-rjuufCiO.js} +75 -73
- package/dist/{katex-Qk2jHgyB-_qyJ_37x.js → katex-C0Lgw_Sx-CbX2I1cQ.js} +1864 -1814
- package/dist/{layout-BHI4imdk-CESYC-il.js → layout-9vIfpCf3-FfABA43y.js} +81 -81
- package/dist/linear-C-k9vokG-Md9dfBfB.js +259 -0
- package/dist/{mermaid-parser.core-Ce96PX3Q-CV9ue_xr.js → mermaid-parser.core-DHL9WXVx-DeKF3RZx.js} +4080 -3590
- package/dist/{mindmap-definition-GWI6TPTV-C98Syvj2-DUWC1UH5.js → mindmap-definition-LNHGMQRG-BsypuFYj-DSVrvuog.js} +1112 -1100
- package/dist/packet-BFZMPI3H-BcK9kJ-B-BxxCPBGn.js +5 -0
- package/dist/pie-7BOR55EZ-Vt5px0F3-BM7egbMh.js +5 -0
- package/dist/pieDiagram-DBDJKBY4-Bam6gKTi-BOqYeC6c.js +161 -0
- package/dist/{quadrantDiagram-OS5C2QUG-M57vVPSx-BRx-dMGe.js → quadrantDiagram-YPSRARAO-CJwMw09m-CN2OO-Le.js} +2 -2
- package/dist/radar-NHE76QYJ-Br11XWE4-4RP4MPFA.js +5 -0
- package/dist/requirementDiagram-EGVEC5DT-DkRytT0X-C2zigskn.js +850 -0
- package/dist/{sankeyDiagram-Y46BX6SQ-D6EdYPdp-D2Qzxmhx.js → sankeyDiagram-HRAUVNP4-08s1UHMk-2j8idkNs.js} +198 -193
- package/dist/{sequenceDiagram-G6AWOVSC-B171TAb1-KCpoI-Ck.js → sequenceDiagram-WFGC7UMF-6_s7-CN7-D-oTpLFJ.js} +1001 -992
- package/dist/stateDiagram-UUKSUZ4H-eWajY90l-BlM614AN.js +263 -0
- package/dist/stateDiagram-v2-EYPG3UTE-Dh7Ngu1O-YVMiocHE.js +16 -0
- package/dist/style.css +1 -1
- package/dist/timeline-definition-3HZDQTIS-4TPEOhE8-fDDLVlO8.js +799 -0
- package/dist/treemap-KMMF4GRG-nu7WEuPi-C1YG24W8.js +5 -0
- package/dist/{xychartDiagram-6QU3TZC5-CqbTSF5W-CUbJ50KT.js → xychartDiagram-FDP5SA34-BbtKlU7T-D1BI5nWs.js} +459 -423
- package/package.json +4 -4
- package/dist/_basePickBy-zlkqRmFy-D6w9JBLu.js +0 -151
- package/dist/arc-CK9P6CkJ-DVgfRhzX.js +0 -83
- package/dist/architecture-I3QFYML2-DJzmbE4M-C3v7Cpg0.js +0 -5
- package/dist/architectureDiagram-UYN6MBPD-DkZdgpXi-BTThTJ0F.js +0 -4592
- package/dist/blockDiagram-ZHA2E4KO-DnCMGCMN-DBXa-baO.js +0 -2247
- package/dist/chunk-5HRBRIJM-BjQ8go1b-CJmT3AYe.js +0 -24
- package/dist/chunk-7U56Z5CX-awhAxjZ0-Cs_UWlwk.js +0 -1213
- package/dist/chunk-T2TOU4HS-DqOVhIzl-O3PUl7Qp.js +0 -1301
- package/dist/classDiagram-LNE6IOMH-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/classDiagram-v2-MQ7JQ4JX-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/cytoscape.esm-DAyNQ0qu-i5PnoWfE.js +0 -16110
- package/dist/diagram-QW4FP2JN-DZT_0aFO-SYzM51ke.js +0 -126
- package/dist/erDiagram-6RL3IURR-BfgUC5jv-BrebVho-.js +0 -937
- package/dist/flowDiagram-7ASYPVHJ-Bo9CnsE7-Ds2vln_y.js +0 -1484
- package/dist/ganttDiagram-NTVNEXSI-8E9hjd6N-fR_cmeDc.js +0 -2491
- package/dist/gitGraph-YCYPL57B-BnErPIwo-DXUTceC1.js +0 -5
- package/dist/info-46DW6VJ7-DPpbx_vA-omPXKuBd.js +0 -5
- package/dist/infoDiagram-A4XQUW5V-Bo9uoOcA-CnlgI27B.js +0 -22
- package/dist/linear-C2PheBya-BHVXLcru.js +0 -423
- package/dist/packet-W2GHVCYJ-BLiQbm7T-BD1xX8XM.js +0 -5
- package/dist/pie-BEWT4RHE-D3Mbo3mT-B4n38n6N.js +0 -5
- package/dist/pieDiagram-YF2LJOPJ-BJV27s9B-DA7hy5wG.js +0 -161
- package/dist/requirementDiagram-MIRIMTAZ-D0KDg7rf-CRMUyo68.js +0 -768
- package/dist/stateDiagram-MAYHULR4-D7FUnT9_-aCApnrI4.js +0 -268
- package/dist/stateDiagram-v2-4JROLMXI-Cyc74STT-D-7hwTRo.js +0 -14
- package/dist/timeline-definition-U7ZMHBDA-Bw-dp1yf-C01CsNUU.js +0 -804
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { _ as G, l as q, g as et, aU as Et, bm as vt, aC as K, ad as Q, bn as _t, bo as mt, bp as Nt, a9 as At, br as Tt, aW as Dt, aO as Lt } from "./index-BDD0CD9m.js";
|
|
2
|
+
import { e as ut } from "./cytoscape.esm-CjI2IsL8-DYIumutE.js";
|
|
3
|
+
var it = { exports: {} }, rt = { exports: {} }, nt = { exports: {} }, Ot = nt.exports, lt;
|
|
4
|
+
function It() {
|
|
5
|
+
return lt || (lt = 1, function(O, M) {
|
|
6
6
|
(function(p, T) {
|
|
7
|
-
|
|
8
|
-
})(
|
|
7
|
+
O.exports = T();
|
|
8
|
+
})(Ot, function() {
|
|
9
9
|
return (
|
|
10
10
|
/******/
|
|
11
11
|
function(p) {
|
|
12
12
|
var T = {};
|
|
13
|
-
function y(
|
|
14
|
-
if (T[
|
|
15
|
-
return T[
|
|
16
|
-
var t = T[
|
|
13
|
+
function y(i) {
|
|
14
|
+
if (T[i])
|
|
15
|
+
return T[i].exports;
|
|
16
|
+
var t = T[i] = {
|
|
17
17
|
/******/
|
|
18
|
-
i
|
|
18
|
+
i,
|
|
19
19
|
/******/
|
|
20
20
|
l: !1,
|
|
21
21
|
/******/
|
|
22
22
|
exports: {}
|
|
23
23
|
/******/
|
|
24
24
|
};
|
|
25
|
-
return p[
|
|
25
|
+
return p[i].call(t.exports, t, t.exports, y), t.l = !0, t.exports;
|
|
26
26
|
}
|
|
27
|
-
return y.m = p, y.c = T, y.i = function(
|
|
28
|
-
return
|
|
29
|
-
}, y.d = function(
|
|
30
|
-
y.o(
|
|
27
|
+
return y.m = p, y.c = T, y.i = function(i) {
|
|
28
|
+
return i;
|
|
29
|
+
}, y.d = function(i, t, e) {
|
|
30
|
+
y.o(i, t) || Object.defineProperty(i, t, {
|
|
31
31
|
/******/
|
|
32
32
|
configurable: !1,
|
|
33
33
|
/******/
|
|
@@ -36,65 +36,65 @@ function Rt() {
|
|
|
36
36
|
get: e
|
|
37
37
|
/******/
|
|
38
38
|
});
|
|
39
|
-
}, y.n = function(
|
|
40
|
-
var t =
|
|
39
|
+
}, y.n = function(i) {
|
|
40
|
+
var t = i && i.__esModule ? (
|
|
41
41
|
/******/
|
|
42
42
|
function() {
|
|
43
|
-
return
|
|
43
|
+
return i.default;
|
|
44
44
|
}
|
|
45
45
|
) : (
|
|
46
46
|
/******/
|
|
47
47
|
function() {
|
|
48
|
-
return
|
|
48
|
+
return i;
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
51
|
return y.d(t, "a", t), t;
|
|
52
|
-
}, y.o = function(
|
|
53
|
-
return Object.prototype.hasOwnProperty.call(
|
|
52
|
+
}, y.o = function(i, t) {
|
|
53
|
+
return Object.prototype.hasOwnProperty.call(i, t);
|
|
54
54
|
}, y.p = "", y(y.s = 26);
|
|
55
55
|
}([
|
|
56
56
|
/* 0 */
|
|
57
57
|
/***/
|
|
58
58
|
function(p, T, y) {
|
|
59
|
-
function
|
|
59
|
+
function i() {
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
i.QUALITY = 1, i.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, i.DEFAULT_INCREMENTAL = !1, i.DEFAULT_ANIMATION_ON_LAYOUT = !0, i.DEFAULT_ANIMATION_DURING_LAYOUT = !1, i.DEFAULT_ANIMATION_PERIOD = 50, i.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, i.DEFAULT_GRAPH_MARGIN = 15, i.NODE_DIMENSIONS_INCLUDE_LABELS = !1, i.SIMPLE_NODE_SIZE = 40, i.SIMPLE_NODE_HALF_SIZE = i.SIMPLE_NODE_SIZE / 2, i.EMPTY_COMPOUND_NODE_SIZE = 40, i.MIN_EDGE_LENGTH = 1, i.WORLD_BOUNDARY = 1e6, i.INITIAL_WORLD_BOUNDARY = i.WORLD_BOUNDARY / 1e3, i.WORLD_CENTER_X = 1200, i.WORLD_CENTER_Y = 900, p.exports = i;
|
|
62
62
|
},
|
|
63
63
|
/* 1 */
|
|
64
64
|
/***/
|
|
65
65
|
function(p, T, y) {
|
|
66
|
-
var
|
|
67
|
-
function
|
|
68
|
-
|
|
66
|
+
var i = y(2), t = y(8), e = y(9);
|
|
67
|
+
function r(h, s, f) {
|
|
68
|
+
i.call(this, f), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = f, this.bendpoints = [], this.source = h, this.target = s;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
for (var a in
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
r.prototype = Object.create(i.prototype);
|
|
71
|
+
for (var a in i)
|
|
72
|
+
r[a] = i[a];
|
|
73
|
+
r.prototype.getSource = function() {
|
|
74
74
|
return this.source;
|
|
75
|
-
},
|
|
75
|
+
}, r.prototype.getTarget = function() {
|
|
76
76
|
return this.target;
|
|
77
|
-
},
|
|
77
|
+
}, r.prototype.isInterGraph = function() {
|
|
78
78
|
return this.isInterGraph;
|
|
79
|
-
},
|
|
79
|
+
}, r.prototype.getLength = function() {
|
|
80
80
|
return this.length;
|
|
81
|
-
},
|
|
81
|
+
}, r.prototype.isOverlapingSourceAndTarget = function() {
|
|
82
82
|
return this.isOverlapingSourceAndTarget;
|
|
83
|
-
},
|
|
83
|
+
}, r.prototype.getBendpoints = function() {
|
|
84
84
|
return this.bendpoints;
|
|
85
|
-
},
|
|
85
|
+
}, r.prototype.getLca = function() {
|
|
86
86
|
return this.lca;
|
|
87
|
-
},
|
|
87
|
+
}, r.prototype.getSourceInLca = function() {
|
|
88
88
|
return this.sourceInLca;
|
|
89
|
-
},
|
|
89
|
+
}, r.prototype.getTargetInLca = function() {
|
|
90
90
|
return this.targetInLca;
|
|
91
|
-
},
|
|
91
|
+
}, r.prototype.getOtherEnd = function(h) {
|
|
92
92
|
if (this.source === h)
|
|
93
93
|
return this.target;
|
|
94
94
|
if (this.target === h)
|
|
95
95
|
return this.source;
|
|
96
96
|
throw "Node is not incident with this edge";
|
|
97
|
-
},
|
|
97
|
+
}, r.prototype.getOtherEndInGraph = function(h, s) {
|
|
98
98
|
for (var f = this.getOtherEnd(h), o = s.getGraphManager().getRoot(); ; ) {
|
|
99
99
|
if (f.getOwner() == s)
|
|
100
100
|
return f;
|
|
@@ -103,31 +103,31 @@ function Rt() {
|
|
|
103
103
|
f = f.getOwner().getParent();
|
|
104
104
|
}
|
|
105
105
|
return null;
|
|
106
|
-
},
|
|
106
|
+
}, r.prototype.updateLength = function() {
|
|
107
107
|
var h = new Array(4);
|
|
108
108
|
this.isOverlapingSourceAndTarget = t.getIntersection(this.target.getRect(), this.source.getRect(), h), this.isOverlapingSourceAndTarget || (this.lengthX = h[0] - h[2], this.lengthY = h[1] - h[3], Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
|
|
109
|
-
},
|
|
109
|
+
}, r.prototype.updateLengthSimple = function() {
|
|
110
110
|
this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
|
|
111
|
-
}, p.exports =
|
|
111
|
+
}, p.exports = r;
|
|
112
112
|
},
|
|
113
113
|
/* 2 */
|
|
114
114
|
/***/
|
|
115
115
|
function(p, T, y) {
|
|
116
|
-
function
|
|
116
|
+
function i(t) {
|
|
117
117
|
this.vGraphObject = t;
|
|
118
118
|
}
|
|
119
|
-
p.exports =
|
|
119
|
+
p.exports = i;
|
|
120
120
|
},
|
|
121
121
|
/* 3 */
|
|
122
122
|
/***/
|
|
123
123
|
function(p, T, y) {
|
|
124
|
-
var
|
|
124
|
+
var i = y(2), t = y(10), e = y(13), r = y(0), a = y(16), h = y(4);
|
|
125
125
|
function s(o, d, c, E) {
|
|
126
|
-
c == null && E == null && (E = d),
|
|
126
|
+
c == null && E == null && (E = d), i.call(this, E), o.graphManager != null && (o = o.graphManager), this.estimatedSize = t.MIN_VALUE, this.inclusionTreeDepth = t.MAX_VALUE, this.vGraphObject = E, this.edges = [], this.graphManager = o, c != null && d != null ? this.rect = new e(d.x, d.y, c.width, c.height) : this.rect = new e();
|
|
127
127
|
}
|
|
128
|
-
s.prototype = Object.create(
|
|
129
|
-
for (var f in
|
|
130
|
-
s[f] =
|
|
128
|
+
s.prototype = Object.create(i.prototype);
|
|
129
|
+
for (var f in i)
|
|
130
|
+
s[f] = i[f];
|
|
131
131
|
s.prototype.getEdges = function() {
|
|
132
132
|
return this.edges;
|
|
133
133
|
}, s.prototype.getChild = function() {
|
|
@@ -192,9 +192,9 @@ function Rt() {
|
|
|
192
192
|
}, s.prototype.withChildren = function() {
|
|
193
193
|
var o = /* @__PURE__ */ new Set(), d, c;
|
|
194
194
|
if (o.add(this), this.child != null)
|
|
195
|
-
for (var E = this.child.getNodes(),
|
|
196
|
-
d = E[
|
|
197
|
-
o.add(
|
|
195
|
+
for (var E = this.child.getNodes(), m = 0; m < E.length; m++)
|
|
196
|
+
d = E[m], c = d.withChildren(), c.forEach(function(v) {
|
|
197
|
+
o.add(v);
|
|
198
198
|
});
|
|
199
199
|
return o;
|
|
200
200
|
}, s.prototype.getNoOfChildren = function() {
|
|
@@ -212,16 +212,16 @@ function Rt() {
|
|
|
212
212
|
}, s.prototype.calcEstimatedSize = function() {
|
|
213
213
|
return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
|
|
214
214
|
}, s.prototype.scatter = function() {
|
|
215
|
-
var o, d, c = -
|
|
216
|
-
o =
|
|
217
|
-
var
|
|
218
|
-
d =
|
|
215
|
+
var o, d, c = -r.INITIAL_WORLD_BOUNDARY, E = r.INITIAL_WORLD_BOUNDARY;
|
|
216
|
+
o = r.WORLD_CENTER_X + a.nextDouble() * (E - c) + c;
|
|
217
|
+
var m = -r.INITIAL_WORLD_BOUNDARY, v = r.INITIAL_WORLD_BOUNDARY;
|
|
218
|
+
d = r.WORLD_CENTER_Y + a.nextDouble() * (v - m) + m, this.rect.x = o, this.rect.y = d;
|
|
219
219
|
}, s.prototype.updateBounds = function() {
|
|
220
220
|
if (this.getChild() == null)
|
|
221
221
|
throw "assert failed";
|
|
222
222
|
if (this.getChild().getNodes().length != 0) {
|
|
223
223
|
var o = this.getChild();
|
|
224
|
-
if (o.updateBounds(!0), this.rect.x = o.getLeft(), this.rect.y = o.getTop(), this.setWidth(o.getRight() - o.getLeft()), this.setHeight(o.getBottom() - o.getTop()),
|
|
224
|
+
if (o.updateBounds(!0), this.rect.x = o.getLeft(), this.rect.y = o.getTop(), this.setWidth(o.getRight() - o.getLeft()), this.setHeight(o.getBottom() - o.getTop()), r.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
225
225
|
var d = o.getRight() - o.getLeft(), c = o.getBottom() - o.getTop();
|
|
226
226
|
this.labelWidth > d && (this.rect.x -= (this.labelWidth - d) / 2, this.setWidth(this.labelWidth)), this.labelHeight > c && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - c) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - c), this.setHeight(this.labelHeight));
|
|
227
227
|
}
|
|
@@ -232,11 +232,11 @@ function Rt() {
|
|
|
232
232
|
return this.inclusionTreeDepth;
|
|
233
233
|
}, s.prototype.transform = function(o) {
|
|
234
234
|
var d = this.rect.x;
|
|
235
|
-
d >
|
|
235
|
+
d > r.WORLD_BOUNDARY ? d = r.WORLD_BOUNDARY : d < -r.WORLD_BOUNDARY && (d = -r.WORLD_BOUNDARY);
|
|
236
236
|
var c = this.rect.y;
|
|
237
|
-
c >
|
|
238
|
-
var E = new h(d, c),
|
|
239
|
-
this.setLocation(
|
|
237
|
+
c > r.WORLD_BOUNDARY ? c = r.WORLD_BOUNDARY : c < -r.WORLD_BOUNDARY && (c = -r.WORLD_BOUNDARY);
|
|
238
|
+
var E = new h(d, c), m = o.inverseTransformPoint(E);
|
|
239
|
+
this.setLocation(m.x, m.y);
|
|
240
240
|
}, s.prototype.getLeft = function() {
|
|
241
241
|
return this.rect.x;
|
|
242
242
|
}, s.prototype.getRight = function() {
|
|
@@ -252,35 +252,35 @@ function Rt() {
|
|
|
252
252
|
/* 4 */
|
|
253
253
|
/***/
|
|
254
254
|
function(p, T, y) {
|
|
255
|
-
function
|
|
255
|
+
function i(t, e) {
|
|
256
256
|
t == null && e == null ? (this.x = 0, this.y = 0) : (this.x = t, this.y = e);
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
i.prototype.getX = function() {
|
|
259
259
|
return this.x;
|
|
260
|
-
},
|
|
260
|
+
}, i.prototype.getY = function() {
|
|
261
261
|
return this.y;
|
|
262
|
-
},
|
|
262
|
+
}, i.prototype.setX = function(t) {
|
|
263
263
|
this.x = t;
|
|
264
|
-
},
|
|
264
|
+
}, i.prototype.setY = function(t) {
|
|
265
265
|
this.y = t;
|
|
266
|
-
},
|
|
266
|
+
}, i.prototype.getDifference = function(t) {
|
|
267
267
|
return new DimensionD(this.x - t.x, this.y - t.y);
|
|
268
|
-
},
|
|
269
|
-
return new
|
|
270
|
-
},
|
|
268
|
+
}, i.prototype.getCopy = function() {
|
|
269
|
+
return new i(this.x, this.y);
|
|
270
|
+
}, i.prototype.translate = function(t) {
|
|
271
271
|
return this.x += t.width, this.y += t.height, this;
|
|
272
|
-
}, p.exports =
|
|
272
|
+
}, p.exports = i;
|
|
273
273
|
},
|
|
274
274
|
/* 5 */
|
|
275
275
|
/***/
|
|
276
276
|
function(p, T, y) {
|
|
277
|
-
var
|
|
278
|
-
function d(E,
|
|
279
|
-
|
|
277
|
+
var i = y(2), t = y(10), e = y(0), r = y(6), a = y(3), h = y(1), s = y(13), f = y(12), o = y(11);
|
|
278
|
+
function d(E, m, v) {
|
|
279
|
+
i.call(this, v), this.estimatedSize = t.MIN_VALUE, this.margin = e.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = E, m != null && m instanceof r ? this.graphManager = m : m != null && m instanceof Layout && (this.graphManager = m.graphManager);
|
|
280
280
|
}
|
|
281
|
-
d.prototype = Object.create(
|
|
282
|
-
for (var c in
|
|
283
|
-
d[c] =
|
|
281
|
+
d.prototype = Object.create(i.prototype);
|
|
282
|
+
for (var c in i)
|
|
283
|
+
d[c] = i[c];
|
|
284
284
|
d.prototype.getNodes = function() {
|
|
285
285
|
return this.nodes;
|
|
286
286
|
}, d.prototype.getEdges = function() {
|
|
@@ -299,8 +299,8 @@ function Rt() {
|
|
|
299
299
|
return this.bottom;
|
|
300
300
|
}, d.prototype.isConnected = function() {
|
|
301
301
|
return this.isConnected;
|
|
302
|
-
}, d.prototype.add = function(E,
|
|
303
|
-
if (
|
|
302
|
+
}, d.prototype.add = function(E, m, v) {
|
|
303
|
+
if (m == null && v == null) {
|
|
304
304
|
var N = E;
|
|
305
305
|
if (this.graphManager == null)
|
|
306
306
|
throw "Graph has no graph mgr!";
|
|
@@ -308,28 +308,28 @@ function Rt() {
|
|
|
308
308
|
throw "Node already in graph!";
|
|
309
309
|
return N.owner = this, this.getNodes().push(N), N;
|
|
310
310
|
} else {
|
|
311
|
-
var
|
|
312
|
-
if (!(this.getNodes().indexOf(
|
|
311
|
+
var D = E;
|
|
312
|
+
if (!(this.getNodes().indexOf(m) > -1 && this.getNodes().indexOf(v) > -1))
|
|
313
313
|
throw "Source or target not in graph!";
|
|
314
|
-
if (!(
|
|
314
|
+
if (!(m.owner == v.owner && m.owner == this))
|
|
315
315
|
throw "Both owners must be this graph!";
|
|
316
|
-
return
|
|
316
|
+
return m.owner != v.owner ? null : (D.source = m, D.target = v, D.isInterGraph = !1, this.getEdges().push(D), m.edges.push(D), v != m && v.edges.push(D), D);
|
|
317
317
|
}
|
|
318
318
|
}, d.prototype.remove = function(E) {
|
|
319
|
-
var
|
|
319
|
+
var m = E;
|
|
320
320
|
if (E instanceof a) {
|
|
321
|
-
if (
|
|
321
|
+
if (m == null)
|
|
322
322
|
throw "Node is null!";
|
|
323
|
-
if (!(
|
|
323
|
+
if (!(m.owner != null && m.owner == this))
|
|
324
324
|
throw "Owner graph is invalid!";
|
|
325
325
|
if (this.graphManager == null)
|
|
326
326
|
throw "Owner graph manager is invalid!";
|
|
327
|
-
for (var
|
|
328
|
-
N =
|
|
329
|
-
var
|
|
330
|
-
if (
|
|
327
|
+
for (var v = m.edges.slice(), N, D = v.length, g = 0; g < D; g++)
|
|
328
|
+
N = v[g], N.isInterGraph ? this.graphManager.remove(N) : N.source.owner.remove(N);
|
|
329
|
+
var L = this.nodes.indexOf(m);
|
|
330
|
+
if (L == -1)
|
|
331
331
|
throw "Node not in owner node list!";
|
|
332
|
-
this.nodes.splice(
|
|
332
|
+
this.nodes.splice(L, 1);
|
|
333
333
|
} else if (E instanceof h) {
|
|
334
334
|
var N = E;
|
|
335
335
|
if (N == null)
|
|
@@ -342,31 +342,31 @@ function Rt() {
|
|
|
342
342
|
if (!(n > -1 && u > -1))
|
|
343
343
|
throw "Source and/or target doesn't know this edge!";
|
|
344
344
|
N.source.edges.splice(n, 1), N.target != N.source && N.target.edges.splice(u, 1);
|
|
345
|
-
var
|
|
346
|
-
if (
|
|
345
|
+
var L = N.source.owner.getEdges().indexOf(N);
|
|
346
|
+
if (L == -1)
|
|
347
347
|
throw "Not in owner's edge list!";
|
|
348
|
-
N.source.owner.getEdges().splice(
|
|
348
|
+
N.source.owner.getEdges().splice(L, 1);
|
|
349
349
|
}
|
|
350
350
|
}, d.prototype.updateLeftTop = function() {
|
|
351
|
-
for (var E = t.MAX_VALUE,
|
|
351
|
+
for (var E = t.MAX_VALUE, m = t.MAX_VALUE, v, N, D, g = this.getNodes(), L = g.length, n = 0; n < L; n++) {
|
|
352
352
|
var u = g[n];
|
|
353
|
-
|
|
353
|
+
v = u.getTop(), N = u.getLeft(), E > v && (E = v), m > N && (m = N);
|
|
354
354
|
}
|
|
355
|
-
return E == t.MAX_VALUE ? null : (g[0].getParent().paddingLeft != null ?
|
|
355
|
+
return E == t.MAX_VALUE ? null : (g[0].getParent().paddingLeft != null ? D = g[0].getParent().paddingLeft : D = this.margin, this.left = m - D, this.top = E - D, new f(this.left, this.top));
|
|
356
356
|
}, d.prototype.updateBounds = function(E) {
|
|
357
|
-
for (var
|
|
358
|
-
var
|
|
359
|
-
E &&
|
|
357
|
+
for (var m = t.MAX_VALUE, v = -t.MAX_VALUE, N = t.MAX_VALUE, D = -t.MAX_VALUE, g, L, n, u, l, _ = this.nodes, A = _.length, I = 0; I < A; I++) {
|
|
358
|
+
var w = _[I];
|
|
359
|
+
E && w.child != null && w.updateBounds(), g = w.getLeft(), L = w.getRight(), n = w.getTop(), u = w.getBottom(), m > g && (m = g), v < L && (v = L), N > n && (N = n), D < u && (D = u);
|
|
360
360
|
}
|
|
361
|
-
var
|
|
362
|
-
|
|
361
|
+
var R = new s(m, N, v - m, D - N);
|
|
362
|
+
m == t.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), _[0].getParent().paddingLeft != null ? l = _[0].getParent().paddingLeft : l = this.margin, this.left = R.x - l, this.right = R.x + R.width + l, this.top = R.y - l, this.bottom = R.y + R.height + l;
|
|
363
363
|
}, d.calculateBounds = function(E) {
|
|
364
|
-
for (var
|
|
365
|
-
var A = E[
|
|
366
|
-
g = A.getLeft(),
|
|
364
|
+
for (var m = t.MAX_VALUE, v = -t.MAX_VALUE, N = t.MAX_VALUE, D = -t.MAX_VALUE, g, L, n, u, l = E.length, _ = 0; _ < l; _++) {
|
|
365
|
+
var A = E[_];
|
|
366
|
+
g = A.getLeft(), L = A.getRight(), n = A.getTop(), u = A.getBottom(), m > g && (m = g), v < L && (v = L), N > n && (N = n), D < u && (D = u);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
369
|
-
return
|
|
368
|
+
var I = new s(m, N, v - m, D - N);
|
|
369
|
+
return I;
|
|
370
370
|
}, d.prototype.getInclusionTreeDepth = function() {
|
|
371
371
|
return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
|
|
372
372
|
}, d.prototype.getEstimatedSize = function() {
|
|
@@ -374,9 +374,9 @@ function Rt() {
|
|
|
374
374
|
throw "assert failed";
|
|
375
375
|
return this.estimatedSize;
|
|
376
376
|
}, d.prototype.calcEstimatedSize = function() {
|
|
377
|
-
for (var E = 0,
|
|
378
|
-
var
|
|
379
|
-
E +=
|
|
377
|
+
for (var E = 0, m = this.nodes, v = m.length, N = 0; N < v; N++) {
|
|
378
|
+
var D = m[N];
|
|
379
|
+
E += D.calcEstimatedSize();
|
|
380
380
|
}
|
|
381
381
|
return E == 0 ? this.estimatedSize = e.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = E / Math.sqrt(this.nodes.length), this.estimatedSize;
|
|
382
382
|
}, d.prototype.updateConnected = function() {
|
|
@@ -385,25 +385,25 @@ function Rt() {
|
|
|
385
385
|
this.isConnected = !0;
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
388
|
-
var
|
|
389
|
-
for (
|
|
390
|
-
|
|
391
|
-
});
|
|
392
|
-
N =
|
|
393
|
-
for (var n =
|
|
394
|
-
var l =
|
|
395
|
-
if (g = l.getOtherEndInGraph(N, this), g != null && !
|
|
396
|
-
var
|
|
397
|
-
|
|
398
|
-
|
|
388
|
+
var m = new o(), v = /* @__PURE__ */ new Set(), N = this.nodes[0], D, g, L = N.withChildren();
|
|
389
|
+
for (L.forEach(function(I) {
|
|
390
|
+
m.push(I), v.add(I);
|
|
391
|
+
}); m.length !== 0; ) {
|
|
392
|
+
N = m.shift(), D = N.getEdges();
|
|
393
|
+
for (var n = D.length, u = 0; u < n; u++) {
|
|
394
|
+
var l = D[u];
|
|
395
|
+
if (g = l.getOtherEndInGraph(N, this), g != null && !v.has(g)) {
|
|
396
|
+
var _ = g.withChildren();
|
|
397
|
+
_.forEach(function(I) {
|
|
398
|
+
m.push(I), v.add(I);
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
if (this.isConnected = !1,
|
|
403
|
+
if (this.isConnected = !1, v.size >= this.nodes.length) {
|
|
404
404
|
var A = 0;
|
|
405
|
-
|
|
406
|
-
|
|
405
|
+
v.forEach(function(I) {
|
|
406
|
+
I.owner == E && A++;
|
|
407
407
|
}), A == this.nodes.length && (this.isConnected = !0);
|
|
408
408
|
}
|
|
409
409
|
}, p.exports = d;
|
|
@@ -411,28 +411,28 @@ function Rt() {
|
|
|
411
411
|
/* 6 */
|
|
412
412
|
/***/
|
|
413
413
|
function(p, T, y) {
|
|
414
|
-
var
|
|
415
|
-
function e(
|
|
416
|
-
|
|
414
|
+
var i, t = y(1);
|
|
415
|
+
function e(r) {
|
|
416
|
+
i = y(5), this.layout = r, this.graphs = [], this.edges = [];
|
|
417
417
|
}
|
|
418
418
|
e.prototype.addRoot = function() {
|
|
419
|
-
var
|
|
419
|
+
var r = this.layout.newGraph(), a = this.layout.newNode(null), h = this.add(r, a);
|
|
420
420
|
return this.setRootGraph(h), this.rootGraph;
|
|
421
|
-
}, e.prototype.add = function(
|
|
421
|
+
}, e.prototype.add = function(r, a, h, s, f) {
|
|
422
422
|
if (h == null && s == null && f == null) {
|
|
423
|
-
if (
|
|
423
|
+
if (r == null)
|
|
424
424
|
throw "Graph is null!";
|
|
425
425
|
if (a == null)
|
|
426
426
|
throw "Parent node is null!";
|
|
427
|
-
if (this.graphs.indexOf(
|
|
427
|
+
if (this.graphs.indexOf(r) > -1)
|
|
428
428
|
throw "Graph already in this graph mgr!";
|
|
429
|
-
if (this.graphs.push(
|
|
429
|
+
if (this.graphs.push(r), r.parent != null)
|
|
430
430
|
throw "Already has a parent!";
|
|
431
431
|
if (a.child != null)
|
|
432
432
|
throw "Already has a child!";
|
|
433
|
-
return
|
|
433
|
+
return r.parent = a, a.child = r, r;
|
|
434
434
|
} else {
|
|
435
|
-
f = h, s = a, h =
|
|
435
|
+
f = h, s = a, h = r;
|
|
436
436
|
var o = s.getOwner(), d = f.getOwner();
|
|
437
437
|
if (!(o != null && o.getGraphManager() == this))
|
|
438
438
|
throw "Source not in this graph mgr!";
|
|
@@ -448,9 +448,9 @@ function Rt() {
|
|
|
448
448
|
throw "Edge already in source and/or target incidency list!";
|
|
449
449
|
return h.source.edges.push(h), h.target.edges.push(h), h;
|
|
450
450
|
}
|
|
451
|
-
}, e.prototype.remove = function(
|
|
452
|
-
if (
|
|
453
|
-
var a =
|
|
451
|
+
}, e.prototype.remove = function(r) {
|
|
452
|
+
if (r instanceof i) {
|
|
453
|
+
var a = r;
|
|
454
454
|
if (a.getGraphManager() != this)
|
|
455
455
|
throw "Graph not in this graph mgr";
|
|
456
456
|
if (!(a == this.rootGraph || a.parent != null && a.parent.graphManager == this))
|
|
@@ -468,8 +468,8 @@ function Rt() {
|
|
|
468
468
|
a == this.rootGraph && this.setRootGraph(null);
|
|
469
469
|
var E = this.graphs.indexOf(a);
|
|
470
470
|
this.graphs.splice(E, 1), a.parent = null;
|
|
471
|
-
} else if (
|
|
472
|
-
if (s =
|
|
471
|
+
} else if (r instanceof t) {
|
|
472
|
+
if (s = r, s == null)
|
|
473
473
|
throw "Edge is null!";
|
|
474
474
|
if (!s.isInterGraph)
|
|
475
475
|
throw "Not an inter-graph edge!";
|
|
@@ -491,9 +491,9 @@ function Rt() {
|
|
|
491
491
|
return this.graphs;
|
|
492
492
|
}, e.prototype.getAllNodes = function() {
|
|
493
493
|
if (this.allNodes == null) {
|
|
494
|
-
for (var
|
|
495
|
-
|
|
496
|
-
this.allNodes =
|
|
494
|
+
for (var r = [], a = this.getGraphs(), h = a.length, s = 0; s < h; s++)
|
|
495
|
+
r = r.concat(a[s].getNodes());
|
|
496
|
+
this.allNodes = r;
|
|
497
497
|
}
|
|
498
498
|
return this.allNodes;
|
|
499
499
|
}, e.prototype.resetAllNodes = function() {
|
|
@@ -504,33 +504,33 @@ function Rt() {
|
|
|
504
504
|
this.allNodesToApplyGravitation = null;
|
|
505
505
|
}, e.prototype.getAllEdges = function() {
|
|
506
506
|
if (this.allEdges == null) {
|
|
507
|
-
var
|
|
507
|
+
var r = [], a = this.getGraphs();
|
|
508
508
|
a.length;
|
|
509
509
|
for (var h = 0; h < a.length; h++)
|
|
510
|
-
|
|
511
|
-
|
|
510
|
+
r = r.concat(a[h].getEdges());
|
|
511
|
+
r = r.concat(this.edges), this.allEdges = r;
|
|
512
512
|
}
|
|
513
513
|
return this.allEdges;
|
|
514
514
|
}, e.prototype.getAllNodesToApplyGravitation = function() {
|
|
515
515
|
return this.allNodesToApplyGravitation;
|
|
516
|
-
}, e.prototype.setAllNodesToApplyGravitation = function(
|
|
516
|
+
}, e.prototype.setAllNodesToApplyGravitation = function(r) {
|
|
517
517
|
if (this.allNodesToApplyGravitation != null)
|
|
518
518
|
throw "assert failed";
|
|
519
|
-
this.allNodesToApplyGravitation =
|
|
519
|
+
this.allNodesToApplyGravitation = r;
|
|
520
520
|
}, e.prototype.getRoot = function() {
|
|
521
521
|
return this.rootGraph;
|
|
522
|
-
}, e.prototype.setRootGraph = function(
|
|
523
|
-
if (
|
|
522
|
+
}, e.prototype.setRootGraph = function(r) {
|
|
523
|
+
if (r.getGraphManager() != this)
|
|
524
524
|
throw "Root not in this graph mgr!";
|
|
525
|
-
this.rootGraph =
|
|
525
|
+
this.rootGraph = r, r.parent == null && (r.parent = this.layout.newNode("Root node"));
|
|
526
526
|
}, e.prototype.getLayout = function() {
|
|
527
527
|
return this.layout;
|
|
528
|
-
}, e.prototype.isOneAncestorOfOther = function(
|
|
529
|
-
if (!(
|
|
528
|
+
}, e.prototype.isOneAncestorOfOther = function(r, a) {
|
|
529
|
+
if (!(r != null && a != null))
|
|
530
530
|
throw "assert failed";
|
|
531
|
-
if (
|
|
531
|
+
if (r == a)
|
|
532
532
|
return !0;
|
|
533
|
-
var h =
|
|
533
|
+
var h = r.getOwner(), s;
|
|
534
534
|
do {
|
|
535
535
|
if (s = h.getParent(), s == null)
|
|
536
536
|
break;
|
|
@@ -543,41 +543,41 @@ function Rt() {
|
|
|
543
543
|
do {
|
|
544
544
|
if (s = h.getParent(), s == null)
|
|
545
545
|
break;
|
|
546
|
-
if (s ==
|
|
546
|
+
if (s == r)
|
|
547
547
|
return !0;
|
|
548
548
|
if (h = s.getOwner(), h == null)
|
|
549
549
|
break;
|
|
550
550
|
} while (!0);
|
|
551
551
|
return !1;
|
|
552
552
|
}, e.prototype.calcLowestCommonAncestors = function() {
|
|
553
|
-
for (var
|
|
554
|
-
if (
|
|
555
|
-
|
|
553
|
+
for (var r, a, h, s, f, o = this.getAllEdges(), d = o.length, c = 0; c < d; c++) {
|
|
554
|
+
if (r = o[c], a = r.source, h = r.target, r.lca = null, r.sourceInLca = a, r.targetInLca = h, a == h) {
|
|
555
|
+
r.lca = a.getOwner();
|
|
556
556
|
continue;
|
|
557
557
|
}
|
|
558
|
-
for (s = a.getOwner();
|
|
559
|
-
for (
|
|
558
|
+
for (s = a.getOwner(); r.lca == null; ) {
|
|
559
|
+
for (r.targetInLca = h, f = h.getOwner(); r.lca == null; ) {
|
|
560
560
|
if (f == s) {
|
|
561
|
-
|
|
561
|
+
r.lca = f;
|
|
562
562
|
break;
|
|
563
563
|
}
|
|
564
564
|
if (f == this.rootGraph)
|
|
565
565
|
break;
|
|
566
|
-
if (
|
|
566
|
+
if (r.lca != null)
|
|
567
567
|
throw "assert failed";
|
|
568
|
-
|
|
568
|
+
r.targetInLca = f.getParent(), f = r.targetInLca.getOwner();
|
|
569
569
|
}
|
|
570
570
|
if (s == this.rootGraph)
|
|
571
571
|
break;
|
|
572
|
-
|
|
572
|
+
r.lca == null && (r.sourceInLca = s.getParent(), s = r.sourceInLca.getOwner());
|
|
573
573
|
}
|
|
574
|
-
if (
|
|
574
|
+
if (r.lca == null)
|
|
575
575
|
throw "assert failed";
|
|
576
576
|
}
|
|
577
|
-
}, e.prototype.calcLowestCommonAncestor = function(
|
|
578
|
-
if (
|
|
579
|
-
return
|
|
580
|
-
var h =
|
|
577
|
+
}, e.prototype.calcLowestCommonAncestor = function(r, a) {
|
|
578
|
+
if (r == a)
|
|
579
|
+
return r.getOwner();
|
|
580
|
+
var h = r.getOwner();
|
|
581
581
|
do {
|
|
582
582
|
if (h == null)
|
|
583
583
|
break;
|
|
@@ -592,13 +592,13 @@ function Rt() {
|
|
|
592
592
|
h = h.getParent().getOwner();
|
|
593
593
|
} while (!0);
|
|
594
594
|
return h;
|
|
595
|
-
}, e.prototype.calcInclusionTreeDepths = function(
|
|
596
|
-
|
|
597
|
-
for (var h, s =
|
|
595
|
+
}, e.prototype.calcInclusionTreeDepths = function(r, a) {
|
|
596
|
+
r == null && a == null && (r = this.rootGraph, a = 1);
|
|
597
|
+
for (var h, s = r.getNodes(), f = s.length, o = 0; o < f; o++)
|
|
598
598
|
h = s[o], h.inclusionTreeDepth = a, h.child != null && this.calcInclusionTreeDepths(h.child, a + 1);
|
|
599
599
|
}, e.prototype.includesInvalidEdge = function() {
|
|
600
|
-
for (var
|
|
601
|
-
if (
|
|
600
|
+
for (var r, a = this.edges.length, h = 0; h < a; h++)
|
|
601
|
+
if (r = this.edges[h], this.isOneAncestorOfOther(r.source, r.target))
|
|
602
602
|
return !0;
|
|
603
603
|
return !1;
|
|
604
604
|
}, p.exports = e;
|
|
@@ -606,123 +606,123 @@ function Rt() {
|
|
|
606
606
|
/* 7 */
|
|
607
607
|
/***/
|
|
608
608
|
function(p, T, y) {
|
|
609
|
-
var
|
|
609
|
+
var i = y(0);
|
|
610
610
|
function t() {
|
|
611
611
|
}
|
|
612
|
-
for (var e in
|
|
613
|
-
t[e] =
|
|
612
|
+
for (var e in i)
|
|
613
|
+
t[e] = i[e];
|
|
614
614
|
t.MAX_ITERATIONS = 2500, t.DEFAULT_EDGE_LENGTH = 50, t.DEFAULT_SPRING_STRENGTH = 0.45, t.DEFAULT_REPULSION_STRENGTH = 4500, t.DEFAULT_GRAVITY_STRENGTH = 0.4, t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, t.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, t.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, t.COOLING_ADAPTATION_FACTOR = 0.33, t.ADAPTATION_LOWER_NODE_LIMIT = 1e3, t.ADAPTATION_UPPER_NODE_LIMIT = 5e3, t.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, t.MAX_NODE_DISPLACEMENT = t.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, t.MIN_REPULSION_DIST = t.DEFAULT_EDGE_LENGTH / 10, t.CONVERGENCE_CHECK_PERIOD = 100, t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, t.MIN_EDGE_LENGTH = 1, t.GRID_CALCULATION_CHECK_PERIOD = 10, p.exports = t;
|
|
615
615
|
},
|
|
616
616
|
/* 8 */
|
|
617
617
|
/***/
|
|
618
618
|
function(p, T, y) {
|
|
619
|
-
var
|
|
619
|
+
var i = y(12);
|
|
620
620
|
function t() {
|
|
621
621
|
}
|
|
622
|
-
t.calcSeparationAmount = function(e,
|
|
623
|
-
if (!e.intersects(
|
|
622
|
+
t.calcSeparationAmount = function(e, r, a, h) {
|
|
623
|
+
if (!e.intersects(r))
|
|
624
624
|
throw "assert failed";
|
|
625
625
|
var s = new Array(2);
|
|
626
|
-
this.decideDirectionsForOverlappingNodes(e,
|
|
627
|
-
var f = Math.abs((
|
|
628
|
-
|
|
626
|
+
this.decideDirectionsForOverlappingNodes(e, r, s), a[0] = Math.min(e.getRight(), r.getRight()) - Math.max(e.x, r.x), a[1] = Math.min(e.getBottom(), r.getBottom()) - Math.max(e.y, r.y), e.getX() <= r.getX() && e.getRight() >= r.getRight() ? a[0] += Math.min(r.getX() - e.getX(), e.getRight() - r.getRight()) : r.getX() <= e.getX() && r.getRight() >= e.getRight() && (a[0] += Math.min(e.getX() - r.getX(), r.getRight() - e.getRight())), e.getY() <= r.getY() && e.getBottom() >= r.getBottom() ? a[1] += Math.min(r.getY() - e.getY(), e.getBottom() - r.getBottom()) : r.getY() <= e.getY() && r.getBottom() >= e.getBottom() && (a[1] += Math.min(e.getY() - r.getY(), r.getBottom() - e.getBottom()));
|
|
627
|
+
var f = Math.abs((r.getCenterY() - e.getCenterY()) / (r.getCenterX() - e.getCenterX()));
|
|
628
|
+
r.getCenterY() === e.getCenterY() && r.getCenterX() === e.getCenterX() && (f = 1);
|
|
629
629
|
var o = f * a[0], d = a[1] / f;
|
|
630
630
|
a[0] < d ? d = a[0] : o = a[1], a[0] = -1 * s[0] * (d / 2 + h), a[1] = -1 * s[1] * (o / 2 + h);
|
|
631
|
-
}, t.decideDirectionsForOverlappingNodes = function(e,
|
|
632
|
-
e.getCenterX() <
|
|
633
|
-
}, t.getIntersection2 = function(e,
|
|
634
|
-
var h = e.getCenterX(), s = e.getCenterY(), f =
|
|
635
|
-
if (e.intersects(
|
|
631
|
+
}, t.decideDirectionsForOverlappingNodes = function(e, r, a) {
|
|
632
|
+
e.getCenterX() < r.getCenterX() ? a[0] = -1 : a[0] = 1, e.getCenterY() < r.getCenterY() ? a[1] = -1 : a[1] = 1;
|
|
633
|
+
}, t.getIntersection2 = function(e, r, a) {
|
|
634
|
+
var h = e.getCenterX(), s = e.getCenterY(), f = r.getCenterX(), o = r.getCenterY();
|
|
635
|
+
if (e.intersects(r))
|
|
636
636
|
return a[0] = h, a[1] = s, a[2] = f, a[3] = o, !0;
|
|
637
|
-
var d = e.getX(), c = e.getY(), E = e.getRight(),
|
|
637
|
+
var d = e.getX(), c = e.getY(), E = e.getRight(), m = e.getX(), v = e.getBottom(), N = e.getRight(), D = e.getWidthHalf(), g = e.getHeightHalf(), L = r.getX(), n = r.getY(), u = r.getRight(), l = r.getX(), _ = r.getBottom(), A = r.getRight(), I = r.getWidthHalf(), w = r.getHeightHalf(), R = !1, S = !1;
|
|
638
638
|
if (h === f) {
|
|
639
639
|
if (s > o)
|
|
640
|
-
return a[0] = h, a[1] = c, a[2] = f, a[3] =
|
|
640
|
+
return a[0] = h, a[1] = c, a[2] = f, a[3] = _, !1;
|
|
641
641
|
if (s < o)
|
|
642
|
-
return a[0] = h, a[1] =
|
|
642
|
+
return a[0] = h, a[1] = v, a[2] = f, a[3] = n, !1;
|
|
643
643
|
} else if (s === o) {
|
|
644
644
|
if (h > f)
|
|
645
645
|
return a[0] = d, a[1] = s, a[2] = u, a[3] = o, !1;
|
|
646
646
|
if (h < f)
|
|
647
|
-
return a[0] = E, a[1] = s, a[2] =
|
|
647
|
+
return a[0] = E, a[1] = s, a[2] = L, a[3] = o, !1;
|
|
648
648
|
} else {
|
|
649
|
-
var U = e.height / e.width, b =
|
|
650
|
-
if (-U ===
|
|
649
|
+
var U = e.height / e.width, b = r.height / r.width, C = (o - s) / (f - h), x = void 0, F = void 0, k = void 0, Y = void 0, X = void 0, P = void 0;
|
|
650
|
+
if (-U === C ? h > f ? (a[0] = m, a[1] = v, R = !0) : (a[0] = E, a[1] = c, R = !0) : U === C && (h > f ? (a[0] = d, a[1] = c, R = !0) : (a[0] = N, a[1] = v, R = !0)), -b === C ? f > h ? (a[2] = l, a[3] = _, S = !0) : (a[2] = u, a[3] = n, S = !0) : b === C && (f > h ? (a[2] = L, a[3] = n, S = !0) : (a[2] = A, a[3] = _, S = !0)), R && S)
|
|
651
651
|
return !1;
|
|
652
|
-
if (h > f ? s > o ? (
|
|
653
|
-
switch (
|
|
652
|
+
if (h > f ? s > o ? (x = this.getCardinalDirection(U, C, 4), F = this.getCardinalDirection(b, C, 2)) : (x = this.getCardinalDirection(-U, C, 3), F = this.getCardinalDirection(-b, C, 1)) : s > o ? (x = this.getCardinalDirection(-U, C, 1), F = this.getCardinalDirection(-b, C, 3)) : (x = this.getCardinalDirection(U, C, 2), F = this.getCardinalDirection(b, C, 4)), !R)
|
|
653
|
+
switch (x) {
|
|
654
654
|
case 1:
|
|
655
|
-
Y = c, k = h + -g /
|
|
655
|
+
Y = c, k = h + -g / C, a[0] = k, a[1] = Y;
|
|
656
656
|
break;
|
|
657
657
|
case 2:
|
|
658
|
-
k = N, Y = s +
|
|
658
|
+
k = N, Y = s + D * C, a[0] = k, a[1] = Y;
|
|
659
659
|
break;
|
|
660
660
|
case 3:
|
|
661
|
-
Y =
|
|
661
|
+
Y = v, k = h + g / C, a[0] = k, a[1] = Y;
|
|
662
662
|
break;
|
|
663
663
|
case 4:
|
|
664
|
-
k =
|
|
664
|
+
k = m, Y = s + -D * C, a[0] = k, a[1] = Y;
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
667
|
-
if (!
|
|
667
|
+
if (!S)
|
|
668
668
|
switch (F) {
|
|
669
669
|
case 1:
|
|
670
|
-
P = n, X = f + -
|
|
670
|
+
P = n, X = f + -w / C, a[2] = X, a[3] = P;
|
|
671
671
|
break;
|
|
672
672
|
case 2:
|
|
673
|
-
X = A, P = o +
|
|
673
|
+
X = A, P = o + I * C, a[2] = X, a[3] = P;
|
|
674
674
|
break;
|
|
675
675
|
case 3:
|
|
676
|
-
P =
|
|
676
|
+
P = _, X = f + w / C, a[2] = X, a[3] = P;
|
|
677
677
|
break;
|
|
678
678
|
case 4:
|
|
679
|
-
X = l, P = o + -
|
|
679
|
+
X = l, P = o + -I * C, a[2] = X, a[3] = P;
|
|
680
680
|
break;
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
return !1;
|
|
684
|
-
}, t.getCardinalDirection = function(e,
|
|
685
|
-
return e >
|
|
686
|
-
}, t.getIntersection = function(e,
|
|
684
|
+
}, t.getCardinalDirection = function(e, r, a) {
|
|
685
|
+
return e > r ? a : 1 + a % 4;
|
|
686
|
+
}, t.getIntersection = function(e, r, a, h) {
|
|
687
687
|
if (h == null)
|
|
688
|
-
return this.getIntersection2(e,
|
|
689
|
-
var s = e.x, f = e.y, o =
|
|
690
|
-
return g = d - f, n = s - o, l = o * f - s * d,
|
|
691
|
-
}, t.angleOfVector = function(e,
|
|
688
|
+
return this.getIntersection2(e, r, a);
|
|
689
|
+
var s = e.x, f = e.y, o = r.x, d = r.y, c = a.x, E = a.y, m = h.x, v = h.y, N = void 0, D = void 0, g = void 0, L = void 0, n = void 0, u = void 0, l = void 0, _ = void 0, A = void 0;
|
|
690
|
+
return g = d - f, n = s - o, l = o * f - s * d, L = v - E, u = c - m, _ = m * E - c * v, A = g * u - L * n, A === 0 ? null : (N = (n * _ - u * l) / A, D = (L * l - g * _) / A, new i(N, D));
|
|
691
|
+
}, t.angleOfVector = function(e, r, a, h) {
|
|
692
692
|
var s = void 0;
|
|
693
|
-
return e !== a ? (s = Math.atan((h -
|
|
694
|
-
}, t.doIntersect = function(e,
|
|
695
|
-
var s = e.x, f = e.y, o =
|
|
693
|
+
return e !== a ? (s = Math.atan((h - r) / (a - e)), a < e ? s += Math.PI : h < r && (s += this.TWO_PI)) : h < r ? s = this.ONE_AND_HALF_PI : s = this.HALF_PI, s;
|
|
694
|
+
}, t.doIntersect = function(e, r, a, h) {
|
|
695
|
+
var s = e.x, f = e.y, o = r.x, d = r.y, c = a.x, E = a.y, m = h.x, v = h.y, N = (o - s) * (v - E) - (m - c) * (d - f);
|
|
696
696
|
if (N === 0)
|
|
697
697
|
return !1;
|
|
698
|
-
var
|
|
699
|
-
return 0 <
|
|
698
|
+
var D = ((v - E) * (m - s) + (c - m) * (v - f)) / N, g = ((f - d) * (m - s) + (o - s) * (v - f)) / N;
|
|
699
|
+
return 0 < D && D < 1 && 0 < g && g < 1;
|
|
700
700
|
}, t.HALF_PI = 0.5 * Math.PI, t.ONE_AND_HALF_PI = 1.5 * Math.PI, t.TWO_PI = 2 * Math.PI, t.THREE_PI = 3 * Math.PI, p.exports = t;
|
|
701
701
|
},
|
|
702
702
|
/* 9 */
|
|
703
703
|
/***/
|
|
704
704
|
function(p, T, y) {
|
|
705
|
-
function
|
|
705
|
+
function i() {
|
|
706
706
|
}
|
|
707
|
-
|
|
707
|
+
i.sign = function(t) {
|
|
708
708
|
return t > 0 ? 1 : t < 0 ? -1 : 0;
|
|
709
|
-
},
|
|
709
|
+
}, i.floor = function(t) {
|
|
710
710
|
return t < 0 ? Math.ceil(t) : Math.floor(t);
|
|
711
|
-
},
|
|
711
|
+
}, i.ceil = function(t) {
|
|
712
712
|
return t < 0 ? Math.floor(t) : Math.ceil(t);
|
|
713
|
-
}, p.exports =
|
|
713
|
+
}, p.exports = i;
|
|
714
714
|
},
|
|
715
715
|
/* 10 */
|
|
716
716
|
/***/
|
|
717
717
|
function(p, T, y) {
|
|
718
|
-
function
|
|
718
|
+
function i() {
|
|
719
719
|
}
|
|
720
|
-
|
|
720
|
+
i.MAX_VALUE = 2147483647, i.MIN_VALUE = -2147483648, p.exports = i;
|
|
721
721
|
},
|
|
722
722
|
/* 11 */
|
|
723
723
|
/***/
|
|
724
724
|
function(p, T, y) {
|
|
725
|
-
var
|
|
725
|
+
var i = /* @__PURE__ */ function() {
|
|
726
726
|
function s(f, o) {
|
|
727
727
|
for (var d = 0; d < o.length; d++) {
|
|
728
728
|
var c = o[d];
|
|
@@ -739,7 +739,7 @@ function Rt() {
|
|
|
739
739
|
}
|
|
740
740
|
var e = function(s) {
|
|
741
741
|
return { value: s, next: null, prev: null };
|
|
742
|
-
},
|
|
742
|
+
}, r = function(s, f, o, d) {
|
|
743
743
|
return s !== null ? s.next = f : d.head = f, o !== null ? o.prev = f : d.tail = f, f.prev = s, f.next = o, d.length++, f;
|
|
744
744
|
}, a = function(s, f) {
|
|
745
745
|
var o = s.prev, d = s.next;
|
|
@@ -751,7 +751,7 @@ function Rt() {
|
|
|
751
751
|
return o.push(d);
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
|
-
return
|
|
754
|
+
return i(s, [{
|
|
755
755
|
key: "size",
|
|
756
756
|
value: function() {
|
|
757
757
|
return this.length;
|
|
@@ -759,32 +759,32 @@ function Rt() {
|
|
|
759
759
|
}, {
|
|
760
760
|
key: "insertBefore",
|
|
761
761
|
value: function(f, o) {
|
|
762
|
-
return
|
|
762
|
+
return r(o.prev, e(f), o, this);
|
|
763
763
|
}
|
|
764
764
|
}, {
|
|
765
765
|
key: "insertAfter",
|
|
766
766
|
value: function(f, o) {
|
|
767
|
-
return
|
|
767
|
+
return r(o, e(f), o.next, this);
|
|
768
768
|
}
|
|
769
769
|
}, {
|
|
770
770
|
key: "insertNodeBefore",
|
|
771
771
|
value: function(f, o) {
|
|
772
|
-
return
|
|
772
|
+
return r(o.prev, f, o, this);
|
|
773
773
|
}
|
|
774
774
|
}, {
|
|
775
775
|
key: "insertNodeAfter",
|
|
776
776
|
value: function(f, o) {
|
|
777
|
-
return
|
|
777
|
+
return r(o, f, o.next, this);
|
|
778
778
|
}
|
|
779
779
|
}, {
|
|
780
780
|
key: "push",
|
|
781
781
|
value: function(f) {
|
|
782
|
-
return
|
|
782
|
+
return r(this.tail, e(f), null, this);
|
|
783
783
|
}
|
|
784
784
|
}, {
|
|
785
785
|
key: "unshift",
|
|
786
786
|
value: function(f) {
|
|
787
|
-
return
|
|
787
|
+
return r(null, e(f), this.head, this);
|
|
788
788
|
}
|
|
789
789
|
}, {
|
|
790
790
|
key: "remove",
|
|
@@ -836,81 +836,81 @@ function Rt() {
|
|
|
836
836
|
/* 12 */
|
|
837
837
|
/***/
|
|
838
838
|
function(p, T, y) {
|
|
839
|
-
function
|
|
840
|
-
this.x = null, this.y = null, t == null && e == null &&
|
|
839
|
+
function i(t, e, r) {
|
|
840
|
+
this.x = null, this.y = null, t == null && e == null && r == null ? (this.x = 0, this.y = 0) : typeof t == "number" && typeof e == "number" && r == null ? (this.x = t, this.y = e) : t.constructor.name == "Point" && e == null && r == null && (r = t, this.x = r.x, this.y = r.y);
|
|
841
841
|
}
|
|
842
|
-
|
|
842
|
+
i.prototype.getX = function() {
|
|
843
843
|
return this.x;
|
|
844
|
-
},
|
|
844
|
+
}, i.prototype.getY = function() {
|
|
845
845
|
return this.y;
|
|
846
|
-
},
|
|
847
|
-
return new
|
|
848
|
-
},
|
|
849
|
-
t.constructor.name == "Point" && e == null &&
|
|
850
|
-
},
|
|
846
|
+
}, i.prototype.getLocation = function() {
|
|
847
|
+
return new i(this.x, this.y);
|
|
848
|
+
}, i.prototype.setLocation = function(t, e, r) {
|
|
849
|
+
t.constructor.name == "Point" && e == null && r == null ? (r = t, this.setLocation(r.x, r.y)) : typeof t == "number" && typeof e == "number" && r == null && (parseInt(t) == t && parseInt(e) == e ? this.move(t, e) : (this.x = Math.floor(t + 0.5), this.y = Math.floor(e + 0.5)));
|
|
850
|
+
}, i.prototype.move = function(t, e) {
|
|
851
851
|
this.x = t, this.y = e;
|
|
852
|
-
},
|
|
852
|
+
}, i.prototype.translate = function(t, e) {
|
|
853
853
|
this.x += t, this.y += e;
|
|
854
|
-
},
|
|
854
|
+
}, i.prototype.equals = function(t) {
|
|
855
855
|
if (t.constructor.name == "Point") {
|
|
856
856
|
var e = t;
|
|
857
857
|
return this.x == e.x && this.y == e.y;
|
|
858
858
|
}
|
|
859
859
|
return this == t;
|
|
860
|
-
},
|
|
861
|
-
return new
|
|
862
|
-
}, p.exports =
|
|
860
|
+
}, i.prototype.toString = function() {
|
|
861
|
+
return new i().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
|
|
862
|
+
}, p.exports = i;
|
|
863
863
|
},
|
|
864
864
|
/* 13 */
|
|
865
865
|
/***/
|
|
866
866
|
function(p, T, y) {
|
|
867
|
-
function
|
|
868
|
-
this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null && e != null &&
|
|
867
|
+
function i(t, e, r, a) {
|
|
868
|
+
this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null && e != null && r != null && a != null && (this.x = t, this.y = e, this.width = r, this.height = a);
|
|
869
869
|
}
|
|
870
|
-
|
|
870
|
+
i.prototype.getX = function() {
|
|
871
871
|
return this.x;
|
|
872
|
-
},
|
|
872
|
+
}, i.prototype.setX = function(t) {
|
|
873
873
|
this.x = t;
|
|
874
|
-
},
|
|
874
|
+
}, i.prototype.getY = function() {
|
|
875
875
|
return this.y;
|
|
876
|
-
},
|
|
876
|
+
}, i.prototype.setY = function(t) {
|
|
877
877
|
this.y = t;
|
|
878
|
-
},
|
|
878
|
+
}, i.prototype.getWidth = function() {
|
|
879
879
|
return this.width;
|
|
880
|
-
},
|
|
880
|
+
}, i.prototype.setWidth = function(t) {
|
|
881
881
|
this.width = t;
|
|
882
|
-
},
|
|
882
|
+
}, i.prototype.getHeight = function() {
|
|
883
883
|
return this.height;
|
|
884
|
-
},
|
|
884
|
+
}, i.prototype.setHeight = function(t) {
|
|
885
885
|
this.height = t;
|
|
886
|
-
},
|
|
886
|
+
}, i.prototype.getRight = function() {
|
|
887
887
|
return this.x + this.width;
|
|
888
|
-
},
|
|
888
|
+
}, i.prototype.getBottom = function() {
|
|
889
889
|
return this.y + this.height;
|
|
890
|
-
},
|
|
890
|
+
}, i.prototype.intersects = function(t) {
|
|
891
891
|
return !(this.getRight() < t.x || this.getBottom() < t.y || t.getRight() < this.x || t.getBottom() < this.y);
|
|
892
|
-
},
|
|
892
|
+
}, i.prototype.getCenterX = function() {
|
|
893
893
|
return this.x + this.width / 2;
|
|
894
|
-
},
|
|
894
|
+
}, i.prototype.getMinX = function() {
|
|
895
895
|
return this.getX();
|
|
896
|
-
},
|
|
896
|
+
}, i.prototype.getMaxX = function() {
|
|
897
897
|
return this.getX() + this.width;
|
|
898
|
-
},
|
|
898
|
+
}, i.prototype.getCenterY = function() {
|
|
899
899
|
return this.y + this.height / 2;
|
|
900
|
-
},
|
|
900
|
+
}, i.prototype.getMinY = function() {
|
|
901
901
|
return this.getY();
|
|
902
|
-
},
|
|
902
|
+
}, i.prototype.getMaxY = function() {
|
|
903
903
|
return this.getY() + this.height;
|
|
904
|
-
},
|
|
904
|
+
}, i.prototype.getWidthHalf = function() {
|
|
905
905
|
return this.width / 2;
|
|
906
|
-
},
|
|
906
|
+
}, i.prototype.getHeightHalf = function() {
|
|
907
907
|
return this.height / 2;
|
|
908
|
-
}, p.exports =
|
|
908
|
+
}, p.exports = i;
|
|
909
909
|
},
|
|
910
910
|
/* 14 */
|
|
911
911
|
/***/
|
|
912
912
|
function(p, T, y) {
|
|
913
|
-
var
|
|
913
|
+
var i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
914
914
|
return typeof e;
|
|
915
915
|
} : function(e) {
|
|
916
916
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
@@ -922,22 +922,22 @@ function Rt() {
|
|
|
922
922
|
}, t.getString = function(e) {
|
|
923
923
|
return e == null && (e = t.lastID), "Object#" + e;
|
|
924
924
|
}, t.isPrimitive = function(e) {
|
|
925
|
-
var
|
|
926
|
-
return e == null ||
|
|
925
|
+
var r = typeof e > "u" ? "undefined" : i(e);
|
|
926
|
+
return e == null || r != "object" && r != "function";
|
|
927
927
|
}, p.exports = t;
|
|
928
928
|
},
|
|
929
929
|
/* 15 */
|
|
930
930
|
/***/
|
|
931
931
|
function(p, T, y) {
|
|
932
|
-
function
|
|
932
|
+
function i(c) {
|
|
933
933
|
if (Array.isArray(c)) {
|
|
934
|
-
for (var E = 0,
|
|
935
|
-
|
|
936
|
-
return
|
|
934
|
+
for (var E = 0, m = Array(c.length); E < c.length; E++)
|
|
935
|
+
m[E] = c[E];
|
|
936
|
+
return m;
|
|
937
937
|
} else
|
|
938
938
|
return Array.from(c);
|
|
939
939
|
}
|
|
940
|
-
var t = y(0), e = y(6),
|
|
940
|
+
var t = y(0), e = y(6), r = y(3), a = y(1), h = y(5), s = y(4), f = y(17), o = y(27);
|
|
941
941
|
function d(c) {
|
|
942
942
|
o.call(this), this.layoutQuality = t.QUALITY, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = t.DEFAULT_INCREMENTAL, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new e(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, c != null && (this.isRemoteUse = c);
|
|
943
943
|
}
|
|
@@ -955,7 +955,7 @@ function Rt() {
|
|
|
955
955
|
}, d.prototype.newGraph = function(c) {
|
|
956
956
|
return new h(null, this.graphManager, c);
|
|
957
957
|
}, d.prototype.newNode = function(c) {
|
|
958
|
-
return new
|
|
958
|
+
return new r(this.graphManager, c);
|
|
959
959
|
}, d.prototype.newEdge = function(c) {
|
|
960
960
|
return new a(null, null, c);
|
|
961
961
|
}, d.prototype.checkLayoutSuccess = function() {
|
|
@@ -970,33 +970,33 @@ function Rt() {
|
|
|
970
970
|
if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
|
|
971
971
|
for (var c = this.graphManager.getAllEdges(), E = 0; E < c.length; E++)
|
|
972
972
|
c[E];
|
|
973
|
-
for (var
|
|
974
|
-
|
|
973
|
+
for (var m = this.graphManager.getRoot().getNodes(), E = 0; E < m.length; E++)
|
|
974
|
+
m[E];
|
|
975
975
|
this.update(this.graphManager.getRoot());
|
|
976
976
|
}
|
|
977
977
|
}, d.prototype.update = function(c) {
|
|
978
978
|
if (c == null)
|
|
979
979
|
this.update2();
|
|
980
|
-
else if (c instanceof
|
|
980
|
+
else if (c instanceof r) {
|
|
981
981
|
var E = c;
|
|
982
982
|
if (E.getChild() != null)
|
|
983
|
-
for (var
|
|
984
|
-
update(
|
|
983
|
+
for (var m = E.getChild().getNodes(), v = 0; v < m.length; v++)
|
|
984
|
+
update(m[v]);
|
|
985
985
|
if (E.vGraphObject != null) {
|
|
986
986
|
var N = E.vGraphObject;
|
|
987
987
|
N.update(E);
|
|
988
988
|
}
|
|
989
989
|
} else if (c instanceof a) {
|
|
990
|
-
var
|
|
991
|
-
if (
|
|
992
|
-
var g =
|
|
993
|
-
g.update(
|
|
990
|
+
var D = c;
|
|
991
|
+
if (D.vGraphObject != null) {
|
|
992
|
+
var g = D.vGraphObject;
|
|
993
|
+
g.update(D);
|
|
994
994
|
}
|
|
995
995
|
} else if (c instanceof h) {
|
|
996
|
-
var
|
|
997
|
-
if (
|
|
998
|
-
var n =
|
|
999
|
-
n.update(
|
|
996
|
+
var L = c;
|
|
997
|
+
if (L.vGraphObject != null) {
|
|
998
|
+
var n = L.vGraphObject;
|
|
999
|
+
n.update(L);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
}, d.prototype.initParameters = function() {
|
|
@@ -1005,34 +1005,34 @@ function Rt() {
|
|
|
1005
1005
|
if (c == null)
|
|
1006
1006
|
this.transform(new s(0, 0));
|
|
1007
1007
|
else {
|
|
1008
|
-
var E = new f(),
|
|
1009
|
-
if (
|
|
1010
|
-
E.setWorldOrgX(c.x), E.setWorldOrgY(c.y), E.setDeviceOrgX(
|
|
1011
|
-
for (var
|
|
1012
|
-
N =
|
|
1008
|
+
var E = new f(), m = this.graphManager.getRoot().updateLeftTop();
|
|
1009
|
+
if (m != null) {
|
|
1010
|
+
E.setWorldOrgX(c.x), E.setWorldOrgY(c.y), E.setDeviceOrgX(m.x), E.setDeviceOrgY(m.y);
|
|
1011
|
+
for (var v = this.getAllNodes(), N, D = 0; D < v.length; D++)
|
|
1012
|
+
N = v[D], N.transform(E);
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
}, d.prototype.positionNodesRandomly = function(c) {
|
|
1016
1016
|
if (c == null)
|
|
1017
1017
|
this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
|
|
1018
1018
|
else
|
|
1019
|
-
for (var E,
|
|
1020
|
-
E =
|
|
1019
|
+
for (var E, m, v = c.getNodes(), N = 0; N < v.length; N++)
|
|
1020
|
+
E = v[N], m = E.getChild(), m == null || m.getNodes().length == 0 ? E.scatter() : (this.positionNodesRandomly(m), E.updateBounds());
|
|
1021
1021
|
}, d.prototype.getFlatForest = function() {
|
|
1022
|
-
for (var c = [], E = !0,
|
|
1023
|
-
|
|
1024
|
-
if (!
|
|
1022
|
+
for (var c = [], E = !0, m = this.graphManager.getRoot().getNodes(), v = !0, N = 0; N < m.length; N++)
|
|
1023
|
+
m[N].getChild() != null && (v = !1);
|
|
1024
|
+
if (!v)
|
|
1025
1025
|
return c;
|
|
1026
|
-
var
|
|
1027
|
-
for (n = n.concat(
|
|
1026
|
+
var D = /* @__PURE__ */ new Set(), g = [], L = /* @__PURE__ */ new Map(), n = [];
|
|
1027
|
+
for (n = n.concat(m); n.length > 0 && E; ) {
|
|
1028
1028
|
for (g.push(n[0]); g.length > 0 && E; ) {
|
|
1029
1029
|
var u = g[0];
|
|
1030
|
-
g.splice(0, 1),
|
|
1030
|
+
g.splice(0, 1), D.add(u);
|
|
1031
1031
|
for (var l = u.getEdges(), N = 0; N < l.length; N++) {
|
|
1032
|
-
var
|
|
1033
|
-
if (
|
|
1034
|
-
if (!
|
|
1035
|
-
g.push(
|
|
1032
|
+
var _ = l[N].getOtherEnd(u);
|
|
1033
|
+
if (L.get(u) != _)
|
|
1034
|
+
if (!D.has(_))
|
|
1035
|
+
g.push(_), L.set(_, u);
|
|
1036
1036
|
else {
|
|
1037
1037
|
E = !1;
|
|
1038
1038
|
break;
|
|
@@ -1042,80 +1042,80 @@ function Rt() {
|
|
|
1042
1042
|
if (!E)
|
|
1043
1043
|
c = [];
|
|
1044
1044
|
else {
|
|
1045
|
-
var A = [].concat(
|
|
1045
|
+
var A = [].concat(i(D));
|
|
1046
1046
|
c.push(A);
|
|
1047
1047
|
for (var N = 0; N < A.length; N++) {
|
|
1048
|
-
var
|
|
1049
|
-
|
|
1048
|
+
var I = A[N], w = n.indexOf(I);
|
|
1049
|
+
w > -1 && n.splice(w, 1);
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1051
|
+
D = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map();
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
return c;
|
|
1055
1055
|
}, d.prototype.createDummyNodesForBendpoints = function(c) {
|
|
1056
|
-
for (var E = [],
|
|
1057
|
-
var
|
|
1058
|
-
|
|
1056
|
+
for (var E = [], m = c.source, v = this.graphManager.calcLowestCommonAncestor(c.source, c.target), N = 0; N < c.bendpoints.length; N++) {
|
|
1057
|
+
var D = this.newNode(null);
|
|
1058
|
+
D.setRect(new Point(0, 0), new Dimension(1, 1)), v.add(D);
|
|
1059
1059
|
var g = this.newEdge(null);
|
|
1060
|
-
this.graphManager.add(g,
|
|
1060
|
+
this.graphManager.add(g, m, D), E.add(D), m = D;
|
|
1061
1061
|
}
|
|
1062
1062
|
var g = this.newEdge(null);
|
|
1063
|
-
return this.graphManager.add(g,
|
|
1063
|
+
return this.graphManager.add(g, m, c.target), this.edgeToDummyNodes.set(c, E), c.isInterGraph() ? this.graphManager.remove(c) : v.remove(c), E;
|
|
1064
1064
|
}, d.prototype.createBendpointsFromDummyNodes = function() {
|
|
1065
1065
|
var c = [];
|
|
1066
|
-
c = c.concat(this.graphManager.getAllEdges()), c = [].concat(
|
|
1066
|
+
c = c.concat(this.graphManager.getAllEdges()), c = [].concat(i(this.edgeToDummyNodes.keys())).concat(c);
|
|
1067
1067
|
for (var E = 0; E < c.length; E++) {
|
|
1068
|
-
var
|
|
1069
|
-
if (
|
|
1070
|
-
for (var
|
|
1071
|
-
var
|
|
1072
|
-
|
|
1068
|
+
var m = c[E];
|
|
1069
|
+
if (m.bendpoints.length > 0) {
|
|
1070
|
+
for (var v = this.edgeToDummyNodes.get(m), N = 0; N < v.length; N++) {
|
|
1071
|
+
var D = v[N], g = new s(D.getCenterX(), D.getCenterY()), L = m.bendpoints.get(N);
|
|
1072
|
+
L.x = g.x, L.y = g.y, D.getOwner().remove(D);
|
|
1073
1073
|
}
|
|
1074
|
-
this.graphManager.add(
|
|
1074
|
+
this.graphManager.add(m, m.source, m.target);
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
}, d.transform = function(c, E,
|
|
1078
|
-
if (
|
|
1077
|
+
}, d.transform = function(c, E, m, v) {
|
|
1078
|
+
if (m != null && v != null) {
|
|
1079
1079
|
var N = E;
|
|
1080
1080
|
if (c <= 50) {
|
|
1081
|
-
var
|
|
1082
|
-
N -= (E -
|
|
1081
|
+
var D = E / m;
|
|
1082
|
+
N -= (E - D) / 50 * (50 - c);
|
|
1083
1083
|
} else {
|
|
1084
|
-
var g = E *
|
|
1084
|
+
var g = E * v;
|
|
1085
1085
|
N += (g - E) / 50 * (c - 50);
|
|
1086
1086
|
}
|
|
1087
1087
|
return N;
|
|
1088
1088
|
} else {
|
|
1089
|
-
var
|
|
1090
|
-
return c <= 50 ? (
|
|
1089
|
+
var L, n;
|
|
1090
|
+
return c <= 50 ? (L = 9 * E / 500, n = E / 10) : (L = 9 * E / 50, n = -8 * E), L * c + n;
|
|
1091
1091
|
}
|
|
1092
1092
|
}, d.findCenterOfTree = function(c) {
|
|
1093
1093
|
var E = [];
|
|
1094
1094
|
E = E.concat(c);
|
|
1095
|
-
var
|
|
1096
|
-
(E.length == 1 || E.length == 2) && (N = !0,
|
|
1095
|
+
var m = [], v = /* @__PURE__ */ new Map(), N = !1, D = null;
|
|
1096
|
+
(E.length == 1 || E.length == 2) && (N = !0, D = E[0]);
|
|
1097
1097
|
for (var g = 0; g < E.length; g++) {
|
|
1098
|
-
var
|
|
1099
|
-
|
|
1098
|
+
var L = E[g], n = L.getNeighborsList().size;
|
|
1099
|
+
v.set(L, L.getNeighborsList().size), n == 1 && m.push(L);
|
|
1100
1100
|
}
|
|
1101
1101
|
var u = [];
|
|
1102
|
-
for (u = u.concat(
|
|
1102
|
+
for (u = u.concat(m); !N; ) {
|
|
1103
1103
|
var l = [];
|
|
1104
1104
|
l = l.concat(u), u = [];
|
|
1105
1105
|
for (var g = 0; g < E.length; g++) {
|
|
1106
|
-
var
|
|
1107
|
-
|
|
1108
|
-
var A =
|
|
1109
|
-
A.forEach(function(
|
|
1110
|
-
if (
|
|
1111
|
-
var
|
|
1112
|
-
U == 1 && u.push(
|
|
1106
|
+
var L = E[g], _ = E.indexOf(L);
|
|
1107
|
+
_ >= 0 && E.splice(_, 1);
|
|
1108
|
+
var A = L.getNeighborsList();
|
|
1109
|
+
A.forEach(function(R) {
|
|
1110
|
+
if (m.indexOf(R) < 0) {
|
|
1111
|
+
var S = v.get(R), U = S - 1;
|
|
1112
|
+
U == 1 && u.push(R), v.set(R, U);
|
|
1113
1113
|
}
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
|
-
|
|
1116
|
+
m = m.concat(u), (E.length == 1 || E.length == 2) && (N = !0, D = E[0]);
|
|
1117
1117
|
}
|
|
1118
|
-
return
|
|
1118
|
+
return D;
|
|
1119
1119
|
}, d.prototype.setGraphManager = function(c) {
|
|
1120
1120
|
this.graphManager = c;
|
|
1121
1121
|
}, p.exports = d;
|
|
@@ -1123,17 +1123,17 @@ function Rt() {
|
|
|
1123
1123
|
/* 16 */
|
|
1124
1124
|
/***/
|
|
1125
1125
|
function(p, T, y) {
|
|
1126
|
-
function
|
|
1126
|
+
function i() {
|
|
1127
1127
|
}
|
|
1128
|
-
|
|
1129
|
-
return
|
|
1130
|
-
}, p.exports =
|
|
1128
|
+
i.seed = 1, i.x = 0, i.nextDouble = function() {
|
|
1129
|
+
return i.x = Math.sin(i.seed++) * 1e4, i.x - Math.floor(i.x);
|
|
1130
|
+
}, p.exports = i;
|
|
1131
1131
|
},
|
|
1132
1132
|
/* 17 */
|
|
1133
1133
|
/***/
|
|
1134
1134
|
function(p, T, y) {
|
|
1135
|
-
var
|
|
1136
|
-
function t(e,
|
|
1135
|
+
var i = y(4);
|
|
1136
|
+
function t(e, r) {
|
|
1137
1137
|
this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
|
|
1138
1138
|
}
|
|
1139
1139
|
t.prototype.getWorldOrgX = function() {
|
|
@@ -1169,26 +1169,26 @@ function Rt() {
|
|
|
1169
1169
|
}, t.prototype.setDeviceExtY = function(e) {
|
|
1170
1170
|
this.ldeviceExtY = e;
|
|
1171
1171
|
}, t.prototype.transformX = function(e) {
|
|
1172
|
-
var
|
|
1173
|
-
return a != 0 && (
|
|
1172
|
+
var r = 0, a = this.lworldExtX;
|
|
1173
|
+
return a != 0 && (r = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / a), r;
|
|
1174
1174
|
}, t.prototype.transformY = function(e) {
|
|
1175
|
-
var
|
|
1176
|
-
return a != 0 && (
|
|
1175
|
+
var r = 0, a = this.lworldExtY;
|
|
1176
|
+
return a != 0 && (r = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / a), r;
|
|
1177
1177
|
}, t.prototype.inverseTransformX = function(e) {
|
|
1178
|
-
var
|
|
1179
|
-
return a != 0 && (
|
|
1178
|
+
var r = 0, a = this.ldeviceExtX;
|
|
1179
|
+
return a != 0 && (r = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / a), r;
|
|
1180
1180
|
}, t.prototype.inverseTransformY = function(e) {
|
|
1181
|
-
var
|
|
1182
|
-
return a != 0 && (
|
|
1181
|
+
var r = 0, a = this.ldeviceExtY;
|
|
1182
|
+
return a != 0 && (r = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / a), r;
|
|
1183
1183
|
}, t.prototype.inverseTransformPoint = function(e) {
|
|
1184
|
-
var
|
|
1185
|
-
return
|
|
1184
|
+
var r = new i(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
|
|
1185
|
+
return r;
|
|
1186
1186
|
}, p.exports = t;
|
|
1187
1187
|
},
|
|
1188
1188
|
/* 18 */
|
|
1189
1189
|
/***/
|
|
1190
1190
|
function(p, T, y) {
|
|
1191
|
-
function
|
|
1191
|
+
function i(o) {
|
|
1192
1192
|
if (Array.isArray(o)) {
|
|
1193
1193
|
for (var d = 0, c = Array(o.length); d < o.length; d++)
|
|
1194
1194
|
c[d] = o[d];
|
|
@@ -1196,7 +1196,7 @@ function Rt() {
|
|
|
1196
1196
|
} else
|
|
1197
1197
|
return Array.from(o);
|
|
1198
1198
|
}
|
|
1199
|
-
var t = y(15), e = y(7),
|
|
1199
|
+
var t = y(15), e = y(7), r = y(0), a = y(8), h = y(9);
|
|
1200
1200
|
function s() {
|
|
1201
1201
|
t.call(this), this.useSmartIdealEdgeLengthCalculation = e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = e.DEFAULT_EDGE_LENGTH, this.springConstant = e.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = e.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = e.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = e.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * e.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = e.MAX_ITERATIONS;
|
|
1202
1202
|
}
|
|
@@ -1206,8 +1206,8 @@ function Rt() {
|
|
|
1206
1206
|
s.prototype.initParameters = function() {
|
|
1207
1207
|
t.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
|
|
1208
1208
|
}, s.prototype.calcIdealEdgeLengths = function() {
|
|
1209
|
-
for (var o, d, c, E,
|
|
1210
|
-
o = N[
|
|
1209
|
+
for (var o, d, c, E, m, v, N = this.getGraphManager().getAllEdges(), D = 0; D < N.length; D++)
|
|
1210
|
+
o = N[D], o.idealLength = this.idealEdgeLength, o.isInterGraph && (c = o.getSource(), E = o.getTarget(), m = o.getSourceInLca().getEstimatedSize(), v = o.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (o.idealLength += m + v - 2 * r.SIMPLE_NODE_SIZE), d = o.getLca().getInclusionTreeDepth(), o.idealLength += e.DEFAULT_EDGE_LENGTH * e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + E.getInclusionTreeDepth() - 2 * d));
|
|
1211
1211
|
}, s.prototype.initSpringEmbedder = function() {
|
|
1212
1212
|
var o = this.getAllNodes().length;
|
|
1213
1213
|
this.incremental ? (o > e.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * e.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (o - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - e.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (o > e.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(e.COOLING_ADAPTATION_FACTOR, 1 - (o - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * (1 - e.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
|
|
@@ -1215,14 +1215,14 @@ function Rt() {
|
|
|
1215
1215
|
for (var o = this.getAllEdges(), d, c = 0; c < o.length; c++)
|
|
1216
1216
|
d = o[c], this.calcSpringForce(d, d.idealLength);
|
|
1217
1217
|
}, s.prototype.calcRepulsionForces = function() {
|
|
1218
|
-
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c, E,
|
|
1218
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c, E, m, v, N = this.getAllNodes(), D;
|
|
1219
1219
|
if (this.useFRGridVariant)
|
|
1220
|
-
for (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && o && this.updateGrid(),
|
|
1221
|
-
|
|
1220
|
+
for (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && o && this.updateGrid(), D = /* @__PURE__ */ new Set(), c = 0; c < N.length; c++)
|
|
1221
|
+
m = N[c], this.calculateRepulsionForceOfANode(m, D, o, d), D.add(m);
|
|
1222
1222
|
else
|
|
1223
1223
|
for (c = 0; c < N.length; c++)
|
|
1224
|
-
for (
|
|
1225
|
-
|
|
1224
|
+
for (m = N[c], E = c + 1; E < N.length; E++)
|
|
1225
|
+
v = N[E], m.getOwner() == v.getOwner() && this.calcRepulsionForce(m, v);
|
|
1226
1226
|
}, s.prototype.calcGravitationalForces = function() {
|
|
1227
1227
|
for (var o, d = this.getAllNodesToApplyGravitation(), c = 0; c < d.length; c++)
|
|
1228
1228
|
o = d[c], this.calcGravitationalForce(o);
|
|
@@ -1230,23 +1230,23 @@ function Rt() {
|
|
|
1230
1230
|
for (var o = this.getAllNodes(), d, c = 0; c < o.length; c++)
|
|
1231
1231
|
d = o[c], d.move();
|
|
1232
1232
|
}, s.prototype.calcSpringForce = function(o, d) {
|
|
1233
|
-
var c = o.getSource(), E = o.getTarget(),
|
|
1233
|
+
var c = o.getSource(), E = o.getTarget(), m, v, N, D;
|
|
1234
1234
|
if (this.uniformLeafNodeSizes && c.getChild() == null && E.getChild() == null)
|
|
1235
1235
|
o.updateLengthSimple();
|
|
1236
1236
|
else if (o.updateLength(), o.isOverlapingSourceAndTarget)
|
|
1237
1237
|
return;
|
|
1238
|
-
|
|
1238
|
+
m = o.getLength(), m != 0 && (v = this.springConstant * (m - d), N = v * (o.lengthX / m), D = v * (o.lengthY / m), c.springForceX += N, c.springForceY += D, E.springForceX -= N, E.springForceY -= D);
|
|
1239
1239
|
}, s.prototype.calcRepulsionForce = function(o, d) {
|
|
1240
|
-
var c = o.getRect(), E = d.getRect(),
|
|
1240
|
+
var c = o.getRect(), E = d.getRect(), m = new Array(2), v = new Array(4), N, D, g, L, n, u, l;
|
|
1241
1241
|
if (c.intersects(E)) {
|
|
1242
|
-
a.calcSeparationAmount(c, E,
|
|
1243
|
-
var
|
|
1244
|
-
o.repulsionForceX -=
|
|
1242
|
+
a.calcSeparationAmount(c, E, m, e.DEFAULT_EDGE_LENGTH / 2), u = 2 * m[0], l = 2 * m[1];
|
|
1243
|
+
var _ = o.noOfChildren * d.noOfChildren / (o.noOfChildren + d.noOfChildren);
|
|
1244
|
+
o.repulsionForceX -= _ * u, o.repulsionForceY -= _ * l, d.repulsionForceX += _ * u, d.repulsionForceY += _ * l;
|
|
1245
1245
|
} else
|
|
1246
|
-
this.uniformLeafNodeSizes && o.getChild() == null && d.getChild() == null ? (N = E.getCenterX() - c.getCenterX(),
|
|
1246
|
+
this.uniformLeafNodeSizes && o.getChild() == null && d.getChild() == null ? (N = E.getCenterX() - c.getCenterX(), D = E.getCenterY() - c.getCenterY()) : (a.getIntersection(c, E, v), N = v[2] - v[0], D = v[3] - v[1]), Math.abs(N) < e.MIN_REPULSION_DIST && (N = h.sign(N) * e.MIN_REPULSION_DIST), Math.abs(D) < e.MIN_REPULSION_DIST && (D = h.sign(D) * e.MIN_REPULSION_DIST), g = N * N + D * D, L = Math.sqrt(g), n = this.repulsionConstant * o.noOfChildren * d.noOfChildren / g, u = n * N / L, l = n * D / L, o.repulsionForceX -= u, o.repulsionForceY -= l, d.repulsionForceX += u, d.repulsionForceY += l;
|
|
1247
1247
|
}, s.prototype.calcGravitationalForce = function(o) {
|
|
1248
|
-
var d, c, E,
|
|
1249
|
-
d = o.getOwner(), c = (d.getRight() + d.getLeft()) / 2, E = (d.getTop() + d.getBottom()) / 2,
|
|
1248
|
+
var d, c, E, m, v, N, D, g;
|
|
1249
|
+
d = o.getOwner(), c = (d.getRight() + d.getLeft()) / 2, E = (d.getTop() + d.getBottom()) / 2, m = o.getCenterX() - c, v = o.getCenterY() - E, N = Math.abs(m) + o.getWidth() / 2, D = Math.abs(v) + o.getHeight() / 2, o.getOwner() == this.graphManager.getRoot() ? (g = d.getEstimatedSize() * this.gravityRangeFactor, (N > g || D > g) && (o.gravitationForceX = -this.gravityConstant * m, o.gravitationForceY = -this.gravityConstant * v)) : (g = d.getEstimatedSize() * this.compoundGravityRangeFactor, (N > g || D > g) && (o.gravitationForceX = -this.gravityConstant * m * this.compoundGravityConstant, o.gravitationForceY = -this.gravityConstant * v * this.compoundGravityConstant));
|
|
1250
1250
|
}, s.prototype.isConverged = function() {
|
|
1251
1251
|
var o, d = !1;
|
|
1252
1252
|
return this.totalIterations > this.maxIterations / 3 && (d = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), o = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, o || d;
|
|
@@ -1258,39 +1258,39 @@ function Rt() {
|
|
|
1258
1258
|
}, s.prototype.calcGrid = function(o) {
|
|
1259
1259
|
var d = 0, c = 0;
|
|
1260
1260
|
d = parseInt(Math.ceil((o.getRight() - o.getLeft()) / this.repulsionRange)), c = parseInt(Math.ceil((o.getBottom() - o.getTop()) / this.repulsionRange));
|
|
1261
|
-
for (var E = new Array(d),
|
|
1262
|
-
E[
|
|
1263
|
-
for (var
|
|
1264
|
-
for (var
|
|
1265
|
-
E[
|
|
1261
|
+
for (var E = new Array(d), m = 0; m < d; m++)
|
|
1262
|
+
E[m] = new Array(c);
|
|
1263
|
+
for (var m = 0; m < d; m++)
|
|
1264
|
+
for (var v = 0; v < c; v++)
|
|
1265
|
+
E[m][v] = new Array();
|
|
1266
1266
|
return E;
|
|
1267
1267
|
}, s.prototype.addNodeToGrid = function(o, d, c) {
|
|
1268
|
-
var E = 0,
|
|
1269
|
-
E = parseInt(Math.floor((o.getRect().x - d) / this.repulsionRange)),
|
|
1270
|
-
for (var
|
|
1271
|
-
for (var g =
|
|
1272
|
-
this.grid[
|
|
1268
|
+
var E = 0, m = 0, v = 0, N = 0;
|
|
1269
|
+
E = parseInt(Math.floor((o.getRect().x - d) / this.repulsionRange)), m = parseInt(Math.floor((o.getRect().width + o.getRect().x - d) / this.repulsionRange)), v = parseInt(Math.floor((o.getRect().y - c) / this.repulsionRange)), N = parseInt(Math.floor((o.getRect().height + o.getRect().y - c) / this.repulsionRange));
|
|
1270
|
+
for (var D = E; D <= m; D++)
|
|
1271
|
+
for (var g = v; g <= N; g++)
|
|
1272
|
+
this.grid[D][g].push(o), o.setGridCoordinates(E, m, v, N);
|
|
1273
1273
|
}, s.prototype.updateGrid = function() {
|
|
1274
1274
|
var o, d, c = this.getAllNodes();
|
|
1275
1275
|
for (this.grid = this.calcGrid(this.graphManager.getRoot()), o = 0; o < c.length; o++)
|
|
1276
1276
|
d = c[o], this.addNodeToGrid(d, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
|
|
1277
1277
|
}, s.prototype.calculateRepulsionForceOfANode = function(o, d, c, E) {
|
|
1278
1278
|
if (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && c || E) {
|
|
1279
|
-
var
|
|
1279
|
+
var m = /* @__PURE__ */ new Set();
|
|
1280
1280
|
o.surrounding = new Array();
|
|
1281
|
-
for (var
|
|
1281
|
+
for (var v, N = this.grid, D = o.startX - 1; D < o.finishX + 2; D++)
|
|
1282
1282
|
for (var g = o.startY - 1; g < o.finishY + 2; g++)
|
|
1283
|
-
if (!(
|
|
1284
|
-
for (var
|
|
1285
|
-
if (
|
|
1286
|
-
var n = Math.abs(o.getCenterX() -
|
|
1287
|
-
n <= this.repulsionRange && u <= this.repulsionRange &&
|
|
1283
|
+
if (!(D < 0 || g < 0 || D >= N.length || g >= N[0].length)) {
|
|
1284
|
+
for (var L = 0; L < N[D][g].length; L++)
|
|
1285
|
+
if (v = N[D][g][L], !(o.getOwner() != v.getOwner() || o == v) && !d.has(v) && !m.has(v)) {
|
|
1286
|
+
var n = Math.abs(o.getCenterX() - v.getCenterX()) - (o.getWidth() / 2 + v.getWidth() / 2), u = Math.abs(o.getCenterY() - v.getCenterY()) - (o.getHeight() / 2 + v.getHeight() / 2);
|
|
1287
|
+
n <= this.repulsionRange && u <= this.repulsionRange && m.add(v);
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
o.surrounding = [].concat(
|
|
1290
|
+
o.surrounding = [].concat(i(m));
|
|
1291
1291
|
}
|
|
1292
|
-
for (
|
|
1293
|
-
this.calcRepulsionForce(o, o.surrounding[
|
|
1292
|
+
for (D = 0; D < o.surrounding.length; D++)
|
|
1293
|
+
this.calcRepulsionForce(o, o.surrounding[D]);
|
|
1294
1294
|
}, s.prototype.calcRepulsionRange = function() {
|
|
1295
1295
|
return 0;
|
|
1296
1296
|
}, p.exports = s;
|
|
@@ -1298,60 +1298,60 @@ function Rt() {
|
|
|
1298
1298
|
/* 19 */
|
|
1299
1299
|
/***/
|
|
1300
1300
|
function(p, T, y) {
|
|
1301
|
-
var
|
|
1301
|
+
var i = y(1), t = y(7);
|
|
1302
1302
|
function e(a, h, s) {
|
|
1303
|
-
|
|
1303
|
+
i.call(this, a, h, s), this.idealLength = t.DEFAULT_EDGE_LENGTH;
|
|
1304
1304
|
}
|
|
1305
|
-
e.prototype = Object.create(
|
|
1306
|
-
for (var
|
|
1307
|
-
e[
|
|
1305
|
+
e.prototype = Object.create(i.prototype);
|
|
1306
|
+
for (var r in i)
|
|
1307
|
+
e[r] = i[r];
|
|
1308
1308
|
p.exports = e;
|
|
1309
1309
|
},
|
|
1310
1310
|
/* 20 */
|
|
1311
1311
|
/***/
|
|
1312
1312
|
function(p, T, y) {
|
|
1313
|
-
var
|
|
1314
|
-
function t(
|
|
1315
|
-
|
|
1313
|
+
var i = y(3);
|
|
1314
|
+
function t(r, a, h, s) {
|
|
1315
|
+
i.call(this, r, a, h, s), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
|
|
1316
1316
|
}
|
|
1317
|
-
t.prototype = Object.create(
|
|
1318
|
-
for (var e in
|
|
1319
|
-
t[e] =
|
|
1320
|
-
t.prototype.setGridCoordinates = function(
|
|
1321
|
-
this.startX =
|
|
1317
|
+
t.prototype = Object.create(i.prototype);
|
|
1318
|
+
for (var e in i)
|
|
1319
|
+
t[e] = i[e];
|
|
1320
|
+
t.prototype.setGridCoordinates = function(r, a, h, s) {
|
|
1321
|
+
this.startX = r, this.finishX = a, this.startY = h, this.finishY = s;
|
|
1322
1322
|
}, p.exports = t;
|
|
1323
1323
|
},
|
|
1324
1324
|
/* 21 */
|
|
1325
1325
|
/***/
|
|
1326
1326
|
function(p, T, y) {
|
|
1327
|
-
function
|
|
1327
|
+
function i(t, e) {
|
|
1328
1328
|
this.width = 0, this.height = 0, t !== null && e !== null && (this.height = e, this.width = t);
|
|
1329
1329
|
}
|
|
1330
|
-
|
|
1330
|
+
i.prototype.getWidth = function() {
|
|
1331
1331
|
return this.width;
|
|
1332
|
-
},
|
|
1332
|
+
}, i.prototype.setWidth = function(t) {
|
|
1333
1333
|
this.width = t;
|
|
1334
|
-
},
|
|
1334
|
+
}, i.prototype.getHeight = function() {
|
|
1335
1335
|
return this.height;
|
|
1336
|
-
},
|
|
1336
|
+
}, i.prototype.setHeight = function(t) {
|
|
1337
1337
|
this.height = t;
|
|
1338
|
-
}, p.exports =
|
|
1338
|
+
}, p.exports = i;
|
|
1339
1339
|
},
|
|
1340
1340
|
/* 22 */
|
|
1341
1341
|
/***/
|
|
1342
1342
|
function(p, T, y) {
|
|
1343
|
-
var
|
|
1343
|
+
var i = y(14);
|
|
1344
1344
|
function t() {
|
|
1345
1345
|
this.map = {}, this.keys = [];
|
|
1346
1346
|
}
|
|
1347
|
-
t.prototype.put = function(e,
|
|
1348
|
-
var a =
|
|
1349
|
-
this.contains(a) || (this.map[a] =
|
|
1347
|
+
t.prototype.put = function(e, r) {
|
|
1348
|
+
var a = i.createID(e);
|
|
1349
|
+
this.contains(a) || (this.map[a] = r, this.keys.push(e));
|
|
1350
1350
|
}, t.prototype.contains = function(e) {
|
|
1351
|
-
return
|
|
1351
|
+
return i.createID(e), this.map[e] != null;
|
|
1352
1352
|
}, t.prototype.get = function(e) {
|
|
1353
|
-
var
|
|
1354
|
-
return this.map[
|
|
1353
|
+
var r = i.createID(e);
|
|
1354
|
+
return this.map[r];
|
|
1355
1355
|
}, t.prototype.keySet = function() {
|
|
1356
1356
|
return this.keys;
|
|
1357
1357
|
}, p.exports = t;
|
|
@@ -1359,30 +1359,30 @@ function Rt() {
|
|
|
1359
1359
|
/* 23 */
|
|
1360
1360
|
/***/
|
|
1361
1361
|
function(p, T, y) {
|
|
1362
|
-
var
|
|
1362
|
+
var i = y(14);
|
|
1363
1363
|
function t() {
|
|
1364
1364
|
this.set = {};
|
|
1365
1365
|
}
|
|
1366
1366
|
t.prototype.add = function(e) {
|
|
1367
|
-
var
|
|
1368
|
-
this.contains(
|
|
1367
|
+
var r = i.createID(e);
|
|
1368
|
+
this.contains(r) || (this.set[r] = e);
|
|
1369
1369
|
}, t.prototype.remove = function(e) {
|
|
1370
|
-
delete this.set[
|
|
1370
|
+
delete this.set[i.createID(e)];
|
|
1371
1371
|
}, t.prototype.clear = function() {
|
|
1372
1372
|
this.set = {};
|
|
1373
1373
|
}, t.prototype.contains = function(e) {
|
|
1374
|
-
return this.set[
|
|
1374
|
+
return this.set[i.createID(e)] == e;
|
|
1375
1375
|
}, t.prototype.isEmpty = function() {
|
|
1376
1376
|
return this.size() === 0;
|
|
1377
1377
|
}, t.prototype.size = function() {
|
|
1378
1378
|
return Object.keys(this.set).length;
|
|
1379
1379
|
}, t.prototype.addAllTo = function(e) {
|
|
1380
|
-
for (var
|
|
1381
|
-
e.push(this.set[
|
|
1380
|
+
for (var r = Object.keys(this.set), a = r.length, h = 0; h < a; h++)
|
|
1381
|
+
e.push(this.set[r[h]]);
|
|
1382
1382
|
}, t.prototype.size = function() {
|
|
1383
1383
|
return Object.keys(this.set).length;
|
|
1384
1384
|
}, t.prototype.addAll = function(e) {
|
|
1385
|
-
for (var
|
|
1385
|
+
for (var r = e.length, a = 0; a < r; a++) {
|
|
1386
1386
|
var h = e[a];
|
|
1387
1387
|
this.add(h);
|
|
1388
1388
|
}
|
|
@@ -1391,7 +1391,7 @@ function Rt() {
|
|
|
1391
1391
|
/* 24 */
|
|
1392
1392
|
/***/
|
|
1393
1393
|
function(p, T, y) {
|
|
1394
|
-
var
|
|
1394
|
+
var i = /* @__PURE__ */ function() {
|
|
1395
1395
|
function a(h, s) {
|
|
1396
1396
|
for (var f = 0; f < s.length; f++) {
|
|
1397
1397
|
var o = s[f];
|
|
@@ -1406,13 +1406,13 @@ function Rt() {
|
|
|
1406
1406
|
if (!(a instanceof h))
|
|
1407
1407
|
throw new TypeError("Cannot call a class as a function");
|
|
1408
1408
|
}
|
|
1409
|
-
var e = y(11),
|
|
1409
|
+
var e = y(11), r = function() {
|
|
1410
1410
|
function a(h, s) {
|
|
1411
1411
|
t(this, a), (s !== null || s !== void 0) && (this.compareFunction = this._defaultCompareFunction);
|
|
1412
1412
|
var f = void 0;
|
|
1413
1413
|
h instanceof e ? f = h.size() : f = h.length, this._quicksort(h, 0, f - 1);
|
|
1414
1414
|
}
|
|
1415
|
-
return
|
|
1415
|
+
return i(a, [{
|
|
1416
1416
|
key: "_quicksort",
|
|
1417
1417
|
value: function(h, s, f) {
|
|
1418
1418
|
if (s < f) {
|
|
@@ -1456,30 +1456,30 @@ function Rt() {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
}]), a;
|
|
1458
1458
|
}();
|
|
1459
|
-
p.exports =
|
|
1459
|
+
p.exports = r;
|
|
1460
1460
|
},
|
|
1461
1461
|
/* 25 */
|
|
1462
1462
|
/***/
|
|
1463
1463
|
function(p, T, y) {
|
|
1464
|
-
var
|
|
1465
|
-
function
|
|
1464
|
+
var i = /* @__PURE__ */ function() {
|
|
1465
|
+
function r(a, h) {
|
|
1466
1466
|
for (var s = 0; s < h.length; s++) {
|
|
1467
1467
|
var f = h[s];
|
|
1468
1468
|
f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(a, f.key, f);
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
return function(a, h, s) {
|
|
1472
|
-
return h &&
|
|
1472
|
+
return h && r(a.prototype, h), s && r(a, s), a;
|
|
1473
1473
|
};
|
|
1474
1474
|
}();
|
|
1475
|
-
function t(
|
|
1476
|
-
if (!(
|
|
1475
|
+
function t(r, a) {
|
|
1476
|
+
if (!(r instanceof a))
|
|
1477
1477
|
throw new TypeError("Cannot call a class as a function");
|
|
1478
1478
|
}
|
|
1479
1479
|
var e = function() {
|
|
1480
|
-
function
|
|
1480
|
+
function r(a, h) {
|
|
1481
1481
|
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
|
|
1482
|
-
t(this,
|
|
1482
|
+
t(this, r), this.sequence1 = a, this.sequence2 = h, this.match_score = s, this.mismatch_penalty = f, this.gap_penalty = o, this.iMax = a.length + 1, this.jMax = h.length + 1, this.grid = new Array(this.iMax);
|
|
1483
1483
|
for (var d = 0; d < this.iMax; d++) {
|
|
1484
1484
|
this.grid[d] = new Array(this.jMax);
|
|
1485
1485
|
for (var c = 0; c < this.jMax; c++)
|
|
@@ -1488,12 +1488,12 @@ function Rt() {
|
|
|
1488
1488
|
this.tracebackGrid = new Array(this.iMax);
|
|
1489
1489
|
for (var E = 0; E < this.iMax; E++) {
|
|
1490
1490
|
this.tracebackGrid[E] = new Array(this.jMax);
|
|
1491
|
-
for (var
|
|
1492
|
-
this.tracebackGrid[E][
|
|
1491
|
+
for (var m = 0; m < this.jMax; m++)
|
|
1492
|
+
this.tracebackGrid[E][m] = [null, null, null];
|
|
1493
1493
|
}
|
|
1494
1494
|
this.alignments = [], this.score = -1, this.computeGrids();
|
|
1495
1495
|
}
|
|
1496
|
-
return r
|
|
1496
|
+
return i(r, [{
|
|
1497
1497
|
key: "getScore",
|
|
1498
1498
|
value: function() {
|
|
1499
1499
|
return this.score;
|
|
@@ -1515,8 +1515,8 @@ function Rt() {
|
|
|
1515
1515
|
for (var f = 1; f < this.jMax; f++) {
|
|
1516
1516
|
var o = void 0;
|
|
1517
1517
|
this.sequence1[s - 1] === this.sequence2[f - 1] ? o = this.grid[s - 1][f - 1] + this.match_score : o = this.grid[s - 1][f - 1] + this.mismatch_penalty;
|
|
1518
|
-
var d = this.grid[s - 1][f] + this.gap_penalty, c = this.grid[s][f - 1] + this.gap_penalty, E = [o, d, c],
|
|
1519
|
-
this.grid[s][f] = E[
|
|
1518
|
+
var d = this.grid[s - 1][f] + this.gap_penalty, c = this.grid[s][f - 1] + this.gap_penalty, E = [o, d, c], m = this.arrayAllMaxIndexes(E);
|
|
1519
|
+
this.grid[s][f] = E[m[0]], this.tracebackGrid[s][f] = [m.includes(0), m.includes(1), m.includes(2)];
|
|
1520
1520
|
}
|
|
1521
1521
|
this.score = this.grid[this.iMax - 1][this.jMax - 1];
|
|
1522
1522
|
}
|
|
@@ -1563,40 +1563,40 @@ function Rt() {
|
|
|
1563
1563
|
value: function(a) {
|
|
1564
1564
|
return this.getAllIndexes(a, Math.max.apply(null, a));
|
|
1565
1565
|
}
|
|
1566
|
-
}]),
|
|
1566
|
+
}]), r;
|
|
1567
1567
|
}();
|
|
1568
1568
|
p.exports = e;
|
|
1569
1569
|
},
|
|
1570
1570
|
/* 26 */
|
|
1571
1571
|
/***/
|
|
1572
1572
|
function(p, T, y) {
|
|
1573
|
-
var
|
|
1573
|
+
var i = function() {
|
|
1574
1574
|
};
|
|
1575
|
-
|
|
1575
|
+
i.FDLayout = y(18), i.FDLayoutConstants = y(7), i.FDLayoutEdge = y(19), i.FDLayoutNode = y(20), i.DimensionD = y(21), i.HashMap = y(22), i.HashSet = y(23), i.IGeometry = y(8), i.IMath = y(9), i.Integer = y(10), i.Point = y(12), i.PointD = y(4), i.RandomSeed = y(16), i.RectangleD = y(13), i.Transform = y(17), i.UniqueIDGeneretor = y(14), i.Quicksort = y(24), i.LinkedList = y(11), i.LGraphObject = y(2), i.LGraph = y(5), i.LEdge = y(1), i.LGraphManager = y(6), i.LNode = y(3), i.Layout = y(15), i.LayoutConstants = y(0), i.NeedlemanWunsch = y(25), p.exports = i;
|
|
1576
1576
|
},
|
|
1577
1577
|
/* 27 */
|
|
1578
1578
|
/***/
|
|
1579
1579
|
function(p, T, y) {
|
|
1580
|
-
function
|
|
1580
|
+
function i() {
|
|
1581
1581
|
this.listeners = [];
|
|
1582
1582
|
}
|
|
1583
|
-
var t =
|
|
1584
|
-
t.addListener = function(e,
|
|
1583
|
+
var t = i.prototype;
|
|
1584
|
+
t.addListener = function(e, r) {
|
|
1585
1585
|
this.listeners.push({
|
|
1586
1586
|
event: e,
|
|
1587
|
-
callback:
|
|
1587
|
+
callback: r
|
|
1588
1588
|
});
|
|
1589
|
-
}, t.removeListener = function(e,
|
|
1589
|
+
}, t.removeListener = function(e, r) {
|
|
1590
1590
|
for (var a = this.listeners.length; a >= 0; a--) {
|
|
1591
1591
|
var h = this.listeners[a];
|
|
1592
|
-
h.event === e && h.callback ===
|
|
1592
|
+
h.event === e && h.callback === r && this.listeners.splice(a, 1);
|
|
1593
1593
|
}
|
|
1594
|
-
}, t.emit = function(e,
|
|
1594
|
+
}, t.emit = function(e, r) {
|
|
1595
1595
|
for (var a = 0; a < this.listeners.length; a++) {
|
|
1596
1596
|
var h = this.listeners[a];
|
|
1597
|
-
e === h.event && h.callback(
|
|
1597
|
+
e === h.event && h.callback(r);
|
|
1598
1598
|
}
|
|
1599
|
-
}, p.exports =
|
|
1599
|
+
}, p.exports = i;
|
|
1600
1600
|
}
|
|
1601
1601
|
/******/
|
|
1602
1602
|
])
|
|
@@ -1604,17 +1604,17 @@ function Rt() {
|
|
|
1604
1604
|
});
|
|
1605
1605
|
}(nt)), nt.exports;
|
|
1606
1606
|
}
|
|
1607
|
-
var
|
|
1608
|
-
function
|
|
1609
|
-
return
|
|
1607
|
+
var wt = rt.exports, ct;
|
|
1608
|
+
function Rt() {
|
|
1609
|
+
return ct || (ct = 1, function(O, M) {
|
|
1610
1610
|
(function(p, T) {
|
|
1611
|
-
|
|
1612
|
-
})(
|
|
1611
|
+
O.exports = T(It());
|
|
1612
|
+
})(wt, function(p) {
|
|
1613
1613
|
return (
|
|
1614
1614
|
/******/
|
|
1615
1615
|
function(T) {
|
|
1616
1616
|
var y = {};
|
|
1617
|
-
function
|
|
1617
|
+
function i(t) {
|
|
1618
1618
|
if (y[t])
|
|
1619
1619
|
return y[t].exports;
|
|
1620
1620
|
var e = y[t] = {
|
|
@@ -1626,21 +1626,21 @@ function Mt() {
|
|
|
1626
1626
|
exports: {}
|
|
1627
1627
|
/******/
|
|
1628
1628
|
};
|
|
1629
|
-
return T[t].call(e.exports, e, e.exports,
|
|
1629
|
+
return T[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports;
|
|
1630
1630
|
}
|
|
1631
|
-
return
|
|
1631
|
+
return i.m = T, i.c = y, i.i = function(t) {
|
|
1632
1632
|
return t;
|
|
1633
|
-
},
|
|
1634
|
-
|
|
1633
|
+
}, i.d = function(t, e, r) {
|
|
1634
|
+
i.o(t, e) || Object.defineProperty(t, e, {
|
|
1635
1635
|
/******/
|
|
1636
1636
|
configurable: !1,
|
|
1637
1637
|
/******/
|
|
1638
1638
|
enumerable: !0,
|
|
1639
1639
|
/******/
|
|
1640
|
-
get:
|
|
1640
|
+
get: r
|
|
1641
1641
|
/******/
|
|
1642
1642
|
});
|
|
1643
|
-
},
|
|
1643
|
+
}, i.n = function(t) {
|
|
1644
1644
|
var e = t && t.__esModule ? (
|
|
1645
1645
|
/******/
|
|
1646
1646
|
function() {
|
|
@@ -1652,10 +1652,10 @@ function Mt() {
|
|
|
1652
1652
|
return t;
|
|
1653
1653
|
}
|
|
1654
1654
|
);
|
|
1655
|
-
return
|
|
1656
|
-
},
|
|
1655
|
+
return i.d(e, "a", e), e;
|
|
1656
|
+
}, i.o = function(t, e) {
|
|
1657
1657
|
return Object.prototype.hasOwnProperty.call(t, e);
|
|
1658
|
-
},
|
|
1658
|
+
}, i.p = "", i(i.s = 7);
|
|
1659
1659
|
}([
|
|
1660
1660
|
/* 0 */
|
|
1661
1661
|
/***/
|
|
@@ -1664,97 +1664,97 @@ function Mt() {
|
|
|
1664
1664
|
},
|
|
1665
1665
|
/* 1 */
|
|
1666
1666
|
/***/
|
|
1667
|
-
function(T, y,
|
|
1668
|
-
var t =
|
|
1667
|
+
function(T, y, i) {
|
|
1668
|
+
var t = i(0).FDLayoutConstants;
|
|
1669
1669
|
function e() {
|
|
1670
1670
|
}
|
|
1671
|
-
for (var
|
|
1672
|
-
e[
|
|
1671
|
+
for (var r in t)
|
|
1672
|
+
e[r] = t[r];
|
|
1673
1673
|
e.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, e.DEFAULT_RADIAL_SEPARATION = t.DEFAULT_EDGE_LENGTH, e.DEFAULT_COMPONENT_SEPERATION = 60, e.TILE = !0, e.TILING_PADDING_VERTICAL = 10, e.TILING_PADDING_HORIZONTAL = 10, e.TREE_REDUCTION_ON_INCREMENTAL = !1, T.exports = e;
|
|
1674
1674
|
},
|
|
1675
1675
|
/* 2 */
|
|
1676
1676
|
/***/
|
|
1677
|
-
function(T, y,
|
|
1678
|
-
var t =
|
|
1677
|
+
function(T, y, i) {
|
|
1678
|
+
var t = i(0).FDLayoutEdge;
|
|
1679
1679
|
function e(a, h, s) {
|
|
1680
1680
|
t.call(this, a, h, s);
|
|
1681
1681
|
}
|
|
1682
1682
|
e.prototype = Object.create(t.prototype);
|
|
1683
|
-
for (var
|
|
1684
|
-
e[
|
|
1683
|
+
for (var r in t)
|
|
1684
|
+
e[r] = t[r];
|
|
1685
1685
|
T.exports = e;
|
|
1686
1686
|
},
|
|
1687
1687
|
/* 3 */
|
|
1688
1688
|
/***/
|
|
1689
|
-
function(T, y,
|
|
1690
|
-
var t =
|
|
1689
|
+
function(T, y, i) {
|
|
1690
|
+
var t = i(0).LGraph;
|
|
1691
1691
|
function e(a, h, s) {
|
|
1692
1692
|
t.call(this, a, h, s);
|
|
1693
1693
|
}
|
|
1694
1694
|
e.prototype = Object.create(t.prototype);
|
|
1695
|
-
for (var
|
|
1696
|
-
e[
|
|
1695
|
+
for (var r in t)
|
|
1696
|
+
e[r] = t[r];
|
|
1697
1697
|
T.exports = e;
|
|
1698
1698
|
},
|
|
1699
1699
|
/* 4 */
|
|
1700
1700
|
/***/
|
|
1701
|
-
function(T, y,
|
|
1702
|
-
var t =
|
|
1701
|
+
function(T, y, i) {
|
|
1702
|
+
var t = i(0).LGraphManager;
|
|
1703
1703
|
function e(a) {
|
|
1704
1704
|
t.call(this, a);
|
|
1705
1705
|
}
|
|
1706
1706
|
e.prototype = Object.create(t.prototype);
|
|
1707
|
-
for (var
|
|
1708
|
-
e[
|
|
1707
|
+
for (var r in t)
|
|
1708
|
+
e[r] = t[r];
|
|
1709
1709
|
T.exports = e;
|
|
1710
1710
|
},
|
|
1711
1711
|
/* 5 */
|
|
1712
1712
|
/***/
|
|
1713
|
-
function(T, y,
|
|
1714
|
-
var t =
|
|
1715
|
-
function
|
|
1713
|
+
function(T, y, i) {
|
|
1714
|
+
var t = i(0).FDLayoutNode, e = i(0).IMath;
|
|
1715
|
+
function r(h, s, f, o) {
|
|
1716
1716
|
t.call(this, h, s, f, o);
|
|
1717
1717
|
}
|
|
1718
|
-
|
|
1718
|
+
r.prototype = Object.create(t.prototype);
|
|
1719
1719
|
for (var a in t)
|
|
1720
|
-
|
|
1721
|
-
|
|
1720
|
+
r[a] = t[a];
|
|
1721
|
+
r.prototype.move = function() {
|
|
1722
1722
|
var h = this.graphManager.getLayout();
|
|
1723
1723
|
this.displacementX = h.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = h.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementX = h.coolingFactor * h.maxNodeDisplacement * e.sign(this.displacementX)), Math.abs(this.displacementY) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementY = h.coolingFactor * h.maxNodeDisplacement * e.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), h.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
|
|
1724
|
-
},
|
|
1724
|
+
}, r.prototype.propogateDisplacementToChildren = function(h, s) {
|
|
1725
1725
|
for (var f = this.getChild().getNodes(), o, d = 0; d < f.length; d++)
|
|
1726
1726
|
o = f[d], o.getChild() == null ? (o.moveBy(h, s), o.displacementX += h, o.displacementY += s) : o.propogateDisplacementToChildren(h, s);
|
|
1727
|
-
},
|
|
1727
|
+
}, r.prototype.setPred1 = function(h) {
|
|
1728
1728
|
this.pred1 = h;
|
|
1729
|
-
},
|
|
1729
|
+
}, r.prototype.getPred1 = function() {
|
|
1730
1730
|
return pred1;
|
|
1731
|
-
},
|
|
1731
|
+
}, r.prototype.getPred2 = function() {
|
|
1732
1732
|
return pred2;
|
|
1733
|
-
},
|
|
1733
|
+
}, r.prototype.setNext = function(h) {
|
|
1734
1734
|
this.next = h;
|
|
1735
|
-
},
|
|
1735
|
+
}, r.prototype.getNext = function() {
|
|
1736
1736
|
return next;
|
|
1737
|
-
},
|
|
1737
|
+
}, r.prototype.setProcessed = function(h) {
|
|
1738
1738
|
this.processed = h;
|
|
1739
|
-
},
|
|
1739
|
+
}, r.prototype.isProcessed = function() {
|
|
1740
1740
|
return processed;
|
|
1741
|
-
}, T.exports =
|
|
1741
|
+
}, T.exports = r;
|
|
1742
1742
|
},
|
|
1743
1743
|
/* 6 */
|
|
1744
1744
|
/***/
|
|
1745
|
-
function(T, y,
|
|
1746
|
-
var t =
|
|
1745
|
+
function(T, y, i) {
|
|
1746
|
+
var t = i(0).FDLayout, e = i(4), r = i(3), a = i(5), h = i(2), s = i(1), f = i(0).FDLayoutConstants, o = i(0).LayoutConstants, d = i(0).Point, c = i(0).PointD, E = i(0).Layout, m = i(0).Integer, v = i(0).IGeometry, N = i(0).LGraph, D = i(0).Transform;
|
|
1747
1747
|
function g() {
|
|
1748
1748
|
t.call(this), this.toBeTiled = {};
|
|
1749
1749
|
}
|
|
1750
1750
|
g.prototype = Object.create(t.prototype);
|
|
1751
|
-
for (var
|
|
1752
|
-
g[
|
|
1751
|
+
for (var L in t)
|
|
1752
|
+
g[L] = t[L];
|
|
1753
1753
|
g.prototype.newGraphManager = function() {
|
|
1754
1754
|
var n = new e(this);
|
|
1755
1755
|
return this.graphManager = n, n;
|
|
1756
1756
|
}, g.prototype.newGraph = function(n) {
|
|
1757
|
-
return new
|
|
1757
|
+
return new r(null, this.graphManager, n);
|
|
1758
1758
|
}, g.prototype.newNode = function(n) {
|
|
1759
1759
|
return new a(this.graphManager, n);
|
|
1760
1760
|
}, g.prototype.newEdge = function(n) {
|
|
@@ -1768,8 +1768,8 @@ function Mt() {
|
|
|
1768
1768
|
if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) {
|
|
1769
1769
|
if (s.TREE_REDUCTION_ON_INCREMENTAL) {
|
|
1770
1770
|
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1771
|
-
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(
|
|
1772
|
-
return n.has(
|
|
1771
|
+
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(_) {
|
|
1772
|
+
return n.has(_);
|
|
1773
1773
|
});
|
|
1774
1774
|
this.graphManager.setAllNodesToApplyGravitation(u);
|
|
1775
1775
|
}
|
|
@@ -1779,8 +1779,8 @@ function Mt() {
|
|
|
1779
1779
|
this.positionNodesRadially(l);
|
|
1780
1780
|
else {
|
|
1781
1781
|
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1782
|
-
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(
|
|
1783
|
-
return n.has(
|
|
1782
|
+
var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(I) {
|
|
1783
|
+
return n.has(I);
|
|
1784
1784
|
});
|
|
1785
1785
|
this.graphManager.setAllNodesToApplyGravitation(u), this.positionNodesRandomly();
|
|
1786
1786
|
}
|
|
@@ -1817,17 +1817,17 @@ function Mt() {
|
|
|
1817
1817
|
return !0;
|
|
1818
1818
|
this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
|
|
1819
1819
|
}
|
|
1820
|
-
var l = !this.isTreeGrowing && !this.isGrowthFinished,
|
|
1821
|
-
return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(l,
|
|
1820
|
+
var l = !this.isTreeGrowing && !this.isGrowthFinished, _ = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
|
|
1821
|
+
return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(l, _), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
|
|
1822
1822
|
}, g.prototype.getPositionsData = function() {
|
|
1823
1823
|
for (var n = this.graphManager.getAllNodes(), u = {}, l = 0; l < n.length; l++) {
|
|
1824
|
-
var
|
|
1824
|
+
var _ = n[l].rect, A = n[l].id;
|
|
1825
1825
|
u[A] = {
|
|
1826
1826
|
id: A,
|
|
1827
|
-
x:
|
|
1828
|
-
y:
|
|
1829
|
-
w:
|
|
1830
|
-
h:
|
|
1827
|
+
x: _.getCenterX(),
|
|
1828
|
+
y: _.getCenterY(),
|
|
1829
|
+
w: _.width,
|
|
1830
|
+
h: _.height
|
|
1831
1831
|
};
|
|
1832
1832
|
}
|
|
1833
1833
|
return u;
|
|
@@ -1842,8 +1842,8 @@ function Mt() {
|
|
|
1842
1842
|
this.graphManager.updateBounds();
|
|
1843
1843
|
}
|
|
1844
1844
|
}, g.prototype.calculateNodesToApplyGravitationTo = function() {
|
|
1845
|
-
var n = [], u, l = this.graphManager.getGraphs(),
|
|
1846
|
-
for (A = 0; A <
|
|
1845
|
+
var n = [], u, l = this.graphManager.getGraphs(), _ = l.length, A;
|
|
1846
|
+
for (A = 0; A < _; A++)
|
|
1847
1847
|
u = l[A], u.updateConnected(), u.isConnected || (n = n.concat(u.getNodes()));
|
|
1848
1848
|
return n;
|
|
1849
1849
|
}, g.prototype.createBendpoints = function() {
|
|
@@ -1851,22 +1851,22 @@ function Mt() {
|
|
|
1851
1851
|
n = n.concat(this.graphManager.getAllEdges());
|
|
1852
1852
|
var u = /* @__PURE__ */ new Set(), l;
|
|
1853
1853
|
for (l = 0; l < n.length; l++) {
|
|
1854
|
-
var
|
|
1855
|
-
if (!u.has(
|
|
1856
|
-
var A =
|
|
1857
|
-
if (A ==
|
|
1858
|
-
|
|
1854
|
+
var _ = n[l];
|
|
1855
|
+
if (!u.has(_)) {
|
|
1856
|
+
var A = _.getSource(), I = _.getTarget();
|
|
1857
|
+
if (A == I)
|
|
1858
|
+
_.getBendpoints().push(new c()), _.getBendpoints().push(new c()), this.createDummyNodesForBendpoints(_), u.add(_);
|
|
1859
1859
|
else {
|
|
1860
|
-
var
|
|
1861
|
-
if (
|
|
1862
|
-
if (
|
|
1863
|
-
var
|
|
1864
|
-
for (
|
|
1865
|
-
var
|
|
1866
|
-
|
|
1860
|
+
var w = [];
|
|
1861
|
+
if (w = w.concat(A.getEdgeListToNode(I)), w = w.concat(I.getEdgeListToNode(A)), !u.has(w[0])) {
|
|
1862
|
+
if (w.length > 1) {
|
|
1863
|
+
var R;
|
|
1864
|
+
for (R = 0; R < w.length; R++) {
|
|
1865
|
+
var S = w[R];
|
|
1866
|
+
S.getBendpoints().push(new c()), this.createDummyNodesForBendpoints(S);
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
|
|
1869
|
+
w.forEach(function(U) {
|
|
1870
1870
|
u.add(U);
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
@@ -1876,49 +1876,49 @@ function Mt() {
|
|
|
1876
1876
|
break;
|
|
1877
1877
|
}
|
|
1878
1878
|
}, g.prototype.positionNodesRadially = function(n) {
|
|
1879
|
-
for (var u = new d(0, 0), l = Math.ceil(Math.sqrt(n.length)),
|
|
1880
|
-
|
|
1881
|
-
var
|
|
1882
|
-
u.x =
|
|
1879
|
+
for (var u = new d(0, 0), l = Math.ceil(Math.sqrt(n.length)), _ = 0, A = 0, I = 0, w = new c(0, 0), R = 0; R < n.length; R++) {
|
|
1880
|
+
R % l == 0 && (I = 0, A = _, R != 0 && (A += s.DEFAULT_COMPONENT_SEPERATION), _ = 0);
|
|
1881
|
+
var S = n[R], U = E.findCenterOfTree(S);
|
|
1882
|
+
u.x = I, u.y = A, w = g.radialLayout(S, U, u), w.y > _ && (_ = Math.floor(w.y)), I = Math.floor(w.x + s.DEFAULT_COMPONENT_SEPERATION);
|
|
1883
1883
|
}
|
|
1884
|
-
this.transform(new c(o.WORLD_CENTER_X -
|
|
1884
|
+
this.transform(new c(o.WORLD_CENTER_X - w.x / 2, o.WORLD_CENTER_Y - w.y / 2));
|
|
1885
1885
|
}, g.radialLayout = function(n, u, l) {
|
|
1886
|
-
var
|
|
1887
|
-
g.branchRadialLayout(u, null, 0, 359, 0,
|
|
1888
|
-
var A = N.calculateBounds(n),
|
|
1889
|
-
|
|
1890
|
-
for (var
|
|
1891
|
-
var
|
|
1892
|
-
|
|
1893
|
-
}
|
|
1894
|
-
var
|
|
1895
|
-
return
|
|
1896
|
-
}, g.branchRadialLayout = function(n, u, l,
|
|
1897
|
-
var
|
|
1898
|
-
|
|
1899
|
-
var
|
|
1886
|
+
var _ = Math.max(this.maxDiagonalInTree(n), s.DEFAULT_RADIAL_SEPARATION);
|
|
1887
|
+
g.branchRadialLayout(u, null, 0, 359, 0, _);
|
|
1888
|
+
var A = N.calculateBounds(n), I = new D();
|
|
1889
|
+
I.setDeviceOrgX(A.getMinX()), I.setDeviceOrgY(A.getMinY()), I.setWorldOrgX(l.x), I.setWorldOrgY(l.y);
|
|
1890
|
+
for (var w = 0; w < n.length; w++) {
|
|
1891
|
+
var R = n[w];
|
|
1892
|
+
R.transform(I);
|
|
1893
|
+
}
|
|
1894
|
+
var S = new c(A.getMaxX(), A.getMaxY());
|
|
1895
|
+
return I.inverseTransformPoint(S);
|
|
1896
|
+
}, g.branchRadialLayout = function(n, u, l, _, A, I) {
|
|
1897
|
+
var w = (_ - l + 1) / 2;
|
|
1898
|
+
w < 0 && (w += 180);
|
|
1899
|
+
var R = (w + l) % 360, S = R * v.TWO_PI / 360, U = A * Math.cos(S), b = A * Math.sin(S);
|
|
1900
1900
|
n.setCenter(U, b);
|
|
1901
|
-
var
|
|
1902
|
-
|
|
1903
|
-
var
|
|
1904
|
-
u != null &&
|
|
1905
|
-
for (var F = 0, k =
|
|
1901
|
+
var C = [];
|
|
1902
|
+
C = C.concat(n.getEdges());
|
|
1903
|
+
var x = C.length;
|
|
1904
|
+
u != null && x--;
|
|
1905
|
+
for (var F = 0, k = C.length, Y, X = n.getEdgesBetween(u); X.length > 1; ) {
|
|
1906
1906
|
var P = X[0];
|
|
1907
1907
|
X.splice(0, 1);
|
|
1908
|
-
var B =
|
|
1909
|
-
B >= 0 &&
|
|
1910
|
-
}
|
|
1911
|
-
u != null ? Y = (
|
|
1912
|
-
for (var
|
|
1913
|
-
var
|
|
1914
|
-
if (
|
|
1915
|
-
var
|
|
1916
|
-
g.branchRadialLayout(
|
|
1908
|
+
var B = C.indexOf(P);
|
|
1909
|
+
B >= 0 && C.splice(B, 1), k--, x--;
|
|
1910
|
+
}
|
|
1911
|
+
u != null ? Y = (C.indexOf(X[0]) + 1) % k : Y = 0;
|
|
1912
|
+
for (var $ = Math.abs(_ - l) / x, H = Y; F != x; H = ++H % k) {
|
|
1913
|
+
var V = C[H].getOtherEnd(n);
|
|
1914
|
+
if (V != u) {
|
|
1915
|
+
var z = (l + F * $) % 360, j = (z + $) % 360;
|
|
1916
|
+
g.branchRadialLayout(V, n, z, j, A + I, I), F++;
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
1919
|
}, g.maxDiagonalInTree = function(n) {
|
|
1920
|
-
for (var u =
|
|
1921
|
-
var
|
|
1920
|
+
for (var u = m.MIN_VALUE, l = 0; l < n.length; l++) {
|
|
1921
|
+
var _ = n[l], A = _.getDiagonal();
|
|
1922
1922
|
A > u && (u = A);
|
|
1923
1923
|
}
|
|
1924
1924
|
return u;
|
|
@@ -1927,25 +1927,25 @@ function Mt() {
|
|
|
1927
1927
|
}, g.prototype.groupZeroDegreeMembers = function() {
|
|
1928
1928
|
var n = this, u = {};
|
|
1929
1929
|
this.memberGroups = {}, this.idToDummyNode = {};
|
|
1930
|
-
for (var l = [],
|
|
1931
|
-
var
|
|
1932
|
-
this.getNodeDegreeWithChildren(
|
|
1930
|
+
for (var l = [], _ = this.graphManager.getAllNodes(), A = 0; A < _.length; A++) {
|
|
1931
|
+
var I = _[A], w = I.getParent();
|
|
1932
|
+
this.getNodeDegreeWithChildren(I) === 0 && (w.id == null || !this.getToBeTiled(w)) && l.push(I);
|
|
1933
1933
|
}
|
|
1934
1934
|
for (var A = 0; A < l.length; A++) {
|
|
1935
|
-
var
|
|
1936
|
-
typeof u[
|
|
1937
|
-
}
|
|
1938
|
-
Object.keys(u).forEach(function(
|
|
1939
|
-
if (u[
|
|
1940
|
-
var U = "DummyCompound_" +
|
|
1941
|
-
n.memberGroups[U] = u[
|
|
1942
|
-
var b = u[
|
|
1943
|
-
|
|
1944
|
-
var
|
|
1945
|
-
F.add(
|
|
1946
|
-
for (var k = 0; k < u[
|
|
1947
|
-
var Y = u[
|
|
1948
|
-
F.remove(Y),
|
|
1935
|
+
var I = l[A], R = I.getParent().id;
|
|
1936
|
+
typeof u[R] > "u" && (u[R] = []), u[R] = u[R].concat(I);
|
|
1937
|
+
}
|
|
1938
|
+
Object.keys(u).forEach(function(S) {
|
|
1939
|
+
if (u[S].length > 1) {
|
|
1940
|
+
var U = "DummyCompound_" + S;
|
|
1941
|
+
n.memberGroups[U] = u[S];
|
|
1942
|
+
var b = u[S][0].getParent(), C = new a(n.graphManager);
|
|
1943
|
+
C.id = U, C.paddingLeft = b.paddingLeft || 0, C.paddingRight = b.paddingRight || 0, C.paddingBottom = b.paddingBottom || 0, C.paddingTop = b.paddingTop || 0, n.idToDummyNode[U] = C;
|
|
1944
|
+
var x = n.getGraphManager().add(n.newGraph(), C), F = b.getChild();
|
|
1945
|
+
F.add(C);
|
|
1946
|
+
for (var k = 0; k < u[S].length; k++) {
|
|
1947
|
+
var Y = u[S][k];
|
|
1948
|
+
F.remove(Y), x.add(Y);
|
|
1949
1949
|
}
|
|
1950
1950
|
}
|
|
1951
1951
|
});
|
|
@@ -1958,19 +1958,19 @@ function Mt() {
|
|
|
1958
1958
|
}, g.prototype.clearZeroDegreeMembers = function() {
|
|
1959
1959
|
var n = this, u = this.tiledZeroDegreePack = [];
|
|
1960
1960
|
Object.keys(this.memberGroups).forEach(function(l) {
|
|
1961
|
-
var
|
|
1962
|
-
u[l] = n.tileNodes(n.memberGroups[l],
|
|
1961
|
+
var _ = n.idToDummyNode[l];
|
|
1962
|
+
u[l] = n.tileNodes(n.memberGroups[l], _.paddingLeft + _.paddingRight), _.rect.width = u[l].width, _.rect.height = u[l].height;
|
|
1963
1963
|
});
|
|
1964
1964
|
}, g.prototype.repopulateCompounds = function() {
|
|
1965
1965
|
for (var n = this.compoundOrder.length - 1; n >= 0; n--) {
|
|
1966
|
-
var u = this.compoundOrder[n], l = u.id,
|
|
1967
|
-
this.adjustLocations(this.tiledMemberPack[l], u.rect.x, u.rect.y,
|
|
1966
|
+
var u = this.compoundOrder[n], l = u.id, _ = u.paddingLeft, A = u.paddingTop;
|
|
1967
|
+
this.adjustLocations(this.tiledMemberPack[l], u.rect.x, u.rect.y, _, A);
|
|
1968
1968
|
}
|
|
1969
1969
|
}, g.prototype.repopulateZeroDegreeMembers = function() {
|
|
1970
1970
|
var n = this, u = this.tiledZeroDegreePack;
|
|
1971
1971
|
Object.keys(u).forEach(function(l) {
|
|
1972
|
-
var
|
|
1973
|
-
n.adjustLocations(u[l],
|
|
1972
|
+
var _ = n.idToDummyNode[l], A = _.paddingLeft, I = _.paddingTop;
|
|
1973
|
+
n.adjustLocations(u[l], _.rect.x, _.rect.y, A, I);
|
|
1974
1974
|
});
|
|
1975
1975
|
}, g.prototype.getToBeTiled = function(n) {
|
|
1976
1976
|
var u = n.id;
|
|
@@ -1979,22 +1979,22 @@ function Mt() {
|
|
|
1979
1979
|
var l = n.getChild();
|
|
1980
1980
|
if (l == null)
|
|
1981
1981
|
return this.toBeTiled[u] = !1, !1;
|
|
1982
|
-
for (var
|
|
1983
|
-
var
|
|
1984
|
-
if (this.getNodeDegree(
|
|
1982
|
+
for (var _ = l.getNodes(), A = 0; A < _.length; A++) {
|
|
1983
|
+
var I = _[A];
|
|
1984
|
+
if (this.getNodeDegree(I) > 0)
|
|
1985
1985
|
return this.toBeTiled[u] = !1, !1;
|
|
1986
|
-
if (
|
|
1987
|
-
this.toBeTiled[
|
|
1986
|
+
if (I.getChild() == null) {
|
|
1987
|
+
this.toBeTiled[I.id] = !1;
|
|
1988
1988
|
continue;
|
|
1989
1989
|
}
|
|
1990
|
-
if (!this.getToBeTiled(
|
|
1990
|
+
if (!this.getToBeTiled(I))
|
|
1991
1991
|
return this.toBeTiled[u] = !1, !1;
|
|
1992
1992
|
}
|
|
1993
1993
|
return this.toBeTiled[u] = !0, !0;
|
|
1994
1994
|
}, g.prototype.getNodeDegree = function(n) {
|
|
1995
1995
|
n.id;
|
|
1996
|
-
for (var u = n.getEdges(), l = 0,
|
|
1997
|
-
var A = u[
|
|
1996
|
+
for (var u = n.getEdges(), l = 0, _ = 0; _ < u.length; _++) {
|
|
1997
|
+
var A = u[_];
|
|
1998
1998
|
A.getSource().id !== A.getTarget().id && (l = l + 1);
|
|
1999
1999
|
}
|
|
2000
2000
|
return l;
|
|
@@ -2002,8 +2002,8 @@ function Mt() {
|
|
|
2002
2002
|
var u = this.getNodeDegree(n);
|
|
2003
2003
|
if (n.getChild() == null)
|
|
2004
2004
|
return u;
|
|
2005
|
-
for (var l = n.getChild().getNodes(),
|
|
2006
|
-
var A = l[
|
|
2005
|
+
for (var l = n.getChild().getNodes(), _ = 0; _ < l.length; _++) {
|
|
2006
|
+
var A = l[_];
|
|
2007
2007
|
u += this.getNodeDegreeWithChildren(A);
|
|
2008
2008
|
}
|
|
2009
2009
|
return u;
|
|
@@ -2014,25 +2014,25 @@ function Mt() {
|
|
|
2014
2014
|
var l = n[u];
|
|
2015
2015
|
l.getChild() != null && this.fillCompexOrderByDFS(l.getChild().getNodes()), this.getToBeTiled(l) && this.compoundOrder.push(l);
|
|
2016
2016
|
}
|
|
2017
|
-
}, g.prototype.adjustLocations = function(n, u, l,
|
|
2018
|
-
u +=
|
|
2019
|
-
for (var
|
|
2020
|
-
var
|
|
2021
|
-
u =
|
|
2022
|
-
for (var
|
|
2023
|
-
var b =
|
|
2024
|
-
b.rect.x = u, b.rect.y = l, u += b.rect.width + n.horizontalPadding, b.rect.height >
|
|
2017
|
+
}, g.prototype.adjustLocations = function(n, u, l, _, A) {
|
|
2018
|
+
u += _, l += A;
|
|
2019
|
+
for (var I = u, w = 0; w < n.rows.length; w++) {
|
|
2020
|
+
var R = n.rows[w];
|
|
2021
|
+
u = I;
|
|
2022
|
+
for (var S = 0, U = 0; U < R.length; U++) {
|
|
2023
|
+
var b = R[U];
|
|
2024
|
+
b.rect.x = u, b.rect.y = l, u += b.rect.width + n.horizontalPadding, b.rect.height > S && (S = b.rect.height);
|
|
2025
2025
|
}
|
|
2026
|
-
l +=
|
|
2026
|
+
l += S + n.verticalPadding;
|
|
2027
2027
|
}
|
|
2028
2028
|
}, g.prototype.tileCompoundMembers = function(n, u) {
|
|
2029
2029
|
var l = this;
|
|
2030
|
-
this.tiledMemberPack = [], Object.keys(n).forEach(function(
|
|
2031
|
-
var A = u[
|
|
2032
|
-
l.tiledMemberPack[
|
|
2030
|
+
this.tiledMemberPack = [], Object.keys(n).forEach(function(_) {
|
|
2031
|
+
var A = u[_];
|
|
2032
|
+
l.tiledMemberPack[_] = l.tileNodes(n[_], A.paddingLeft + A.paddingRight), A.rect.width = l.tiledMemberPack[_].width, A.rect.height = l.tiledMemberPack[_].height;
|
|
2033
2033
|
});
|
|
2034
2034
|
}, g.prototype.tileNodes = function(n, u) {
|
|
2035
|
-
var l = s.TILING_PADDING_VERTICAL,
|
|
2035
|
+
var l = s.TILING_PADDING_VERTICAL, _ = s.TILING_PADDING_HORIZONTAL, A = {
|
|
2036
2036
|
rows: [],
|
|
2037
2037
|
rowWidth: [],
|
|
2038
2038
|
rowHeight: [],
|
|
@@ -2040,59 +2040,59 @@ function Mt() {
|
|
|
2040
2040
|
height: u,
|
|
2041
2041
|
// assume minHeight equals to minWidth
|
|
2042
2042
|
verticalPadding: l,
|
|
2043
|
-
horizontalPadding:
|
|
2043
|
+
horizontalPadding: _
|
|
2044
2044
|
};
|
|
2045
|
-
n.sort(function(
|
|
2046
|
-
return
|
|
2045
|
+
n.sort(function(R, S) {
|
|
2046
|
+
return R.rect.width * R.rect.height > S.rect.width * S.rect.height ? -1 : R.rect.width * R.rect.height < S.rect.width * S.rect.height ? 1 : 0;
|
|
2047
2047
|
});
|
|
2048
|
-
for (var
|
|
2049
|
-
var
|
|
2050
|
-
A.rows.length == 0 ? this.insertNodeToRow(A,
|
|
2048
|
+
for (var I = 0; I < n.length; I++) {
|
|
2049
|
+
var w = n[I];
|
|
2050
|
+
A.rows.length == 0 ? this.insertNodeToRow(A, w, 0, u) : this.canAddHorizontal(A, w.rect.width, w.rect.height) ? this.insertNodeToRow(A, w, this.getShortestRowIndex(A), u) : this.insertNodeToRow(A, w, A.rows.length, u), this.shiftToLastRow(A);
|
|
2051
2051
|
}
|
|
2052
2052
|
return A;
|
|
2053
|
-
}, g.prototype.insertNodeToRow = function(n, u, l,
|
|
2054
|
-
var A =
|
|
2053
|
+
}, g.prototype.insertNodeToRow = function(n, u, l, _) {
|
|
2054
|
+
var A = _;
|
|
2055
2055
|
if (l == n.rows.length) {
|
|
2056
|
-
var
|
|
2057
|
-
n.rows.push(
|
|
2058
|
-
}
|
|
2059
|
-
var
|
|
2060
|
-
n.rows[l].length > 0 && (
|
|
2061
|
-
var
|
|
2062
|
-
l > 0 && (
|
|
2063
|
-
var
|
|
2064
|
-
|
|
2056
|
+
var I = [];
|
|
2057
|
+
n.rows.push(I), n.rowWidth.push(A), n.rowHeight.push(0);
|
|
2058
|
+
}
|
|
2059
|
+
var w = n.rowWidth[l] + u.rect.width;
|
|
2060
|
+
n.rows[l].length > 0 && (w += n.horizontalPadding), n.rowWidth[l] = w, n.width < w && (n.width = w);
|
|
2061
|
+
var R = u.rect.height;
|
|
2062
|
+
l > 0 && (R += n.verticalPadding);
|
|
2063
|
+
var S = 0;
|
|
2064
|
+
R > n.rowHeight[l] && (S = n.rowHeight[l], n.rowHeight[l] = R, S = n.rowHeight[l] - S), n.height += S, n.rows[l].push(u);
|
|
2065
2065
|
}, g.prototype.getShortestRowIndex = function(n) {
|
|
2066
|
-
for (var u = -1, l = Number.MAX_VALUE,
|
|
2067
|
-
n.rowWidth[
|
|
2066
|
+
for (var u = -1, l = Number.MAX_VALUE, _ = 0; _ < n.rows.length; _++)
|
|
2067
|
+
n.rowWidth[_] < l && (u = _, l = n.rowWidth[_]);
|
|
2068
2068
|
return u;
|
|
2069
2069
|
}, g.prototype.getLongestRowIndex = function(n) {
|
|
2070
|
-
for (var u = -1, l = Number.MIN_VALUE,
|
|
2071
|
-
n.rowWidth[
|
|
2070
|
+
for (var u = -1, l = Number.MIN_VALUE, _ = 0; _ < n.rows.length; _++)
|
|
2071
|
+
n.rowWidth[_] > l && (u = _, l = n.rowWidth[_]);
|
|
2072
2072
|
return u;
|
|
2073
2073
|
}, g.prototype.canAddHorizontal = function(n, u, l) {
|
|
2074
|
-
var
|
|
2075
|
-
if (
|
|
2074
|
+
var _ = this.getShortestRowIndex(n);
|
|
2075
|
+
if (_ < 0)
|
|
2076
2076
|
return !0;
|
|
2077
|
-
var A = n.rowWidth[
|
|
2077
|
+
var A = n.rowWidth[_];
|
|
2078
2078
|
if (A + n.horizontalPadding + u <= n.width) return !0;
|
|
2079
|
-
var
|
|
2080
|
-
n.rowHeight[
|
|
2081
|
-
var
|
|
2082
|
-
n.width - A >= u + n.horizontalPadding ?
|
|
2083
|
-
var
|
|
2084
|
-
return n.width < u ?
|
|
2079
|
+
var I = 0;
|
|
2080
|
+
n.rowHeight[_] < l && _ > 0 && (I = l + n.verticalPadding - n.rowHeight[_]);
|
|
2081
|
+
var w;
|
|
2082
|
+
n.width - A >= u + n.horizontalPadding ? w = (n.height + I) / (A + u + n.horizontalPadding) : w = (n.height + I) / n.width, I = l + n.verticalPadding;
|
|
2083
|
+
var R;
|
|
2084
|
+
return n.width < u ? R = (n.height + I) / u : R = (n.height + I) / n.width, R < 1 && (R = 1 / R), w < 1 && (w = 1 / w), w < R;
|
|
2085
2085
|
}, g.prototype.shiftToLastRow = function(n) {
|
|
2086
|
-
var u = this.getLongestRowIndex(n), l = n.rowWidth.length - 1,
|
|
2087
|
-
if (n.width - n.rowWidth[l] >
|
|
2088
|
-
|
|
2089
|
-
for (var
|
|
2090
|
-
|
|
2091
|
-
u > 0 && (
|
|
2092
|
-
var
|
|
2093
|
-
n.rowHeight[u] =
|
|
2086
|
+
var u = this.getLongestRowIndex(n), l = n.rowWidth.length - 1, _ = n.rows[u], A = _[_.length - 1], I = A.width + n.horizontalPadding;
|
|
2087
|
+
if (n.width - n.rowWidth[l] > I && u != l) {
|
|
2088
|
+
_.splice(-1, 1), n.rows[l].push(A), n.rowWidth[u] = n.rowWidth[u] - I, n.rowWidth[l] = n.rowWidth[l] + I, n.width = n.rowWidth[instance.getLongestRowIndex(n)];
|
|
2089
|
+
for (var w = Number.MIN_VALUE, R = 0; R < _.length; R++)
|
|
2090
|
+
_[R].height > w && (w = _[R].height);
|
|
2091
|
+
u > 0 && (w += n.verticalPadding);
|
|
2092
|
+
var S = n.rowHeight[u] + n.rowHeight[l];
|
|
2093
|
+
n.rowHeight[u] = w, n.rowHeight[l] < A.height + n.verticalPadding && (n.rowHeight[l] = A.height + n.verticalPadding);
|
|
2094
2094
|
var U = n.rowHeight[u] + n.rowHeight[l];
|
|
2095
|
-
n.height += U -
|
|
2095
|
+
n.height += U - S, this.shiftToLastRow(n);
|
|
2096
2096
|
}
|
|
2097
2097
|
}, g.prototype.tilingPreLayout = function() {
|
|
2098
2098
|
s.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
|
|
@@ -2100,75 +2100,75 @@ function Mt() {
|
|
|
2100
2100
|
s.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
|
|
2101
2101
|
}, g.prototype.reduceTrees = function() {
|
|
2102
2102
|
for (var n = [], u = !0, l; u; ) {
|
|
2103
|
-
var
|
|
2103
|
+
var _ = this.graphManager.getAllNodes(), A = [];
|
|
2104
2104
|
u = !1;
|
|
2105
|
-
for (var
|
|
2106
|
-
l =
|
|
2105
|
+
for (var I = 0; I < _.length; I++)
|
|
2106
|
+
l = _[I], l.getEdges().length == 1 && !l.getEdges()[0].isInterGraph && l.getChild() == null && (A.push([l, l.getEdges()[0], l.getOwner()]), u = !0);
|
|
2107
2107
|
if (u == !0) {
|
|
2108
|
-
for (var
|
|
2109
|
-
A[
|
|
2110
|
-
n.push(
|
|
2108
|
+
for (var w = [], R = 0; R < A.length; R++)
|
|
2109
|
+
A[R][0].getEdges().length == 1 && (w.push(A[R]), A[R][0].getOwner().remove(A[R][0]));
|
|
2110
|
+
n.push(w), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
2111
2111
|
}
|
|
2112
2112
|
}
|
|
2113
2113
|
this.prunedNodesAll = n;
|
|
2114
2114
|
}, g.prototype.growTree = function(n) {
|
|
2115
|
-
for (var u = n.length, l = n[u - 1],
|
|
2116
|
-
|
|
2115
|
+
for (var u = n.length, l = n[u - 1], _, A = 0; A < l.length; A++)
|
|
2116
|
+
_ = l[A], this.findPlaceforPrunedNode(_), _[2].add(_[0]), _[2].add(_[1], _[1].source, _[1].target);
|
|
2117
2117
|
n.splice(n.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
2118
2118
|
}, g.prototype.findPlaceforPrunedNode = function(n) {
|
|
2119
|
-
var u, l,
|
|
2120
|
-
|
|
2121
|
-
var A = l.startX,
|
|
2122
|
-
if (
|
|
2123
|
-
for (var F = A; F <=
|
|
2124
|
-
|
|
2125
|
-
if (
|
|
2126
|
-
for (var F =
|
|
2127
|
-
|
|
2128
|
-
if (
|
|
2129
|
-
for (var F = A; F <=
|
|
2130
|
-
|
|
2119
|
+
var u, l, _ = n[0];
|
|
2120
|
+
_ == n[1].source ? l = n[1].target : l = n[1].source;
|
|
2121
|
+
var A = l.startX, I = l.finishX, w = l.startY, R = l.finishY, S = 0, U = 0, b = 0, C = 0, x = [S, b, U, C];
|
|
2122
|
+
if (w > 0)
|
|
2123
|
+
for (var F = A; F <= I; F++)
|
|
2124
|
+
x[0] += this.grid[F][w - 1].length + this.grid[F][w].length - 1;
|
|
2125
|
+
if (I < this.grid.length - 1)
|
|
2126
|
+
for (var F = w; F <= R; F++)
|
|
2127
|
+
x[1] += this.grid[I + 1][F].length + this.grid[I][F].length - 1;
|
|
2128
|
+
if (R < this.grid[0].length - 1)
|
|
2129
|
+
for (var F = A; F <= I; F++)
|
|
2130
|
+
x[2] += this.grid[F][R + 1].length + this.grid[F][R].length - 1;
|
|
2131
2131
|
if (A > 0)
|
|
2132
|
-
for (var F =
|
|
2133
|
-
|
|
2134
|
-
for (var k =
|
|
2135
|
-
|
|
2132
|
+
for (var F = w; F <= R; F++)
|
|
2133
|
+
x[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
|
|
2134
|
+
for (var k = m.MAX_VALUE, Y, X, P = 0; P < x.length; P++)
|
|
2135
|
+
x[P] < k ? (k = x[P], Y = 1, X = P) : x[P] == k && Y++;
|
|
2136
2136
|
if (Y == 3 && k == 0)
|
|
2137
|
-
|
|
2137
|
+
x[0] == 0 && x[1] == 0 && x[2] == 0 ? u = 1 : x[0] == 0 && x[1] == 0 && x[3] == 0 ? u = 0 : x[0] == 0 && x[2] == 0 && x[3] == 0 ? u = 3 : x[1] == 0 && x[2] == 0 && x[3] == 0 && (u = 2);
|
|
2138
2138
|
else if (Y == 2 && k == 0) {
|
|
2139
2139
|
var B = Math.floor(Math.random() * 2);
|
|
2140
|
-
|
|
2140
|
+
x[0] == 0 && x[1] == 0 ? B == 0 ? u = 0 : u = 1 : x[0] == 0 && x[2] == 0 ? B == 0 ? u = 0 : u = 2 : x[0] == 0 && x[3] == 0 ? B == 0 ? u = 0 : u = 3 : x[1] == 0 && x[2] == 0 ? B == 0 ? u = 1 : u = 2 : x[1] == 0 && x[3] == 0 ? B == 0 ? u = 1 : u = 3 : B == 0 ? u = 2 : u = 3;
|
|
2141
2141
|
} else if (Y == 4 && k == 0) {
|
|
2142
2142
|
var B = Math.floor(Math.random() * 4);
|
|
2143
2143
|
u = B;
|
|
2144
2144
|
} else
|
|
2145
2145
|
u = X;
|
|
2146
|
-
u == 0 ?
|
|
2146
|
+
u == 0 ? _.setCenter(l.getCenterX(), l.getCenterY() - l.getHeight() / 2 - f.DEFAULT_EDGE_LENGTH - _.getHeight() / 2) : u == 1 ? _.setCenter(l.getCenterX() + l.getWidth() / 2 + f.DEFAULT_EDGE_LENGTH + _.getWidth() / 2, l.getCenterY()) : u == 2 ? _.setCenter(l.getCenterX(), l.getCenterY() + l.getHeight() / 2 + f.DEFAULT_EDGE_LENGTH + _.getHeight() / 2) : _.setCenter(l.getCenterX() - l.getWidth() / 2 - f.DEFAULT_EDGE_LENGTH - _.getWidth() / 2, l.getCenterY());
|
|
2147
2147
|
}, T.exports = g;
|
|
2148
2148
|
},
|
|
2149
2149
|
/* 7 */
|
|
2150
2150
|
/***/
|
|
2151
|
-
function(T, y,
|
|
2151
|
+
function(T, y, i) {
|
|
2152
2152
|
var t = {};
|
|
2153
|
-
t.layoutBase =
|
|
2153
|
+
t.layoutBase = i(0), t.CoSEConstants = i(1), t.CoSEEdge = i(2), t.CoSEGraph = i(3), t.CoSEGraphManager = i(4), t.CoSELayout = i(6), t.CoSENode = i(5), T.exports = t;
|
|
2154
2154
|
}
|
|
2155
2155
|
/******/
|
|
2156
2156
|
])
|
|
2157
2157
|
);
|
|
2158
2158
|
});
|
|
2159
|
-
}(
|
|
2159
|
+
}(rt)), rt.exports;
|
|
2160
2160
|
}
|
|
2161
|
-
var
|
|
2162
|
-
function
|
|
2163
|
-
return
|
|
2161
|
+
var Mt = it.exports, gt;
|
|
2162
|
+
function Ct() {
|
|
2163
|
+
return gt || (gt = 1, function(O, M) {
|
|
2164
2164
|
(function(p, T) {
|
|
2165
|
-
|
|
2166
|
-
})(
|
|
2165
|
+
O.exports = T(Rt());
|
|
2166
|
+
})(Mt, function(p) {
|
|
2167
2167
|
return (
|
|
2168
2168
|
/******/
|
|
2169
2169
|
function(T) {
|
|
2170
2170
|
var y = {};
|
|
2171
|
-
function
|
|
2171
|
+
function i(t) {
|
|
2172
2172
|
if (y[t])
|
|
2173
2173
|
return y[t].exports;
|
|
2174
2174
|
var e = y[t] = {
|
|
@@ -2180,21 +2180,21 @@ function Gt() {
|
|
|
2180
2180
|
exports: {}
|
|
2181
2181
|
/******/
|
|
2182
2182
|
};
|
|
2183
|
-
return T[t].call(e.exports, e, e.exports,
|
|
2183
|
+
return T[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports;
|
|
2184
2184
|
}
|
|
2185
|
-
return
|
|
2185
|
+
return i.m = T, i.c = y, i.i = function(t) {
|
|
2186
2186
|
return t;
|
|
2187
|
-
},
|
|
2188
|
-
|
|
2187
|
+
}, i.d = function(t, e, r) {
|
|
2188
|
+
i.o(t, e) || Object.defineProperty(t, e, {
|
|
2189
2189
|
/******/
|
|
2190
2190
|
configurable: !1,
|
|
2191
2191
|
/******/
|
|
2192
2192
|
enumerable: !0,
|
|
2193
2193
|
/******/
|
|
2194
|
-
get:
|
|
2194
|
+
get: r
|
|
2195
2195
|
/******/
|
|
2196
2196
|
});
|
|
2197
|
-
},
|
|
2197
|
+
}, i.n = function(t) {
|
|
2198
2198
|
var e = t && t.__esModule ? (
|
|
2199
2199
|
/******/
|
|
2200
2200
|
function() {
|
|
@@ -2206,10 +2206,10 @@ function Gt() {
|
|
|
2206
2206
|
return t;
|
|
2207
2207
|
}
|
|
2208
2208
|
);
|
|
2209
|
-
return
|
|
2210
|
-
},
|
|
2209
|
+
return i.d(e, "a", e), e;
|
|
2210
|
+
}, i.o = function(t, e) {
|
|
2211
2211
|
return Object.prototype.hasOwnProperty.call(t, e);
|
|
2212
|
-
},
|
|
2212
|
+
}, i.p = "", i(i.s = 1);
|
|
2213
2213
|
}([
|
|
2214
2214
|
/* 0 */
|
|
2215
2215
|
/***/
|
|
@@ -2218,8 +2218,8 @@ function Gt() {
|
|
|
2218
2218
|
},
|
|
2219
2219
|
/* 1 */
|
|
2220
2220
|
/***/
|
|
2221
|
-
function(T, y,
|
|
2222
|
-
var t =
|
|
2221
|
+
function(T, y, i) {
|
|
2222
|
+
var t = i(0).layoutBase.LayoutConstants, e = i(0).layoutBase.FDLayoutConstants, r = i(0).CoSEConstants, a = i(0).CoSELayout, h = i(0).CoSENode, s = i(0).layoutBase.PointD, f = i(0).layoutBase.DimensionD, o = {
|
|
2223
2223
|
// Called on `layoutready`
|
|
2224
2224
|
ready: function() {
|
|
2225
2225
|
},
|
|
@@ -2272,76 +2272,76 @@ function Gt() {
|
|
|
2272
2272
|
// Initial cooling factor for incremental layout
|
|
2273
2273
|
initialEnergyOnIncremental: 0.5
|
|
2274
2274
|
};
|
|
2275
|
-
function d(
|
|
2276
|
-
var
|
|
2277
|
-
for (var g in
|
|
2278
|
-
|
|
2275
|
+
function d(v, N) {
|
|
2276
|
+
var D = {};
|
|
2277
|
+
for (var g in v)
|
|
2278
|
+
D[g] = v[g];
|
|
2279
2279
|
for (var g in N)
|
|
2280
|
-
|
|
2281
|
-
return
|
|
2280
|
+
D[g] = N[g];
|
|
2281
|
+
return D;
|
|
2282
2282
|
}
|
|
2283
|
-
function c(
|
|
2284
|
-
this.options = d(o,
|
|
2283
|
+
function c(v) {
|
|
2284
|
+
this.options = d(o, v), E(this.options);
|
|
2285
2285
|
}
|
|
2286
|
-
var E = function(
|
|
2287
|
-
|
|
2286
|
+
var E = function(v) {
|
|
2287
|
+
v.nodeRepulsion != null && (r.DEFAULT_REPULSION_STRENGTH = e.DEFAULT_REPULSION_STRENGTH = v.nodeRepulsion), v.idealEdgeLength != null && (r.DEFAULT_EDGE_LENGTH = e.DEFAULT_EDGE_LENGTH = v.idealEdgeLength), v.edgeElasticity != null && (r.DEFAULT_SPRING_STRENGTH = e.DEFAULT_SPRING_STRENGTH = v.edgeElasticity), v.nestingFactor != null && (r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = v.nestingFactor), v.gravity != null && (r.DEFAULT_GRAVITY_STRENGTH = e.DEFAULT_GRAVITY_STRENGTH = v.gravity), v.numIter != null && (r.MAX_ITERATIONS = e.MAX_ITERATIONS = v.numIter), v.gravityRange != null && (r.DEFAULT_GRAVITY_RANGE_FACTOR = e.DEFAULT_GRAVITY_RANGE_FACTOR = v.gravityRange), v.gravityCompound != null && (r.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = v.gravityCompound), v.gravityRangeCompound != null && (r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = v.gravityRangeCompound), v.initialEnergyOnIncremental != null && (r.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.DEFAULT_COOLING_FACTOR_INCREMENTAL = v.initialEnergyOnIncremental), v.quality == "draft" ? t.QUALITY = 0 : v.quality == "proof" ? t.QUALITY = 2 : t.QUALITY = 1, r.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = v.nodeDimensionsIncludeLabels, r.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = !v.randomize, r.ANIMATE = e.ANIMATE = t.ANIMATE = v.animate, r.TILE = v.tile, r.TILING_PADDING_VERTICAL = typeof v.tilingPaddingVertical == "function" ? v.tilingPaddingVertical.call() : v.tilingPaddingVertical, r.TILING_PADDING_HORIZONTAL = typeof v.tilingPaddingHorizontal == "function" ? v.tilingPaddingHorizontal.call() : v.tilingPaddingHorizontal;
|
|
2288
2288
|
};
|
|
2289
2289
|
c.prototype.run = function() {
|
|
2290
|
-
var
|
|
2290
|
+
var v, N, D = this.options;
|
|
2291
2291
|
this.idToLNode = {};
|
|
2292
|
-
var g = this.layout = new a(),
|
|
2293
|
-
|
|
2292
|
+
var g = this.layout = new a(), L = this;
|
|
2293
|
+
L.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
|
|
2294
2294
|
var n = g.newGraphManager();
|
|
2295
2295
|
this.gm = n;
|
|
2296
2296
|
var u = this.options.eles.nodes(), l = this.options.eles.edges();
|
|
2297
2297
|
this.root = n.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(u), g);
|
|
2298
|
-
for (var
|
|
2299
|
-
var A = l[
|
|
2300
|
-
if (
|
|
2301
|
-
var
|
|
2302
|
-
|
|
2298
|
+
for (var _ = 0; _ < l.length; _++) {
|
|
2299
|
+
var A = l[_], I = this.idToLNode[A.data("source")], w = this.idToLNode[A.data("target")];
|
|
2300
|
+
if (I !== w && I.getEdgesBetween(w).length == 0) {
|
|
2301
|
+
var R = n.add(g.newEdge(), I, w);
|
|
2302
|
+
R.id = A.id();
|
|
2303
2303
|
}
|
|
2304
2304
|
}
|
|
2305
|
-
var
|
|
2306
|
-
typeof b == "number" && (b =
|
|
2307
|
-
var
|
|
2305
|
+
var S = function(b, C) {
|
|
2306
|
+
typeof b == "number" && (b = C);
|
|
2307
|
+
var x = b.data("id"), F = L.idToLNode[x];
|
|
2308
2308
|
return {
|
|
2309
2309
|
x: F.getRect().getCenterX(),
|
|
2310
2310
|
y: F.getRect().getCenterY()
|
|
2311
2311
|
};
|
|
2312
2312
|
}, U = function b() {
|
|
2313
|
-
for (var
|
|
2314
|
-
|
|
2315
|
-
},
|
|
2316
|
-
F =
|
|
2313
|
+
for (var C = function() {
|
|
2314
|
+
D.fit && D.cy.fit(D.eles, D.padding), v || (v = !0, L.cy.one("layoutready", D.ready), L.cy.trigger({ type: "layoutready", layout: L }));
|
|
2315
|
+
}, x = L.options.refresh, F, k = 0; k < x && !F; k++)
|
|
2316
|
+
F = L.stopped || L.layout.tick();
|
|
2317
2317
|
if (F) {
|
|
2318
|
-
g.checkLayoutSuccess() && !g.isSubLayout && g.doPostLayout(), g.tilingPostLayout && g.tilingPostLayout(), g.isLayoutFinished = !0,
|
|
2318
|
+
g.checkLayoutSuccess() && !g.isSubLayout && g.doPostLayout(), g.tilingPostLayout && g.tilingPostLayout(), g.isLayoutFinished = !0, L.options.eles.nodes().positions(S), C(), L.cy.one("layoutstop", L.options.stop), L.cy.trigger({ type: "layoutstop", layout: L }), N && cancelAnimationFrame(N), v = !1;
|
|
2319
2319
|
return;
|
|
2320
2320
|
}
|
|
2321
|
-
var Y =
|
|
2322
|
-
|
|
2321
|
+
var Y = L.layout.getPositionsData();
|
|
2322
|
+
D.eles.nodes().positions(function(X, P) {
|
|
2323
2323
|
if (typeof X == "number" && (X = P), !X.isParent()) {
|
|
2324
|
-
for (var B = X.id(),
|
|
2324
|
+
for (var B = X.id(), $ = Y[B], H = X; $ == null && ($ = Y[H.data("parent")] || Y["DummyCompound_" + H.data("parent")], Y[B] = $, H = H.parent()[0], H != null); )
|
|
2325
2325
|
;
|
|
2326
|
-
return
|
|
2327
|
-
x:
|
|
2328
|
-
y:
|
|
2326
|
+
return $ != null ? {
|
|
2327
|
+
x: $.x,
|
|
2328
|
+
y: $.y
|
|
2329
2329
|
} : {
|
|
2330
2330
|
x: X.position("x"),
|
|
2331
2331
|
y: X.position("y")
|
|
2332
2332
|
};
|
|
2333
2333
|
}
|
|
2334
|
-
}),
|
|
2334
|
+
}), C(), N = requestAnimationFrame(b);
|
|
2335
2335
|
};
|
|
2336
2336
|
return g.addListener("layoutstarted", function() {
|
|
2337
|
-
|
|
2338
|
-
}), g.runLayout(), this.options.animate !== "during" && (
|
|
2339
|
-
}, c.prototype.getTopMostNodes = function(
|
|
2340
|
-
for (var N = {},
|
|
2341
|
-
N[
|
|
2342
|
-
var g =
|
|
2343
|
-
typeof
|
|
2344
|
-
for (var u =
|
|
2337
|
+
L.options.animate === "during" && (N = requestAnimationFrame(U));
|
|
2338
|
+
}), g.runLayout(), this.options.animate !== "during" && (L.options.eles.nodes().not(":parent").layoutPositions(L, L.options, S), v = !1), this;
|
|
2339
|
+
}, c.prototype.getTopMostNodes = function(v) {
|
|
2340
|
+
for (var N = {}, D = 0; D < v.length; D++)
|
|
2341
|
+
N[v[D].id()] = !0;
|
|
2342
|
+
var g = v.filter(function(L, n) {
|
|
2343
|
+
typeof L == "number" && (L = n);
|
|
2344
|
+
for (var u = L.parent()[0]; u != null; ) {
|
|
2345
2345
|
if (N[u.id()])
|
|
2346
2346
|
return !1;
|
|
2347
2347
|
u = u.parent()[0];
|
|
@@ -2349,48 +2349,48 @@ function Gt() {
|
|
|
2349
2349
|
return !0;
|
|
2350
2350
|
});
|
|
2351
2351
|
return g;
|
|
2352
|
-
}, c.prototype.processChildrenList = function(
|
|
2353
|
-
for (var g = N.length,
|
|
2354
|
-
var n = N[
|
|
2352
|
+
}, c.prototype.processChildrenList = function(v, N, D) {
|
|
2353
|
+
for (var g = N.length, L = 0; L < g; L++) {
|
|
2354
|
+
var n = N[L], u = n.children(), l, _ = n.layoutDimensions({
|
|
2355
2355
|
nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
|
|
2356
2356
|
});
|
|
2357
|
-
if (n.outerWidth() != null && n.outerHeight() != null ? l =
|
|
2358
|
-
var A = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).w,
|
|
2359
|
-
l.labelWidth = A, l.labelHeight =
|
|
2357
|
+
if (n.outerWidth() != null && n.outerHeight() != null ? l = v.add(new h(D.graphManager, new s(n.position("x") - _.w / 2, n.position("y") - _.h / 2), new f(parseFloat(_.w), parseFloat(_.h)))) : l = v.add(new h(this.graphManager)), l.id = n.data("id"), l.paddingLeft = parseInt(n.css("padding")), l.paddingTop = parseInt(n.css("padding")), l.paddingRight = parseInt(n.css("padding")), l.paddingBottom = parseInt(n.css("padding")), this.options.nodeDimensionsIncludeLabels && n.isParent()) {
|
|
2358
|
+
var A = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, I = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, w = n.css("text-halign");
|
|
2359
|
+
l.labelWidth = A, l.labelHeight = I, l.labelPos = w;
|
|
2360
2360
|
}
|
|
2361
2361
|
if (this.idToLNode[n.data("id")] = l, isNaN(l.rect.x) && (l.rect.x = 0), isNaN(l.rect.y) && (l.rect.y = 0), u != null && u.length > 0) {
|
|
2362
|
-
var
|
|
2363
|
-
|
|
2362
|
+
var R;
|
|
2363
|
+
R = D.getGraphManager().add(D.newGraph(), l), this.processChildrenList(R, u, D);
|
|
2364
2364
|
}
|
|
2365
2365
|
}
|
|
2366
2366
|
}, c.prototype.stop = function() {
|
|
2367
2367
|
return this.stopped = !0, this;
|
|
2368
2368
|
};
|
|
2369
|
-
var
|
|
2370
|
-
|
|
2369
|
+
var m = function(v) {
|
|
2370
|
+
v("layout", "cose-bilkent", c);
|
|
2371
2371
|
};
|
|
2372
|
-
typeof cytoscape < "u" &&
|
|
2372
|
+
typeof cytoscape < "u" && m(cytoscape), T.exports = m;
|
|
2373
2373
|
}
|
|
2374
2374
|
/******/
|
|
2375
2375
|
])
|
|
2376
2376
|
);
|
|
2377
2377
|
});
|
|
2378
|
-
}(
|
|
2378
|
+
}(it)), it.exports;
|
|
2379
2379
|
}
|
|
2380
|
-
var
|
|
2381
|
-
const
|
|
2380
|
+
var xt = Ct();
|
|
2381
|
+
const St = /* @__PURE__ */ Lt(xt);
|
|
2382
2382
|
var ot = function() {
|
|
2383
|
-
var
|
|
2384
|
-
for (
|
|
2385
|
-
return
|
|
2386
|
-
}, "o"),
|
|
2387
|
-
trace: /* @__PURE__ */
|
|
2383
|
+
var O = /* @__PURE__ */ G(function(D, g, L, n) {
|
|
2384
|
+
for (L = L || {}, n = D.length; n--; L[D[n]] = g) ;
|
|
2385
|
+
return L;
|
|
2386
|
+
}, "o"), M = [1, 4], p = [1, 13], T = [1, 12], y = [1, 15], i = [1, 16], t = [1, 20], e = [1, 19], r = [6, 7, 8], a = [1, 26], h = [1, 24], s = [1, 25], f = [6, 7, 11], o = [1, 6, 13, 15, 16, 19, 22], d = [1, 33], c = [1, 34], E = [1, 6, 7, 11, 13, 15, 16, 19, 22], m = {
|
|
2387
|
+
trace: /* @__PURE__ */ G(function() {
|
|
2388
2388
|
}, "trace"),
|
|
2389
2389
|
yy: {},
|
|
2390
2390
|
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 },
|
|
2391
2391
|
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" },
|
|
2392
2392
|
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]],
|
|
2393
|
-
performAction: /* @__PURE__ */
|
|
2393
|
+
performAction: /* @__PURE__ */ G(function(D, g, L, n, u, l, _) {
|
|
2394
2394
|
var A = l.length - 1;
|
|
2395
2395
|
switch (u) {
|
|
2396
2396
|
case 6:
|
|
@@ -2438,76 +2438,76 @@ var ot = function() {
|
|
|
2438
2438
|
break;
|
|
2439
2439
|
}
|
|
2440
2440
|
}, "anonymous"),
|
|
2441
|
-
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8:
|
|
2441
|
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: M }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: M }, { 6: p, 7: [1, 10], 9: 9, 12: 11, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, O(r, [2, 3]), { 1: [2, 2] }, O(r, [2, 4]), O(r, [2, 5]), { 1: [2, 6], 6: p, 12: 21, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, { 6: p, 9: 22, 12: 11, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, { 6: a, 7: h, 10: 23, 11: s }, O(f, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: t, 22: e }), O(f, [2, 18]), O(f, [2, 19]), O(f, [2, 20]), O(f, [2, 21]), O(f, [2, 23]), O(f, [2, 24]), O(f, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: a, 7: h, 10: 32, 11: s }, { 1: [2, 7], 6: p, 12: 21, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, O(o, [2, 14], { 7: d, 11: c }), O(E, [2, 8]), O(E, [2, 9]), O(E, [2, 10]), O(f, [2, 15]), O(f, [2, 16]), O(f, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, O(o, [2, 13], { 7: d, 11: c }), O(E, [2, 11]), O(E, [2, 12]), { 21: [1, 37] }, O(f, [2, 25]), O(f, [2, 27])],
|
|
2442
2442
|
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
2443
|
-
parseError: /* @__PURE__ */
|
|
2443
|
+
parseError: /* @__PURE__ */ G(function(D, g) {
|
|
2444
2444
|
if (g.recoverable)
|
|
2445
|
-
this.trace(
|
|
2445
|
+
this.trace(D);
|
|
2446
2446
|
else {
|
|
2447
|
-
var
|
|
2448
|
-
throw
|
|
2447
|
+
var L = new Error(D);
|
|
2448
|
+
throw L.hash = g, L;
|
|
2449
2449
|
}
|
|
2450
2450
|
}, "parseError"),
|
|
2451
|
-
parse: /* @__PURE__ */
|
|
2452
|
-
var g = this,
|
|
2453
|
-
for (var
|
|
2454
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
2455
|
-
b.setInput(
|
|
2451
|
+
parse: /* @__PURE__ */ G(function(D) {
|
|
2452
|
+
var g = this, L = [0], n = [], u = [null], l = [], _ = this.table, A = "", I = 0, w = 0, R = 2, S = 1, U = l.slice.call(arguments, 1), b = Object.create(this.lexer), C = { yy: {} };
|
|
2453
|
+
for (var x in this.yy)
|
|
2454
|
+
Object.prototype.hasOwnProperty.call(this.yy, x) && (C.yy[x] = this.yy[x]);
|
|
2455
|
+
b.setInput(D, C.yy), C.yy.lexer = b, C.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
2456
2456
|
var F = b.yylloc;
|
|
2457
2457
|
l.push(F);
|
|
2458
2458
|
var k = b.options && b.options.ranges;
|
|
2459
|
-
typeof
|
|
2460
|
-
function Y(
|
|
2461
|
-
|
|
2459
|
+
typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
2460
|
+
function Y(W) {
|
|
2461
|
+
L.length = L.length - 2 * W, u.length = u.length - W, l.length = l.length - W;
|
|
2462
2462
|
}
|
|
2463
|
-
|
|
2463
|
+
G(Y, "popStack");
|
|
2464
2464
|
function X() {
|
|
2465
|
-
var
|
|
2466
|
-
return
|
|
2465
|
+
var W;
|
|
2466
|
+
return W = n.pop() || b.lex() || S, typeof W != "number" && (W instanceof Array && (n = W, W = n.pop()), W = g.symbols_[W] || W), W;
|
|
2467
2467
|
}
|
|
2468
|
-
|
|
2469
|
-
for (var P, B, H,
|
|
2470
|
-
if (B =
|
|
2471
|
-
var
|
|
2472
|
-
|
|
2473
|
-
for (
|
|
2474
|
-
this.terminals_[
|
|
2475
|
-
b.showPosition ?
|
|
2468
|
+
G(X, "lex");
|
|
2469
|
+
for (var P, B, $, H, V = {}, z, j, ht, Z; ; ) {
|
|
2470
|
+
if (B = L[L.length - 1], this.defaultActions[B] ? $ = this.defaultActions[B] : ((P === null || typeof P > "u") && (P = X()), $ = _[B] && _[B][P]), typeof $ > "u" || !$.length || !$[0]) {
|
|
2471
|
+
var J = "";
|
|
2472
|
+
Z = [];
|
|
2473
|
+
for (z in _[B])
|
|
2474
|
+
this.terminals_[z] && z > R && Z.push("'" + this.terminals_[z] + "'");
|
|
2475
|
+
b.showPosition ? J = "Parse error on line " + (I + 1) + `:
|
|
2476
2476
|
` + b.showPosition() + `
|
|
2477
|
-
Expecting ` +
|
|
2477
|
+
Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : J = "Parse error on line " + (I + 1) + ": Unexpected " + (P == S ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(J, {
|
|
2478
2478
|
text: b.match,
|
|
2479
2479
|
token: this.terminals_[P] || P,
|
|
2480
2480
|
line: b.yylineno,
|
|
2481
2481
|
loc: F,
|
|
2482
|
-
expected:
|
|
2482
|
+
expected: Z
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
2485
|
-
if (
|
|
2485
|
+
if ($[0] instanceof Array && $.length > 1)
|
|
2486
2486
|
throw new Error("Parse Error: multiple actions possible at state: " + B + ", token: " + P);
|
|
2487
|
-
switch (
|
|
2487
|
+
switch ($[0]) {
|
|
2488
2488
|
case 1:
|
|
2489
|
-
|
|
2489
|
+
L.push(P), u.push(b.yytext), l.push(b.yylloc), L.push($[1]), P = null, w = b.yyleng, A = b.yytext, I = b.yylineno, F = b.yylloc;
|
|
2490
2490
|
break;
|
|
2491
2491
|
case 2:
|
|
2492
|
-
if (j = this.productions_[
|
|
2492
|
+
if (j = this.productions_[$[1]][1], V.$ = u[u.length - j], V._$ = {
|
|
2493
2493
|
first_line: l[l.length - (j || 1)].first_line,
|
|
2494
2494
|
last_line: l[l.length - 1].last_line,
|
|
2495
2495
|
first_column: l[l.length - (j || 1)].first_column,
|
|
2496
2496
|
last_column: l[l.length - 1].last_column
|
|
2497
|
-
}, k && (
|
|
2497
|
+
}, k && (V._$.range = [
|
|
2498
2498
|
l[l.length - (j || 1)].range[0],
|
|
2499
2499
|
l[l.length - 1].range[1]
|
|
2500
|
-
]),
|
|
2500
|
+
]), H = this.performAction.apply(V, [
|
|
2501
2501
|
A,
|
|
2502
|
-
I,
|
|
2503
2502
|
w,
|
|
2504
|
-
|
|
2505
|
-
|
|
2503
|
+
I,
|
|
2504
|
+
C.yy,
|
|
2505
|
+
$[1],
|
|
2506
2506
|
u,
|
|
2507
2507
|
l
|
|
2508
|
-
].concat(U)), typeof
|
|
2509
|
-
return
|
|
2510
|
-
j && (
|
|
2508
|
+
].concat(U)), typeof H < "u")
|
|
2509
|
+
return H;
|
|
2510
|
+
j && (L = L.slice(0, -1 * j * 2), u = u.slice(0, -1 * j), l = l.slice(0, -1 * j)), L.push(this.productions_[$[1]][0]), u.push(V.$), l.push(V._$), ht = _[L[L.length - 2]][L[L.length - 1]], L.push(ht);
|
|
2511
2511
|
break;
|
|
2512
2512
|
case 3:
|
|
2513
2513
|
return !0;
|
|
@@ -2515,18 +2515,18 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2515
2515
|
}
|
|
2516
2516
|
return !0;
|
|
2517
2517
|
}, "parse")
|
|
2518
|
-
},
|
|
2519
|
-
var
|
|
2518
|
+
}, v = /* @__PURE__ */ function() {
|
|
2519
|
+
var D = {
|
|
2520
2520
|
EOF: 1,
|
|
2521
|
-
parseError: /* @__PURE__ */
|
|
2521
|
+
parseError: /* @__PURE__ */ G(function(g, L) {
|
|
2522
2522
|
if (this.yy.parser)
|
|
2523
|
-
this.yy.parser.parseError(g,
|
|
2523
|
+
this.yy.parser.parseError(g, L);
|
|
2524
2524
|
else
|
|
2525
2525
|
throw new Error(g);
|
|
2526
2526
|
}, "parseError"),
|
|
2527
2527
|
// resets the lexer, sets new input
|
|
2528
|
-
setInput: /* @__PURE__ */
|
|
2529
|
-
return this.yy =
|
|
2528
|
+
setInput: /* @__PURE__ */ G(function(g, L) {
|
|
2529
|
+
return this.yy = L || this.yy || {}, this._input = g, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
2530
2530
|
first_line: 1,
|
|
2531
2531
|
first_column: 0,
|
|
2532
2532
|
last_line: 1,
|
|
@@ -2534,16 +2534,16 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2534
2534
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
2535
2535
|
}, "setInput"),
|
|
2536
2536
|
// consumes and returns one char from the input
|
|
2537
|
-
input: /* @__PURE__ */
|
|
2537
|
+
input: /* @__PURE__ */ G(function() {
|
|
2538
2538
|
var g = this._input[0];
|
|
2539
2539
|
this.yytext += g, this.yyleng++, this.offset++, this.match += g, this.matched += g;
|
|
2540
|
-
var
|
|
2541
|
-
return
|
|
2540
|
+
var L = g.match(/(?:\r\n?|\n).*/g);
|
|
2541
|
+
return L ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), g;
|
|
2542
2542
|
}, "input"),
|
|
2543
2543
|
// unshifts one char (or a string) into the input
|
|
2544
|
-
unput: /* @__PURE__ */
|
|
2545
|
-
var
|
|
2546
|
-
this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length -
|
|
2544
|
+
unput: /* @__PURE__ */ G(function(g) {
|
|
2545
|
+
var L = g.length, n = g.split(/(?:\r\n?|\n)/g);
|
|
2546
|
+
this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - L), this.offset -= L;
|
|
2547
2547
|
var u = this.match.split(/(?:\r\n?|\n)/g);
|
|
2548
2548
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
2549
2549
|
var l = this.yylloc.range;
|
|
@@ -2551,15 +2551,15 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2551
2551
|
first_line: this.yylloc.first_line,
|
|
2552
2552
|
last_line: this.yylineno + 1,
|
|
2553
2553
|
first_column: this.yylloc.first_column,
|
|
2554
|
-
last_column: n ? (n.length === u.length ? this.yylloc.first_column : 0) + u[u.length - n.length].length - n[0].length : this.yylloc.first_column -
|
|
2555
|
-
}, this.options.ranges && (this.yylloc.range = [l[0], l[0] + this.yyleng -
|
|
2554
|
+
last_column: n ? (n.length === u.length ? this.yylloc.first_column : 0) + u[u.length - n.length].length - n[0].length : this.yylloc.first_column - L
|
|
2555
|
+
}, this.options.ranges && (this.yylloc.range = [l[0], l[0] + this.yyleng - L]), this.yyleng = this.yytext.length, this;
|
|
2556
2556
|
}, "unput"),
|
|
2557
2557
|
// When called from action, caches matched text and appends it on next action
|
|
2558
|
-
more: /* @__PURE__ */
|
|
2558
|
+
more: /* @__PURE__ */ G(function() {
|
|
2559
2559
|
return this._more = !0, this;
|
|
2560
2560
|
}, "more"),
|
|
2561
2561
|
// 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.
|
|
2562
|
-
reject: /* @__PURE__ */
|
|
2562
|
+
reject: /* @__PURE__ */ G(function() {
|
|
2563
2563
|
if (this.options.backtrack_lexer)
|
|
2564
2564
|
this._backtrack = !0;
|
|
2565
2565
|
else
|
|
@@ -2572,27 +2572,27 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2572
2572
|
return this;
|
|
2573
2573
|
}, "reject"),
|
|
2574
2574
|
// retain first n characters of the match
|
|
2575
|
-
less: /* @__PURE__ */
|
|
2575
|
+
less: /* @__PURE__ */ G(function(g) {
|
|
2576
2576
|
this.unput(this.match.slice(g));
|
|
2577
2577
|
}, "less"),
|
|
2578
2578
|
// displays already matched input, i.e. for error messages
|
|
2579
|
-
pastInput: /* @__PURE__ */
|
|
2579
|
+
pastInput: /* @__PURE__ */ G(function() {
|
|
2580
2580
|
var g = this.matched.substr(0, this.matched.length - this.match.length);
|
|
2581
2581
|
return (g.length > 20 ? "..." : "") + g.substr(-20).replace(/\n/g, "");
|
|
2582
2582
|
}, "pastInput"),
|
|
2583
2583
|
// displays upcoming input, i.e. for error messages
|
|
2584
|
-
upcomingInput: /* @__PURE__ */
|
|
2584
|
+
upcomingInput: /* @__PURE__ */ G(function() {
|
|
2585
2585
|
var g = this.match;
|
|
2586
2586
|
return g.length < 20 && (g += this._input.substr(0, 20 - g.length)), (g.substr(0, 20) + (g.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
2587
2587
|
}, "upcomingInput"),
|
|
2588
2588
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
2589
|
-
showPosition: /* @__PURE__ */
|
|
2590
|
-
var g = this.pastInput(),
|
|
2589
|
+
showPosition: /* @__PURE__ */ G(function() {
|
|
2590
|
+
var g = this.pastInput(), L = new Array(g.length + 1).join("-");
|
|
2591
2591
|
return g + this.upcomingInput() + `
|
|
2592
|
-
` +
|
|
2592
|
+
` + L + "^";
|
|
2593
2593
|
}, "showPosition"),
|
|
2594
2594
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
2595
|
-
test_match: /* @__PURE__ */
|
|
2595
|
+
test_match: /* @__PURE__ */ G(function(g, L) {
|
|
2596
2596
|
var n, u, l;
|
|
2597
2597
|
if (this.options.backtrack_lexer && (l = {
|
|
2598
2598
|
yylineno: this.yylineno,
|
|
@@ -2618,36 +2618,36 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2618
2618
|
last_line: this.yylineno + 1,
|
|
2619
2619
|
first_column: this.yylloc.last_column,
|
|
2620
2620
|
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + g[0].length
|
|
2621
|
-
}, this.yytext += g[0], this.match += g[0], this.matches = g, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(g[0].length), this.matched += g[0], n = this.performAction.call(this, this.yy, this,
|
|
2621
|
+
}, this.yytext += g[0], this.match += g[0], this.matches = g, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(g[0].length), this.matched += g[0], n = this.performAction.call(this, this.yy, this, L, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
2622
2622
|
return n;
|
|
2623
2623
|
if (this._backtrack) {
|
|
2624
|
-
for (var
|
|
2625
|
-
this[
|
|
2624
|
+
for (var _ in l)
|
|
2625
|
+
this[_] = l[_];
|
|
2626
2626
|
return !1;
|
|
2627
2627
|
}
|
|
2628
2628
|
return !1;
|
|
2629
2629
|
}, "test_match"),
|
|
2630
2630
|
// return next match in input
|
|
2631
|
-
next: /* @__PURE__ */
|
|
2631
|
+
next: /* @__PURE__ */ G(function() {
|
|
2632
2632
|
if (this.done)
|
|
2633
2633
|
return this.EOF;
|
|
2634
2634
|
this._input || (this.done = !0);
|
|
2635
|
-
var g,
|
|
2635
|
+
var g, L, n, u;
|
|
2636
2636
|
this._more || (this.yytext = "", this.match = "");
|
|
2637
|
-
for (var l = this._currentRules(),
|
|
2638
|
-
if (n = this._input.match(this.rules[l[
|
|
2639
|
-
if (
|
|
2640
|
-
if (g = this.test_match(n, l[
|
|
2637
|
+
for (var l = this._currentRules(), _ = 0; _ < l.length; _++)
|
|
2638
|
+
if (n = this._input.match(this.rules[l[_]]), n && (!L || n[0].length > L[0].length)) {
|
|
2639
|
+
if (L = n, u = _, this.options.backtrack_lexer) {
|
|
2640
|
+
if (g = this.test_match(n, l[_]), g !== !1)
|
|
2641
2641
|
return g;
|
|
2642
2642
|
if (this._backtrack) {
|
|
2643
|
-
|
|
2643
|
+
L = !1;
|
|
2644
2644
|
continue;
|
|
2645
2645
|
} else
|
|
2646
2646
|
return !1;
|
|
2647
2647
|
} else if (!this.options.flex)
|
|
2648
2648
|
break;
|
|
2649
2649
|
}
|
|
2650
|
-
return
|
|
2650
|
+
return L ? (g = this.test_match(L, l[u]), g !== !1 ? g : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
2651
2651
|
` + this.showPosition(), {
|
|
2652
2652
|
text: "",
|
|
2653
2653
|
token: null,
|
|
@@ -2655,40 +2655,40 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2655
2655
|
});
|
|
2656
2656
|
}, "next"),
|
|
2657
2657
|
// return next match that has a token
|
|
2658
|
-
lex: /* @__PURE__ */
|
|
2658
|
+
lex: /* @__PURE__ */ G(function() {
|
|
2659
2659
|
var g = this.next();
|
|
2660
2660
|
return g || this.lex();
|
|
2661
2661
|
}, "lex"),
|
|
2662
2662
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
2663
|
-
begin: /* @__PURE__ */
|
|
2663
|
+
begin: /* @__PURE__ */ G(function(g) {
|
|
2664
2664
|
this.conditionStack.push(g);
|
|
2665
2665
|
}, "begin"),
|
|
2666
2666
|
// pop the previously active lexer condition state off the condition stack
|
|
2667
|
-
popState: /* @__PURE__ */
|
|
2667
|
+
popState: /* @__PURE__ */ G(function() {
|
|
2668
2668
|
var g = this.conditionStack.length - 1;
|
|
2669
2669
|
return g > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
2670
2670
|
}, "popState"),
|
|
2671
2671
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
2672
|
-
_currentRules: /* @__PURE__ */
|
|
2672
|
+
_currentRules: /* @__PURE__ */ G(function() {
|
|
2673
2673
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
2674
2674
|
}, "_currentRules"),
|
|
2675
2675
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
2676
|
-
topState: /* @__PURE__ */
|
|
2676
|
+
topState: /* @__PURE__ */ G(function(g) {
|
|
2677
2677
|
return g = this.conditionStack.length - 1 - Math.abs(g || 0), g >= 0 ? this.conditionStack[g] : "INITIAL";
|
|
2678
2678
|
}, "topState"),
|
|
2679
2679
|
// alias for begin(condition)
|
|
2680
|
-
pushState: /* @__PURE__ */
|
|
2680
|
+
pushState: /* @__PURE__ */ G(function(g) {
|
|
2681
2681
|
this.begin(g);
|
|
2682
2682
|
}, "pushState"),
|
|
2683
2683
|
// return the number of states currently on the stack
|
|
2684
|
-
stateStackSize: /* @__PURE__ */
|
|
2684
|
+
stateStackSize: /* @__PURE__ */ G(function() {
|
|
2685
2685
|
return this.conditionStack.length;
|
|
2686
2686
|
}, "stateStackSize"),
|
|
2687
2687
|
options: { "case-insensitive": !0 },
|
|
2688
|
-
performAction: /* @__PURE__ */
|
|
2688
|
+
performAction: /* @__PURE__ */ G(function(g, L, n, u) {
|
|
2689
2689
|
switch (n) {
|
|
2690
2690
|
case 0:
|
|
2691
|
-
return g.getLogger().trace("Found comment",
|
|
2691
|
+
return g.getLogger().trace("Found comment", L.yytext), 6;
|
|
2692
2692
|
case 1:
|
|
2693
2693
|
return 8;
|
|
2694
2694
|
case 2:
|
|
@@ -2745,7 +2745,7 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2745
2745
|
g.getLogger().trace("Starting NSTR"), this.begin("NSTR");
|
|
2746
2746
|
break;
|
|
2747
2747
|
case 25:
|
|
2748
|
-
return g.getLogger().trace("description:",
|
|
2748
|
+
return g.getLogger().trace("description:", L.yytext), "NODE_DESCR";
|
|
2749
2749
|
case 26:
|
|
2750
2750
|
this.popState();
|
|
2751
2751
|
break;
|
|
@@ -2754,7 +2754,7 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2754
2754
|
case 28:
|
|
2755
2755
|
return this.popState(), g.getLogger().trace("node end )"), "NODE_DEND";
|
|
2756
2756
|
case 29:
|
|
2757
|
-
return this.popState(), g.getLogger().trace("node end ...",
|
|
2757
|
+
return this.popState(), g.getLogger().trace("node end ...", L.yytext), "NODE_DEND";
|
|
2758
2758
|
case 30:
|
|
2759
2759
|
return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
|
|
2760
2760
|
case 31:
|
|
@@ -2766,60 +2766,24 @@ Expecting ` + K.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et =
|
|
|
2766
2766
|
case 34:
|
|
2767
2767
|
return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
|
|
2768
2768
|
case 35:
|
|
2769
|
-
return g.getLogger().trace("Long description:",
|
|
2769
|
+
return g.getLogger().trace("Long description:", L.yytext), 20;
|
|
2770
2770
|
case 36:
|
|
2771
|
-
return g.getLogger().trace("Long description:",
|
|
2771
|
+
return g.getLogger().trace("Long description:", L.yytext), 20;
|
|
2772
2772
|
}
|
|
2773
2773
|
}, "anonymous"),
|
|
2774
2774
|
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],
|
|
2775
2775
|
conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
|
|
2776
2776
|
};
|
|
2777
|
-
return
|
|
2777
|
+
return D;
|
|
2778
2778
|
}();
|
|
2779
|
-
|
|
2779
|
+
m.lexer = v;
|
|
2780
2780
|
function N() {
|
|
2781
2781
|
this.yy = {};
|
|
2782
2782
|
}
|
|
2783
|
-
return
|
|
2783
|
+
return G(N, "Parser"), N.prototype = m, m.Parser = N, new N();
|
|
2784
2784
|
}();
|
|
2785
2785
|
ot.parser = ot;
|
|
2786
|
-
var
|
|
2787
|
-
z = [], ft = 0, at = {};
|
|
2788
|
-
}, "clear"), kt = /* @__PURE__ */ x(function(D) {
|
|
2789
|
-
for (let R = z.length - 1; R >= 0; R--)
|
|
2790
|
-
if (z[R].level < D)
|
|
2791
|
-
return z[R];
|
|
2792
|
-
return null;
|
|
2793
|
-
}, "getParent"), Yt = /* @__PURE__ */ x(() => z.length > 0 ? z[0] : null, "getMindmap"), Xt = /* @__PURE__ */ x((D, R, p, T) => {
|
|
2794
|
-
var y, r;
|
|
2795
|
-
Q.info("addNode", D, R, p, T);
|
|
2796
|
-
const t = st();
|
|
2797
|
-
let e = ((y = t.mindmap) == null ? void 0 : y.padding) ?? J.mindmap.padding;
|
|
2798
|
-
switch (T) {
|
|
2799
|
-
case $.ROUNDED_RECT:
|
|
2800
|
-
case $.RECT:
|
|
2801
|
-
case $.HEXAGON:
|
|
2802
|
-
e *= 2;
|
|
2803
|
-
}
|
|
2804
|
-
const i = {
|
|
2805
|
-
id: ft++,
|
|
2806
|
-
nodeId: tt(R, t),
|
|
2807
|
-
level: D,
|
|
2808
|
-
descr: tt(p, t),
|
|
2809
|
-
type: T,
|
|
2810
|
-
children: [],
|
|
2811
|
-
width: ((r = t.mindmap) == null ? void 0 : r.maxNodeWidth) ?? J.mindmap.maxNodeWidth,
|
|
2812
|
-
padding: e
|
|
2813
|
-
}, a = kt(D);
|
|
2814
|
-
if (a)
|
|
2815
|
-
a.children.push(i), z.push(i);
|
|
2816
|
-
else if (z.length === 0)
|
|
2817
|
-
z.push(i);
|
|
2818
|
-
else
|
|
2819
|
-
throw new Error(
|
|
2820
|
-
'There can be only one root. No parent could be found for ("' + i.descr + '")'
|
|
2821
|
-
);
|
|
2822
|
-
}, "addNode"), $ = {
|
|
2786
|
+
var bt = ot, Gt = {
|
|
2823
2787
|
DEFAULT: 0,
|
|
2824
2788
|
NO_BORDER: 0,
|
|
2825
2789
|
ROUNDED_RECT: 1,
|
|
@@ -2828,155 +2792,201 @@ var Pt = ot, z = [], ft = 0, at = {}, Ut = /* @__PURE__ */ x(() => {
|
|
|
2828
2792
|
CLOUD: 4,
|
|
2829
2793
|
BANG: 5,
|
|
2830
2794
|
HEXAGON: 6
|
|
2831
|
-
},
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
return $.RECT;
|
|
2835
|
-
case "(":
|
|
2836
|
-
return R === ")" ? $.ROUNDED_RECT : $.CLOUD;
|
|
2837
|
-
case "((":
|
|
2838
|
-
return $.CIRCLE;
|
|
2839
|
-
case ")":
|
|
2840
|
-
return $.CLOUD;
|
|
2841
|
-
case "))":
|
|
2842
|
-
return $.BANG;
|
|
2843
|
-
case "{{":
|
|
2844
|
-
return $.HEXAGON;
|
|
2845
|
-
default:
|
|
2846
|
-
return $.DEFAULT;
|
|
2795
|
+
}, tt, Ft = (tt = class {
|
|
2796
|
+
constructor() {
|
|
2797
|
+
this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = Gt, this.clear(), this.getType = this.getType.bind(this), this.getMindmap = this.getMindmap.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
|
|
2847
2798
|
}
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2799
|
+
clear() {
|
|
2800
|
+
this.nodes = [], this.count = 0, this.elements = {};
|
|
2801
|
+
}
|
|
2802
|
+
getParent(O) {
|
|
2803
|
+
for (let M = this.nodes.length - 1; M >= 0; M--)
|
|
2804
|
+
if (this.nodes[M].level < O)
|
|
2805
|
+
return this.nodes[M];
|
|
2806
|
+
return null;
|
|
2807
|
+
}
|
|
2808
|
+
getMindmap() {
|
|
2809
|
+
return this.nodes.length > 0 ? this.nodes[0] : null;
|
|
2810
|
+
}
|
|
2811
|
+
addNode(O, M, p, T) {
|
|
2812
|
+
var y, i;
|
|
2813
|
+
q.info("addNode", O, M, p, T);
|
|
2814
|
+
const t = et();
|
|
2815
|
+
let e = ((y = t.mindmap) == null ? void 0 : y.padding) ?? K.mindmap.padding;
|
|
2816
|
+
switch (T) {
|
|
2817
|
+
case this.nodeType.ROUNDED_RECT:
|
|
2818
|
+
case this.nodeType.RECT:
|
|
2819
|
+
case this.nodeType.HEXAGON:
|
|
2820
|
+
e *= 2;
|
|
2821
|
+
break;
|
|
2822
|
+
}
|
|
2823
|
+
const r = {
|
|
2824
|
+
id: this.count++,
|
|
2825
|
+
nodeId: Q(M, t),
|
|
2826
|
+
level: O,
|
|
2827
|
+
descr: Q(p, t),
|
|
2828
|
+
type: T,
|
|
2829
|
+
children: [],
|
|
2830
|
+
width: ((i = t.mindmap) == null ? void 0 : i.maxNodeWidth) ?? K.mindmap.maxNodeWidth,
|
|
2831
|
+
padding: e
|
|
2832
|
+
}, a = this.getParent(O);
|
|
2833
|
+
if (a)
|
|
2834
|
+
a.children.push(r), this.nodes.push(r);
|
|
2835
|
+
else if (this.nodes.length === 0)
|
|
2836
|
+
this.nodes.push(r);
|
|
2837
|
+
else
|
|
2838
|
+
throw new Error(
|
|
2839
|
+
`There can be only one root. No parent could be found for ("${r.descr}")`
|
|
2840
|
+
);
|
|
2841
|
+
}
|
|
2842
|
+
getType(O, M) {
|
|
2843
|
+
switch (q.debug("In get type", O, M), O) {
|
|
2844
|
+
case "[":
|
|
2845
|
+
return this.nodeType.RECT;
|
|
2846
|
+
case "(":
|
|
2847
|
+
return M === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
|
|
2848
|
+
case "((":
|
|
2849
|
+
return this.nodeType.CIRCLE;
|
|
2850
|
+
case ")":
|
|
2851
|
+
return this.nodeType.CLOUD;
|
|
2852
|
+
case "))":
|
|
2853
|
+
return this.nodeType.BANG;
|
|
2854
|
+
case "{{":
|
|
2855
|
+
return this.nodeType.HEXAGON;
|
|
2856
|
+
default:
|
|
2857
|
+
return this.nodeType.DEFAULT;
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
setElementForId(O, M) {
|
|
2861
|
+
this.elements[O] = M;
|
|
2862
|
+
}
|
|
2863
|
+
getElementById(O) {
|
|
2864
|
+
return this.elements[O];
|
|
2865
|
+
}
|
|
2866
|
+
decorateNode(O) {
|
|
2867
|
+
if (!O)
|
|
2868
|
+
return;
|
|
2869
|
+
const M = et(), p = this.nodes[this.nodes.length - 1];
|
|
2870
|
+
O.icon && (p.icon = Q(O.icon, M)), O.class && (p.class = Q(O.class, M));
|
|
2871
|
+
}
|
|
2872
|
+
type2Str(O) {
|
|
2873
|
+
switch (O) {
|
|
2874
|
+
case this.nodeType.DEFAULT:
|
|
2875
|
+
return "no-border";
|
|
2876
|
+
case this.nodeType.RECT:
|
|
2877
|
+
return "rect";
|
|
2878
|
+
case this.nodeType.ROUNDED_RECT:
|
|
2879
|
+
return "rounded-rect";
|
|
2880
|
+
case this.nodeType.CIRCLE:
|
|
2881
|
+
return "circle";
|
|
2882
|
+
case this.nodeType.CLOUD:
|
|
2883
|
+
return "cloud";
|
|
2884
|
+
case this.nodeType.BANG:
|
|
2885
|
+
return "bang";
|
|
2886
|
+
case this.nodeType.HEXAGON:
|
|
2887
|
+
return "hexgon";
|
|
2888
|
+
default:
|
|
2889
|
+
return "no-border";
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
getLogger() {
|
|
2893
|
+
return q;
|
|
2873
2894
|
}
|
|
2874
|
-
}, "
|
|
2875
|
-
|
|
2876
|
-
addNode: Xt,
|
|
2877
|
-
getMindmap: Yt,
|
|
2878
|
-
nodeType: $,
|
|
2879
|
-
getType: Bt,
|
|
2880
|
-
setElementForId: Ht,
|
|
2881
|
-
decorateNode: $t,
|
|
2882
|
-
type2Str: Wt,
|
|
2883
|
-
getLogger: Vt,
|
|
2884
|
-
getElementById: jt
|
|
2885
|
-
}, qt = zt, Zt = 12, Qt = /* @__PURE__ */ x(function(D, R, p, T) {
|
|
2886
|
-
R.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + D.type2Str(p.type)).attr(
|
|
2895
|
+
}, G(tt, "MindmapDB"), tt), Pt = 12, Ut = /* @__PURE__ */ G(function(O, M, p, T) {
|
|
2896
|
+
M.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
|
|
2887
2897
|
"d",
|
|
2888
|
-
`M0 ${p.height - 5} v${-p.height +
|
|
2889
|
-
),
|
|
2890
|
-
}, "defaultBkg"),
|
|
2891
|
-
|
|
2892
|
-
}, "rectBkg"),
|
|
2893
|
-
const T = p.width, y = p.height,
|
|
2894
|
-
|
|
2898
|
+
`M0 ${p.height - 5} v${-p.height + 10} q0,-5 5,-5 h${p.width - 10} q5,0 5,5 v${p.height - 5} H0 Z`
|
|
2899
|
+
), M.append("line").attr("class", "node-line-" + T).attr("x1", 0).attr("y1", p.height).attr("x2", p.width).attr("y2", p.height);
|
|
2900
|
+
}, "defaultBkg"), kt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2901
|
+
M.append("rect").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("height", p.height).attr("width", p.width);
|
|
2902
|
+
}, "rectBkg"), Yt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2903
|
+
const T = p.width, y = p.height, i = 0.15 * T, t = 0.25 * T, e = 0.35 * T, r = 0.2 * T;
|
|
2904
|
+
M.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
|
|
2895
2905
|
"d",
|
|
2896
|
-
`M0 0 a${
|
|
2906
|
+
`M0 0 a${i},${i} 0 0,1 ${T * 0.25},${-1 * T * 0.1}
|
|
2897
2907
|
a${e},${e} 1 0,1 ${T * 0.4},${-1 * T * 0.1}
|
|
2898
2908
|
a${t},${t} 1 0,1 ${T * 0.35},${1 * T * 0.2}
|
|
2899
2909
|
|
|
2900
|
-
a${
|
|
2901
|
-
a${
|
|
2910
|
+
a${i},${i} 1 0,1 ${T * 0.15},${1 * y * 0.35}
|
|
2911
|
+
a${r},${r} 1 0,1 ${-1 * T * 0.15},${1 * y * 0.65}
|
|
2902
2912
|
|
|
2903
|
-
a${t},${
|
|
2913
|
+
a${t},${i} 1 0,1 ${-1 * T * 0.25},${T * 0.15}
|
|
2904
2914
|
a${e},${e} 1 0,1 ${-1 * T * 0.5},0
|
|
2905
|
-
a${
|
|
2915
|
+
a${i},${i} 1 0,1 ${-1 * T * 0.25},${-1 * T * 0.15}
|
|
2906
2916
|
|
|
2907
|
-
a${
|
|
2908
|
-
a${
|
|
2917
|
+
a${i},${i} 1 0,1 ${-1 * T * 0.1},${-1 * y * 0.35}
|
|
2918
|
+
a${r},${r} 1 0,1 ${T * 0.1},${-1 * y * 0.65}
|
|
2909
2919
|
|
|
2910
2920
|
H0 V0 Z`
|
|
2911
2921
|
);
|
|
2912
|
-
}, "cloudBkg"),
|
|
2913
|
-
const T = p.width, y = p.height,
|
|
2914
|
-
|
|
2922
|
+
}, "cloudBkg"), Xt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2923
|
+
const T = p.width, y = p.height, i = 0.15 * T;
|
|
2924
|
+
M.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
|
|
2915
2925
|
"d",
|
|
2916
|
-
`M0 0 a${
|
|
2917
|
-
a${
|
|
2918
|
-
a${
|
|
2919
|
-
a${
|
|
2926
|
+
`M0 0 a${i},${i} 1 0,0 ${T * 0.25},${-1 * y * 0.1}
|
|
2927
|
+
a${i},${i} 1 0,0 ${T * 0.25},0
|
|
2928
|
+
a${i},${i} 1 0,0 ${T * 0.25},0
|
|
2929
|
+
a${i},${i} 1 0,0 ${T * 0.25},${1 * y * 0.1}
|
|
2920
2930
|
|
|
2921
|
-
a${
|
|
2922
|
-
a${
|
|
2923
|
-
a${
|
|
2931
|
+
a${i},${i} 1 0,0 ${T * 0.15},${1 * y * 0.33}
|
|
2932
|
+
a${i * 0.8},${i * 0.8} 1 0,0 0,${1 * y * 0.34}
|
|
2933
|
+
a${i},${i} 1 0,0 ${-1 * T * 0.15},${1 * y * 0.33}
|
|
2924
2934
|
|
|
2925
|
-
a${
|
|
2926
|
-
a${
|
|
2927
|
-
a${
|
|
2928
|
-
a${
|
|
2935
|
+
a${i},${i} 1 0,0 ${-1 * T * 0.25},${y * 0.15}
|
|
2936
|
+
a${i},${i} 1 0,0 ${-1 * T * 0.25},0
|
|
2937
|
+
a${i},${i} 1 0,0 ${-1 * T * 0.25},0
|
|
2938
|
+
a${i},${i} 1 0,0 ${-1 * T * 0.25},${-1 * y * 0.15}
|
|
2929
2939
|
|
|
2930
|
-
a${
|
|
2931
|
-
a${
|
|
2932
|
-
a${
|
|
2940
|
+
a${i},${i} 1 0,0 ${-1 * T * 0.1},${-1 * y * 0.33}
|
|
2941
|
+
a${i * 0.8},${i * 0.8} 1 0,0 0,${-1 * y * 0.34}
|
|
2942
|
+
a${i},${i} 1 0,0 ${T * 0.1},${-1 * y * 0.33}
|
|
2933
2943
|
|
|
2934
2944
|
H0 V0 Z`
|
|
2935
2945
|
);
|
|
2936
|
-
}, "bangBkg"),
|
|
2937
|
-
|
|
2946
|
+
}, "bangBkg"), Bt = /* @__PURE__ */ G(function(O, M, p) {
|
|
2947
|
+
M.append("circle").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("r", p.width / 2);
|
|
2938
2948
|
}, "circleBkg");
|
|
2939
|
-
function
|
|
2940
|
-
return
|
|
2949
|
+
function dt(O, M, p, T, y) {
|
|
2950
|
+
return O.insert("polygon", ":first-child").attr(
|
|
2941
2951
|
"points",
|
|
2942
|
-
T.map(function(
|
|
2943
|
-
return
|
|
2952
|
+
T.map(function(i) {
|
|
2953
|
+
return i.x + "," + i.y;
|
|
2944
2954
|
}).join(" ")
|
|
2945
|
-
).attr("transform", "translate(" + (y.width -
|
|
2955
|
+
).attr("transform", "translate(" + (y.width - M) / 2 + ", " + p + ")");
|
|
2946
2956
|
}
|
|
2947
|
-
|
|
2948
|
-
var
|
|
2949
|
-
const T = p.height, y = T / 4,
|
|
2957
|
+
G(dt, "insertPolygonShape");
|
|
2958
|
+
var $t = /* @__PURE__ */ G(function(O, M, p) {
|
|
2959
|
+
const T = p.height, y = T / 4, i = p.width - p.padding + 2 * y, t = [
|
|
2950
2960
|
{ x: y, y: 0 },
|
|
2951
|
-
{ x:
|
|
2952
|
-
{ x:
|
|
2953
|
-
{ x:
|
|
2961
|
+
{ x: i - y, y: 0 },
|
|
2962
|
+
{ x: i, y: -T / 2 },
|
|
2963
|
+
{ x: i - y, y: -T },
|
|
2954
2964
|
{ x: y, y: -T },
|
|
2955
2965
|
{ x: 0, y: -T / 2 }
|
|
2956
2966
|
];
|
|
2957
|
-
|
|
2958
|
-
}, "hexagonBkg"),
|
|
2959
|
-
|
|
2960
|
-
}, "roundedRectBkg"),
|
|
2961
|
-
const
|
|
2967
|
+
dt(M, i, T, t, p);
|
|
2968
|
+
}, "hexagonBkg"), Ht = /* @__PURE__ */ G(function(O, M, p) {
|
|
2969
|
+
M.append("rect").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("height", p.height).attr("rx", p.padding).attr("ry", p.padding).attr("width", p.width);
|
|
2970
|
+
}, "roundedRectBkg"), Wt = /* @__PURE__ */ G(async function(O, M, p, T, y) {
|
|
2971
|
+
const i = y.htmlLabels, t = T % (Pt - 1), e = M.append("g");
|
|
2962
2972
|
p.section = t;
|
|
2963
|
-
let
|
|
2964
|
-
t < 0 && (
|
|
2973
|
+
let r = "section-" + t;
|
|
2974
|
+
t < 0 && (r += " section-root"), e.attr("class", (p.class ? p.class + " " : "") + "mindmap-node " + r);
|
|
2965
2975
|
const a = e.append("g"), h = e.append("g"), s = p.descr.replace(/(<br\/*>)/g, `
|
|
2966
2976
|
`);
|
|
2967
|
-
await
|
|
2977
|
+
await Tt(
|
|
2968
2978
|
h,
|
|
2969
2979
|
s,
|
|
2970
2980
|
{
|
|
2971
|
-
useHtmlLabels:
|
|
2981
|
+
useHtmlLabels: i,
|
|
2972
2982
|
width: p.width,
|
|
2973
2983
|
classes: "mindmap-node-label"
|
|
2974
2984
|
},
|
|
2975
2985
|
y
|
|
2976
|
-
),
|
|
2977
|
-
const f = h.node().getBBox(), [o] =
|
|
2986
|
+
), i || h.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
|
|
2987
|
+
const f = h.node().getBBox(), [o] = Dt(y.fontSize);
|
|
2978
2988
|
if (p.height = f.height + o * 1.1 * 0.5 + p.padding, p.width = f.width + 2 * p.padding, p.icon)
|
|
2979
|
-
if (p.type ===
|
|
2989
|
+
if (p.type === O.nodeType.CIRCLE)
|
|
2980
2990
|
p.height += 50, p.width += 50, e.append("foreignObject").attr("height", "50px").attr("width", p.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + p.icon), h.attr(
|
|
2981
2991
|
"transform",
|
|
2982
2992
|
"translate(" + p.width / 2 + ", " + (p.height / 2 - 1.5 * p.padding) + ")"
|
|
@@ -2991,7 +3001,7 @@ var re = /* @__PURE__ */ x(function(D, R, p) {
|
|
|
2991
3001
|
"translate(" + (25 + p.width / 2) + ", " + (c / 2 + p.padding / 2) + ")"
|
|
2992
3002
|
);
|
|
2993
3003
|
}
|
|
2994
|
-
else if (
|
|
3004
|
+
else if (i) {
|
|
2995
3005
|
const d = (p.width - f.width) / 2, c = (p.height - f.height) / 2;
|
|
2996
3006
|
h.attr("transform", "translate(" + d + ", " + c + ")");
|
|
2997
3007
|
} else {
|
|
@@ -2999,78 +3009,78 @@ var re = /* @__PURE__ */ x(function(D, R, p) {
|
|
|
2999
3009
|
h.attr("transform", "translate(" + d + ", " + c + ")");
|
|
3000
3010
|
}
|
|
3001
3011
|
switch (p.type) {
|
|
3002
|
-
case
|
|
3003
|
-
|
|
3012
|
+
case O.nodeType.DEFAULT:
|
|
3013
|
+
Ut(O, a, p, t);
|
|
3004
3014
|
break;
|
|
3005
|
-
case
|
|
3006
|
-
|
|
3015
|
+
case O.nodeType.ROUNDED_RECT:
|
|
3016
|
+
Ht(O, a, p, t);
|
|
3007
3017
|
break;
|
|
3008
|
-
case
|
|
3009
|
-
|
|
3018
|
+
case O.nodeType.RECT:
|
|
3019
|
+
kt(O, a, p, t);
|
|
3010
3020
|
break;
|
|
3011
|
-
case
|
|
3012
|
-
a.attr("transform", "translate(" + p.width / 2 + ", " + +p.height / 2 + ")"),
|
|
3021
|
+
case O.nodeType.CIRCLE:
|
|
3022
|
+
a.attr("transform", "translate(" + p.width / 2 + ", " + +p.height / 2 + ")"), Bt(O, a, p, t);
|
|
3013
3023
|
break;
|
|
3014
|
-
case
|
|
3015
|
-
|
|
3024
|
+
case O.nodeType.CLOUD:
|
|
3025
|
+
Yt(O, a, p, t);
|
|
3016
3026
|
break;
|
|
3017
|
-
case
|
|
3018
|
-
|
|
3027
|
+
case O.nodeType.BANG:
|
|
3028
|
+
Xt(O, a, p, t);
|
|
3019
3029
|
break;
|
|
3020
|
-
case
|
|
3021
|
-
|
|
3030
|
+
case O.nodeType.HEXAGON:
|
|
3031
|
+
$t(O, a, p, t);
|
|
3022
3032
|
break;
|
|
3023
3033
|
}
|
|
3024
|
-
return
|
|
3025
|
-
}, "drawNode"),
|
|
3026
|
-
const p =
|
|
3034
|
+
return O.setElementForId(p.id, e), p.height;
|
|
3035
|
+
}, "drawNode"), jt = /* @__PURE__ */ G(function(O, M) {
|
|
3036
|
+
const p = O.getElementById(M.id), T = M.x || 0, y = M.y || 0;
|
|
3027
3037
|
p.attr("transform", "translate(" + T + "," + y + ")");
|
|
3028
3038
|
}, "positionNode");
|
|
3029
|
-
|
|
3030
|
-
async function
|
|
3031
|
-
await
|
|
3039
|
+
ut.use(St);
|
|
3040
|
+
async function st(O, M, p, T, y) {
|
|
3041
|
+
await Wt(O, M, p, T, y), p.children && await Promise.all(
|
|
3032
3042
|
p.children.map(
|
|
3033
|
-
(
|
|
3043
|
+
(i, t) => st(O, M, i, T < 0 ? t : T, y)
|
|
3034
3044
|
)
|
|
3035
3045
|
);
|
|
3036
3046
|
}
|
|
3037
|
-
|
|
3038
|
-
function
|
|
3039
|
-
|
|
3047
|
+
G(st, "drawNodes");
|
|
3048
|
+
function pt(O, M) {
|
|
3049
|
+
M.edges().map((p, T) => {
|
|
3040
3050
|
const y = p.data();
|
|
3041
3051
|
if (p[0]._private.bodyBounds) {
|
|
3042
|
-
const
|
|
3043
|
-
|
|
3052
|
+
const i = p[0]._private.rscratch;
|
|
3053
|
+
q.trace("Edge: ", T, y), O.insert("path").attr(
|
|
3044
3054
|
"d",
|
|
3045
|
-
`M ${
|
|
3055
|
+
`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `
|
|
3046
3056
|
).attr("class", "edge section-edge-" + y.section + " edge-depth-" + y.depth);
|
|
3047
3057
|
}
|
|
3048
3058
|
});
|
|
3049
3059
|
}
|
|
3050
|
-
|
|
3051
|
-
function
|
|
3052
|
-
|
|
3060
|
+
G(pt, "drawEdges");
|
|
3061
|
+
function at(O, M, p, T) {
|
|
3062
|
+
M.add({
|
|
3053
3063
|
group: "nodes",
|
|
3054
3064
|
data: {
|
|
3055
|
-
id:
|
|
3056
|
-
labelText:
|
|
3057
|
-
height:
|
|
3058
|
-
width:
|
|
3065
|
+
id: O.id.toString(),
|
|
3066
|
+
labelText: O.descr,
|
|
3067
|
+
height: O.height,
|
|
3068
|
+
width: O.width,
|
|
3059
3069
|
level: T,
|
|
3060
|
-
nodeId:
|
|
3061
|
-
padding:
|
|
3062
|
-
type:
|
|
3070
|
+
nodeId: O.id,
|
|
3071
|
+
padding: O.padding,
|
|
3072
|
+
type: O.type
|
|
3063
3073
|
},
|
|
3064
3074
|
position: {
|
|
3065
|
-
x:
|
|
3066
|
-
y:
|
|
3075
|
+
x: O.x,
|
|
3076
|
+
y: O.y
|
|
3067
3077
|
}
|
|
3068
|
-
}),
|
|
3069
|
-
|
|
3078
|
+
}), O.children && O.children.forEach((y) => {
|
|
3079
|
+
at(y, M, p, T + 1), M.add({
|
|
3070
3080
|
group: "edges",
|
|
3071
3081
|
data: {
|
|
3072
|
-
id: `${
|
|
3073
|
-
source:
|
|
3082
|
+
id: `${O.id}_${y.id}`,
|
|
3083
|
+
source: O.id,
|
|
3074
3084
|
target: y.id,
|
|
3075
3085
|
depth: T,
|
|
3076
3086
|
section: y.section
|
|
@@ -3078,10 +3088,10 @@ function lt(D, R, p, T) {
|
|
|
3078
3088
|
});
|
|
3079
3089
|
});
|
|
3080
3090
|
}
|
|
3081
|
-
|
|
3082
|
-
function
|
|
3091
|
+
G(at, "addNodes");
|
|
3092
|
+
function ft(O, M) {
|
|
3083
3093
|
return new Promise((p) => {
|
|
3084
|
-
const T =
|
|
3094
|
+
const T = At("body").append("div").attr("id", "cy").attr("style", "display:none"), y = ut({
|
|
3085
3095
|
container: document.getElementById("cy"),
|
|
3086
3096
|
// container to render in
|
|
3087
3097
|
style: [
|
|
@@ -3093,9 +3103,9 @@ function mt(D, R) {
|
|
|
3093
3103
|
}
|
|
3094
3104
|
]
|
|
3095
3105
|
});
|
|
3096
|
-
T.remove(),
|
|
3097
|
-
|
|
3098
|
-
const t =
|
|
3106
|
+
T.remove(), at(O, y, M, 0), y.nodes().forEach(function(i) {
|
|
3107
|
+
i.layoutDimensions = () => {
|
|
3108
|
+
const t = i.data();
|
|
3099
3109
|
return { w: t.width, h: t.height };
|
|
3100
3110
|
};
|
|
3101
3111
|
}), y.layout({
|
|
@@ -3104,71 +3114,71 @@ function mt(D, R) {
|
|
|
3104
3114
|
quality: "proof",
|
|
3105
3115
|
styleEnabled: !1,
|
|
3106
3116
|
animate: !1
|
|
3107
|
-
}).run(), y.ready((
|
|
3108
|
-
|
|
3117
|
+
}).run(), y.ready((i) => {
|
|
3118
|
+
q.info("Ready", i), p(y);
|
|
3109
3119
|
});
|
|
3110
3120
|
});
|
|
3111
3121
|
}
|
|
3112
|
-
|
|
3113
|
-
function
|
|
3114
|
-
|
|
3122
|
+
G(ft, "layoutMindmap");
|
|
3123
|
+
function yt(O, M) {
|
|
3124
|
+
M.nodes().map((p, T) => {
|
|
3115
3125
|
const y = p.data();
|
|
3116
|
-
y.x = p.position().x, y.y = p.position().y,
|
|
3117
|
-
const
|
|
3118
|
-
|
|
3126
|
+
y.x = p.position().x, y.y = p.position().y, jt(O, y);
|
|
3127
|
+
const i = O.getElementById(y.nodeId);
|
|
3128
|
+
q.info("id:", T, "Position: (", p.position().x, ", ", p.position().y, ")", y), i.attr(
|
|
3119
3129
|
"transform",
|
|
3120
3130
|
`translate(${p.position().x - y.width / 2}, ${p.position().y - y.height / 2})`
|
|
3121
|
-
),
|
|
3131
|
+
), i.attr("attr", `apa-${T})`);
|
|
3122
3132
|
});
|
|
3123
3133
|
}
|
|
3124
|
-
|
|
3125
|
-
var
|
|
3126
|
-
var y,
|
|
3127
|
-
|
|
3128
|
-
` +
|
|
3134
|
+
G(yt, "positionNodes");
|
|
3135
|
+
var Vt = /* @__PURE__ */ G(async (O, M, p, T) => {
|
|
3136
|
+
var y, i;
|
|
3137
|
+
q.debug(`Rendering mindmap diagram
|
|
3138
|
+
` + O);
|
|
3129
3139
|
const t = T.db, e = t.getMindmap();
|
|
3130
3140
|
if (!e)
|
|
3131
3141
|
return;
|
|
3132
|
-
const
|
|
3133
|
-
|
|
3134
|
-
const a =
|
|
3142
|
+
const r = et();
|
|
3143
|
+
r.htmlLabels = !1;
|
|
3144
|
+
const a = Et(M), h = a.append("g");
|
|
3135
3145
|
h.attr("class", "mindmap-edges");
|
|
3136
3146
|
const s = a.append("g");
|
|
3137
|
-
s.attr("class", "mindmap-nodes"), await
|
|
3138
|
-
const f = await
|
|
3139
|
-
|
|
3147
|
+
s.attr("class", "mindmap-nodes"), await st(t, s, e, -1, r);
|
|
3148
|
+
const f = await ft(e, r);
|
|
3149
|
+
pt(h, f), yt(t, f), vt(
|
|
3140
3150
|
void 0,
|
|
3141
3151
|
a,
|
|
3142
|
-
((y =
|
|
3143
|
-
((
|
|
3152
|
+
((y = r.mindmap) == null ? void 0 : y.padding) ?? K.mindmap.padding,
|
|
3153
|
+
((i = r.mindmap) == null ? void 0 : i.useMaxWidth) ?? K.mindmap.useMaxWidth
|
|
3144
3154
|
);
|
|
3145
|
-
}, "draw"),
|
|
3146
|
-
draw:
|
|
3147
|
-
},
|
|
3148
|
-
let
|
|
3149
|
-
for (let p = 0; p <
|
|
3150
|
-
|
|
3151
|
-
for (let p = 0; p <
|
|
3155
|
+
}, "draw"), zt = {
|
|
3156
|
+
draw: Vt
|
|
3157
|
+
}, qt = /* @__PURE__ */ G((O) => {
|
|
3158
|
+
let M = "";
|
|
3159
|
+
for (let p = 0; p < O.THEME_COLOR_LIMIT; p++)
|
|
3160
|
+
O["lineColor" + p] = O["lineColor" + p] || O["cScaleInv" + p], _t(O["lineColor" + p]) ? O["lineColor" + p] = mt(O["lineColor" + p], 20) : O["lineColor" + p] = Nt(O["lineColor" + p], 20);
|
|
3161
|
+
for (let p = 0; p < O.THEME_COLOR_LIMIT; p++) {
|
|
3152
3162
|
const T = "" + (17 - 3 * p);
|
|
3153
|
-
|
|
3163
|
+
M += `
|
|
3154
3164
|
.section-${p - 1} rect, .section-${p - 1} path, .section-${p - 1} circle, .section-${p - 1} polygon, .section-${p - 1} path {
|
|
3155
|
-
fill: ${
|
|
3165
|
+
fill: ${O["cScale" + p]};
|
|
3156
3166
|
}
|
|
3157
3167
|
.section-${p - 1} text {
|
|
3158
|
-
fill: ${
|
|
3168
|
+
fill: ${O["cScaleLabel" + p]};
|
|
3159
3169
|
}
|
|
3160
3170
|
.node-icon-${p - 1} {
|
|
3161
3171
|
font-size: 40px;
|
|
3162
|
-
color: ${
|
|
3172
|
+
color: ${O["cScaleLabel" + p]};
|
|
3163
3173
|
}
|
|
3164
3174
|
.section-edge-${p - 1}{
|
|
3165
|
-
stroke: ${
|
|
3175
|
+
stroke: ${O["cScale" + p]};
|
|
3166
3176
|
}
|
|
3167
3177
|
.edge-depth-${p - 1}{
|
|
3168
3178
|
stroke-width: ${T};
|
|
3169
3179
|
}
|
|
3170
3180
|
.section-${p - 1} line {
|
|
3171
|
-
stroke: ${
|
|
3181
|
+
stroke: ${O["cScaleInv" + p]} ;
|
|
3172
3182
|
stroke-width: 3;
|
|
3173
3183
|
}
|
|
3174
3184
|
|
|
@@ -3180,17 +3190,17 @@ var se = /* @__PURE__ */ x(async (D, R, p, T) => {
|
|
|
3180
3190
|
}
|
|
3181
3191
|
`;
|
|
3182
3192
|
}
|
|
3183
|
-
return
|
|
3184
|
-
}, "genSections"),
|
|
3193
|
+
return M;
|
|
3194
|
+
}, "genSections"), Zt = /* @__PURE__ */ G((O) => `
|
|
3185
3195
|
.edge {
|
|
3186
3196
|
stroke-width: 3;
|
|
3187
3197
|
}
|
|
3188
|
-
${
|
|
3198
|
+
${qt(O)}
|
|
3189
3199
|
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
3190
|
-
fill: ${
|
|
3200
|
+
fill: ${O.git0};
|
|
3191
3201
|
}
|
|
3192
3202
|
.section-root text {
|
|
3193
|
-
fill: ${
|
|
3203
|
+
fill: ${O.gitBranchLabel0};
|
|
3194
3204
|
}
|
|
3195
3205
|
.icon-container {
|
|
3196
3206
|
height:100%;
|
|
@@ -3208,12 +3218,14 @@ var se = /* @__PURE__ */ x(async (D, R, p, T) => {
|
|
|
3208
3218
|
dominant-baseline: middle;
|
|
3209
3219
|
text-align: center;
|
|
3210
3220
|
}
|
|
3211
|
-
`, "getStyles"),
|
|
3212
|
-
db
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3221
|
+
`, "getStyles"), Qt = Zt, te = {
|
|
3222
|
+
get db() {
|
|
3223
|
+
return new Ft();
|
|
3224
|
+
},
|
|
3225
|
+
renderer: zt,
|
|
3226
|
+
parser: bt,
|
|
3227
|
+
styles: Qt
|
|
3216
3228
|
};
|
|
3217
3229
|
export {
|
|
3218
|
-
|
|
3230
|
+
te as diagram
|
|
3219
3231
|
};
|