@versini/sassysaint 8.107.3 → 8.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/chunks/{AboutChangelog.BmMVyf-Q.js → AboutChangelog.55tIwnGe.js} +2 -2
  2. package/dist/chunks/{AboutEntry.wD5hG0ON.js → AboutEntry.D1zAHjel.js} +7 -7
  3. package/dist/chunks/{App.FyINLNSp.js → App.Br7HE-y0.js} +1746 -1908
  4. package/dist/chunks/{Bubble.Ci-pu6NI.js → Bubble.Ic_8FEhH.js} +47 -74
  5. package/dist/chunks/{Table.Dzy9ts3i.js → ButtonIconDelete.DRBd_G40.js} +125 -104
  6. package/dist/chunks/{Chart.DYVf2gst.js → Chart.CwIVbBYb.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.CD6bVvcQ.js → ChatBubbleAssistant.DHlLzqdc.js} +199 -208
  8. package/dist/chunks/{ChatBubbleUser.Cre3cX04.js → ChatBubbleUser.D7ksCr76.js} +27 -36
  9. package/dist/chunks/{ChatHistoryTable.D_kOkWN9.js → ChatHistoryTable.DhUDW7QO.js} +108 -121
  10. package/dist/chunks/{HistoryEntry.BFNME4Z8.js → HistoryEntry.BxnMfiXN.js} +6 -6
  11. package/dist/chunks/{LoginEntry.SW7wyEpU.js → LoginEntry.XF9rPWdB.js} +4 -4
  12. package/dist/chunks/{LogoEntry.BAKpdJEy.js → LogoEntry.CnTI8jpv.js} +304 -385
  13. package/dist/chunks/{MemoriesEntry.Ztyx_8Wm.js → MemoriesEntry.BjNXrPW2.js} +164 -169
  14. package/dist/chunks/{ProfileEntry.CjzAusYw.js → ProfileEntry.S6XO2uMT.js} +4 -4
  15. package/dist/chunks/{SettingsEntry.D4IKmfYP.js → SettingsEntry.C5jHUJzu.js} +5 -5
  16. package/dist/chunks/{UsageEntry.D7sTPflE.js → UsageEntry.CQTLPweE.js} +5 -5
  17. package/dist/chunks/_basePickBy.Dj6LWOd3.js +151 -0
  18. package/dist/chunks/_baseUniq.DfiF6jap.js +614 -0
  19. package/dist/chunks/arc.CLrqhM1J.js +83 -0
  20. package/dist/chunks/architecture-U656AL7Q.CuF-GD1P.js +36 -0
  21. package/dist/chunks/architectureDiagram-VXUJARFQ.BGPIWweD.js +4653 -0
  22. package/dist/chunks/blockDiagram-VD42YOAC.cLfUaXxm.js +2254 -0
  23. package/dist/chunks/browser.B8WuOmYx.js +260 -0
  24. package/dist/chunks/c4Diagram-YG6GDRKO.Cc4f8G62.js +1579 -0
  25. package/dist/chunks/channel.D7pUQPat.js +5 -0
  26. package/dist/chunks/chunk-4BX2VUAB.C5gP6CzO.js +8 -0
  27. package/dist/chunks/chunk-55IACEB6.CMTOMhuf.js +8 -0
  28. package/dist/chunks/chunk-B4BG7PRW.CQz5CpXp.js +1375 -0
  29. package/dist/chunks/chunk-DI55MBZ5.C4SOgQau.js +1370 -0
  30. package/dist/chunks/chunk-FMBD7UC4.5tYrPDWZ.js +19 -0
  31. package/dist/chunks/chunk-QN33PNHL.P3o9PZBW.js +19 -0
  32. package/dist/chunks/chunk-QZHKN3VN.COvsjomn.js +15 -0
  33. package/dist/chunks/chunk-TZMSLE5B.C5QPHQlj.js +64 -0
  34. package/dist/chunks/classDiagram-2ON5EDUG.DrIfmpHo.js +16 -0
  35. package/dist/chunks/classDiagram-v2-WZHVMYZB.DrIfmpHo.js +16 -0
  36. package/dist/chunks/clone.47X4nGV4.js +8 -0
  37. package/dist/chunks/cose-bilkent-S5V4N54A.B1umrZne.js +2600 -0
  38. package/dist/chunks/cytoscape.esm.DmRZGnqW.js +18700 -0
  39. package/dist/chunks/dagre-6UL2VRFP.Ce4VSTky.js +444 -0
  40. package/dist/chunks/defaultLocale.CPJLP5jg.js +171 -0
  41. package/dist/chunks/diagram-PSM6KHXK.B1yvSG9p.js +531 -0
  42. package/dist/chunks/diagram-QEK2KX5R.CYDnnLB3.js +217 -0
  43. package/dist/chunks/diagram-S2PKOQOG.BI6w7TZJ.js +142 -0
  44. package/dist/chunks/erDiagram-Q2GNP2WA.D7mTQJ6P.js +841 -0
  45. package/dist/chunks/flowDiagram-NV44I4VS.Col8_E_0.js +1620 -0
  46. package/dist/chunks/ganttDiagram-JELNMOA3.GAUSoSKL.js +2647 -0
  47. package/dist/chunks/gitGraph-F6HP7TQM.3I_jmRrt.js +27 -0
  48. package/dist/chunks/gitGraphDiagram-NY62KEGX.DZQ_LVDe.js +699 -0
  49. package/dist/chunks/graph.BmJVbvPo.js +247 -0
  50. package/dist/chunks/index.Bi0z4EE1.js +90 -0
  51. package/dist/chunks/{index.QiLu2wkI.js → index.C0El17wt.js} +2 -2
  52. package/dist/chunks/{index.DBovegdE.js → index.CUn5zNJg.js} +1 -1
  53. package/dist/chunks/index.CbEVdl_N.js +279 -0
  54. package/dist/chunks/{index.BT3Do9Po.js → index.CoZgV6rn.js} +34 -43
  55. package/dist/chunks/{index.16gcBvke.js → index.DCqTKdor.js} +60 -69
  56. package/dist/chunks/index.DctDXsYU.js +67 -0
  57. package/dist/chunks/{index.BfTDtoYy.js → index.Df-tNwfZ.js} +1 -1
  58. package/dist/chunks/{index.BI1_ccPN.js → index.DxGkXGdu.js} +3 -3
  59. package/dist/chunks/{index.uILjvEfo.js → index.z2e7pMwp.js} +1 -1
  60. package/dist/chunks/info-NVLQJR56.D9ao7_Su.js +27 -0
  61. package/dist/chunks/infoDiagram-WHAUD3N6.DmFB-CXk.js +24 -0
  62. package/dist/chunks/init.DAGnb5BH.js +16 -0
  63. package/dist/chunks/journeyDiagram-XKPGCS4Q.C9FISQxf.js +834 -0
  64. package/dist/chunks/kanban-definition-3W4ZIXB7.ChmJnTyd.js +719 -0
  65. package/dist/chunks/{index.DJlv39cv.js → katex.D0sQThIv.js} +1638 -1943
  66. package/dist/chunks/layout.DtZQLIyC.js +1332 -0
  67. package/dist/chunks/linear.CIDfImUo.js +625 -0
  68. package/dist/chunks/mermaid-parser.core.CO83pegl.js +12724 -0
  69. package/dist/chunks/mindmap-definition-VGOIOE7T.B3dfWebK.js +759 -0
  70. package/dist/chunks/ordinal.EWT-qnu7.js +61 -0
  71. package/dist/chunks/packet-BFZMPI3H.q9qJMgm9.js +27 -0
  72. package/dist/chunks/pie-7BOR55EZ.BTnKDmrp.js +32 -0
  73. package/dist/chunks/pieDiagram-ADFJNKIX.B23eDSnQ.js +161 -0
  74. package/dist/chunks/quadrantDiagram-AYHSOK5B.B3ZIlLhO.js +1022 -0
  75. package/dist/chunks/radar-NHE76QYJ.BeKykujs.js +27 -0
  76. package/dist/chunks/rehype-mermaid.DkS2NcIa.js +14283 -0
  77. package/dist/chunks/requirementDiagram-UZGBJVZJ.0vOl9IL2.js +850 -0
  78. package/dist/chunks/sankeyDiagram-TZEHDZUN.DxwTK65F.js +810 -0
  79. package/dist/chunks/sequenceDiagram-WL72ISMW.BmOg83Gx.js +2511 -0
  80. package/dist/chunks/stateDiagram-FKZM4ZOC.DBiU28Wu.js +263 -0
  81. package/dist/chunks/stateDiagram-v2-4FDKWEC3.B6t8_4cH.js +16 -0
  82. package/dist/chunks/timeline-definition-IT6M3QCI.DpWxwytE.js +795 -0
  83. package/dist/chunks/treemap-KMMF4GRG.KqgFrxbV.js +81 -0
  84. package/dist/chunks/{useMarkdown.BberHabr.js → useMarkdown.CxuK_DLo.js} +2078 -2072
  85. package/dist/chunks/xychartDiagram-PRI3JC2R.CBaIBQ89.js +1340 -0
  86. package/dist/components/SassySaint/SassySaint.js +1 -1
  87. package/dist/index.js +3 -3
  88. package/dist/style.css +1 -1
  89. package/package.json +5 -5
  90. package/dist/chunks/index.BjnVQ4X3.js +0 -99
  91. package/dist/chunks/index.uVDYkuxz.js +0 -297
