@versini/sassysaint 8.107.4 → 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 (87) hide show
  1. package/dist/chunks/{AboutChangelog.DeRcKN5H.js → AboutChangelog.55tIwnGe.js} +2 -2
  2. package/dist/chunks/{AboutEntry.6mTHwkfb.js → AboutEntry.D1zAHjel.js} +7 -7
  3. package/dist/chunks/{App.DTjbiLAP.js → App.Br7HE-y0.js} +18 -18
  4. package/dist/chunks/{Bubble.ltolxxta.js → Bubble.Ic_8FEhH.js} +1 -1
  5. package/dist/chunks/{DeleteButtonIcon.P0LgJDjE.js → ButtonIconDelete.DRBd_G40.js} +3 -3
  6. package/dist/chunks/{Chart.BzOmOhOW.js → Chart.CwIVbBYb.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.lGE_8ao1.js → ChatBubbleAssistant.DHlLzqdc.js} +4 -4
  8. package/dist/chunks/{ChatBubbleUser.DC661ePq.js → ChatBubbleUser.D7ksCr76.js} +3 -3
  9. package/dist/chunks/{ChatHistoryTable.BkRFWpsA.js → ChatHistoryTable.DhUDW7QO.js} +4 -4
  10. package/dist/chunks/{HistoryEntry.uUjsDuT0.js → HistoryEntry.BxnMfiXN.js} +6 -6
  11. package/dist/chunks/{LoginEntry.BGZdTDwf.js → LoginEntry.XF9rPWdB.js} +4 -4
  12. package/dist/chunks/{LogoEntry.Bpddd0yA.js → LogoEntry.CnTI8jpv.js} +1 -1
  13. package/dist/chunks/{MemoriesEntry.BYQm9cuU.js → MemoriesEntry.BjNXrPW2.js} +5 -5
  14. package/dist/chunks/{ProfileEntry.BqcZXSeT.js → ProfileEntry.S6XO2uMT.js} +4 -4
  15. package/dist/chunks/{SettingsEntry.BdC5Vyof.js → SettingsEntry.C5jHUJzu.js} +5 -5
  16. package/dist/chunks/{UsageEntry._O8Q6TwS.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.CaofbEIP.js → index.C0El17wt.js} +2 -2
  51. package/dist/chunks/{index.D2nN0rC6.js → index.CUn5zNJg.js} +1 -1
  52. package/dist/chunks/{index.C70LcKzU.js → index.CbEVdl_N.js} +1 -1
  53. package/dist/chunks/{index.CYcieK1H.js → index.CoZgV6rn.js} +1 -1
  54. package/dist/chunks/{index.DuxTgnco.js → index.DCqTKdor.js} +1 -1
  55. package/dist/chunks/index.DctDXsYU.js +67 -0
  56. package/dist/chunks/{index.BxbWxVtd.js → index.Df-tNwfZ.js} +1 -1
  57. package/dist/chunks/{index.BlviGqw0.js → index.DxGkXGdu.js} +3 -3
  58. package/dist/chunks/{index.DG-VhqKw.js → index.z2e7pMwp.js} +1 -1
  59. package/dist/chunks/info-NVLQJR56.D9ao7_Su.js +27 -0
  60. package/dist/chunks/infoDiagram-WHAUD3N6.DmFB-CXk.js +24 -0
  61. package/dist/chunks/init.DAGnb5BH.js +16 -0
  62. package/dist/chunks/journeyDiagram-XKPGCS4Q.C9FISQxf.js +834 -0
  63. package/dist/chunks/kanban-definition-3W4ZIXB7.ChmJnTyd.js +719 -0
  64. package/dist/chunks/{index.s8Izh8-Q.js → katex.D0sQThIv.js} +1638 -1943
  65. package/dist/chunks/layout.DtZQLIyC.js +1332 -0
  66. package/dist/chunks/linear.CIDfImUo.js +625 -0
  67. package/dist/chunks/mermaid-parser.core.CO83pegl.js +12724 -0
  68. package/dist/chunks/mindmap-definition-VGOIOE7T.B3dfWebK.js +759 -0
  69. package/dist/chunks/ordinal.EWT-qnu7.js +61 -0
  70. package/dist/chunks/packet-BFZMPI3H.q9qJMgm9.js +27 -0
  71. package/dist/chunks/pie-7BOR55EZ.BTnKDmrp.js +32 -0
  72. package/dist/chunks/pieDiagram-ADFJNKIX.B23eDSnQ.js +161 -0
  73. package/dist/chunks/quadrantDiagram-AYHSOK5B.B3ZIlLhO.js +1022 -0
  74. package/dist/chunks/radar-NHE76QYJ.BeKykujs.js +27 -0
  75. package/dist/chunks/rehype-mermaid.DkS2NcIa.js +14283 -0
  76. package/dist/chunks/requirementDiagram-UZGBJVZJ.0vOl9IL2.js +850 -0
  77. package/dist/chunks/sankeyDiagram-TZEHDZUN.DxwTK65F.js +810 -0
  78. package/dist/chunks/sequenceDiagram-WL72ISMW.BmOg83Gx.js +2511 -0
  79. package/dist/chunks/stateDiagram-FKZM4ZOC.DBiU28Wu.js +263 -0
  80. package/dist/chunks/stateDiagram-v2-4FDKWEC3.B6t8_4cH.js +16 -0
  81. package/dist/chunks/timeline-definition-IT6M3QCI.DpWxwytE.js +795 -0
  82. package/dist/chunks/treemap-KMMF4GRG.KqgFrxbV.js +81 -0
  83. package/dist/chunks/{useMarkdown.DjEZz9lH.js → useMarkdown.CxuK_DLo.js} +1951 -1936
  84. package/dist/chunks/xychartDiagram-PRI3JC2R.CBaIBQ89.js +1340 -0
  85. package/dist/components/SassySaint/SassySaint.js +1 -1
  86. package/dist/index.js +3 -3
  87. package/package.json +3 -3