@@ -0,0 +1,4653 @@
1
+ import { __name as dt, selectSvgElement as Ze, setupGraphViewbox as ke, log as Se, setAccTitle as qe, getAccTitle as Qe, setDiagramTitle as Je, getDiagramTitle as Ke, getAccDescription as je, setAccDescription as _e, clear as tr, cleanAndMerge as er, getConfig as rr, defaultConfig_default as ir, getConfig2 as Ee, createText as me, getIconSVG as pe, sanitizeText as ar, select as nr, getEdgeId as or, registerIconPacks as sr, unknownIcon as hr } from "./rehype-mermaid.DkS2NcIa.js";
2
+ import { populateCommonDb as lr } from "./chunk-4BX2VUAB.C5gP6CzO.js";
3
+ import { parse as fr } from "./mermaid-parser.core.CO83pegl.js";
4
+ import { cytoscape as Fe } from "./cytoscape.esm.DmRZGnqW.js";
5
+ import { getDefaultExportFromCjs as cr } from "./App.Br7HE-y0.js";
6
+ var he = { exports: {} }, le = { exports: {} }, fe = { exports: {} }, gr = fe.exports, we;
7
+ function ur() {
8
+ return we || (we = 1, (function(I, x) {
9
+ (function(P, N) {
10
+ I.exports = N();
11
+ })(gr, function() {
12
+ return (
13
+ /******/
14
+ (function(A) {
15
+ var P = {};
16
+ function N(u) {
17
+ if (P[u])
18
+ return P[u].exports;
19
+ var h = P[u] = {
20
+ /******/
21
+ i: u,
22
+ /******/
23
+ l: !1,
24
+ /******/
25
+ exports: {}
26
+ /******/
27
+ };
28
+ return A[u].call(h.exports, h, h.exports, N), h.l = !0, h.exports;
29
+ }
30
+ return N.m = A, N.c = P, N.i = function(u) {
31
+ return u;
32
+ }, N.d = function(u, h, a) {
33
+ N.o(u, h) || Object.defineProperty(u, h, {
34
+ /******/
35
+ configurable: !1,
36
+ /******/
37
+ enumerable: !0,
38
+ /******/
39
+ get: a
40
+ /******/
41
+ });
42
+ }, N.n = function(u) {
43
+ var h = u && u.__esModule ? (
44
+ /******/
45
+ function() {
46
+ return u.default;
47
+ }
48
+ ) : (
49
+ /******/
50
+ function() {
51
+ return u;
52
+ }
53
+ );
54
+ return N.d(h, "a", h), h;
55
+ }, N.o = function(u, h) {
56
+ return Object.prototype.hasOwnProperty.call(u, h);
57
+ }, N.p = "", N(N.s = 28);
58
+ })([
59
+ /* 0 */
60
+ /***/
61
+ (function(A, P, N) {
62
+ function u() {
63
+ }
64
+ u.QUALITY = 1, u.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, u.DEFAULT_INCREMENTAL = !1, u.DEFAULT_ANIMATION_ON_LAYOUT = !0, u.DEFAULT_ANIMATION_DURING_LAYOUT = !1, u.DEFAULT_ANIMATION_PERIOD = 50, u.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, u.DEFAULT_GRAPH_MARGIN = 15, u.NODE_DIMENSIONS_INCLUDE_LABELS = !1, u.SIMPLE_NODE_SIZE = 40, u.SIMPLE_NODE_HALF_SIZE = u.SIMPLE_NODE_SIZE / 2, u.EMPTY_COMPOUND_NODE_SIZE = 40, u.MIN_EDGE_LENGTH = 1, u.WORLD_BOUNDARY = 1e6, u.INITIAL_WORLD_BOUNDARY = u.WORLD_BOUNDARY / 1e3, u.WORLD_CENTER_X = 1200, u.WORLD_CENTER_Y = 900, A.exports = u;
65
+ }),
66
+ /* 1 */
67
+ /***/
68
+ (function(A, P, N) {
69
+ var u = N(2), h = N(8), a = N(9);
70
+ function e(l, i, g) {
71
+ u.call(this, g), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = g, this.bendpoints = [], this.source = l, this.target = i;
72
+ }
73
+ e.prototype = Object.create(u.prototype);
74
+ for (var r in u)
75
+ e[r] = u[r];
76
+ e.prototype.getSource = function() {
77
+ return this.source;
78
+ }, e.prototype.getTarget = function() {
79
+ return this.target;
80
+ }, e.prototype.isInterGraph = function() {
81
+ return this.isInterGraph;
82
+ }, e.prototype.getLength = function() {
83
+ return this.length;
84
+ }, e.prototype.isOverlapingSourceAndTarget = function() {
85
+ return this.isOverlapingSourceAndTarget;
86
+ }, e.prototype.getBendpoints = function() {
87
+ return this.bendpoints;
88
+ }, e.prototype.getLca = function() {
89
+ return this.lca;
90
+ }, e.prototype.getSourceInLca = function() {
91
+ return this.sourceInLca;
92
+ }, e.prototype.getTargetInLca = function() {
93
+ return this.targetInLca;
94
+ }, e.prototype.getOtherEnd = function(l) {
95
+ if (this.source === l)
96
+ return this.target;
97
+ if (this.target === l)
98
+ return this.source;
99
+ throw "Node is not incident with this edge";
100
+ }, e.prototype.getOtherEndInGraph = function(l, i) {
101
+ for (var g = this.getOtherEnd(l), t = i.getGraphManager().getRoot(); ; ) {
102
+ if (g.getOwner() == i)
103
+ return g;
104
+ if (g.getOwner() == t)
105
+ break;
106
+ g = g.getOwner().getParent();
107
+ }
108
+ return null;
109
+ }, e.prototype.updateLength = function() {
110
+ var l = new Array(4);
111
+ this.isOverlapingSourceAndTarget = h.getIntersection(this.target.getRect(), this.source.getRect(), l), this.isOverlapingSourceAndTarget || (this.lengthX = l[0] - l[2], this.lengthY = l[1] - l[3], Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
112
+ }, e.prototype.updateLengthSimple = function() {
113
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
114
+ }, A.exports = e;
115
+ }),
116
+ /* 2 */
117
+ /***/
118
+ (function(A, P, N) {
119
+ function u(h) {
120
+ this.vGraphObject = h;
121
+ }
122
+ A.exports = u;
123
+ }),
124
+ /* 3 */
125
+ /***/
126
+ (function(A, P, N) {
127
+ var u = N(2), h = N(10), a = N(13), e = N(0), r = N(16), l = N(5);
128
+ function i(t, o, s, c) {
129
+ s == null && c == null && (c = o), u.call(this, c), t.graphManager != null && (t = t.graphManager), this.estimatedSize = h.MIN_VALUE, this.inclusionTreeDepth = h.MAX_VALUE, this.vGraphObject = c, this.edges = [], this.graphManager = t, s != null && o != null ? this.rect = new a(o.x, o.y, s.width, s.height) : this.rect = new a();
130
+ }
131
+ i.prototype = Object.create(u.prototype);
132
+ for (var g in u)
133
+ i[g] = u[g];
134
+ i.prototype.getEdges = function() {
135
+ return this.edges;
136
+ }, i.prototype.getChild = function() {
137
+ return this.child;
138
+ }, i.prototype.getOwner = function() {
139
+ return this.owner;
140
+ }, i.prototype.getWidth = function() {
141
+ return this.rect.width;
142
+ }, i.prototype.setWidth = function(t) {
143
+ this.rect.width = t;
144
+ }, i.prototype.getHeight = function() {
145
+ return this.rect.height;
146
+ }, i.prototype.setHeight = function(t) {
147
+ this.rect.height = t;
148
+ }, i.prototype.getCenterX = function() {
149
+ return this.rect.x + this.rect.width / 2;
150
+ }, i.prototype.getCenterY = function() {
151
+ return this.rect.y + this.rect.height / 2;
152
+ }, i.prototype.getCenter = function() {
153
+ return new l(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
154
+ }, i.prototype.getLocation = function() {
155
+ return new l(this.rect.x, this.rect.y);
156
+ }, i.prototype.getRect = function() {
157
+ return this.rect;
158
+ }, i.prototype.getDiagonal = function() {
159
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
160
+ }, i.prototype.getHalfTheDiagonal = function() {
161
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
162
+ }, i.prototype.setRect = function(t, o) {
163
+ this.rect.x = t.x, this.rect.y = t.y, this.rect.width = o.width, this.rect.height = o.height;
164
+ }, i.prototype.setCenter = function(t, o) {
165
+ this.rect.x = t - this.rect.width / 2, this.rect.y = o - this.rect.height / 2;
166
+ }, i.prototype.setLocation = function(t, o) {
167
+ this.rect.x = t, this.rect.y = o;
168
+ }, i.prototype.moveBy = function(t, o) {
169
+ this.rect.x += t, this.rect.y += o;
170
+ }, i.prototype.getEdgeListToNode = function(t) {
171
+ var o = [], s = this;
172
+ return s.edges.forEach(function(c) {
173
+ if (c.target == t) {
174
+ if (c.source != s) throw "Incorrect edge source!";
175
+ o.push(c);
176
+ }
177
+ }), o;
178
+ }, i.prototype.getEdgesBetween = function(t) {
179
+ var o = [], s = this;
180
+ return s.edges.forEach(function(c) {
181
+ if (!(c.source == s || c.target == s)) throw "Incorrect edge source and/or target";
182
+ (c.target == t || c.source == t) && o.push(c);
183
+ }), o;
184
+ }, i.prototype.getNeighborsList = function() {
185
+ var t = /* @__PURE__ */ new Set(), o = this;
186
+ return o.edges.forEach(function(s) {
187
+ if (s.source == o)
188
+ t.add(s.target);
189
+ else {
190
+ if (s.target != o)
191
+ throw "Incorrect incidency!";
192
+ t.add(s.source);
193
+ }
194
+ }), t;
195
+ }, i.prototype.withChildren = function() {
196
+ var t = /* @__PURE__ */ new Set(), o, s;
197
+ if (t.add(this), this.child != null)
198
+ for (var c = this.child.getNodes(), f = 0; f < c.length; f++)
199
+ o = c[f], s = o.withChildren(), s.forEach(function(T) {
200
+ t.add(T);
201
+ });
202
+ return t;
203
+ }, i.prototype.getNoOfChildren = function() {
204
+ var t = 0, o;
205
+ if (this.child == null)
206
+ t = 1;
207
+ else
208
+ for (var s = this.child.getNodes(), c = 0; c < s.length; c++)
209
+ o = s[c], t += o.getNoOfChildren();
210
+ return t == 0 && (t = 1), t;
211
+ }, i.prototype.getEstimatedSize = function() {
212
+ if (this.estimatedSize == h.MIN_VALUE)
213
+ throw "assert failed";
214
+ return this.estimatedSize;
215
+ }, i.prototype.calcEstimatedSize = function() {
216
+ 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);
217
+ }, i.prototype.scatter = function() {
218
+ var t, o, s = -e.INITIAL_WORLD_BOUNDARY, c = e.INITIAL_WORLD_BOUNDARY;
219
+ t = e.WORLD_CENTER_X + r.nextDouble() * (c - s) + s;
220
+ var f = -e.INITIAL_WORLD_BOUNDARY, T = e.INITIAL_WORLD_BOUNDARY;
221
+ o = e.WORLD_CENTER_Y + r.nextDouble() * (T - f) + f, this.rect.x = t, this.rect.y = o;
222
+ }, i.prototype.updateBounds = function() {
223
+ if (this.getChild() == null)
224
+ throw "assert failed";
225
+ if (this.getChild().getNodes().length != 0) {
226
+ var t = this.getChild();
227
+ if (t.updateBounds(!0), this.rect.x = t.getLeft(), this.rect.y = t.getTop(), this.setWidth(t.getRight() - t.getLeft()), this.setHeight(t.getBottom() - t.getTop()), e.NODE_DIMENSIONS_INCLUDE_LABELS) {
228
+ var o = t.getRight() - t.getLeft(), s = t.getBottom() - t.getTop();
229
+ this.labelWidth && (this.labelPosHorizontal == "left" ? (this.rect.x -= this.labelWidth, this.setWidth(o + this.labelWidth)) : this.labelPosHorizontal == "center" && this.labelWidth > o ? (this.rect.x -= (this.labelWidth - o) / 2, this.setWidth(this.labelWidth)) : this.labelPosHorizontal == "right" && this.setWidth(o + this.labelWidth)), this.labelHeight && (this.labelPosVertical == "top" ? (this.rect.y -= this.labelHeight, this.setHeight(s + this.labelHeight)) : this.labelPosVertical == "center" && this.labelHeight > s ? (this.rect.y -= (this.labelHeight - s) / 2, this.setHeight(this.labelHeight)) : this.labelPosVertical == "bottom" && this.setHeight(s + this.labelHeight));
230
+ }
231
+ }
232
+ }, i.prototype.getInclusionTreeDepth = function() {
233
+ if (this.inclusionTreeDepth == h.MAX_VALUE)
234
+ throw "assert failed";
235
+ return this.inclusionTreeDepth;
236
+ }, i.prototype.transform = function(t) {
237
+ var o = this.rect.x;
238
+ o > e.WORLD_BOUNDARY ? o = e.WORLD_BOUNDARY : o < -e.WORLD_BOUNDARY && (o = -e.WORLD_BOUNDARY);
239
+ var s = this.rect.y;
240
+ s > e.WORLD_BOUNDARY ? s = e.WORLD_BOUNDARY : s < -e.WORLD_BOUNDARY && (s = -e.WORLD_BOUNDARY);
241
+ var c = new l(o, s), f = t.inverseTransformPoint(c);
242
+ this.setLocation(f.x, f.y);
243
+ }, i.prototype.getLeft = function() {
244
+ return this.rect.x;
245
+ }, i.prototype.getRight = function() {
246
+ return this.rect.x + this.rect.width;
247
+ }, i.prototype.getTop = function() {
248
+ return this.rect.y;
249
+ }, i.prototype.getBottom = function() {
250
+ return this.rect.y + this.rect.height;
251
+ }, i.prototype.getParent = function() {
252
+ return this.owner == null ? null : this.owner.getParent();
253
+ }, A.exports = i;
254
+ }),
255
+ /* 4 */
256
+ /***/
257
+ (function(A, P, N) {
258
+ var u = N(0);
259
+ function h() {
260
+ }
261
+ for (var a in u)
262
+ h[a] = u[a];
263
+ h.MAX_ITERATIONS = 2500, h.DEFAULT_EDGE_LENGTH = 50, h.DEFAULT_SPRING_STRENGTH = 0.45, h.DEFAULT_REPULSION_STRENGTH = 4500, h.DEFAULT_GRAVITY_STRENGTH = 0.4, h.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, h.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, h.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, h.COOLING_ADAPTATION_FACTOR = 0.33, h.ADAPTATION_LOWER_NODE_LIMIT = 1e3, h.ADAPTATION_UPPER_NODE_LIMIT = 5e3, h.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, h.MAX_NODE_DISPLACEMENT = h.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, h.MIN_REPULSION_DIST = h.DEFAULT_EDGE_LENGTH / 10, h.CONVERGENCE_CHECK_PERIOD = 100, h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, h.MIN_EDGE_LENGTH = 1, h.GRID_CALCULATION_CHECK_PERIOD = 10, A.exports = h;
264
+ }),
265
+ /* 5 */
266
+ /***/
267
+ (function(A, P, N) {
268
+ function u(h, a) {
269
+ h == null && a == null ? (this.x = 0, this.y = 0) : (this.x = h, this.y = a);
270
+ }
271
+ u.prototype.getX = function() {
272
+ return this.x;
273
+ }, u.prototype.getY = function() {
274
+ return this.y;
275
+ }, u.prototype.setX = function(h) {
276
+ this.x = h;
277
+ }, u.prototype.setY = function(h) {
278
+ this.y = h;
279
+ }, u.prototype.getDifference = function(h) {
280
+ return new DimensionD(this.x - h.x, this.y - h.y);
281
+ }, u.prototype.getCopy = function() {
282
+ return new u(this.x, this.y);
283
+ }, u.prototype.translate = function(h) {
284
+ return this.x += h.width, this.y += h.height, this;
285
+ }, A.exports = u;
286
+ }),
287
+ /* 6 */
288
+ /***/
289
+ (function(A, P, N) {
290
+ var u = N(2), h = N(10), a = N(0), e = N(7), r = N(3), l = N(1), i = N(13), g = N(12), t = N(11);
291
+ function o(c, f, T) {
292
+ u.call(this, T), this.estimatedSize = h.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = c, f != null && f instanceof e ? this.graphManager = f : f != null && f instanceof Layout && (this.graphManager = f.graphManager);
293
+ }
294
+ o.prototype = Object.create(u.prototype);
295
+ for (var s in u)
296
+ o[s] = u[s];
297
+ o.prototype.getNodes = function() {
298
+ return this.nodes;
299
+ }, o.prototype.getEdges = function() {
300
+ return this.edges;
301
+ }, o.prototype.getGraphManager = function() {
302
+ return this.graphManager;
303
+ }, o.prototype.getParent = function() {
304
+ return this.parent;
305
+ }, o.prototype.getLeft = function() {
306
+ return this.left;
307
+ }, o.prototype.getRight = function() {
308
+ return this.right;
309
+ }, o.prototype.getTop = function() {
310
+ return this.top;
311
+ }, o.prototype.getBottom = function() {
312
+ return this.bottom;
313
+ }, o.prototype.isConnected = function() {
314
+ return this.isConnected;
315
+ }, o.prototype.add = function(c, f, T) {
316
+ if (f == null && T == null) {
317
+ var d = c;
318
+ if (this.graphManager == null)
319
+ throw "Graph has no graph mgr!";
320
+ if (this.getNodes().indexOf(d) > -1)
321
+ throw "Node already in graph!";
322
+ return d.owner = this, this.getNodes().push(d), d;
323
+ } else {
324
+ var v = c;
325
+ if (!(this.getNodes().indexOf(f) > -1 && this.getNodes().indexOf(T) > -1))
326
+ throw "Source or target not in graph!";
327
+ if (!(f.owner == T.owner && f.owner == this))
328
+ throw "Both owners must be this graph!";
329
+ return f.owner != T.owner ? null : (v.source = f, v.target = T, v.isInterGraph = !1, this.getEdges().push(v), f.edges.push(v), T != f && T.edges.push(v), v);
330
+ }
331
+ }, o.prototype.remove = function(c) {
332
+ var f = c;
333
+ if (c instanceof r) {
334
+ if (f == null)
335
+ throw "Node is null!";
336
+ if (!(f.owner != null && f.owner == this))
337
+ throw "Owner graph is invalid!";
338
+ if (this.graphManager == null)
339
+ throw "Owner graph manager is invalid!";
340
+ for (var T = f.edges.slice(), d, v = T.length, L = 0; L < v; L++)
341
+ d = T[L], d.isInterGraph ? this.graphManager.remove(d) : d.source.owner.remove(d);
342
+ var b = this.nodes.indexOf(f);
343
+ if (b == -1)
344
+ throw "Node not in owner node list!";
345
+ this.nodes.splice(b, 1);
346
+ } else if (c instanceof l) {
347
+ var d = c;
348
+ if (d == null)
349
+ throw "Edge is null!";
350
+ if (!(d.source != null && d.target != null))
351
+ throw "Source and/or target is null!";
352
+ if (!(d.source.owner != null && d.target.owner != null && d.source.owner == this && d.target.owner == this))
353
+ throw "Source and/or target owner is invalid!";
354
+ var C = d.source.edges.indexOf(d), G = d.target.edges.indexOf(d);
355
+ if (!(C > -1 && G > -1))
356
+ throw "Source and/or target doesn't know this edge!";
357
+ d.source.edges.splice(C, 1), d.target != d.source && d.target.edges.splice(G, 1);
358
+ var b = d.source.owner.getEdges().indexOf(d);
359
+ if (b == -1)
360
+ throw "Not in owner's edge list!";
361
+ d.source.owner.getEdges().splice(b, 1);
362
+ }
363
+ }, o.prototype.updateLeftTop = function() {
364
+ for (var c = h.MAX_VALUE, f = h.MAX_VALUE, T, d, v, L = this.getNodes(), b = L.length, C = 0; C < b; C++) {
365
+ var G = L[C];
366
+ T = G.getTop(), d = G.getLeft(), c > T && (c = T), f > d && (f = d);
367
+ }
368
+ return c == h.MAX_VALUE ? null : (L[0].getParent().paddingLeft != null ? v = L[0].getParent().paddingLeft : v = this.margin, this.left = f - v, this.top = c - v, new g(this.left, this.top));
369
+ }, o.prototype.updateBounds = function(c) {
370
+ for (var f = h.MAX_VALUE, T = -h.MAX_VALUE, d = h.MAX_VALUE, v = -h.MAX_VALUE, L, b, C, G, k, Y = this.nodes, K = Y.length, O = 0; O < K; O++) {
371
+ var it = Y[O];
372
+ c && it.child != null && it.updateBounds(), L = it.getLeft(), b = it.getRight(), C = it.getTop(), G = it.getBottom(), f > L && (f = L), T < b && (T = b), d > C && (d = C), v < G && (v = G);
373
+ }
374
+ var n = new i(f, d, T - f, v - d);
375
+ f == h.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), Y[0].getParent().paddingLeft != null ? k = Y[0].getParent().paddingLeft : k = this.margin, this.left = n.x - k, this.right = n.x + n.width + k, this.top = n.y - k, this.bottom = n.y + n.height + k;
376
+ }, o.calculateBounds = function(c) {
377
+ for (var f = h.MAX_VALUE, T = -h.MAX_VALUE, d = h.MAX_VALUE, v = -h.MAX_VALUE, L, b, C, G, k = c.length, Y = 0; Y < k; Y++) {
378
+ var K = c[Y];
379
+ L = K.getLeft(), b = K.getRight(), C = K.getTop(), G = K.getBottom(), f > L && (f = L), T < b && (T = b), d > C && (d = C), v < G && (v = G);
380
+ }
381
+ var O = new i(f, d, T - f, v - d);
382
+ return O;
383
+ }, o.prototype.getInclusionTreeDepth = function() {
384
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
385
+ }, o.prototype.getEstimatedSize = function() {
386
+ if (this.estimatedSize == h.MIN_VALUE)
387
+ throw "assert failed";
388
+ return this.estimatedSize;
389
+ }, o.prototype.calcEstimatedSize = function() {
390
+ for (var c = 0, f = this.nodes, T = f.length, d = 0; d < T; d++) {
391
+ var v = f[d];
392
+ c += v.calcEstimatedSize();
393
+ }
394
+ return c == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = c / Math.sqrt(this.nodes.length), this.estimatedSize;
395
+ }, o.prototype.updateConnected = function() {
396
+ var c = this;
397
+ if (this.nodes.length == 0) {
398
+ this.isConnected = !0;
399
+ return;
400
+ }
401
+ var f = new t(), T = /* @__PURE__ */ new Set(), d = this.nodes[0], v, L, b = d.withChildren();
402
+ for (b.forEach(function(O) {
403
+ f.push(O), T.add(O);
404
+ }); f.length !== 0; ) {
405
+ d = f.shift(), v = d.getEdges();
406
+ for (var C = v.length, G = 0; G < C; G++) {
407
+ var k = v[G];
408
+ if (L = k.getOtherEndInGraph(d, this), L != null && !T.has(L)) {
409
+ var Y = L.withChildren();
410
+ Y.forEach(function(O) {
411
+ f.push(O), T.add(O);
412
+ });
413
+ }
414
+ }
415
+ }
416
+ if (this.isConnected = !1, T.size >= this.nodes.length) {
417
+ var K = 0;
418
+ T.forEach(function(O) {
419
+ O.owner == c && K++;
420
+ }), K == this.nodes.length && (this.isConnected = !0);
421
+ }
422
+ }, A.exports = o;
423
+ }),
424
+ /* 7 */
425
+ /***/
426
+ (function(A, P, N) {
427
+ var u, h = N(1);
428
+ function a(e) {
429
+ u = N(6), this.layout = e, this.graphs = [], this.edges = [];
430
+ }
431
+ a.prototype.addRoot = function() {
432
+ var e = this.layout.newGraph(), r = this.layout.newNode(null), l = this.add(e, r);
433
+ return this.setRootGraph(l), this.rootGraph;
434
+ }, a.prototype.add = function(e, r, l, i, g) {
435
+ if (l == null && i == null && g == null) {
436
+ if (e == null)
437
+ throw "Graph is null!";
438
+ if (r == null)
439
+ throw "Parent node is null!";
440
+ if (this.graphs.indexOf(e) > -1)
441
+ throw "Graph already in this graph mgr!";
442
+ if (this.graphs.push(e), e.parent != null)
443
+ throw "Already has a parent!";
444
+ if (r.child != null)
445
+ throw "Already has a child!";
446
+ return e.parent = r, r.child = e, e;
447
+ } else {
448
+ g = l, i = r, l = e;
449
+ var t = i.getOwner(), o = g.getOwner();
450
+ if (!(t != null && t.getGraphManager() == this))
451
+ throw "Source not in this graph mgr!";
452
+ if (!(o != null && o.getGraphManager() == this))
453
+ throw "Target not in this graph mgr!";
454
+ if (t == o)
455
+ return l.isInterGraph = !1, t.add(l, i, g);
456
+ if (l.isInterGraph = !0, l.source = i, l.target = g, this.edges.indexOf(l) > -1)
457
+ throw "Edge already in inter-graph edge list!";
458
+ if (this.edges.push(l), !(l.source != null && l.target != null))
459
+ throw "Edge source and/or target is null!";
460
+ if (!(l.source.edges.indexOf(l) == -1 && l.target.edges.indexOf(l) == -1))
461
+ throw "Edge already in source and/or target incidency list!";
462
+ return l.source.edges.push(l), l.target.edges.push(l), l;
463
+ }
464
+ }, a.prototype.remove = function(e) {
465
+ if (e instanceof u) {
466
+ var r = e;
467
+ if (r.getGraphManager() != this)
468
+ throw "Graph not in this graph mgr";
469
+ if (!(r == this.rootGraph || r.parent != null && r.parent.graphManager == this))
470
+ throw "Invalid parent node!";
471
+ var l = [];
472
+ l = l.concat(r.getEdges());
473
+ for (var i, g = l.length, t = 0; t < g; t++)
474
+ i = l[t], r.remove(i);
475
+ var o = [];
476
+ o = o.concat(r.getNodes());
477
+ var s;
478
+ g = o.length;
479
+ for (var t = 0; t < g; t++)
480
+ s = o[t], r.remove(s);
481
+ r == this.rootGraph && this.setRootGraph(null);
482
+ var c = this.graphs.indexOf(r);
483
+ this.graphs.splice(c, 1), r.parent = null;
484
+ } else if (e instanceof h) {
485
+ if (i = e, i == null)
486
+ throw "Edge is null!";
487
+ if (!i.isInterGraph)
488
+ throw "Not an inter-graph edge!";
489
+ if (!(i.source != null && i.target != null))
490
+ throw "Source and/or target is null!";
491
+ if (!(i.source.edges.indexOf(i) != -1 && i.target.edges.indexOf(i) != -1))
492
+ throw "Source and/or target doesn't know this edge!";
493
+ var c = i.source.edges.indexOf(i);
494
+ if (i.source.edges.splice(c, 1), c = i.target.edges.indexOf(i), i.target.edges.splice(c, 1), !(i.source.owner != null && i.source.owner.getGraphManager() != null))
495
+ throw "Edge owner graph or owner graph manager is null!";
496
+ if (i.source.owner.getGraphManager().edges.indexOf(i) == -1)
497
+ throw "Not in owner graph manager's edge list!";
498
+ var c = i.source.owner.getGraphManager().edges.indexOf(i);
499
+ i.source.owner.getGraphManager().edges.splice(c, 1);
500
+ }
501
+ }, a.prototype.updateBounds = function() {
502
+ this.rootGraph.updateBounds(!0);
503
+ }, a.prototype.getGraphs = function() {
504
+ return this.graphs;
505
+ }, a.prototype.getAllNodes = function() {
506
+ if (this.allNodes == null) {
507
+ for (var e = [], r = this.getGraphs(), l = r.length, i = 0; i < l; i++)
508
+ e = e.concat(r[i].getNodes());
509
+ this.allNodes = e;
510
+ }
511
+ return this.allNodes;
512
+ }, a.prototype.resetAllNodes = function() {
513
+ this.allNodes = null;
514
+ }, a.prototype.resetAllEdges = function() {
515
+ this.allEdges = null;
516
+ }, a.prototype.resetAllNodesToApplyGravitation = function() {
517
+ this.allNodesToApplyGravitation = null;
518
+ }, a.prototype.getAllEdges = function() {
519
+ if (this.allEdges == null) {
520
+ for (var e = [], r = this.getGraphs(), l = 0; l < r.length; l++)
521
+ e = e.concat(r[l].getEdges());
522
+ e = e.concat(this.edges), this.allEdges = e;
523
+ }
524
+ return this.allEdges;
525
+ }, a.prototype.getAllNodesToApplyGravitation = function() {
526
+ return this.allNodesToApplyGravitation;
527
+ }, a.prototype.setAllNodesToApplyGravitation = function(e) {
528
+ if (this.allNodesToApplyGravitation != null)
529
+ throw "assert failed";
530
+ this.allNodesToApplyGravitation = e;
531
+ }, a.prototype.getRoot = function() {
532
+ return this.rootGraph;
533
+ }, a.prototype.setRootGraph = function(e) {
534
+ if (e.getGraphManager() != this)
535
+ throw "Root not in this graph mgr!";
536
+ this.rootGraph = e, e.parent == null && (e.parent = this.layout.newNode("Root node"));
537
+ }, a.prototype.getLayout = function() {
538
+ return this.layout;
539
+ }, a.prototype.isOneAncestorOfOther = function(e, r) {
540
+ if (!(e != null && r != null))
541
+ throw "assert failed";
542
+ if (e == r)
543
+ return !0;
544
+ var l = e.getOwner(), i;
545
+ do {
546
+ if (i = l.getParent(), i == null)
547
+ break;
548
+ if (i == r)
549
+ return !0;
550
+ if (l = i.getOwner(), l == null)
551
+ break;
552
+ } while (!0);
553
+ l = r.getOwner();
554
+ do {
555
+ if (i = l.getParent(), i == null)
556
+ break;
557
+ if (i == e)
558
+ return !0;
559
+ if (l = i.getOwner(), l == null)
560
+ break;
561
+ } while (!0);
562
+ return !1;
563
+ }, a.prototype.calcLowestCommonAncestors = function() {
564
+ for (var e, r, l, i, g, t = this.getAllEdges(), o = t.length, s = 0; s < o; s++) {
565
+ if (e = t[s], r = e.source, l = e.target, e.lca = null, e.sourceInLca = r, e.targetInLca = l, r == l) {
566
+ e.lca = r.getOwner();
567
+ continue;
568
+ }
569
+ for (i = r.getOwner(); e.lca == null; ) {
570
+ for (e.targetInLca = l, g = l.getOwner(); e.lca == null; ) {
571
+ if (g == i) {
572
+ e.lca = g;
573
+ break;
574
+ }
575
+ if (g == this.rootGraph)
576
+ break;
577
+ if (e.lca != null)
578
+ throw "assert failed";
579
+ e.targetInLca = g.getParent(), g = e.targetInLca.getOwner();
580
+ }
581
+ if (i == this.rootGraph)
582
+ break;
583
+ e.lca == null && (e.sourceInLca = i.getParent(), i = e.sourceInLca.getOwner());
584
+ }
585
+ if (e.lca == null)
586
+ throw "assert failed";
587
+ }
588
+ }, a.prototype.calcLowestCommonAncestor = function(e, r) {
589
+ if (e == r)
590
+ return e.getOwner();
591
+ var l = e.getOwner();
592
+ do {
593
+ if (l == null)
594
+ break;
595
+ var i = r.getOwner();
596
+ do {
597
+ if (i == null)
598
+ break;
599
+ if (i == l)
600
+ return i;
601
+ i = i.getParent().getOwner();
602
+ } while (!0);
603
+ l = l.getParent().getOwner();
604
+ } while (!0);
605
+ return l;
606
+ }, a.prototype.calcInclusionTreeDepths = function(e, r) {
607
+ e == null && r == null && (e = this.rootGraph, r = 1);
608
+ for (var l, i = e.getNodes(), g = i.length, t = 0; t < g; t++)
609
+ l = i[t], l.inclusionTreeDepth = r, l.child != null && this.calcInclusionTreeDepths(l.child, r + 1);
610
+ }, a.prototype.includesInvalidEdge = function() {
611
+ for (var e, r = [], l = this.edges.length, i = 0; i < l; i++)
612
+ e = this.edges[i], this.isOneAncestorOfOther(e.source, e.target) && r.push(e);
613
+ for (var i = 0; i < r.length; i++)
614
+ this.remove(r[i]);
615
+ return !1;
616
+ }, A.exports = a;
617
+ }),
618
+ /* 8 */
619
+ /***/
620
+ (function(A, P, N) {
621
+ var u = N(12);
622
+ function h() {
623
+ }
624
+ h.calcSeparationAmount = function(a, e, r, l) {
625
+ if (!a.intersects(e))
626
+ throw "assert failed";
627
+ var i = new Array(2);
628
+ this.decideDirectionsForOverlappingNodes(a, e, i), r[0] = Math.min(a.getRight(), e.getRight()) - Math.max(a.x, e.x), r[1] = Math.min(a.getBottom(), e.getBottom()) - Math.max(a.y, e.y), a.getX() <= e.getX() && a.getRight() >= e.getRight() ? r[0] += Math.min(e.getX() - a.getX(), a.getRight() - e.getRight()) : e.getX() <= a.getX() && e.getRight() >= a.getRight() && (r[0] += Math.min(a.getX() - e.getX(), e.getRight() - a.getRight())), a.getY() <= e.getY() && a.getBottom() >= e.getBottom() ? r[1] += Math.min(e.getY() - a.getY(), a.getBottom() - e.getBottom()) : e.getY() <= a.getY() && e.getBottom() >= a.getBottom() && (r[1] += Math.min(a.getY() - e.getY(), e.getBottom() - a.getBottom()));
629
+ var g = Math.abs((e.getCenterY() - a.getCenterY()) / (e.getCenterX() - a.getCenterX()));
630
+ e.getCenterY() === a.getCenterY() && e.getCenterX() === a.getCenterX() && (g = 1);
631
+ var t = g * r[0], o = r[1] / g;
632
+ r[0] < o ? o = r[0] : t = r[1], r[0] = -1 * i[0] * (o / 2 + l), r[1] = -1 * i[1] * (t / 2 + l);
633
+ }, h.decideDirectionsForOverlappingNodes = function(a, e, r) {
634
+ a.getCenterX() < e.getCenterX() ? r[0] = -1 : r[0] = 1, a.getCenterY() < e.getCenterY() ? r[1] = -1 : r[1] = 1;
635
+ }, h.getIntersection2 = function(a, e, r) {
636
+ var l = a.getCenterX(), i = a.getCenterY(), g = e.getCenterX(), t = e.getCenterY();
637
+ if (a.intersects(e))
638
+ return r[0] = l, r[1] = i, r[2] = g, r[3] = t, !0;
639
+ var o = a.getX(), s = a.getY(), c = a.getRight(), f = a.getX(), T = a.getBottom(), d = a.getRight(), v = a.getWidthHalf(), L = a.getHeightHalf(), b = e.getX(), C = e.getY(), G = e.getRight(), k = e.getX(), Y = e.getBottom(), K = e.getRight(), O = e.getWidthHalf(), it = e.getHeightHalf(), n = !1, m = !1;
640
+ if (l === g) {
641
+ if (i > t)
642
+ return r[0] = l, r[1] = s, r[2] = g, r[3] = Y, !1;
643
+ if (i < t)
644
+ return r[0] = l, r[1] = T, r[2] = g, r[3] = C, !1;
645
+ } else if (i === t) {
646
+ if (l > g)
647
+ return r[0] = o, r[1] = i, r[2] = G, r[3] = t, !1;
648
+ if (l < g)
649
+ return r[0] = c, r[1] = i, r[2] = b, r[3] = t, !1;
650
+ } else {
651
+ var p = a.height / a.width, E = e.height / e.width, y = (t - i) / (g - l), R = void 0, M = void 0, S = void 0, W = void 0, D = void 0, q = void 0;
652
+ if (-p === y ? l > g ? (r[0] = f, r[1] = T, n = !0) : (r[0] = c, r[1] = s, n = !0) : p === y && (l > g ? (r[0] = o, r[1] = s, n = !0) : (r[0] = d, r[1] = T, n = !0)), -E === y ? g > l ? (r[2] = k, r[3] = Y, m = !0) : (r[2] = G, r[3] = C, m = !0) : E === y && (g > l ? (r[2] = b, r[3] = C, m = !0) : (r[2] = K, r[3] = Y, m = !0)), n && m)
653
+ return !1;
654
+ if (l > g ? i > t ? (R = this.getCardinalDirection(p, y, 4), M = this.getCardinalDirection(E, y, 2)) : (R = this.getCardinalDirection(-p, y, 3), M = this.getCardinalDirection(-E, y, 1)) : i > t ? (R = this.getCardinalDirection(-p, y, 1), M = this.getCardinalDirection(-E, y, 3)) : (R = this.getCardinalDirection(p, y, 2), M = this.getCardinalDirection(E, y, 4)), !n)
655
+ switch (R) {
656
+ case 1:
657
+ W = s, S = l + -L / y, r[0] = S, r[1] = W;
658
+ break;
659
+ case 2:
660
+ S = d, W = i + v * y, r[0] = S, r[1] = W;
661
+ break;
662
+ case 3:
663
+ W = T, S = l + L / y, r[0] = S, r[1] = W;
664
+ break;
665
+ case 4:
666
+ S = f, W = i + -v * y, r[0] = S, r[1] = W;
667
+ break;
668
+ }
669
+ if (!m)
670
+ switch (M) {
671
+ case 1:
672
+ q = C, D = g + -it / y, r[2] = D, r[3] = q;
673
+ break;
674
+ case 2:
675
+ D = K, q = t + O * y, r[2] = D, r[3] = q;
676
+ break;
677
+ case 3:
678
+ q = Y, D = g + it / y, r[2] = D, r[3] = q;
679
+ break;
680
+ case 4:
681
+ D = k, q = t + -O * y, r[2] = D, r[3] = q;
682
+ break;
683
+ }
684
+ }
685
+ return !1;
686
+ }, h.getCardinalDirection = function(a, e, r) {
687
+ return a > e ? r : 1 + r % 4;
688
+ }, h.getIntersection = function(a, e, r, l) {
689
+ if (l == null)
690
+ return this.getIntersection2(a, e, r);
691
+ var i = a.x, g = a.y, t = e.x, o = e.y, s = r.x, c = r.y, f = l.x, T = l.y, d = void 0, v = void 0, L = void 0, b = void 0, C = void 0, G = void 0, k = void 0, Y = void 0, K = void 0;
692
+ return L = o - g, C = i - t, k = t * g - i * o, b = T - c, G = s - f, Y = f * c - s * T, K = L * G - b * C, K === 0 ? null : (d = (C * Y - G * k) / K, v = (b * k - L * Y) / K, new u(d, v));
693
+ }, h.angleOfVector = function(a, e, r, l) {
694
+ var i = void 0;
695
+ return a !== r ? (i = Math.atan((l - e) / (r - a)), r < a ? i += Math.PI : l < e && (i += this.TWO_PI)) : l < e ? i = this.ONE_AND_HALF_PI : i = this.HALF_PI, i;
696
+ }, h.doIntersect = function(a, e, r, l) {
697
+ var i = a.x, g = a.y, t = e.x, o = e.y, s = r.x, c = r.y, f = l.x, T = l.y, d = (t - i) * (T - c) - (f - s) * (o - g);
698
+ if (d === 0)
699
+ return !1;
700
+ var v = ((T - c) * (f - i) + (s - f) * (T - g)) / d, L = ((g - o) * (f - i) + (t - i) * (T - g)) / d;
701
+ return 0 < v && v < 1 && 0 < L && L < 1;
702
+ }, h.findCircleLineIntersections = function(a, e, r, l, i, g, t) {
703
+ var o = (r - a) * (r - a) + (l - e) * (l - e), s = 2 * ((a - i) * (r - a) + (e - g) * (l - e)), c = (a - i) * (a - i) + (e - g) * (e - g) - t * t, f = s * s - 4 * o * c;
704
+ if (f >= 0) {
705
+ var T = (-s + Math.sqrt(s * s - 4 * o * c)) / (2 * o), d = (-s - Math.sqrt(s * s - 4 * o * c)) / (2 * o), v = null;
706
+ return T >= 0 && T <= 1 ? [T] : d >= 0 && d <= 1 ? [d] : v;
707
+ } else return null;
708
+ }, h.HALF_PI = 0.5 * Math.PI, h.ONE_AND_HALF_PI = 1.5 * Math.PI, h.TWO_PI = 2 * Math.PI, h.THREE_PI = 3 * Math.PI, A.exports = h;
709
+ }),
710
+ /* 9 */
711
+ /***/
712
+ (function(A, P, N) {
713
+ function u() {
714
+ }
715
+ u.sign = function(h) {
716
+ return h > 0 ? 1 : h < 0 ? -1 : 0;
717
+ }, u.floor = function(h) {
718
+ return h < 0 ? Math.ceil(h) : Math.floor(h);
719
+ }, u.ceil = function(h) {
720
+ return h < 0 ? Math.floor(h) : Math.ceil(h);
721
+ }, A.exports = u;
722
+ }),
723
+ /* 10 */
724
+ /***/
725
+ (function(A, P, N) {
726
+ function u() {
727
+ }
728
+ u.MAX_VALUE = 2147483647, u.MIN_VALUE = -2147483648, A.exports = u;
729
+ }),
730
+ /* 11 */
731
+ /***/
732
+ (function(A, P, N) {
733
+ var u = /* @__PURE__ */ (function() {
734
+ function i(g, t) {
735
+ for (var o = 0; o < t.length; o++) {
736
+ var s = t[o];
737
+ s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(g, s.key, s);
738
+ }
739
+ }
740
+ return function(g, t, o) {
741
+ return t && i(g.prototype, t), o && i(g, o), g;
742
+ };
743
+ })();
744
+ function h(i, g) {
745
+ if (!(i instanceof g))
746
+ throw new TypeError("Cannot call a class as a function");
747
+ }
748
+ var a = function(g) {
749
+ return { value: g, next: null, prev: null };
750
+ }, e = function(g, t, o, s) {
751
+ return g !== null ? g.next = t : s.head = t, o !== null ? o.prev = t : s.tail = t, t.prev = g, t.next = o, s.length++, t;
752
+ }, r = function(g, t) {
753
+ var o = g.prev, s = g.next;
754
+ return o !== null ? o.next = s : t.head = s, s !== null ? s.prev = o : t.tail = o, g.prev = g.next = null, t.length--, g;
755
+ }, l = (function() {
756
+ function i(g) {
757
+ var t = this;
758
+ h(this, i), this.length = 0, this.head = null, this.tail = null, g?.forEach(function(o) {
759
+ return t.push(o);
760
+ });
761
+ }
762
+ return u(i, [{
763
+ key: "size",
764
+ value: function() {
765
+ return this.length;
766
+ }
767
+ }, {
768
+ key: "insertBefore",
769
+ value: function(t, o) {
770
+ return e(o.prev, a(t), o, this);
771
+ }
772
+ }, {
773
+ key: "insertAfter",
774
+ value: function(t, o) {
775
+ return e(o, a(t), o.next, this);
776
+ }
777
+ }, {
778
+ key: "insertNodeBefore",
779
+ value: function(t, o) {
780
+ return e(o.prev, t, o, this);
781
+ }
782
+ }, {
783
+ key: "insertNodeAfter",
784
+ value: function(t, o) {
785
+ return e(o, t, o.next, this);
786
+ }
787
+ }, {
788
+ key: "push",
789
+ value: function(t) {
790
+ return e(this.tail, a(t), null, this);
791
+ }
792
+ }, {
793
+ key: "unshift",
794
+ value: function(t) {
795
+ return e(null, a(t), this.head, this);
796
+ }
797
+ }, {
798
+ key: "remove",
799
+ value: function(t) {
800
+ return r(t, this);
801
+ }
802
+ }, {
803
+ key: "pop",
804
+ value: function() {
805
+ return r(this.tail, this).value;
806
+ }
807
+ }, {
808
+ key: "popNode",
809
+ value: function() {
810
+ return r(this.tail, this);
811
+ }
812
+ }, {
813
+ key: "shift",
814
+ value: function() {
815
+ return r(this.head, this).value;
816
+ }
817
+ }, {
818
+ key: "shiftNode",
819
+ value: function() {
820
+ return r(this.head, this);
821
+ }
822
+ }, {
823
+ key: "get_object_at",
824
+ value: function(t) {
825
+ if (t <= this.length()) {
826
+ for (var o = 1, s = this.head; o < t; )
827
+ s = s.next, o++;
828
+ return s.value;
829
+ }
830
+ }
831
+ }, {
832
+ key: "set_object_at",
833
+ value: function(t, o) {
834
+ if (t <= this.length()) {
835
+ for (var s = 1, c = this.head; s < t; )
836
+ c = c.next, s++;
837
+ c.value = o;
838
+ }
839
+ }
840
+ }]), i;
841
+ })();
842
+ A.exports = l;
843
+ }),
844
+ /* 12 */
845
+ /***/
846
+ (function(A, P, N) {
847
+ function u(h, a, e) {
848
+ this.x = null, this.y = null, h == null && a == null && e == null ? (this.x = 0, this.y = 0) : typeof h == "number" && typeof a == "number" && e == null ? (this.x = h, this.y = a) : h.constructor.name == "Point" && a == null && e == null && (e = h, this.x = e.x, this.y = e.y);
849
+ }
850
+ u.prototype.getX = function() {
851
+ return this.x;
852
+ }, u.prototype.getY = function() {
853
+ return this.y;
854
+ }, u.prototype.getLocation = function() {
855
+ return new u(this.x, this.y);
856
+ }, u.prototype.setLocation = function(h, a, e) {
857
+ h.constructor.name == "Point" && a == null && e == null ? (e = h, this.setLocation(e.x, e.y)) : typeof h == "number" && typeof a == "number" && e == null && (parseInt(h) == h && parseInt(a) == a ? this.move(h, a) : (this.x = Math.floor(h + 0.5), this.y = Math.floor(a + 0.5)));
858
+ }, u.prototype.move = function(h, a) {
859
+ this.x = h, this.y = a;
860
+ }, u.prototype.translate = function(h, a) {
861
+ this.x += h, this.y += a;
862
+ }, u.prototype.equals = function(h) {
863
+ if (h.constructor.name == "Point") {
864
+ var a = h;
865
+ return this.x == a.x && this.y == a.y;
866
+ }
867
+ return this == h;
868
+ }, u.prototype.toString = function() {
869
+ return new u().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
870
+ }, A.exports = u;
871
+ }),
872
+ /* 13 */
873
+ /***/
874
+ (function(A, P, N) {
875
+ function u(h, a, e, r) {
876
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, h != null && a != null && e != null && r != null && (this.x = h, this.y = a, this.width = e, this.height = r);
877
+ }
878
+ u.prototype.getX = function() {
879
+ return this.x;
880
+ }, u.prototype.setX = function(h) {
881
+ this.x = h;
882
+ }, u.prototype.getY = function() {
883
+ return this.y;
884
+ }, u.prototype.setY = function(h) {
885
+ this.y = h;
886
+ }, u.prototype.getWidth = function() {
887
+ return this.width;
888
+ }, u.prototype.setWidth = function(h) {
889
+ this.width = h;
890
+ }, u.prototype.getHeight = function() {
891
+ return this.height;
892
+ }, u.prototype.setHeight = function(h) {
893
+ this.height = h;
894
+ }, u.prototype.getRight = function() {
895
+ return this.x + this.width;
896
+ }, u.prototype.getBottom = function() {
897
+ return this.y + this.height;
898
+ }, u.prototype.intersects = function(h) {
899
+ return !(this.getRight() < h.x || this.getBottom() < h.y || h.getRight() < this.x || h.getBottom() < this.y);
900
+ }, u.prototype.getCenterX = function() {
901
+ return this.x + this.width / 2;
902
+ }, u.prototype.getMinX = function() {
903
+ return this.getX();
904
+ }, u.prototype.getMaxX = function() {
905
+ return this.getX() + this.width;
906
+ }, u.prototype.getCenterY = function() {
907
+ return this.y + this.height / 2;
908
+ }, u.prototype.getMinY = function() {
909
+ return this.getY();
910
+ }, u.prototype.getMaxY = function() {
911
+ return this.getY() + this.height;
912
+ }, u.prototype.getWidthHalf = function() {
913
+ return this.width / 2;
914
+ }, u.prototype.getHeightHalf = function() {
915
+ return this.height / 2;
916
+ }, A.exports = u;
917
+ }),
918
+ /* 14 */
919
+ /***/
920
+ (function(A, P, N) {
921
+ var u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
922
+ return typeof a;
923
+ } : function(a) {
924
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
925
+ };
926
+ function h() {
927
+ }
928
+ h.lastID = 0, h.createID = function(a) {
929
+ return h.isPrimitive(a) ? a : (a.uniqueID != null || (a.uniqueID = h.getString(), h.lastID++), a.uniqueID);
930
+ }, h.getString = function(a) {
931
+ return a == null && (a = h.lastID), "Object#" + a;
932
+ }, h.isPrimitive = function(a) {
933
+ var e = typeof a > "u" ? "undefined" : u(a);
934
+ return a == null || e != "object" && e != "function";
935
+ }, A.exports = h;
936
+ }),
937
+ /* 15 */
938
+ /***/
939
+ (function(A, P, N) {
940
+ function u(s) {
941
+ if (Array.isArray(s)) {
942
+ for (var c = 0, f = Array(s.length); c < s.length; c++)
943
+ f[c] = s[c];
944
+ return f;
945
+ } else
946
+ return Array.from(s);
947
+ }
948
+ var h = N(0), a = N(7), e = N(3), r = N(1), l = N(6), i = N(5), g = N(17), t = N(29);
949
+ function o(s) {
950
+ t.call(this), this.layoutQuality = h.QUALITY, this.createBendsAsNeeded = h.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = h.DEFAULT_INCREMENTAL, this.animationOnLayout = h.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = h.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = h.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = h.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new a(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, s != null && (this.isRemoteUse = s);
951
+ }
952
+ o.RANDOM_SEED = 1, o.prototype = Object.create(t.prototype), o.prototype.getGraphManager = function() {
953
+ return this.graphManager;
954
+ }, o.prototype.getAllNodes = function() {
955
+ return this.graphManager.getAllNodes();
956
+ }, o.prototype.getAllEdges = function() {
957
+ return this.graphManager.getAllEdges();
958
+ }, o.prototype.getAllNodesToApplyGravitation = function() {
959
+ return this.graphManager.getAllNodesToApplyGravitation();
960
+ }, o.prototype.newGraphManager = function() {
961
+ var s = new a(this);
962
+ return this.graphManager = s, s;
963
+ }, o.prototype.newGraph = function(s) {
964
+ return new l(null, this.graphManager, s);
965
+ }, o.prototype.newNode = function(s) {
966
+ return new e(this.graphManager, s);
967
+ }, o.prototype.newEdge = function(s) {
968
+ return new r(null, null, s);
969
+ }, o.prototype.checkLayoutSuccess = function() {
970
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
971
+ }, o.prototype.runLayout = function() {
972
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
973
+ var s;
974
+ return this.checkLayoutSuccess() ? s = !1 : s = this.layout(), h.ANIMATE === "during" ? !1 : (s && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, s);
975
+ }, o.prototype.doPostLayout = function() {
976
+ this.incremental || this.transform(), this.update();
977
+ }, o.prototype.update2 = function() {
978
+ this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), this.isRemoteUse || (this.graphManager.getAllEdges(), this.graphManager.getRoot().getNodes(), this.update(this.graphManager.getRoot()));
979
+ }, o.prototype.update = function(s) {
980
+ if (s == null)
981
+ this.update2();
982
+ else if (s instanceof e) {
983
+ var c = s;
984
+ if (c.getChild() != null)
985
+ for (var f = c.getChild().getNodes(), T = 0; T < f.length; T++)
986
+ update(f[T]);
987
+ if (c.vGraphObject != null) {
988
+ var d = c.vGraphObject;
989
+ d.update(c);
990
+ }
991
+ } else if (s instanceof r) {
992
+ var v = s;
993
+ if (v.vGraphObject != null) {
994
+ var L = v.vGraphObject;
995
+ L.update(v);
996
+ }
997
+ } else if (s instanceof l) {
998
+ var b = s;
999
+ if (b.vGraphObject != null) {
1000
+ var C = b.vGraphObject;
1001
+ C.update(b);
1002
+ }
1003
+ }
1004
+ }, o.prototype.initParameters = function() {
1005
+ this.isSubLayout || (this.layoutQuality = h.QUALITY, this.animationDuringLayout = h.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = h.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = h.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = h.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = h.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = h.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1006
+ }, o.prototype.transform = function(s) {
1007
+ if (s == null)
1008
+ this.transform(new i(0, 0));
1009
+ else {
1010
+ var c = new g(), f = this.graphManager.getRoot().updateLeftTop();
1011
+ if (f != null) {
1012
+ c.setWorldOrgX(s.x), c.setWorldOrgY(s.y), c.setDeviceOrgX(f.x), c.setDeviceOrgY(f.y);
1013
+ for (var T = this.getAllNodes(), d, v = 0; v < T.length; v++)
1014
+ d = T[v], d.transform(c);
1015
+ }
1016
+ }
1017
+ }, o.prototype.positionNodesRandomly = function(s) {
1018
+ if (s == null)
1019
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1020
+ else
1021
+ for (var c, f, T = s.getNodes(), d = 0; d < T.length; d++)
1022
+ c = T[d], f = c.getChild(), f == null || f.getNodes().length == 0 ? c.scatter() : (this.positionNodesRandomly(f), c.updateBounds());
1023
+ }, o.prototype.getFlatForest = function() {
1024
+ for (var s = [], c = !0, f = this.graphManager.getRoot().getNodes(), T = !0, d = 0; d < f.length; d++)
1025
+ f[d].getChild() != null && (T = !1);
1026
+ if (!T)
1027
+ return s;
1028
+ var v = /* @__PURE__ */ new Set(), L = [], b = /* @__PURE__ */ new Map(), C = [];
1029
+ for (C = C.concat(f); C.length > 0 && c; ) {
1030
+ for (L.push(C[0]); L.length > 0 && c; ) {
1031
+ var G = L[0];
1032
+ L.splice(0, 1), v.add(G);
1033
+ for (var k = G.getEdges(), d = 0; d < k.length; d++) {
1034
+ var Y = k[d].getOtherEnd(G);
1035
+ if (b.get(G) != Y)
1036
+ if (!v.has(Y))
1037
+ L.push(Y), b.set(Y, G);
1038
+ else {
1039
+ c = !1;
1040
+ break;
1041
+ }
1042
+ }
1043
+ }
1044
+ if (!c)
1045
+ s = [];
1046
+ else {
1047
+ var K = [].concat(u(v));
1048
+ s.push(K);
1049
+ for (var d = 0; d < K.length; d++) {
1050
+ var O = K[d], it = C.indexOf(O);
1051
+ it > -1 && C.splice(it, 1);
1052
+ }
1053
+ v = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Map();
1054
+ }
1055
+ }
1056
+ return s;
1057
+ }, o.prototype.createDummyNodesForBendpoints = function(s) {
1058
+ for (var c = [], f = s.source, T = this.graphManager.calcLowestCommonAncestor(s.source, s.target), d = 0; d < s.bendpoints.length; d++) {
1059
+ var v = this.newNode(null);
1060
+ v.setRect(new Point(0, 0), new Dimension(1, 1)), T.add(v);
1061
+ var L = this.newEdge(null);
1062
+ this.graphManager.add(L, f, v), c.add(v), f = v;
1063
+ }
1064
+ var L = this.newEdge(null);
1065
+ return this.graphManager.add(L, f, s.target), this.edgeToDummyNodes.set(s, c), s.isInterGraph() ? this.graphManager.remove(s) : T.remove(s), c;
1066
+ }, o.prototype.createBendpointsFromDummyNodes = function() {
1067
+ var s = [];
1068
+ s = s.concat(this.graphManager.getAllEdges()), s = [].concat(u(this.edgeToDummyNodes.keys())).concat(s);
1069
+ for (var c = 0; c < s.length; c++) {
1070
+ var f = s[c];
1071
+ if (f.bendpoints.length > 0) {
1072
+ for (var T = this.edgeToDummyNodes.get(f), d = 0; d < T.length; d++) {
1073
+ var v = T[d], L = new i(v.getCenterX(), v.getCenterY()), b = f.bendpoints.get(d);
1074
+ b.x = L.x, b.y = L.y, v.getOwner().remove(v);
1075
+ }
1076
+ this.graphManager.add(f, f.source, f.target);
1077
+ }
1078
+ }
1079
+ }, o.transform = function(s, c, f, T) {
1080
+ if (f != null && T != null) {
1081
+ var d = c;
1082
+ if (s <= 50) {
1083
+ var v = c / f;
1084
+ d -= (c - v) / 50 * (50 - s);
1085
+ } else {
1086
+ var L = c * T;
1087
+ d += (L - c) / 50 * (s - 50);
1088
+ }
1089
+ return d;
1090
+ } else {
1091
+ var b, C;
1092
+ return s <= 50 ? (b = 9 * c / 500, C = c / 10) : (b = 9 * c / 50, C = -8 * c), b * s + C;
1093
+ }
1094
+ }, o.findCenterOfTree = function(s) {
1095
+ var c = [];
1096
+ c = c.concat(s);
1097
+ var f = [], T = /* @__PURE__ */ new Map(), d = !1, v = null;
1098
+ (c.length == 1 || c.length == 2) && (d = !0, v = c[0]);
1099
+ for (var L = 0; L < c.length; L++) {
1100
+ var b = c[L], C = b.getNeighborsList().size;
1101
+ T.set(b, b.getNeighborsList().size), C == 1 && f.push(b);
1102
+ }
1103
+ var G = [];
1104
+ for (G = G.concat(f); !d; ) {
1105
+ var k = [];
1106
+ k = k.concat(G), G = [];
1107
+ for (var L = 0; L < c.length; L++) {
1108
+ var b = c[L], Y = c.indexOf(b);
1109
+ Y >= 0 && c.splice(Y, 1);
1110
+ var K = b.getNeighborsList();
1111
+ K.forEach(function(n) {
1112
+ if (f.indexOf(n) < 0) {
1113
+ var m = T.get(n), p = m - 1;
1114
+ p == 1 && G.push(n), T.set(n, p);
1115
+ }
1116
+ });
1117
+ }
1118
+ f = f.concat(G), (c.length == 1 || c.length == 2) && (d = !0, v = c[0]);
1119
+ }
1120
+ return v;
1121
+ }, o.prototype.setGraphManager = function(s) {
1122
+ this.graphManager = s;
1123
+ }, A.exports = o;
1124
+ }),
1125
+ /* 16 */
1126
+ /***/
1127
+ (function(A, P, N) {
1128
+ function u() {
1129
+ }
1130
+ u.seed = 1, u.x = 0, u.nextDouble = function() {
1131
+ return u.x = Math.sin(u.seed++) * 1e4, u.x - Math.floor(u.x);
1132
+ }, A.exports = u;
1133
+ }),
1134
+ /* 17 */
1135
+ /***/
1136
+ (function(A, P, N) {
1137
+ var u = N(5);
1138
+ function h(a, e) {
1139
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1140
+ }
1141
+ h.prototype.getWorldOrgX = function() {
1142
+ return this.lworldOrgX;
1143
+ }, h.prototype.setWorldOrgX = function(a) {
1144
+ this.lworldOrgX = a;
1145
+ }, h.prototype.getWorldOrgY = function() {
1146
+ return this.lworldOrgY;
1147
+ }, h.prototype.setWorldOrgY = function(a) {
1148
+ this.lworldOrgY = a;
1149
+ }, h.prototype.getWorldExtX = function() {
1150
+ return this.lworldExtX;
1151
+ }, h.prototype.setWorldExtX = function(a) {
1152
+ this.lworldExtX = a;
1153
+ }, h.prototype.getWorldExtY = function() {
1154
+ return this.lworldExtY;
1155
+ }, h.prototype.setWorldExtY = function(a) {
1156
+ this.lworldExtY = a;
1157
+ }, h.prototype.getDeviceOrgX = function() {
1158
+ return this.ldeviceOrgX;
1159
+ }, h.prototype.setDeviceOrgX = function(a) {
1160
+ this.ldeviceOrgX = a;
1161
+ }, h.prototype.getDeviceOrgY = function() {
1162
+ return this.ldeviceOrgY;
1163
+ }, h.prototype.setDeviceOrgY = function(a) {
1164
+ this.ldeviceOrgY = a;
1165
+ }, h.prototype.getDeviceExtX = function() {
1166
+ return this.ldeviceExtX;
1167
+ }, h.prototype.setDeviceExtX = function(a) {
1168
+ this.ldeviceExtX = a;
1169
+ }, h.prototype.getDeviceExtY = function() {
1170
+ return this.ldeviceExtY;
1171
+ }, h.prototype.setDeviceExtY = function(a) {
1172
+ this.ldeviceExtY = a;
1173
+ }, h.prototype.transformX = function(a) {
1174
+ var e = 0, r = this.lworldExtX;
1175
+ return r != 0 && (e = this.ldeviceOrgX + (a - this.lworldOrgX) * this.ldeviceExtX / r), e;
1176
+ }, h.prototype.transformY = function(a) {
1177
+ var e = 0, r = this.lworldExtY;
1178
+ return r != 0 && (e = this.ldeviceOrgY + (a - this.lworldOrgY) * this.ldeviceExtY / r), e;
1179
+ }, h.prototype.inverseTransformX = function(a) {
1180
+ var e = 0, r = this.ldeviceExtX;
1181
+ return r != 0 && (e = this.lworldOrgX + (a - this.ldeviceOrgX) * this.lworldExtX / r), e;
1182
+ }, h.prototype.inverseTransformY = function(a) {
1183
+ var e = 0, r = this.ldeviceExtY;
1184
+ return r != 0 && (e = this.lworldOrgY + (a - this.ldeviceOrgY) * this.lworldExtY / r), e;
1185
+ }, h.prototype.inverseTransformPoint = function(a) {
1186
+ var e = new u(this.inverseTransformX(a.x), this.inverseTransformY(a.y));
1187
+ return e;
1188
+ }, A.exports = h;
1189
+ }),
1190
+ /* 18 */
1191
+ /***/
1192
+ (function(A, P, N) {
1193
+ function u(t) {
1194
+ if (Array.isArray(t)) {
1195
+ for (var o = 0, s = Array(t.length); o < t.length; o++)
1196
+ s[o] = t[o];
1197
+ return s;
1198
+ } else
1199
+ return Array.from(t);
1200
+ }
1201
+ var h = N(15), a = N(4), e = N(0), r = N(8), l = N(9);
1202
+ function i() {
1203
+ h.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = a.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = a.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = a.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = a.MAX_ITERATIONS;
1204
+ }
1205
+ i.prototype = Object.create(h.prototype);
1206
+ for (var g in h)
1207
+ i[g] = h[g];
1208
+ i.prototype.initParameters = function() {
1209
+ h.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1210
+ }, i.prototype.calcIdealEdgeLengths = function() {
1211
+ for (var t, o, s, c, f, T, d, v = this.getGraphManager().getAllEdges(), L = 0; L < v.length; L++)
1212
+ t = v[L], o = t.idealLength, t.isInterGraph && (c = t.getSource(), f = t.getTarget(), T = t.getSourceInLca().getEstimatedSize(), d = t.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (t.idealLength += T + d - 2 * e.SIMPLE_NODE_SIZE), s = t.getLca().getInclusionTreeDepth(), t.idealLength += o * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + f.getInclusionTreeDepth() - 2 * s));
1213
+ }, i.prototype.initSpringEmbedder = function() {
1214
+ var t = this.getAllNodes().length;
1215
+ this.incremental ? (t > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (t - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (t > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (t - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1216
+ }, i.prototype.calcSpringForces = function() {
1217
+ for (var t = this.getAllEdges(), o, s = 0; s < t.length; s++)
1218
+ o = t[s], this.calcSpringForce(o, o.idealLength);
1219
+ }, i.prototype.calcRepulsionForces = function() {
1220
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, s, c, f, T, d = this.getAllNodes(), v;
1221
+ if (this.useFRGridVariant)
1222
+ for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && t && this.updateGrid(), v = /* @__PURE__ */ new Set(), s = 0; s < d.length; s++)
1223
+ f = d[s], this.calculateRepulsionForceOfANode(f, v, t, o), v.add(f);
1224
+ else
1225
+ for (s = 0; s < d.length; s++)
1226
+ for (f = d[s], c = s + 1; c < d.length; c++)
1227
+ T = d[c], f.getOwner() == T.getOwner() && this.calcRepulsionForce(f, T);
1228
+ }, i.prototype.calcGravitationalForces = function() {
1229
+ for (var t, o = this.getAllNodesToApplyGravitation(), s = 0; s < o.length; s++)
1230
+ t = o[s], this.calcGravitationalForce(t);
1231
+ }, i.prototype.moveNodes = function() {
1232
+ for (var t = this.getAllNodes(), o, s = 0; s < t.length; s++)
1233
+ o = t[s], o.move();
1234
+ }, i.prototype.calcSpringForce = function(t, o) {
1235
+ var s = t.getSource(), c = t.getTarget(), f, T, d, v;
1236
+ if (this.uniformLeafNodeSizes && s.getChild() == null && c.getChild() == null)
1237
+ t.updateLengthSimple();
1238
+ else if (t.updateLength(), t.isOverlapingSourceAndTarget)
1239
+ return;
1240
+ f = t.getLength(), f != 0 && (T = t.edgeElasticity * (f - o), d = T * (t.lengthX / f), v = T * (t.lengthY / f), s.springForceX += d, s.springForceY += v, c.springForceX -= d, c.springForceY -= v);
1241
+ }, i.prototype.calcRepulsionForce = function(t, o) {
1242
+ var s = t.getRect(), c = o.getRect(), f = new Array(2), T = new Array(4), d, v, L, b, C, G, k;
1243
+ if (s.intersects(c)) {
1244
+ r.calcSeparationAmount(s, c, f, a.DEFAULT_EDGE_LENGTH / 2), G = 2 * f[0], k = 2 * f[1];
1245
+ var Y = t.noOfChildren * o.noOfChildren / (t.noOfChildren + o.noOfChildren);
1246
+ t.repulsionForceX -= Y * G, t.repulsionForceY -= Y * k, o.repulsionForceX += Y * G, o.repulsionForceY += Y * k;
1247
+ } else
1248
+ this.uniformLeafNodeSizes && t.getChild() == null && o.getChild() == null ? (d = c.getCenterX() - s.getCenterX(), v = c.getCenterY() - s.getCenterY()) : (r.getIntersection(s, c, T), d = T[2] - T[0], v = T[3] - T[1]), Math.abs(d) < a.MIN_REPULSION_DIST && (d = l.sign(d) * a.MIN_REPULSION_DIST), Math.abs(v) < a.MIN_REPULSION_DIST && (v = l.sign(v) * a.MIN_REPULSION_DIST), L = d * d + v * v, b = Math.sqrt(L), C = (t.nodeRepulsion / 2 + o.nodeRepulsion / 2) * t.noOfChildren * o.noOfChildren / L, G = C * d / b, k = C * v / b, t.repulsionForceX -= G, t.repulsionForceY -= k, o.repulsionForceX += G, o.repulsionForceY += k;
1249
+ }, i.prototype.calcGravitationalForce = function(t) {
1250
+ var o, s, c, f, T, d, v, L;
1251
+ o = t.getOwner(), s = (o.getRight() + o.getLeft()) / 2, c = (o.getTop() + o.getBottom()) / 2, f = t.getCenterX() - s, T = t.getCenterY() - c, d = Math.abs(f) + t.getWidth() / 2, v = Math.abs(T) + t.getHeight() / 2, t.getOwner() == this.graphManager.getRoot() ? (L = o.getEstimatedSize() * this.gravityRangeFactor, (d > L || v > L) && (t.gravitationForceX = -this.gravityConstant * f, t.gravitationForceY = -this.gravityConstant * T)) : (L = o.getEstimatedSize() * this.compoundGravityRangeFactor, (d > L || v > L) && (t.gravitationForceX = -this.gravityConstant * f * this.compoundGravityConstant, t.gravitationForceY = -this.gravityConstant * T * this.compoundGravityConstant));
1252
+ }, i.prototype.isConverged = function() {
1253
+ var t, o = !1;
1254
+ return this.totalIterations > this.maxIterations / 3 && (o = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), t = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, t || o;
1255
+ }, i.prototype.animate = function() {
1256
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1257
+ }, i.prototype.calcNoOfChildrenForAllNodes = function() {
1258
+ for (var t, o = this.graphManager.getAllNodes(), s = 0; s < o.length; s++)
1259
+ t = o[s], t.noOfChildren = t.getNoOfChildren();
1260
+ }, i.prototype.calcGrid = function(t) {
1261
+ var o = 0, s = 0;
1262
+ o = parseInt(Math.ceil((t.getRight() - t.getLeft()) / this.repulsionRange)), s = parseInt(Math.ceil((t.getBottom() - t.getTop()) / this.repulsionRange));
1263
+ for (var c = new Array(o), f = 0; f < o; f++)
1264
+ c[f] = new Array(s);
1265
+ for (var f = 0; f < o; f++)
1266
+ for (var T = 0; T < s; T++)
1267
+ c[f][T] = new Array();
1268
+ return c;
1269
+ }, i.prototype.addNodeToGrid = function(t, o, s) {
1270
+ var c = 0, f = 0, T = 0, d = 0;
1271
+ c = parseInt(Math.floor((t.getRect().x - o) / this.repulsionRange)), f = parseInt(Math.floor((t.getRect().width + t.getRect().x - o) / this.repulsionRange)), T = parseInt(Math.floor((t.getRect().y - s) / this.repulsionRange)), d = parseInt(Math.floor((t.getRect().height + t.getRect().y - s) / this.repulsionRange));
1272
+ for (var v = c; v <= f; v++)
1273
+ for (var L = T; L <= d; L++)
1274
+ this.grid[v][L].push(t), t.setGridCoordinates(c, f, T, d);
1275
+ }, i.prototype.updateGrid = function() {
1276
+ var t, o, s = this.getAllNodes();
1277
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), t = 0; t < s.length; t++)
1278
+ o = s[t], this.addNodeToGrid(o, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1279
+ }, i.prototype.calculateRepulsionForceOfANode = function(t, o, s, c) {
1280
+ if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && s || c) {
1281
+ var f = /* @__PURE__ */ new Set();
1282
+ t.surrounding = new Array();
1283
+ for (var T, d = this.grid, v = t.startX - 1; v < t.finishX + 2; v++)
1284
+ for (var L = t.startY - 1; L < t.finishY + 2; L++)
1285
+ if (!(v < 0 || L < 0 || v >= d.length || L >= d[0].length)) {
1286
+ for (var b = 0; b < d[v][L].length; b++)
1287
+ if (T = d[v][L][b], !(t.getOwner() != T.getOwner() || t == T) && !o.has(T) && !f.has(T)) {
1288
+ var C = Math.abs(t.getCenterX() - T.getCenterX()) - (t.getWidth() / 2 + T.getWidth() / 2), G = Math.abs(t.getCenterY() - T.getCenterY()) - (t.getHeight() / 2 + T.getHeight() / 2);
1289
+ C <= this.repulsionRange && G <= this.repulsionRange && f.add(T);
1290
+ }
1291
+ }
1292
+ t.surrounding = [].concat(u(f));
1293
+ }
1294
+ for (v = 0; v < t.surrounding.length; v++)
1295
+ this.calcRepulsionForce(t, t.surrounding[v]);
1296
+ }, i.prototype.calcRepulsionRange = function() {
1297
+ return 0;
1298
+ }, A.exports = i;
1299
+ }),
1300
+ /* 19 */
1301
+ /***/
1302
+ (function(A, P, N) {
1303
+ var u = N(1), h = N(4);
1304
+ function a(r, l, i) {
1305
+ u.call(this, r, l, i), this.idealLength = h.DEFAULT_EDGE_LENGTH, this.edgeElasticity = h.DEFAULT_SPRING_STRENGTH;
1306
+ }
1307
+ a.prototype = Object.create(u.prototype);
1308
+ for (var e in u)
1309
+ a[e] = u[e];
1310
+ A.exports = a;
1311
+ }),
1312
+ /* 20 */
1313
+ /***/
1314
+ (function(A, P, N) {
1315
+ var u = N(3), h = N(4);
1316
+ function a(r, l, i, g) {
1317
+ u.call(this, r, l, i, g), this.nodeRepulsion = h.DEFAULT_REPULSION_STRENGTH, 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 = [];
1318
+ }
1319
+ a.prototype = Object.create(u.prototype);
1320
+ for (var e in u)
1321
+ a[e] = u[e];
1322
+ a.prototype.setGridCoordinates = function(r, l, i, g) {
1323
+ this.startX = r, this.finishX = l, this.startY = i, this.finishY = g;
1324
+ }, A.exports = a;
1325
+ }),
1326
+ /* 21 */
1327
+ /***/
1328
+ (function(A, P, N) {
1329
+ function u(h, a) {
1330
+ this.width = 0, this.height = 0, h !== null && a !== null && (this.height = a, this.width = h);
1331
+ }
1332
+ u.prototype.getWidth = function() {
1333
+ return this.width;
1334
+ }, u.prototype.setWidth = function(h) {
1335
+ this.width = h;
1336
+ }, u.prototype.getHeight = function() {
1337
+ return this.height;
1338
+ }, u.prototype.setHeight = function(h) {
1339
+ this.height = h;
1340
+ }, A.exports = u;
1341
+ }),
1342
+ /* 22 */
1343
+ /***/
1344
+ (function(A, P, N) {
1345
+ var u = N(14);
1346
+ function h() {
1347
+ this.map = {}, this.keys = [];
1348
+ }
1349
+ h.prototype.put = function(a, e) {
1350
+ var r = u.createID(a);
1351
+ this.contains(r) || (this.map[r] = e, this.keys.push(a));
1352
+ }, h.prototype.contains = function(a) {
1353
+ return u.createID(a), this.map[a] != null;
1354
+ }, h.prototype.get = function(a) {
1355
+ var e = u.createID(a);
1356
+ return this.map[e];
1357
+ }, h.prototype.keySet = function() {
1358
+ return this.keys;
1359
+ }, A.exports = h;
1360
+ }),
1361
+ /* 23 */
1362
+ /***/
1363
+ (function(A, P, N) {
1364
+ var u = N(14);
1365
+ function h() {
1366
+ this.set = {};
1367
+ }
1368
+ h.prototype.add = function(a) {
1369
+ var e = u.createID(a);
1370
+ this.contains(e) || (this.set[e] = a);
1371
+ }, h.prototype.remove = function(a) {
1372
+ delete this.set[u.createID(a)];
1373
+ }, h.prototype.clear = function() {
1374
+ this.set = {};
1375
+ }, h.prototype.contains = function(a) {
1376
+ return this.set[u.createID(a)] == a;
1377
+ }, h.prototype.isEmpty = function() {
1378
+ return this.size() === 0;
1379
+ }, h.prototype.size = function() {
1380
+ return Object.keys(this.set).length;
1381
+ }, h.prototype.addAllTo = function(a) {
1382
+ for (var e = Object.keys(this.set), r = e.length, l = 0; l < r; l++)
1383
+ a.push(this.set[e[l]]);
1384
+ }, h.prototype.size = function() {
1385
+ return Object.keys(this.set).length;
1386
+ }, h.prototype.addAll = function(a) {
1387
+ for (var e = a.length, r = 0; r < e; r++) {
1388
+ var l = a[r];
1389
+ this.add(l);
1390
+ }
1391
+ }, A.exports = h;
1392
+ }),
1393
+ /* 24 */
1394
+ /***/
1395
+ (function(A, P, N) {
1396
+ function u() {
1397
+ }
1398
+ u.multMat = function(h, a) {
1399
+ for (var e = [], r = 0; r < h.length; r++) {
1400
+ e[r] = [];
1401
+ for (var l = 0; l < a[0].length; l++) {
1402
+ e[r][l] = 0;
1403
+ for (var i = 0; i < h[0].length; i++)
1404
+ e[r][l] += h[r][i] * a[i][l];
1405
+ }
1406
+ }
1407
+ return e;
1408
+ }, u.transpose = function(h) {
1409
+ for (var a = [], e = 0; e < h[0].length; e++) {
1410
+ a[e] = [];
1411
+ for (var r = 0; r < h.length; r++)
1412
+ a[e][r] = h[r][e];
1413
+ }
1414
+ return a;
1415
+ }, u.multCons = function(h, a) {
1416
+ for (var e = [], r = 0; r < h.length; r++)
1417
+ e[r] = h[r] * a;
1418
+ return e;
1419
+ }, u.minusOp = function(h, a) {
1420
+ for (var e = [], r = 0; r < h.length; r++)
1421
+ e[r] = h[r] - a[r];
1422
+ return e;
1423
+ }, u.dotProduct = function(h, a) {
1424
+ for (var e = 0, r = 0; r < h.length; r++)
1425
+ e += h[r] * a[r];
1426
+ return e;
1427
+ }, u.mag = function(h) {
1428
+ return Math.sqrt(this.dotProduct(h, h));
1429
+ }, u.normalize = function(h) {
1430
+ for (var a = [], e = this.mag(h), r = 0; r < h.length; r++)
1431
+ a[r] = h[r] / e;
1432
+ return a;
1433
+ }, u.multGamma = function(h) {
1434
+ for (var a = [], e = 0, r = 0; r < h.length; r++)
1435
+ e += h[r];
1436
+ e *= -1 / h.length;
1437
+ for (var l = 0; l < h.length; l++)
1438
+ a[l] = e + h[l];
1439
+ return a;
1440
+ }, u.multL = function(h, a, e) {
1441
+ for (var r = [], l = [], i = [], g = 0; g < a[0].length; g++) {
1442
+ for (var t = 0, o = 0; o < a.length; o++)
1443
+ t += -0.5 * a[o][g] * h[o];
1444
+ l[g] = t;
1445
+ }
1446
+ for (var s = 0; s < e.length; s++) {
1447
+ for (var c = 0, f = 0; f < e.length; f++)
1448
+ c += e[s][f] * l[f];
1449
+ i[s] = c;
1450
+ }
1451
+ for (var T = 0; T < a.length; T++) {
1452
+ for (var d = 0, v = 0; v < a[0].length; v++)
1453
+ d += a[T][v] * i[v];
1454
+ r[T] = d;
1455
+ }
1456
+ return r;
1457
+ }, A.exports = u;
1458
+ }),
1459
+ /* 25 */
1460
+ /***/
1461
+ (function(A, P, N) {
1462
+ var u = /* @__PURE__ */ (function() {
1463
+ function r(l, i) {
1464
+ for (var g = 0; g < i.length; g++) {
1465
+ var t = i[g];
1466
+ t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(l, t.key, t);
1467
+ }
1468
+ }
1469
+ return function(l, i, g) {
1470
+ return i && r(l.prototype, i), g && r(l, g), l;
1471
+ };
1472
+ })();
1473
+ function h(r, l) {
1474
+ if (!(r instanceof l))
1475
+ throw new TypeError("Cannot call a class as a function");
1476
+ }
1477
+ var a = N(11), e = (function() {
1478
+ function r(l, i) {
1479
+ h(this, r), (i !== null || i !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1480
+ var g = void 0;
1481
+ l instanceof a ? g = l.size() : g = l.length, this._quicksort(l, 0, g - 1);
1482
+ }
1483
+ return u(r, [{
1484
+ key: "_quicksort",
1485
+ value: function(i, g, t) {
1486
+ if (g < t) {
1487
+ var o = this._partition(i, g, t);
1488
+ this._quicksort(i, g, o), this._quicksort(i, o + 1, t);
1489
+ }
1490
+ }
1491
+ }, {
1492
+ key: "_partition",
1493
+ value: function(i, g, t) {
1494
+ for (var o = this._get(i, g), s = g, c = t; ; ) {
1495
+ for (; this.compareFunction(o, this._get(i, c)); )
1496
+ c--;
1497
+ for (; this.compareFunction(this._get(i, s), o); )
1498
+ s++;
1499
+ if (s < c)
1500
+ this._swap(i, s, c), s++, c--;
1501
+ else return c;
1502
+ }
1503
+ }
1504
+ }, {
1505
+ key: "_get",
1506
+ value: function(i, g) {
1507
+ return i instanceof a ? i.get_object_at(g) : i[g];
1508
+ }
1509
+ }, {
1510
+ key: "_set",
1511
+ value: function(i, g, t) {
1512
+ i instanceof a ? i.set_object_at(g, t) : i[g] = t;
1513
+ }
1514
+ }, {
1515
+ key: "_swap",
1516
+ value: function(i, g, t) {
1517
+ var o = this._get(i, g);
1518
+ this._set(i, g, this._get(i, t)), this._set(i, t, o);
1519
+ }
1520
+ }, {
1521
+ key: "_defaultCompareFunction",
1522
+ value: function(i, g) {
1523
+ return g > i;
1524
+ }
1525
+ }]), r;
1526
+ })();
1527
+ A.exports = e;
1528
+ }),
1529
+ /* 26 */
1530
+ /***/
1531
+ (function(A, P, N) {
1532
+ function u() {
1533
+ }
1534
+ u.svd = function(h) {
1535
+ this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = h.length, this.n = h[0].length;
1536
+ var a = Math.min(this.m, this.n);
1537
+ this.s = (function(Tt) {
1538
+ for (var Ct = []; Tt-- > 0; )
1539
+ Ct.push(0);
1540
+ return Ct;
1541
+ })(Math.min(this.m + 1, this.n)), this.U = (function(Tt) {
1542
+ var Ct = function $t(bt) {
1543
+ if (bt.length == 0)
1544
+ return 0;
1545
+ for (var zt = [], St = 0; St < bt[0]; St++)
1546
+ zt.push($t(bt.slice(1)));
1547
+ return zt;
1548
+ };
1549
+ return Ct(Tt);
1550
+ })([this.m, a]), this.V = (function(Tt) {
1551
+ var Ct = function $t(bt) {
1552
+ if (bt.length == 0)
1553
+ return 0;
1554
+ for (var zt = [], St = 0; St < bt[0]; St++)
1555
+ zt.push($t(bt.slice(1)));
1556
+ return zt;
1557
+ };
1558
+ return Ct(Tt);
1559
+ })([this.n, this.n]);
1560
+ for (var e = (function(Tt) {
1561
+ for (var Ct = []; Tt-- > 0; )
1562
+ Ct.push(0);
1563
+ return Ct;
1564
+ })(this.n), r = (function(Tt) {
1565
+ for (var Ct = []; Tt-- > 0; )
1566
+ Ct.push(0);
1567
+ return Ct;
1568
+ })(this.m), l = !0, i = Math.min(this.m - 1, this.n), g = Math.max(0, Math.min(this.n - 2, this.m)), t = 0; t < Math.max(i, g); t++) {
1569
+ if (t < i) {
1570
+ this.s[t] = 0;
1571
+ for (var o = t; o < this.m; o++)
1572
+ this.s[t] = u.hypot(this.s[t], h[o][t]);
1573
+ if (this.s[t] !== 0) {
1574
+ h[t][t] < 0 && (this.s[t] = -this.s[t]);
1575
+ for (var s = t; s < this.m; s++)
1576
+ h[s][t] /= this.s[t];
1577
+ h[t][t] += 1;
1578
+ }
1579
+ this.s[t] = -this.s[t];
1580
+ }
1581
+ for (var c = t + 1; c < this.n; c++) {
1582
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1583
+ return Tt && Ct;
1584
+ })(t < i, this.s[t] !== 0)) {
1585
+ for (var f = 0, T = t; T < this.m; T++)
1586
+ f += h[T][t] * h[T][c];
1587
+ f = -f / h[t][t];
1588
+ for (var d = t; d < this.m; d++)
1589
+ h[d][c] += f * h[d][t];
1590
+ }
1591
+ e[c] = h[t][c];
1592
+ }
1593
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1594
+ return Ct;
1595
+ })(l, t < i))
1596
+ for (var v = t; v < this.m; v++)
1597
+ this.U[v][t] = h[v][t];
1598
+ if (t < g) {
1599
+ e[t] = 0;
1600
+ for (var L = t + 1; L < this.n; L++)
1601
+ e[t] = u.hypot(e[t], e[L]);
1602
+ if (e[t] !== 0) {
1603
+ e[t + 1] < 0 && (e[t] = -e[t]);
1604
+ for (var b = t + 1; b < this.n; b++)
1605
+ e[b] /= e[t];
1606
+ e[t + 1] += 1;
1607
+ }
1608
+ if (e[t] = -e[t], /* @__PURE__ */ (function(Tt, Ct) {
1609
+ return Tt && Ct;
1610
+ })(t + 1 < this.m, e[t] !== 0)) {
1611
+ for (var C = t + 1; C < this.m; C++)
1612
+ r[C] = 0;
1613
+ for (var G = t + 1; G < this.n; G++)
1614
+ for (var k = t + 1; k < this.m; k++)
1615
+ r[k] += e[G] * h[k][G];
1616
+ for (var Y = t + 1; Y < this.n; Y++)
1617
+ for (var K = -e[Y] / e[t + 1], O = t + 1; O < this.m; O++)
1618
+ h[O][Y] += K * r[O];
1619
+ }
1620
+ for (var it = t + 1; it < this.n; it++)
1621
+ this.V[it][t] = e[it];
1622
+ }
1623
+ }
1624
+ var n = Math.min(this.n, this.m + 1);
1625
+ i < this.n && (this.s[i] = h[i][i]), this.m < n && (this.s[n - 1] = 0), g + 1 < n && (e[g] = h[g][n - 1]), e[n - 1] = 0;
1626
+ {
1627
+ for (var m = i; m < a; m++) {
1628
+ for (var p = 0; p < this.m; p++)
1629
+ this.U[p][m] = 0;
1630
+ this.U[m][m] = 1;
1631
+ }
1632
+ for (var E = i - 1; E >= 0; E--)
1633
+ if (this.s[E] !== 0) {
1634
+ for (var y = E + 1; y < a; y++) {
1635
+ for (var R = 0, M = E; M < this.m; M++)
1636
+ R += this.U[M][E] * this.U[M][y];
1637
+ R = -R / this.U[E][E];
1638
+ for (var S = E; S < this.m; S++)
1639
+ this.U[S][y] += R * this.U[S][E];
1640
+ }
1641
+ for (var W = E; W < this.m; W++)
1642
+ this.U[W][E] = -this.U[W][E];
1643
+ this.U[E][E] = 1 + this.U[E][E];
1644
+ for (var D = 0; D < E - 1; D++)
1645
+ this.U[D][E] = 0;
1646
+ } else {
1647
+ for (var q = 0; q < this.m; q++)
1648
+ this.U[q][E] = 0;
1649
+ this.U[E][E] = 1;
1650
+ }
1651
+ }
1652
+ for (var V = this.n - 1; V >= 0; V--) {
1653
+ if (/* @__PURE__ */ (function(Tt, Ct) {
1654
+ return Tt && Ct;
1655
+ })(V < g, e[V] !== 0))
1656
+ for (var X = V + 1; X < a; X++) {
1657
+ for (var et = 0, z = V + 1; z < this.n; z++)
1658
+ et += this.V[z][V] * this.V[z][X];
1659
+ et = -et / this.V[V + 1][V];
1660
+ for (var w = V + 1; w < this.n; w++)
1661
+ this.V[w][X] += et * this.V[w][V];
1662
+ }
1663
+ for (var H = 0; H < this.n; H++)
1664
+ this.V[H][V] = 0;
1665
+ this.V[V][V] = 1;
1666
+ }
1667
+ for (var $ = n - 1, _ = Math.pow(2, -52), ht = Math.pow(2, -966); n > 0; ) {
1668
+ var Q = void 0, It = void 0;
1669
+ for (Q = n - 2; Q >= -1 && Q !== -1; Q--)
1670
+ if (Math.abs(e[Q]) <= ht + _ * (Math.abs(this.s[Q]) + Math.abs(this.s[Q + 1]))) {
1671
+ e[Q] = 0;
1672
+ break;
1673
+ }
1674
+ if (Q === n - 2)
1675
+ It = 4;
1676
+ else {
1677
+ var Nt = void 0;
1678
+ for (Nt = n - 1; Nt >= Q && Nt !== Q; Nt--) {
1679
+ var vt = (Nt !== n ? Math.abs(e[Nt]) : 0) + (Nt !== Q + 1 ? Math.abs(e[Nt - 1]) : 0);
1680
+ if (Math.abs(this.s[Nt]) <= ht + _ * vt) {
1681
+ this.s[Nt] = 0;
1682
+ break;
1683
+ }
1684
+ }
1685
+ Nt === Q ? It = 3 : Nt === n - 1 ? It = 1 : (It = 2, Q = Nt);
1686
+ }
1687
+ switch (Q++, It) {
1688
+ case 1:
1689
+ {
1690
+ var rt = e[n - 2];
1691
+ e[n - 2] = 0;
1692
+ for (var gt = n - 2; gt >= Q; gt--) {
1693
+ var mt = u.hypot(this.s[gt], rt), At = this.s[gt] / mt, Ot = rt / mt;
1694
+ this.s[gt] = mt, gt !== Q && (rt = -Ot * e[gt - 1], e[gt - 1] = At * e[gt - 1]);
1695
+ for (var Et = 0; Et < this.n; Et++)
1696
+ mt = At * this.V[Et][gt] + Ot * this.V[Et][n - 1], this.V[Et][n - 1] = -Ot * this.V[Et][gt] + At * this.V[Et][n - 1], this.V[Et][gt] = mt;
1697
+ }
1698
+ }
1699
+ break;
1700
+ case 2:
1701
+ {
1702
+ var Dt = e[Q - 1];
1703
+ e[Q - 1] = 0;
1704
+ for (var Rt = Q; Rt < n; Rt++) {
1705
+ var Ht = u.hypot(this.s[Rt], Dt), Ut = this.s[Rt] / Ht, Pt = Dt / Ht;
1706
+ this.s[Rt] = Ht, Dt = -Pt * e[Rt], e[Rt] = Ut * e[Rt];
1707
+ for (var Ft = 0; Ft < this.m; Ft++)
1708
+ Ht = Ut * this.U[Ft][Rt] + Pt * this.U[Ft][Q - 1], this.U[Ft][Q - 1] = -Pt * this.U[Ft][Rt] + Ut * this.U[Ft][Q - 1], this.U[Ft][Rt] = Ht;
1709
+ }
1710
+ }
1711
+ break;
1712
+ case 3:
1713
+ {
1714
+ var Yt = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n - 1]), Math.abs(this.s[n - 2])), Math.abs(e[n - 2])), Math.abs(this.s[Q])), Math.abs(e[Q])), Vt = this.s[n - 1] / Yt, F = this.s[n - 2] / Yt, U = e[n - 2] / Yt, B = this.s[Q] / Yt, J = e[Q] / Yt, Z = ((F + Vt) * (F - Vt) + U * U) / 2, at = Vt * U * (Vt * U), ct = 0;
1715
+ /* @__PURE__ */ (function(Tt, Ct) {
1716
+ return Tt || Ct;
1717
+ })(Z !== 0, at !== 0) && (ct = Math.sqrt(Z * Z + at), Z < 0 && (ct = -ct), ct = at / (Z + ct));
1718
+ for (var nt = (B + Vt) * (B - Vt) + ct, tt = B * J, j = Q; j < n - 1; j++) {
1719
+ var ut = u.hypot(nt, tt), Mt = nt / ut, pt = tt / ut;
1720
+ j !== Q && (e[j - 1] = ut), nt = Mt * this.s[j] + pt * e[j], e[j] = Mt * e[j] - pt * this.s[j], tt = pt * this.s[j + 1], this.s[j + 1] = Mt * this.s[j + 1];
1721
+ for (var xt = 0; xt < this.n; xt++)
1722
+ ut = Mt * this.V[xt][j] + pt * this.V[xt][j + 1], this.V[xt][j + 1] = -pt * this.V[xt][j] + Mt * this.V[xt][j + 1], this.V[xt][j] = ut;
1723
+ if (ut = u.hypot(nt, tt), Mt = nt / ut, pt = tt / ut, this.s[j] = ut, nt = Mt * e[j] + pt * this.s[j + 1], this.s[j + 1] = -pt * e[j] + Mt * this.s[j + 1], tt = pt * e[j + 1], e[j + 1] = Mt * e[j + 1], j < this.m - 1)
1724
+ for (var lt = 0; lt < this.m; lt++)
1725
+ ut = Mt * this.U[lt][j] + pt * this.U[lt][j + 1], this.U[lt][j + 1] = -pt * this.U[lt][j] + Mt * this.U[lt][j + 1], this.U[lt][j] = ut;
1726
+ }
1727
+ e[n - 2] = nt;
1728
+ }
1729
+ break;
1730
+ case 4:
1731
+ {
1732
+ if (this.s[Q] <= 0) {
1733
+ this.s[Q] = this.s[Q] < 0 ? -this.s[Q] : 0;
1734
+ for (var ot = 0; ot <= $; ot++)
1735
+ this.V[ot][Q] = -this.V[ot][Q];
1736
+ }
1737
+ for (; Q < $ && !(this.s[Q] >= this.s[Q + 1]); ) {
1738
+ var Lt = this.s[Q];
1739
+ if (this.s[Q] = this.s[Q + 1], this.s[Q + 1] = Lt, Q < this.n - 1)
1740
+ for (var ft = 0; ft < this.n; ft++)
1741
+ Lt = this.V[ft][Q + 1], this.V[ft][Q + 1] = this.V[ft][Q], this.V[ft][Q] = Lt;
1742
+ if (Q < this.m - 1)
1743
+ for (var st = 0; st < this.m; st++)
1744
+ Lt = this.U[st][Q + 1], this.U[st][Q + 1] = this.U[st][Q], this.U[st][Q] = Lt;
1745
+ Q++;
1746
+ }
1747
+ n--;
1748
+ }
1749
+ break;
1750
+ }
1751
+ }
1752
+ var Xt = { U: this.U, V: this.V, S: this.s };
1753
+ return Xt;
1754
+ }, u.hypot = function(h, a) {
1755
+ var e = void 0;
1756
+ return Math.abs(h) > Math.abs(a) ? (e = a / h, e = Math.abs(h) * Math.sqrt(1 + e * e)) : a != 0 ? (e = h / a, e = Math.abs(a) * Math.sqrt(1 + e * e)) : e = 0, e;
1757
+ }, A.exports = u;
1758
+ }),
1759
+ /* 27 */
1760
+ /***/
1761
+ (function(A, P, N) {
1762
+ var u = /* @__PURE__ */ (function() {
1763
+ function e(r, l) {
1764
+ for (var i = 0; i < l.length; i++) {
1765
+ var g = l[i];
1766
+ g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(r, g.key, g);
1767
+ }
1768
+ }
1769
+ return function(r, l, i) {
1770
+ return l && e(r.prototype, l), i && e(r, i), r;
1771
+ };
1772
+ })();
1773
+ function h(e, r) {
1774
+ if (!(e instanceof r))
1775
+ throw new TypeError("Cannot call a class as a function");
1776
+ }
1777
+ var a = (function() {
1778
+ function e(r, l) {
1779
+ var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, g = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, t = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1780
+ h(this, e), this.sequence1 = r, this.sequence2 = l, this.match_score = i, this.mismatch_penalty = g, this.gap_penalty = t, this.iMax = r.length + 1, this.jMax = l.length + 1, this.grid = new Array(this.iMax);
1781
+ for (var o = 0; o < this.iMax; o++) {
1782
+ this.grid[o] = new Array(this.jMax);
1783
+ for (var s = 0; s < this.jMax; s++)
1784
+ this.grid[o][s] = 0;
1785
+ }
1786
+ this.tracebackGrid = new Array(this.iMax);
1787
+ for (var c = 0; c < this.iMax; c++) {
1788
+ this.tracebackGrid[c] = new Array(this.jMax);
1789
+ for (var f = 0; f < this.jMax; f++)
1790
+ this.tracebackGrid[c][f] = [null, null, null];
1791
+ }
1792
+ this.alignments = [], this.score = -1, this.computeGrids();
1793
+ }
1794
+ return u(e, [{
1795
+ key: "getScore",
1796
+ value: function() {
1797
+ return this.score;
1798
+ }
1799
+ }, {
1800
+ key: "getAlignments",
1801
+ value: function() {
1802
+ return this.alignments;
1803
+ }
1804
+ // Main dynamic programming procedure
1805
+ }, {
1806
+ key: "computeGrids",
1807
+ value: function() {
1808
+ for (var l = 1; l < this.jMax; l++)
1809
+ this.grid[0][l] = this.grid[0][l - 1] + this.gap_penalty, this.tracebackGrid[0][l] = [!1, !1, !0];
1810
+ for (var i = 1; i < this.iMax; i++)
1811
+ this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty, this.tracebackGrid[i][0] = [!1, !0, !1];
1812
+ for (var g = 1; g < this.iMax; g++)
1813
+ for (var t = 1; t < this.jMax; t++) {
1814
+ var o = void 0;
1815
+ this.sequence1[g - 1] === this.sequence2[t - 1] ? o = this.grid[g - 1][t - 1] + this.match_score : o = this.grid[g - 1][t - 1] + this.mismatch_penalty;
1816
+ var s = this.grid[g - 1][t] + this.gap_penalty, c = this.grid[g][t - 1] + this.gap_penalty, f = [o, s, c], T = this.arrayAllMaxIndexes(f);
1817
+ this.grid[g][t] = f[T[0]], this.tracebackGrid[g][t] = [T.includes(0), T.includes(1), T.includes(2)];
1818
+ }
1819
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1820
+ }
1821
+ // Gets all possible valid sequence combinations
1822
+ }, {
1823
+ key: "alignmentTraceback",
1824
+ value: function() {
1825
+ var l = [];
1826
+ for (l.push({
1827
+ pos: [this.sequence1.length, this.sequence2.length],
1828
+ seq1: "",
1829
+ seq2: ""
1830
+ }); l[0]; ) {
1831
+ var i = l[0], g = this.tracebackGrid[i.pos[0]][i.pos[1]];
1832
+ g[0] && l.push({
1833
+ pos: [i.pos[0] - 1, i.pos[1] - 1],
1834
+ seq1: this.sequence1[i.pos[0] - 1] + i.seq1,
1835
+ seq2: this.sequence2[i.pos[1] - 1] + i.seq2
1836
+ }), g[1] && l.push({
1837
+ pos: [i.pos[0] - 1, i.pos[1]],
1838
+ seq1: this.sequence1[i.pos[0] - 1] + i.seq1,
1839
+ seq2: "-" + i.seq2
1840
+ }), g[2] && l.push({
1841
+ pos: [i.pos[0], i.pos[1] - 1],
1842
+ seq1: "-" + i.seq1,
1843
+ seq2: this.sequence2[i.pos[1] - 1] + i.seq2
1844
+ }), i.pos[0] === 0 && i.pos[1] === 0 && this.alignments.push({
1845
+ sequence1: i.seq1,
1846
+ sequence2: i.seq2
1847
+ }), l.shift();
1848
+ }
1849
+ return this.alignments;
1850
+ }
1851
+ // Helper Functions
1852
+ }, {
1853
+ key: "getAllIndexes",
1854
+ value: function(l, i) {
1855
+ for (var g = [], t = -1; (t = l.indexOf(i, t + 1)) !== -1; )
1856
+ g.push(t);
1857
+ return g;
1858
+ }
1859
+ }, {
1860
+ key: "arrayAllMaxIndexes",
1861
+ value: function(l) {
1862
+ return this.getAllIndexes(l, Math.max.apply(null, l));
1863
+ }
1864
+ }]), e;
1865
+ })();
1866
+ A.exports = a;
1867
+ }),
1868
+ /* 28 */
1869
+ /***/
1870
+ (function(A, P, N) {
1871
+ var u = function() {
1872
+ };
1873
+ u.FDLayout = N(18), u.FDLayoutConstants = N(4), u.FDLayoutEdge = N(19), u.FDLayoutNode = N(20), u.DimensionD = N(21), u.HashMap = N(22), u.HashSet = N(23), u.IGeometry = N(8), u.IMath = N(9), u.Integer = N(10), u.Point = N(12), u.PointD = N(5), u.RandomSeed = N(16), u.RectangleD = N(13), u.Transform = N(17), u.UniqueIDGeneretor = N(14), u.Quicksort = N(25), u.LinkedList = N(11), u.LGraphObject = N(2), u.LGraph = N(6), u.LEdge = N(1), u.LGraphManager = N(7), u.LNode = N(3), u.Layout = N(15), u.LayoutConstants = N(0), u.NeedlemanWunsch = N(27), u.Matrix = N(24), u.SVD = N(26), A.exports = u;
1874
+ }),
1875
+ /* 29 */
1876
+ /***/
1877
+ (function(A, P, N) {
1878
+ function u() {
1879
+ this.listeners = [];
1880
+ }
1881
+ var h = u.prototype;
1882
+ h.addListener = function(a, e) {
1883
+ this.listeners.push({
1884
+ event: a,
1885
+ callback: e
1886
+ });
1887
+ }, h.removeListener = function(a, e) {
1888
+ for (var r = this.listeners.length; r >= 0; r--) {
1889
+ var l = this.listeners[r];
1890
+ l.event === a && l.callback === e && this.listeners.splice(r, 1);
1891
+ }
1892
+ }, h.emit = function(a, e) {
1893
+ for (var r = 0; r < this.listeners.length; r++) {
1894
+ var l = this.listeners[r];
1895
+ a === l.event && l.callback(e);
1896
+ }
1897
+ }, A.exports = u;
1898
+ })
1899
+ /******/
1900
+ ])
1901
+ );
1902
+ });
1903
+ })(fe)), fe.exports;
1904
+ }
1905
+ var dr = le.exports, Oe;
1906
+ function vr() {
1907
+ return Oe || (Oe = 1, (function(I, x) {
1908
+ (function(P, N) {
1909
+ I.exports = N(/* @__PURE__ */ ur());
1910
+ })(dr, function(A) {
1911
+ return (
1912
+ /******/
1913
+ (() => {
1914
+ var P = {
1915
+ /***/
1916
+ 45: (
1917
+ /***/
1918
+ ((a, e, r) => {
1919
+ var l = {};
1920
+ l.layoutBase = r(551), l.CoSEConstants = r(806), l.CoSEEdge = r(767), l.CoSEGraph = r(880), l.CoSEGraphManager = r(578), l.CoSELayout = r(765), l.CoSENode = r(991), l.ConstraintHandler = r(902), a.exports = l;
1921
+ })
1922
+ ),
1923
+ /***/
1924
+ 806: (
1925
+ /***/
1926
+ ((a, e, r) => {
1927
+ var l = r(551).FDLayoutConstants;
1928
+ function i() {
1929
+ }
1930
+ for (var g in l)
1931
+ i[g] = l[g];
1932
+ i.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, i.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH, i.DEFAULT_COMPONENT_SEPERATION = 60, i.TILE = !0, i.TILING_PADDING_VERTICAL = 10, i.TILING_PADDING_HORIZONTAL = 10, i.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, i.ENFORCE_CONSTRAINTS = !0, i.APPLY_LAYOUT = !0, i.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, i.TREE_REDUCTION_ON_INCREMENTAL = !0, i.PURE_INCREMENTAL = i.DEFAULT_INCREMENTAL, a.exports = i;
1933
+ })
1934
+ ),
1935
+ /***/
1936
+ 767: (
1937
+ /***/
1938
+ ((a, e, r) => {
1939
+ var l = r(551).FDLayoutEdge;
1940
+ function i(t, o, s) {
1941
+ l.call(this, t, o, s);
1942
+ }
1943
+ i.prototype = Object.create(l.prototype);
1944
+ for (var g in l)
1945
+ i[g] = l[g];
1946
+ a.exports = i;
1947
+ })
1948
+ ),
1949
+ /***/
1950
+ 880: (
1951
+ /***/
1952
+ ((a, e, r) => {
1953
+ var l = r(551).LGraph;
1954
+ function i(t, o, s) {
1955
+ l.call(this, t, o, s);
1956
+ }
1957
+ i.prototype = Object.create(l.prototype);
1958
+ for (var g in l)
1959
+ i[g] = l[g];
1960
+ a.exports = i;
1961
+ })
1962
+ ),
1963
+ /***/
1964
+ 578: (
1965
+ /***/
1966
+ ((a, e, r) => {
1967
+ var l = r(551).LGraphManager;
1968
+ function i(t) {
1969
+ l.call(this, t);
1970
+ }
1971
+ i.prototype = Object.create(l.prototype);
1972
+ for (var g in l)
1973
+ i[g] = l[g];
1974
+ a.exports = i;
1975
+ })
1976
+ ),
1977
+ /***/
1978
+ 765: (
1979
+ /***/
1980
+ ((a, e, r) => {
1981
+ var l = r(551).FDLayout, i = r(578), g = r(880), t = r(991), o = r(767), s = r(806), c = r(902), f = r(551).FDLayoutConstants, T = r(551).LayoutConstants, d = r(551).Point, v = r(551).PointD, L = r(551).DimensionD, b = r(551).Layout, C = r(551).Integer, G = r(551).IGeometry, k = r(551).LGraph, Y = r(551).Transform, K = r(551).LinkedList;
1982
+ function O() {
1983
+ l.call(this), this.toBeTiled = {}, this.constraints = {};
1984
+ }
1985
+ O.prototype = Object.create(l.prototype);
1986
+ for (var it in l)
1987
+ O[it] = l[it];
1988
+ O.prototype.newGraphManager = function() {
1989
+ var n = new i(this);
1990
+ return this.graphManager = n, n;
1991
+ }, O.prototype.newGraph = function(n) {
1992
+ return new g(null, this.graphManager, n);
1993
+ }, O.prototype.newNode = function(n) {
1994
+ return new t(this.graphManager, n);
1995
+ }, O.prototype.newEdge = function(n) {
1996
+ return new o(null, null, n);
1997
+ }, O.prototype.initParameters = function() {
1998
+ l.prototype.initParameters.call(this, arguments), this.isSubLayout || (s.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = s.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = f.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = f.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = f.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1999
+ }, O.prototype.initSpringEmbedder = function() {
2000
+ l.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / f.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = 0.04, this.coolingAdjuster = 1;
2001
+ }, O.prototype.layout = function() {
2002
+ var n = T.DEFAULT_CREATE_BENDS_AS_NEEDED;
2003
+ return n && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
2004
+ }, O.prototype.classicLayout = function() {
2005
+ 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) {
2006
+ if (s.TREE_REDUCTION_ON_INCREMENTAL) {
2007
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2008
+ var m = new Set(this.getAllNodes()), p = this.nodesWithGravity.filter(function(R) {
2009
+ return m.has(R);
2010
+ });
2011
+ this.graphManager.setAllNodesToApplyGravitation(p);
2012
+ }
2013
+ } else {
2014
+ var n = this.getFlatForest();
2015
+ if (n.length > 0)
2016
+ this.positionNodesRadially(n);
2017
+ else {
2018
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
2019
+ var m = new Set(this.getAllNodes()), p = this.nodesWithGravity.filter(function(E) {
2020
+ return m.has(E);
2021
+ });
2022
+ this.graphManager.setAllNodesToApplyGravitation(p), this.positionNodesRandomly();
2023
+ }
2024
+ }
2025
+ return Object.keys(this.constraints).length > 0 && (c.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), s.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
2026
+ }, O.prototype.tick = function() {
2027
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
2028
+ if (this.prunedNodesAll.length > 0)
2029
+ this.isTreeGrowing = !0;
2030
+ else
2031
+ return !0;
2032
+ if (this.totalIterations % f.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
2033
+ if (this.isConverged())
2034
+ if (this.prunedNodesAll.length > 0)
2035
+ this.isTreeGrowing = !0;
2036
+ else
2037
+ return !0;
2038
+ this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
2039
+ }
2040
+ if (this.isTreeGrowing) {
2041
+ if (this.growTreeIterations % 10 == 0)
2042
+ if (this.prunedNodesAll.length > 0) {
2043
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
2044
+ var n = new Set(this.getAllNodes()), m = this.nodesWithGravity.filter(function(y) {
2045
+ return n.has(y);
2046
+ });
2047
+ this.graphManager.setAllNodesToApplyGravitation(m), this.graphManager.updateBounds(), this.updateGrid(), s.PURE_INCREMENTAL ? this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL;
2048
+ } else
2049
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
2050
+ this.growTreeIterations++;
2051
+ }
2052
+ if (this.isGrowthFinished) {
2053
+ if (this.isConverged())
2054
+ return !0;
2055
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), s.PURE_INCREMENTAL ? this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
2056
+ }
2057
+ var p = !this.isTreeGrowing && !this.isGrowthFinished, E = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
2058
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(p, E), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
2059
+ }, O.prototype.getPositionsData = function() {
2060
+ for (var n = this.graphManager.getAllNodes(), m = {}, p = 0; p < n.length; p++) {
2061
+ var E = n[p].rect, y = n[p].id;
2062
+ m[y] = {
2063
+ id: y,
2064
+ x: E.getCenterX(),
2065
+ y: E.getCenterY(),
2066
+ w: E.width,
2067
+ h: E.height
2068
+ };
2069
+ }
2070
+ return m;
2071
+ }, O.prototype.runSpringEmbedder = function() {
2072
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
2073
+ var n = !1;
2074
+ if (f.ANIMATE === "during")
2075
+ this.emit("layoutstarted");
2076
+ else {
2077
+ for (; !n; )
2078
+ n = this.tick();
2079
+ this.graphManager.updateBounds();
2080
+ }
2081
+ }, O.prototype.moveNodes = function() {
2082
+ for (var n = this.getAllNodes(), m, p = 0; p < n.length; p++)
2083
+ m = n[p], m.calculateDisplacement();
2084
+ Object.keys(this.constraints).length > 0 && this.updateDisplacements();
2085
+ for (var p = 0; p < n.length; p++)
2086
+ m = n[p], m.move();
2087
+ }, O.prototype.initConstraintVariables = function() {
2088
+ var n = this;
2089
+ this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
2090
+ for (var m = this.graphManager.getAllNodes(), p = 0; p < m.length; p++) {
2091
+ var E = m[p];
2092
+ this.idToNodeMap.set(E.id, E);
2093
+ }
2094
+ var y = function w(H) {
2095
+ for (var $ = H.getChild().getNodes(), _, ht = 0, Q = 0; Q < $.length; Q++)
2096
+ _ = $[Q], _.getChild() == null ? n.fixedNodeSet.has(_.id) && (ht += 100) : ht += w(_);
2097
+ return ht;
2098
+ };
2099
+ if (this.constraints.fixedNodeConstraint) {
2100
+ this.constraints.fixedNodeConstraint.forEach(function($) {
2101
+ n.fixedNodeSet.add($.nodeId);
2102
+ });
2103
+ for (var m = this.graphManager.getAllNodes(), E, p = 0; p < m.length; p++)
2104
+ if (E = m[p], E.getChild() != null) {
2105
+ var R = y(E);
2106
+ R > 0 && (E.fixedNodeWeight = R);
2107
+ }
2108
+ }
2109
+ if (this.constraints.relativePlacementConstraint) {
2110
+ var M = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
2111
+ if (this.dummyToNodeForVerticalAlignment = /* @__PURE__ */ new Map(), this.dummyToNodeForHorizontalAlignment = /* @__PURE__ */ new Map(), this.fixedNodesOnHorizontal = /* @__PURE__ */ new Set(), this.fixedNodesOnVertical = /* @__PURE__ */ new Set(), this.fixedNodeSet.forEach(function(w) {
2112
+ n.fixedNodesOnHorizontal.add(w), n.fixedNodesOnVertical.add(w);
2113
+ }), this.constraints.alignmentConstraint) {
2114
+ if (this.constraints.alignmentConstraint.vertical)
2115
+ for (var W = this.constraints.alignmentConstraint.vertical, p = 0; p < W.length; p++)
2116
+ this.dummyToNodeForVerticalAlignment.set("dummy" + p, []), W[p].forEach(function(H) {
2117
+ M.set(H, "dummy" + p), n.dummyToNodeForVerticalAlignment.get("dummy" + p).push(H), n.fixedNodeSet.has(H) && n.fixedNodesOnHorizontal.add("dummy" + p);
2118
+ });
2119
+ if (this.constraints.alignmentConstraint.horizontal)
2120
+ for (var D = this.constraints.alignmentConstraint.horizontal, p = 0; p < D.length; p++)
2121
+ this.dummyToNodeForHorizontalAlignment.set("dummy" + p, []), D[p].forEach(function(H) {
2122
+ S.set(H, "dummy" + p), n.dummyToNodeForHorizontalAlignment.get("dummy" + p).push(H), n.fixedNodeSet.has(H) && n.fixedNodesOnVertical.add("dummy" + p);
2123
+ });
2124
+ }
2125
+ if (s.RELAX_MOVEMENT_ON_CONSTRAINTS)
2126
+ this.shuffle = function(w) {
2127
+ var H, $, _;
2128
+ for (_ = w.length - 1; _ >= 2 * w.length / 3; _--)
2129
+ H = Math.floor(Math.random() * (_ + 1)), $ = w[_], w[_] = w[H], w[H] = $;
2130
+ return w;
2131
+ }, this.nodesInRelativeHorizontal = [], this.nodesInRelativeVertical = [], this.nodeToRelativeConstraintMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToRelativeConstraintMapVertical = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapVertical = /* @__PURE__ */ new Map(), this.constraints.relativePlacementConstraint.forEach(function(w) {
2132
+ if (w.left) {
2133
+ var H = M.has(w.left) ? M.get(w.left) : w.left, $ = M.has(w.right) ? M.get(w.right) : w.right;
2134
+ n.nodesInRelativeHorizontal.includes(H) || (n.nodesInRelativeHorizontal.push(H), n.nodeToRelativeConstraintMapHorizontal.set(H, []), n.dummyToNodeForVerticalAlignment.has(H) ? n.nodeToTempPositionMapHorizontal.set(H, n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()) : n.nodeToTempPositionMapHorizontal.set(H, n.idToNodeMap.get(H).getCenterX())), n.nodesInRelativeHorizontal.includes($) || (n.nodesInRelativeHorizontal.push($), n.nodeToRelativeConstraintMapHorizontal.set($, []), n.dummyToNodeForVerticalAlignment.has($) ? n.nodeToTempPositionMapHorizontal.set($, n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()) : n.nodeToTempPositionMapHorizontal.set($, n.idToNodeMap.get($).getCenterX())), n.nodeToRelativeConstraintMapHorizontal.get(H).push({ right: $, gap: w.gap }), n.nodeToRelativeConstraintMapHorizontal.get($).push({ left: H, gap: w.gap });
2135
+ } else {
2136
+ var _ = S.has(w.top) ? S.get(w.top) : w.top, ht = S.has(w.bottom) ? S.get(w.bottom) : w.bottom;
2137
+ n.nodesInRelativeVertical.includes(_) || (n.nodesInRelativeVertical.push(_), n.nodeToRelativeConstraintMapVertical.set(_, []), n.dummyToNodeForHorizontalAlignment.has(_) ? n.nodeToTempPositionMapVertical.set(_, n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()) : n.nodeToTempPositionMapVertical.set(_, n.idToNodeMap.get(_).getCenterY())), n.nodesInRelativeVertical.includes(ht) || (n.nodesInRelativeVertical.push(ht), n.nodeToRelativeConstraintMapVertical.set(ht, []), n.dummyToNodeForHorizontalAlignment.has(ht) ? n.nodeToTempPositionMapVertical.set(ht, n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()) : n.nodeToTempPositionMapVertical.set(ht, n.idToNodeMap.get(ht).getCenterY())), n.nodeToRelativeConstraintMapVertical.get(_).push({ bottom: ht, gap: w.gap }), n.nodeToRelativeConstraintMapVertical.get(ht).push({ top: _, gap: w.gap });
2138
+ }
2139
+ });
2140
+ else {
2141
+ var q = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Map();
2142
+ this.constraints.relativePlacementConstraint.forEach(function(w) {
2143
+ if (w.left) {
2144
+ var H = M.has(w.left) ? M.get(w.left) : w.left, $ = M.has(w.right) ? M.get(w.right) : w.right;
2145
+ q.has(H) ? q.get(H).push($) : q.set(H, [$]), q.has($) ? q.get($).push(H) : q.set($, [H]);
2146
+ } else {
2147
+ var _ = S.has(w.top) ? S.get(w.top) : w.top, ht = S.has(w.bottom) ? S.get(w.bottom) : w.bottom;
2148
+ V.has(_) ? V.get(_).push(ht) : V.set(_, [ht]), V.has(ht) ? V.get(ht).push(_) : V.set(ht, [_]);
2149
+ }
2150
+ });
2151
+ var X = function(H, $) {
2152
+ var _ = [], ht = [], Q = new K(), It = /* @__PURE__ */ new Set(), Nt = 0;
2153
+ return H.forEach(function(vt, rt) {
2154
+ if (!It.has(rt)) {
2155
+ _[Nt] = [], ht[Nt] = !1;
2156
+ var gt = rt;
2157
+ for (Q.push(gt), It.add(gt), _[Nt].push(gt); Q.length != 0; ) {
2158
+ gt = Q.shift(), $.has(gt) && (ht[Nt] = !0);
2159
+ var mt = H.get(gt);
2160
+ mt.forEach(function(At) {
2161
+ It.has(At) || (Q.push(At), It.add(At), _[Nt].push(At));
2162
+ });
2163
+ }
2164
+ Nt++;
2165
+ }
2166
+ }), { components: _, isFixed: ht };
2167
+ }, et = X(q, n.fixedNodesOnHorizontal);
2168
+ this.componentsOnHorizontal = et.components, this.fixedComponentsOnHorizontal = et.isFixed;
2169
+ var z = X(V, n.fixedNodesOnVertical);
2170
+ this.componentsOnVertical = z.components, this.fixedComponentsOnVertical = z.isFixed;
2171
+ }
2172
+ }
2173
+ }, O.prototype.updateDisplacements = function() {
2174
+ var n = this;
2175
+ if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(z) {
2176
+ var w = n.idToNodeMap.get(z.nodeId);
2177
+ w.displacementX = 0, w.displacementY = 0;
2178
+ }), this.constraints.alignmentConstraint) {
2179
+ if (this.constraints.alignmentConstraint.vertical)
2180
+ for (var m = this.constraints.alignmentConstraint.vertical, p = 0; p < m.length; p++) {
2181
+ for (var E = 0, y = 0; y < m[p].length; y++) {
2182
+ if (this.fixedNodeSet.has(m[p][y])) {
2183
+ E = 0;
2184
+ break;
2185
+ }
2186
+ E += this.idToNodeMap.get(m[p][y]).displacementX;
2187
+ }
2188
+ for (var R = E / m[p].length, y = 0; y < m[p].length; y++)
2189
+ this.idToNodeMap.get(m[p][y]).displacementX = R;
2190
+ }
2191
+ if (this.constraints.alignmentConstraint.horizontal)
2192
+ for (var M = this.constraints.alignmentConstraint.horizontal, p = 0; p < M.length; p++) {
2193
+ for (var S = 0, y = 0; y < M[p].length; y++) {
2194
+ if (this.fixedNodeSet.has(M[p][y])) {
2195
+ S = 0;
2196
+ break;
2197
+ }
2198
+ S += this.idToNodeMap.get(M[p][y]).displacementY;
2199
+ }
2200
+ for (var W = S / M[p].length, y = 0; y < M[p].length; y++)
2201
+ this.idToNodeMap.get(M[p][y]).displacementY = W;
2202
+ }
2203
+ }
2204
+ if (this.constraints.relativePlacementConstraint)
2205
+ if (s.RELAX_MOVEMENT_ON_CONSTRAINTS)
2206
+ this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(z) {
2207
+ if (!n.fixedNodesOnHorizontal.has(z)) {
2208
+ var w = 0;
2209
+ n.dummyToNodeForVerticalAlignment.has(z) ? w = n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX : w = n.idToNodeMap.get(z).displacementX, n.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(H) {
2210
+ if (H.right) {
2211
+ var $ = n.nodeToTempPositionMapHorizontal.get(H.right) - n.nodeToTempPositionMapHorizontal.get(z) - w;
2212
+ $ < H.gap && (w -= H.gap - $);
2213
+ } else {
2214
+ var $ = n.nodeToTempPositionMapHorizontal.get(z) - n.nodeToTempPositionMapHorizontal.get(H.left) + w;
2215
+ $ < H.gap && (w += H.gap - $);
2216
+ }
2217
+ }), n.nodeToTempPositionMapHorizontal.set(z, n.nodeToTempPositionMapHorizontal.get(z) + w), n.dummyToNodeForVerticalAlignment.has(z) ? n.dummyToNodeForVerticalAlignment.get(z).forEach(function(H) {
2218
+ n.idToNodeMap.get(H).displacementX = w;
2219
+ }) : n.idToNodeMap.get(z).displacementX = w;
2220
+ }
2221
+ }), this.nodesInRelativeVertical.forEach(function(z) {
2222
+ if (!n.fixedNodesOnHorizontal.has(z)) {
2223
+ var w = 0;
2224
+ n.dummyToNodeForHorizontalAlignment.has(z) ? w = n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY : w = n.idToNodeMap.get(z).displacementY, n.nodeToRelativeConstraintMapVertical.get(z).forEach(function(H) {
2225
+ if (H.bottom) {
2226
+ var $ = n.nodeToTempPositionMapVertical.get(H.bottom) - n.nodeToTempPositionMapVertical.get(z) - w;
2227
+ $ < H.gap && (w -= H.gap - $);
2228
+ } else {
2229
+ var $ = n.nodeToTempPositionMapVertical.get(z) - n.nodeToTempPositionMapVertical.get(H.top) + w;
2230
+ $ < H.gap && (w += H.gap - $);
2231
+ }
2232
+ }), n.nodeToTempPositionMapVertical.set(z, n.nodeToTempPositionMapVertical.get(z) + w), n.dummyToNodeForHorizontalAlignment.has(z) ? n.dummyToNodeForHorizontalAlignment.get(z).forEach(function(H) {
2233
+ n.idToNodeMap.get(H).displacementY = w;
2234
+ }) : n.idToNodeMap.get(z).displacementY = w;
2235
+ }
2236
+ });
2237
+ else {
2238
+ for (var p = 0; p < this.componentsOnHorizontal.length; p++) {
2239
+ var D = this.componentsOnHorizontal[p];
2240
+ if (this.fixedComponentsOnHorizontal[p])
2241
+ for (var y = 0; y < D.length; y++)
2242
+ this.dummyToNodeForVerticalAlignment.has(D[y]) ? this.dummyToNodeForVerticalAlignment.get(D[y]).forEach(function(H) {
2243
+ n.idToNodeMap.get(H).displacementX = 0;
2244
+ }) : this.idToNodeMap.get(D[y]).displacementX = 0;
2245
+ else {
2246
+ for (var q = 0, V = 0, y = 0; y < D.length; y++)
2247
+ if (this.dummyToNodeForVerticalAlignment.has(D[y])) {
2248
+ var X = this.dummyToNodeForVerticalAlignment.get(D[y]);
2249
+ q += X.length * this.idToNodeMap.get(X[0]).displacementX, V += X.length;
2250
+ } else
2251
+ q += this.idToNodeMap.get(D[y]).displacementX, V++;
2252
+ for (var et = q / V, y = 0; y < D.length; y++)
2253
+ this.dummyToNodeForVerticalAlignment.has(D[y]) ? this.dummyToNodeForVerticalAlignment.get(D[y]).forEach(function(H) {
2254
+ n.idToNodeMap.get(H).displacementX = et;
2255
+ }) : this.idToNodeMap.get(D[y]).displacementX = et;
2256
+ }
2257
+ }
2258
+ for (var p = 0; p < this.componentsOnVertical.length; p++) {
2259
+ var D = this.componentsOnVertical[p];
2260
+ if (this.fixedComponentsOnVertical[p])
2261
+ for (var y = 0; y < D.length; y++)
2262
+ this.dummyToNodeForHorizontalAlignment.has(D[y]) ? this.dummyToNodeForHorizontalAlignment.get(D[y]).forEach(function($) {
2263
+ n.idToNodeMap.get($).displacementY = 0;
2264
+ }) : this.idToNodeMap.get(D[y]).displacementY = 0;
2265
+ else {
2266
+ for (var q = 0, V = 0, y = 0; y < D.length; y++)
2267
+ if (this.dummyToNodeForHorizontalAlignment.has(D[y])) {
2268
+ var X = this.dummyToNodeForHorizontalAlignment.get(D[y]);
2269
+ q += X.length * this.idToNodeMap.get(X[0]).displacementY, V += X.length;
2270
+ } else
2271
+ q += this.idToNodeMap.get(D[y]).displacementY, V++;
2272
+ for (var et = q / V, y = 0; y < D.length; y++)
2273
+ this.dummyToNodeForHorizontalAlignment.has(D[y]) ? this.dummyToNodeForHorizontalAlignment.get(D[y]).forEach(function(Q) {
2274
+ n.idToNodeMap.get(Q).displacementY = et;
2275
+ }) : this.idToNodeMap.get(D[y]).displacementY = et;
2276
+ }
2277
+ }
2278
+ }
2279
+ }, O.prototype.calculateNodesToApplyGravitationTo = function() {
2280
+ var n = [], m, p = this.graphManager.getGraphs(), E = p.length, y;
2281
+ for (y = 0; y < E; y++)
2282
+ m = p[y], m.updateConnected(), m.isConnected || (n = n.concat(m.getNodes()));
2283
+ return n;
2284
+ }, O.prototype.createBendpoints = function() {
2285
+ var n = [];
2286
+ n = n.concat(this.graphManager.getAllEdges());
2287
+ var m = /* @__PURE__ */ new Set(), p;
2288
+ for (p = 0; p < n.length; p++) {
2289
+ var E = n[p];
2290
+ if (!m.has(E)) {
2291
+ var y = E.getSource(), R = E.getTarget();
2292
+ if (y == R)
2293
+ E.getBendpoints().push(new v()), E.getBendpoints().push(new v()), this.createDummyNodesForBendpoints(E), m.add(E);
2294
+ else {
2295
+ var M = [];
2296
+ if (M = M.concat(y.getEdgeListToNode(R)), M = M.concat(R.getEdgeListToNode(y)), !m.has(M[0])) {
2297
+ if (M.length > 1) {
2298
+ var S;
2299
+ for (S = 0; S < M.length; S++) {
2300
+ var W = M[S];
2301
+ W.getBendpoints().push(new v()), this.createDummyNodesForBendpoints(W);
2302
+ }
2303
+ }
2304
+ M.forEach(function(D) {
2305
+ m.add(D);
2306
+ });
2307
+ }
2308
+ }
2309
+ }
2310
+ if (m.size == n.length)
2311
+ break;
2312
+ }
2313
+ }, O.prototype.positionNodesRadially = function(n) {
2314
+ for (var m = new d(0, 0), p = Math.ceil(Math.sqrt(n.length)), E = 0, y = 0, R = 0, M = new v(0, 0), S = 0; S < n.length; S++) {
2315
+ S % p == 0 && (R = 0, y = E, S != 0 && (y += s.DEFAULT_COMPONENT_SEPERATION), E = 0);
2316
+ var W = n[S], D = b.findCenterOfTree(W);
2317
+ m.x = R, m.y = y, M = O.radialLayout(W, D, m), M.y > E && (E = Math.floor(M.y)), R = Math.floor(M.x + s.DEFAULT_COMPONENT_SEPERATION);
2318
+ }
2319
+ this.transform(new v(T.WORLD_CENTER_X - M.x / 2, T.WORLD_CENTER_Y - M.y / 2));
2320
+ }, O.radialLayout = function(n, m, p) {
2321
+ var E = Math.max(this.maxDiagonalInTree(n), s.DEFAULT_RADIAL_SEPARATION);
2322
+ O.branchRadialLayout(m, null, 0, 359, 0, E);
2323
+ var y = k.calculateBounds(n), R = new Y();
2324
+ R.setDeviceOrgX(y.getMinX()), R.setDeviceOrgY(y.getMinY()), R.setWorldOrgX(p.x), R.setWorldOrgY(p.y);
2325
+ for (var M = 0; M < n.length; M++) {
2326
+ var S = n[M];
2327
+ S.transform(R);
2328
+ }
2329
+ var W = new v(y.getMaxX(), y.getMaxY());
2330
+ return R.inverseTransformPoint(W);
2331
+ }, O.branchRadialLayout = function(n, m, p, E, y, R) {
2332
+ var M = (E - p + 1) / 2;
2333
+ M < 0 && (M += 180);
2334
+ var S = (M + p) % 360, W = S * G.TWO_PI / 360, D = y * Math.cos(W), q = y * Math.sin(W);
2335
+ n.setCenter(D, q);
2336
+ var V = [];
2337
+ V = V.concat(n.getEdges());
2338
+ var X = V.length;
2339
+ m != null && X--;
2340
+ for (var et = 0, z = V.length, w, H = n.getEdgesBetween(m); H.length > 1; ) {
2341
+ var $ = H[0];
2342
+ H.splice(0, 1);
2343
+ var _ = V.indexOf($);
2344
+ _ >= 0 && V.splice(_, 1), z--, X--;
2345
+ }
2346
+ m != null ? w = (V.indexOf(H[0]) + 1) % z : w = 0;
2347
+ for (var ht = Math.abs(E - p) / X, Q = w; et != X; Q = ++Q % z) {
2348
+ var It = V[Q].getOtherEnd(n);
2349
+ if (It != m) {
2350
+ var Nt = (p + et * ht) % 360, vt = (Nt + ht) % 360;
2351
+ O.branchRadialLayout(It, n, Nt, vt, y + R, R), et++;
2352
+ }
2353
+ }
2354
+ }, O.maxDiagonalInTree = function(n) {
2355
+ for (var m = C.MIN_VALUE, p = 0; p < n.length; p++) {
2356
+ var E = n[p], y = E.getDiagonal();
2357
+ y > m && (m = y);
2358
+ }
2359
+ return m;
2360
+ }, O.prototype.calcRepulsionRange = function() {
2361
+ return 2 * (this.level + 1) * this.idealEdgeLength;
2362
+ }, O.prototype.groupZeroDegreeMembers = function() {
2363
+ var n = this, m = {};
2364
+ this.memberGroups = {}, this.idToDummyNode = {};
2365
+ for (var p = [], E = this.graphManager.getAllNodes(), y = 0; y < E.length; y++) {
2366
+ var R = E[y], M = R.getParent();
2367
+ this.getNodeDegreeWithChildren(R) === 0 && (M.id == null || !this.getToBeTiled(M)) && p.push(R);
2368
+ }
2369
+ for (var y = 0; y < p.length; y++) {
2370
+ var R = p[y], S = R.getParent().id;
2371
+ typeof m[S] > "u" && (m[S] = []), m[S] = m[S].concat(R);
2372
+ }
2373
+ Object.keys(m).forEach(function(W) {
2374
+ if (m[W].length > 1) {
2375
+ var D = "DummyCompound_" + W;
2376
+ n.memberGroups[D] = m[W];
2377
+ var q = m[W][0].getParent(), V = new t(n.graphManager);
2378
+ V.id = D, V.paddingLeft = q.paddingLeft || 0, V.paddingRight = q.paddingRight || 0, V.paddingBottom = q.paddingBottom || 0, V.paddingTop = q.paddingTop || 0, n.idToDummyNode[D] = V;
2379
+ var X = n.getGraphManager().add(n.newGraph(), V), et = q.getChild();
2380
+ et.add(V);
2381
+ for (var z = 0; z < m[W].length; z++) {
2382
+ var w = m[W][z];
2383
+ et.remove(w), X.add(w);
2384
+ }
2385
+ }
2386
+ });
2387
+ }, O.prototype.clearCompounds = function() {
2388
+ var n = {}, m = {};
2389
+ this.performDFSOnCompounds();
2390
+ for (var p = 0; p < this.compoundOrder.length; p++)
2391
+ m[this.compoundOrder[p].id] = this.compoundOrder[p], n[this.compoundOrder[p].id] = [].concat(this.compoundOrder[p].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[p].getChild()), this.compoundOrder[p].child = null;
2392
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(n, m);
2393
+ }, O.prototype.clearZeroDegreeMembers = function() {
2394
+ var n = this, m = this.tiledZeroDegreePack = [];
2395
+ Object.keys(this.memberGroups).forEach(function(p) {
2396
+ var E = n.idToDummyNode[p];
2397
+ if (m[p] = n.tileNodes(n.memberGroups[p], E.paddingLeft + E.paddingRight), E.rect.width = m[p].width, E.rect.height = m[p].height, E.setCenter(m[p].centerX, m[p].centerY), E.labelMarginLeft = 0, E.labelMarginTop = 0, s.NODE_DIMENSIONS_INCLUDE_LABELS) {
2398
+ var y = E.rect.width, R = E.rect.height;
2399
+ E.labelWidth && (E.labelPosHorizontal == "left" ? (E.rect.x -= E.labelWidth, E.setWidth(y + E.labelWidth), E.labelMarginLeft = E.labelWidth) : E.labelPosHorizontal == "center" && E.labelWidth > y ? (E.rect.x -= (E.labelWidth - y) / 2, E.setWidth(E.labelWidth), E.labelMarginLeft = (E.labelWidth - y) / 2) : E.labelPosHorizontal == "right" && E.setWidth(y + E.labelWidth)), E.labelHeight && (E.labelPosVertical == "top" ? (E.rect.y -= E.labelHeight, E.setHeight(R + E.labelHeight), E.labelMarginTop = E.labelHeight) : E.labelPosVertical == "center" && E.labelHeight > R ? (E.rect.y -= (E.labelHeight - R) / 2, E.setHeight(E.labelHeight), E.labelMarginTop = (E.labelHeight - R) / 2) : E.labelPosVertical == "bottom" && E.setHeight(R + E.labelHeight));
2400
+ }
2401
+ });
2402
+ }, O.prototype.repopulateCompounds = function() {
2403
+ for (var n = this.compoundOrder.length - 1; n >= 0; n--) {
2404
+ var m = this.compoundOrder[n], p = m.id, E = m.paddingLeft, y = m.paddingTop, R = m.labelMarginLeft, M = m.labelMarginTop;
2405
+ this.adjustLocations(this.tiledMemberPack[p], m.rect.x, m.rect.y, E, y, R, M);
2406
+ }
2407
+ }, O.prototype.repopulateZeroDegreeMembers = function() {
2408
+ var n = this, m = this.tiledZeroDegreePack;
2409
+ Object.keys(m).forEach(function(p) {
2410
+ var E = n.idToDummyNode[p], y = E.paddingLeft, R = E.paddingTop, M = E.labelMarginLeft, S = E.labelMarginTop;
2411
+ n.adjustLocations(m[p], E.rect.x, E.rect.y, y, R, M, S);
2412
+ });
2413
+ }, O.prototype.getToBeTiled = function(n) {
2414
+ var m = n.id;
2415
+ if (this.toBeTiled[m] != null)
2416
+ return this.toBeTiled[m];
2417
+ var p = n.getChild();
2418
+ if (p == null)
2419
+ return this.toBeTiled[m] = !1, !1;
2420
+ for (var E = p.getNodes(), y = 0; y < E.length; y++) {
2421
+ var R = E[y];
2422
+ if (this.getNodeDegree(R) > 0)
2423
+ return this.toBeTiled[m] = !1, !1;
2424
+ if (R.getChild() == null) {
2425
+ this.toBeTiled[R.id] = !1;
2426
+ continue;
2427
+ }
2428
+ if (!this.getToBeTiled(R))
2429
+ return this.toBeTiled[m] = !1, !1;
2430
+ }
2431
+ return this.toBeTiled[m] = !0, !0;
2432
+ }, O.prototype.getNodeDegree = function(n) {
2433
+ for (var m = n.getEdges(), p = 0, E = 0; E < m.length; E++) {
2434
+ var y = m[E];
2435
+ y.getSource().id !== y.getTarget().id && (p = p + 1);
2436
+ }
2437
+ return p;
2438
+ }, O.prototype.getNodeDegreeWithChildren = function(n) {
2439
+ var m = this.getNodeDegree(n);
2440
+ if (n.getChild() == null)
2441
+ return m;
2442
+ for (var p = n.getChild().getNodes(), E = 0; E < p.length; E++) {
2443
+ var y = p[E];
2444
+ m += this.getNodeDegreeWithChildren(y);
2445
+ }
2446
+ return m;
2447
+ }, O.prototype.performDFSOnCompounds = function() {
2448
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2449
+ }, O.prototype.fillCompexOrderByDFS = function(n) {
2450
+ for (var m = 0; m < n.length; m++) {
2451
+ var p = n[m];
2452
+ p.getChild() != null && this.fillCompexOrderByDFS(p.getChild().getNodes()), this.getToBeTiled(p) && this.compoundOrder.push(p);
2453
+ }
2454
+ }, O.prototype.adjustLocations = function(n, m, p, E, y, R, M) {
2455
+ m += E + R, p += y + M;
2456
+ for (var S = m, W = 0; W < n.rows.length; W++) {
2457
+ var D = n.rows[W];
2458
+ m = S;
2459
+ for (var q = 0, V = 0; V < D.length; V++) {
2460
+ var X = D[V];
2461
+ X.rect.x = m, X.rect.y = p, m += X.rect.width + n.horizontalPadding, X.rect.height > q && (q = X.rect.height);
2462
+ }
2463
+ p += q + n.verticalPadding;
2464
+ }
2465
+ }, O.prototype.tileCompoundMembers = function(n, m) {
2466
+ var p = this;
2467
+ this.tiledMemberPack = [], Object.keys(n).forEach(function(E) {
2468
+ var y = m[E];
2469
+ if (p.tiledMemberPack[E] = p.tileNodes(n[E], y.paddingLeft + y.paddingRight), y.rect.width = p.tiledMemberPack[E].width, y.rect.height = p.tiledMemberPack[E].height, y.setCenter(p.tiledMemberPack[E].centerX, p.tiledMemberPack[E].centerY), y.labelMarginLeft = 0, y.labelMarginTop = 0, s.NODE_DIMENSIONS_INCLUDE_LABELS) {
2470
+ var R = y.rect.width, M = y.rect.height;
2471
+ y.labelWidth && (y.labelPosHorizontal == "left" ? (y.rect.x -= y.labelWidth, y.setWidth(R + y.labelWidth), y.labelMarginLeft = y.labelWidth) : y.labelPosHorizontal == "center" && y.labelWidth > R ? (y.rect.x -= (y.labelWidth - R) / 2, y.setWidth(y.labelWidth), y.labelMarginLeft = (y.labelWidth - R) / 2) : y.labelPosHorizontal == "right" && y.setWidth(R + y.labelWidth)), y.labelHeight && (y.labelPosVertical == "top" ? (y.rect.y -= y.labelHeight, y.setHeight(M + y.labelHeight), y.labelMarginTop = y.labelHeight) : y.labelPosVertical == "center" && y.labelHeight > M ? (y.rect.y -= (y.labelHeight - M) / 2, y.setHeight(y.labelHeight), y.labelMarginTop = (y.labelHeight - M) / 2) : y.labelPosVertical == "bottom" && y.setHeight(M + y.labelHeight));
2472
+ }
2473
+ });
2474
+ }, O.prototype.tileNodes = function(n, m) {
2475
+ var p = this.tileNodesByFavoringDim(n, m, !0), E = this.tileNodesByFavoringDim(n, m, !1), y = this.getOrgRatio(p), R = this.getOrgRatio(E), M;
2476
+ return R < y ? M = E : M = p, M;
2477
+ }, O.prototype.getOrgRatio = function(n) {
2478
+ var m = n.width, p = n.height, E = m / p;
2479
+ return E < 1 && (E = 1 / E), E;
2480
+ }, O.prototype.calcIdealRowWidth = function(n, m) {
2481
+ var p = s.TILING_PADDING_VERTICAL, E = s.TILING_PADDING_HORIZONTAL, y = n.length, R = 0, M = 0, S = 0;
2482
+ n.forEach(function(z) {
2483
+ R += z.getWidth(), M += z.getHeight(), z.getWidth() > S && (S = z.getWidth());
2484
+ });
2485
+ var W = R / y, D = M / y, q = Math.pow(p - E, 2) + 4 * (W + E) * (D + p) * y, V = (E - p + Math.sqrt(q)) / (2 * (W + E)), X;
2486
+ m ? (X = Math.ceil(V), X == V && X++) : X = Math.floor(V);
2487
+ var et = X * (W + E) - E;
2488
+ return S > et && (et = S), et += E * 2, et;
2489
+ }, O.prototype.tileNodesByFavoringDim = function(n, m, p) {
2490
+ var E = s.TILING_PADDING_VERTICAL, y = s.TILING_PADDING_HORIZONTAL, R = s.TILING_COMPARE_BY, M = {
2491
+ rows: [],
2492
+ rowWidth: [],
2493
+ rowHeight: [],
2494
+ width: 0,
2495
+ height: m,
2496
+ // assume minHeight equals to minWidth
2497
+ verticalPadding: E,
2498
+ horizontalPadding: y,
2499
+ centerX: 0,
2500
+ centerY: 0
2501
+ };
2502
+ R && (M.idealRowWidth = this.calcIdealRowWidth(n, p));
2503
+ var S = function(w) {
2504
+ return w.rect.width * w.rect.height;
2505
+ }, W = function(w, H) {
2506
+ return S(H) - S(w);
2507
+ };
2508
+ n.sort(function(z, w) {
2509
+ var H = W;
2510
+ return M.idealRowWidth ? (H = R, H(z.id, w.id)) : H(z, w);
2511
+ });
2512
+ for (var D = 0, q = 0, V = 0; V < n.length; V++) {
2513
+ var X = n[V];
2514
+ D += X.getCenterX(), q += X.getCenterY();
2515
+ }
2516
+ M.centerX = D / n.length, M.centerY = q / n.length;
2517
+ for (var V = 0; V < n.length; V++) {
2518
+ var X = n[V];
2519
+ if (M.rows.length == 0)
2520
+ this.insertNodeToRow(M, X, 0, m);
2521
+ else if (this.canAddHorizontal(M, X.rect.width, X.rect.height)) {
2522
+ var et = M.rows.length - 1;
2523
+ M.idealRowWidth || (et = this.getShortestRowIndex(M)), this.insertNodeToRow(M, X, et, m);
2524
+ } else
2525
+ this.insertNodeToRow(M, X, M.rows.length, m);
2526
+ this.shiftToLastRow(M);
2527
+ }
2528
+ return M;
2529
+ }, O.prototype.insertNodeToRow = function(n, m, p, E) {
2530
+ var y = E;
2531
+ if (p == n.rows.length) {
2532
+ var R = [];
2533
+ n.rows.push(R), n.rowWidth.push(y), n.rowHeight.push(0);
2534
+ }
2535
+ var M = n.rowWidth[p] + m.rect.width;
2536
+ n.rows[p].length > 0 && (M += n.horizontalPadding), n.rowWidth[p] = M, n.width < M && (n.width = M);
2537
+ var S = m.rect.height;
2538
+ p > 0 && (S += n.verticalPadding);
2539
+ var W = 0;
2540
+ S > n.rowHeight[p] && (W = n.rowHeight[p], n.rowHeight[p] = S, W = n.rowHeight[p] - W), n.height += W, n.rows[p].push(m);
2541
+ }, O.prototype.getShortestRowIndex = function(n) {
2542
+ for (var m = -1, p = Number.MAX_VALUE, E = 0; E < n.rows.length; E++)
2543
+ n.rowWidth[E] < p && (m = E, p = n.rowWidth[E]);
2544
+ return m;
2545
+ }, O.prototype.getLongestRowIndex = function(n) {
2546
+ for (var m = -1, p = Number.MIN_VALUE, E = 0; E < n.rows.length; E++)
2547
+ n.rowWidth[E] > p && (m = E, p = n.rowWidth[E]);
2548
+ return m;
2549
+ }, O.prototype.canAddHorizontal = function(n, m, p) {
2550
+ if (n.idealRowWidth) {
2551
+ var E = n.rows.length - 1, y = n.rowWidth[E];
2552
+ return y + m + n.horizontalPadding <= n.idealRowWidth;
2553
+ }
2554
+ var R = this.getShortestRowIndex(n);
2555
+ if (R < 0)
2556
+ return !0;
2557
+ var M = n.rowWidth[R];
2558
+ if (M + n.horizontalPadding + m <= n.width) return !0;
2559
+ var S = 0;
2560
+ n.rowHeight[R] < p && R > 0 && (S = p + n.verticalPadding - n.rowHeight[R]);
2561
+ var W;
2562
+ n.width - M >= m + n.horizontalPadding ? W = (n.height + S) / (M + m + n.horizontalPadding) : W = (n.height + S) / n.width, S = p + n.verticalPadding;
2563
+ var D;
2564
+ return n.width < m ? D = (n.height + S) / m : D = (n.height + S) / n.width, D < 1 && (D = 1 / D), W < 1 && (W = 1 / W), W < D;
2565
+ }, O.prototype.shiftToLastRow = function(n) {
2566
+ var m = this.getLongestRowIndex(n), p = n.rowWidth.length - 1, E = n.rows[m], y = E[E.length - 1], R = y.width + n.horizontalPadding;
2567
+ if (n.width - n.rowWidth[p] > R && m != p) {
2568
+ E.splice(-1, 1), n.rows[p].push(y), n.rowWidth[m] = n.rowWidth[m] - R, n.rowWidth[p] = n.rowWidth[p] + R, n.width = n.rowWidth[instance.getLongestRowIndex(n)];
2569
+ for (var M = Number.MIN_VALUE, S = 0; S < E.length; S++)
2570
+ E[S].height > M && (M = E[S].height);
2571
+ m > 0 && (M += n.verticalPadding);
2572
+ var W = n.rowHeight[m] + n.rowHeight[p];
2573
+ n.rowHeight[m] = M, n.rowHeight[p] < y.height + n.verticalPadding && (n.rowHeight[p] = y.height + n.verticalPadding);
2574
+ var D = n.rowHeight[m] + n.rowHeight[p];
2575
+ n.height += D - W, this.shiftToLastRow(n);
2576
+ }
2577
+ }, O.prototype.tilingPreLayout = function() {
2578
+ s.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2579
+ }, O.prototype.tilingPostLayout = function() {
2580
+ s.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2581
+ }, O.prototype.reduceTrees = function() {
2582
+ for (var n = [], m = !0, p; m; ) {
2583
+ var E = this.graphManager.getAllNodes(), y = [];
2584
+ m = !1;
2585
+ for (var R = 0; R < E.length; R++)
2586
+ if (p = E[R], p.getEdges().length == 1 && !p.getEdges()[0].isInterGraph && p.getChild() == null) {
2587
+ if (s.PURE_INCREMENTAL) {
2588
+ var M = p.getEdges()[0].getOtherEnd(p), S = new L(p.getCenterX() - M.getCenterX(), p.getCenterY() - M.getCenterY());
2589
+ y.push([p, p.getEdges()[0], p.getOwner(), S]);
2590
+ } else
2591
+ y.push([p, p.getEdges()[0], p.getOwner()]);
2592
+ m = !0;
2593
+ }
2594
+ if (m == !0) {
2595
+ for (var W = [], D = 0; D < y.length; D++)
2596
+ y[D][0].getEdges().length == 1 && (W.push(y[D]), y[D][0].getOwner().remove(y[D][0]));
2597
+ n.push(W), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2598
+ }
2599
+ }
2600
+ this.prunedNodesAll = n;
2601
+ }, O.prototype.growTree = function(n) {
2602
+ for (var m = n.length, p = n[m - 1], E, y = 0; y < p.length; y++)
2603
+ E = p[y], this.findPlaceforPrunedNode(E), E[2].add(E[0]), E[2].add(E[1], E[1].source, E[1].target);
2604
+ n.splice(n.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2605
+ }, O.prototype.findPlaceforPrunedNode = function(n) {
2606
+ var m, p, E = n[0];
2607
+ if (E == n[1].source ? p = n[1].target : p = n[1].source, s.PURE_INCREMENTAL)
2608
+ E.setCenter(p.getCenterX() + n[3].getWidth(), p.getCenterY() + n[3].getHeight());
2609
+ else {
2610
+ var y = p.startX, R = p.finishX, M = p.startY, S = p.finishY, W = 0, D = 0, q = 0, V = 0, X = [W, q, D, V];
2611
+ if (M > 0)
2612
+ for (var et = y; et <= R; et++)
2613
+ X[0] += this.grid[et][M - 1].length + this.grid[et][M].length - 1;
2614
+ if (R < this.grid.length - 1)
2615
+ for (var et = M; et <= S; et++)
2616
+ X[1] += this.grid[R + 1][et].length + this.grid[R][et].length - 1;
2617
+ if (S < this.grid[0].length - 1)
2618
+ for (var et = y; et <= R; et++)
2619
+ X[2] += this.grid[et][S + 1].length + this.grid[et][S].length - 1;
2620
+ if (y > 0)
2621
+ for (var et = M; et <= S; et++)
2622
+ X[3] += this.grid[y - 1][et].length + this.grid[y][et].length - 1;
2623
+ for (var z = C.MAX_VALUE, w, H, $ = 0; $ < X.length; $++)
2624
+ X[$] < z ? (z = X[$], w = 1, H = $) : X[$] == z && w++;
2625
+ if (w == 3 && z == 0)
2626
+ X[0] == 0 && X[1] == 0 && X[2] == 0 ? m = 1 : X[0] == 0 && X[1] == 0 && X[3] == 0 ? m = 0 : X[0] == 0 && X[2] == 0 && X[3] == 0 ? m = 3 : X[1] == 0 && X[2] == 0 && X[3] == 0 && (m = 2);
2627
+ else if (w == 2 && z == 0) {
2628
+ var _ = Math.floor(Math.random() * 2);
2629
+ X[0] == 0 && X[1] == 0 ? _ == 0 ? m = 0 : m = 1 : X[0] == 0 && X[2] == 0 ? _ == 0 ? m = 0 : m = 2 : X[0] == 0 && X[3] == 0 ? _ == 0 ? m = 0 : m = 3 : X[1] == 0 && X[2] == 0 ? _ == 0 ? m = 1 : m = 2 : X[1] == 0 && X[3] == 0 ? _ == 0 ? m = 1 : m = 3 : _ == 0 ? m = 2 : m = 3;
2630
+ } else if (w == 4 && z == 0) {
2631
+ var _ = Math.floor(Math.random() * 4);
2632
+ m = _;
2633
+ } else
2634
+ m = H;
2635
+ m == 0 ? E.setCenter(p.getCenterX(), p.getCenterY() - p.getHeight() / 2 - f.DEFAULT_EDGE_LENGTH - E.getHeight() / 2) : m == 1 ? E.setCenter(p.getCenterX() + p.getWidth() / 2 + f.DEFAULT_EDGE_LENGTH + E.getWidth() / 2, p.getCenterY()) : m == 2 ? E.setCenter(p.getCenterX(), p.getCenterY() + p.getHeight() / 2 + f.DEFAULT_EDGE_LENGTH + E.getHeight() / 2) : E.setCenter(p.getCenterX() - p.getWidth() / 2 - f.DEFAULT_EDGE_LENGTH - E.getWidth() / 2, p.getCenterY());
2636
+ }
2637
+ }, a.exports = O;
2638
+ })
2639
+ ),
2640
+ /***/
2641
+ 991: (
2642
+ /***/
2643
+ ((a, e, r) => {
2644
+ var l = r(551).FDLayoutNode, i = r(551).IMath;
2645
+ function g(o, s, c, f) {
2646
+ l.call(this, o, s, c, f);
2647
+ }
2648
+ g.prototype = Object.create(l.prototype);
2649
+ for (var t in l)
2650
+ g[t] = l[t];
2651
+ g.prototype.calculateDisplacement = function() {
2652
+ var o = this.graphManager.getLayout();
2653
+ this.getChild() != null && this.fixedNodeWeight ? (this.displacementX += o.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight, this.displacementY += o.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight) : (this.displacementX += o.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY += o.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren), Math.abs(this.displacementX) > o.coolingFactor * o.maxNodeDisplacement && (this.displacementX = o.coolingFactor * o.maxNodeDisplacement * i.sign(this.displacementX)), Math.abs(this.displacementY) > o.coolingFactor * o.maxNodeDisplacement && (this.displacementY = o.coolingFactor * o.maxNodeDisplacement * i.sign(this.displacementY)), this.child && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
2654
+ }, g.prototype.propogateDisplacementToChildren = function(o, s) {
2655
+ for (var c = this.getChild().getNodes(), f, T = 0; T < c.length; T++)
2656
+ f = c[T], f.getChild() == null ? (f.displacementX += o, f.displacementY += s) : f.propogateDisplacementToChildren(o, s);
2657
+ }, g.prototype.move = function() {
2658
+ var o = this.graphManager.getLayout();
2659
+ (this.child == null || this.child.getNodes().length == 0) && (this.moveBy(this.displacementX, this.displacementY), o.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;
2660
+ }, g.prototype.setPred1 = function(o) {
2661
+ this.pred1 = o;
2662
+ }, g.prototype.getPred1 = function() {
2663
+ return pred1;
2664
+ }, g.prototype.getPred2 = function() {
2665
+ return pred2;
2666
+ }, g.prototype.setNext = function(o) {
2667
+ this.next = o;
2668
+ }, g.prototype.getNext = function() {
2669
+ return next;
2670
+ }, g.prototype.setProcessed = function(o) {
2671
+ this.processed = o;
2672
+ }, g.prototype.isProcessed = function() {
2673
+ return processed;
2674
+ }, a.exports = g;
2675
+ })
2676
+ ),
2677
+ /***/
2678
+ 902: (
2679
+ /***/
2680
+ ((a, e, r) => {
2681
+ function l(c) {
2682
+ if (Array.isArray(c)) {
2683
+ for (var f = 0, T = Array(c.length); f < c.length; f++)
2684
+ T[f] = c[f];
2685
+ return T;
2686
+ } else
2687
+ return Array.from(c);
2688
+ }
2689
+ var i = r(806), g = r(551).LinkedList, t = r(551).Matrix, o = r(551).SVD;
2690
+ function s() {
2691
+ }
2692
+ s.handleConstraints = function(c) {
2693
+ var f = {};
2694
+ f.fixedNodeConstraint = c.constraints.fixedNodeConstraint, f.alignmentConstraint = c.constraints.alignmentConstraint, f.relativePlacementConstraint = c.constraints.relativePlacementConstraint;
2695
+ for (var T = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), v = [], L = [], b = c.getAllNodes(), C = 0, G = 0; G < b.length; G++) {
2696
+ var k = b[G];
2697
+ k.getChild() == null && (d.set(k.id, C++), v.push(k.getCenterX()), L.push(k.getCenterY()), T.set(k.id, k));
2698
+ }
2699
+ f.relativePlacementConstraint && f.relativePlacementConstraint.forEach(function(F) {
2700
+ !F.gap && F.gap != 0 && (F.left ? F.gap = i.DEFAULT_EDGE_LENGTH + T.get(F.left).getWidth() / 2 + T.get(F.right).getWidth() / 2 : F.gap = i.DEFAULT_EDGE_LENGTH + T.get(F.top).getHeight() / 2 + T.get(F.bottom).getHeight() / 2);
2701
+ });
2702
+ var Y = function(U, B) {
2703
+ return { x: U.x - B.x, y: U.y - B.y };
2704
+ }, K = function(U) {
2705
+ var B = 0, J = 0;
2706
+ return U.forEach(function(Z) {
2707
+ B += v[d.get(Z)], J += L[d.get(Z)];
2708
+ }), { x: B / U.size, y: J / U.size };
2709
+ }, O = function(U, B, J, Z, at) {
2710
+ function ct(lt, ot) {
2711
+ var Lt = new Set(lt), ft = !0, st = !1, Xt = void 0;
2712
+ try {
2713
+ for (var Tt = ot[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
2714
+ var $t = Ct.value;
2715
+ Lt.add($t);
2716
+ }
2717
+ } catch (bt) {
2718
+ st = !0, Xt = bt;
2719
+ } finally {
2720
+ try {
2721
+ !ft && Tt.return && Tt.return();
2722
+ } finally {
2723
+ if (st)
2724
+ throw Xt;
2725
+ }
2726
+ }
2727
+ return Lt;
2728
+ }
2729
+ var nt = /* @__PURE__ */ new Map();
2730
+ U.forEach(function(lt, ot) {
2731
+ nt.set(ot, 0);
2732
+ }), U.forEach(function(lt, ot) {
2733
+ lt.forEach(function(Lt) {
2734
+ nt.set(Lt.id, nt.get(Lt.id) + 1);
2735
+ });
2736
+ });
2737
+ var tt = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), ut = new g();
2738
+ nt.forEach(function(lt, ot) {
2739
+ lt == 0 ? (ut.push(ot), J || (B == "horizontal" ? tt.set(ot, d.has(ot) ? v[d.get(ot)] : Z.get(ot)) : tt.set(ot, d.has(ot) ? L[d.get(ot)] : Z.get(ot)))) : tt.set(ot, Number.NEGATIVE_INFINITY), J && j.set(ot, /* @__PURE__ */ new Set([ot]));
2740
+ }), J && at.forEach(function(lt) {
2741
+ var ot = [];
2742
+ if (lt.forEach(function(st) {
2743
+ J.has(st) && ot.push(st);
2744
+ }), ot.length > 0) {
2745
+ var Lt = 0;
2746
+ ot.forEach(function(st) {
2747
+ B == "horizontal" ? (tt.set(st, d.has(st) ? v[d.get(st)] : Z.get(st)), Lt += tt.get(st)) : (tt.set(st, d.has(st) ? L[d.get(st)] : Z.get(st)), Lt += tt.get(st));
2748
+ }), Lt = Lt / ot.length, lt.forEach(function(st) {
2749
+ J.has(st) || tt.set(st, Lt);
2750
+ });
2751
+ } else {
2752
+ var ft = 0;
2753
+ lt.forEach(function(st) {
2754
+ B == "horizontal" ? ft += d.has(st) ? v[d.get(st)] : Z.get(st) : ft += d.has(st) ? L[d.get(st)] : Z.get(st);
2755
+ }), ft = ft / lt.length, lt.forEach(function(st) {
2756
+ tt.set(st, ft);
2757
+ });
2758
+ }
2759
+ });
2760
+ for (var Mt = function() {
2761
+ var ot = ut.shift(), Lt = U.get(ot);
2762
+ Lt.forEach(function(ft) {
2763
+ if (tt.get(ft.id) < tt.get(ot) + ft.gap)
2764
+ if (J && J.has(ft.id)) {
2765
+ var st = void 0;
2766
+ if (B == "horizontal" ? st = d.has(ft.id) ? v[d.get(ft.id)] : Z.get(ft.id) : st = d.has(ft.id) ? L[d.get(ft.id)] : Z.get(ft.id), tt.set(ft.id, st), st < tt.get(ot) + ft.gap) {
2767
+ var Xt = tt.get(ot) + ft.gap - st;
2768
+ j.get(ot).forEach(function(Tt) {
2769
+ tt.set(Tt, tt.get(Tt) - Xt);
2770
+ });
2771
+ }
2772
+ } else
2773
+ tt.set(ft.id, tt.get(ot) + ft.gap);
2774
+ nt.set(ft.id, nt.get(ft.id) - 1), nt.get(ft.id) == 0 && ut.push(ft.id), J && j.set(ft.id, ct(j.get(ot), j.get(ft.id)));
2775
+ });
2776
+ }; ut.length != 0; )
2777
+ Mt();
2778
+ if (J) {
2779
+ var pt = /* @__PURE__ */ new Set();
2780
+ U.forEach(function(lt, ot) {
2781
+ lt.length == 0 && pt.add(ot);
2782
+ });
2783
+ var xt = [];
2784
+ j.forEach(function(lt, ot) {
2785
+ if (pt.has(ot)) {
2786
+ var Lt = !1, ft = !0, st = !1, Xt = void 0;
2787
+ try {
2788
+ for (var Tt = lt[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
2789
+ var $t = Ct.value;
2790
+ J.has($t) && (Lt = !0);
2791
+ }
2792
+ } catch (St) {
2793
+ st = !0, Xt = St;
2794
+ } finally {
2795
+ try {
2796
+ !ft && Tt.return && Tt.return();
2797
+ } finally {
2798
+ if (st)
2799
+ throw Xt;
2800
+ }
2801
+ }
2802
+ if (!Lt) {
2803
+ var bt = !1, zt = void 0;
2804
+ xt.forEach(function(St, Zt) {
2805
+ St.has([].concat(l(lt))[0]) && (bt = !0, zt = Zt);
2806
+ }), bt ? lt.forEach(function(St) {
2807
+ xt[zt].add(St);
2808
+ }) : xt.push(new Set(lt));
2809
+ }
2810
+ }
2811
+ }), xt.forEach(function(lt, ot) {
2812
+ var Lt = Number.POSITIVE_INFINITY, ft = Number.POSITIVE_INFINITY, st = Number.NEGATIVE_INFINITY, Xt = Number.NEGATIVE_INFINITY, Tt = !0, Ct = !1, $t = void 0;
2813
+ try {
2814
+ for (var bt = lt[Symbol.iterator](), zt; !(Tt = (zt = bt.next()).done); Tt = !0) {
2815
+ var St = zt.value, Zt = void 0;
2816
+ B == "horizontal" ? Zt = d.has(St) ? v[d.get(St)] : Z.get(St) : Zt = d.has(St) ? L[d.get(St)] : Z.get(St);
2817
+ var Kt = tt.get(St);
2818
+ Zt < Lt && (Lt = Zt), Zt > st && (st = Zt), Kt < ft && (ft = Kt), Kt > Xt && (Xt = Kt);
2819
+ }
2820
+ } catch (ee) {
2821
+ Ct = !0, $t = ee;
2822
+ } finally {
2823
+ try {
2824
+ !Tt && bt.return && bt.return();
2825
+ } finally {
2826
+ if (Ct)
2827
+ throw $t;
2828
+ }
2829
+ }
2830
+ var ce = (Lt + st) / 2 - (ft + Xt) / 2, Qt = !0, jt = !1, _t = void 0;
2831
+ try {
2832
+ for (var Jt = lt[Symbol.iterator](), oe; !(Qt = (oe = Jt.next()).done); Qt = !0) {
2833
+ var te = oe.value;
2834
+ tt.set(te, tt.get(te) + ce);
2835
+ }
2836
+ } catch (ee) {
2837
+ jt = !0, _t = ee;
2838
+ } finally {
2839
+ try {
2840
+ !Qt && Jt.return && Jt.return();
2841
+ } finally {
2842
+ if (jt)
2843
+ throw _t;
2844
+ }
2845
+ }
2846
+ });
2847
+ }
2848
+ return tt;
2849
+ }, it = function(U) {
2850
+ var B = 0, J = 0, Z = 0, at = 0;
2851
+ if (U.forEach(function(j) {
2852
+ j.left ? v[d.get(j.left)] - v[d.get(j.right)] >= 0 ? B++ : J++ : L[d.get(j.top)] - L[d.get(j.bottom)] >= 0 ? Z++ : at++;
2853
+ }), B > J && Z > at)
2854
+ for (var ct = 0; ct < d.size; ct++)
2855
+ v[ct] = -1 * v[ct], L[ct] = -1 * L[ct];
2856
+ else if (B > J)
2857
+ for (var nt = 0; nt < d.size; nt++)
2858
+ v[nt] = -1 * v[nt];
2859
+ else if (Z > at)
2860
+ for (var tt = 0; tt < d.size; tt++)
2861
+ L[tt] = -1 * L[tt];
2862
+ }, n = function(U) {
2863
+ var B = [], J = new g(), Z = /* @__PURE__ */ new Set(), at = 0;
2864
+ return U.forEach(function(ct, nt) {
2865
+ if (!Z.has(nt)) {
2866
+ B[at] = [];
2867
+ var tt = nt;
2868
+ for (J.push(tt), Z.add(tt), B[at].push(tt); J.length != 0; ) {
2869
+ tt = J.shift();
2870
+ var j = U.get(tt);
2871
+ j.forEach(function(ut) {
2872
+ Z.has(ut.id) || (J.push(ut.id), Z.add(ut.id), B[at].push(ut.id));
2873
+ });
2874
+ }
2875
+ at++;
2876
+ }
2877
+ }), B;
2878
+ }, m = function(U) {
2879
+ var B = /* @__PURE__ */ new Map();
2880
+ return U.forEach(function(J, Z) {
2881
+ B.set(Z, []);
2882
+ }), U.forEach(function(J, Z) {
2883
+ J.forEach(function(at) {
2884
+ B.get(Z).push(at), B.get(at.id).push({ id: Z, gap: at.gap, direction: at.direction });
2885
+ });
2886
+ }), B;
2887
+ }, p = function(U) {
2888
+ var B = /* @__PURE__ */ new Map();
2889
+ return U.forEach(function(J, Z) {
2890
+ B.set(Z, []);
2891
+ }), U.forEach(function(J, Z) {
2892
+ J.forEach(function(at) {
2893
+ B.get(at.id).push({ id: Z, gap: at.gap, direction: at.direction });
2894
+ });
2895
+ }), B;
2896
+ }, E = [], y = [], R = !1, M = !1, S = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), q = [];
2897
+ if (f.fixedNodeConstraint && f.fixedNodeConstraint.forEach(function(F) {
2898
+ S.add(F.nodeId);
2899
+ }), f.relativePlacementConstraint && (f.relativePlacementConstraint.forEach(function(F) {
2900
+ F.left ? (W.has(F.left) ? W.get(F.left).push({ id: F.right, gap: F.gap, direction: "horizontal" }) : W.set(F.left, [{ id: F.right, gap: F.gap, direction: "horizontal" }]), W.has(F.right) || W.set(F.right, [])) : (W.has(F.top) ? W.get(F.top).push({ id: F.bottom, gap: F.gap, direction: "vertical" }) : W.set(F.top, [{ id: F.bottom, gap: F.gap, direction: "vertical" }]), W.has(F.bottom) || W.set(F.bottom, []));
2901
+ }), D = m(W), q = n(D)), i.TRANSFORM_ON_CONSTRAINT_HANDLING) {
2902
+ if (f.fixedNodeConstraint && f.fixedNodeConstraint.length > 1)
2903
+ f.fixedNodeConstraint.forEach(function(F, U) {
2904
+ E[U] = [F.position.x, F.position.y], y[U] = [v[d.get(F.nodeId)], L[d.get(F.nodeId)]];
2905
+ }), R = !0;
2906
+ else if (f.alignmentConstraint)
2907
+ (function() {
2908
+ var F = 0;
2909
+ if (f.alignmentConstraint.vertical) {
2910
+ for (var U = f.alignmentConstraint.vertical, B = function(tt) {
2911
+ var j = /* @__PURE__ */ new Set();
2912
+ U[tt].forEach(function(pt) {
2913
+ j.add(pt);
2914
+ });
2915
+ var ut = new Set([].concat(l(j)).filter(function(pt) {
2916
+ return S.has(pt);
2917
+ })), Mt = void 0;
2918
+ ut.size > 0 ? Mt = v[d.get(ut.values().next().value)] : Mt = K(j).x, U[tt].forEach(function(pt) {
2919
+ E[F] = [Mt, L[d.get(pt)]], y[F] = [v[d.get(pt)], L[d.get(pt)]], F++;
2920
+ });
2921
+ }, J = 0; J < U.length; J++)
2922
+ B(J);
2923
+ R = !0;
2924
+ }
2925
+ if (f.alignmentConstraint.horizontal) {
2926
+ for (var Z = f.alignmentConstraint.horizontal, at = function(tt) {
2927
+ var j = /* @__PURE__ */ new Set();
2928
+ Z[tt].forEach(function(pt) {
2929
+ j.add(pt);
2930
+ });
2931
+ var ut = new Set([].concat(l(j)).filter(function(pt) {
2932
+ return S.has(pt);
2933
+ })), Mt = void 0;
2934
+ ut.size > 0 ? Mt = v[d.get(ut.values().next().value)] : Mt = K(j).y, Z[tt].forEach(function(pt) {
2935
+ E[F] = [v[d.get(pt)], Mt], y[F] = [v[d.get(pt)], L[d.get(pt)]], F++;
2936
+ });
2937
+ }, ct = 0; ct < Z.length; ct++)
2938
+ at(ct);
2939
+ R = !0;
2940
+ }
2941
+ f.relativePlacementConstraint && (M = !0);
2942
+ })();
2943
+ else if (f.relativePlacementConstraint) {
2944
+ for (var V = 0, X = 0, et = 0; et < q.length; et++)
2945
+ q[et].length > V && (V = q[et].length, X = et);
2946
+ if (V < D.size / 2)
2947
+ it(f.relativePlacementConstraint), R = !1, M = !1;
2948
+ else {
2949
+ var z = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), H = [];
2950
+ q[X].forEach(function(F) {
2951
+ W.get(F).forEach(function(U) {
2952
+ U.direction == "horizontal" ? (z.has(F) ? z.get(F).push(U) : z.set(F, [U]), z.has(U.id) || z.set(U.id, []), H.push({ left: F, right: U.id })) : (w.has(F) ? w.get(F).push(U) : w.set(F, [U]), w.has(U.id) || w.set(U.id, []), H.push({ top: F, bottom: U.id }));
2953
+ });
2954
+ }), it(H), M = !1;
2955
+ var $ = O(z, "horizontal"), _ = O(w, "vertical");
2956
+ q[X].forEach(function(F, U) {
2957
+ y[U] = [v[d.get(F)], L[d.get(F)]], E[U] = [], $.has(F) ? E[U][0] = $.get(F) : E[U][0] = v[d.get(F)], _.has(F) ? E[U][1] = _.get(F) : E[U][1] = L[d.get(F)];
2958
+ }), R = !0;
2959
+ }
2960
+ }
2961
+ if (R) {
2962
+ for (var ht = void 0, Q = t.transpose(E), It = t.transpose(y), Nt = 0; Nt < Q.length; Nt++)
2963
+ Q[Nt] = t.multGamma(Q[Nt]), It[Nt] = t.multGamma(It[Nt]);
2964
+ var vt = t.multMat(Q, t.transpose(It)), rt = o.svd(vt);
2965
+ ht = t.multMat(rt.V, t.transpose(rt.U));
2966
+ for (var gt = 0; gt < d.size; gt++) {
2967
+ var mt = [v[gt], L[gt]], At = [ht[0][0], ht[1][0]], Ot = [ht[0][1], ht[1][1]];
2968
+ v[gt] = t.dotProduct(mt, At), L[gt] = t.dotProduct(mt, Ot);
2969
+ }
2970
+ M && it(f.relativePlacementConstraint);
2971
+ }
2972
+ }
2973
+ if (i.ENFORCE_CONSTRAINTS) {
2974
+ if (f.fixedNodeConstraint && f.fixedNodeConstraint.length > 0) {
2975
+ var Et = { x: 0, y: 0 };
2976
+ f.fixedNodeConstraint.forEach(function(F, U) {
2977
+ var B = { x: v[d.get(F.nodeId)], y: L[d.get(F.nodeId)] }, J = F.position, Z = Y(J, B);
2978
+ Et.x += Z.x, Et.y += Z.y;
2979
+ }), Et.x /= f.fixedNodeConstraint.length, Et.y /= f.fixedNodeConstraint.length, v.forEach(function(F, U) {
2980
+ v[U] += Et.x;
2981
+ }), L.forEach(function(F, U) {
2982
+ L[U] += Et.y;
2983
+ }), f.fixedNodeConstraint.forEach(function(F) {
2984
+ v[d.get(F.nodeId)] = F.position.x, L[d.get(F.nodeId)] = F.position.y;
2985
+ });
2986
+ }
2987
+ if (f.alignmentConstraint) {
2988
+ if (f.alignmentConstraint.vertical)
2989
+ for (var Dt = f.alignmentConstraint.vertical, Rt = function(U) {
2990
+ var B = /* @__PURE__ */ new Set();
2991
+ Dt[U].forEach(function(at) {
2992
+ B.add(at);
2993
+ });
2994
+ var J = new Set([].concat(l(B)).filter(function(at) {
2995
+ return S.has(at);
2996
+ })), Z = void 0;
2997
+ J.size > 0 ? Z = v[d.get(J.values().next().value)] : Z = K(B).x, B.forEach(function(at) {
2998
+ S.has(at) || (v[d.get(at)] = Z);
2999
+ });
3000
+ }, Ht = 0; Ht < Dt.length; Ht++)
3001
+ Rt(Ht);
3002
+ if (f.alignmentConstraint.horizontal)
3003
+ for (var Ut = f.alignmentConstraint.horizontal, Pt = function(U) {
3004
+ var B = /* @__PURE__ */ new Set();
3005
+ Ut[U].forEach(function(at) {
3006
+ B.add(at);
3007
+ });
3008
+ var J = new Set([].concat(l(B)).filter(function(at) {
3009
+ return S.has(at);
3010
+ })), Z = void 0;
3011
+ J.size > 0 ? Z = L[d.get(J.values().next().value)] : Z = K(B).y, B.forEach(function(at) {
3012
+ S.has(at) || (L[d.get(at)] = Z);
3013
+ });
3014
+ }, Ft = 0; Ft < Ut.length; Ft++)
3015
+ Pt(Ft);
3016
+ }
3017
+ f.relativePlacementConstraint && (function() {
3018
+ var F = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), at = /* @__PURE__ */ new Map(), ct = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Set();
3019
+ if (S.forEach(function(Gt) {
3020
+ ct.add(Gt), nt.add(Gt);
3021
+ }), f.alignmentConstraint) {
3022
+ if (f.alignmentConstraint.vertical)
3023
+ for (var tt = f.alignmentConstraint.vertical, j = function(yt) {
3024
+ B.set("dummy" + yt, []), tt[yt].forEach(function(wt) {
3025
+ F.set(wt, "dummy" + yt), B.get("dummy" + yt).push(wt), S.has(wt) && ct.add("dummy" + yt);
3026
+ }), Z.set("dummy" + yt, v[d.get(tt[yt][0])]);
3027
+ }, ut = 0; ut < tt.length; ut++)
3028
+ j(ut);
3029
+ if (f.alignmentConstraint.horizontal)
3030
+ for (var Mt = f.alignmentConstraint.horizontal, pt = function(yt) {
3031
+ J.set("dummy" + yt, []), Mt[yt].forEach(function(wt) {
3032
+ U.set(wt, "dummy" + yt), J.get("dummy" + yt).push(wt), S.has(wt) && nt.add("dummy" + yt);
3033
+ }), at.set("dummy" + yt, L[d.get(Mt[yt][0])]);
3034
+ }, xt = 0; xt < Mt.length; xt++)
3035
+ pt(xt);
3036
+ }
3037
+ var lt = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map(), Lt = function(yt) {
3038
+ W.get(yt).forEach(function(wt) {
3039
+ var kt = void 0, Bt = void 0;
3040
+ wt.direction == "horizontal" ? (kt = F.get(yt) ? F.get(yt) : yt, F.get(wt.id) ? Bt = { id: F.get(wt.id), gap: wt.gap, direction: wt.direction } : Bt = wt, lt.has(kt) ? lt.get(kt).push(Bt) : lt.set(kt, [Bt]), lt.has(Bt.id) || lt.set(Bt.id, [])) : (kt = U.get(yt) ? U.get(yt) : yt, U.get(wt.id) ? Bt = { id: U.get(wt.id), gap: wt.gap, direction: wt.direction } : Bt = wt, ot.has(kt) ? ot.get(kt).push(Bt) : ot.set(kt, [Bt]), ot.has(Bt.id) || ot.set(Bt.id, []));
3041
+ });
3042
+ }, ft = !0, st = !1, Xt = void 0;
3043
+ try {
3044
+ for (var Tt = W.keys()[Symbol.iterator](), Ct; !(ft = (Ct = Tt.next()).done); ft = !0) {
3045
+ var $t = Ct.value;
3046
+ Lt($t);
3047
+ }
3048
+ } catch (Gt) {
3049
+ st = !0, Xt = Gt;
3050
+ } finally {
3051
+ try {
3052
+ !ft && Tt.return && Tt.return();
3053
+ } finally {
3054
+ if (st)
3055
+ throw Xt;
3056
+ }
3057
+ }
3058
+ var bt = m(lt), zt = m(ot), St = n(bt), Zt = n(zt), Kt = p(lt), ce = p(ot), Qt = [], jt = [];
3059
+ St.forEach(function(Gt, yt) {
3060
+ Qt[yt] = [], Gt.forEach(function(wt) {
3061
+ Kt.get(wt).length == 0 && Qt[yt].push(wt);
3062
+ });
3063
+ }), Zt.forEach(function(Gt, yt) {
3064
+ jt[yt] = [], Gt.forEach(function(wt) {
3065
+ ce.get(wt).length == 0 && jt[yt].push(wt);
3066
+ });
3067
+ });
3068
+ var _t = O(lt, "horizontal", ct, Z, Qt), Jt = O(ot, "vertical", nt, at, jt), oe = function(yt) {
3069
+ B.get(yt) ? B.get(yt).forEach(function(wt) {
3070
+ v[d.get(wt)] = _t.get(yt);
3071
+ }) : v[d.get(yt)] = _t.get(yt);
3072
+ }, te = !0, ee = !1, Ne = void 0;
3073
+ try {
3074
+ for (var ge = _t.keys()[Symbol.iterator](), Le; !(te = (Le = ge.next()).done); te = !0) {
3075
+ var ue = Le.value;
3076
+ oe(ue);
3077
+ }
3078
+ } catch (Gt) {
3079
+ ee = !0, Ne = Gt;
3080
+ } finally {
3081
+ try {
3082
+ !te && ge.return && ge.return();
3083
+ } finally {
3084
+ if (ee)
3085
+ throw Ne;
3086
+ }
3087
+ }
3088
+ var Be = function(yt) {
3089
+ J.get(yt) ? J.get(yt).forEach(function(wt) {
3090
+ L[d.get(wt)] = Jt.get(yt);
3091
+ }) : L[d.get(yt)] = Jt.get(yt);
3092
+ }, de = !0, Ce = !1, Ae = void 0;
3093
+ try {
3094
+ for (var ve = Jt.keys()[Symbol.iterator](), Me; !(de = (Me = ve.next()).done); de = !0) {
3095
+ var ue = Me.value;
3096
+ Be(ue);
3097
+ }
3098
+ } catch (Gt) {
3099
+ Ce = !0, Ae = Gt;
3100
+ } finally {
3101
+ try {
3102
+ !de && ve.return && ve.return();
3103
+ } finally {
3104
+ if (Ce)
3105
+ throw Ae;
3106
+ }
3107
+ }
3108
+ })();
3109
+ }
3110
+ for (var Yt = 0; Yt < b.length; Yt++) {
3111
+ var Vt = b[Yt];
3112
+ Vt.getChild() == null && Vt.setCenter(v[d.get(Vt.id)], L[d.get(Vt.id)]);
3113
+ }
3114
+ }, a.exports = s;
3115
+ })
3116
+ ),
3117
+ /***/
3118
+ 551: (
3119
+ /***/
3120
+ ((a) => {
3121
+ a.exports = A;
3122
+ })
3123
+ )
3124
+ /******/
3125
+ }, N = {};
3126
+ function u(a) {
3127
+ var e = N[a];
3128
+ if (e !== void 0)
3129
+ return e.exports;
3130
+ var r = N[a] = {
3131
+ /******/
3132
+ // no module.id needed
3133
+ /******/
3134
+ // no module.loaded needed
3135
+ /******/
3136
+ exports: {}
3137
+ /******/
3138
+ };
3139
+ return P[a](r, r.exports, u), r.exports;
3140
+ }
3141
+ var h = u(45);
3142
+ return h;
3143
+ })()
3144
+ );
3145
+ });
3146
+ })(le)), le.exports;
3147
+ }
3148
+ var pr = he.exports, De;
3149
+ function yr() {
3150
+ return De || (De = 1, (function(I, x) {
3151
+ (function(P, N) {
3152
+ I.exports = N(/* @__PURE__ */ vr());
3153
+ })(pr, function(A) {
3154
+ return (
3155
+ /******/
3156
+ (() => {
3157
+ var P = {
3158
+ /***/
3159
+ 658: (
3160
+ /***/
3161
+ ((a) => {
3162
+ a.exports = Object.assign != null ? Object.assign.bind(Object) : function(e) {
3163
+ for (var r = arguments.length, l = Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
3164
+ l[i - 1] = arguments[i];
3165
+ return l.forEach(function(g) {
3166
+ Object.keys(g).forEach(function(t) {
3167
+ return e[t] = g[t];
3168
+ });
3169
+ }), e;
3170
+ };
3171
+ })
3172
+ ),
3173
+ /***/
3174
+ 548: (
3175
+ /***/
3176
+ ((a, e, r) => {
3177
+ var l = /* @__PURE__ */ (function() {
3178
+ function t(o, s) {
3179
+ var c = [], f = !0, T = !1, d = void 0;
3180
+ try {
3181
+ for (var v = o[Symbol.iterator](), L; !(f = (L = v.next()).done) && (c.push(L.value), !(s && c.length === s)); f = !0)
3182
+ ;
3183
+ } catch (b) {
3184
+ T = !0, d = b;
3185
+ } finally {
3186
+ try {
3187
+ !f && v.return && v.return();
3188
+ } finally {
3189
+ if (T) throw d;
3190
+ }
3191
+ }
3192
+ return c;
3193
+ }
3194
+ return function(o, s) {
3195
+ if (Array.isArray(o))
3196
+ return o;
3197
+ if (Symbol.iterator in Object(o))
3198
+ return t(o, s);
3199
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
3200
+ };
3201
+ })(), i = r(140).layoutBase.LinkedList, g = {};
3202
+ g.getTopMostNodes = function(t) {
3203
+ for (var o = {}, s = 0; s < t.length; s++)
3204
+ o[t[s].id()] = !0;
3205
+ var c = t.filter(function(f, T) {
3206
+ typeof f == "number" && (f = T);
3207
+ for (var d = f.parent()[0]; d != null; ) {
3208
+ if (o[d.id()])
3209
+ return !1;
3210
+ d = d.parent()[0];
3211
+ }
3212
+ return !0;
3213
+ });
3214
+ return c;
3215
+ }, g.connectComponents = function(t, o, s, c) {
3216
+ var f = new i(), T = /* @__PURE__ */ new Set(), d = [], v = void 0, L = void 0, b = void 0, C = !1, G = 1, k = [], Y = [], K = function() {
3217
+ var it = t.collection();
3218
+ Y.push(it);
3219
+ var n = s[0], m = t.collection();
3220
+ m.merge(n).merge(n.descendants().intersection(o)), d.push(n), m.forEach(function(y) {
3221
+ f.push(y), T.add(y), it.merge(y);
3222
+ });
3223
+ for (var p = function() {
3224
+ n = f.shift();
3225
+ var R = t.collection();
3226
+ n.neighborhood().nodes().forEach(function(D) {
3227
+ o.intersection(n.edgesWith(D)).length > 0 && R.merge(D);
3228
+ });
3229
+ for (var M = 0; M < R.length; M++) {
3230
+ var S = R[M];
3231
+ if (v = s.intersection(S.union(S.ancestors())), v != null && !T.has(v[0])) {
3232
+ var W = v.union(v.descendants());
3233
+ W.forEach(function(D) {
3234
+ f.push(D), T.add(D), it.merge(D), s.has(D) && d.push(D);
3235
+ });
3236
+ }
3237
+ }
3238
+ }; f.length != 0; )
3239
+ p();
3240
+ if (it.forEach(function(y) {
3241
+ o.intersection(y.connectedEdges()).forEach(function(R) {
3242
+ it.has(R.source()) && it.has(R.target()) && it.merge(R);
3243
+ });
3244
+ }), d.length == s.length && (C = !0), !C || C && G > 1) {
3245
+ L = d[0], b = L.connectedEdges().length, d.forEach(function(y) {
3246
+ y.connectedEdges().length < b && (b = y.connectedEdges().length, L = y);
3247
+ }), k.push(L.id());
3248
+ var E = t.collection();
3249
+ E.merge(d[0]), d.forEach(function(y) {
3250
+ E.merge(y);
3251
+ }), d = [], s = s.difference(E), G++;
3252
+ }
3253
+ };
3254
+ do
3255
+ K();
3256
+ while (!C);
3257
+ return c && k.length > 0 && c.set("dummy" + (c.size + 1), k), Y;
3258
+ }, g.relocateComponent = function(t, o, s) {
3259
+ if (!s.fixedNodeConstraint) {
3260
+ var c = Number.POSITIVE_INFINITY, f = Number.NEGATIVE_INFINITY, T = Number.POSITIVE_INFINITY, d = Number.NEGATIVE_INFINITY;
3261
+ if (s.quality == "draft") {
3262
+ var v = !0, L = !1, b = void 0;
3263
+ try {
3264
+ for (var C = o.nodeIndexes[Symbol.iterator](), G; !(v = (G = C.next()).done); v = !0) {
3265
+ var k = G.value, Y = l(k, 2), K = Y[0], O = Y[1], it = s.cy.getElementById(K);
3266
+ if (it) {
3267
+ var n = it.boundingBox(), m = o.xCoords[O] - n.w / 2, p = o.xCoords[O] + n.w / 2, E = o.yCoords[O] - n.h / 2, y = o.yCoords[O] + n.h / 2;
3268
+ m < c && (c = m), p > f && (f = p), E < T && (T = E), y > d && (d = y);
3269
+ }
3270
+ }
3271
+ } catch (D) {
3272
+ L = !0, b = D;
3273
+ } finally {
3274
+ try {
3275
+ !v && C.return && C.return();
3276
+ } finally {
3277
+ if (L)
3278
+ throw b;
3279
+ }
3280
+ }
3281
+ var R = t.x - (f + c) / 2, M = t.y - (d + T) / 2;
3282
+ o.xCoords = o.xCoords.map(function(D) {
3283
+ return D + R;
3284
+ }), o.yCoords = o.yCoords.map(function(D) {
3285
+ return D + M;
3286
+ });
3287
+ } else {
3288
+ Object.keys(o).forEach(function(D) {
3289
+ var q = o[D], V = q.getRect().x, X = q.getRect().x + q.getRect().width, et = q.getRect().y, z = q.getRect().y + q.getRect().height;
3290
+ V < c && (c = V), X > f && (f = X), et < T && (T = et), z > d && (d = z);
3291
+ });
3292
+ var S = t.x - (f + c) / 2, W = t.y - (d + T) / 2;
3293
+ Object.keys(o).forEach(function(D) {
3294
+ var q = o[D];
3295
+ q.setCenter(q.getCenterX() + S, q.getCenterY() + W);
3296
+ });
3297
+ }
3298
+ }
3299
+ }, g.calcBoundingBox = function(t, o, s, c) {
3300
+ for (var f = Number.MAX_SAFE_INTEGER, T = Number.MIN_SAFE_INTEGER, d = Number.MAX_SAFE_INTEGER, v = Number.MIN_SAFE_INTEGER, L = void 0, b = void 0, C = void 0, G = void 0, k = t.descendants().not(":parent"), Y = k.length, K = 0; K < Y; K++) {
3301
+ var O = k[K];
3302
+ L = o[c.get(O.id())] - O.width() / 2, b = o[c.get(O.id())] + O.width() / 2, C = s[c.get(O.id())] - O.height() / 2, G = s[c.get(O.id())] + O.height() / 2, f > L && (f = L), T < b && (T = b), d > C && (d = C), v < G && (v = G);
3303
+ }
3304
+ var it = {};
3305
+ return it.topLeftX = f, it.topLeftY = d, it.width = T - f, it.height = v - d, it;
3306
+ }, g.calcParentsWithoutChildren = function(t, o) {
3307
+ var s = t.collection();
3308
+ return o.nodes(":parent").forEach(function(c) {
3309
+ var f = !1;
3310
+ c.children().forEach(function(T) {
3311
+ T.css("display") != "none" && (f = !0);
3312
+ }), f || s.merge(c);
3313
+ }), s;
3314
+ }, a.exports = g;
3315
+ })
3316
+ ),
3317
+ /***/
3318
+ 816: (
3319
+ /***/
3320
+ ((a, e, r) => {
3321
+ var l = r(548), i = r(140).CoSELayout, g = r(140).CoSENode, t = r(140).layoutBase.PointD, o = r(140).layoutBase.DimensionD, s = r(140).layoutBase.LayoutConstants, c = r(140).layoutBase.FDLayoutConstants, f = r(140).CoSEConstants, T = function(v, L) {
3322
+ var b = v.cy, C = v.eles, G = C.nodes(), k = C.edges(), Y = void 0, K = void 0, O = void 0, it = {};
3323
+ v.randomize && (Y = L.nodeIndexes, K = L.xCoords, O = L.yCoords);
3324
+ var n = function(D) {
3325
+ return typeof D == "function";
3326
+ }, m = function(D, q) {
3327
+ return n(D) ? D(q) : D;
3328
+ }, p = l.calcParentsWithoutChildren(b, C), E = function W(D, q, V, X) {
3329
+ for (var et = q.length, z = 0; z < et; z++) {
3330
+ var w = q[z], H = null;
3331
+ w.intersection(p).length == 0 && (H = w.children());
3332
+ var $ = void 0, _ = w.layoutDimensions({
3333
+ nodeDimensionsIncludeLabels: X.nodeDimensionsIncludeLabels
3334
+ });
3335
+ if (w.outerWidth() != null && w.outerHeight() != null)
3336
+ if (X.randomize)
3337
+ if (!w.isParent())
3338
+ $ = D.add(new g(V.graphManager, new t(K[Y.get(w.id())] - _.w / 2, O[Y.get(w.id())] - _.h / 2), new o(parseFloat(_.w), parseFloat(_.h))));
3339
+ else {
3340
+ var ht = l.calcBoundingBox(w, K, O, Y);
3341
+ w.intersection(p).length == 0 ? $ = D.add(new g(V.graphManager, new t(ht.topLeftX, ht.topLeftY), new o(ht.width, ht.height))) : $ = D.add(new g(V.graphManager, new t(ht.topLeftX, ht.topLeftY), new o(parseFloat(_.w), parseFloat(_.h))));
3342
+ }
3343
+ else
3344
+ $ = D.add(new g(V.graphManager, new t(w.position("x") - _.w / 2, w.position("y") - _.h / 2), new o(parseFloat(_.w), parseFloat(_.h))));
3345
+ else
3346
+ $ = D.add(new g(this.graphManager));
3347
+ if ($.id = w.data("id"), $.nodeRepulsion = m(X.nodeRepulsion, w), $.paddingLeft = parseInt(w.css("padding")), $.paddingTop = parseInt(w.css("padding")), $.paddingRight = parseInt(w.css("padding")), $.paddingBottom = parseInt(w.css("padding")), X.nodeDimensionsIncludeLabels && ($.labelWidth = w.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).w, $.labelHeight = w.boundingBox({ includeLabels: !0, includeNodes: !1, includeOverlays: !1 }).h, $.labelPosVertical = w.css("text-valign"), $.labelPosHorizontal = w.css("text-halign")), it[w.data("id")] = $, isNaN($.rect.x) && ($.rect.x = 0), isNaN($.rect.y) && ($.rect.y = 0), H != null && H.length > 0) {
3348
+ var Q = void 0;
3349
+ Q = V.getGraphManager().add(V.newGraph(), $), W(Q, H, V, X);
3350
+ }
3351
+ }
3352
+ }, y = function(D, q, V) {
3353
+ for (var X = 0, et = 0, z = 0; z < V.length; z++) {
3354
+ var w = V[z], H = it[w.data("source")], $ = it[w.data("target")];
3355
+ if (H && $ && H !== $ && H.getEdgesBetween($).length == 0) {
3356
+ var _ = q.add(D.newEdge(), H, $);
3357
+ _.id = w.id(), _.idealLength = m(v.idealEdgeLength, w), _.edgeElasticity = m(v.edgeElasticity, w), X += _.idealLength, et++;
3358
+ }
3359
+ }
3360
+ v.idealEdgeLength != null && (et > 0 ? f.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = X / et : n(v.idealEdgeLength) ? f.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = 50 : f.DEFAULT_EDGE_LENGTH = c.DEFAULT_EDGE_LENGTH = v.idealEdgeLength, f.MIN_REPULSION_DIST = c.MIN_REPULSION_DIST = c.DEFAULT_EDGE_LENGTH / 10, f.DEFAULT_RADIAL_SEPARATION = c.DEFAULT_EDGE_LENGTH);
3361
+ }, R = function(D, q) {
3362
+ q.fixedNodeConstraint && (D.constraints.fixedNodeConstraint = q.fixedNodeConstraint), q.alignmentConstraint && (D.constraints.alignmentConstraint = q.alignmentConstraint), q.relativePlacementConstraint && (D.constraints.relativePlacementConstraint = q.relativePlacementConstraint);
3363
+ };
3364
+ v.nestingFactor != null && (f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = v.nestingFactor), v.gravity != null && (f.DEFAULT_GRAVITY_STRENGTH = c.DEFAULT_GRAVITY_STRENGTH = v.gravity), v.numIter != null && (f.MAX_ITERATIONS = c.MAX_ITERATIONS = v.numIter), v.gravityRange != null && (f.DEFAULT_GRAVITY_RANGE_FACTOR = c.DEFAULT_GRAVITY_RANGE_FACTOR = v.gravityRange), v.gravityCompound != null && (f.DEFAULT_COMPOUND_GRAVITY_STRENGTH = c.DEFAULT_COMPOUND_GRAVITY_STRENGTH = v.gravityCompound), v.gravityRangeCompound != null && (f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = v.gravityRangeCompound), v.initialEnergyOnIncremental != null && (f.DEFAULT_COOLING_FACTOR_INCREMENTAL = c.DEFAULT_COOLING_FACTOR_INCREMENTAL = v.initialEnergyOnIncremental), v.tilingCompareBy != null && (f.TILING_COMPARE_BY = v.tilingCompareBy), v.quality == "proof" ? s.QUALITY = 2 : s.QUALITY = 0, f.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = s.NODE_DIMENSIONS_INCLUDE_LABELS = v.nodeDimensionsIncludeLabels, f.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = s.DEFAULT_INCREMENTAL = !v.randomize, f.ANIMATE = c.ANIMATE = s.ANIMATE = v.animate, f.TILE = v.tile, f.TILING_PADDING_VERTICAL = typeof v.tilingPaddingVertical == "function" ? v.tilingPaddingVertical.call() : v.tilingPaddingVertical, f.TILING_PADDING_HORIZONTAL = typeof v.tilingPaddingHorizontal == "function" ? v.tilingPaddingHorizontal.call() : v.tilingPaddingHorizontal, f.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = s.DEFAULT_INCREMENTAL = !0, f.PURE_INCREMENTAL = !v.randomize, s.DEFAULT_UNIFORM_LEAF_NODE_SIZES = v.uniformNodeDimensions, v.step == "transformed" && (f.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, f.ENFORCE_CONSTRAINTS = !1, f.APPLY_LAYOUT = !1), v.step == "enforced" && (f.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, f.ENFORCE_CONSTRAINTS = !0, f.APPLY_LAYOUT = !1), v.step == "cose" && (f.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, f.ENFORCE_CONSTRAINTS = !1, f.APPLY_LAYOUT = !0), v.step == "all" && (v.randomize ? f.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : f.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, f.ENFORCE_CONSTRAINTS = !0, f.APPLY_LAYOUT = !0), v.fixedNodeConstraint || v.alignmentConstraint || v.relativePlacementConstraint ? f.TREE_REDUCTION_ON_INCREMENTAL = !1 : f.TREE_REDUCTION_ON_INCREMENTAL = !0;
3365
+ var M = new i(), S = M.newGraphManager();
3366
+ return E(S.addRoot(), l.getTopMostNodes(G), M, v), y(M, S, k), R(M, v), M.runLayout(), it;
3367
+ };
3368
+ a.exports = { coseLayout: T };
3369
+ })
3370
+ ),
3371
+ /***/
3372
+ 212: (
3373
+ /***/
3374
+ ((a, e, r) => {
3375
+ var l = /* @__PURE__ */ (function() {
3376
+ function v(L, b) {
3377
+ for (var C = 0; C < b.length; C++) {
3378
+ var G = b[C];
3379
+ G.enumerable = G.enumerable || !1, G.configurable = !0, "value" in G && (G.writable = !0), Object.defineProperty(L, G.key, G);
3380
+ }
3381
+ }
3382
+ return function(L, b, C) {
3383
+ return b && v(L.prototype, b), C && v(L, C), L;
3384
+ };
3385
+ })();
3386
+ function i(v, L) {
3387
+ if (!(v instanceof L))
3388
+ throw new TypeError("Cannot call a class as a function");
3389
+ }
3390
+ var g = r(658), t = r(548), o = r(657), s = o.spectralLayout, c = r(816), f = c.coseLayout, T = Object.freeze({
3391
+ // 'draft', 'default' or 'proof'
3392
+ // - 'draft' only applies spectral layout
3393
+ // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)
3394
+ // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate)
3395
+ quality: "default",
3396
+ // Use random node positions at beginning of layout
3397
+ // if this is set to false, then quality option must be "proof"
3398
+ randomize: !0,
3399
+ // Whether or not to animate the layout
3400
+ animate: !0,
3401
+ // Duration of animation in ms, if enabled
3402
+ animationDuration: 1e3,
3403
+ // Easing of animation, if enabled
3404
+ animationEasing: void 0,
3405
+ // Fit the viewport to the repositioned nodes
3406
+ fit: !0,
3407
+ // Padding around layout
3408
+ padding: 30,
3409
+ // Whether to include labels in node dimensions. Valid in "proof" quality
3410
+ nodeDimensionsIncludeLabels: !1,
3411
+ // Whether or not simple nodes (non-compound nodes) are of uniform dimensions
3412
+ uniformNodeDimensions: !1,
3413
+ // Whether to pack disconnected components - valid only if randomize: true
3414
+ packComponents: !0,
3415
+ // Layout step - all, transformed, enforced, cose - for debug purpose only
3416
+ step: "all",
3417
+ /* spectral layout options */
3418
+ // False for random, true for greedy
3419
+ samplingType: !0,
3420
+ // Sample size to construct distance matrix
3421
+ sampleSize: 25,
3422
+ // Separation amount between nodes
3423
+ nodeSeparation: 75,
3424
+ // Power iteration tolerance
3425
+ piTol: 1e-7,
3426
+ /* CoSE layout options */
3427
+ // Node repulsion (non overlapping) multiplier
3428
+ nodeRepulsion: function(L) {
3429
+ return 4500;
3430
+ },
3431
+ // Ideal edge (non nested) length
3432
+ idealEdgeLength: function(L) {
3433
+ return 50;
3434
+ },
3435
+ // Divisor to compute edge forces
3436
+ edgeElasticity: function(L) {
3437
+ return 0.45;
3438
+ },
3439
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
3440
+ nestingFactor: 0.1,
3441
+ // Gravity force (constant)
3442
+ gravity: 0.25,
3443
+ // Maximum number of iterations to perform
3444
+ numIter: 2500,
3445
+ // For enabling tiling
3446
+ tile: !0,
3447
+ // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.
3448
+ // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.
3449
+ tilingCompareBy: void 0,
3450
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
3451
+ tilingPaddingVertical: 10,
3452
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
3453
+ tilingPaddingHorizontal: 10,
3454
+ // Gravity range (constant) for compounds
3455
+ gravityRangeCompound: 1.5,
3456
+ // Gravity force (constant) for compounds
3457
+ gravityCompound: 1,
3458
+ // Gravity range (constant)
3459
+ gravityRange: 3.8,
3460
+ // Initial cooling factor for incremental layout
3461
+ initialEnergyOnIncremental: 0.3,
3462
+ /* constraint options */
3463
+ // Fix required nodes to predefined positions
3464
+ // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]
3465
+ fixedNodeConstraint: void 0,
3466
+ // Align required nodes in vertical/horizontal direction
3467
+ // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}
3468
+ alignmentConstraint: void 0,
3469
+ // Place two nodes relatively in vertical/horizontal direction
3470
+ // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]
3471
+ relativePlacementConstraint: void 0,
3472
+ /* layout event callbacks */
3473
+ ready: function() {
3474
+ },
3475
+ // on layoutready
3476
+ stop: function() {
3477
+ }
3478
+ // on layoutstop
3479
+ }), d = (function() {
3480
+ function v(L) {
3481
+ i(this, v), this.options = g({}, T, L);
3482
+ }
3483
+ return l(v, [{
3484
+ key: "run",
3485
+ value: function() {
3486
+ var b = this, C = this.options, G = C.cy, k = C.eles, Y = [], K = [], O = void 0, it = [];
3487
+ C.fixedNodeConstraint && (!Array.isArray(C.fixedNodeConstraint) || C.fixedNodeConstraint.length == 0) && (C.fixedNodeConstraint = void 0), C.alignmentConstraint && (C.alignmentConstraint.vertical && (!Array.isArray(C.alignmentConstraint.vertical) || C.alignmentConstraint.vertical.length == 0) && (C.alignmentConstraint.vertical = void 0), C.alignmentConstraint.horizontal && (!Array.isArray(C.alignmentConstraint.horizontal) || C.alignmentConstraint.horizontal.length == 0) && (C.alignmentConstraint.horizontal = void 0)), C.relativePlacementConstraint && (!Array.isArray(C.relativePlacementConstraint) || C.relativePlacementConstraint.length == 0) && (C.relativePlacementConstraint = void 0);
3488
+ var n = C.fixedNodeConstraint || C.alignmentConstraint || C.relativePlacementConstraint;
3489
+ n && (C.tile = !1, C.packComponents = !1);
3490
+ var m = void 0, p = !1;
3491
+ if (G.layoutUtilities && C.packComponents && (m = G.layoutUtilities("get"), m || (m = G.layoutUtilities()), p = !0), k.nodes().length > 0)
3492
+ if (p) {
3493
+ var R = t.getTopMostNodes(C.eles.nodes());
3494
+ if (O = t.connectComponents(G, C.eles, R), O.forEach(function(vt) {
3495
+ var rt = vt.boundingBox();
3496
+ it.push({ x: rt.x1 + rt.w / 2, y: rt.y1 + rt.h / 2 });
3497
+ }), C.randomize && O.forEach(function(vt) {
3498
+ C.eles = vt, Y.push(s(C));
3499
+ }), C.quality == "default" || C.quality == "proof") {
3500
+ var M = G.collection();
3501
+ if (C.tile) {
3502
+ var S = /* @__PURE__ */ new Map(), W = [], D = [], q = 0, V = { nodeIndexes: S, xCoords: W, yCoords: D }, X = [];
3503
+ if (O.forEach(function(vt, rt) {
3504
+ vt.edges().length == 0 && (vt.nodes().forEach(function(gt, mt) {
3505
+ M.merge(vt.nodes()[mt]), gt.isParent() || (V.nodeIndexes.set(vt.nodes()[mt].id(), q++), V.xCoords.push(vt.nodes()[0].position().x), V.yCoords.push(vt.nodes()[0].position().y));
3506
+ }), X.push(rt));
3507
+ }), M.length > 1) {
3508
+ var et = M.boundingBox();
3509
+ it.push({ x: et.x1 + et.w / 2, y: et.y1 + et.h / 2 }), O.push(M), Y.push(V);
3510
+ for (var z = X.length - 1; z >= 0; z--)
3511
+ O.splice(X[z], 1), Y.splice(X[z], 1), it.splice(X[z], 1);
3512
+ }
3513
+ }
3514
+ O.forEach(function(vt, rt) {
3515
+ C.eles = vt, K.push(f(C, Y[rt])), t.relocateComponent(it[rt], K[rt], C);
3516
+ });
3517
+ } else
3518
+ O.forEach(function(vt, rt) {
3519
+ t.relocateComponent(it[rt], Y[rt], C);
3520
+ });
3521
+ var w = /* @__PURE__ */ new Set();
3522
+ if (O.length > 1) {
3523
+ var H = [], $ = k.filter(function(vt) {
3524
+ return vt.css("display") == "none";
3525
+ });
3526
+ O.forEach(function(vt, rt) {
3527
+ var gt = void 0;
3528
+ if (C.quality == "draft" && (gt = Y[rt].nodeIndexes), vt.nodes().not($).length > 0) {
3529
+ var mt = {};
3530
+ mt.edges = [], mt.nodes = [];
3531
+ var At = void 0;
3532
+ vt.nodes().not($).forEach(function(Ot) {
3533
+ if (C.quality == "draft")
3534
+ if (!Ot.isParent())
3535
+ At = gt.get(Ot.id()), mt.nodes.push({ x: Y[rt].xCoords[At] - Ot.boundingbox().w / 2, y: Y[rt].yCoords[At] - Ot.boundingbox().h / 2, width: Ot.boundingbox().w, height: Ot.boundingbox().h });
3536
+ else {
3537
+ var Et = t.calcBoundingBox(Ot, Y[rt].xCoords, Y[rt].yCoords, gt);
3538
+ mt.nodes.push({ x: Et.topLeftX, y: Et.topLeftY, width: Et.width, height: Et.height });
3539
+ }
3540
+ else
3541
+ K[rt][Ot.id()] && mt.nodes.push({ x: K[rt][Ot.id()].getLeft(), y: K[rt][Ot.id()].getTop(), width: K[rt][Ot.id()].getWidth(), height: K[rt][Ot.id()].getHeight() });
3542
+ }), vt.edges().forEach(function(Ot) {
3543
+ var Et = Ot.source(), Dt = Ot.target();
3544
+ if (Et.css("display") != "none" && Dt.css("display") != "none")
3545
+ if (C.quality == "draft") {
3546
+ var Rt = gt.get(Et.id()), Ht = gt.get(Dt.id()), Ut = [], Pt = [];
3547
+ if (Et.isParent()) {
3548
+ var Ft = t.calcBoundingBox(Et, Y[rt].xCoords, Y[rt].yCoords, gt);
3549
+ Ut.push(Ft.topLeftX + Ft.width / 2), Ut.push(Ft.topLeftY + Ft.height / 2);
3550
+ } else
3551
+ Ut.push(Y[rt].xCoords[Rt]), Ut.push(Y[rt].yCoords[Rt]);
3552
+ if (Dt.isParent()) {
3553
+ var Yt = t.calcBoundingBox(Dt, Y[rt].xCoords, Y[rt].yCoords, gt);
3554
+ Pt.push(Yt.topLeftX + Yt.width / 2), Pt.push(Yt.topLeftY + Yt.height / 2);
3555
+ } else
3556
+ Pt.push(Y[rt].xCoords[Ht]), Pt.push(Y[rt].yCoords[Ht]);
3557
+ mt.edges.push({ startX: Ut[0], startY: Ut[1], endX: Pt[0], endY: Pt[1] });
3558
+ } else
3559
+ K[rt][Et.id()] && K[rt][Dt.id()] && mt.edges.push({ startX: K[rt][Et.id()].getCenterX(), startY: K[rt][Et.id()].getCenterY(), endX: K[rt][Dt.id()].getCenterX(), endY: K[rt][Dt.id()].getCenterY() });
3560
+ }), mt.nodes.length > 0 && (H.push(mt), w.add(rt));
3561
+ }
3562
+ });
3563
+ var _ = m.packComponents(H, C.randomize).shifts;
3564
+ if (C.quality == "draft")
3565
+ Y.forEach(function(vt, rt) {
3566
+ var gt = vt.xCoords.map(function(At) {
3567
+ return At + _[rt].dx;
3568
+ }), mt = vt.yCoords.map(function(At) {
3569
+ return At + _[rt].dy;
3570
+ });
3571
+ vt.xCoords = gt, vt.yCoords = mt;
3572
+ });
3573
+ else {
3574
+ var ht = 0;
3575
+ w.forEach(function(vt) {
3576
+ Object.keys(K[vt]).forEach(function(rt) {
3577
+ var gt = K[vt][rt];
3578
+ gt.setCenter(gt.getCenterX() + _[ht].dx, gt.getCenterY() + _[ht].dy);
3579
+ }), ht++;
3580
+ });
3581
+ }
3582
+ }
3583
+ } else {
3584
+ var E = C.eles.boundingBox();
3585
+ if (it.push({ x: E.x1 + E.w / 2, y: E.y1 + E.h / 2 }), C.randomize) {
3586
+ var y = s(C);
3587
+ Y.push(y);
3588
+ }
3589
+ C.quality == "default" || C.quality == "proof" ? (K.push(f(C, Y[0])), t.relocateComponent(it[0], K[0], C)) : t.relocateComponent(it[0], Y[0], C);
3590
+ }
3591
+ var Q = function(rt, gt) {
3592
+ if (C.quality == "default" || C.quality == "proof") {
3593
+ typeof rt == "number" && (rt = gt);
3594
+ var mt = void 0, At = void 0, Ot = rt.data("id");
3595
+ return K.forEach(function(Dt) {
3596
+ Ot in Dt && (mt = { x: Dt[Ot].getRect().getCenterX(), y: Dt[Ot].getRect().getCenterY() }, At = Dt[Ot]);
3597
+ }), C.nodeDimensionsIncludeLabels && (At.labelWidth && (At.labelPosHorizontal == "left" ? mt.x += At.labelWidth / 2 : At.labelPosHorizontal == "right" && (mt.x -= At.labelWidth / 2)), At.labelHeight && (At.labelPosVertical == "top" ? mt.y += At.labelHeight / 2 : At.labelPosVertical == "bottom" && (mt.y -= At.labelHeight / 2))), mt == null && (mt = { x: rt.position("x"), y: rt.position("y") }), {
3598
+ x: mt.x,
3599
+ y: mt.y
3600
+ };
3601
+ } else {
3602
+ var Et = void 0;
3603
+ return Y.forEach(function(Dt) {
3604
+ var Rt = Dt.nodeIndexes.get(rt.id());
3605
+ Rt != null && (Et = { x: Dt.xCoords[Rt], y: Dt.yCoords[Rt] });
3606
+ }), Et == null && (Et = { x: rt.position("x"), y: rt.position("y") }), {
3607
+ x: Et.x,
3608
+ y: Et.y
3609
+ };
3610
+ }
3611
+ };
3612
+ if (C.quality == "default" || C.quality == "proof" || C.randomize) {
3613
+ var It = t.calcParentsWithoutChildren(G, k), Nt = k.filter(function(vt) {
3614
+ return vt.css("display") == "none";
3615
+ });
3616
+ C.eles = k.not(Nt), k.nodes().not(":parent").not(Nt).layoutPositions(b, C, Q), It.length > 0 && It.forEach(function(vt) {
3617
+ vt.position(Q(vt));
3618
+ });
3619
+ } else
3620
+ console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
3621
+ }
3622
+ }]), v;
3623
+ })();
3624
+ a.exports = d;
3625
+ })
3626
+ ),
3627
+ /***/
3628
+ 657: (
3629
+ /***/
3630
+ ((a, e, r) => {
3631
+ var l = r(548), i = r(140).layoutBase.Matrix, g = r(140).layoutBase.SVD, t = function(s) {
3632
+ var c = s.cy, f = s.eles, T = f.nodes(), d = f.nodes(":parent"), v = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), C = [], G = [], k = [], Y = [], K = [], O = [], it = [], n = [], m = void 0, p = 1e8, E = 1e-9, y = s.piTol, R = s.samplingType, M = s.nodeSeparation, S = void 0, W = function() {
3633
+ for (var U = 0, B = 0, J = !1; B < S; ) {
3634
+ U = Math.floor(Math.random() * m), J = !1;
3635
+ for (var Z = 0; Z < B; Z++)
3636
+ if (Y[Z] == U) {
3637
+ J = !0;
3638
+ break;
3639
+ }
3640
+ if (!J)
3641
+ Y[B] = U, B++;
3642
+ else
3643
+ continue;
3644
+ }
3645
+ }, D = function(U, B, J) {
3646
+ for (var Z = [], at = 0, ct = 0, nt = 0, tt = void 0, j = [], ut = 0, Mt = 1, pt = 0; pt < m; pt++)
3647
+ j[pt] = p;
3648
+ for (Z[ct] = U, j[U] = 0; ct >= at; ) {
3649
+ nt = Z[at++];
3650
+ for (var xt = C[nt], lt = 0; lt < xt.length; lt++)
3651
+ tt = L.get(xt[lt]), j[tt] == p && (j[tt] = j[nt] + 1, Z[++ct] = tt);
3652
+ O[nt][B] = j[nt] * M;
3653
+ }
3654
+ if (J) {
3655
+ for (var ot = 0; ot < m; ot++)
3656
+ O[ot][B] < K[ot] && (K[ot] = O[ot][B]);
3657
+ for (var Lt = 0; Lt < m; Lt++)
3658
+ K[Lt] > ut && (ut = K[Lt], Mt = Lt);
3659
+ }
3660
+ return Mt;
3661
+ }, q = function(U) {
3662
+ var B = void 0;
3663
+ if (U) {
3664
+ B = Math.floor(Math.random() * m);
3665
+ for (var Z = 0; Z < m; Z++)
3666
+ K[Z] = p;
3667
+ for (var at = 0; at < S; at++)
3668
+ Y[at] = B, B = D(B, at, U);
3669
+ } else {
3670
+ W();
3671
+ for (var J = 0; J < S; J++)
3672
+ D(Y[J], J, U);
3673
+ }
3674
+ for (var ct = 0; ct < m; ct++)
3675
+ for (var nt = 0; nt < S; nt++)
3676
+ O[ct][nt] *= O[ct][nt];
3677
+ for (var tt = 0; tt < S; tt++)
3678
+ it[tt] = [];
3679
+ for (var j = 0; j < S; j++)
3680
+ for (var ut = 0; ut < S; ut++)
3681
+ it[j][ut] = O[Y[ut]][j];
3682
+ }, V = function() {
3683
+ for (var U = g.svd(it), B = U.S, J = U.U, Z = U.V, at = B[0] * B[0] * B[0], ct = [], nt = 0; nt < S; nt++) {
3684
+ ct[nt] = [];
3685
+ for (var tt = 0; tt < S; tt++)
3686
+ ct[nt][tt] = 0, nt == tt && (ct[nt][tt] = B[nt] / (B[nt] * B[nt] + at / (B[nt] * B[nt])));
3687
+ }
3688
+ n = i.multMat(i.multMat(Z, ct), i.transpose(J));
3689
+ }, X = function() {
3690
+ for (var U = void 0, B = void 0, J = [], Z = [], at = [], ct = [], nt = 0; nt < m; nt++)
3691
+ J[nt] = Math.random(), Z[nt] = Math.random();
3692
+ J = i.normalize(J), Z = i.normalize(Z);
3693
+ for (var tt = E, j = E, ut = void 0; ; ) {
3694
+ for (var Mt = 0; Mt < m; Mt++)
3695
+ at[Mt] = J[Mt];
3696
+ if (J = i.multGamma(i.multL(i.multGamma(at), O, n)), U = i.dotProduct(at, J), J = i.normalize(J), tt = i.dotProduct(at, J), ut = Math.abs(tt / j), ut <= 1 + y && ut >= 1)
3697
+ break;
3698
+ j = tt;
3699
+ }
3700
+ for (var pt = 0; pt < m; pt++)
3701
+ at[pt] = J[pt];
3702
+ for (j = E; ; ) {
3703
+ for (var xt = 0; xt < m; xt++)
3704
+ ct[xt] = Z[xt];
3705
+ if (ct = i.minusOp(ct, i.multCons(at, i.dotProduct(at, ct))), Z = i.multGamma(i.multL(i.multGamma(ct), O, n)), B = i.dotProduct(ct, Z), Z = i.normalize(Z), tt = i.dotProduct(ct, Z), ut = Math.abs(tt / j), ut <= 1 + y && ut >= 1)
3706
+ break;
3707
+ j = tt;
3708
+ }
3709
+ for (var lt = 0; lt < m; lt++)
3710
+ ct[lt] = Z[lt];
3711
+ G = i.multCons(at, Math.sqrt(Math.abs(U))), k = i.multCons(ct, Math.sqrt(Math.abs(B)));
3712
+ };
3713
+ l.connectComponents(c, f, l.getTopMostNodes(T), v), d.forEach(function(F) {
3714
+ l.connectComponents(c, f, l.getTopMostNodes(F.descendants().intersection(f)), v);
3715
+ });
3716
+ for (var et = 0, z = 0; z < T.length; z++)
3717
+ T[z].isParent() || L.set(T[z].id(), et++);
3718
+ var w = !0, H = !1, $ = void 0;
3719
+ try {
3720
+ for (var _ = v.keys()[Symbol.iterator](), ht; !(w = (ht = _.next()).done); w = !0) {
3721
+ var Q = ht.value;
3722
+ L.set(Q, et++);
3723
+ }
3724
+ } catch (F) {
3725
+ H = !0, $ = F;
3726
+ } finally {
3727
+ try {
3728
+ !w && _.return && _.return();
3729
+ } finally {
3730
+ if (H)
3731
+ throw $;
3732
+ }
3733
+ }
3734
+ for (var It = 0; It < L.size; It++)
3735
+ C[It] = [];
3736
+ d.forEach(function(F) {
3737
+ for (var U = F.children().intersection(f); U.nodes(":childless").length == 0; )
3738
+ U = U.nodes()[0].children().intersection(f);
3739
+ var B = 0, J = U.nodes(":childless")[0].connectedEdges().length;
3740
+ U.nodes(":childless").forEach(function(Z, at) {
3741
+ Z.connectedEdges().length < J && (J = Z.connectedEdges().length, B = at);
3742
+ }), b.set(F.id(), U.nodes(":childless")[B].id());
3743
+ }), T.forEach(function(F) {
3744
+ var U = void 0;
3745
+ F.isParent() ? U = L.get(b.get(F.id())) : U = L.get(F.id()), F.neighborhood().nodes().forEach(function(B) {
3746
+ f.intersection(F.edgesWith(B)).length > 0 && (B.isParent() ? C[U].push(b.get(B.id())) : C[U].push(B.id()));
3747
+ });
3748
+ });
3749
+ var Nt = function(U) {
3750
+ var B = L.get(U), J = void 0;
3751
+ v.get(U).forEach(function(Z) {
3752
+ c.getElementById(Z).isParent() ? J = b.get(Z) : J = Z, C[B].push(J), C[L.get(J)].push(U);
3753
+ });
3754
+ }, vt = !0, rt = !1, gt = void 0;
3755
+ try {
3756
+ for (var mt = v.keys()[Symbol.iterator](), At; !(vt = (At = mt.next()).done); vt = !0) {
3757
+ var Ot = At.value;
3758
+ Nt(Ot);
3759
+ }
3760
+ } catch (F) {
3761
+ rt = !0, gt = F;
3762
+ } finally {
3763
+ try {
3764
+ !vt && mt.return && mt.return();
3765
+ } finally {
3766
+ if (rt)
3767
+ throw gt;
3768
+ }
3769
+ }
3770
+ m = L.size;
3771
+ var Et = void 0;
3772
+ if (m > 2) {
3773
+ S = m < s.sampleSize ? m : s.sampleSize;
3774
+ for (var Dt = 0; Dt < m; Dt++)
3775
+ O[Dt] = [];
3776
+ for (var Rt = 0; Rt < S; Rt++)
3777
+ n[Rt] = [];
3778
+ return s.quality == "draft" || s.step == "all" ? (q(R), V(), X(), Et = { nodeIndexes: L, xCoords: G, yCoords: k }) : (L.forEach(function(F, U) {
3779
+ G.push(c.getElementById(U).position("x")), k.push(c.getElementById(U).position("y"));
3780
+ }), Et = { nodeIndexes: L, xCoords: G, yCoords: k }), Et;
3781
+ } else {
3782
+ var Ht = L.keys(), Ut = c.getElementById(Ht.next().value), Pt = Ut.position(), Ft = Ut.outerWidth();
3783
+ if (G.push(Pt.x), k.push(Pt.y), m == 2) {
3784
+ var Yt = c.getElementById(Ht.next().value), Vt = Yt.outerWidth();
3785
+ G.push(Pt.x + Ft / 2 + Vt / 2 + s.idealEdgeLength), k.push(Pt.y);
3786
+ }
3787
+ return Et = { nodeIndexes: L, xCoords: G, yCoords: k }, Et;
3788
+ }
3789
+ };
3790
+ a.exports = { spectralLayout: t };
3791
+ })
3792
+ ),
3793
+ /***/
3794
+ 579: (
3795
+ /***/
3796
+ ((a, e, r) => {
3797
+ var l = r(212), i = function(t) {
3798
+ t && t("layout", "fcose", l);
3799
+ };
3800
+ typeof cytoscape < "u" && i(cytoscape), a.exports = i;
3801
+ })
3802
+ ),
3803
+ /***/
3804
+ 140: (
3805
+ /***/
3806
+ ((a) => {
3807
+ a.exports = A;
3808
+ })
3809
+ )
3810
+ /******/
3811
+ }, N = {};
3812
+ function u(a) {
3813
+ var e = N[a];
3814
+ if (e !== void 0)
3815
+ return e.exports;
3816
+ var r = N[a] = {
3817
+ /******/
3818
+ // no module.id needed
3819
+ /******/
3820
+ // no module.loaded needed
3821
+ /******/
3822
+ exports: {}
3823
+ /******/
3824
+ };
3825
+ return P[a](r, r.exports, u), r.exports;
3826
+ }
3827
+ var h = u(579);
3828
+ return h;
3829
+ })()
3830
+ );
3831
+ });
3832
+ })(he)), he.exports;
3833
+ }
3834
+ var Er = /* @__PURE__ */ yr();
3835
+ const mr = /* @__PURE__ */ cr(Er);
3836
+ var xe = {
3837
+ L: "left",
3838
+ R: "right",
3839
+ T: "top",
3840
+ B: "bottom"
3841
+ }, Ie = {
3842
+ L: /* @__PURE__ */ dt((I) => `${I},${I / 2} 0,${I} 0,0`, "L"),
3843
+ R: /* @__PURE__ */ dt((I) => `0,${I / 2} ${I},0 ${I},${I}`, "R"),
3844
+ T: /* @__PURE__ */ dt((I) => `0,0 ${I},0 ${I / 2},${I}`, "T"),
3845
+ B: /* @__PURE__ */ dt((I) => `${I / 2},0 ${I},${I} 0,${I}`, "B")
3846
+ }, se = {
3847
+ L: /* @__PURE__ */ dt((I, x) => I - x + 2, "L"),
3848
+ R: /* @__PURE__ */ dt((I, x) => I - 2, "R"),
3849
+ T: /* @__PURE__ */ dt((I, x) => I - x + 2, "T"),
3850
+ B: /* @__PURE__ */ dt((I, x) => I - 2, "B")
3851
+ }, Tr = /* @__PURE__ */ dt(function(I) {
3852
+ return Wt(I) ? I === "L" ? "R" : "L" : I === "T" ? "B" : "T";
3853
+ }, "getOppositeArchitectureDirection"), Re = /* @__PURE__ */ dt(function(I) {
3854
+ const x = I;
3855
+ return x === "L" || x === "R" || x === "T" || x === "B";
3856
+ }, "isArchitectureDirection"), Wt = /* @__PURE__ */ dt(function(I) {
3857
+ const x = I;
3858
+ return x === "L" || x === "R";
3859
+ }, "isArchitectureDirectionX"), qt = /* @__PURE__ */ dt(function(I) {
3860
+ const x = I;
3861
+ return x === "T" || x === "B";
3862
+ }, "isArchitectureDirectionY"), Te = /* @__PURE__ */ dt(function(I, x) {
3863
+ const A = Wt(I) && qt(x), P = qt(I) && Wt(x);
3864
+ return A || P;
3865
+ }, "isArchitectureDirectionXY"), Nr = /* @__PURE__ */ dt(function(I) {
3866
+ const x = I[0], A = I[1], P = Wt(x) && qt(A), N = qt(x) && Wt(A);
3867
+ return P || N;
3868
+ }, "isArchitecturePairXY"), Lr = /* @__PURE__ */ dt(function(I) {
3869
+ return I !== "LL" && I !== "RR" && I !== "TT" && I !== "BB";
3870
+ }, "isValidArchitectureDirectionPair"), ye = /* @__PURE__ */ dt(function(I, x) {
3871
+ const A = `${I}${x}`;
3872
+ return Lr(A) ? A : void 0;
3873
+ }, "getArchitectureDirectionPair"), Cr = /* @__PURE__ */ dt(function([I, x], A) {
3874
+ const P = A[0], N = A[1];
3875
+ return Wt(P) ? qt(N) ? [I + (P === "L" ? -1 : 1), x + (N === "T" ? 1 : -1)] : [I + (P === "L" ? -1 : 1), x] : Wt(N) ? [I + (N === "L" ? 1 : -1), x + (P === "T" ? 1 : -1)] : [I, x + (P === "T" ? 1 : -1)];
3876
+ }, "shiftPositionByArchitectureDirectionPair"), Ar = /* @__PURE__ */ dt(function(I) {
3877
+ return I === "LT" || I === "TL" ? [1, 1] : I === "BL" || I === "LB" ? [1, -1] : I === "BR" || I === "RB" ? [-1, -1] : [-1, 1];
3878
+ }, "getArchitectureDirectionXYFactors"), Mr = /* @__PURE__ */ dt(function(I, x) {
3879
+ return Te(I, x) ? "bend" : Wt(I) ? "horizontal" : "vertical";
3880
+ }, "getArchitectureDirectionAlignment"), wr = /* @__PURE__ */ dt(function(I) {
3881
+ return I.type === "service";
3882
+ }, "isArchitectureService"), Or = /* @__PURE__ */ dt(function(I) {
3883
+ return I.type === "junction";
3884
+ }, "isArchitectureJunction"), be = /* @__PURE__ */ dt((I) => I.data(), "edgeData"), ie = /* @__PURE__ */ dt((I) => I.data(), "nodeData"), Dr = ir.architecture, ae, Pe = (ae = class {
3885
+ constructor() {
3886
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.setAccTitle = qe, this.getAccTitle = Qe, this.setDiagramTitle = Je, this.getDiagramTitle = Ke, this.getAccDescription = je, this.setAccDescription = _e, this.clear();
3887
+ }
3888
+ clear() {
3889
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, tr();
3890
+ }
3891
+ addService({
3892
+ id: x,
3893
+ icon: A,
3894
+ in: P,
3895
+ title: N,
3896
+ iconText: u
3897
+ }) {
3898
+ if (this.registeredIds[x] !== void 0)
3899
+ throw new Error(
3900
+ `The service id [${x}] is already in use by another ${this.registeredIds[x]}`
3901
+ );
3902
+ if (P !== void 0) {
3903
+ if (x === P)
3904
+ throw new Error(`The service [${x}] cannot be placed within itself`);
3905
+ if (this.registeredIds[P] === void 0)
3906
+ throw new Error(
3907
+ `The service [${x}]'s parent does not exist. Please make sure the parent is created before this service`
3908
+ );
3909
+ if (this.registeredIds[P] === "node")
3910
+ throw new Error(`The service [${x}]'s parent is not a group`);
3911
+ }
3912
+ this.registeredIds[x] = "node", this.nodes[x] = {
3913
+ id: x,
3914
+ type: "service",
3915
+ icon: A,
3916
+ iconText: u,
3917
+ title: N,
3918
+ edges: [],
3919
+ in: P
3920
+ };
3921
+ }
3922
+ getServices() {
3923
+ return Object.values(this.nodes).filter(wr);
3924
+ }
3925
+ addJunction({ id: x, in: A }) {
3926
+ this.registeredIds[x] = "node", this.nodes[x] = {
3927
+ id: x,
3928
+ type: "junction",
3929
+ edges: [],
3930
+ in: A
3931
+ };
3932
+ }
3933
+ getJunctions() {
3934
+ return Object.values(this.nodes).filter(Or);
3935
+ }
3936
+ getNodes() {
3937
+ return Object.values(this.nodes);
3938
+ }
3939
+ getNode(x) {
3940
+ return this.nodes[x] ?? null;
3941
+ }
3942
+ addGroup({ id: x, icon: A, in: P, title: N }) {
3943
+ if (this.registeredIds?.[x] !== void 0)
3944
+ throw new Error(
3945
+ `The group id [${x}] is already in use by another ${this.registeredIds[x]}`
3946
+ );
3947
+ if (P !== void 0) {
3948
+ if (x === P)
3949
+ throw new Error(`The group [${x}] cannot be placed within itself`);
3950
+ if (this.registeredIds?.[P] === void 0)
3951
+ throw new Error(
3952
+ `The group [${x}]'s parent does not exist. Please make sure the parent is created before this group`
3953
+ );
3954
+ if (this.registeredIds?.[P] === "node")
3955
+ throw new Error(`The group [${x}]'s parent is not a group`);
3956
+ }
3957
+ this.registeredIds[x] = "group", this.groups[x] = {
3958
+ id: x,
3959
+ icon: A,
3960
+ title: N,
3961
+ in: P
3962
+ };
3963
+ }
3964
+ getGroups() {
3965
+ return Object.values(this.groups);
3966
+ }
3967
+ addEdge({
3968
+ lhsId: x,
3969
+ rhsId: A,
3970
+ lhsDir: P,
3971
+ rhsDir: N,
3972
+ lhsInto: u,
3973
+ rhsInto: h,
3974
+ lhsGroup: a,
3975
+ rhsGroup: e,
3976
+ title: r
3977
+ }) {
3978
+ if (!Re(P))
3979
+ throw new Error(
3980
+ `Invalid direction given for left hand side of edge ${x}--${A}. Expected (L,R,T,B) got ${String(P)}`
3981
+ );
3982
+ if (!Re(N))
3983
+ throw new Error(
3984
+ `Invalid direction given for right hand side of edge ${x}--${A}. Expected (L,R,T,B) got ${String(N)}`
3985
+ );
3986
+ if (this.nodes[x] === void 0 && this.groups[x] === void 0)
3987
+ throw new Error(
3988
+ `The left-hand id [${x}] does not yet exist. Please create the service/group before declaring an edge to it.`
3989
+ );
3990
+ if (this.nodes[A] === void 0 && this.groups[A] === void 0)
3991
+ throw new Error(
3992
+ `The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`
3993
+ );
3994
+ const l = this.nodes[x].in, i = this.nodes[A].in;
3995
+ if (a && l && i && l == i)
3996
+ throw new Error(
3997
+ `The left-hand id [${x}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
3998
+ );
3999
+ if (e && l && i && l == i)
4000
+ throw new Error(
4001
+ `The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`
4002
+ );
4003
+ const g = {
4004
+ lhsId: x,
4005
+ lhsDir: P,
4006
+ lhsInto: u,
4007
+ lhsGroup: a,
4008
+ rhsId: A,
4009
+ rhsDir: N,
4010
+ rhsInto: h,
4011
+ rhsGroup: e,
4012
+ title: r
4013
+ };
4014
+ this.edges.push(g), this.nodes[x] && this.nodes[A] && (this.nodes[x].edges.push(this.edges[this.edges.length - 1]), this.nodes[A].edges.push(this.edges[this.edges.length - 1]));
4015
+ }
4016
+ getEdges() {
4017
+ return this.edges;
4018
+ }
4019
+ /**
4020
+ * Returns the current diagram's adjacency list, spatial map, & group alignments.
4021
+ * If they have not been created, run the algorithms to generate them.
4022
+ * @returns
4023
+ */
4024
+ getDataStructures() {
4025
+ if (this.dataStructures === void 0) {
4026
+ const x = {}, A = Object.entries(this.nodes).reduce((e, [r, l]) => (e[r] = l.edges.reduce((i, g) => {
4027
+ const t = this.getNode(g.lhsId)?.in, o = this.getNode(g.rhsId)?.in;
4028
+ if (t && o && t !== o) {
4029
+ const s = Mr(g.lhsDir, g.rhsDir);
4030
+ s !== "bend" && (x[t] ??= {}, x[t][o] = s, x[o] ??= {}, x[o][t] = s);
4031
+ }
4032
+ if (g.lhsId === r) {
4033
+ const s = ye(g.lhsDir, g.rhsDir);
4034
+ s && (i[s] = g.rhsId);
4035
+ } else {
4036
+ const s = ye(g.rhsDir, g.lhsDir);
4037
+ s && (i[s] = g.lhsId);
4038
+ }
4039
+ return i;
4040
+ }, {}), e), {}), P = Object.keys(A)[0], N = { [P]: 1 }, u = Object.keys(A).reduce(
4041
+ (e, r) => r === P ? e : { ...e, [r]: 1 },
4042
+ {}
4043
+ ), h = /* @__PURE__ */ dt((e) => {
4044
+ const r = { [e]: [0, 0] }, l = [e];
4045
+ for (; l.length > 0; ) {
4046
+ const i = l.shift();
4047
+ if (i) {
4048
+ N[i] = 1, delete u[i];
4049
+ const g = A[i], [t, o] = r[i];
4050
+ Object.entries(g).forEach(([s, c]) => {
4051
+ N[c] || (r[c] = Cr(
4052
+ [t, o],
4053
+ s
4054
+ ), l.push(c));
4055
+ });
4056
+ }
4057
+ }
4058
+ return r;
4059
+ }, "BFS"), a = [h(P)];
4060
+ for (; Object.keys(u).length > 0; )
4061
+ a.push(h(Object.keys(u)[0]));
4062
+ this.dataStructures = {
4063
+ adjList: A,
4064
+ spatialMaps: a,
4065
+ groupAlignments: x
4066
+ };
4067
+ }
4068
+ return this.dataStructures;
4069
+ }
4070
+ setElementForId(x, A) {
4071
+ this.elements[x] = A;
4072
+ }
4073
+ getElementById(x) {
4074
+ return this.elements[x];
4075
+ }
4076
+ getConfig() {
4077
+ return er({
4078
+ ...Dr,
4079
+ ...rr().architecture
4080
+ });
4081
+ }
4082
+ getConfigField(x) {
4083
+ return this.getConfig()[x];
4084
+ }
4085
+ }, dt(ae, "ArchitectureDB"), ae), xr = /* @__PURE__ */ dt((I, x) => {
4086
+ lr(I, x), I.groups.map((A) => x.addGroup(A)), I.services.map((A) => x.addService({ ...A, type: "service" })), I.junctions.map((A) => x.addJunction({ ...A, type: "junction" })), I.edges.map((A) => x.addEdge(A));
4087
+ }, "populateDb"), Ge = {
4088
+ parser: {
4089
+ // @ts-expect-error - ArchitectureDB is not assignable to DiagramDB
4090
+ yy: void 0
4091
+ },
4092
+ parse: /* @__PURE__ */ dt(async (I) => {
4093
+ const x = await fr("architecture", I);
4094
+ Se.debug(x);
4095
+ const A = Ge.parser?.yy;
4096
+ if (!(A instanceof Pe))
4097
+ throw new Error(
4098
+ "parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
4099
+ );
4100
+ xr(x, A);
4101
+ }, "parse")
4102
+ }, Ir = /* @__PURE__ */ dt((I) => `
4103
+ .edge {
4104
+ stroke-width: ${I.archEdgeWidth};
4105
+ stroke: ${I.archEdgeColor};
4106
+ fill: none;
4107
+ }
4108
+
4109
+ .arrow {
4110
+ fill: ${I.archEdgeArrowColor};
4111
+ }
4112
+
4113
+ .node-bkg {
4114
+ fill: none;
4115
+ stroke: ${I.archGroupBorderColor};
4116
+ stroke-width: ${I.archGroupBorderWidth};
4117
+ stroke-dasharray: 8;
4118
+ }
4119
+ .node-icon-text {
4120
+ display: flex;
4121
+ align-items: center;
4122
+ }
4123
+
4124
+ .node-icon-text > div {
4125
+ color: #fff;
4126
+ margin: 1px;
4127
+ height: fit-content;
4128
+ text-align: center;
4129
+ overflow: hidden;
4130
+ display: -webkit-box;
4131
+ -webkit-box-orient: vertical;
4132
+ }
4133
+ `, "getStyles"), Rr = Ir, re = /* @__PURE__ */ dt((I) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${I}</g>`, "wrapIcon"), ne = {
4134
+ prefix: "mermaid-architecture",
4135
+ height: 80,
4136
+ width: 80,
4137
+ icons: {
4138
+ database: {
4139
+ body: re(
4140
+ '<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>'
4141
+ )
4142
+ },
4143
+ server: {
4144
+ body: re(
4145
+ '<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>'
4146
+ )
4147
+ },
4148
+ disk: {
4149
+ body: re(
4150
+ '<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>'
4151
+ )
4152
+ },
4153
+ internet: {
4154
+ body: re(
4155
+ '<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>'
4156
+ )
4157
+ },
4158
+ cloud: {
4159
+ body: re(
4160
+ '<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>'
4161
+ )
4162
+ },
4163
+ unknown: hr,
4164
+ blank: {
4165
+ body: re("")
4166
+ }
4167
+ }
4168
+ }, Sr = /* @__PURE__ */ dt(async function(I, x, A) {
4169
+ const P = A.getConfigField("padding"), N = A.getConfigField("iconSize"), u = N / 2, h = N / 6, a = h / 2;
4170
+ await Promise.all(
4171
+ x.edges().map(async (e) => {
4172
+ const {
4173
+ source: r,
4174
+ sourceDir: l,
4175
+ sourceArrow: i,
4176
+ sourceGroup: g,
4177
+ target: t,
4178
+ targetDir: o,
4179
+ targetArrow: s,
4180
+ targetGroup: c,
4181
+ label: f
4182
+ } = be(e);
4183
+ let { x: T, y: d } = e[0].sourceEndpoint();
4184
+ const { x: v, y: L } = e[0].midpoint();
4185
+ let { x: b, y: C } = e[0].targetEndpoint();
4186
+ const G = P + 4;
4187
+ if (g && (Wt(l) ? T += l === "L" ? -G : G : d += l === "T" ? -G : G + 18), c && (Wt(o) ? b += o === "L" ? -G : G : C += o === "T" ? -G : G + 18), !g && A.getNode(r)?.type === "junction" && (Wt(l) ? T += l === "L" ? u : -u : d += l === "T" ? u : -u), !c && A.getNode(t)?.type === "junction" && (Wt(o) ? b += o === "L" ? u : -u : C += o === "T" ? u : -u), e[0]._private.rscratch) {
4188
+ const k = I.insert("g");
4189
+ if (k.insert("path").attr("d", `M ${T},${d} L ${v},${L} L${b},${C} `).attr("class", "edge").attr("id", or(r, t, { prefix: "L" })), i) {
4190
+ const Y = Wt(l) ? se[l](T, h) : T - a, K = qt(l) ? se[l](d, h) : d - a;
4191
+ k.insert("polygon").attr("points", Ie[l](h)).attr("transform", `translate(${Y},${K})`).attr("class", "arrow");
4192
+ }
4193
+ if (s) {
4194
+ const Y = Wt(o) ? se[o](b, h) : b - a, K = qt(o) ? se[o](C, h) : C - a;
4195
+ k.insert("polygon").attr("points", Ie[o](h)).attr("transform", `translate(${Y},${K})`).attr("class", "arrow");
4196
+ }
4197
+ if (f) {
4198
+ const Y = Te(l, o) ? "XY" : Wt(l) ? "X" : "Y";
4199
+ let K = 0;
4200
+ Y === "X" ? K = Math.abs(T - b) : Y === "Y" ? K = Math.abs(d - C) / 1.5 : K = Math.abs(T - b) / 2;
4201
+ const O = k.append("g");
4202
+ if (await me(
4203
+ O,
4204
+ f,
4205
+ {
4206
+ useHtmlLabels: !1,
4207
+ width: K,
4208
+ classes: "architecture-service-label"
4209
+ },
4210
+ Ee()
4211
+ ), O.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), Y === "X")
4212
+ O.attr("transform", "translate(" + v + ", " + L + ")");
4213
+ else if (Y === "Y")
4214
+ O.attr("transform", "translate(" + v + ", " + L + ") rotate(-90)");
4215
+ else if (Y === "XY") {
4216
+ const it = ye(l, o);
4217
+ if (it && Nr(it)) {
4218
+ const n = O.node().getBoundingClientRect(), [m, p] = Ar(it);
4219
+ O.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * m * p * 45})`);
4220
+ const E = O.node().getBoundingClientRect();
4221
+ O.attr(
4222
+ "transform",
4223
+ `
4224
+ translate(${v}, ${L - n.height / 2})
4225
+ translate(${m * E.width / 2}, ${p * E.height / 2})
4226
+ rotate(${-1 * m * p * 45}, 0, ${n.height / 2})
4227
+ `
4228
+ );
4229
+ }
4230
+ }
4231
+ }
4232
+ }
4233
+ })
4234
+ );
4235
+ }, "drawEdges"), Fr = /* @__PURE__ */ dt(async function(I, x, A) {
4236
+ const N = A.getConfigField("padding") * 0.75, u = A.getConfigField("fontSize"), a = A.getConfigField("iconSize") / 2;
4237
+ await Promise.all(
4238
+ x.nodes().map(async (e) => {
4239
+ const r = ie(e);
4240
+ if (r.type === "group") {
4241
+ const { h: l, w: i, x1: g, y1: t } = e.boundingBox(), o = I.append("rect");
4242
+ o.attr("id", `group-${r.id}`).attr("x", g + a).attr("y", t + a).attr("width", i).attr("height", l).attr("class", "node-bkg");
4243
+ const s = I.append("g");
4244
+ let c = g, f = t;
4245
+ if (r.icon) {
4246
+ const T = s.append("g");
4247
+ T.html(
4248
+ `<g>${await pe(r.icon, { height: N, width: N, fallbackPrefix: ne.prefix })}</g>`
4249
+ ), T.attr(
4250
+ "transform",
4251
+ "translate(" + (c + a + 1) + ", " + (f + a + 1) + ")"
4252
+ ), c += N, f += u / 2 - 1 - 2;
4253
+ }
4254
+ if (r.label) {
4255
+ const T = s.append("g");
4256
+ await me(
4257
+ T,
4258
+ r.label,
4259
+ {
4260
+ useHtmlLabels: !1,
4261
+ width: i,
4262
+ classes: "architecture-service-label"
4263
+ },
4264
+ Ee()
4265
+ ), T.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), T.attr(
4266
+ "transform",
4267
+ "translate(" + (c + a + 4) + ", " + (f + a + 2) + ")"
4268
+ );
4269
+ }
4270
+ A.setElementForId(r.id, o);
4271
+ }
4272
+ })
4273
+ );
4274
+ }, "drawGroups"), br = /* @__PURE__ */ dt(async function(I, x, A) {
4275
+ const P = Ee();
4276
+ for (const N of A) {
4277
+ const u = x.append("g"), h = I.getConfigField("iconSize");
4278
+ if (N.title) {
4279
+ const l = u.append("g");
4280
+ await me(
4281
+ l,
4282
+ N.title,
4283
+ {
4284
+ useHtmlLabels: !1,
4285
+ width: h * 1.5,
4286
+ classes: "architecture-service-label"
4287
+ },
4288
+ P
4289
+ ), l.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), l.attr("transform", "translate(" + h / 2 + ", " + h + ")");
4290
+ }
4291
+ const a = u.append("g");
4292
+ if (N.icon)
4293
+ a.html(
4294
+ `<g>${await pe(N.icon, { height: h, width: h, fallbackPrefix: ne.prefix })}</g>`
4295
+ );
4296
+ else if (N.iconText) {
4297
+ a.html(
4298
+ `<g>${await pe("blank", { height: h, width: h, fallbackPrefix: ne.prefix })}</g>`
4299
+ );
4300
+ const g = a.append("g").append("foreignObject").attr("width", h).attr("height", h).append("div").attr("class", "node-icon-text").attr("style", `height: ${h}px;`).append("div").html(ar(N.iconText, P)), t = parseInt(
4301
+ window.getComputedStyle(g.node(), null).getPropertyValue("font-size").replace(/\D/g, "")
4302
+ ) ?? 16;
4303
+ g.attr("style", `-webkit-line-clamp: ${Math.floor((h - 2) / t)};`);
4304
+ } else
4305
+ a.append("path").attr("class", "node-bkg").attr("id", "node-" + N.id).attr(
4306
+ "d",
4307
+ `M0 ${h} v${-h} q0,-5 5,-5 h${h} q5,0 5,5 v${h} H0 Z`
4308
+ );
4309
+ u.attr("id", `service-${N.id}`).attr("class", "architecture-service");
4310
+ const { width: e, height: r } = u.node().getBBox();
4311
+ N.width = e, N.height = r, I.setElementForId(N.id, u);
4312
+ }
4313
+ return 0;
4314
+ }, "drawServices"), Pr = /* @__PURE__ */ dt(function(I, x, A) {
4315
+ A.forEach((P) => {
4316
+ const N = x.append("g"), u = I.getConfigField("iconSize");
4317
+ N.append("g").append("rect").attr("id", "node-" + P.id).attr("fill-opacity", "0").attr("width", u).attr("height", u), N.attr("class", "architecture-junction");
4318
+ const { width: a, height: e } = N._groups[0][0].getBBox();
4319
+ N.width = a, N.height = e, I.setElementForId(P.id, N);
4320
+ });
4321
+ }, "drawJunctions");
4322
+ sr([
4323
+ {
4324
+ name: ne.prefix,
4325
+ icons: ne
4326
+ }
4327
+ ]);
4328
+ Fe.use(mr);
4329
+ function Ue(I, x, A) {
4330
+ I.forEach((P) => {
4331
+ x.add({
4332
+ group: "nodes",
4333
+ data: {
4334
+ type: "service",
4335
+ id: P.id,
4336
+ icon: P.icon,
4337
+ label: P.title,
4338
+ parent: P.in,
4339
+ width: A.getConfigField("iconSize"),
4340
+ height: A.getConfigField("iconSize")
4341
+ },
4342
+ classes: "node-service"
4343
+ });
4344
+ });
4345
+ }
4346
+ dt(Ue, "addServices");
4347
+ function Ye(I, x, A) {
4348
+ I.forEach((P) => {
4349
+ x.add({
4350
+ group: "nodes",
4351
+ data: {
4352
+ type: "junction",
4353
+ id: P.id,
4354
+ parent: P.in,
4355
+ width: A.getConfigField("iconSize"),
4356
+ height: A.getConfigField("iconSize")
4357
+ },
4358
+ classes: "node-junction"
4359
+ });
4360
+ });
4361
+ }
4362
+ dt(Ye, "addJunctions");
4363
+ function Xe(I, x) {
4364
+ x.nodes().map((A) => {
4365
+ const P = ie(A);
4366
+ if (P.type === "group")
4367
+ return;
4368
+ P.x = A.position().x, P.y = A.position().y, I.getElementById(P.id).attr("transform", "translate(" + (P.x || 0) + "," + (P.y || 0) + ")");
4369
+ });
4370
+ }
4371
+ dt(Xe, "positionNodes");
4372
+ function He(I, x) {
4373
+ I.forEach((A) => {
4374
+ x.add({
4375
+ group: "nodes",
4376
+ data: {
4377
+ type: "group",
4378
+ id: A.id,
4379
+ icon: A.icon,
4380
+ label: A.title,
4381
+ parent: A.in
4382
+ },
4383
+ classes: "node-group"
4384
+ });
4385
+ });
4386
+ }
4387
+ dt(He, "addGroups");
4388
+ function We(I, x) {
4389
+ I.forEach((A) => {
4390
+ const { lhsId: P, rhsId: N, lhsInto: u, lhsGroup: h, rhsInto: a, lhsDir: e, rhsDir: r, rhsGroup: l, title: i } = A, g = Te(A.lhsDir, A.rhsDir) ? "segments" : "straight", t = {
4391
+ id: `${P}-${N}`,
4392
+ label: i,
4393
+ source: P,
4394
+ sourceDir: e,
4395
+ sourceArrow: u,
4396
+ sourceGroup: h,
4397
+ sourceEndpoint: e === "L" ? "0 50%" : e === "R" ? "100% 50%" : e === "T" ? "50% 0" : "50% 100%",
4398
+ target: N,
4399
+ targetDir: r,
4400
+ targetArrow: a,
4401
+ targetGroup: l,
4402
+ targetEndpoint: r === "L" ? "0 50%" : r === "R" ? "100% 50%" : r === "T" ? "50% 0" : "50% 100%"
4403
+ };
4404
+ x.add({
4405
+ group: "edges",
4406
+ data: t,
4407
+ classes: g
4408
+ });
4409
+ });
4410
+ }
4411
+ dt(We, "addEdges");
4412
+ function Ve(I, x, A) {
4413
+ const P = /* @__PURE__ */ dt((a, e) => Object.entries(a).reduce(
4414
+ (r, [l, i]) => {
4415
+ let g = 0;
4416
+ const t = Object.entries(i);
4417
+ if (t.length === 1)
4418
+ return r[l] = t[0][1], r;
4419
+ for (let o = 0; o < t.length - 1; o++)
4420
+ for (let s = o + 1; s < t.length; s++) {
4421
+ const [c, f] = t[o], [T, d] = t[s];
4422
+ if (A[c]?.[T] === e)
4423
+ r[l] ??= [], r[l] = [...r[l], ...f, ...d];
4424
+ else if (c === "default" || T === "default")
4425
+ r[l] ??= [], r[l] = [...r[l], ...f, ...d];
4426
+ else {
4427
+ const L = `${l}-${g++}`;
4428
+ r[L] = f;
4429
+ const b = `${l}-${g++}`;
4430
+ r[b] = d;
4431
+ }
4432
+ }
4433
+ return r;
4434
+ },
4435
+ {}
4436
+ ), "flattenAlignments"), N = x.map((a) => {
4437
+ const e = {}, r = {};
4438
+ return Object.entries(a).forEach(([l, [i, g]]) => {
4439
+ const t = I.getNode(l)?.in ?? "default";
4440
+ e[g] ??= {}, e[g][t] ??= [], e[g][t].push(l), r[i] ??= {}, r[i][t] ??= [], r[i][t].push(l);
4441
+ }), {
4442
+ horiz: Object.values(P(e, "horizontal")).filter(
4443
+ (l) => l.length > 1
4444
+ ),
4445
+ vert: Object.values(P(r, "vertical")).filter(
4446
+ (l) => l.length > 1
4447
+ )
4448
+ };
4449
+ }), [u, h] = N.reduce(
4450
+ ([a, e], { horiz: r, vert: l }) => [
4451
+ [...a, ...r],
4452
+ [...e, ...l]
4453
+ ],
4454
+ [[], []]
4455
+ );
4456
+ return {
4457
+ horizontal: u,
4458
+ vertical: h
4459
+ };
4460
+ }
4461
+ dt(Ve, "getAlignments");
4462
+ function ze(I, x) {
4463
+ const A = [], P = /* @__PURE__ */ dt((u) => `${u[0]},${u[1]}`, "posToStr"), N = /* @__PURE__ */ dt((u) => u.split(",").map((h) => parseInt(h)), "strToPos");
4464
+ return I.forEach((u) => {
4465
+ const h = Object.fromEntries(
4466
+ Object.entries(u).map(([l, i]) => [P(i), l])
4467
+ ), a = [P([0, 0])], e = {}, r = {
4468
+ L: [-1, 0],
4469
+ R: [1, 0],
4470
+ T: [0, 1],
4471
+ B: [0, -1]
4472
+ };
4473
+ for (; a.length > 0; ) {
4474
+ const l = a.shift();
4475
+ if (l) {
4476
+ e[l] = 1;
4477
+ const i = h[l];
4478
+ if (i) {
4479
+ const g = N(l);
4480
+ Object.entries(r).forEach(([t, o]) => {
4481
+ const s = P([g[0] + o[0], g[1] + o[1]]), c = h[s];
4482
+ c && !e[s] && (a.push(s), A.push({
4483
+ [xe[t]]: c,
4484
+ [xe[Tr(t)]]: i,
4485
+ gap: 1.5 * x.getConfigField("iconSize")
4486
+ }));
4487
+ });
4488
+ }
4489
+ }
4490
+ }
4491
+ }), A;
4492
+ }
4493
+ dt(ze, "getRelativeConstraints");
4494
+ function $e(I, x, A, P, N, { spatialMaps: u, groupAlignments: h }) {
4495
+ return new Promise((a) => {
4496
+ const e = nr("body").append("div").attr("id", "cy").attr("style", "display:none"), r = Fe({
4497
+ container: document.getElementById("cy"),
4498
+ style: [
4499
+ {
4500
+ selector: "edge",
4501
+ style: {
4502
+ "curve-style": "straight",
4503
+ label: "data(label)",
4504
+ "source-endpoint": "data(sourceEndpoint)",
4505
+ "target-endpoint": "data(targetEndpoint)"
4506
+ }
4507
+ },
4508
+ {
4509
+ selector: "edge.segments",
4510
+ style: {
4511
+ "curve-style": "segments",
4512
+ "segment-weights": "0",
4513
+ "segment-distances": [0.5],
4514
+ // @ts-ignore Incorrect library types
4515
+ "edge-distances": "endpoints",
4516
+ "source-endpoint": "data(sourceEndpoint)",
4517
+ "target-endpoint": "data(targetEndpoint)"
4518
+ }
4519
+ },
4520
+ {
4521
+ selector: "node",
4522
+ style: {
4523
+ // @ts-ignore Incorrect library types
4524
+ "compound-sizing-wrt-labels": "include"
4525
+ }
4526
+ },
4527
+ {
4528
+ selector: "node[label]",
4529
+ style: {
4530
+ "text-valign": "bottom",
4531
+ "text-halign": "center",
4532
+ "font-size": `${N.getConfigField("fontSize")}px`
4533
+ }
4534
+ },
4535
+ {
4536
+ selector: ".node-service",
4537
+ style: {
4538
+ label: "data(label)",
4539
+ width: "data(width)",
4540
+ height: "data(height)"
4541
+ }
4542
+ },
4543
+ {
4544
+ selector: ".node-junction",
4545
+ style: {
4546
+ width: "data(width)",
4547
+ height: "data(height)"
4548
+ }
4549
+ },
4550
+ {
4551
+ selector: ".node-group",
4552
+ style: {
4553
+ // @ts-ignore Incorrect library types
4554
+ padding: `${N.getConfigField("padding")}px`
4555
+ }
4556
+ }
4557
+ ],
4558
+ layout: {
4559
+ name: "grid",
4560
+ boundingBox: {
4561
+ x1: 0,
4562
+ x2: 100,
4563
+ y1: 0,
4564
+ y2: 100
4565
+ }
4566
+ }
4567
+ });
4568
+ e.remove(), He(A, r), Ue(I, r, N), Ye(x, r, N), We(P, r);
4569
+ const l = Ve(N, u, h), i = ze(u, N), g = r.layout({
4570
+ name: "fcose",
4571
+ quality: "proof",
4572
+ styleEnabled: !1,
4573
+ animate: !1,
4574
+ nodeDimensionsIncludeLabels: !1,
4575
+ // Adjust the edge parameters if it passes through the border of a group
4576
+ // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67
4577
+ idealEdgeLength(t) {
4578
+ const [o, s] = t.connectedNodes(), { parent: c } = ie(o), { parent: f } = ie(s);
4579
+ return c === f ? 1.5 * N.getConfigField("iconSize") : 0.5 * N.getConfigField("iconSize");
4580
+ },
4581
+ edgeElasticity(t) {
4582
+ const [o, s] = t.connectedNodes(), { parent: c } = ie(o), { parent: f } = ie(s);
4583
+ return c === f ? 0.45 : 1e-3;
4584
+ },
4585
+ alignmentConstraint: l,
4586
+ relativePlacementConstraint: i
4587
+ });
4588
+ g.one("layoutstop", () => {
4589
+ function t(o, s, c, f) {
4590
+ let T, d;
4591
+ const { x: v, y: L } = o, { x: b, y: C } = s;
4592
+ d = (f - L + (v - c) * (L - C) / (v - b)) / Math.sqrt(1 + Math.pow((L - C) / (v - b), 2)), T = Math.sqrt(Math.pow(f - L, 2) + Math.pow(c - v, 2) - Math.pow(d, 2));
4593
+ const G = Math.sqrt(Math.pow(b - v, 2) + Math.pow(C - L, 2));
4594
+ T = T / G;
4595
+ let k = (b - v) * (f - L) - (C - L) * (c - v);
4596
+ switch (!0) {
4597
+ case k >= 0:
4598
+ k = 1;
4599
+ break;
4600
+ case k < 0:
4601
+ k = -1;
4602
+ break;
4603
+ }
4604
+ let Y = (b - v) * (c - v) + (C - L) * (f - L);
4605
+ switch (!0) {
4606
+ case Y >= 0:
4607
+ Y = 1;
4608
+ break;
4609
+ case Y < 0:
4610
+ Y = -1;
4611
+ break;
4612
+ }
4613
+ return d = Math.abs(d) * k, T = T * Y, {
4614
+ distances: d,
4615
+ weights: T
4616
+ };
4617
+ }
4618
+ dt(t, "getSegmentWeights"), r.startBatch();
4619
+ for (const o of Object.values(r.edges()))
4620
+ if (o.data?.()) {
4621
+ const { x: s, y: c } = o.source().position(), { x: f, y: T } = o.target().position();
4622
+ if (s !== f && c !== T) {
4623
+ const d = o.sourceEndpoint(), v = o.targetEndpoint(), { sourceDir: L } = be(o), [b, C] = qt(L) ? [d.x, v.y] : [v.x, d.y], { weights: G, distances: k } = t(d, v, b, C);
4624
+ o.style("segment-distances", k), o.style("segment-weights", G);
4625
+ }
4626
+ }
4627
+ r.endBatch(), g.run();
4628
+ }), g.run(), r.ready((t) => {
4629
+ Se.info("Ready", t), a(r);
4630
+ });
4631
+ });
4632
+ }
4633
+ dt($e, "layoutArchitecture");
4634
+ var Gr = /* @__PURE__ */ dt(async (I, x, A, P) => {
4635
+ const N = P.db, u = N.getServices(), h = N.getJunctions(), a = N.getGroups(), e = N.getEdges(), r = N.getDataStructures(), l = Ze(x), i = l.append("g");
4636
+ i.attr("class", "architecture-edges");
4637
+ const g = l.append("g");
4638
+ g.attr("class", "architecture-services");
4639
+ const t = l.append("g");
4640
+ t.attr("class", "architecture-groups"), await br(N, g, u), Pr(N, g, h);
4641
+ const o = await $e(u, h, a, e, N, r);
4642
+ await Sr(i, o, N), await Fr(t, o, N), Xe(N, o), ke(void 0, l, N.getConfigField("padding"), N.getConfigField("useMaxWidth"));
4643
+ }, "draw"), Ur = { draw: Gr }, zr = {
4644
+ parser: Ge,
4645
+ get db() {
4646
+ return new Pe();
4647
+ },
4648
+ renderer: Ur,
4649
+ styles: Rr
4650
+ };
4651
+ export {
4652
+ zr as diagram
4653
+ };