@@ -0,0 +1,2600 @@
1
+ import { __name as V, log as $, select as lt } from "./rehype-mermaid.DkS2NcIa.js";
2
+ import { cytoscape as tt } from "./cytoscape.esm.DmRZGnqW.js";
3
+ import { getDefaultExportFromCjs as gt } from "./App.Br7HE-y0.js";
4
+ var k = { exports: {} }, Z = { exports: {} }, Q = { exports: {} }, ut = Q.exports, j;
5
+ function ft() {
6
+ return j || (j = 1, (function(G, b) {
7
+ (function(I, L) {
8
+ G.exports = L();
9
+ })(ut, function() {
10
+ return (
11
+ /******/
12
+ (function(N) {
13
+ var I = {};
14
+ function L(o) {
15
+ if (I[o])
16
+ return I[o].exports;
17
+ var e = I[o] = {
18
+ /******/
19
+ i: o,
20
+ /******/
21
+ l: !1,
22
+ /******/
23
+ exports: {}
24
+ /******/
25
+ };
26
+ return N[o].call(e.exports, e, e.exports, L), e.l = !0, e.exports;
27
+ }
28
+ return L.m = N, L.c = I, L.i = function(o) {
29
+ return o;
30
+ }, L.d = function(o, e, t) {
31
+ L.o(o, e) || Object.defineProperty(o, e, {
32
+ /******/
33
+ configurable: !1,
34
+ /******/
35
+ enumerable: !0,
36
+ /******/
37
+ get: t
38
+ /******/
39
+ });
40
+ }, L.n = function(o) {
41
+ var e = o && o.__esModule ? (
42
+ /******/
43
+ function() {
44
+ return o.default;
45
+ }
46
+ ) : (
47
+ /******/
48
+ function() {
49
+ return o;
50
+ }
51
+ );
52
+ return L.d(e, "a", e), e;
53
+ }, L.o = function(o, e) {
54
+ return Object.prototype.hasOwnProperty.call(o, e);
55
+ }, L.p = "", L(L.s = 26);
56
+ })([
57
+ /* 0 */
58
+ /***/
59
+ (function(N, I, L) {
60
+ function o() {
61
+ }
62
+ o.QUALITY = 1, o.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, o.DEFAULT_INCREMENTAL = !1, o.DEFAULT_ANIMATION_ON_LAYOUT = !0, o.DEFAULT_ANIMATION_DURING_LAYOUT = !1, o.DEFAULT_ANIMATION_PERIOD = 50, o.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, o.DEFAULT_GRAPH_MARGIN = 15, o.NODE_DIMENSIONS_INCLUDE_LABELS = !1, o.SIMPLE_NODE_SIZE = 40, o.SIMPLE_NODE_HALF_SIZE = o.SIMPLE_NODE_SIZE / 2, o.EMPTY_COMPOUND_NODE_SIZE = 40, o.MIN_EDGE_LENGTH = 1, o.WORLD_BOUNDARY = 1e6, o.INITIAL_WORLD_BOUNDARY = o.WORLD_BOUNDARY / 1e3, o.WORLD_CENTER_X = 1200, o.WORLD_CENTER_Y = 900, N.exports = o;
63
+ }),
64
+ /* 1 */
65
+ /***/
66
+ (function(N, I, L) {
67
+ var o = L(2), e = L(8), t = L(9);
68
+ function i(g, n, p) {
69
+ o.call(this, p), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = p, this.bendpoints = [], this.source = g, this.target = n;
70
+ }
71
+ i.prototype = Object.create(o.prototype);
72
+ for (var l in o)
73
+ i[l] = o[l];
74
+ i.prototype.getSource = function() {
75
+ return this.source;
76
+ }, i.prototype.getTarget = function() {
77
+ return this.target;
78
+ }, i.prototype.isInterGraph = function() {
79
+ return this.isInterGraph;
80
+ }, i.prototype.getLength = function() {
81
+ return this.length;
82
+ }, i.prototype.isOverlapingSourceAndTarget = function() {
83
+ return this.isOverlapingSourceAndTarget;
84
+ }, i.prototype.getBendpoints = function() {
85
+ return this.bendpoints;
86
+ }, i.prototype.getLca = function() {
87
+ return this.lca;
88
+ }, i.prototype.getSourceInLca = function() {
89
+ return this.sourceInLca;
90
+ }, i.prototype.getTargetInLca = function() {
91
+ return this.targetInLca;
92
+ }, i.prototype.getOtherEnd = function(g) {
93
+ if (this.source === g)
94
+ return this.target;
95
+ if (this.target === g)
96
+ return this.source;
97
+ throw "Node is not incident with this edge";
98
+ }, i.prototype.getOtherEndInGraph = function(g, n) {
99
+ for (var p = this.getOtherEnd(g), r = n.getGraphManager().getRoot(); ; ) {
100
+ if (p.getOwner() == n)
101
+ return p;
102
+ if (p.getOwner() == r)
103
+ break;
104
+ p = p.getOwner().getParent();
105
+ }
106
+ return null;
107
+ }, i.prototype.updateLength = function() {
108
+ var g = new Array(4);
109
+ this.isOverlapingSourceAndTarget = e.getIntersection(this.target.getRect(), this.source.getRect(), g), this.isOverlapingSourceAndTarget || (this.lengthX = g[0] - g[2], this.lengthY = g[1] - g[3], Math.abs(this.lengthX) < 1 && (this.lengthX = t.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = t.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
110
+ }, i.prototype.updateLengthSimple = function() {
111
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = t.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = t.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
112
+ }, N.exports = i;
113
+ }),
114
+ /* 2 */
115
+ /***/
116
+ (function(N, I, L) {
117
+ function o(e) {
118
+ this.vGraphObject = e;
119
+ }
120
+ N.exports = o;
121
+ }),
122
+ /* 3 */
123
+ /***/
124
+ (function(N, I, L) {
125
+ var o = L(2), e = L(10), t = L(13), i = L(0), l = L(16), g = L(4);
126
+ function n(r, a, h, d) {
127
+ h == null && d == null && (d = a), o.call(this, d), r.graphManager != null && (r = r.graphManager), this.estimatedSize = e.MIN_VALUE, this.inclusionTreeDepth = e.MAX_VALUE, this.vGraphObject = d, this.edges = [], this.graphManager = r, h != null && a != null ? this.rect = new t(a.x, a.y, h.width, h.height) : this.rect = new t();
128
+ }
129
+ n.prototype = Object.create(o.prototype);
130
+ for (var p in o)
131
+ n[p] = o[p];
132
+ n.prototype.getEdges = function() {
133
+ return this.edges;
134
+ }, n.prototype.getChild = function() {
135
+ return this.child;
136
+ }, n.prototype.getOwner = function() {
137
+ return this.owner;
138
+ }, n.prototype.getWidth = function() {
139
+ return this.rect.width;
140
+ }, n.prototype.setWidth = function(r) {
141
+ this.rect.width = r;
142
+ }, n.prototype.getHeight = function() {
143
+ return this.rect.height;
144
+ }, n.prototype.setHeight = function(r) {
145
+ this.rect.height = r;
146
+ }, n.prototype.getCenterX = function() {
147
+ return this.rect.x + this.rect.width / 2;
148
+ }, n.prototype.getCenterY = function() {
149
+ return this.rect.y + this.rect.height / 2;
150
+ }, n.prototype.getCenter = function() {
151
+ return new g(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
152
+ }, n.prototype.getLocation = function() {
153
+ return new g(this.rect.x, this.rect.y);
154
+ }, n.prototype.getRect = function() {
155
+ return this.rect;
156
+ }, n.prototype.getDiagonal = function() {
157
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
158
+ }, n.prototype.getHalfTheDiagonal = function() {
159
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
160
+ }, n.prototype.setRect = function(r, a) {
161
+ this.rect.x = r.x, this.rect.y = r.y, this.rect.width = a.width, this.rect.height = a.height;
162
+ }, n.prototype.setCenter = function(r, a) {
163
+ this.rect.x = r - this.rect.width / 2, this.rect.y = a - this.rect.height / 2;
164
+ }, n.prototype.setLocation = function(r, a) {
165
+ this.rect.x = r, this.rect.y = a;
166
+ }, n.prototype.moveBy = function(r, a) {
167
+ this.rect.x += r, this.rect.y += a;
168
+ }, n.prototype.getEdgeListToNode = function(r) {
169
+ var a = [], h = this;
170
+ return h.edges.forEach(function(d) {
171
+ if (d.target == r) {
172
+ if (d.source != h) throw "Incorrect edge source!";
173
+ a.push(d);
174
+ }
175
+ }), a;
176
+ }, n.prototype.getEdgesBetween = function(r) {
177
+ var a = [], h = this;
178
+ return h.edges.forEach(function(d) {
179
+ if (!(d.source == h || d.target == h)) throw "Incorrect edge source and/or target";
180
+ (d.target == r || d.source == r) && a.push(d);
181
+ }), a;
182
+ }, n.prototype.getNeighborsList = function() {
183
+ var r = /* @__PURE__ */ new Set(), a = this;
184
+ return a.edges.forEach(function(h) {
185
+ if (h.source == a)
186
+ r.add(h.target);
187
+ else {
188
+ if (h.target != a)
189
+ throw "Incorrect incidency!";
190
+ r.add(h.source);
191
+ }
192
+ }), r;
193
+ }, n.prototype.withChildren = function() {
194
+ var r = /* @__PURE__ */ new Set(), a, h;
195
+ if (r.add(this), this.child != null)
196
+ for (var d = this.child.getNodes(), v = 0; v < d.length; v++)
197
+ a = d[v], h = a.withChildren(), h.forEach(function(D) {
198
+ r.add(D);
199
+ });
200
+ return r;
201
+ }, n.prototype.getNoOfChildren = function() {
202
+ var r = 0, a;
203
+ if (this.child == null)
204
+ r = 1;
205
+ else
206
+ for (var h = this.child.getNodes(), d = 0; d < h.length; d++)
207
+ a = h[d], r += a.getNoOfChildren();
208
+ return r == 0 && (r = 1), r;
209
+ }, n.prototype.getEstimatedSize = function() {
210
+ if (this.estimatedSize == e.MIN_VALUE)
211
+ throw "assert failed";
212
+ return this.estimatedSize;
213
+ }, n.prototype.calcEstimatedSize = function() {
214
+ 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);
215
+ }, n.prototype.scatter = function() {
216
+ var r, a, h = -i.INITIAL_WORLD_BOUNDARY, d = i.INITIAL_WORLD_BOUNDARY;
217
+ r = i.WORLD_CENTER_X + l.nextDouble() * (d - h) + h;
218
+ var v = -i.INITIAL_WORLD_BOUNDARY, D = i.INITIAL_WORLD_BOUNDARY;
219
+ a = i.WORLD_CENTER_Y + l.nextDouble() * (D - v) + v, this.rect.x = r, this.rect.y = a;
220
+ }, n.prototype.updateBounds = function() {
221
+ if (this.getChild() == null)
222
+ throw "assert failed";
223
+ if (this.getChild().getNodes().length != 0) {
224
+ var r = this.getChild();
225
+ if (r.updateBounds(!0), this.rect.x = r.getLeft(), this.rect.y = r.getTop(), this.setWidth(r.getRight() - r.getLeft()), this.setHeight(r.getBottom() - r.getTop()), i.NODE_DIMENSIONS_INCLUDE_LABELS) {
226
+ var a = r.getRight() - r.getLeft(), h = r.getBottom() - r.getTop();
227
+ this.labelWidth > a && (this.rect.x -= (this.labelWidth - a) / 2, this.setWidth(this.labelWidth)), this.labelHeight > h && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - h) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - h), this.setHeight(this.labelHeight));
228
+ }
229
+ }
230
+ }, n.prototype.getInclusionTreeDepth = function() {
231
+ if (this.inclusionTreeDepth == e.MAX_VALUE)
232
+ throw "assert failed";
233
+ return this.inclusionTreeDepth;
234
+ }, n.prototype.transform = function(r) {
235
+ var a = this.rect.x;
236
+ a > i.WORLD_BOUNDARY ? a = i.WORLD_BOUNDARY : a < -i.WORLD_BOUNDARY && (a = -i.WORLD_BOUNDARY);
237
+ var h = this.rect.y;
238
+ h > i.WORLD_BOUNDARY ? h = i.WORLD_BOUNDARY : h < -i.WORLD_BOUNDARY && (h = -i.WORLD_BOUNDARY);
239
+ var d = new g(a, h), v = r.inverseTransformPoint(d);
240
+ this.setLocation(v.x, v.y);
241
+ }, n.prototype.getLeft = function() {
242
+ return this.rect.x;
243
+ }, n.prototype.getRight = function() {
244
+ return this.rect.x + this.rect.width;
245
+ }, n.prototype.getTop = function() {
246
+ return this.rect.y;
247
+ }, n.prototype.getBottom = function() {
248
+ return this.rect.y + this.rect.height;
249
+ }, n.prototype.getParent = function() {
250
+ return this.owner == null ? null : this.owner.getParent();
251
+ }, N.exports = n;
252
+ }),
253
+ /* 4 */
254
+ /***/
255
+ (function(N, I, L) {
256
+ function o(e, t) {
257
+ e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
258
+ }
259
+ o.prototype.getX = function() {
260
+ return this.x;
261
+ }, o.prototype.getY = function() {
262
+ return this.y;
263
+ }, o.prototype.setX = function(e) {
264
+ this.x = e;
265
+ }, o.prototype.setY = function(e) {
266
+ this.y = e;
267
+ }, o.prototype.getDifference = function(e) {
268
+ return new DimensionD(this.x - e.x, this.y - e.y);
269
+ }, o.prototype.getCopy = function() {
270
+ return new o(this.x, this.y);
271
+ }, o.prototype.translate = function(e) {
272
+ return this.x += e.width, this.y += e.height, this;
273
+ }, N.exports = o;
274
+ }),
275
+ /* 5 */
276
+ /***/
277
+ (function(N, I, L) {
278
+ var o = L(2), e = L(10), t = L(0), i = L(6), l = L(3), g = L(1), n = L(13), p = L(12), r = L(11);
279
+ function a(d, v, D) {
280
+ o.call(this, D), this.estimatedSize = e.MIN_VALUE, this.margin = t.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = d, v != null && v instanceof i ? this.graphManager = v : v != null && v instanceof Layout && (this.graphManager = v.graphManager);
281
+ }
282
+ a.prototype = Object.create(o.prototype);
283
+ for (var h in o)
284
+ a[h] = o[h];
285
+ a.prototype.getNodes = function() {
286
+ return this.nodes;
287
+ }, a.prototype.getEdges = function() {
288
+ return this.edges;
289
+ }, a.prototype.getGraphManager = function() {
290
+ return this.graphManager;
291
+ }, a.prototype.getParent = function() {
292
+ return this.parent;
293
+ }, a.prototype.getLeft = function() {
294
+ return this.left;
295
+ }, a.prototype.getRight = function() {
296
+ return this.right;
297
+ }, a.prototype.getTop = function() {
298
+ return this.top;
299
+ }, a.prototype.getBottom = function() {
300
+ return this.bottom;
301
+ }, a.prototype.isConnected = function() {
302
+ return this.isConnected;
303
+ }, a.prototype.add = function(d, v, D) {
304
+ if (v == null && D == null) {
305
+ var u = d;
306
+ if (this.graphManager == null)
307
+ throw "Graph has no graph mgr!";
308
+ if (this.getNodes().indexOf(u) > -1)
309
+ throw "Node already in graph!";
310
+ return u.owner = this, this.getNodes().push(u), u;
311
+ } else {
312
+ var T = d;
313
+ if (!(this.getNodes().indexOf(v) > -1 && this.getNodes().indexOf(D) > -1))
314
+ throw "Source or target not in graph!";
315
+ if (!(v.owner == D.owner && v.owner == this))
316
+ throw "Both owners must be this graph!";
317
+ return v.owner != D.owner ? null : (T.source = v, T.target = D, T.isInterGraph = !1, this.getEdges().push(T), v.edges.push(T), D != v && D.edges.push(T), T);
318
+ }
319
+ }, a.prototype.remove = function(d) {
320
+ var v = d;
321
+ if (d instanceof l) {
322
+ if (v == null)
323
+ throw "Node is null!";
324
+ if (!(v.owner != null && v.owner == this))
325
+ throw "Owner graph is invalid!";
326
+ if (this.graphManager == null)
327
+ throw "Owner graph manager is invalid!";
328
+ for (var D = v.edges.slice(), u, T = D.length, y = 0; y < T; y++)
329
+ u = D[y], u.isInterGraph ? this.graphManager.remove(u) : u.source.owner.remove(u);
330
+ var O = this.nodes.indexOf(v);
331
+ if (O == -1)
332
+ throw "Node not in owner node list!";
333
+ this.nodes.splice(O, 1);
334
+ } else if (d instanceof g) {
335
+ var u = d;
336
+ if (u == null)
337
+ throw "Edge is null!";
338
+ if (!(u.source != null && u.target != null))
339
+ throw "Source and/or target is null!";
340
+ if (!(u.source.owner != null && u.target.owner != null && u.source.owner == this && u.target.owner == this))
341
+ throw "Source and/or target owner is invalid!";
342
+ var s = u.source.edges.indexOf(u), f = u.target.edges.indexOf(u);
343
+ if (!(s > -1 && f > -1))
344
+ throw "Source and/or target doesn't know this edge!";
345
+ u.source.edges.splice(s, 1), u.target != u.source && u.target.edges.splice(f, 1);
346
+ var O = u.source.owner.getEdges().indexOf(u);
347
+ if (O == -1)
348
+ throw "Not in owner's edge list!";
349
+ u.source.owner.getEdges().splice(O, 1);
350
+ }
351
+ }, a.prototype.updateLeftTop = function() {
352
+ for (var d = e.MAX_VALUE, v = e.MAX_VALUE, D, u, T, y = this.getNodes(), O = y.length, s = 0; s < O; s++) {
353
+ var f = y[s];
354
+ D = f.getTop(), u = f.getLeft(), d > D && (d = D), v > u && (v = u);
355
+ }
356
+ return d == e.MAX_VALUE ? null : (y[0].getParent().paddingLeft != null ? T = y[0].getParent().paddingLeft : T = this.margin, this.left = v - T, this.top = d - T, new p(this.left, this.top));
357
+ }, a.prototype.updateBounds = function(d) {
358
+ for (var v = e.MAX_VALUE, D = -e.MAX_VALUE, u = e.MAX_VALUE, T = -e.MAX_VALUE, y, O, s, f, c, E = this.nodes, A = E.length, m = 0; m < A; m++) {
359
+ var C = E[m];
360
+ d && C.child != null && C.updateBounds(), y = C.getLeft(), O = C.getRight(), s = C.getTop(), f = C.getBottom(), v > y && (v = y), D < O && (D = O), u > s && (u = s), T < f && (T = f);
361
+ }
362
+ var R = new n(v, u, D - v, T - u);
363
+ v == e.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), E[0].getParent().paddingLeft != null ? c = E[0].getParent().paddingLeft : c = this.margin, this.left = R.x - c, this.right = R.x + R.width + c, this.top = R.y - c, this.bottom = R.y + R.height + c;
364
+ }, a.calculateBounds = function(d) {
365
+ for (var v = e.MAX_VALUE, D = -e.MAX_VALUE, u = e.MAX_VALUE, T = -e.MAX_VALUE, y, O, s, f, c = d.length, E = 0; E < c; E++) {
366
+ var A = d[E];
367
+ y = A.getLeft(), O = A.getRight(), s = A.getTop(), f = A.getBottom(), v > y && (v = y), D < O && (D = O), u > s && (u = s), T < f && (T = f);
368
+ }
369
+ var m = new n(v, u, D - v, T - u);
370
+ return m;
371
+ }, a.prototype.getInclusionTreeDepth = function() {
372
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
373
+ }, a.prototype.getEstimatedSize = function() {
374
+ if (this.estimatedSize == e.MIN_VALUE)
375
+ throw "assert failed";
376
+ return this.estimatedSize;
377
+ }, a.prototype.calcEstimatedSize = function() {
378
+ for (var d = 0, v = this.nodes, D = v.length, u = 0; u < D; u++) {
379
+ var T = v[u];
380
+ d += T.calcEstimatedSize();
381
+ }
382
+ return d == 0 ? this.estimatedSize = t.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = d / Math.sqrt(this.nodes.length), this.estimatedSize;
383
+ }, a.prototype.updateConnected = function() {
384
+ var d = this;
385
+ if (this.nodes.length == 0) {
386
+ this.isConnected = !0;
387
+ return;
388
+ }
389
+ var v = new r(), D = /* @__PURE__ */ new Set(), u = this.nodes[0], T, y, O = u.withChildren();
390
+ for (O.forEach(function(m) {
391
+ v.push(m), D.add(m);
392
+ }); v.length !== 0; ) {
393
+ u = v.shift(), T = u.getEdges();
394
+ for (var s = T.length, f = 0; f < s; f++) {
395
+ var c = T[f];
396
+ if (y = c.getOtherEndInGraph(u, this), y != null && !D.has(y)) {
397
+ var E = y.withChildren();
398
+ E.forEach(function(m) {
399
+ v.push(m), D.add(m);
400
+ });
401
+ }
402
+ }
403
+ }
404
+ if (this.isConnected = !1, D.size >= this.nodes.length) {
405
+ var A = 0;
406
+ D.forEach(function(m) {
407
+ m.owner == d && A++;
408
+ }), A == this.nodes.length && (this.isConnected = !0);
409
+ }
410
+ }, N.exports = a;
411
+ }),
412
+ /* 6 */
413
+ /***/
414
+ (function(N, I, L) {
415
+ var o, e = L(1);
416
+ function t(i) {
417
+ o = L(5), this.layout = i, this.graphs = [], this.edges = [];
418
+ }
419
+ t.prototype.addRoot = function() {
420
+ var i = this.layout.newGraph(), l = this.layout.newNode(null), g = this.add(i, l);
421
+ return this.setRootGraph(g), this.rootGraph;
422
+ }, t.prototype.add = function(i, l, g, n, p) {
423
+ if (g == null && n == null && p == null) {
424
+ if (i == null)
425
+ throw "Graph is null!";
426
+ if (l == null)
427
+ throw "Parent node is null!";
428
+ if (this.graphs.indexOf(i) > -1)
429
+ throw "Graph already in this graph mgr!";
430
+ if (this.graphs.push(i), i.parent != null)
431
+ throw "Already has a parent!";
432
+ if (l.child != null)
433
+ throw "Already has a child!";
434
+ return i.parent = l, l.child = i, i;
435
+ } else {
436
+ p = g, n = l, g = i;
437
+ var r = n.getOwner(), a = p.getOwner();
438
+ if (!(r != null && r.getGraphManager() == this))
439
+ throw "Source not in this graph mgr!";
440
+ if (!(a != null && a.getGraphManager() == this))
441
+ throw "Target not in this graph mgr!";
442
+ if (r == a)
443
+ return g.isInterGraph = !1, r.add(g, n, p);
444
+ if (g.isInterGraph = !0, g.source = n, g.target = p, this.edges.indexOf(g) > -1)
445
+ throw "Edge already in inter-graph edge list!";
446
+ if (this.edges.push(g), !(g.source != null && g.target != null))
447
+ throw "Edge source and/or target is null!";
448
+ if (!(g.source.edges.indexOf(g) == -1 && g.target.edges.indexOf(g) == -1))
449
+ throw "Edge already in source and/or target incidency list!";
450
+ return g.source.edges.push(g), g.target.edges.push(g), g;
451
+ }
452
+ }, t.prototype.remove = function(i) {
453
+ if (i instanceof o) {
454
+ var l = i;
455
+ if (l.getGraphManager() != this)
456
+ throw "Graph not in this graph mgr";
457
+ if (!(l == this.rootGraph || l.parent != null && l.parent.graphManager == this))
458
+ throw "Invalid parent node!";
459
+ var g = [];
460
+ g = g.concat(l.getEdges());
461
+ for (var n, p = g.length, r = 0; r < p; r++)
462
+ n = g[r], l.remove(n);
463
+ var a = [];
464
+ a = a.concat(l.getNodes());
465
+ var h;
466
+ p = a.length;
467
+ for (var r = 0; r < p; r++)
468
+ h = a[r], l.remove(h);
469
+ l == this.rootGraph && this.setRootGraph(null);
470
+ var d = this.graphs.indexOf(l);
471
+ this.graphs.splice(d, 1), l.parent = null;
472
+ } else if (i instanceof e) {
473
+ if (n = i, n == null)
474
+ throw "Edge is null!";
475
+ if (!n.isInterGraph)
476
+ throw "Not an inter-graph edge!";
477
+ if (!(n.source != null && n.target != null))
478
+ throw "Source and/or target is null!";
479
+ if (!(n.source.edges.indexOf(n) != -1 && n.target.edges.indexOf(n) != -1))
480
+ throw "Source and/or target doesn't know this edge!";
481
+ var d = n.source.edges.indexOf(n);
482
+ if (n.source.edges.splice(d, 1), d = n.target.edges.indexOf(n), n.target.edges.splice(d, 1), !(n.source.owner != null && n.source.owner.getGraphManager() != null))
483
+ throw "Edge owner graph or owner graph manager is null!";
484
+ if (n.source.owner.getGraphManager().edges.indexOf(n) == -1)
485
+ throw "Not in owner graph manager's edge list!";
486
+ var d = n.source.owner.getGraphManager().edges.indexOf(n);
487
+ n.source.owner.getGraphManager().edges.splice(d, 1);
488
+ }
489
+ }, t.prototype.updateBounds = function() {
490
+ this.rootGraph.updateBounds(!0);
491
+ }, t.prototype.getGraphs = function() {
492
+ return this.graphs;
493
+ }, t.prototype.getAllNodes = function() {
494
+ if (this.allNodes == null) {
495
+ for (var i = [], l = this.getGraphs(), g = l.length, n = 0; n < g; n++)
496
+ i = i.concat(l[n].getNodes());
497
+ this.allNodes = i;
498
+ }
499
+ return this.allNodes;
500
+ }, t.prototype.resetAllNodes = function() {
501
+ this.allNodes = null;
502
+ }, t.prototype.resetAllEdges = function() {
503
+ this.allEdges = null;
504
+ }, t.prototype.resetAllNodesToApplyGravitation = function() {
505
+ this.allNodesToApplyGravitation = null;
506
+ }, t.prototype.getAllEdges = function() {
507
+ if (this.allEdges == null) {
508
+ for (var i = [], l = this.getGraphs(), g = 0; g < l.length; g++)
509
+ i = i.concat(l[g].getEdges());
510
+ i = i.concat(this.edges), this.allEdges = i;
511
+ }
512
+ return this.allEdges;
513
+ }, t.prototype.getAllNodesToApplyGravitation = function() {
514
+ return this.allNodesToApplyGravitation;
515
+ }, t.prototype.setAllNodesToApplyGravitation = function(i) {
516
+ if (this.allNodesToApplyGravitation != null)
517
+ throw "assert failed";
518
+ this.allNodesToApplyGravitation = i;
519
+ }, t.prototype.getRoot = function() {
520
+ return this.rootGraph;
521
+ }, t.prototype.setRootGraph = function(i) {
522
+ if (i.getGraphManager() != this)
523
+ throw "Root not in this graph mgr!";
524
+ this.rootGraph = i, i.parent == null && (i.parent = this.layout.newNode("Root node"));
525
+ }, t.prototype.getLayout = function() {
526
+ return this.layout;
527
+ }, t.prototype.isOneAncestorOfOther = function(i, l) {
528
+ if (!(i != null && l != null))
529
+ throw "assert failed";
530
+ if (i == l)
531
+ return !0;
532
+ var g = i.getOwner(), n;
533
+ do {
534
+ if (n = g.getParent(), n == null)
535
+ break;
536
+ if (n == l)
537
+ return !0;
538
+ if (g = n.getOwner(), g == null)
539
+ break;
540
+ } while (!0);
541
+ g = l.getOwner();
542
+ do {
543
+ if (n = g.getParent(), n == null)
544
+ break;
545
+ if (n == i)
546
+ return !0;
547
+ if (g = n.getOwner(), g == null)
548
+ break;
549
+ } while (!0);
550
+ return !1;
551
+ }, t.prototype.calcLowestCommonAncestors = function() {
552
+ for (var i, l, g, n, p, r = this.getAllEdges(), a = r.length, h = 0; h < a; h++) {
553
+ if (i = r[h], l = i.source, g = i.target, i.lca = null, i.sourceInLca = l, i.targetInLca = g, l == g) {
554
+ i.lca = l.getOwner();
555
+ continue;
556
+ }
557
+ for (n = l.getOwner(); i.lca == null; ) {
558
+ for (i.targetInLca = g, p = g.getOwner(); i.lca == null; ) {
559
+ if (p == n) {
560
+ i.lca = p;
561
+ break;
562
+ }
563
+ if (p == this.rootGraph)
564
+ break;
565
+ if (i.lca != null)
566
+ throw "assert failed";
567
+ i.targetInLca = p.getParent(), p = i.targetInLca.getOwner();
568
+ }
569
+ if (n == this.rootGraph)
570
+ break;
571
+ i.lca == null && (i.sourceInLca = n.getParent(), n = i.sourceInLca.getOwner());
572
+ }
573
+ if (i.lca == null)
574
+ throw "assert failed";
575
+ }
576
+ }, t.prototype.calcLowestCommonAncestor = function(i, l) {
577
+ if (i == l)
578
+ return i.getOwner();
579
+ var g = i.getOwner();
580
+ do {
581
+ if (g == null)
582
+ break;
583
+ var n = l.getOwner();
584
+ do {
585
+ if (n == null)
586
+ break;
587
+ if (n == g)
588
+ return n;
589
+ n = n.getParent().getOwner();
590
+ } while (!0);
591
+ g = g.getParent().getOwner();
592
+ } while (!0);
593
+ return g;
594
+ }, t.prototype.calcInclusionTreeDepths = function(i, l) {
595
+ i == null && l == null && (i = this.rootGraph, l = 1);
596
+ for (var g, n = i.getNodes(), p = n.length, r = 0; r < p; r++)
597
+ g = n[r], g.inclusionTreeDepth = l, g.child != null && this.calcInclusionTreeDepths(g.child, l + 1);
598
+ }, t.prototype.includesInvalidEdge = function() {
599
+ for (var i, l = this.edges.length, g = 0; g < l; g++)
600
+ if (i = this.edges[g], this.isOneAncestorOfOther(i.source, i.target))
601
+ return !0;
602
+ return !1;
603
+ }, N.exports = t;
604
+ }),
605
+ /* 7 */
606
+ /***/
607
+ (function(N, I, L) {
608
+ var o = L(0);
609
+ function e() {
610
+ }
611
+ for (var t in o)
612
+ e[t] = o[t];
613
+ e.MAX_ITERATIONS = 2500, e.DEFAULT_EDGE_LENGTH = 50, e.DEFAULT_SPRING_STRENGTH = 0.45, e.DEFAULT_REPULSION_STRENGTH = 4500, e.DEFAULT_GRAVITY_STRENGTH = 0.4, e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, e.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, e.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, e.COOLING_ADAPTATION_FACTOR = 0.33, e.ADAPTATION_LOWER_NODE_LIMIT = 1e3, e.ADAPTATION_UPPER_NODE_LIMIT = 5e3, e.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, e.MAX_NODE_DISPLACEMENT = e.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, e.MIN_REPULSION_DIST = e.DEFAULT_EDGE_LENGTH / 10, e.CONVERGENCE_CHECK_PERIOD = 100, e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, e.MIN_EDGE_LENGTH = 1, e.GRID_CALCULATION_CHECK_PERIOD = 10, N.exports = e;
614
+ }),
615
+ /* 8 */
616
+ /***/
617
+ (function(N, I, L) {
618
+ var o = L(12);
619
+ function e() {
620
+ }
621
+ e.calcSeparationAmount = function(t, i, l, g) {
622
+ if (!t.intersects(i))
623
+ throw "assert failed";
624
+ var n = new Array(2);
625
+ this.decideDirectionsForOverlappingNodes(t, i, n), l[0] = Math.min(t.getRight(), i.getRight()) - Math.max(t.x, i.x), l[1] = Math.min(t.getBottom(), i.getBottom()) - Math.max(t.y, i.y), t.getX() <= i.getX() && t.getRight() >= i.getRight() ? l[0] += Math.min(i.getX() - t.getX(), t.getRight() - i.getRight()) : i.getX() <= t.getX() && i.getRight() >= t.getRight() && (l[0] += Math.min(t.getX() - i.getX(), i.getRight() - t.getRight())), t.getY() <= i.getY() && t.getBottom() >= i.getBottom() ? l[1] += Math.min(i.getY() - t.getY(), t.getBottom() - i.getBottom()) : i.getY() <= t.getY() && i.getBottom() >= t.getBottom() && (l[1] += Math.min(t.getY() - i.getY(), i.getBottom() - t.getBottom()));
626
+ var p = Math.abs((i.getCenterY() - t.getCenterY()) / (i.getCenterX() - t.getCenterX()));
627
+ i.getCenterY() === t.getCenterY() && i.getCenterX() === t.getCenterX() && (p = 1);
628
+ var r = p * l[0], a = l[1] / p;
629
+ l[0] < a ? a = l[0] : r = l[1], l[0] = -1 * n[0] * (a / 2 + g), l[1] = -1 * n[1] * (r / 2 + g);
630
+ }, e.decideDirectionsForOverlappingNodes = function(t, i, l) {
631
+ t.getCenterX() < i.getCenterX() ? l[0] = -1 : l[0] = 1, t.getCenterY() < i.getCenterY() ? l[1] = -1 : l[1] = 1;
632
+ }, e.getIntersection2 = function(t, i, l) {
633
+ var g = t.getCenterX(), n = t.getCenterY(), p = i.getCenterX(), r = i.getCenterY();
634
+ if (t.intersects(i))
635
+ return l[0] = g, l[1] = n, l[2] = p, l[3] = r, !0;
636
+ var a = t.getX(), h = t.getY(), d = t.getRight(), v = t.getX(), D = t.getBottom(), u = t.getRight(), T = t.getWidthHalf(), y = t.getHeightHalf(), O = i.getX(), s = i.getY(), f = i.getRight(), c = i.getX(), E = i.getBottom(), A = i.getRight(), m = i.getWidthHalf(), C = i.getHeightHalf(), R = !1, M = !1;
637
+ if (g === p) {
638
+ if (n > r)
639
+ return l[0] = g, l[1] = h, l[2] = p, l[3] = E, !1;
640
+ if (n < r)
641
+ return l[0] = g, l[1] = D, l[2] = p, l[3] = s, !1;
642
+ } else if (n === r) {
643
+ if (g > p)
644
+ return l[0] = a, l[1] = n, l[2] = f, l[3] = r, !1;
645
+ if (g < p)
646
+ return l[0] = d, l[1] = n, l[2] = O, l[3] = r, !1;
647
+ } else {
648
+ var S = t.height / t.width, Y = i.height / i.width, w = (r - n) / (p - g), x = void 0, F = void 0, U = void 0, P = void 0, _ = void 0, X = void 0;
649
+ if (-S === w ? g > p ? (l[0] = v, l[1] = D, R = !0) : (l[0] = d, l[1] = h, R = !0) : S === w && (g > p ? (l[0] = a, l[1] = h, R = !0) : (l[0] = u, l[1] = D, R = !0)), -Y === w ? p > g ? (l[2] = c, l[3] = E, M = !0) : (l[2] = f, l[3] = s, M = !0) : Y === w && (p > g ? (l[2] = O, l[3] = s, M = !0) : (l[2] = A, l[3] = E, M = !0)), R && M)
650
+ return !1;
651
+ if (g > p ? n > r ? (x = this.getCardinalDirection(S, w, 4), F = this.getCardinalDirection(Y, w, 2)) : (x = this.getCardinalDirection(-S, w, 3), F = this.getCardinalDirection(-Y, w, 1)) : n > r ? (x = this.getCardinalDirection(-S, w, 1), F = this.getCardinalDirection(-Y, w, 3)) : (x = this.getCardinalDirection(S, w, 2), F = this.getCardinalDirection(Y, w, 4)), !R)
652
+ switch (x) {
653
+ case 1:
654
+ P = h, U = g + -y / w, l[0] = U, l[1] = P;
655
+ break;
656
+ case 2:
657
+ U = u, P = n + T * w, l[0] = U, l[1] = P;
658
+ break;
659
+ case 3:
660
+ P = D, U = g + y / w, l[0] = U, l[1] = P;
661
+ break;
662
+ case 4:
663
+ U = v, P = n + -T * w, l[0] = U, l[1] = P;
664
+ break;
665
+ }
666
+ if (!M)
667
+ switch (F) {
668
+ case 1:
669
+ X = s, _ = p + -C / w, l[2] = _, l[3] = X;
670
+ break;
671
+ case 2:
672
+ _ = A, X = r + m * w, l[2] = _, l[3] = X;
673
+ break;
674
+ case 3:
675
+ X = E, _ = p + C / w, l[2] = _, l[3] = X;
676
+ break;
677
+ case 4:
678
+ _ = c, X = r + -m * w, l[2] = _, l[3] = X;
679
+ break;
680
+ }
681
+ }
682
+ return !1;
683
+ }, e.getCardinalDirection = function(t, i, l) {
684
+ return t > i ? l : 1 + l % 4;
685
+ }, e.getIntersection = function(t, i, l, g) {
686
+ if (g == null)
687
+ return this.getIntersection2(t, i, l);
688
+ var n = t.x, p = t.y, r = i.x, a = i.y, h = l.x, d = l.y, v = g.x, D = g.y, u = void 0, T = void 0, y = void 0, O = void 0, s = void 0, f = void 0, c = void 0, E = void 0, A = void 0;
689
+ return y = a - p, s = n - r, c = r * p - n * a, O = D - d, f = h - v, E = v * d - h * D, A = y * f - O * s, A === 0 ? null : (u = (s * E - f * c) / A, T = (O * c - y * E) / A, new o(u, T));
690
+ }, e.angleOfVector = function(t, i, l, g) {
691
+ var n = void 0;
692
+ return t !== l ? (n = Math.atan((g - i) / (l - t)), l < t ? n += Math.PI : g < i && (n += this.TWO_PI)) : g < i ? n = this.ONE_AND_HALF_PI : n = this.HALF_PI, n;
693
+ }, e.doIntersect = function(t, i, l, g) {
694
+ var n = t.x, p = t.y, r = i.x, a = i.y, h = l.x, d = l.y, v = g.x, D = g.y, u = (r - n) * (D - d) - (v - h) * (a - p);
695
+ if (u === 0)
696
+ return !1;
697
+ var T = ((D - d) * (v - n) + (h - v) * (D - p)) / u, y = ((p - a) * (v - n) + (r - n) * (D - p)) / u;
698
+ return 0 < T && T < 1 && 0 < y && y < 1;
699
+ }, e.HALF_PI = 0.5 * Math.PI, e.ONE_AND_HALF_PI = 1.5 * Math.PI, e.TWO_PI = 2 * Math.PI, e.THREE_PI = 3 * Math.PI, N.exports = e;
700
+ }),
701
+ /* 9 */
702
+ /***/
703
+ (function(N, I, L) {
704
+ function o() {
705
+ }
706
+ o.sign = function(e) {
707
+ return e > 0 ? 1 : e < 0 ? -1 : 0;
708
+ }, o.floor = function(e) {
709
+ return e < 0 ? Math.ceil(e) : Math.floor(e);
710
+ }, o.ceil = function(e) {
711
+ return e < 0 ? Math.floor(e) : Math.ceil(e);
712
+ }, N.exports = o;
713
+ }),
714
+ /* 10 */
715
+ /***/
716
+ (function(N, I, L) {
717
+ function o() {
718
+ }
719
+ o.MAX_VALUE = 2147483647, o.MIN_VALUE = -2147483648, N.exports = o;
720
+ }),
721
+ /* 11 */
722
+ /***/
723
+ (function(N, I, L) {
724
+ var o = /* @__PURE__ */ (function() {
725
+ function n(p, r) {
726
+ for (var a = 0; a < r.length; a++) {
727
+ var h = r[a];
728
+ h.enumerable = h.enumerable || !1, h.configurable = !0, "value" in h && (h.writable = !0), Object.defineProperty(p, h.key, h);
729
+ }
730
+ }
731
+ return function(p, r, a) {
732
+ return r && n(p.prototype, r), a && n(p, a), p;
733
+ };
734
+ })();
735
+ function e(n, p) {
736
+ if (!(n instanceof p))
737
+ throw new TypeError("Cannot call a class as a function");
738
+ }
739
+ var t = function(p) {
740
+ return { value: p, next: null, prev: null };
741
+ }, i = function(p, r, a, h) {
742
+ return p !== null ? p.next = r : h.head = r, a !== null ? a.prev = r : h.tail = r, r.prev = p, r.next = a, h.length++, r;
743
+ }, l = function(p, r) {
744
+ var a = p.prev, h = p.next;
745
+ return a !== null ? a.next = h : r.head = h, h !== null ? h.prev = a : r.tail = a, p.prev = p.next = null, r.length--, p;
746
+ }, g = (function() {
747
+ function n(p) {
748
+ var r = this;
749
+ e(this, n), this.length = 0, this.head = null, this.tail = null, p?.forEach(function(a) {
750
+ return r.push(a);
751
+ });
752
+ }
753
+ return o(n, [{
754
+ key: "size",
755
+ value: function() {
756
+ return this.length;
757
+ }
758
+ }, {
759
+ key: "insertBefore",
760
+ value: function(r, a) {
761
+ return i(a.prev, t(r), a, this);
762
+ }
763
+ }, {
764
+ key: "insertAfter",
765
+ value: function(r, a) {
766
+ return i(a, t(r), a.next, this);
767
+ }
768
+ }, {
769
+ key: "insertNodeBefore",
770
+ value: function(r, a) {
771
+ return i(a.prev, r, a, this);
772
+ }
773
+ }, {
774
+ key: "insertNodeAfter",
775
+ value: function(r, a) {
776
+ return i(a, r, a.next, this);
777
+ }
778
+ }, {
779
+ key: "push",
780
+ value: function(r) {
781
+ return i(this.tail, t(r), null, this);
782
+ }
783
+ }, {
784
+ key: "unshift",
785
+ value: function(r) {
786
+ return i(null, t(r), this.head, this);
787
+ }
788
+ }, {
789
+ key: "remove",
790
+ value: function(r) {
791
+ return l(r, this);
792
+ }
793
+ }, {
794
+ key: "pop",
795
+ value: function() {
796
+ return l(this.tail, this).value;
797
+ }
798
+ }, {
799
+ key: "popNode",
800
+ value: function() {
801
+ return l(this.tail, this);
802
+ }
803
+ }, {
804
+ key: "shift",
805
+ value: function() {
806
+ return l(this.head, this).value;
807
+ }
808
+ }, {
809
+ key: "shiftNode",
810
+ value: function() {
811
+ return l(this.head, this);
812
+ }
813
+ }, {
814
+ key: "get_object_at",
815
+ value: function(r) {
816
+ if (r <= this.length()) {
817
+ for (var a = 1, h = this.head; a < r; )
818
+ h = h.next, a++;
819
+ return h.value;
820
+ }
821
+ }
822
+ }, {
823
+ key: "set_object_at",
824
+ value: function(r, a) {
825
+ if (r <= this.length()) {
826
+ for (var h = 1, d = this.head; h < r; )
827
+ d = d.next, h++;
828
+ d.value = a;
829
+ }
830
+ }
831
+ }]), n;
832
+ })();
833
+ N.exports = g;
834
+ }),
835
+ /* 12 */
836
+ /***/
837
+ (function(N, I, L) {
838
+ function o(e, t, i) {
839
+ this.x = null, this.y = null, e == null && t == null && i == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && i == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && i == null && (i = e, this.x = i.x, this.y = i.y);
840
+ }
841
+ o.prototype.getX = function() {
842
+ return this.x;
843
+ }, o.prototype.getY = function() {
844
+ return this.y;
845
+ }, o.prototype.getLocation = function() {
846
+ return new o(this.x, this.y);
847
+ }, o.prototype.setLocation = function(e, t, i) {
848
+ e.constructor.name == "Point" && t == null && i == null ? (i = e, this.setLocation(i.x, i.y)) : typeof e == "number" && typeof t == "number" && i == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + 0.5), this.y = Math.floor(t + 0.5)));
849
+ }, o.prototype.move = function(e, t) {
850
+ this.x = e, this.y = t;
851
+ }, o.prototype.translate = function(e, t) {
852
+ this.x += e, this.y += t;
853
+ }, o.prototype.equals = function(e) {
854
+ if (e.constructor.name == "Point") {
855
+ var t = e;
856
+ return this.x == t.x && this.y == t.y;
857
+ }
858
+ return this == e;
859
+ }, o.prototype.toString = function() {
860
+ return new o().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
861
+ }, N.exports = o;
862
+ }),
863
+ /* 13 */
864
+ /***/
865
+ (function(N, I, L) {
866
+ function o(e, t, i, l) {
867
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && i != null && l != null && (this.x = e, this.y = t, this.width = i, this.height = l);
868
+ }
869
+ o.prototype.getX = function() {
870
+ return this.x;
871
+ }, o.prototype.setX = function(e) {
872
+ this.x = e;
873
+ }, o.prototype.getY = function() {
874
+ return this.y;
875
+ }, o.prototype.setY = function(e) {
876
+ this.y = e;
877
+ }, o.prototype.getWidth = function() {
878
+ return this.width;
879
+ }, o.prototype.setWidth = function(e) {
880
+ this.width = e;
881
+ }, o.prototype.getHeight = function() {
882
+ return this.height;
883
+ }, o.prototype.setHeight = function(e) {
884
+ this.height = e;
885
+ }, o.prototype.getRight = function() {
886
+ return this.x + this.width;
887
+ }, o.prototype.getBottom = function() {
888
+ return this.y + this.height;
889
+ }, o.prototype.intersects = function(e) {
890
+ return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
891
+ }, o.prototype.getCenterX = function() {
892
+ return this.x + this.width / 2;
893
+ }, o.prototype.getMinX = function() {
894
+ return this.getX();
895
+ }, o.prototype.getMaxX = function() {
896
+ return this.getX() + this.width;
897
+ }, o.prototype.getCenterY = function() {
898
+ return this.y + this.height / 2;
899
+ }, o.prototype.getMinY = function() {
900
+ return this.getY();
901
+ }, o.prototype.getMaxY = function() {
902
+ return this.getY() + this.height;
903
+ }, o.prototype.getWidthHalf = function() {
904
+ return this.width / 2;
905
+ }, o.prototype.getHeightHalf = function() {
906
+ return this.height / 2;
907
+ }, N.exports = o;
908
+ }),
909
+ /* 14 */
910
+ /***/
911
+ (function(N, I, L) {
912
+ var o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
913
+ return typeof t;
914
+ } : function(t) {
915
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
916
+ };
917
+ function e() {
918
+ }
919
+ e.lastID = 0, e.createID = function(t) {
920
+ return e.isPrimitive(t) ? t : (t.uniqueID != null || (t.uniqueID = e.getString(), e.lastID++), t.uniqueID);
921
+ }, e.getString = function(t) {
922
+ return t == null && (t = e.lastID), "Object#" + t;
923
+ }, e.isPrimitive = function(t) {
924
+ var i = typeof t > "u" ? "undefined" : o(t);
925
+ return t == null || i != "object" && i != "function";
926
+ }, N.exports = e;
927
+ }),
928
+ /* 15 */
929
+ /***/
930
+ (function(N, I, L) {
931
+ function o(h) {
932
+ if (Array.isArray(h)) {
933
+ for (var d = 0, v = Array(h.length); d < h.length; d++)
934
+ v[d] = h[d];
935
+ return v;
936
+ } else
937
+ return Array.from(h);
938
+ }
939
+ var e = L(0), t = L(6), i = L(3), l = L(1), g = L(5), n = L(4), p = L(17), r = L(27);
940
+ function a(h) {
941
+ r.call(this), this.layoutQuality = e.QUALITY, this.createBendsAsNeeded = e.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = e.DEFAULT_INCREMENTAL, this.animationOnLayout = e.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = e.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = e.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = e.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new t(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, h != null && (this.isRemoteUse = h);
942
+ }
943
+ a.RANDOM_SEED = 1, a.prototype = Object.create(r.prototype), a.prototype.getGraphManager = function() {
944
+ return this.graphManager;
945
+ }, a.prototype.getAllNodes = function() {
946
+ return this.graphManager.getAllNodes();
947
+ }, a.prototype.getAllEdges = function() {
948
+ return this.graphManager.getAllEdges();
949
+ }, a.prototype.getAllNodesToApplyGravitation = function() {
950
+ return this.graphManager.getAllNodesToApplyGravitation();
951
+ }, a.prototype.newGraphManager = function() {
952
+ var h = new t(this);
953
+ return this.graphManager = h, h;
954
+ }, a.prototype.newGraph = function(h) {
955
+ return new g(null, this.graphManager, h);
956
+ }, a.prototype.newNode = function(h) {
957
+ return new i(this.graphManager, h);
958
+ }, a.prototype.newEdge = function(h) {
959
+ return new l(null, null, h);
960
+ }, a.prototype.checkLayoutSuccess = function() {
961
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
962
+ }, a.prototype.runLayout = function() {
963
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
964
+ var h;
965
+ return this.checkLayoutSuccess() ? h = !1 : h = this.layout(), e.ANIMATE === "during" ? !1 : (h && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, h);
966
+ }, a.prototype.doPostLayout = function() {
967
+ this.incremental || this.transform(), this.update();
968
+ }, a.prototype.update2 = function() {
969
+ this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), this.isRemoteUse || (this.graphManager.getAllEdges(), this.graphManager.getRoot().getNodes(), this.update(this.graphManager.getRoot()));
970
+ }, a.prototype.update = function(h) {
971
+ if (h == null)
972
+ this.update2();
973
+ else if (h instanceof i) {
974
+ var d = h;
975
+ if (d.getChild() != null)
976
+ for (var v = d.getChild().getNodes(), D = 0; D < v.length; D++)
977
+ update(v[D]);
978
+ if (d.vGraphObject != null) {
979
+ var u = d.vGraphObject;
980
+ u.update(d);
981
+ }
982
+ } else if (h instanceof l) {
983
+ var T = h;
984
+ if (T.vGraphObject != null) {
985
+ var y = T.vGraphObject;
986
+ y.update(T);
987
+ }
988
+ } else if (h instanceof g) {
989
+ var O = h;
990
+ if (O.vGraphObject != null) {
991
+ var s = O.vGraphObject;
992
+ s.update(O);
993
+ }
994
+ }
995
+ }, a.prototype.initParameters = function() {
996
+ this.isSubLayout || (this.layoutQuality = e.QUALITY, this.animationDuringLayout = e.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = e.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = e.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = e.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = e.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = e.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
997
+ }, a.prototype.transform = function(h) {
998
+ if (h == null)
999
+ this.transform(new n(0, 0));
1000
+ else {
1001
+ var d = new p(), v = this.graphManager.getRoot().updateLeftTop();
1002
+ if (v != null) {
1003
+ d.setWorldOrgX(h.x), d.setWorldOrgY(h.y), d.setDeviceOrgX(v.x), d.setDeviceOrgY(v.y);
1004
+ for (var D = this.getAllNodes(), u, T = 0; T < D.length; T++)
1005
+ u = D[T], u.transform(d);
1006
+ }
1007
+ }
1008
+ }, a.prototype.positionNodesRandomly = function(h) {
1009
+ if (h == null)
1010
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1011
+ else
1012
+ for (var d, v, D = h.getNodes(), u = 0; u < D.length; u++)
1013
+ d = D[u], v = d.getChild(), v == null || v.getNodes().length == 0 ? d.scatter() : (this.positionNodesRandomly(v), d.updateBounds());
1014
+ }, a.prototype.getFlatForest = function() {
1015
+ for (var h = [], d = !0, v = this.graphManager.getRoot().getNodes(), D = !0, u = 0; u < v.length; u++)
1016
+ v[u].getChild() != null && (D = !1);
1017
+ if (!D)
1018
+ return h;
1019
+ var T = /* @__PURE__ */ new Set(), y = [], O = /* @__PURE__ */ new Map(), s = [];
1020
+ for (s = s.concat(v); s.length > 0 && d; ) {
1021
+ for (y.push(s[0]); y.length > 0 && d; ) {
1022
+ var f = y[0];
1023
+ y.splice(0, 1), T.add(f);
1024
+ for (var c = f.getEdges(), u = 0; u < c.length; u++) {
1025
+ var E = c[u].getOtherEnd(f);
1026
+ if (O.get(f) != E)
1027
+ if (!T.has(E))
1028
+ y.push(E), O.set(E, f);
1029
+ else {
1030
+ d = !1;
1031
+ break;
1032
+ }
1033
+ }
1034
+ }
1035
+ if (!d)
1036
+ h = [];
1037
+ else {
1038
+ var A = [].concat(o(T));
1039
+ h.push(A);
1040
+ for (var u = 0; u < A.length; u++) {
1041
+ var m = A[u], C = s.indexOf(m);
1042
+ C > -1 && s.splice(C, 1);
1043
+ }
1044
+ T = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Map();
1045
+ }
1046
+ }
1047
+ return h;
1048
+ }, a.prototype.createDummyNodesForBendpoints = function(h) {
1049
+ for (var d = [], v = h.source, D = this.graphManager.calcLowestCommonAncestor(h.source, h.target), u = 0; u < h.bendpoints.length; u++) {
1050
+ var T = this.newNode(null);
1051
+ T.setRect(new Point(0, 0), new Dimension(1, 1)), D.add(T);
1052
+ var y = this.newEdge(null);
1053
+ this.graphManager.add(y, v, T), d.add(T), v = T;
1054
+ }
1055
+ var y = this.newEdge(null);
1056
+ return this.graphManager.add(y, v, h.target), this.edgeToDummyNodes.set(h, d), h.isInterGraph() ? this.graphManager.remove(h) : D.remove(h), d;
1057
+ }, a.prototype.createBendpointsFromDummyNodes = function() {
1058
+ var h = [];
1059
+ h = h.concat(this.graphManager.getAllEdges()), h = [].concat(o(this.edgeToDummyNodes.keys())).concat(h);
1060
+ for (var d = 0; d < h.length; d++) {
1061
+ var v = h[d];
1062
+ if (v.bendpoints.length > 0) {
1063
+ for (var D = this.edgeToDummyNodes.get(v), u = 0; u < D.length; u++) {
1064
+ var T = D[u], y = new n(T.getCenterX(), T.getCenterY()), O = v.bendpoints.get(u);
1065
+ O.x = y.x, O.y = y.y, T.getOwner().remove(T);
1066
+ }
1067
+ this.graphManager.add(v, v.source, v.target);
1068
+ }
1069
+ }
1070
+ }, a.transform = function(h, d, v, D) {
1071
+ if (v != null && D != null) {
1072
+ var u = d;
1073
+ if (h <= 50) {
1074
+ var T = d / v;
1075
+ u -= (d - T) / 50 * (50 - h);
1076
+ } else {
1077
+ var y = d * D;
1078
+ u += (y - d) / 50 * (h - 50);
1079
+ }
1080
+ return u;
1081
+ } else {
1082
+ var O, s;
1083
+ return h <= 50 ? (O = 9 * d / 500, s = d / 10) : (O = 9 * d / 50, s = -8 * d), O * h + s;
1084
+ }
1085
+ }, a.findCenterOfTree = function(h) {
1086
+ var d = [];
1087
+ d = d.concat(h);
1088
+ var v = [], D = /* @__PURE__ */ new Map(), u = !1, T = null;
1089
+ (d.length == 1 || d.length == 2) && (u = !0, T = d[0]);
1090
+ for (var y = 0; y < d.length; y++) {
1091
+ var O = d[y], s = O.getNeighborsList().size;
1092
+ D.set(O, O.getNeighborsList().size), s == 1 && v.push(O);
1093
+ }
1094
+ var f = [];
1095
+ for (f = f.concat(v); !u; ) {
1096
+ var c = [];
1097
+ c = c.concat(f), f = [];
1098
+ for (var y = 0; y < d.length; y++) {
1099
+ var O = d[y], E = d.indexOf(O);
1100
+ E >= 0 && d.splice(E, 1);
1101
+ var A = O.getNeighborsList();
1102
+ A.forEach(function(R) {
1103
+ if (v.indexOf(R) < 0) {
1104
+ var M = D.get(R), S = M - 1;
1105
+ S == 1 && f.push(R), D.set(R, S);
1106
+ }
1107
+ });
1108
+ }
1109
+ v = v.concat(f), (d.length == 1 || d.length == 2) && (u = !0, T = d[0]);
1110
+ }
1111
+ return T;
1112
+ }, a.prototype.setGraphManager = function(h) {
1113
+ this.graphManager = h;
1114
+ }, N.exports = a;
1115
+ }),
1116
+ /* 16 */
1117
+ /***/
1118
+ (function(N, I, L) {
1119
+ function o() {
1120
+ }
1121
+ o.seed = 1, o.x = 0, o.nextDouble = function() {
1122
+ return o.x = Math.sin(o.seed++) * 1e4, o.x - Math.floor(o.x);
1123
+ }, N.exports = o;
1124
+ }),
1125
+ /* 17 */
1126
+ /***/
1127
+ (function(N, I, L) {
1128
+ var o = L(4);
1129
+ function e(t, i) {
1130
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1131
+ }
1132
+ e.prototype.getWorldOrgX = function() {
1133
+ return this.lworldOrgX;
1134
+ }, e.prototype.setWorldOrgX = function(t) {
1135
+ this.lworldOrgX = t;
1136
+ }, e.prototype.getWorldOrgY = function() {
1137
+ return this.lworldOrgY;
1138
+ }, e.prototype.setWorldOrgY = function(t) {
1139
+ this.lworldOrgY = t;
1140
+ }, e.prototype.getWorldExtX = function() {
1141
+ return this.lworldExtX;
1142
+ }, e.prototype.setWorldExtX = function(t) {
1143
+ this.lworldExtX = t;
1144
+ }, e.prototype.getWorldExtY = function() {
1145
+ return this.lworldExtY;
1146
+ }, e.prototype.setWorldExtY = function(t) {
1147
+ this.lworldExtY = t;
1148
+ }, e.prototype.getDeviceOrgX = function() {
1149
+ return this.ldeviceOrgX;
1150
+ }, e.prototype.setDeviceOrgX = function(t) {
1151
+ this.ldeviceOrgX = t;
1152
+ }, e.prototype.getDeviceOrgY = function() {
1153
+ return this.ldeviceOrgY;
1154
+ }, e.prototype.setDeviceOrgY = function(t) {
1155
+ this.ldeviceOrgY = t;
1156
+ }, e.prototype.getDeviceExtX = function() {
1157
+ return this.ldeviceExtX;
1158
+ }, e.prototype.setDeviceExtX = function(t) {
1159
+ this.ldeviceExtX = t;
1160
+ }, e.prototype.getDeviceExtY = function() {
1161
+ return this.ldeviceExtY;
1162
+ }, e.prototype.setDeviceExtY = function(t) {
1163
+ this.ldeviceExtY = t;
1164
+ }, e.prototype.transformX = function(t) {
1165
+ var i = 0, l = this.lworldExtX;
1166
+ return l != 0 && (i = this.ldeviceOrgX + (t - this.lworldOrgX) * this.ldeviceExtX / l), i;
1167
+ }, e.prototype.transformY = function(t) {
1168
+ var i = 0, l = this.lworldExtY;
1169
+ return l != 0 && (i = this.ldeviceOrgY + (t - this.lworldOrgY) * this.ldeviceExtY / l), i;
1170
+ }, e.prototype.inverseTransformX = function(t) {
1171
+ var i = 0, l = this.ldeviceExtX;
1172
+ return l != 0 && (i = this.lworldOrgX + (t - this.ldeviceOrgX) * this.lworldExtX / l), i;
1173
+ }, e.prototype.inverseTransformY = function(t) {
1174
+ var i = 0, l = this.ldeviceExtY;
1175
+ return l != 0 && (i = this.lworldOrgY + (t - this.ldeviceOrgY) * this.lworldExtY / l), i;
1176
+ }, e.prototype.inverseTransformPoint = function(t) {
1177
+ var i = new o(this.inverseTransformX(t.x), this.inverseTransformY(t.y));
1178
+ return i;
1179
+ }, N.exports = e;
1180
+ }),
1181
+ /* 18 */
1182
+ /***/
1183
+ (function(N, I, L) {
1184
+ function o(r) {
1185
+ if (Array.isArray(r)) {
1186
+ for (var a = 0, h = Array(r.length); a < r.length; a++)
1187
+ h[a] = r[a];
1188
+ return h;
1189
+ } else
1190
+ return Array.from(r);
1191
+ }
1192
+ var e = L(15), t = L(7), i = L(0), l = L(8), g = L(9);
1193
+ function n() {
1194
+ e.call(this), this.useSmartIdealEdgeLengthCalculation = t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = t.DEFAULT_EDGE_LENGTH, this.springConstant = t.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = t.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = t.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = t.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * t.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = t.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = t.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = t.MAX_ITERATIONS;
1195
+ }
1196
+ n.prototype = Object.create(e.prototype);
1197
+ for (var p in e)
1198
+ n[p] = e[p];
1199
+ n.prototype.initParameters = function() {
1200
+ e.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1201
+ }, n.prototype.calcIdealEdgeLengths = function() {
1202
+ for (var r, a, h, d, v, D, u = this.getGraphManager().getAllEdges(), T = 0; T < u.length; T++)
1203
+ r = u[T], r.idealLength = this.idealEdgeLength, r.isInterGraph && (h = r.getSource(), d = r.getTarget(), v = r.getSourceInLca().getEstimatedSize(), D = r.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (r.idealLength += v + D - 2 * i.SIMPLE_NODE_SIZE), a = r.getLca().getInclusionTreeDepth(), r.idealLength += t.DEFAULT_EDGE_LENGTH * t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (h.getInclusionTreeDepth() + d.getInclusionTreeDepth() - 2 * a));
1204
+ }, n.prototype.initSpringEmbedder = function() {
1205
+ var r = this.getAllNodes().length;
1206
+ this.incremental ? (r > t.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * t.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (r - t.ADAPTATION_LOWER_NODE_LIMIT) / (t.ADAPTATION_UPPER_NODE_LIMIT - t.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - t.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = t.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (r > t.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(t.COOLING_ADAPTATION_FACTOR, 1 - (r - t.ADAPTATION_LOWER_NODE_LIMIT) / (t.ADAPTATION_UPPER_NODE_LIMIT - t.ADAPTATION_LOWER_NODE_LIMIT) * (1 - t.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = t.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1207
+ }, n.prototype.calcSpringForces = function() {
1208
+ for (var r = this.getAllEdges(), a, h = 0; h < r.length; h++)
1209
+ a = r[h], this.calcSpringForce(a, a.idealLength);
1210
+ }, n.prototype.calcRepulsionForces = function() {
1211
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, h, d, v, D, u = this.getAllNodes(), T;
1212
+ if (this.useFRGridVariant)
1213
+ for (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && r && this.updateGrid(), T = /* @__PURE__ */ new Set(), h = 0; h < u.length; h++)
1214
+ v = u[h], this.calculateRepulsionForceOfANode(v, T, r, a), T.add(v);
1215
+ else
1216
+ for (h = 0; h < u.length; h++)
1217
+ for (v = u[h], d = h + 1; d < u.length; d++)
1218
+ D = u[d], v.getOwner() == D.getOwner() && this.calcRepulsionForce(v, D);
1219
+ }, n.prototype.calcGravitationalForces = function() {
1220
+ for (var r, a = this.getAllNodesToApplyGravitation(), h = 0; h < a.length; h++)
1221
+ r = a[h], this.calcGravitationalForce(r);
1222
+ }, n.prototype.moveNodes = function() {
1223
+ for (var r = this.getAllNodes(), a, h = 0; h < r.length; h++)
1224
+ a = r[h], a.move();
1225
+ }, n.prototype.calcSpringForce = function(r, a) {
1226
+ var h = r.getSource(), d = r.getTarget(), v, D, u, T;
1227
+ if (this.uniformLeafNodeSizes && h.getChild() == null && d.getChild() == null)
1228
+ r.updateLengthSimple();
1229
+ else if (r.updateLength(), r.isOverlapingSourceAndTarget)
1230
+ return;
1231
+ v = r.getLength(), v != 0 && (D = this.springConstant * (v - a), u = D * (r.lengthX / v), T = D * (r.lengthY / v), h.springForceX += u, h.springForceY += T, d.springForceX -= u, d.springForceY -= T);
1232
+ }, n.prototype.calcRepulsionForce = function(r, a) {
1233
+ var h = r.getRect(), d = a.getRect(), v = new Array(2), D = new Array(4), u, T, y, O, s, f, c;
1234
+ if (h.intersects(d)) {
1235
+ l.calcSeparationAmount(h, d, v, t.DEFAULT_EDGE_LENGTH / 2), f = 2 * v[0], c = 2 * v[1];
1236
+ var E = r.noOfChildren * a.noOfChildren / (r.noOfChildren + a.noOfChildren);
1237
+ r.repulsionForceX -= E * f, r.repulsionForceY -= E * c, a.repulsionForceX += E * f, a.repulsionForceY += E * c;
1238
+ } else
1239
+ this.uniformLeafNodeSizes && r.getChild() == null && a.getChild() == null ? (u = d.getCenterX() - h.getCenterX(), T = d.getCenterY() - h.getCenterY()) : (l.getIntersection(h, d, D), u = D[2] - D[0], T = D[3] - D[1]), Math.abs(u) < t.MIN_REPULSION_DIST && (u = g.sign(u) * t.MIN_REPULSION_DIST), Math.abs(T) < t.MIN_REPULSION_DIST && (T = g.sign(T) * t.MIN_REPULSION_DIST), y = u * u + T * T, O = Math.sqrt(y), s = this.repulsionConstant * r.noOfChildren * a.noOfChildren / y, f = s * u / O, c = s * T / O, r.repulsionForceX -= f, r.repulsionForceY -= c, a.repulsionForceX += f, a.repulsionForceY += c;
1240
+ }, n.prototype.calcGravitationalForce = function(r) {
1241
+ var a, h, d, v, D, u, T, y;
1242
+ a = r.getOwner(), h = (a.getRight() + a.getLeft()) / 2, d = (a.getTop() + a.getBottom()) / 2, v = r.getCenterX() - h, D = r.getCenterY() - d, u = Math.abs(v) + r.getWidth() / 2, T = Math.abs(D) + r.getHeight() / 2, r.getOwner() == this.graphManager.getRoot() ? (y = a.getEstimatedSize() * this.gravityRangeFactor, (u > y || T > y) && (r.gravitationForceX = -this.gravityConstant * v, r.gravitationForceY = -this.gravityConstant * D)) : (y = a.getEstimatedSize() * this.compoundGravityRangeFactor, (u > y || T > y) && (r.gravitationForceX = -this.gravityConstant * v * this.compoundGravityConstant, r.gravitationForceY = -this.gravityConstant * D * this.compoundGravityConstant));
1243
+ }, n.prototype.isConverged = function() {
1244
+ var r, a = !1;
1245
+ return this.totalIterations > this.maxIterations / 3 && (a = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), r = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, r || a;
1246
+ }, n.prototype.animate = function() {
1247
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1248
+ }, n.prototype.calcNoOfChildrenForAllNodes = function() {
1249
+ for (var r, a = this.graphManager.getAllNodes(), h = 0; h < a.length; h++)
1250
+ r = a[h], r.noOfChildren = r.getNoOfChildren();
1251
+ }, n.prototype.calcGrid = function(r) {
1252
+ var a = 0, h = 0;
1253
+ a = parseInt(Math.ceil((r.getRight() - r.getLeft()) / this.repulsionRange)), h = parseInt(Math.ceil((r.getBottom() - r.getTop()) / this.repulsionRange));
1254
+ for (var d = new Array(a), v = 0; v < a; v++)
1255
+ d[v] = new Array(h);
1256
+ for (var v = 0; v < a; v++)
1257
+ for (var D = 0; D < h; D++)
1258
+ d[v][D] = new Array();
1259
+ return d;
1260
+ }, n.prototype.addNodeToGrid = function(r, a, h) {
1261
+ var d = 0, v = 0, D = 0, u = 0;
1262
+ d = parseInt(Math.floor((r.getRect().x - a) / this.repulsionRange)), v = parseInt(Math.floor((r.getRect().width + r.getRect().x - a) / this.repulsionRange)), D = parseInt(Math.floor((r.getRect().y - h) / this.repulsionRange)), u = parseInt(Math.floor((r.getRect().height + r.getRect().y - h) / this.repulsionRange));
1263
+ for (var T = d; T <= v; T++)
1264
+ for (var y = D; y <= u; y++)
1265
+ this.grid[T][y].push(r), r.setGridCoordinates(d, v, D, u);
1266
+ }, n.prototype.updateGrid = function() {
1267
+ var r, a, h = this.getAllNodes();
1268
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), r = 0; r < h.length; r++)
1269
+ a = h[r], this.addNodeToGrid(a, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1270
+ }, n.prototype.calculateRepulsionForceOfANode = function(r, a, h, d) {
1271
+ if (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && h || d) {
1272
+ var v = /* @__PURE__ */ new Set();
1273
+ r.surrounding = new Array();
1274
+ for (var D, u = this.grid, T = r.startX - 1; T < r.finishX + 2; T++)
1275
+ for (var y = r.startY - 1; y < r.finishY + 2; y++)
1276
+ if (!(T < 0 || y < 0 || T >= u.length || y >= u[0].length)) {
1277
+ for (var O = 0; O < u[T][y].length; O++)
1278
+ if (D = u[T][y][O], !(r.getOwner() != D.getOwner() || r == D) && !a.has(D) && !v.has(D)) {
1279
+ var s = Math.abs(r.getCenterX() - D.getCenterX()) - (r.getWidth() / 2 + D.getWidth() / 2), f = Math.abs(r.getCenterY() - D.getCenterY()) - (r.getHeight() / 2 + D.getHeight() / 2);
1280
+ s <= this.repulsionRange && f <= this.repulsionRange && v.add(D);
1281
+ }
1282
+ }
1283
+ r.surrounding = [].concat(o(v));
1284
+ }
1285
+ for (T = 0; T < r.surrounding.length; T++)
1286
+ this.calcRepulsionForce(r, r.surrounding[T]);
1287
+ }, n.prototype.calcRepulsionRange = function() {
1288
+ return 0;
1289
+ }, N.exports = n;
1290
+ }),
1291
+ /* 19 */
1292
+ /***/
1293
+ (function(N, I, L) {
1294
+ var o = L(1), e = L(7);
1295
+ function t(l, g, n) {
1296
+ o.call(this, l, g, n), this.idealLength = e.DEFAULT_EDGE_LENGTH;
1297
+ }
1298
+ t.prototype = Object.create(o.prototype);
1299
+ for (var i in o)
1300
+ t[i] = o[i];
1301
+ N.exports = t;
1302
+ }),
1303
+ /* 20 */
1304
+ /***/
1305
+ (function(N, I, L) {
1306
+ var o = L(3);
1307
+ function e(i, l, g, n) {
1308
+ o.call(this, i, l, g, n), 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 = [];
1309
+ }
1310
+ e.prototype = Object.create(o.prototype);
1311
+ for (var t in o)
1312
+ e[t] = o[t];
1313
+ e.prototype.setGridCoordinates = function(i, l, g, n) {
1314
+ this.startX = i, this.finishX = l, this.startY = g, this.finishY = n;
1315
+ }, N.exports = e;
1316
+ }),
1317
+ /* 21 */
1318
+ /***/
1319
+ (function(N, I, L) {
1320
+ function o(e, t) {
1321
+ this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1322
+ }
1323
+ o.prototype.getWidth = function() {
1324
+ return this.width;
1325
+ }, o.prototype.setWidth = function(e) {
1326
+ this.width = e;
1327
+ }, o.prototype.getHeight = function() {
1328
+ return this.height;
1329
+ }, o.prototype.setHeight = function(e) {
1330
+ this.height = e;
1331
+ }, N.exports = o;
1332
+ }),
1333
+ /* 22 */
1334
+ /***/
1335
+ (function(N, I, L) {
1336
+ var o = L(14);
1337
+ function e() {
1338
+ this.map = {}, this.keys = [];
1339
+ }
1340
+ e.prototype.put = function(t, i) {
1341
+ var l = o.createID(t);
1342
+ this.contains(l) || (this.map[l] = i, this.keys.push(t));
1343
+ }, e.prototype.contains = function(t) {
1344
+ return o.createID(t), this.map[t] != null;
1345
+ }, e.prototype.get = function(t) {
1346
+ var i = o.createID(t);
1347
+ return this.map[i];
1348
+ }, e.prototype.keySet = function() {
1349
+ return this.keys;
1350
+ }, N.exports = e;
1351
+ }),
1352
+ /* 23 */
1353
+ /***/
1354
+ (function(N, I, L) {
1355
+ var o = L(14);
1356
+ function e() {
1357
+ this.set = {};
1358
+ }
1359
+ e.prototype.add = function(t) {
1360
+ var i = o.createID(t);
1361
+ this.contains(i) || (this.set[i] = t);
1362
+ }, e.prototype.remove = function(t) {
1363
+ delete this.set[o.createID(t)];
1364
+ }, e.prototype.clear = function() {
1365
+ this.set = {};
1366
+ }, e.prototype.contains = function(t) {
1367
+ return this.set[o.createID(t)] == t;
1368
+ }, e.prototype.isEmpty = function() {
1369
+ return this.size() === 0;
1370
+ }, e.prototype.size = function() {
1371
+ return Object.keys(this.set).length;
1372
+ }, e.prototype.addAllTo = function(t) {
1373
+ for (var i = Object.keys(this.set), l = i.length, g = 0; g < l; g++)
1374
+ t.push(this.set[i[g]]);
1375
+ }, e.prototype.size = function() {
1376
+ return Object.keys(this.set).length;
1377
+ }, e.prototype.addAll = function(t) {
1378
+ for (var i = t.length, l = 0; l < i; l++) {
1379
+ var g = t[l];
1380
+ this.add(g);
1381
+ }
1382
+ }, N.exports = e;
1383
+ }),
1384
+ /* 24 */
1385
+ /***/
1386
+ (function(N, I, L) {
1387
+ var o = /* @__PURE__ */ (function() {
1388
+ function l(g, n) {
1389
+ for (var p = 0; p < n.length; p++) {
1390
+ var r = n[p];
1391
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(g, r.key, r);
1392
+ }
1393
+ }
1394
+ return function(g, n, p) {
1395
+ return n && l(g.prototype, n), p && l(g, p), g;
1396
+ };
1397
+ })();
1398
+ function e(l, g) {
1399
+ if (!(l instanceof g))
1400
+ throw new TypeError("Cannot call a class as a function");
1401
+ }
1402
+ var t = L(11), i = (function() {
1403
+ function l(g, n) {
1404
+ e(this, l), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1405
+ var p = void 0;
1406
+ g instanceof t ? p = g.size() : p = g.length, this._quicksort(g, 0, p - 1);
1407
+ }
1408
+ return o(l, [{
1409
+ key: "_quicksort",
1410
+ value: function(n, p, r) {
1411
+ if (p < r) {
1412
+ var a = this._partition(n, p, r);
1413
+ this._quicksort(n, p, a), this._quicksort(n, a + 1, r);
1414
+ }
1415
+ }
1416
+ }, {
1417
+ key: "_partition",
1418
+ value: function(n, p, r) {
1419
+ for (var a = this._get(n, p), h = p, d = r; ; ) {
1420
+ for (; this.compareFunction(a, this._get(n, d)); )
1421
+ d--;
1422
+ for (; this.compareFunction(this._get(n, h), a); )
1423
+ h++;
1424
+ if (h < d)
1425
+ this._swap(n, h, d), h++, d--;
1426
+ else return d;
1427
+ }
1428
+ }
1429
+ }, {
1430
+ key: "_get",
1431
+ value: function(n, p) {
1432
+ return n instanceof t ? n.get_object_at(p) : n[p];
1433
+ }
1434
+ }, {
1435
+ key: "_set",
1436
+ value: function(n, p, r) {
1437
+ n instanceof t ? n.set_object_at(p, r) : n[p] = r;
1438
+ }
1439
+ }, {
1440
+ key: "_swap",
1441
+ value: function(n, p, r) {
1442
+ var a = this._get(n, p);
1443
+ this._set(n, p, this._get(n, r)), this._set(n, r, a);
1444
+ }
1445
+ }, {
1446
+ key: "_defaultCompareFunction",
1447
+ value: function(n, p) {
1448
+ return p > n;
1449
+ }
1450
+ }]), l;
1451
+ })();
1452
+ N.exports = i;
1453
+ }),
1454
+ /* 25 */
1455
+ /***/
1456
+ (function(N, I, L) {
1457
+ var o = /* @__PURE__ */ (function() {
1458
+ function i(l, g) {
1459
+ for (var n = 0; n < g.length; n++) {
1460
+ var p = g[n];
1461
+ p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(l, p.key, p);
1462
+ }
1463
+ }
1464
+ return function(l, g, n) {
1465
+ return g && i(l.prototype, g), n && i(l, n), l;
1466
+ };
1467
+ })();
1468
+ function e(i, l) {
1469
+ if (!(i instanceof l))
1470
+ throw new TypeError("Cannot call a class as a function");
1471
+ }
1472
+ var t = (function() {
1473
+ function i(l, g) {
1474
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, p = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1475
+ e(this, i), this.sequence1 = l, this.sequence2 = g, this.match_score = n, this.mismatch_penalty = p, this.gap_penalty = r, this.iMax = l.length + 1, this.jMax = g.length + 1, this.grid = new Array(this.iMax);
1476
+ for (var a = 0; a < this.iMax; a++) {
1477
+ this.grid[a] = new Array(this.jMax);
1478
+ for (var h = 0; h < this.jMax; h++)
1479
+ this.grid[a][h] = 0;
1480
+ }
1481
+ this.tracebackGrid = new Array(this.iMax);
1482
+ for (var d = 0; d < this.iMax; d++) {
1483
+ this.tracebackGrid[d] = new Array(this.jMax);
1484
+ for (var v = 0; v < this.jMax; v++)
1485
+ this.tracebackGrid[d][v] = [null, null, null];
1486
+ }
1487
+ this.alignments = [], this.score = -1, this.computeGrids();
1488
+ }
1489
+ return o(i, [{
1490
+ key: "getScore",
1491
+ value: function() {
1492
+ return this.score;
1493
+ }
1494
+ }, {
1495
+ key: "getAlignments",
1496
+ value: function() {
1497
+ return this.alignments;
1498
+ }
1499
+ // Main dynamic programming procedure
1500
+ }, {
1501
+ key: "computeGrids",
1502
+ value: function() {
1503
+ for (var g = 1; g < this.jMax; g++)
1504
+ this.grid[0][g] = this.grid[0][g - 1] + this.gap_penalty, this.tracebackGrid[0][g] = [!1, !1, !0];
1505
+ for (var n = 1; n < this.iMax; n++)
1506
+ this.grid[n][0] = this.grid[n - 1][0] + this.gap_penalty, this.tracebackGrid[n][0] = [!1, !0, !1];
1507
+ for (var p = 1; p < this.iMax; p++)
1508
+ for (var r = 1; r < this.jMax; r++) {
1509
+ var a = void 0;
1510
+ this.sequence1[p - 1] === this.sequence2[r - 1] ? a = this.grid[p - 1][r - 1] + this.match_score : a = this.grid[p - 1][r - 1] + this.mismatch_penalty;
1511
+ var h = this.grid[p - 1][r] + this.gap_penalty, d = this.grid[p][r - 1] + this.gap_penalty, v = [a, h, d], D = this.arrayAllMaxIndexes(v);
1512
+ this.grid[p][r] = v[D[0]], this.tracebackGrid[p][r] = [D.includes(0), D.includes(1), D.includes(2)];
1513
+ }
1514
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1515
+ }
1516
+ // Gets all possible valid sequence combinations
1517
+ }, {
1518
+ key: "alignmentTraceback",
1519
+ value: function() {
1520
+ var g = [];
1521
+ for (g.push({
1522
+ pos: [this.sequence1.length, this.sequence2.length],
1523
+ seq1: "",
1524
+ seq2: ""
1525
+ }); g[0]; ) {
1526
+ var n = g[0], p = this.tracebackGrid[n.pos[0]][n.pos[1]];
1527
+ p[0] && g.push({
1528
+ pos: [n.pos[0] - 1, n.pos[1] - 1],
1529
+ seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1530
+ seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1531
+ }), p[1] && g.push({
1532
+ pos: [n.pos[0] - 1, n.pos[1]],
1533
+ seq1: this.sequence1[n.pos[0] - 1] + n.seq1,
1534
+ seq2: "-" + n.seq2
1535
+ }), p[2] && g.push({
1536
+ pos: [n.pos[0], n.pos[1] - 1],
1537
+ seq1: "-" + n.seq1,
1538
+ seq2: this.sequence2[n.pos[1] - 1] + n.seq2
1539
+ }), n.pos[0] === 0 && n.pos[1] === 0 && this.alignments.push({
1540
+ sequence1: n.seq1,
1541
+ sequence2: n.seq2
1542
+ }), g.shift();
1543
+ }
1544
+ return this.alignments;
1545
+ }
1546
+ // Helper Functions
1547
+ }, {
1548
+ key: "getAllIndexes",
1549
+ value: function(g, n) {
1550
+ for (var p = [], r = -1; (r = g.indexOf(n, r + 1)) !== -1; )
1551
+ p.push(r);
1552
+ return p;
1553
+ }
1554
+ }, {
1555
+ key: "arrayAllMaxIndexes",
1556
+ value: function(g) {
1557
+ return this.getAllIndexes(g, Math.max.apply(null, g));
1558
+ }
1559
+ }]), i;
1560
+ })();
1561
+ N.exports = t;
1562
+ }),
1563
+ /* 26 */
1564
+ /***/
1565
+ (function(N, I, L) {
1566
+ var o = function() {
1567
+ };
1568
+ o.FDLayout = L(18), o.FDLayoutConstants = L(7), o.FDLayoutEdge = L(19), o.FDLayoutNode = L(20), o.DimensionD = L(21), o.HashMap = L(22), o.HashSet = L(23), o.IGeometry = L(8), o.IMath = L(9), o.Integer = L(10), o.Point = L(12), o.PointD = L(4), o.RandomSeed = L(16), o.RectangleD = L(13), o.Transform = L(17), o.UniqueIDGeneretor = L(14), o.Quicksort = L(24), o.LinkedList = L(11), o.LGraphObject = L(2), o.LGraph = L(5), o.LEdge = L(1), o.LGraphManager = L(6), o.LNode = L(3), o.Layout = L(15), o.LayoutConstants = L(0), o.NeedlemanWunsch = L(25), N.exports = o;
1569
+ }),
1570
+ /* 27 */
1571
+ /***/
1572
+ (function(N, I, L) {
1573
+ function o() {
1574
+ this.listeners = [];
1575
+ }
1576
+ var e = o.prototype;
1577
+ e.addListener = function(t, i) {
1578
+ this.listeners.push({
1579
+ event: t,
1580
+ callback: i
1581
+ });
1582
+ }, e.removeListener = function(t, i) {
1583
+ for (var l = this.listeners.length; l >= 0; l--) {
1584
+ var g = this.listeners[l];
1585
+ g.event === t && g.callback === i && this.listeners.splice(l, 1);
1586
+ }
1587
+ }, e.emit = function(t, i) {
1588
+ for (var l = 0; l < this.listeners.length; l++) {
1589
+ var g = this.listeners[l];
1590
+ t === g.event && g.callback(i);
1591
+ }
1592
+ }, N.exports = o;
1593
+ })
1594
+ /******/
1595
+ ])
1596
+ );
1597
+ });
1598
+ })(Q)), Q.exports;
1599
+ }
1600
+ var ct = Z.exports, z;
1601
+ function pt() {
1602
+ return z || (z = 1, (function(G, b) {
1603
+ (function(I, L) {
1604
+ G.exports = L(/* @__PURE__ */ ft());
1605
+ })(ct, function(N) {
1606
+ return (
1607
+ /******/
1608
+ (function(I) {
1609
+ var L = {};
1610
+ function o(e) {
1611
+ if (L[e])
1612
+ return L[e].exports;
1613
+ var t = L[e] = {
1614
+ /******/
1615
+ i: e,
1616
+ /******/
1617
+ l: !1,
1618
+ /******/
1619
+ exports: {}
1620
+ /******/
1621
+ };
1622
+ return I[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports;
1623
+ }
1624
+ return o.m = I, o.c = L, o.i = function(e) {
1625
+ return e;
1626
+ }, o.d = function(e, t, i) {
1627
+ o.o(e, t) || Object.defineProperty(e, t, {
1628
+ /******/
1629
+ configurable: !1,
1630
+ /******/
1631
+ enumerable: !0,
1632
+ /******/
1633
+ get: i
1634
+ /******/
1635
+ });
1636
+ }, o.n = function(e) {
1637
+ var t = e && e.__esModule ? (
1638
+ /******/
1639
+ function() {
1640
+ return e.default;
1641
+ }
1642
+ ) : (
1643
+ /******/
1644
+ function() {
1645
+ return e;
1646
+ }
1647
+ );
1648
+ return o.d(t, "a", t), t;
1649
+ }, o.o = function(e, t) {
1650
+ return Object.prototype.hasOwnProperty.call(e, t);
1651
+ }, o.p = "", o(o.s = 7);
1652
+ })([
1653
+ /* 0 */
1654
+ /***/
1655
+ (function(I, L) {
1656
+ I.exports = N;
1657
+ }),
1658
+ /* 1 */
1659
+ /***/
1660
+ (function(I, L, o) {
1661
+ var e = o(0).FDLayoutConstants;
1662
+ function t() {
1663
+ }
1664
+ for (var i in e)
1665
+ t[i] = e[i];
1666
+ t.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, t.DEFAULT_RADIAL_SEPARATION = e.DEFAULT_EDGE_LENGTH, t.DEFAULT_COMPONENT_SEPERATION = 60, t.TILE = !0, t.TILING_PADDING_VERTICAL = 10, t.TILING_PADDING_HORIZONTAL = 10, t.TREE_REDUCTION_ON_INCREMENTAL = !1, I.exports = t;
1667
+ }),
1668
+ /* 2 */
1669
+ /***/
1670
+ (function(I, L, o) {
1671
+ var e = o(0).FDLayoutEdge;
1672
+ function t(l, g, n) {
1673
+ e.call(this, l, g, n);
1674
+ }
1675
+ t.prototype = Object.create(e.prototype);
1676
+ for (var i in e)
1677
+ t[i] = e[i];
1678
+ I.exports = t;
1679
+ }),
1680
+ /* 3 */
1681
+ /***/
1682
+ (function(I, L, o) {
1683
+ var e = o(0).LGraph;
1684
+ function t(l, g, n) {
1685
+ e.call(this, l, g, n);
1686
+ }
1687
+ t.prototype = Object.create(e.prototype);
1688
+ for (var i in e)
1689
+ t[i] = e[i];
1690
+ I.exports = t;
1691
+ }),
1692
+ /* 4 */
1693
+ /***/
1694
+ (function(I, L, o) {
1695
+ var e = o(0).LGraphManager;
1696
+ function t(l) {
1697
+ e.call(this, l);
1698
+ }
1699
+ t.prototype = Object.create(e.prototype);
1700
+ for (var i in e)
1701
+ t[i] = e[i];
1702
+ I.exports = t;
1703
+ }),
1704
+ /* 5 */
1705
+ /***/
1706
+ (function(I, L, o) {
1707
+ var e = o(0).FDLayoutNode, t = o(0).IMath;
1708
+ function i(g, n, p, r) {
1709
+ e.call(this, g, n, p, r);
1710
+ }
1711
+ i.prototype = Object.create(e.prototype);
1712
+ for (var l in e)
1713
+ i[l] = e[l];
1714
+ i.prototype.move = function() {
1715
+ var g = this.graphManager.getLayout();
1716
+ this.displacementX = g.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = g.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementX = g.coolingFactor * g.maxNodeDisplacement * t.sign(this.displacementX)), Math.abs(this.displacementY) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementY = g.coolingFactor * g.maxNodeDisplacement * t.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), g.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;
1717
+ }, i.prototype.propogateDisplacementToChildren = function(g, n) {
1718
+ for (var p = this.getChild().getNodes(), r, a = 0; a < p.length; a++)
1719
+ r = p[a], r.getChild() == null ? (r.moveBy(g, n), r.displacementX += g, r.displacementY += n) : r.propogateDisplacementToChildren(g, n);
1720
+ }, i.prototype.setPred1 = function(g) {
1721
+ this.pred1 = g;
1722
+ }, i.prototype.getPred1 = function() {
1723
+ return pred1;
1724
+ }, i.prototype.getPred2 = function() {
1725
+ return pred2;
1726
+ }, i.prototype.setNext = function(g) {
1727
+ this.next = g;
1728
+ }, i.prototype.getNext = function() {
1729
+ return next;
1730
+ }, i.prototype.setProcessed = function(g) {
1731
+ this.processed = g;
1732
+ }, i.prototype.isProcessed = function() {
1733
+ return processed;
1734
+ }, I.exports = i;
1735
+ }),
1736
+ /* 6 */
1737
+ /***/
1738
+ (function(I, L, o) {
1739
+ var e = o(0).FDLayout, t = o(4), i = o(3), l = o(5), g = o(2), n = o(1), p = o(0).FDLayoutConstants, r = o(0).LayoutConstants, a = o(0).Point, h = o(0).PointD, d = o(0).Layout, v = o(0).Integer, D = o(0).IGeometry, u = o(0).LGraph, T = o(0).Transform;
1740
+ function y() {
1741
+ e.call(this), this.toBeTiled = {};
1742
+ }
1743
+ y.prototype = Object.create(e.prototype);
1744
+ for (var O in e)
1745
+ y[O] = e[O];
1746
+ y.prototype.newGraphManager = function() {
1747
+ var s = new t(this);
1748
+ return this.graphManager = s, s;
1749
+ }, y.prototype.newGraph = function(s) {
1750
+ return new i(null, this.graphManager, s);
1751
+ }, y.prototype.newNode = function(s) {
1752
+ return new l(this.graphManager, s);
1753
+ }, y.prototype.newEdge = function(s) {
1754
+ return new g(null, null, s);
1755
+ }, y.prototype.initParameters = function() {
1756
+ e.prototype.initParameters.call(this, arguments), this.isSubLayout || (n.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = n.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = p.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = p.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = p.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = p.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = p.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / p.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = p.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1757
+ }, y.prototype.layout = function() {
1758
+ var s = r.DEFAULT_CREATE_BENDS_AS_NEEDED;
1759
+ return s && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1760
+ }, y.prototype.classicLayout = function() {
1761
+ 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) {
1762
+ if (n.TREE_REDUCTION_ON_INCREMENTAL) {
1763
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1764
+ var f = new Set(this.getAllNodes()), c = this.nodesWithGravity.filter(function(m) {
1765
+ return f.has(m);
1766
+ });
1767
+ this.graphManager.setAllNodesToApplyGravitation(c);
1768
+ }
1769
+ } else {
1770
+ var s = this.getFlatForest();
1771
+ if (s.length > 0)
1772
+ this.positionNodesRadially(s);
1773
+ else {
1774
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1775
+ var f = new Set(this.getAllNodes()), c = this.nodesWithGravity.filter(function(E) {
1776
+ return f.has(E);
1777
+ });
1778
+ this.graphManager.setAllNodesToApplyGravitation(c), this.positionNodesRandomly();
1779
+ }
1780
+ }
1781
+ return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1782
+ }, y.prototype.tick = function() {
1783
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1784
+ if (this.prunedNodesAll.length > 0)
1785
+ this.isTreeGrowing = !0;
1786
+ else
1787
+ return !0;
1788
+ if (this.totalIterations % p.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1789
+ if (this.isConverged())
1790
+ if (this.prunedNodesAll.length > 0)
1791
+ this.isTreeGrowing = !0;
1792
+ else
1793
+ return !0;
1794
+ 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));
1795
+ }
1796
+ if (this.isTreeGrowing) {
1797
+ if (this.growTreeIterations % 10 == 0)
1798
+ if (this.prunedNodesAll.length > 0) {
1799
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1800
+ var s = new Set(this.getAllNodes()), f = this.nodesWithGravity.filter(function(A) {
1801
+ return s.has(A);
1802
+ });
1803
+ this.graphManager.setAllNodesToApplyGravitation(f), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = p.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1804
+ } else
1805
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1806
+ this.growTreeIterations++;
1807
+ }
1808
+ if (this.isGrowthFinished) {
1809
+ if (this.isConverged())
1810
+ return !0;
1811
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = p.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1812
+ }
1813
+ var c = !this.isTreeGrowing && !this.isGrowthFinished, E = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1814
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(c, E), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1815
+ }, y.prototype.getPositionsData = function() {
1816
+ for (var s = this.graphManager.getAllNodes(), f = {}, c = 0; c < s.length; c++) {
1817
+ var E = s[c].rect, A = s[c].id;
1818
+ f[A] = {
1819
+ id: A,
1820
+ x: E.getCenterX(),
1821
+ y: E.getCenterY(),
1822
+ w: E.width,
1823
+ h: E.height
1824
+ };
1825
+ }
1826
+ return f;
1827
+ }, y.prototype.runSpringEmbedder = function() {
1828
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1829
+ var s = !1;
1830
+ if (p.ANIMATE === "during")
1831
+ this.emit("layoutstarted");
1832
+ else {
1833
+ for (; !s; )
1834
+ s = this.tick();
1835
+ this.graphManager.updateBounds();
1836
+ }
1837
+ }, y.prototype.calculateNodesToApplyGravitationTo = function() {
1838
+ var s = [], f, c = this.graphManager.getGraphs(), E = c.length, A;
1839
+ for (A = 0; A < E; A++)
1840
+ f = c[A], f.updateConnected(), f.isConnected || (s = s.concat(f.getNodes()));
1841
+ return s;
1842
+ }, y.prototype.createBendpoints = function() {
1843
+ var s = [];
1844
+ s = s.concat(this.graphManager.getAllEdges());
1845
+ var f = /* @__PURE__ */ new Set(), c;
1846
+ for (c = 0; c < s.length; c++) {
1847
+ var E = s[c];
1848
+ if (!f.has(E)) {
1849
+ var A = E.getSource(), m = E.getTarget();
1850
+ if (A == m)
1851
+ E.getBendpoints().push(new h()), E.getBendpoints().push(new h()), this.createDummyNodesForBendpoints(E), f.add(E);
1852
+ else {
1853
+ var C = [];
1854
+ if (C = C.concat(A.getEdgeListToNode(m)), C = C.concat(m.getEdgeListToNode(A)), !f.has(C[0])) {
1855
+ if (C.length > 1) {
1856
+ var R;
1857
+ for (R = 0; R < C.length; R++) {
1858
+ var M = C[R];
1859
+ M.getBendpoints().push(new h()), this.createDummyNodesForBendpoints(M);
1860
+ }
1861
+ }
1862
+ C.forEach(function(S) {
1863
+ f.add(S);
1864
+ });
1865
+ }
1866
+ }
1867
+ }
1868
+ if (f.size == s.length)
1869
+ break;
1870
+ }
1871
+ }, y.prototype.positionNodesRadially = function(s) {
1872
+ for (var f = new a(0, 0), c = Math.ceil(Math.sqrt(s.length)), E = 0, A = 0, m = 0, C = new h(0, 0), R = 0; R < s.length; R++) {
1873
+ R % c == 0 && (m = 0, A = E, R != 0 && (A += n.DEFAULT_COMPONENT_SEPERATION), E = 0);
1874
+ var M = s[R], S = d.findCenterOfTree(M);
1875
+ f.x = m, f.y = A, C = y.radialLayout(M, S, f), C.y > E && (E = Math.floor(C.y)), m = Math.floor(C.x + n.DEFAULT_COMPONENT_SEPERATION);
1876
+ }
1877
+ this.transform(new h(r.WORLD_CENTER_X - C.x / 2, r.WORLD_CENTER_Y - C.y / 2));
1878
+ }, y.radialLayout = function(s, f, c) {
1879
+ var E = Math.max(this.maxDiagonalInTree(s), n.DEFAULT_RADIAL_SEPARATION);
1880
+ y.branchRadialLayout(f, null, 0, 359, 0, E);
1881
+ var A = u.calculateBounds(s), m = new T();
1882
+ m.setDeviceOrgX(A.getMinX()), m.setDeviceOrgY(A.getMinY()), m.setWorldOrgX(c.x), m.setWorldOrgY(c.y);
1883
+ for (var C = 0; C < s.length; C++) {
1884
+ var R = s[C];
1885
+ R.transform(m);
1886
+ }
1887
+ var M = new h(A.getMaxX(), A.getMaxY());
1888
+ return m.inverseTransformPoint(M);
1889
+ }, y.branchRadialLayout = function(s, f, c, E, A, m) {
1890
+ var C = (E - c + 1) / 2;
1891
+ C < 0 && (C += 180);
1892
+ var R = (C + c) % 360, M = R * D.TWO_PI / 360, S = A * Math.cos(M), Y = A * Math.sin(M);
1893
+ s.setCenter(S, Y);
1894
+ var w = [];
1895
+ w = w.concat(s.getEdges());
1896
+ var x = w.length;
1897
+ f != null && x--;
1898
+ for (var F = 0, U = w.length, P, _ = s.getEdgesBetween(f); _.length > 1; ) {
1899
+ var X = _[0];
1900
+ _.splice(0, 1);
1901
+ var H = w.indexOf(X);
1902
+ H >= 0 && w.splice(H, 1), U--, x--;
1903
+ }
1904
+ f != null ? P = (w.indexOf(_[0]) + 1) % U : P = 0;
1905
+ for (var W = Math.abs(E - c) / x, B = P; F != x; B = ++B % U) {
1906
+ var K = w[B].getOtherEnd(s);
1907
+ if (K != f) {
1908
+ var q = (c + F * W) % 360, ht = (q + W) % 360;
1909
+ y.branchRadialLayout(K, s, q, ht, A + m, m), F++;
1910
+ }
1911
+ }
1912
+ }, y.maxDiagonalInTree = function(s) {
1913
+ for (var f = v.MIN_VALUE, c = 0; c < s.length; c++) {
1914
+ var E = s[c], A = E.getDiagonal();
1915
+ A > f && (f = A);
1916
+ }
1917
+ return f;
1918
+ }, y.prototype.calcRepulsionRange = function() {
1919
+ return 2 * (this.level + 1) * this.idealEdgeLength;
1920
+ }, y.prototype.groupZeroDegreeMembers = function() {
1921
+ var s = this, f = {};
1922
+ this.memberGroups = {}, this.idToDummyNode = {};
1923
+ for (var c = [], E = this.graphManager.getAllNodes(), A = 0; A < E.length; A++) {
1924
+ var m = E[A], C = m.getParent();
1925
+ this.getNodeDegreeWithChildren(m) === 0 && (C.id == null || !this.getToBeTiled(C)) && c.push(m);
1926
+ }
1927
+ for (var A = 0; A < c.length; A++) {
1928
+ var m = c[A], R = m.getParent().id;
1929
+ typeof f[R] > "u" && (f[R] = []), f[R] = f[R].concat(m);
1930
+ }
1931
+ Object.keys(f).forEach(function(M) {
1932
+ if (f[M].length > 1) {
1933
+ var S = "DummyCompound_" + M;
1934
+ s.memberGroups[S] = f[M];
1935
+ var Y = f[M][0].getParent(), w = new l(s.graphManager);
1936
+ w.id = S, w.paddingLeft = Y.paddingLeft || 0, w.paddingRight = Y.paddingRight || 0, w.paddingBottom = Y.paddingBottom || 0, w.paddingTop = Y.paddingTop || 0, s.idToDummyNode[S] = w;
1937
+ var x = s.getGraphManager().add(s.newGraph(), w), F = Y.getChild();
1938
+ F.add(w);
1939
+ for (var U = 0; U < f[M].length; U++) {
1940
+ var P = f[M][U];
1941
+ F.remove(P), x.add(P);
1942
+ }
1943
+ }
1944
+ });
1945
+ }, y.prototype.clearCompounds = function() {
1946
+ var s = {}, f = {};
1947
+ this.performDFSOnCompounds();
1948
+ for (var c = 0; c < this.compoundOrder.length; c++)
1949
+ f[this.compoundOrder[c].id] = this.compoundOrder[c], s[this.compoundOrder[c].id] = [].concat(this.compoundOrder[c].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[c].getChild()), this.compoundOrder[c].child = null;
1950
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(s, f);
1951
+ }, y.prototype.clearZeroDegreeMembers = function() {
1952
+ var s = this, f = this.tiledZeroDegreePack = [];
1953
+ Object.keys(this.memberGroups).forEach(function(c) {
1954
+ var E = s.idToDummyNode[c];
1955
+ f[c] = s.tileNodes(s.memberGroups[c], E.paddingLeft + E.paddingRight), E.rect.width = f[c].width, E.rect.height = f[c].height;
1956
+ });
1957
+ }, y.prototype.repopulateCompounds = function() {
1958
+ for (var s = this.compoundOrder.length - 1; s >= 0; s--) {
1959
+ var f = this.compoundOrder[s], c = f.id, E = f.paddingLeft, A = f.paddingTop;
1960
+ this.adjustLocations(this.tiledMemberPack[c], f.rect.x, f.rect.y, E, A);
1961
+ }
1962
+ }, y.prototype.repopulateZeroDegreeMembers = function() {
1963
+ var s = this, f = this.tiledZeroDegreePack;
1964
+ Object.keys(f).forEach(function(c) {
1965
+ var E = s.idToDummyNode[c], A = E.paddingLeft, m = E.paddingTop;
1966
+ s.adjustLocations(f[c], E.rect.x, E.rect.y, A, m);
1967
+ });
1968
+ }, y.prototype.getToBeTiled = function(s) {
1969
+ var f = s.id;
1970
+ if (this.toBeTiled[f] != null)
1971
+ return this.toBeTiled[f];
1972
+ var c = s.getChild();
1973
+ if (c == null)
1974
+ return this.toBeTiled[f] = !1, !1;
1975
+ for (var E = c.getNodes(), A = 0; A < E.length; A++) {
1976
+ var m = E[A];
1977
+ if (this.getNodeDegree(m) > 0)
1978
+ return this.toBeTiled[f] = !1, !1;
1979
+ if (m.getChild() == null) {
1980
+ this.toBeTiled[m.id] = !1;
1981
+ continue;
1982
+ }
1983
+ if (!this.getToBeTiled(m))
1984
+ return this.toBeTiled[f] = !1, !1;
1985
+ }
1986
+ return this.toBeTiled[f] = !0, !0;
1987
+ }, y.prototype.getNodeDegree = function(s) {
1988
+ for (var f = s.getEdges(), c = 0, E = 0; E < f.length; E++) {
1989
+ var A = f[E];
1990
+ A.getSource().id !== A.getTarget().id && (c = c + 1);
1991
+ }
1992
+ return c;
1993
+ }, y.prototype.getNodeDegreeWithChildren = function(s) {
1994
+ var f = this.getNodeDegree(s);
1995
+ if (s.getChild() == null)
1996
+ return f;
1997
+ for (var c = s.getChild().getNodes(), E = 0; E < c.length; E++) {
1998
+ var A = c[E];
1999
+ f += this.getNodeDegreeWithChildren(A);
2000
+ }
2001
+ return f;
2002
+ }, y.prototype.performDFSOnCompounds = function() {
2003
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2004
+ }, y.prototype.fillCompexOrderByDFS = function(s) {
2005
+ for (var f = 0; f < s.length; f++) {
2006
+ var c = s[f];
2007
+ c.getChild() != null && this.fillCompexOrderByDFS(c.getChild().getNodes()), this.getToBeTiled(c) && this.compoundOrder.push(c);
2008
+ }
2009
+ }, y.prototype.adjustLocations = function(s, f, c, E, A) {
2010
+ f += E, c += A;
2011
+ for (var m = f, C = 0; C < s.rows.length; C++) {
2012
+ var R = s.rows[C];
2013
+ f = m;
2014
+ for (var M = 0, S = 0; S < R.length; S++) {
2015
+ var Y = R[S];
2016
+ Y.rect.x = f, Y.rect.y = c, f += Y.rect.width + s.horizontalPadding, Y.rect.height > M && (M = Y.rect.height);
2017
+ }
2018
+ c += M + s.verticalPadding;
2019
+ }
2020
+ }, y.prototype.tileCompoundMembers = function(s, f) {
2021
+ var c = this;
2022
+ this.tiledMemberPack = [], Object.keys(s).forEach(function(E) {
2023
+ var A = f[E];
2024
+ c.tiledMemberPack[E] = c.tileNodes(s[E], A.paddingLeft + A.paddingRight), A.rect.width = c.tiledMemberPack[E].width, A.rect.height = c.tiledMemberPack[E].height;
2025
+ });
2026
+ }, y.prototype.tileNodes = function(s, f) {
2027
+ var c = n.TILING_PADDING_VERTICAL, E = n.TILING_PADDING_HORIZONTAL, A = {
2028
+ rows: [],
2029
+ rowWidth: [],
2030
+ rowHeight: [],
2031
+ width: 0,
2032
+ height: f,
2033
+ // assume minHeight equals to minWidth
2034
+ verticalPadding: c,
2035
+ horizontalPadding: E
2036
+ };
2037
+ s.sort(function(R, M) {
2038
+ return R.rect.width * R.rect.height > M.rect.width * M.rect.height ? -1 : R.rect.width * R.rect.height < M.rect.width * M.rect.height ? 1 : 0;
2039
+ });
2040
+ for (var m = 0; m < s.length; m++) {
2041
+ var C = s[m];
2042
+ A.rows.length == 0 ? this.insertNodeToRow(A, C, 0, f) : this.canAddHorizontal(A, C.rect.width, C.rect.height) ? this.insertNodeToRow(A, C, this.getShortestRowIndex(A), f) : this.insertNodeToRow(A, C, A.rows.length, f), this.shiftToLastRow(A);
2043
+ }
2044
+ return A;
2045
+ }, y.prototype.insertNodeToRow = function(s, f, c, E) {
2046
+ var A = E;
2047
+ if (c == s.rows.length) {
2048
+ var m = [];
2049
+ s.rows.push(m), s.rowWidth.push(A), s.rowHeight.push(0);
2050
+ }
2051
+ var C = s.rowWidth[c] + f.rect.width;
2052
+ s.rows[c].length > 0 && (C += s.horizontalPadding), s.rowWidth[c] = C, s.width < C && (s.width = C);
2053
+ var R = f.rect.height;
2054
+ c > 0 && (R += s.verticalPadding);
2055
+ var M = 0;
2056
+ R > s.rowHeight[c] && (M = s.rowHeight[c], s.rowHeight[c] = R, M = s.rowHeight[c] - M), s.height += M, s.rows[c].push(f);
2057
+ }, y.prototype.getShortestRowIndex = function(s) {
2058
+ for (var f = -1, c = Number.MAX_VALUE, E = 0; E < s.rows.length; E++)
2059
+ s.rowWidth[E] < c && (f = E, c = s.rowWidth[E]);
2060
+ return f;
2061
+ }, y.prototype.getLongestRowIndex = function(s) {
2062
+ for (var f = -1, c = Number.MIN_VALUE, E = 0; E < s.rows.length; E++)
2063
+ s.rowWidth[E] > c && (f = E, c = s.rowWidth[E]);
2064
+ return f;
2065
+ }, y.prototype.canAddHorizontal = function(s, f, c) {
2066
+ var E = this.getShortestRowIndex(s);
2067
+ if (E < 0)
2068
+ return !0;
2069
+ var A = s.rowWidth[E];
2070
+ if (A + s.horizontalPadding + f <= s.width) return !0;
2071
+ var m = 0;
2072
+ s.rowHeight[E] < c && E > 0 && (m = c + s.verticalPadding - s.rowHeight[E]);
2073
+ var C;
2074
+ s.width - A >= f + s.horizontalPadding ? C = (s.height + m) / (A + f + s.horizontalPadding) : C = (s.height + m) / s.width, m = c + s.verticalPadding;
2075
+ var R;
2076
+ return s.width < f ? R = (s.height + m) / f : R = (s.height + m) / s.width, R < 1 && (R = 1 / R), C < 1 && (C = 1 / C), C < R;
2077
+ }, y.prototype.shiftToLastRow = function(s) {
2078
+ var f = this.getLongestRowIndex(s), c = s.rowWidth.length - 1, E = s.rows[f], A = E[E.length - 1], m = A.width + s.horizontalPadding;
2079
+ if (s.width - s.rowWidth[c] > m && f != c) {
2080
+ E.splice(-1, 1), s.rows[c].push(A), s.rowWidth[f] = s.rowWidth[f] - m, s.rowWidth[c] = s.rowWidth[c] + m, s.width = s.rowWidth[instance.getLongestRowIndex(s)];
2081
+ for (var C = Number.MIN_VALUE, R = 0; R < E.length; R++)
2082
+ E[R].height > C && (C = E[R].height);
2083
+ f > 0 && (C += s.verticalPadding);
2084
+ var M = s.rowHeight[f] + s.rowHeight[c];
2085
+ s.rowHeight[f] = C, s.rowHeight[c] < A.height + s.verticalPadding && (s.rowHeight[c] = A.height + s.verticalPadding);
2086
+ var S = s.rowHeight[f] + s.rowHeight[c];
2087
+ s.height += S - M, this.shiftToLastRow(s);
2088
+ }
2089
+ }, y.prototype.tilingPreLayout = function() {
2090
+ n.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2091
+ }, y.prototype.tilingPostLayout = function() {
2092
+ n.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2093
+ }, y.prototype.reduceTrees = function() {
2094
+ for (var s = [], f = !0, c; f; ) {
2095
+ var E = this.graphManager.getAllNodes(), A = [];
2096
+ f = !1;
2097
+ for (var m = 0; m < E.length; m++)
2098
+ c = E[m], c.getEdges().length == 1 && !c.getEdges()[0].isInterGraph && c.getChild() == null && (A.push([c, c.getEdges()[0], c.getOwner()]), f = !0);
2099
+ if (f == !0) {
2100
+ for (var C = [], R = 0; R < A.length; R++)
2101
+ A[R][0].getEdges().length == 1 && (C.push(A[R]), A[R][0].getOwner().remove(A[R][0]));
2102
+ s.push(C), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2103
+ }
2104
+ }
2105
+ this.prunedNodesAll = s;
2106
+ }, y.prototype.growTree = function(s) {
2107
+ for (var f = s.length, c = s[f - 1], E, A = 0; A < c.length; A++)
2108
+ E = c[A], this.findPlaceforPrunedNode(E), E[2].add(E[0]), E[2].add(E[1], E[1].source, E[1].target);
2109
+ s.splice(s.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2110
+ }, y.prototype.findPlaceforPrunedNode = function(s) {
2111
+ var f, c, E = s[0];
2112
+ E == s[1].source ? c = s[1].target : c = s[1].source;
2113
+ var A = c.startX, m = c.finishX, C = c.startY, R = c.finishY, M = 0, S = 0, Y = 0, w = 0, x = [M, Y, S, w];
2114
+ if (C > 0)
2115
+ for (var F = A; F <= m; F++)
2116
+ x[0] += this.grid[F][C - 1].length + this.grid[F][C].length - 1;
2117
+ if (m < this.grid.length - 1)
2118
+ for (var F = C; F <= R; F++)
2119
+ x[1] += this.grid[m + 1][F].length + this.grid[m][F].length - 1;
2120
+ if (R < this.grid[0].length - 1)
2121
+ for (var F = A; F <= m; F++)
2122
+ x[2] += this.grid[F][R + 1].length + this.grid[F][R].length - 1;
2123
+ if (A > 0)
2124
+ for (var F = C; F <= R; F++)
2125
+ x[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
2126
+ for (var U = v.MAX_VALUE, P, _, X = 0; X < x.length; X++)
2127
+ x[X] < U ? (U = x[X], P = 1, _ = X) : x[X] == U && P++;
2128
+ if (P == 3 && U == 0)
2129
+ x[0] == 0 && x[1] == 0 && x[2] == 0 ? f = 1 : x[0] == 0 && x[1] == 0 && x[3] == 0 ? f = 0 : x[0] == 0 && x[2] == 0 && x[3] == 0 ? f = 3 : x[1] == 0 && x[2] == 0 && x[3] == 0 && (f = 2);
2130
+ else if (P == 2 && U == 0) {
2131
+ var H = Math.floor(Math.random() * 2);
2132
+ x[0] == 0 && x[1] == 0 ? H == 0 ? f = 0 : f = 1 : x[0] == 0 && x[2] == 0 ? H == 0 ? f = 0 : f = 2 : x[0] == 0 && x[3] == 0 ? H == 0 ? f = 0 : f = 3 : x[1] == 0 && x[2] == 0 ? H == 0 ? f = 1 : f = 2 : x[1] == 0 && x[3] == 0 ? H == 0 ? f = 1 : f = 3 : H == 0 ? f = 2 : f = 3;
2133
+ } else if (P == 4 && U == 0) {
2134
+ var H = Math.floor(Math.random() * 4);
2135
+ f = H;
2136
+ } else
2137
+ f = _;
2138
+ f == 0 ? E.setCenter(c.getCenterX(), c.getCenterY() - c.getHeight() / 2 - p.DEFAULT_EDGE_LENGTH - E.getHeight() / 2) : f == 1 ? E.setCenter(c.getCenterX() + c.getWidth() / 2 + p.DEFAULT_EDGE_LENGTH + E.getWidth() / 2, c.getCenterY()) : f == 2 ? E.setCenter(c.getCenterX(), c.getCenterY() + c.getHeight() / 2 + p.DEFAULT_EDGE_LENGTH + E.getHeight() / 2) : E.setCenter(c.getCenterX() - c.getWidth() / 2 - p.DEFAULT_EDGE_LENGTH - E.getWidth() / 2, c.getCenterY());
2139
+ }, I.exports = y;
2140
+ }),
2141
+ /* 7 */
2142
+ /***/
2143
+ (function(I, L, o) {
2144
+ var e = {};
2145
+ e.layoutBase = o(0), e.CoSEConstants = o(1), e.CoSEEdge = o(2), e.CoSEGraph = o(3), e.CoSEGraphManager = o(4), e.CoSELayout = o(6), e.CoSENode = o(5), I.exports = e;
2146
+ })
2147
+ /******/
2148
+ ])
2149
+ );
2150
+ });
2151
+ })(Z)), Z.exports;
2152
+ }
2153
+ var dt = k.exports, J;
2154
+ function vt() {
2155
+ return J || (J = 1, (function(G, b) {
2156
+ (function(I, L) {
2157
+ G.exports = L(/* @__PURE__ */ pt());
2158
+ })(dt, function(N) {
2159
+ return (
2160
+ /******/
2161
+ (function(I) {
2162
+ var L = {};
2163
+ function o(e) {
2164
+ if (L[e])
2165
+ return L[e].exports;
2166
+ var t = L[e] = {
2167
+ /******/
2168
+ i: e,
2169
+ /******/
2170
+ l: !1,
2171
+ /******/
2172
+ exports: {}
2173
+ /******/
2174
+ };
2175
+ return I[e].call(t.exports, t, t.exports, o), t.l = !0, t.exports;
2176
+ }
2177
+ return o.m = I, o.c = L, o.i = function(e) {
2178
+ return e;
2179
+ }, o.d = function(e, t, i) {
2180
+ o.o(e, t) || Object.defineProperty(e, t, {
2181
+ /******/
2182
+ configurable: !1,
2183
+ /******/
2184
+ enumerable: !0,
2185
+ /******/
2186
+ get: i
2187
+ /******/
2188
+ });
2189
+ }, o.n = function(e) {
2190
+ var t = e && e.__esModule ? (
2191
+ /******/
2192
+ function() {
2193
+ return e.default;
2194
+ }
2195
+ ) : (
2196
+ /******/
2197
+ function() {
2198
+ return e;
2199
+ }
2200
+ );
2201
+ return o.d(t, "a", t), t;
2202
+ }, o.o = function(e, t) {
2203
+ return Object.prototype.hasOwnProperty.call(e, t);
2204
+ }, o.p = "", o(o.s = 1);
2205
+ })([
2206
+ /* 0 */
2207
+ /***/
2208
+ (function(I, L) {
2209
+ I.exports = N;
2210
+ }),
2211
+ /* 1 */
2212
+ /***/
2213
+ (function(I, L, o) {
2214
+ var e = o(0).layoutBase.LayoutConstants, t = o(0).layoutBase.FDLayoutConstants, i = o(0).CoSEConstants, l = o(0).CoSELayout, g = o(0).CoSENode, n = o(0).layoutBase.PointD, p = o(0).layoutBase.DimensionD, r = {
2215
+ // Called on `layoutready`
2216
+ ready: function() {
2217
+ },
2218
+ // Called on `layoutstop`
2219
+ stop: function() {
2220
+ },
2221
+ // 'draft', 'default' or 'proof"
2222
+ // - 'draft' fast cooling rate
2223
+ // - 'default' moderate cooling rate
2224
+ // - "proof" slow cooling rate
2225
+ quality: "default",
2226
+ // include labels in node dimensions
2227
+ nodeDimensionsIncludeLabels: !1,
2228
+ // number of ticks per frame; higher is faster but more jerky
2229
+ refresh: 30,
2230
+ // Whether to fit the network view after when done
2231
+ fit: !0,
2232
+ // Padding on fit
2233
+ padding: 10,
2234
+ // Whether to enable incremental mode
2235
+ randomize: !0,
2236
+ // Node repulsion (non overlapping) multiplier
2237
+ nodeRepulsion: 4500,
2238
+ // Ideal edge (non nested) length
2239
+ idealEdgeLength: 50,
2240
+ // Divisor to compute edge forces
2241
+ edgeElasticity: 0.45,
2242
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
2243
+ nestingFactor: 0.1,
2244
+ // Gravity force (constant)
2245
+ gravity: 0.25,
2246
+ // Maximum number of iterations to perform
2247
+ numIter: 2500,
2248
+ // For enabling tiling
2249
+ tile: !0,
2250
+ // Type of layout animation. The option set is {'during', 'end', false}
2251
+ animate: "end",
2252
+ // Duration for animate:end
2253
+ animationDuration: 500,
2254
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2255
+ tilingPaddingVertical: 10,
2256
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2257
+ tilingPaddingHorizontal: 10,
2258
+ // Gravity range (constant) for compounds
2259
+ gravityRangeCompound: 1.5,
2260
+ // Gravity force (constant) for compounds
2261
+ gravityCompound: 1,
2262
+ // Gravity range (constant)
2263
+ gravityRange: 3.8,
2264
+ // Initial cooling factor for incremental layout
2265
+ initialEnergyOnIncremental: 0.5
2266
+ };
2267
+ function a(D, u) {
2268
+ var T = {};
2269
+ for (var y in D)
2270
+ T[y] = D[y];
2271
+ for (var y in u)
2272
+ T[y] = u[y];
2273
+ return T;
2274
+ }
2275
+ function h(D) {
2276
+ this.options = a(r, D), d(this.options);
2277
+ }
2278
+ var d = function(u) {
2279
+ u.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = t.DEFAULT_REPULSION_STRENGTH = u.nodeRepulsion), u.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = t.DEFAULT_EDGE_LENGTH = u.idealEdgeLength), u.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = t.DEFAULT_SPRING_STRENGTH = u.edgeElasticity), u.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = u.nestingFactor), u.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = t.DEFAULT_GRAVITY_STRENGTH = u.gravity), u.numIter != null && (i.MAX_ITERATIONS = t.MAX_ITERATIONS = u.numIter), u.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = t.DEFAULT_GRAVITY_RANGE_FACTOR = u.gravityRange), u.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = u.gravityCompound), u.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = u.gravityRangeCompound), u.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = t.DEFAULT_COOLING_FACTOR_INCREMENTAL = u.initialEnergyOnIncremental), u.quality == "draft" ? e.QUALITY = 0 : u.quality == "proof" ? e.QUALITY = 2 : e.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = u.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = !u.randomize, i.ANIMATE = t.ANIMATE = e.ANIMATE = u.animate, i.TILE = u.tile, i.TILING_PADDING_VERTICAL = typeof u.tilingPaddingVertical == "function" ? u.tilingPaddingVertical.call() : u.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof u.tilingPaddingHorizontal == "function" ? u.tilingPaddingHorizontal.call() : u.tilingPaddingHorizontal;
2280
+ };
2281
+ h.prototype.run = function() {
2282
+ var D, u, T = this.options;
2283
+ this.idToLNode = {};
2284
+ var y = this.layout = new l(), O = this;
2285
+ O.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2286
+ var s = y.newGraphManager();
2287
+ this.gm = s;
2288
+ var f = this.options.eles.nodes(), c = this.options.eles.edges();
2289
+ this.root = s.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(f), y);
2290
+ for (var E = 0; E < c.length; E++) {
2291
+ var A = c[E], m = this.idToLNode[A.data("source")], C = this.idToLNode[A.data("target")];
2292
+ if (m !== C && m.getEdgesBetween(C).length == 0) {
2293
+ var R = s.add(y.newEdge(), m, C);
2294
+ R.id = A.id();
2295
+ }
2296
+ }
2297
+ var M = function(w, x) {
2298
+ typeof w == "number" && (w = x);
2299
+ var F = w.data("id"), U = O.idToLNode[F];
2300
+ return {
2301
+ x: U.getRect().getCenterX(),
2302
+ y: U.getRect().getCenterY()
2303
+ };
2304
+ }, S = function Y() {
2305
+ for (var w = function() {
2306
+ T.fit && T.cy.fit(T.eles, T.padding), D || (D = !0, O.cy.one("layoutready", T.ready), O.cy.trigger({ type: "layoutready", layout: O }));
2307
+ }, x = O.options.refresh, F, U = 0; U < x && !F; U++)
2308
+ F = O.stopped || O.layout.tick();
2309
+ if (F) {
2310
+ y.checkLayoutSuccess() && !y.isSubLayout && y.doPostLayout(), y.tilingPostLayout && y.tilingPostLayout(), y.isLayoutFinished = !0, O.options.eles.nodes().positions(M), w(), O.cy.one("layoutstop", O.options.stop), O.cy.trigger({ type: "layoutstop", layout: O }), u && cancelAnimationFrame(u), D = !1;
2311
+ return;
2312
+ }
2313
+ var P = O.layout.getPositionsData();
2314
+ T.eles.nodes().positions(function(_, X) {
2315
+ if (typeof _ == "number" && (_ = X), !_.isParent()) {
2316
+ for (var H = _.id(), W = P[H], B = _; W == null && (W = P[B.data("parent")] || P["DummyCompound_" + B.data("parent")], P[H] = W, B = B.parent()[0], B != null); )
2317
+ ;
2318
+ return W != null ? {
2319
+ x: W.x,
2320
+ y: W.y
2321
+ } : {
2322
+ x: _.position("x"),
2323
+ y: _.position("y")
2324
+ };
2325
+ }
2326
+ }), w(), u = requestAnimationFrame(Y);
2327
+ };
2328
+ return y.addListener("layoutstarted", function() {
2329
+ O.options.animate === "during" && (u = requestAnimationFrame(S));
2330
+ }), y.runLayout(), this.options.animate !== "during" && (O.options.eles.nodes().not(":parent").layoutPositions(O, O.options, M), D = !1), this;
2331
+ }, h.prototype.getTopMostNodes = function(D) {
2332
+ for (var u = {}, T = 0; T < D.length; T++)
2333
+ u[D[T].id()] = !0;
2334
+ var y = D.filter(function(O, s) {
2335
+ typeof O == "number" && (O = s);
2336
+ for (var f = O.parent()[0]; f != null; ) {
2337
+ if (u[f.id()])
2338
+ return !1;
2339
+ f = f.parent()[0];
2340
+ }
2341
+ return !0;
2342
+ });
2343
+ return y;
2344
+ }, h.prototype.processChildrenList = function(D, u, T) {
2345
+ for (var y = u.length, O = 0; O < y; O++) {
2346
+ var s = u[O], f = s.children(), c, E = s.layoutDimensions({
2347
+ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2348
+ });
2349
+ if (s.outerWidth() != null && s.outerHeight() != null ? c = D.add(new g(T.graphManager, new n(s.position("x") - E.w / 2, s.position("y") - E.h / 2), new p(parseFloat(E.w), parseFloat(E.h)))) : c = D.add(new g(this.graphManager)), c.id = s.data("id"), c.paddingLeft = parseInt(s.css("padding")), c.paddingTop = parseInt(s.css("padding")), c.paddingRight = parseInt(s.css("padding")), c.paddingBottom = parseInt(s.css("padding")), this.options.nodeDimensionsIncludeLabels && s.isParent()) {
2350
+ var A = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, m = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, C = s.css("text-halign");
2351
+ c.labelWidth = A, c.labelHeight = m, c.labelPos = C;
2352
+ }
2353
+ if (this.idToLNode[s.data("id")] = c, isNaN(c.rect.x) && (c.rect.x = 0), isNaN(c.rect.y) && (c.rect.y = 0), f != null && f.length > 0) {
2354
+ var R;
2355
+ R = T.getGraphManager().add(T.newGraph(), c), this.processChildrenList(R, f, T);
2356
+ }
2357
+ }
2358
+ }, h.prototype.stop = function() {
2359
+ return this.stopped = !0, this;
2360
+ };
2361
+ var v = function(u) {
2362
+ u("layout", "cose-bilkent", h);
2363
+ };
2364
+ typeof cytoscape < "u" && v(cytoscape), I.exports = v;
2365
+ })
2366
+ /******/
2367
+ ])
2368
+ );
2369
+ });
2370
+ })(k)), k.exports;
2371
+ }
2372
+ var yt = /* @__PURE__ */ vt();
2373
+ const Et = /* @__PURE__ */ gt(yt);
2374
+ tt.use(Et);
2375
+ function et(G, b) {
2376
+ G.forEach((N) => {
2377
+ const I = {
2378
+ id: N.id,
2379
+ labelText: N.label,
2380
+ height: N.height,
2381
+ width: N.width,
2382
+ padding: N.padding ?? 0
2383
+ };
2384
+ Object.keys(N).forEach((L) => {
2385
+ ["id", "label", "height", "width", "padding", "x", "y"].includes(L) || (I[L] = N[L]);
2386
+ }), b.add({
2387
+ group: "nodes",
2388
+ data: I,
2389
+ position: {
2390
+ x: N.x ?? 0,
2391
+ y: N.y ?? 0
2392
+ }
2393
+ });
2394
+ });
2395
+ }
2396
+ V(et, "addNodes");
2397
+ function rt(G, b) {
2398
+ G.forEach((N) => {
2399
+ const I = {
2400
+ id: N.id,
2401
+ source: N.start,
2402
+ target: N.end
2403
+ };
2404
+ Object.keys(N).forEach((L) => {
2405
+ ["id", "start", "end"].includes(L) || (I[L] = N[L]);
2406
+ }), b.add({
2407
+ group: "edges",
2408
+ data: I
2409
+ });
2410
+ });
2411
+ }
2412
+ V(rt, "addEdges");
2413
+ function it(G) {
2414
+ return new Promise((b) => {
2415
+ const N = lt("body").append("div").attr("id", "cy").attr("style", "display:none"), I = tt({
2416
+ container: document.getElementById("cy"),
2417
+ // container to render in
2418
+ style: [
2419
+ {
2420
+ selector: "edge",
2421
+ style: {
2422
+ "curve-style": "bezier"
2423
+ }
2424
+ }
2425
+ ]
2426
+ });
2427
+ N.remove(), et(G.nodes, I), rt(G.edges, I), I.nodes().forEach(function(o) {
2428
+ o.layoutDimensions = () => {
2429
+ const e = o.data();
2430
+ return { w: e.width, h: e.height };
2431
+ };
2432
+ });
2433
+ const L = {
2434
+ name: "cose-bilkent",
2435
+ // @ts-ignore Types for cose-bilkent are not correct?
2436
+ quality: "proof",
2437
+ styleEnabled: !1,
2438
+ animate: !1
2439
+ };
2440
+ I.layout(L).run(), I.ready((o) => {
2441
+ $.info("Cytoscape ready", o), b(I);
2442
+ });
2443
+ });
2444
+ }
2445
+ V(it, "createCytoscapeInstance");
2446
+ function nt(G) {
2447
+ return G.nodes().map((b) => {
2448
+ const N = b.data(), I = b.position(), L = {
2449
+ id: N.id,
2450
+ x: I.x,
2451
+ y: I.y
2452
+ };
2453
+ return Object.keys(N).forEach((o) => {
2454
+ o !== "id" && (L[o] = N[o]);
2455
+ }), L;
2456
+ });
2457
+ }
2458
+ V(nt, "extractPositionedNodes");
2459
+ function ot(G) {
2460
+ return G.edges().map((b) => {
2461
+ const N = b.data(), I = b._private.rscratch, L = {
2462
+ id: N.id,
2463
+ source: N.source,
2464
+ target: N.target,
2465
+ startX: I.startX,
2466
+ startY: I.startY,
2467
+ midX: I.midX,
2468
+ midY: I.midY,
2469
+ endX: I.endX,
2470
+ endY: I.endY
2471
+ };
2472
+ return Object.keys(N).forEach((o) => {
2473
+ ["id", "source", "target"].includes(o) || (L[o] = N[o]);
2474
+ }), L;
2475
+ });
2476
+ }
2477
+ V(ot, "extractPositionedEdges");
2478
+ async function st(G, b) {
2479
+ $.debug("Starting cose-bilkent layout algorithm");
2480
+ try {
2481
+ at(G);
2482
+ const N = await it(G), I = nt(N), L = ot(N);
2483
+ return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`), {
2484
+ nodes: I,
2485
+ edges: L
2486
+ };
2487
+ } catch (N) {
2488
+ throw $.error("Error in cose-bilkent layout algorithm:", N), N;
2489
+ }
2490
+ }
2491
+ V(st, "executeCoseBilkentLayout");
2492
+ function at(G) {
2493
+ if (!G)
2494
+ throw new Error("Layout data is required");
2495
+ if (!G.config)
2496
+ throw new Error("Configuration is required in layout data");
2497
+ if (!G.rootNode)
2498
+ throw new Error("Root node is required");
2499
+ if (!G.nodes || !Array.isArray(G.nodes))
2500
+ throw new Error("No nodes found in layout data");
2501
+ if (!Array.isArray(G.edges))
2502
+ throw new Error("Edges array is required in layout data");
2503
+ return !0;
2504
+ }
2505
+ V(at, "validateLayoutData");
2506
+ var Lt = /* @__PURE__ */ V(async (G, b, {
2507
+ insertCluster: N,
2508
+ insertEdge: I,
2509
+ insertEdgeLabel: L,
2510
+ insertMarkers: o,
2511
+ insertNode: e,
2512
+ log: t,
2513
+ positionEdgeLabel: i
2514
+ }, { algorithm: l }) => {
2515
+ const g = {}, n = {}, p = b.select("g");
2516
+ o(p, G.markers, G.type, G.diagramId);
2517
+ const r = p.insert("g").attr("class", "subgraphs"), a = p.insert("g").attr("class", "edgePaths"), h = p.insert("g").attr("class", "edgeLabels"), d = p.insert("g").attr("class", "nodes");
2518
+ t.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(
2519
+ G.nodes.map(async (u) => {
2520
+ if (u.isGroup) {
2521
+ const T = { ...u };
2522
+ n[u.id] = T, g[u.id] = T, await N(r, u);
2523
+ } else {
2524
+ const T = { ...u };
2525
+ g[u.id] = T;
2526
+ const y = await e(d, u, {
2527
+ config: G.config,
2528
+ dir: G.direction || "TB"
2529
+ }), O = y.node().getBBox();
2530
+ T.width = O.width, T.height = O.height, T.domId = y, t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`);
2531
+ }
2532
+ })
2533
+ ), t.debug("Running cose-bilkent layout algorithm");
2534
+ const v = {
2535
+ ...G,
2536
+ nodes: G.nodes.map((u) => {
2537
+ const T = g[u.id];
2538
+ return {
2539
+ ...u,
2540
+ width: T.width,
2541
+ height: T.height
2542
+ };
2543
+ })
2544
+ }, D = await st(v);
2545
+ t.debug("Positioning nodes based on layout results"), D.nodes.forEach((u) => {
2546
+ const T = g[u.id];
2547
+ T?.domId && (T.domId.attr(
2548
+ "transform",
2549
+ `translate(${u.x}, ${u.y})`
2550
+ ), T.x = u.x, T.y = u.y, t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`));
2551
+ }), D.edges.forEach((u) => {
2552
+ const T = G.edges.find((y) => y.id === u.id);
2553
+ T && (T.points = [
2554
+ { x: u.startX, y: u.startY },
2555
+ { x: u.midX, y: u.midY },
2556
+ { x: u.endX, y: u.endY }
2557
+ ]);
2558
+ }), t.debug("Inserting and positioning edges"), await Promise.all(
2559
+ G.edges.map(async (u) => {
2560
+ await L(h, u);
2561
+ const T = g[u.start ?? ""], y = g[u.end ?? ""];
2562
+ if (T && y) {
2563
+ const O = D.edges.find((s) => s.id === u.id);
2564
+ if (O) {
2565
+ t.debug("APA01 positionedEdge", O);
2566
+ const s = { ...u }, f = I(
2567
+ a,
2568
+ s,
2569
+ n,
2570
+ G.type,
2571
+ T,
2572
+ y,
2573
+ G.diagramId
2574
+ );
2575
+ i(s, f);
2576
+ } else {
2577
+ const s = {
2578
+ ...u,
2579
+ points: [
2580
+ { x: T.x || 0, y: T.y || 0 },
2581
+ { x: y.x || 0, y: y.y || 0 }
2582
+ ]
2583
+ }, f = I(
2584
+ a,
2585
+ s,
2586
+ n,
2587
+ G.type,
2588
+ T,
2589
+ y,
2590
+ G.diagramId
2591
+ );
2592
+ i(s, f);
2593
+ }
2594
+ }
2595
+ })
2596
+ ), t.debug("Cose-bilkent rendering completed");
2597
+ }, "render"), Nt = Lt;
2598
+ export {
2599
+ Nt as render
2600
+ };