@kong-ui-public/documentation 1.7.40-pr.3869.e876c8c8a.0 → 1.7.40

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 (159) hide show
  1. package/dist/arc-DZdQjcG8-CduayE88.js +79 -0
  2. package/dist/architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js +4065 -0
  3. package/dist/astro-D8QEIUE9-nzvtSwAQ.js +18 -0
  4. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +3268 -0
  5. package/dist/c-GOwUpV7U-DMPKLUI8.js +4 -0
  6. package/dist/c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js +3035 -0
  7. package/dist/catppuccin-latte-BcV8jije-D8pvGdu1.js +4 -0
  8. package/dist/channel-DM9j7IFL-DxqBUxfY.js +5 -0
  9. package/dist/chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js +24 -0
  10. package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +8 -0
  11. package/dist/chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js +8 -0
  12. package/dist/chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js +3445 -0
  13. package/dist/chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js +2096 -0
  14. package/dist/chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js +19 -0
  15. package/dist/chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js +65 -0
  16. package/dist/chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js +12 -0
  17. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +17 -0
  18. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +17 -0
  19. package/dist/cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js +2260 -0
  20. package/dist/csharp-Cy04UeDC-OaGPefhL.js +4 -0
  21. package/dist/css-CJQ-rcMF-B_2PRTA_.js +4 -0
  22. package/dist/csv-Bx_Umlp--BPWcOTV4.js +4 -0
  23. package/dist/cytoscape.esm-BDIiOYYO-C1jMBhD8.js +18220 -0
  24. package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +288 -0
  25. package/dist/dagre-DJxg_nfI-hVOVexz-.js +1687 -0
  26. package/dist/defaultLocale-mtMQ0U8A-D6jPixjH.js +182 -0
  27. package/dist/diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js +210 -0
  28. package/dist/diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js +99 -0
  29. package/dist/diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js +439 -0
  30. package/dist/diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js +127 -0
  31. package/dist/diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js +475 -0
  32. package/dist/diff-DZRtXnMG-DenOJuyV.js +4 -0
  33. package/dist/docker-DQBBDNmU-xX8PDoIv.js +4 -0
  34. package/dist/documentation.es.js +7 -0
  35. package/dist/documentation.umd.js +3474 -0
  36. package/dist/erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js +1773 -0
  37. package/dist/flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js +4258 -0
  38. package/dist/ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js +3099 -0
  39. package/dist/git-commit-BOgnKaZ8-Csu8eMzs.js +5 -0
  40. package/dist/git-rebase-0v-YFIjP-D701iWbX.js +5 -0
  41. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +734 -0
  42. package/dist/go-DpaXbCNA-DqSXHrGo.js +4 -0
  43. package/dist/graphlib-D2YdGpuK-CnQPmzkS.js +1071 -0
  44. package/dist/graphql-BSO8hVnT-C6Okg5tI.js +14 -0
  45. package/dist/haml-DizLz-gS-BWwS-eha.js +10 -0
  46. package/dist/handlebars-tnt1-4s--xVtJSIx5.js +14 -0
  47. package/dist/haskell-BDLr0yXS-BlmVjKNy.js +4 -0
  48. package/dist/html-DdIT5Pi9-C35UyBqr.js +10 -0
  49. package/dist/html-derivative-BHAKSQcK-BChKhjnv.js +5 -0
  50. package/dist/http-DRk-iX-V-DQ76ihB0.js +14 -0
  51. package/dist/index-DfVKdDwj.js +40029 -0
  52. package/dist/infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js +18 -0
  53. package/dist/ini-D-uG5DCC-70PBzbbb.js +4 -0
  54. package/dist/init-8lPFe2y8-B2MlpiqM.js +16 -0
  55. package/dist/ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js +728 -0
  56. package/dist/java-CQQr73XR-D6YBp1XX.js +4 -0
  57. package/dist/javascript-CXmFGv-C-BRPKgr3C.js +4 -0
  58. package/dist/journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js +908 -0
  59. package/dist/json-BXFRNzj8-D8uacQj0.js +4 -0
  60. package/dist/json5-B5-J7v9w-Biib5ALh.js +4 -0
  61. package/dist/jsonc-CeA7x8NU-BZEKkMok.js +4 -0
  62. package/dist/jsonl-BBlxch9W-BG2V-IA2.js +4 -0
  63. package/dist/jsx-DucQCby8-Cl0AMtmu.js +4 -0
  64. package/dist/kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js +1028 -0
  65. package/dist/katex-D7tFlpqA-BOSQxXe1.js +22315 -0
  66. package/dist/kotlin-CDXyBjvc-Dy_91eL4.js +4 -0
  67. package/dist/latex-COX74REd-l1quglTx.js +5 -0
  68. package/dist/less-QqooI0UQ-tcNg8M2_.js +4 -0
  69. package/dist/linear-1MXhYum8-9C1jno9G.js +255 -0
  70. package/dist/liquid-CsynDTV--Bdhb3gsJ.js +14 -0
  71. package/dist/lua-B3xrKnOz-Coo0MCwO.js +5 -0
  72. package/dist/make-eFBmESRY-CrUl7LOH.js +4 -0
  73. package/dist/markdown-DkQv9NwM-Bcqt-5kX.js +4 -0
  74. package/dist/material-theme-darker-Bp7Jj852-DMHCIvq5.js +4 -0
  75. package/dist/mdc-BK-Z5Xv--aFc-Oyv5.js +12 -0
  76. package/dist/mdx-CjbEMaEg-CK6jOqmu.js +4 -0
  77. package/dist/mermaid-Ccfpee4A-BgbNnQO5.js +4 -0
  78. package/dist/mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js +1026 -0
  79. package/dist/nginx-DQrs__jO-BS9Jcr4V.js +5 -0
  80. package/dist/objective-c-CXg1TPY9-C809HPrX.js +4 -0
  81. package/dist/ordinal-D9ksOc8y-2hZwLyEk.js +63 -0
  82. package/dist/pascal-C6L9Tn1x-a8whuidZ.js +4 -0
  83. package/dist/perl-Dbi-SlHs-DsZjIGqU.js +16 -0
  84. package/dist/php-J5w8HAya-DnRg4f-g.js +18 -0
  85. package/dist/pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js +153 -0
  86. package/dist/plsql-Ba_yrVwL-BJoF2Vrf.js +4 -0
  87. package/dist/postcss-Bsoc__IZ-DaHMm3XW.js +4 -0
  88. package/dist/powershell-CKvM5hOe-Box9VSDW.js +4 -0
  89. package/dist/proto-iweZN-Ks-w0B_itsp.js +4 -0
  90. package/dist/pug-DUPsoXbW-BFHDRSax.js +12 -0
  91. package/dist/python-MxhgNM12-D_5pfY__.js +4 -0
  92. package/dist/quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js +2046 -0
  93. package/dist/r-CoGPXt5G-BrbXTU3W.js +4 -0
  94. package/dist/reg-CHAl2UuA-bHAwx9Pm.js +4 -0
  95. package/dist/requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js +2281 -0
  96. package/dist/rst-D-Zcnz0t-C3PGnqgH.js +20 -0
  97. package/dist/ruby-CQp7mk0v-B3KpG-9E.js +46 -0
  98. package/dist/rust-W9HETclW-CaZtBt24.js +4 -0
  99. package/dist/sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js +946 -0
  100. package/dist/sass-DzGfEb5u-pslLeRRb.js +4 -0
  101. package/dist/scss-cWHTb1-d-DN6jMR75.js +5 -0
  102. package/dist/sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js +4266 -0
  103. package/dist/shellscript-BvJBBLP1-BtH46UX7.js +4 -0
  104. package/dist/shellsession-CXHk-hsk-D-2JR5oU.js +5 -0
  105. package/dist/splunk-TtOhH_8h-BP8P7eWt.js +4 -0
  106. package/dist/sql-B-h_q34g-uWwuAxg_.js +4 -0
  107. package/dist/ssh-config-B7jk1vQp-BB1rrGb9.js +4 -0
  108. package/dist/stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js +210 -0
  109. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +16 -0
  110. package/dist/style.css +1 -0
  111. package/dist/stylus-Ccd_7r3J-DAu5PNZ9.js +4 -0
  112. package/dist/svelte-CYqtuUsn-Cf97VB5J.js +14 -0
  113. package/dist/swift-CzsQqA0L-BPF2ddNF.js +4 -0
  114. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +1095 -0
  115. package/dist/toml-CRTROHRr-DjT9Bjqu.js +4 -0
  116. package/dist/tsx-CE8dfKwK-B-5hSr15.js +4 -0
  117. package/dist/twig-Bst4uh7S-C3aA9tng.js +18 -0
  118. package/dist/types/components/DiscardChangesPrompt.vue.d.ts +35 -0
  119. package/dist/types/components/DiscardChangesPrompt.vue.d.ts.map +1 -0
  120. package/dist/types/components/DocumentationContent.vue.d.ts +186 -0
  121. package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -0
  122. package/dist/types/components/DocumentationDisplay.vue.d.ts +105 -0
  123. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -0
  124. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +31 -0
  125. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +1 -0
  126. package/dist/types/components/ProductDocumentModal.vue.d.ts +72 -0
  127. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -0
  128. package/dist/types/composables/index.d.ts +6 -0
  129. package/dist/types/composables/index.d.ts.map +1 -0
  130. package/dist/types/composables/useI18n.d.ts +9 -0
  131. package/dist/types/composables/useI18n.d.ts.map +1 -0
  132. package/dist/types/external-links.d.ts +5 -0
  133. package/dist/types/external-links.d.ts.map +1 -0
  134. package/dist/types/helpers.d.ts +8 -0
  135. package/dist/types/helpers.d.ts.map +1 -0
  136. package/dist/types/index.d.ts +7 -0
  137. package/dist/types/index.d.ts.map +1 -0
  138. package/dist/types/types/document-list.d.ts +28 -0
  139. package/dist/types/types/document-list.d.ts.map +1 -0
  140. package/dist/types/types/document-modal.d.ts +8 -0
  141. package/dist/types/types/document-modal.d.ts.map +1 -0
  142. package/dist/types/types/index.d.ts +3 -0
  143. package/dist/types/types/index.d.ts.map +1 -0
  144. package/dist/typescript-8ogSSNer-B0ag8pir.js +4 -0
  145. package/dist/v-NeSnRB8V-CYSa2rJN.js +4 -0
  146. package/dist/vb-Dz72yc4q-B6FpM2Kc.js +4 -0
  147. package/dist/vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js +1889 -0
  148. package/dist/viml-DB1flIhL-BeYQ8dZh.js +4 -0
  149. package/dist/vue-Bq4JA_WT-CGBUDahs.js +22 -0
  150. package/dist/vue-html-BygQzR-9-BPez-Otx.js +5 -0
  151. package/dist/wardley-L42UT6IY-BjAkE_cs-C-giFqos.js +20731 -0
  152. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +639 -0
  153. package/dist/wasm-BmZuu1vu-CfuK9YWP.js +4 -0
  154. package/dist/wgsl-D-vNyw6e-C2IZ7ENh.js +4 -0
  155. package/dist/xml-juAhGoTG-khG3jjDl.js +5 -0
  156. package/dist/xsl-CHgyQG2O-CiMa9sUf.js +5 -0
  157. package/dist/xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js +2055 -0
  158. package/dist/yaml-BK_xXVzk-X78l_Ibz.js +4 -0
  159. package/package.json +2 -2
@@ -0,0 +1,2260 @@
1
+ import { p as k, g as j, q as nt, u as st, M as V } from "./index-DfVKdDwj.js";
2
+ import { K as $ } from "./cytoscape.esm-BDIiOYYO-C1jMBhD8.js";
3
+ var z = /* @__PURE__ */ V(((C, P) => {
4
+ (function(L, m) {
5
+ typeof C == "object" && typeof P == "object" ? P.exports = m() : typeof define == "function" && define.amd ? define([], m) : typeof C == "object" ? C.layoutBase = m() : L.layoutBase = m();
6
+ })(C, function() {
7
+ return (function(L) {
8
+ var m = {};
9
+ function A(n) {
10
+ if (m[n]) return m[n].exports;
11
+ var e = m[n] = {
12
+ i: n,
13
+ l: !1,
14
+ exports: {}
15
+ };
16
+ return L[n].call(e.exports, e, e.exports, A), e.l = !0, e.exports;
17
+ }
18
+ return A.m = L, A.c = m, A.i = function(n) {
19
+ return n;
20
+ }, A.d = function(n, e, t) {
21
+ A.o(n, e) || Object.defineProperty(n, e, {
22
+ configurable: !1,
23
+ enumerable: !0,
24
+ get: t
25
+ });
26
+ }, A.n = function(n) {
27
+ var e = n && n.__esModule ? function() {
28
+ return n.default;
29
+ } : function() {
30
+ return n;
31
+ };
32
+ return A.d(e, "a", e), e;
33
+ }, A.o = function(n, e) {
34
+ return Object.prototype.hasOwnProperty.call(n, e);
35
+ }, A.p = "", A(A.s = 26);
36
+ })([
37
+ (function(L, m, A) {
38
+ function n() {
39
+ }
40
+ n.QUALITY = 1, n.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, n.DEFAULT_INCREMENTAL = !1, n.DEFAULT_ANIMATION_ON_LAYOUT = !0, n.DEFAULT_ANIMATION_DURING_LAYOUT = !1, n.DEFAULT_ANIMATION_PERIOD = 50, n.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, n.DEFAULT_GRAPH_MARGIN = 15, n.NODE_DIMENSIONS_INCLUDE_LABELS = !1, n.SIMPLE_NODE_SIZE = 40, n.SIMPLE_NODE_HALF_SIZE = n.SIMPLE_NODE_SIZE / 2, n.EMPTY_COMPOUND_NODE_SIZE = 40, n.MIN_EDGE_LENGTH = 1, n.WORLD_BOUNDARY = 1e6, n.INITIAL_WORLD_BOUNDARY = n.WORLD_BOUNDARY / 1e3, n.WORLD_CENTER_X = 1200, n.WORLD_CENTER_Y = 900, L.exports = n;
41
+ }),
42
+ (function(L, m, A) {
43
+ var n = A(2), e = A(8), t = A(9);
44
+ function i(h, o, N) {
45
+ n.call(this, N), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = N, this.bendpoints = [], this.source = h, this.target = o;
46
+ }
47
+ for (var r in i.prototype = Object.create(n.prototype), n) i[r] = n[r];
48
+ i.prototype.getSource = function() {
49
+ return this.source;
50
+ }, i.prototype.getTarget = function() {
51
+ return this.target;
52
+ }, i.prototype.isInterGraph = function() {
53
+ return this.isInterGraph;
54
+ }, i.prototype.getLength = function() {
55
+ return this.length;
56
+ }, i.prototype.isOverlapingSourceAndTarget = function() {
57
+ return this.isOverlapingSourceAndTarget;
58
+ }, i.prototype.getBendpoints = function() {
59
+ return this.bendpoints;
60
+ }, i.prototype.getLca = function() {
61
+ return this.lca;
62
+ }, i.prototype.getSourceInLca = function() {
63
+ return this.sourceInLca;
64
+ }, i.prototype.getTargetInLca = function() {
65
+ return this.targetInLca;
66
+ }, i.prototype.getOtherEnd = function(h) {
67
+ if (this.source === h) return this.target;
68
+ if (this.target === h) return this.source;
69
+ throw "Node is not incident with this edge";
70
+ }, i.prototype.getOtherEndInGraph = function(h, o) {
71
+ for (var N = this.getOtherEnd(h), s = o.getGraphManager().getRoot(); ; ) {
72
+ if (N.getOwner() == o) return N;
73
+ if (N.getOwner() == s) break;
74
+ N = N.getOwner().getParent();
75
+ }
76
+ return null;
77
+ }, i.prototype.updateLength = function() {
78
+ var h = [
79
+ ,
80
+ ,
81
+ ,
82
+ ,
83
+ ];
84
+ this.isOverlapingSourceAndTarget = e.getIntersection(this.target.getRect(), this.source.getRect(), h), this.isOverlapingSourceAndTarget || (this.lengthX = h[0] - h[2], this.lengthY = h[1] - h[3], Math.abs(this.lengthX) < 1 && (this.lengthX = 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));
85
+ }, i.prototype.updateLengthSimple = function() {
86
+ 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);
87
+ }, L.exports = i;
88
+ }),
89
+ (function(L, m, A) {
90
+ function n(e) {
91
+ this.vGraphObject = e;
92
+ }
93
+ L.exports = n;
94
+ }),
95
+ (function(L, m, A) {
96
+ var n = A(2), e = A(10), t = A(13), i = A(0), r = A(16), h = A(4);
97
+ function o(s, g, u, p) {
98
+ u == null && p == null && (p = g), n.call(this, p), s.graphManager != null && (s = s.graphManager), this.estimatedSize = e.MIN_VALUE, this.inclusionTreeDepth = e.MAX_VALUE, this.vGraphObject = p, this.edges = [], this.graphManager = s, u != null && g != null ? this.rect = new t(g.x, g.y, u.width, u.height) : this.rect = new t();
99
+ }
100
+ for (var N in o.prototype = Object.create(n.prototype), n) o[N] = n[N];
101
+ o.prototype.getEdges = function() {
102
+ return this.edges;
103
+ }, o.prototype.getChild = function() {
104
+ return this.child;
105
+ }, o.prototype.getOwner = function() {
106
+ return this.owner;
107
+ }, o.prototype.getWidth = function() {
108
+ return this.rect.width;
109
+ }, o.prototype.setWidth = function(s) {
110
+ this.rect.width = s;
111
+ }, o.prototype.getHeight = function() {
112
+ return this.rect.height;
113
+ }, o.prototype.setHeight = function(s) {
114
+ this.rect.height = s;
115
+ }, o.prototype.getCenterX = function() {
116
+ return this.rect.x + this.rect.width / 2;
117
+ }, o.prototype.getCenterY = function() {
118
+ return this.rect.y + this.rect.height / 2;
119
+ }, o.prototype.getCenter = function() {
120
+ return new h(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
121
+ }, o.prototype.getLocation = function() {
122
+ return new h(this.rect.x, this.rect.y);
123
+ }, o.prototype.getRect = function() {
124
+ return this.rect;
125
+ }, o.prototype.getDiagonal = function() {
126
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
127
+ }, o.prototype.getHalfTheDiagonal = function() {
128
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
129
+ }, o.prototype.setRect = function(s, g) {
130
+ this.rect.x = s.x, this.rect.y = s.y, this.rect.width = g.width, this.rect.height = g.height;
131
+ }, o.prototype.setCenter = function(s, g) {
132
+ this.rect.x = s - this.rect.width / 2, this.rect.y = g - this.rect.height / 2;
133
+ }, o.prototype.setLocation = function(s, g) {
134
+ this.rect.x = s, this.rect.y = g;
135
+ }, o.prototype.moveBy = function(s, g) {
136
+ this.rect.x += s, this.rect.y += g;
137
+ }, o.prototype.getEdgeListToNode = function(s) {
138
+ var g = [], u = this;
139
+ return u.edges.forEach(function(p) {
140
+ if (p.target == s) {
141
+ if (p.source != u) throw "Incorrect edge source!";
142
+ g.push(p);
143
+ }
144
+ }), g;
145
+ }, o.prototype.getEdgesBetween = function(s) {
146
+ var g = [], u = this;
147
+ return u.edges.forEach(function(p) {
148
+ if (!(p.source == u || p.target == u)) throw "Incorrect edge source and/or target";
149
+ (p.target == s || p.source == s) && g.push(p);
150
+ }), g;
151
+ }, o.prototype.getNeighborsList = function() {
152
+ var s = /* @__PURE__ */ new Set(), g = this;
153
+ return g.edges.forEach(function(u) {
154
+ if (u.source == g) s.add(u.target);
155
+ else {
156
+ if (u.target != g) throw "Incorrect incidency!";
157
+ s.add(u.source);
158
+ }
159
+ }), s;
160
+ }, o.prototype.withChildren = function() {
161
+ var s = /* @__PURE__ */ new Set(), g, u;
162
+ if (s.add(this), this.child != null) for (var p = this.child.getNodes(), y = 0; y < p.length; y++) g = p[y], u = g.withChildren(), u.forEach(function(c) {
163
+ s.add(c);
164
+ });
165
+ return s;
166
+ }, o.prototype.getNoOfChildren = function() {
167
+ var s = 0, g;
168
+ if (this.child == null) s = 1;
169
+ else for (var u = this.child.getNodes(), p = 0; p < u.length; p++) g = u[p], s += g.getNoOfChildren();
170
+ return s == 0 && (s = 1), s;
171
+ }, o.prototype.getEstimatedSize = function() {
172
+ if (this.estimatedSize == e.MIN_VALUE) throw "assert failed";
173
+ return this.estimatedSize;
174
+ }, o.prototype.calcEstimatedSize = function() {
175
+ 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);
176
+ }, o.prototype.scatter = function() {
177
+ var s, g, u = -i.INITIAL_WORLD_BOUNDARY, p = i.INITIAL_WORLD_BOUNDARY;
178
+ s = i.WORLD_CENTER_X + r.nextDouble() * (p - u) + u;
179
+ var y = -i.INITIAL_WORLD_BOUNDARY, c = i.INITIAL_WORLD_BOUNDARY;
180
+ g = i.WORLD_CENTER_Y + r.nextDouble() * (c - y) + y, this.rect.x = s, this.rect.y = g;
181
+ }, o.prototype.updateBounds = function() {
182
+ if (this.getChild() == null) throw "assert failed";
183
+ if (this.getChild().getNodes().length != 0) {
184
+ var s = this.getChild();
185
+ if (s.updateBounds(!0), this.rect.x = s.getLeft(), this.rect.y = s.getTop(), this.setWidth(s.getRight() - s.getLeft()), this.setHeight(s.getBottom() - s.getTop()), i.NODE_DIMENSIONS_INCLUDE_LABELS) {
186
+ var g = s.getRight() - s.getLeft(), u = s.getBottom() - s.getTop();
187
+ this.labelWidth > g && (this.rect.x -= (this.labelWidth - g) / 2, this.setWidth(this.labelWidth)), this.labelHeight > u && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - u) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - u), this.setHeight(this.labelHeight));
188
+ }
189
+ }
190
+ }, o.prototype.getInclusionTreeDepth = function() {
191
+ if (this.inclusionTreeDepth == e.MAX_VALUE) throw "assert failed";
192
+ return this.inclusionTreeDepth;
193
+ }, o.prototype.transform = function(s) {
194
+ var g = this.rect.x;
195
+ g > i.WORLD_BOUNDARY ? g = i.WORLD_BOUNDARY : g < -i.WORLD_BOUNDARY && (g = -i.WORLD_BOUNDARY);
196
+ var u = this.rect.y;
197
+ u > i.WORLD_BOUNDARY ? u = i.WORLD_BOUNDARY : u < -i.WORLD_BOUNDARY && (u = -i.WORLD_BOUNDARY);
198
+ var p = new h(g, u), y = s.inverseTransformPoint(p);
199
+ this.setLocation(y.x, y.y);
200
+ }, o.prototype.getLeft = function() {
201
+ return this.rect.x;
202
+ }, o.prototype.getRight = function() {
203
+ return this.rect.x + this.rect.width;
204
+ }, o.prototype.getTop = function() {
205
+ return this.rect.y;
206
+ }, o.prototype.getBottom = function() {
207
+ return this.rect.y + this.rect.height;
208
+ }, o.prototype.getParent = function() {
209
+ return this.owner == null ? null : this.owner.getParent();
210
+ }, L.exports = o;
211
+ }),
212
+ (function(L, m, A) {
213
+ function n(e, t) {
214
+ e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
215
+ }
216
+ n.prototype.getX = function() {
217
+ return this.x;
218
+ }, n.prototype.getY = function() {
219
+ return this.y;
220
+ }, n.prototype.setX = function(e) {
221
+ this.x = e;
222
+ }, n.prototype.setY = function(e) {
223
+ this.y = e;
224
+ }, n.prototype.getDifference = function(e) {
225
+ return new DimensionD(this.x - e.x, this.y - e.y);
226
+ }, n.prototype.getCopy = function() {
227
+ return new n(this.x, this.y);
228
+ }, n.prototype.translate = function(e) {
229
+ return this.x += e.width, this.y += e.height, this;
230
+ }, L.exports = n;
231
+ }),
232
+ (function(L, m, A) {
233
+ var n = A(2), e = A(10), t = A(0), i = A(6), r = A(3), h = A(1), o = A(13), N = A(12), s = A(11);
234
+ function g(p, y, c) {
235
+ n.call(this, c), this.estimatedSize = e.MIN_VALUE, this.margin = t.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = p, y != null && y instanceof i ? this.graphManager = y : y != null && y instanceof Layout && (this.graphManager = y.graphManager);
236
+ }
237
+ for (var u in g.prototype = Object.create(n.prototype), n) g[u] = n[u];
238
+ g.prototype.getNodes = function() {
239
+ return this.nodes;
240
+ }, g.prototype.getEdges = function() {
241
+ return this.edges;
242
+ }, g.prototype.getGraphManager = function() {
243
+ return this.graphManager;
244
+ }, g.prototype.getParent = function() {
245
+ return this.parent;
246
+ }, g.prototype.getLeft = function() {
247
+ return this.left;
248
+ }, g.prototype.getRight = function() {
249
+ return this.right;
250
+ }, g.prototype.getTop = function() {
251
+ return this.top;
252
+ }, g.prototype.getBottom = function() {
253
+ return this.bottom;
254
+ }, g.prototype.isConnected = function() {
255
+ return this.isConnected;
256
+ }, g.prototype.add = function(p, y, c) {
257
+ if (y == null && c == null) {
258
+ var f = p;
259
+ if (this.graphManager == null) throw "Graph has no graph mgr!";
260
+ if (this.getNodes().indexOf(f) > -1) throw "Node already in graph!";
261
+ return f.owner = this, this.getNodes().push(f), f;
262
+ } else {
263
+ var T = p;
264
+ if (!(this.getNodes().indexOf(y) > -1 && this.getNodes().indexOf(c) > -1)) throw "Source or target not in graph!";
265
+ if (!(y.owner == c.owner && y.owner == this)) throw "Both owners must be this graph!";
266
+ return y.owner == c.owner ? (T.source = y, T.target = c, T.isInterGraph = !1, this.getEdges().push(T), y.edges.push(T), c != y && c.edges.push(T), T) : null;
267
+ }
268
+ }, g.prototype.remove = function(p) {
269
+ var y = p;
270
+ if (p instanceof r) {
271
+ if (y == null) throw "Node is null!";
272
+ if (!(y.owner != null && y.owner == this)) throw "Owner graph is invalid!";
273
+ if (this.graphManager == null) throw "Owner graph manager is invalid!";
274
+ for (var c = y.edges.slice(), f, T = c.length, E = 0; E < T; E++) f = c[E], f.isInterGraph ? this.graphManager.remove(f) : f.source.owner.remove(f);
275
+ var O = this.nodes.indexOf(y);
276
+ if (O == -1) throw "Node not in owner node list!";
277
+ this.nodes.splice(O, 1);
278
+ } else if (p instanceof h) {
279
+ var f = p;
280
+ if (f == null) throw "Edge is null!";
281
+ if (!(f.source != null && f.target != null)) throw "Source and/or target is null!";
282
+ if (!(f.source.owner != null && f.target.owner != null && f.source.owner == this && f.target.owner == this)) throw "Source and/or target owner is invalid!";
283
+ var a = f.source.edges.indexOf(f), d = f.target.edges.indexOf(f);
284
+ if (!(a > -1 && d > -1)) throw "Source and/or target doesn't know this edge!";
285
+ f.source.edges.splice(a, 1), f.target != f.source && f.target.edges.splice(d, 1);
286
+ var O = f.source.owner.getEdges().indexOf(f);
287
+ if (O == -1) throw "Not in owner's edge list!";
288
+ f.source.owner.getEdges().splice(O, 1);
289
+ }
290
+ }, g.prototype.updateLeftTop = function() {
291
+ for (var p = e.MAX_VALUE, y = e.MAX_VALUE, c, f, T, E = this.getNodes(), O = E.length, a = 0; a < O; a++) {
292
+ var d = E[a];
293
+ c = d.getTop(), f = d.getLeft(), p > c && (p = c), y > f && (y = f);
294
+ }
295
+ return p == e.MAX_VALUE ? null : (T = E[0].getParent().paddingLeft == null ? this.margin : E[0].getParent().paddingLeft, this.left = y - T, this.top = p - T, new N(this.left, this.top));
296
+ }, g.prototype.updateBounds = function(p) {
297
+ for (var y = e.MAX_VALUE, c = -e.MAX_VALUE, f = e.MAX_VALUE, T = -e.MAX_VALUE, E, O, a, d, l, v = this.nodes, _ = v.length, D = 0; D < _; D++) {
298
+ var I = v[D];
299
+ p && I.child != null && I.updateBounds(), E = I.getLeft(), O = I.getRight(), a = I.getTop(), d = I.getBottom(), y > E && (y = E), c < O && (c = O), f > a && (f = a), T < d && (T = d);
300
+ }
301
+ var w = new o(y, f, c - y, T - f);
302
+ y == e.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), l = v[0].getParent().paddingLeft == null ? this.margin : v[0].getParent().paddingLeft, this.left = w.x - l, this.right = w.x + w.width + l, this.top = w.y - l, this.bottom = w.y + w.height + l;
303
+ }, g.calculateBounds = function(p) {
304
+ for (var y = e.MAX_VALUE, c = -e.MAX_VALUE, f = e.MAX_VALUE, T = -e.MAX_VALUE, E, O, a, d, l = p.length, v = 0; v < l; v++) {
305
+ var _ = p[v];
306
+ E = _.getLeft(), O = _.getRight(), a = _.getTop(), d = _.getBottom(), y > E && (y = E), c < O && (c = O), f > a && (f = a), T < d && (T = d);
307
+ }
308
+ return new o(y, f, c - y, T - f);
309
+ }, g.prototype.getInclusionTreeDepth = function() {
310
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
311
+ }, g.prototype.getEstimatedSize = function() {
312
+ if (this.estimatedSize == e.MIN_VALUE) throw "assert failed";
313
+ return this.estimatedSize;
314
+ }, g.prototype.calcEstimatedSize = function() {
315
+ for (var p = 0, y = this.nodes, c = y.length, f = 0; f < c; f++) {
316
+ var T = y[f];
317
+ p += T.calcEstimatedSize();
318
+ }
319
+ return p == 0 ? this.estimatedSize = t.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = p / Math.sqrt(this.nodes.length), this.estimatedSize;
320
+ }, g.prototype.updateConnected = function() {
321
+ var p = this;
322
+ if (this.nodes.length == 0) {
323
+ this.isConnected = !0;
324
+ return;
325
+ }
326
+ var y = new s(), c = /* @__PURE__ */ new Set(), f = this.nodes[0], T, E;
327
+ for (f.withChildren().forEach(function(l) {
328
+ y.push(l), c.add(l);
329
+ }); y.length !== 0; ) {
330
+ f = y.shift(), T = f.getEdges();
331
+ for (var O = T.length, a = 0; a < O; a++) E = T[a].getOtherEndInGraph(f, this), E != null && !c.has(E) && E.withChildren().forEach(function(l) {
332
+ y.push(l), c.add(l);
333
+ });
334
+ }
335
+ if (this.isConnected = !1, c.size >= this.nodes.length) {
336
+ var d = 0;
337
+ c.forEach(function(l) {
338
+ l.owner == p && d++;
339
+ }), d == this.nodes.length && (this.isConnected = !0);
340
+ }
341
+ }, L.exports = g;
342
+ }),
343
+ (function(L, m, A) {
344
+ var n, e = A(1);
345
+ function t(i) {
346
+ n = A(5), this.layout = i, this.graphs = [], this.edges = [];
347
+ }
348
+ t.prototype.addRoot = function() {
349
+ var i = this.layout.newGraph(), r = this.layout.newNode(null), h = this.add(i, r);
350
+ return this.setRootGraph(h), this.rootGraph;
351
+ }, t.prototype.add = function(i, r, h, o, N) {
352
+ if (h == null && o == null && N == null) {
353
+ if (i == null) throw "Graph is null!";
354
+ if (r == null) throw "Parent node is null!";
355
+ if (this.graphs.indexOf(i) > -1) throw "Graph already in this graph mgr!";
356
+ if (this.graphs.push(i), i.parent != null) throw "Already has a parent!";
357
+ if (r.child != null) throw "Already has a child!";
358
+ return i.parent = r, r.child = i, i;
359
+ } else {
360
+ N = h, o = r, h = i;
361
+ var s = o.getOwner(), g = N.getOwner();
362
+ if (!(s != null && s.getGraphManager() == this)) throw "Source not in this graph mgr!";
363
+ if (!(g != null && g.getGraphManager() == this)) throw "Target not in this graph mgr!";
364
+ if (s == g) return h.isInterGraph = !1, s.add(h, o, N);
365
+ if (h.isInterGraph = !0, h.source = o, h.target = N, this.edges.indexOf(h) > -1) throw "Edge already in inter-graph edge list!";
366
+ if (this.edges.push(h), !(h.source != null && h.target != null)) throw "Edge source and/or target is null!";
367
+ if (!(h.source.edges.indexOf(h) == -1 && h.target.edges.indexOf(h) == -1)) throw "Edge already in source and/or target incidency list!";
368
+ return h.source.edges.push(h), h.target.edges.push(h), h;
369
+ }
370
+ }, t.prototype.remove = function(i) {
371
+ if (i instanceof n) {
372
+ var r = i;
373
+ if (r.getGraphManager() != this) throw "Graph not in this graph mgr";
374
+ if (!(r == this.rootGraph || r.parent != null && r.parent.graphManager == this)) throw "Invalid parent node!";
375
+ var h = [];
376
+ h = h.concat(r.getEdges());
377
+ for (var o, N = h.length, s = 0; s < N; s++) o = h[s], r.remove(o);
378
+ var g = [];
379
+ g = g.concat(r.getNodes());
380
+ var u;
381
+ N = g.length;
382
+ for (var s = 0; s < N; s++) u = g[s], r.remove(u);
383
+ r == this.rootGraph && this.setRootGraph(null);
384
+ var p = this.graphs.indexOf(r);
385
+ this.graphs.splice(p, 1), r.parent = null;
386
+ } else if (i instanceof e) {
387
+ if (o = i, o == null) throw "Edge is null!";
388
+ if (!o.isInterGraph) throw "Not an inter-graph edge!";
389
+ if (!(o.source != null && o.target != null)) throw "Source and/or target is null!";
390
+ if (!(o.source.edges.indexOf(o) != -1 && o.target.edges.indexOf(o) != -1)) throw "Source and/or target doesn't know this edge!";
391
+ var p = o.source.edges.indexOf(o);
392
+ if (o.source.edges.splice(p, 1), p = o.target.edges.indexOf(o), o.target.edges.splice(p, 1), !(o.source.owner != null && o.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
393
+ if (o.source.owner.getGraphManager().edges.indexOf(o) == -1) throw "Not in owner graph manager's edge list!";
394
+ var p = o.source.owner.getGraphManager().edges.indexOf(o);
395
+ o.source.owner.getGraphManager().edges.splice(p, 1);
396
+ }
397
+ }, t.prototype.updateBounds = function() {
398
+ this.rootGraph.updateBounds(!0);
399
+ }, t.prototype.getGraphs = function() {
400
+ return this.graphs;
401
+ }, t.prototype.getAllNodes = function() {
402
+ if (this.allNodes == null) {
403
+ for (var i = [], r = this.getGraphs(), h = r.length, o = 0; o < h; o++) i = i.concat(r[o].getNodes());
404
+ this.allNodes = i;
405
+ }
406
+ return this.allNodes;
407
+ }, t.prototype.resetAllNodes = function() {
408
+ this.allNodes = null;
409
+ }, t.prototype.resetAllEdges = function() {
410
+ this.allEdges = null;
411
+ }, t.prototype.resetAllNodesToApplyGravitation = function() {
412
+ this.allNodesToApplyGravitation = null;
413
+ }, t.prototype.getAllEdges = function() {
414
+ if (this.allEdges == null) {
415
+ var i = [], r = this.getGraphs();
416
+ r.length;
417
+ for (var h = 0; h < r.length; h++) i = i.concat(r[h].getEdges());
418
+ i = i.concat(this.edges), this.allEdges = i;
419
+ }
420
+ return this.allEdges;
421
+ }, t.prototype.getAllNodesToApplyGravitation = function() {
422
+ return this.allNodesToApplyGravitation;
423
+ }, t.prototype.setAllNodesToApplyGravitation = function(i) {
424
+ if (this.allNodesToApplyGravitation != null) throw "assert failed";
425
+ this.allNodesToApplyGravitation = i;
426
+ }, t.prototype.getRoot = function() {
427
+ return this.rootGraph;
428
+ }, t.prototype.setRootGraph = function(i) {
429
+ if (i.getGraphManager() != this) throw "Root not in this graph mgr!";
430
+ this.rootGraph = i, i.parent ??= this.layout.newNode("Root node");
431
+ }, t.prototype.getLayout = function() {
432
+ return this.layout;
433
+ }, t.prototype.isOneAncestorOfOther = function(i, r) {
434
+ if (!(i != null && r != null)) throw "assert failed";
435
+ if (i == r) return !0;
436
+ var h = i.getOwner(), o;
437
+ do {
438
+ if (o = h.getParent(), o == null) break;
439
+ if (o == r) return !0;
440
+ if (h = o.getOwner(), h == null) break;
441
+ } while (!0);
442
+ h = r.getOwner();
443
+ do {
444
+ if (o = h.getParent(), o == null) break;
445
+ if (o == i) return !0;
446
+ if (h = o.getOwner(), h == null) break;
447
+ } while (!0);
448
+ return !1;
449
+ }, t.prototype.calcLowestCommonAncestors = function() {
450
+ for (var i, r, h, o, N, s = this.getAllEdges(), g = s.length, u = 0; u < g; u++) {
451
+ if (i = s[u], r = i.source, h = i.target, i.lca = null, i.sourceInLca = r, i.targetInLca = h, r == h) {
452
+ i.lca = r.getOwner();
453
+ continue;
454
+ }
455
+ for (o = r.getOwner(); i.lca == null; ) {
456
+ for (i.targetInLca = h, N = h.getOwner(); i.lca == null; ) {
457
+ if (N == o) {
458
+ i.lca = N;
459
+ break;
460
+ }
461
+ if (N == this.rootGraph) break;
462
+ if (i.lca != null) throw "assert failed";
463
+ i.targetInLca = N.getParent(), N = i.targetInLca.getOwner();
464
+ }
465
+ if (o == this.rootGraph) break;
466
+ i.lca ?? (i.sourceInLca = o.getParent(), o = i.sourceInLca.getOwner());
467
+ }
468
+ if (i.lca == null) throw "assert failed";
469
+ }
470
+ }, t.prototype.calcLowestCommonAncestor = function(i, r) {
471
+ if (i == r) return i.getOwner();
472
+ var h = i.getOwner();
473
+ do {
474
+ if (h == null) break;
475
+ var o = r.getOwner();
476
+ do {
477
+ if (o == null) break;
478
+ if (o == h) return o;
479
+ o = o.getParent().getOwner();
480
+ } while (!0);
481
+ h = h.getParent().getOwner();
482
+ } while (!0);
483
+ return h;
484
+ }, t.prototype.calcInclusionTreeDepths = function(i, r) {
485
+ i == null && r == null && (i = this.rootGraph, r = 1);
486
+ for (var h, o = i.getNodes(), N = o.length, s = 0; s < N; s++) h = o[s], h.inclusionTreeDepth = r, h.child != null && this.calcInclusionTreeDepths(h.child, r + 1);
487
+ }, t.prototype.includesInvalidEdge = function() {
488
+ for (var i, r = this.edges.length, h = 0; h < r; h++) if (i = this.edges[h], this.isOneAncestorOfOther(i.source, i.target)) return !0;
489
+ return !1;
490
+ }, L.exports = t;
491
+ }),
492
+ (function(L, m, A) {
493
+ var n = A(0);
494
+ function e() {
495
+ }
496
+ for (var t in n) e[t] = n[t];
497
+ 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, L.exports = e;
498
+ }),
499
+ (function(L, m, A) {
500
+ var n = A(12);
501
+ function e() {
502
+ }
503
+ e.calcSeparationAmount = function(t, i, r, h) {
504
+ if (!t.intersects(i)) throw "assert failed";
505
+ var o = [, ,];
506
+ this.decideDirectionsForOverlappingNodes(t, i, o), r[0] = Math.min(t.getRight(), i.getRight()) - Math.max(t.x, i.x), r[1] = Math.min(t.getBottom(), i.getBottom()) - Math.max(t.y, i.y), t.getX() <= i.getX() && t.getRight() >= i.getRight() ? r[0] += Math.min(i.getX() - t.getX(), t.getRight() - i.getRight()) : i.getX() <= t.getX() && i.getRight() >= t.getRight() && (r[0] += Math.min(t.getX() - i.getX(), i.getRight() - t.getRight())), t.getY() <= i.getY() && t.getBottom() >= i.getBottom() ? r[1] += Math.min(i.getY() - t.getY(), t.getBottom() - i.getBottom()) : i.getY() <= t.getY() && i.getBottom() >= t.getBottom() && (r[1] += Math.min(t.getY() - i.getY(), i.getBottom() - t.getBottom()));
507
+ var N = Math.abs((i.getCenterY() - t.getCenterY()) / (i.getCenterX() - t.getCenterX()));
508
+ i.getCenterY() === t.getCenterY() && i.getCenterX() === t.getCenterX() && (N = 1);
509
+ var s = N * r[0], g = r[1] / N;
510
+ r[0] < g ? g = r[0] : s = r[1], r[0] = -1 * o[0] * (g / 2 + h), r[1] = -1 * o[1] * (s / 2 + h);
511
+ }, e.decideDirectionsForOverlappingNodes = function(t, i, r) {
512
+ t.getCenterX() < i.getCenterX() ? r[0] = -1 : r[0] = 1, t.getCenterY() < i.getCenterY() ? r[1] = -1 : r[1] = 1;
513
+ }, e.getIntersection2 = function(t, i, r) {
514
+ var h = t.getCenterX(), o = t.getCenterY(), N = i.getCenterX(), s = i.getCenterY();
515
+ if (t.intersects(i)) return r[0] = h, r[1] = o, r[2] = N, r[3] = s, !0;
516
+ var g = t.getX(), u = t.getY(), p = t.getRight(), y = t.getX(), c = t.getBottom(), f = t.getRight(), T = t.getWidthHalf(), E = t.getHeightHalf(), O = i.getX(), a = i.getY(), d = i.getRight(), l = i.getX(), v = i.getBottom(), _ = i.getRight(), D = i.getWidthHalf(), I = i.getHeightHalf(), w = !1, R = !1;
517
+ if (h === N) {
518
+ if (o > s) return r[0] = h, r[1] = u, r[2] = N, r[3] = v, !1;
519
+ if (o < s) return r[0] = h, r[1] = c, r[2] = N, r[3] = a, !1;
520
+ } else if (o === s) {
521
+ if (h > N) return r[0] = g, r[1] = o, r[2] = d, r[3] = s, !1;
522
+ if (h < N) return r[0] = p, r[1] = o, r[2] = O, r[3] = s, !1;
523
+ } else {
524
+ var G = t.height / t.width, x = i.height / i.width, M = (s - o) / (N - h), U = void 0, b = void 0, F = void 0, S = void 0, Y = void 0, X = void 0;
525
+ if (-G === M ? h > N ? (r[0] = y, r[1] = c, w = !0) : (r[0] = p, r[1] = u, w = !0) : G === M && (h > N ? (r[0] = g, r[1] = u, w = !0) : (r[0] = f, r[1] = c, w = !0)), -x === M ? N > h ? (r[2] = l, r[3] = v, R = !0) : (r[2] = d, r[3] = a, R = !0) : x === M && (N > h ? (r[2] = O, r[3] = a, R = !0) : (r[2] = _, r[3] = v, R = !0)), w && R) return !1;
526
+ if (h > N ? o > s ? (U = this.getCardinalDirection(G, M, 4), b = this.getCardinalDirection(x, M, 2)) : (U = this.getCardinalDirection(-G, M, 3), b = this.getCardinalDirection(-x, M, 1)) : o > s ? (U = this.getCardinalDirection(-G, M, 1), b = this.getCardinalDirection(-x, M, 3)) : (U = this.getCardinalDirection(G, M, 2), b = this.getCardinalDirection(x, M, 4)), !w) switch (U) {
527
+ case 1:
528
+ S = u, F = h + -E / M, r[0] = F, r[1] = S;
529
+ break;
530
+ case 2:
531
+ F = f, S = o + T * M, r[0] = F, r[1] = S;
532
+ break;
533
+ case 3:
534
+ S = c, F = h + E / M, r[0] = F, r[1] = S;
535
+ break;
536
+ case 4:
537
+ F = y, S = o + -T * M, r[0] = F, r[1] = S;
538
+ break;
539
+ }
540
+ if (!R) switch (b) {
541
+ case 1:
542
+ X = a, Y = N + -I / M, r[2] = Y, r[3] = X;
543
+ break;
544
+ case 2:
545
+ Y = _, X = s + D * M, r[2] = Y, r[3] = X;
546
+ break;
547
+ case 3:
548
+ X = v, Y = N + I / M, r[2] = Y, r[3] = X;
549
+ break;
550
+ case 4:
551
+ Y = l, X = s + -D * M, r[2] = Y, r[3] = X;
552
+ break;
553
+ }
554
+ }
555
+ return !1;
556
+ }, e.getCardinalDirection = function(t, i, r) {
557
+ return t > i ? r : 1 + r % 4;
558
+ }, e.getIntersection = function(t, i, r, h) {
559
+ if (h == null) return this.getIntersection2(t, i, r);
560
+ var o = t.x, N = t.y, s = i.x, g = i.y, u = r.x, p = r.y, y = h.x, c = h.y, f = void 0, T = void 0, E = void 0, O = void 0, a = void 0, d = void 0, l = void 0, v = void 0, _ = void 0;
561
+ return E = g - N, a = o - s, l = s * N - o * g, O = c - p, d = u - y, v = y * p - u * c, _ = E * d - O * a, _ === 0 ? null : (f = (a * v - d * l) / _, T = (O * l - E * v) / _, new n(f, T));
562
+ }, e.angleOfVector = function(t, i, r, h) {
563
+ var o = void 0;
564
+ return t === r ? o = h < i ? this.ONE_AND_HALF_PI : this.HALF_PI : (o = Math.atan((h - i) / (r - t)), r < t ? o += Math.PI : h < i && (o += this.TWO_PI)), o;
565
+ }, e.doIntersect = function(t, i, r, h) {
566
+ var o = t.x, N = t.y, s = i.x, g = i.y, u = r.x, p = r.y, y = h.x, c = h.y, f = (s - o) * (c - p) - (y - u) * (g - N);
567
+ if (f === 0) return !1;
568
+ var T = ((c - p) * (y - o) + (u - y) * (c - N)) / f, E = ((N - g) * (y - o) + (s - o) * (c - N)) / f;
569
+ return 0 < T && T < 1 && 0 < E && E < 1;
570
+ }, 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, L.exports = e;
571
+ }),
572
+ (function(L, m, A) {
573
+ function n() {
574
+ }
575
+ n.sign = function(e) {
576
+ return e > 0 ? 1 : e < 0 ? -1 : 0;
577
+ }, n.floor = function(e) {
578
+ return e < 0 ? Math.ceil(e) : Math.floor(e);
579
+ }, n.ceil = function(e) {
580
+ return e < 0 ? Math.floor(e) : Math.ceil(e);
581
+ }, L.exports = n;
582
+ }),
583
+ (function(L, m, A) {
584
+ function n() {
585
+ }
586
+ n.MAX_VALUE = 2147483647, n.MIN_VALUE = -2147483648, L.exports = n;
587
+ }),
588
+ (function(L, m, A) {
589
+ var n = /* @__PURE__ */ (function() {
590
+ function h(o, N) {
591
+ for (var s = 0; s < N.length; s++) {
592
+ var g = N[s];
593
+ g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(o, g.key, g);
594
+ }
595
+ }
596
+ return function(o, N, s) {
597
+ return N && h(o.prototype, N), s && h(o, s), o;
598
+ };
599
+ })();
600
+ function e(h, o) {
601
+ if (!(h instanceof o)) throw TypeError("Cannot call a class as a function");
602
+ }
603
+ var t = function(h) {
604
+ return {
605
+ value: h,
606
+ next: null,
607
+ prev: null
608
+ };
609
+ }, i = function(h, o, N, s) {
610
+ return h === null ? s.head = o : h.next = o, N === null ? s.tail = o : N.prev = o, o.prev = h, o.next = N, s.length++, o;
611
+ }, r = function(h, o) {
612
+ var N = h.prev, s = h.next;
613
+ return N === null ? o.head = s : N.next = s, s === null ? o.tail = N : s.prev = N, h.prev = h.next = null, o.length--, h;
614
+ };
615
+ L.exports = (function() {
616
+ function h(o) {
617
+ var N = this;
618
+ e(this, h), this.length = 0, this.head = null, this.tail = null, o?.forEach(function(s) {
619
+ return N.push(s);
620
+ });
621
+ }
622
+ return n(h, [
623
+ {
624
+ key: "size",
625
+ value: function() {
626
+ return this.length;
627
+ }
628
+ },
629
+ {
630
+ key: "insertBefore",
631
+ value: function(o, N) {
632
+ return i(N.prev, t(o), N, this);
633
+ }
634
+ },
635
+ {
636
+ key: "insertAfter",
637
+ value: function(o, N) {
638
+ return i(N, t(o), N.next, this);
639
+ }
640
+ },
641
+ {
642
+ key: "insertNodeBefore",
643
+ value: function(o, N) {
644
+ return i(N.prev, o, N, this);
645
+ }
646
+ },
647
+ {
648
+ key: "insertNodeAfter",
649
+ value: function(o, N) {
650
+ return i(N, o, N.next, this);
651
+ }
652
+ },
653
+ {
654
+ key: "push",
655
+ value: function(o) {
656
+ return i(this.tail, t(o), null, this);
657
+ }
658
+ },
659
+ {
660
+ key: "unshift",
661
+ value: function(o) {
662
+ return i(null, t(o), this.head, this);
663
+ }
664
+ },
665
+ {
666
+ key: "remove",
667
+ value: function(o) {
668
+ return r(o, this);
669
+ }
670
+ },
671
+ {
672
+ key: "pop",
673
+ value: function() {
674
+ return r(this.tail, this).value;
675
+ }
676
+ },
677
+ {
678
+ key: "popNode",
679
+ value: function() {
680
+ return r(this.tail, this);
681
+ }
682
+ },
683
+ {
684
+ key: "shift",
685
+ value: function() {
686
+ return r(this.head, this).value;
687
+ }
688
+ },
689
+ {
690
+ key: "shiftNode",
691
+ value: function() {
692
+ return r(this.head, this);
693
+ }
694
+ },
695
+ {
696
+ key: "get_object_at",
697
+ value: function(o) {
698
+ if (o <= this.length()) {
699
+ for (var N = 1, s = this.head; N < o; ) s = s.next, N++;
700
+ return s.value;
701
+ }
702
+ }
703
+ },
704
+ {
705
+ key: "set_object_at",
706
+ value: function(o, N) {
707
+ if (o <= this.length()) {
708
+ for (var s = 1, g = this.head; s < o; ) g = g.next, s++;
709
+ g.value = N;
710
+ }
711
+ }
712
+ }
713
+ ]), h;
714
+ })();
715
+ }),
716
+ (function(L, m, A) {
717
+ function n(e, t, i) {
718
+ 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);
719
+ }
720
+ n.prototype.getX = function() {
721
+ return this.x;
722
+ }, n.prototype.getY = function() {
723
+ return this.y;
724
+ }, n.prototype.getLocation = function() {
725
+ return new n(this.x, this.y);
726
+ }, n.prototype.setLocation = function(e, t, i) {
727
+ 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)));
728
+ }, n.prototype.move = function(e, t) {
729
+ this.x = e, this.y = t;
730
+ }, n.prototype.translate = function(e, t) {
731
+ this.x += e, this.y += t;
732
+ }, n.prototype.equals = function(e) {
733
+ if (e.constructor.name == "Point") {
734
+ var t = e;
735
+ return this.x == t.x && this.y == t.y;
736
+ }
737
+ return this == e;
738
+ }, n.prototype.toString = function() {
739
+ return new n().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
740
+ }, L.exports = n;
741
+ }),
742
+ (function(L, m, A) {
743
+ function n(e, t, i, r) {
744
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && i != null && r != null && (this.x = e, this.y = t, this.width = i, this.height = r);
745
+ }
746
+ n.prototype.getX = function() {
747
+ return this.x;
748
+ }, n.prototype.setX = function(e) {
749
+ this.x = e;
750
+ }, n.prototype.getY = function() {
751
+ return this.y;
752
+ }, n.prototype.setY = function(e) {
753
+ this.y = e;
754
+ }, n.prototype.getWidth = function() {
755
+ return this.width;
756
+ }, n.prototype.setWidth = function(e) {
757
+ this.width = e;
758
+ }, n.prototype.getHeight = function() {
759
+ return this.height;
760
+ }, n.prototype.setHeight = function(e) {
761
+ this.height = e;
762
+ }, n.prototype.getRight = function() {
763
+ return this.x + this.width;
764
+ }, n.prototype.getBottom = function() {
765
+ return this.y + this.height;
766
+ }, n.prototype.intersects = function(e) {
767
+ return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
768
+ }, n.prototype.getCenterX = function() {
769
+ return this.x + this.width / 2;
770
+ }, n.prototype.getMinX = function() {
771
+ return this.getX();
772
+ }, n.prototype.getMaxX = function() {
773
+ return this.getX() + this.width;
774
+ }, n.prototype.getCenterY = function() {
775
+ return this.y + this.height / 2;
776
+ }, n.prototype.getMinY = function() {
777
+ return this.getY();
778
+ }, n.prototype.getMaxY = function() {
779
+ return this.getY() + this.height;
780
+ }, n.prototype.getWidthHalf = function() {
781
+ return this.width / 2;
782
+ }, n.prototype.getHeightHalf = function() {
783
+ return this.height / 2;
784
+ }, L.exports = n;
785
+ }),
786
+ (function(L, m, A) {
787
+ var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
788
+ return typeof t;
789
+ } : function(t) {
790
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
791
+ };
792
+ function e() {
793
+ }
794
+ e.lastID = 0, e.createID = function(t) {
795
+ return e.isPrimitive(t) ? t : (t.uniqueID == null && (t.uniqueID = e.getString(), e.lastID++), t.uniqueID);
796
+ }, e.getString = function(t) {
797
+ return t ??= e.lastID, "Object#" + t;
798
+ }, e.isPrimitive = function(t) {
799
+ var i = t === void 0 ? "undefined" : n(t);
800
+ return t == null || i != "object" && i != "function";
801
+ }, L.exports = e;
802
+ }),
803
+ (function(L, m, A) {
804
+ function n(u) {
805
+ if (Array.isArray(u)) {
806
+ for (var p = 0, y = Array(u.length); p < u.length; p++) y[p] = u[p];
807
+ return y;
808
+ } else return Array.from(u);
809
+ }
810
+ var e = A(0), t = A(6), i = A(3), r = A(1), h = A(5), o = A(4), N = A(17), s = A(27);
811
+ function g(u) {
812
+ s.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, u != null && (this.isRemoteUse = u);
813
+ }
814
+ g.RANDOM_SEED = 1, g.prototype = Object.create(s.prototype), g.prototype.getGraphManager = function() {
815
+ return this.graphManager;
816
+ }, g.prototype.getAllNodes = function() {
817
+ return this.graphManager.getAllNodes();
818
+ }, g.prototype.getAllEdges = function() {
819
+ return this.graphManager.getAllEdges();
820
+ }, g.prototype.getAllNodesToApplyGravitation = function() {
821
+ return this.graphManager.getAllNodesToApplyGravitation();
822
+ }, g.prototype.newGraphManager = function() {
823
+ var u = new t(this);
824
+ return this.graphManager = u, u;
825
+ }, g.prototype.newGraph = function(u) {
826
+ return new h(null, this.graphManager, u);
827
+ }, g.prototype.newNode = function(u) {
828
+ return new i(this.graphManager, u);
829
+ }, g.prototype.newEdge = function(u) {
830
+ return new r(null, null, u);
831
+ }, g.prototype.checkLayoutSuccess = function() {
832
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
833
+ }, g.prototype.runLayout = function() {
834
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
835
+ var u = this.checkLayoutSuccess() ? !1 : this.layout();
836
+ return e.ANIMATE === "during" ? !1 : (u && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, u);
837
+ }, g.prototype.doPostLayout = function() {
838
+ this.incremental || this.transform(), this.update();
839
+ }, g.prototype.update2 = function() {
840
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
841
+ for (var u = this.graphManager.getAllEdges(), p = 0; p < u.length; p++) u[p];
842
+ for (var y = this.graphManager.getRoot().getNodes(), p = 0; p < y.length; p++) y[p];
843
+ this.update(this.graphManager.getRoot());
844
+ }
845
+ }, g.prototype.update = function(u) {
846
+ if (u == null) this.update2();
847
+ else if (u instanceof i) {
848
+ var p = u;
849
+ if (p.getChild() != null) for (var y = p.getChild().getNodes(), c = 0; c < y.length; c++) update(y[c]);
850
+ p.vGraphObject != null && p.vGraphObject.update(p);
851
+ } else if (u instanceof r) {
852
+ var f = u;
853
+ f.vGraphObject != null && f.vGraphObject.update(f);
854
+ } else if (u instanceof h) {
855
+ var T = u;
856
+ T.vGraphObject != null && T.vGraphObject.update(T);
857
+ }
858
+ }, g.prototype.initParameters = function() {
859
+ 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);
860
+ }, g.prototype.transform = function(u) {
861
+ if (u == null) this.transform(new o(0, 0));
862
+ else {
863
+ var p = new N(), y = this.graphManager.getRoot().updateLeftTop();
864
+ if (y != null) {
865
+ p.setWorldOrgX(u.x), p.setWorldOrgY(u.y), p.setDeviceOrgX(y.x), p.setDeviceOrgY(y.y);
866
+ for (var c = this.getAllNodes(), f, T = 0; T < c.length; T++) f = c[T], f.transform(p);
867
+ }
868
+ }
869
+ }, g.prototype.positionNodesRandomly = function(u) {
870
+ if (u == null) this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
871
+ else for (var p, y, c = u.getNodes(), f = 0; f < c.length; f++) p = c[f], y = p.getChild(), y == null || y.getNodes().length == 0 ? p.scatter() : (this.positionNodesRandomly(y), p.updateBounds());
872
+ }, g.prototype.getFlatForest = function() {
873
+ for (var u = [], p = !0, y = this.graphManager.getRoot().getNodes(), c = !0, f = 0; f < y.length; f++) y[f].getChild() != null && (c = !1);
874
+ if (!c) return u;
875
+ var T = /* @__PURE__ */ new Set(), E = [], O = /* @__PURE__ */ new Map(), a = [];
876
+ for (a = a.concat(y); a.length > 0 && p; ) {
877
+ for (E.push(a[0]); E.length > 0 && p; ) {
878
+ var d = E[0];
879
+ E.splice(0, 1), T.add(d);
880
+ for (var l = d.getEdges(), f = 0; f < l.length; f++) {
881
+ var v = l[f].getOtherEnd(d);
882
+ if (O.get(d) != v) if (!T.has(v)) E.push(v), O.set(v, d);
883
+ else {
884
+ p = !1;
885
+ break;
886
+ }
887
+ }
888
+ }
889
+ if (!p) u = [];
890
+ else {
891
+ var _ = [].concat(n(T));
892
+ u.push(_);
893
+ for (var f = 0; f < _.length; f++) {
894
+ var D = _[f], I = a.indexOf(D);
895
+ I > -1 && a.splice(I, 1);
896
+ }
897
+ T = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Map();
898
+ }
899
+ }
900
+ return u;
901
+ }, g.prototype.createDummyNodesForBendpoints = function(u) {
902
+ for (var p = [], y = u.source, c = this.graphManager.calcLowestCommonAncestor(u.source, u.target), f = 0; f < u.bendpoints.length; f++) {
903
+ var T = this.newNode(null);
904
+ T.setRect(new Point(0, 0), new Dimension(1, 1)), c.add(T);
905
+ var E = this.newEdge(null);
906
+ this.graphManager.add(E, y, T), p.add(T), y = T;
907
+ }
908
+ var E = this.newEdge(null);
909
+ return this.graphManager.add(E, y, u.target), this.edgeToDummyNodes.set(u, p), u.isInterGraph() ? this.graphManager.remove(u) : c.remove(u), p;
910
+ }, g.prototype.createBendpointsFromDummyNodes = function() {
911
+ var u = [];
912
+ u = u.concat(this.graphManager.getAllEdges()), u = [].concat(n(this.edgeToDummyNodes.keys()), u);
913
+ for (var p = 0; p < u.length; p++) {
914
+ var y = u[p];
915
+ if (y.bendpoints.length > 0) {
916
+ for (var c = this.edgeToDummyNodes.get(y), f = 0; f < c.length; f++) {
917
+ var T = c[f], E = new o(T.getCenterX(), T.getCenterY()), O = y.bendpoints.get(f);
918
+ O.x = E.x, O.y = E.y, T.getOwner().remove(T);
919
+ }
920
+ this.graphManager.add(y, y.source, y.target);
921
+ }
922
+ }
923
+ }, g.transform = function(u, p, y, c) {
924
+ if (y != null && c != null) {
925
+ var f = p;
926
+ if (u <= 50) {
927
+ var T = p / y;
928
+ f -= (p - T) / 50 * (50 - u);
929
+ } else {
930
+ var E = p * c;
931
+ f += (E - p) / 50 * (u - 50);
932
+ }
933
+ return f;
934
+ } else {
935
+ var O, a;
936
+ return u <= 50 ? (O = 9 * p / 500, a = p / 10) : (O = 9 * p / 50, a = -8 * p), O * u + a;
937
+ }
938
+ }, g.findCenterOfTree = function(u) {
939
+ var p = [];
940
+ p = p.concat(u);
941
+ var y = [], c = /* @__PURE__ */ new Map(), f = !1, T = null;
942
+ (p.length == 1 || p.length == 2) && (f = !0, T = p[0]);
943
+ for (var E = 0; E < p.length; E++) {
944
+ var O = p[E], a = O.getNeighborsList().size;
945
+ c.set(O, O.getNeighborsList().size), a == 1 && y.push(O);
946
+ }
947
+ var d = [];
948
+ for (d = d.concat(y); !f; ) {
949
+ var l = [];
950
+ l = l.concat(d), d = [];
951
+ for (var E = 0; E < p.length; E++) {
952
+ var O = p[E], v = p.indexOf(O);
953
+ v >= 0 && p.splice(v, 1), O.getNeighborsList().forEach(function(I) {
954
+ if (y.indexOf(I) < 0) {
955
+ var w = c.get(I) - 1;
956
+ w == 1 && d.push(I), c.set(I, w);
957
+ }
958
+ });
959
+ }
960
+ y = y.concat(d), (p.length == 1 || p.length == 2) && (f = !0, T = p[0]);
961
+ }
962
+ return T;
963
+ }, g.prototype.setGraphManager = function(u) {
964
+ this.graphManager = u;
965
+ }, L.exports = g;
966
+ }),
967
+ (function(L, m, A) {
968
+ function n() {
969
+ }
970
+ n.seed = 1, n.x = 0, n.nextDouble = function() {
971
+ return n.x = Math.sin(n.seed++) * 1e4, n.x - Math.floor(n.x);
972
+ }, L.exports = n;
973
+ }),
974
+ (function(L, m, A) {
975
+ var n = A(4);
976
+ function e(t, i) {
977
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
978
+ }
979
+ e.prototype.getWorldOrgX = function() {
980
+ return this.lworldOrgX;
981
+ }, e.prototype.setWorldOrgX = function(t) {
982
+ this.lworldOrgX = t;
983
+ }, e.prototype.getWorldOrgY = function() {
984
+ return this.lworldOrgY;
985
+ }, e.prototype.setWorldOrgY = function(t) {
986
+ this.lworldOrgY = t;
987
+ }, e.prototype.getWorldExtX = function() {
988
+ return this.lworldExtX;
989
+ }, e.prototype.setWorldExtX = function(t) {
990
+ this.lworldExtX = t;
991
+ }, e.prototype.getWorldExtY = function() {
992
+ return this.lworldExtY;
993
+ }, e.prototype.setWorldExtY = function(t) {
994
+ this.lworldExtY = t;
995
+ }, e.prototype.getDeviceOrgX = function() {
996
+ return this.ldeviceOrgX;
997
+ }, e.prototype.setDeviceOrgX = function(t) {
998
+ this.ldeviceOrgX = t;
999
+ }, e.prototype.getDeviceOrgY = function() {
1000
+ return this.ldeviceOrgY;
1001
+ }, e.prototype.setDeviceOrgY = function(t) {
1002
+ this.ldeviceOrgY = t;
1003
+ }, e.prototype.getDeviceExtX = function() {
1004
+ return this.ldeviceExtX;
1005
+ }, e.prototype.setDeviceExtX = function(t) {
1006
+ this.ldeviceExtX = t;
1007
+ }, e.prototype.getDeviceExtY = function() {
1008
+ return this.ldeviceExtY;
1009
+ }, e.prototype.setDeviceExtY = function(t) {
1010
+ this.ldeviceExtY = t;
1011
+ }, e.prototype.transformX = function(t) {
1012
+ var i = 0, r = this.lworldExtX;
1013
+ return r != 0 && (i = this.ldeviceOrgX + (t - this.lworldOrgX) * this.ldeviceExtX / r), i;
1014
+ }, e.prototype.transformY = function(t) {
1015
+ var i = 0, r = this.lworldExtY;
1016
+ return r != 0 && (i = this.ldeviceOrgY + (t - this.lworldOrgY) * this.ldeviceExtY / r), i;
1017
+ }, e.prototype.inverseTransformX = function(t) {
1018
+ var i = 0, r = this.ldeviceExtX;
1019
+ return r != 0 && (i = this.lworldOrgX + (t - this.ldeviceOrgX) * this.lworldExtX / r), i;
1020
+ }, e.prototype.inverseTransformY = function(t) {
1021
+ var i = 0, r = this.ldeviceExtY;
1022
+ return r != 0 && (i = this.lworldOrgY + (t - this.ldeviceOrgY) * this.lworldExtY / r), i;
1023
+ }, e.prototype.inverseTransformPoint = function(t) {
1024
+ return new n(this.inverseTransformX(t.x), this.inverseTransformY(t.y));
1025
+ }, L.exports = e;
1026
+ }),
1027
+ (function(L, m, A) {
1028
+ function n(s) {
1029
+ if (Array.isArray(s)) {
1030
+ for (var g = 0, u = Array(s.length); g < s.length; g++) u[g] = s[g];
1031
+ return u;
1032
+ } else return Array.from(s);
1033
+ }
1034
+ var e = A(15), t = A(7), i = A(0), r = A(8), h = A(9);
1035
+ function o() {
1036
+ 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;
1037
+ }
1038
+ for (var N in o.prototype = Object.create(e.prototype), e) o[N] = e[N];
1039
+ o.prototype.initParameters = function() {
1040
+ e.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1041
+ }, o.prototype.calcIdealEdgeLengths = function() {
1042
+ for (var s, g, u, p, y, c, f = this.getGraphManager().getAllEdges(), T = 0; T < f.length; T++) s = f[T], s.idealLength = this.idealEdgeLength, s.isInterGraph && (u = s.getSource(), p = s.getTarget(), y = s.getSourceInLca().getEstimatedSize(), c = s.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (s.idealLength += y + c - 2 * i.SIMPLE_NODE_SIZE), g = s.getLca().getInclusionTreeDepth(), s.idealLength += t.DEFAULT_EDGE_LENGTH * t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (u.getInclusionTreeDepth() + p.getInclusionTreeDepth() - 2 * g));
1043
+ }, o.prototype.initSpringEmbedder = function() {
1044
+ var s = this.getAllNodes().length;
1045
+ this.incremental ? (s > t.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * t.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - 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) : (s > t.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(t.COOLING_ADAPTATION_FACTOR, 1 - (s - 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();
1046
+ }, o.prototype.calcSpringForces = function() {
1047
+ for (var s = this.getAllEdges(), g, u = 0; u < s.length; u++) g = s[u], this.calcSpringForce(g, g.idealLength);
1048
+ }, o.prototype.calcRepulsionForces = function() {
1049
+ var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, u, p, y, c, f = this.getAllNodes(), T;
1050
+ if (this.useFRGridVariant) for (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && s && this.updateGrid(), T = /* @__PURE__ */ new Set(), u = 0; u < f.length; u++) y = f[u], this.calculateRepulsionForceOfANode(y, T, s, g), T.add(y);
1051
+ else for (u = 0; u < f.length; u++) for (y = f[u], p = u + 1; p < f.length; p++) c = f[p], y.getOwner() == c.getOwner() && this.calcRepulsionForce(y, c);
1052
+ }, o.prototype.calcGravitationalForces = function() {
1053
+ for (var s, g = this.getAllNodesToApplyGravitation(), u = 0; u < g.length; u++) s = g[u], this.calcGravitationalForce(s);
1054
+ }, o.prototype.moveNodes = function() {
1055
+ for (var s = this.getAllNodes(), g, u = 0; u < s.length; u++) g = s[u], g.move();
1056
+ }, o.prototype.calcSpringForce = function(s, g) {
1057
+ var u = s.getSource(), p = s.getTarget(), y, c, f, T;
1058
+ if (this.uniformLeafNodeSizes && u.getChild() == null && p.getChild() == null) s.updateLengthSimple();
1059
+ else if (s.updateLength(), s.isOverlapingSourceAndTarget) return;
1060
+ y = s.getLength(), y != 0 && (c = this.springConstant * (y - g), f = c * (s.lengthX / y), T = c * (s.lengthY / y), u.springForceX += f, u.springForceY += T, p.springForceX -= f, p.springForceY -= T);
1061
+ }, o.prototype.calcRepulsionForce = function(s, g) {
1062
+ var u = s.getRect(), p = g.getRect(), y = [, ,], c = [
1063
+ ,
1064
+ ,
1065
+ ,
1066
+ ,
1067
+ ], f, T, E, O, a, d, l;
1068
+ if (u.intersects(p)) {
1069
+ r.calcSeparationAmount(u, p, y, t.DEFAULT_EDGE_LENGTH / 2), d = 2 * y[0], l = 2 * y[1];
1070
+ var v = s.noOfChildren * g.noOfChildren / (s.noOfChildren + g.noOfChildren);
1071
+ s.repulsionForceX -= v * d, s.repulsionForceY -= v * l, g.repulsionForceX += v * d, g.repulsionForceY += v * l;
1072
+ } else this.uniformLeafNodeSizes && s.getChild() == null && g.getChild() == null ? (f = p.getCenterX() - u.getCenterX(), T = p.getCenterY() - u.getCenterY()) : (r.getIntersection(u, p, c), f = c[2] - c[0], T = c[3] - c[1]), Math.abs(f) < t.MIN_REPULSION_DIST && (f = h.sign(f) * t.MIN_REPULSION_DIST), Math.abs(T) < t.MIN_REPULSION_DIST && (T = h.sign(T) * t.MIN_REPULSION_DIST), E = f * f + T * T, O = Math.sqrt(E), a = this.repulsionConstant * s.noOfChildren * g.noOfChildren / E, d = a * f / O, l = a * T / O, s.repulsionForceX -= d, s.repulsionForceY -= l, g.repulsionForceX += d, g.repulsionForceY += l;
1073
+ }, o.prototype.calcGravitationalForce = function(s) {
1074
+ var g = s.getOwner(), u = (g.getRight() + g.getLeft()) / 2, p = (g.getTop() + g.getBottom()) / 2, y = s.getCenterX() - u, c = s.getCenterY() - p, f = Math.abs(y) + s.getWidth() / 2, T = Math.abs(c) + s.getHeight() / 2, E;
1075
+ s.getOwner() == this.graphManager.getRoot() ? (E = g.getEstimatedSize() * this.gravityRangeFactor, (f > E || T > E) && (s.gravitationForceX = -this.gravityConstant * y, s.gravitationForceY = -this.gravityConstant * c)) : (E = g.getEstimatedSize() * this.compoundGravityRangeFactor, (f > E || T > E) && (s.gravitationForceX = -this.gravityConstant * y * this.compoundGravityConstant, s.gravitationForceY = -this.gravityConstant * c * this.compoundGravityConstant));
1076
+ }, o.prototype.isConverged = function() {
1077
+ var s, g = !1;
1078
+ return this.totalIterations > this.maxIterations / 3 && (g = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), s = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, s || g;
1079
+ }, o.prototype.animate = function() {
1080
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1081
+ }, o.prototype.calcNoOfChildrenForAllNodes = function() {
1082
+ for (var s, g = this.graphManager.getAllNodes(), u = 0; u < g.length; u++) s = g[u], s.noOfChildren = s.getNoOfChildren();
1083
+ }, o.prototype.calcGrid = function(s) {
1084
+ var g = 0, u = 0;
1085
+ g = parseInt(Math.ceil((s.getRight() - s.getLeft()) / this.repulsionRange)), u = parseInt(Math.ceil((s.getBottom() - s.getTop()) / this.repulsionRange));
1086
+ for (var p = Array(g), y = 0; y < g; y++) p[y] = Array(u);
1087
+ for (var y = 0; y < g; y++) for (var c = 0; c < u; c++) p[y][c] = [];
1088
+ return p;
1089
+ }, o.prototype.addNodeToGrid = function(s, g, u) {
1090
+ var p = 0, y = 0, c = 0, f = 0;
1091
+ p = parseInt(Math.floor((s.getRect().x - g) / this.repulsionRange)), y = parseInt(Math.floor((s.getRect().width + s.getRect().x - g) / this.repulsionRange)), c = parseInt(Math.floor((s.getRect().y - u) / this.repulsionRange)), f = parseInt(Math.floor((s.getRect().height + s.getRect().y - u) / this.repulsionRange));
1092
+ for (var T = p; T <= y; T++) for (var E = c; E <= f; E++) this.grid[T][E].push(s), s.setGridCoordinates(p, y, c, f);
1093
+ }, o.prototype.updateGrid = function() {
1094
+ var s, g, u = this.getAllNodes();
1095
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), s = 0; s < u.length; s++) g = u[s], this.addNodeToGrid(g, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1096
+ }, o.prototype.calculateRepulsionForceOfANode = function(s, g, u, p) {
1097
+ if (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && u || p) {
1098
+ var y = /* @__PURE__ */ new Set();
1099
+ s.surrounding = [];
1100
+ for (var c, f = this.grid, T = s.startX - 1; T < s.finishX + 2; T++) for (var E = s.startY - 1; E < s.finishY + 2; E++) if (!(T < 0 || E < 0 || T >= f.length || E >= f[0].length)) {
1101
+ for (var O = 0; O < f[T][E].length; O++) if (c = f[T][E][O], !(s.getOwner() != c.getOwner() || s == c) && !g.has(c) && !y.has(c)) {
1102
+ var a = Math.abs(s.getCenterX() - c.getCenterX()) - (s.getWidth() / 2 + c.getWidth() / 2), d = Math.abs(s.getCenterY() - c.getCenterY()) - (s.getHeight() / 2 + c.getHeight() / 2);
1103
+ a <= this.repulsionRange && d <= this.repulsionRange && y.add(c);
1104
+ }
1105
+ }
1106
+ s.surrounding = [].concat(n(y));
1107
+ }
1108
+ for (T = 0; T < s.surrounding.length; T++) this.calcRepulsionForce(s, s.surrounding[T]);
1109
+ }, o.prototype.calcRepulsionRange = function() {
1110
+ return 0;
1111
+ }, L.exports = o;
1112
+ }),
1113
+ (function(L, m, A) {
1114
+ var n = A(1), e = A(7);
1115
+ function t(r, h, o) {
1116
+ n.call(this, r, h, o), this.idealLength = e.DEFAULT_EDGE_LENGTH;
1117
+ }
1118
+ for (var i in t.prototype = Object.create(n.prototype), n) t[i] = n[i];
1119
+ L.exports = t;
1120
+ }),
1121
+ (function(L, m, A) {
1122
+ var n = A(3);
1123
+ function e(i, r, h, o) {
1124
+ n.call(this, i, r, h, o), 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 = [];
1125
+ }
1126
+ for (var t in e.prototype = Object.create(n.prototype), n) e[t] = n[t];
1127
+ e.prototype.setGridCoordinates = function(i, r, h, o) {
1128
+ this.startX = i, this.finishX = r, this.startY = h, this.finishY = o;
1129
+ }, L.exports = e;
1130
+ }),
1131
+ (function(L, m, A) {
1132
+ function n(e, t) {
1133
+ this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1134
+ }
1135
+ n.prototype.getWidth = function() {
1136
+ return this.width;
1137
+ }, n.prototype.setWidth = function(e) {
1138
+ this.width = e;
1139
+ }, n.prototype.getHeight = function() {
1140
+ return this.height;
1141
+ }, n.prototype.setHeight = function(e) {
1142
+ this.height = e;
1143
+ }, L.exports = n;
1144
+ }),
1145
+ (function(L, m, A) {
1146
+ var n = A(14);
1147
+ function e() {
1148
+ this.map = {}, this.keys = [];
1149
+ }
1150
+ e.prototype.put = function(t, i) {
1151
+ var r = n.createID(t);
1152
+ this.contains(r) || (this.map[r] = i, this.keys.push(t));
1153
+ }, e.prototype.contains = function(t) {
1154
+ return n.createID(t), this.map[t] != null;
1155
+ }, e.prototype.get = function(t) {
1156
+ var i = n.createID(t);
1157
+ return this.map[i];
1158
+ }, e.prototype.keySet = function() {
1159
+ return this.keys;
1160
+ }, L.exports = e;
1161
+ }),
1162
+ (function(L, m, A) {
1163
+ var n = A(14);
1164
+ function e() {
1165
+ this.set = {};
1166
+ }
1167
+ e.prototype.add = function(t) {
1168
+ var i = n.createID(t);
1169
+ this.contains(i) || (this.set[i] = t);
1170
+ }, e.prototype.remove = function(t) {
1171
+ delete this.set[n.createID(t)];
1172
+ }, e.prototype.clear = function() {
1173
+ this.set = {};
1174
+ }, e.prototype.contains = function(t) {
1175
+ return this.set[n.createID(t)] == t;
1176
+ }, e.prototype.isEmpty = function() {
1177
+ return this.size() === 0;
1178
+ }, e.prototype.size = function() {
1179
+ return Object.keys(this.set).length;
1180
+ }, e.prototype.addAllTo = function(t) {
1181
+ for (var i = Object.keys(this.set), r = i.length, h = 0; h < r; h++) t.push(this.set[i[h]]);
1182
+ }, e.prototype.size = function() {
1183
+ return Object.keys(this.set).length;
1184
+ }, e.prototype.addAll = function(t) {
1185
+ for (var i = t.length, r = 0; r < i; r++) {
1186
+ var h = t[r];
1187
+ this.add(h);
1188
+ }
1189
+ }, L.exports = e;
1190
+ }),
1191
+ (function(L, m, A) {
1192
+ var n = /* @__PURE__ */ (function() {
1193
+ function i(r, h) {
1194
+ for (var o = 0; o < h.length; o++) {
1195
+ var N = h[o];
1196
+ N.enumerable = N.enumerable || !1, N.configurable = !0, "value" in N && (N.writable = !0), Object.defineProperty(r, N.key, N);
1197
+ }
1198
+ }
1199
+ return function(r, h, o) {
1200
+ return h && i(r.prototype, h), o && i(r, o), r;
1201
+ };
1202
+ })();
1203
+ function e(i, r) {
1204
+ if (!(i instanceof r)) throw TypeError("Cannot call a class as a function");
1205
+ }
1206
+ var t = A(11);
1207
+ L.exports = (function() {
1208
+ function i(r, h) {
1209
+ e(this, i), (h !== null || h !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1210
+ var o = void 0;
1211
+ o = r instanceof t ? r.size() : r.length, this._quicksort(r, 0, o - 1);
1212
+ }
1213
+ return n(i, [
1214
+ {
1215
+ key: "_quicksort",
1216
+ value: function(r, h, o) {
1217
+ if (h < o) {
1218
+ var N = this._partition(r, h, o);
1219
+ this._quicksort(r, h, N), this._quicksort(r, N + 1, o);
1220
+ }
1221
+ }
1222
+ },
1223
+ {
1224
+ key: "_partition",
1225
+ value: function(r, h, o) {
1226
+ for (var N = this._get(r, h), s = h, g = o; ; ) {
1227
+ for (; this.compareFunction(N, this._get(r, g)); ) g--;
1228
+ for (; this.compareFunction(this._get(r, s), N); ) s++;
1229
+ if (s < g) this._swap(r, s, g), s++, g--;
1230
+ else return g;
1231
+ }
1232
+ }
1233
+ },
1234
+ {
1235
+ key: "_get",
1236
+ value: function(r, h) {
1237
+ return r instanceof t ? r.get_object_at(h) : r[h];
1238
+ }
1239
+ },
1240
+ {
1241
+ key: "_set",
1242
+ value: function(r, h, o) {
1243
+ r instanceof t ? r.set_object_at(h, o) : r[h] = o;
1244
+ }
1245
+ },
1246
+ {
1247
+ key: "_swap",
1248
+ value: function(r, h, o) {
1249
+ var N = this._get(r, h);
1250
+ this._set(r, h, this._get(r, o)), this._set(r, o, N);
1251
+ }
1252
+ },
1253
+ {
1254
+ key: "_defaultCompareFunction",
1255
+ value: function(r, h) {
1256
+ return h > r;
1257
+ }
1258
+ }
1259
+ ]), i;
1260
+ })();
1261
+ }),
1262
+ (function(L, m, A) {
1263
+ var n = /* @__PURE__ */ (function() {
1264
+ function t(i, r) {
1265
+ for (var h = 0; h < r.length; h++) {
1266
+ var o = r[h];
1267
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
1268
+ }
1269
+ }
1270
+ return function(i, r, h) {
1271
+ return r && t(i.prototype, r), h && t(i, h), i;
1272
+ };
1273
+ })();
1274
+ function e(t, i) {
1275
+ if (!(t instanceof i)) throw TypeError("Cannot call a class as a function");
1276
+ }
1277
+ L.exports = (function() {
1278
+ function t(i, r) {
1279
+ var h = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, N = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1280
+ e(this, t), this.sequence1 = i, this.sequence2 = r, this.match_score = h, this.mismatch_penalty = o, this.gap_penalty = N, this.iMax = i.length + 1, this.jMax = r.length + 1, this.grid = Array(this.iMax);
1281
+ for (var s = 0; s < this.iMax; s++) {
1282
+ this.grid[s] = Array(this.jMax);
1283
+ for (var g = 0; g < this.jMax; g++) this.grid[s][g] = 0;
1284
+ }
1285
+ this.tracebackGrid = Array(this.iMax);
1286
+ for (var u = 0; u < this.iMax; u++) {
1287
+ this.tracebackGrid[u] = Array(this.jMax);
1288
+ for (var p = 0; p < this.jMax; p++) this.tracebackGrid[u][p] = [
1289
+ null,
1290
+ null,
1291
+ null
1292
+ ];
1293
+ }
1294
+ this.alignments = [], this.score = -1, this.computeGrids();
1295
+ }
1296
+ return n(t, [
1297
+ {
1298
+ key: "getScore",
1299
+ value: function() {
1300
+ return this.score;
1301
+ }
1302
+ },
1303
+ {
1304
+ key: "getAlignments",
1305
+ value: function() {
1306
+ return this.alignments;
1307
+ }
1308
+ },
1309
+ {
1310
+ key: "computeGrids",
1311
+ value: function() {
1312
+ for (var i = 1; i < this.jMax; i++) this.grid[0][i] = this.grid[0][i - 1] + this.gap_penalty, this.tracebackGrid[0][i] = [
1313
+ !1,
1314
+ !1,
1315
+ !0
1316
+ ];
1317
+ for (var r = 1; r < this.iMax; r++) this.grid[r][0] = this.grid[r - 1][0] + this.gap_penalty, this.tracebackGrid[r][0] = [
1318
+ !1,
1319
+ !0,
1320
+ !1
1321
+ ];
1322
+ for (var h = 1; h < this.iMax; h++) for (var o = 1; o < this.jMax; o++) {
1323
+ var N = void 0;
1324
+ N = this.sequence1[h - 1] === this.sequence2[o - 1] ? this.grid[h - 1][o - 1] + this.match_score : this.grid[h - 1][o - 1] + this.mismatch_penalty;
1325
+ var s = this.grid[h - 1][o] + this.gap_penalty, g = this.grid[h][o - 1] + this.gap_penalty, u = [
1326
+ N,
1327
+ s,
1328
+ g
1329
+ ], p = this.arrayAllMaxIndexes(u);
1330
+ this.grid[h][o] = u[p[0]], this.tracebackGrid[h][o] = [
1331
+ p.includes(0),
1332
+ p.includes(1),
1333
+ p.includes(2)
1334
+ ];
1335
+ }
1336
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1337
+ }
1338
+ },
1339
+ {
1340
+ key: "alignmentTraceback",
1341
+ value: function() {
1342
+ var i = [];
1343
+ for (i.push({
1344
+ pos: [this.sequence1.length, this.sequence2.length],
1345
+ seq1: "",
1346
+ seq2: ""
1347
+ }); i[0]; ) {
1348
+ var r = i[0], h = this.tracebackGrid[r.pos[0]][r.pos[1]];
1349
+ h[0] && i.push({
1350
+ pos: [r.pos[0] - 1, r.pos[1] - 1],
1351
+ seq1: this.sequence1[r.pos[0] - 1] + r.seq1,
1352
+ seq2: this.sequence2[r.pos[1] - 1] + r.seq2
1353
+ }), h[1] && i.push({
1354
+ pos: [r.pos[0] - 1, r.pos[1]],
1355
+ seq1: this.sequence1[r.pos[0] - 1] + r.seq1,
1356
+ seq2: "-" + r.seq2
1357
+ }), h[2] && i.push({
1358
+ pos: [r.pos[0], r.pos[1] - 1],
1359
+ seq1: "-" + r.seq1,
1360
+ seq2: this.sequence2[r.pos[1] - 1] + r.seq2
1361
+ }), r.pos[0] === 0 && r.pos[1] === 0 && this.alignments.push({
1362
+ sequence1: r.seq1,
1363
+ sequence2: r.seq2
1364
+ }), i.shift();
1365
+ }
1366
+ return this.alignments;
1367
+ }
1368
+ },
1369
+ {
1370
+ key: "getAllIndexes",
1371
+ value: function(i, r) {
1372
+ for (var h = [], o = -1; (o = i.indexOf(r, o + 1)) !== -1; ) h.push(o);
1373
+ return h;
1374
+ }
1375
+ },
1376
+ {
1377
+ key: "arrayAllMaxIndexes",
1378
+ value: function(i) {
1379
+ return this.getAllIndexes(i, Math.max.apply(null, i));
1380
+ }
1381
+ }
1382
+ ]), t;
1383
+ })();
1384
+ }),
1385
+ (function(L, m, A) {
1386
+ var n = function() {
1387
+ };
1388
+ n.FDLayout = A(18), n.FDLayoutConstants = A(7), n.FDLayoutEdge = A(19), n.FDLayoutNode = A(20), n.DimensionD = A(21), n.HashMap = A(22), n.HashSet = A(23), n.IGeometry = A(8), n.IMath = A(9), n.Integer = A(10), n.Point = A(12), n.PointD = A(4), n.RandomSeed = A(16), n.RectangleD = A(13), n.Transform = A(17), n.UniqueIDGeneretor = A(14), n.Quicksort = A(24), n.LinkedList = A(11), n.LGraphObject = A(2), n.LGraph = A(5), n.LEdge = A(1), n.LGraphManager = A(6), n.LNode = A(3), n.Layout = A(15), n.LayoutConstants = A(0), n.NeedlemanWunsch = A(25), L.exports = n;
1389
+ }),
1390
+ (function(L, m, A) {
1391
+ function n() {
1392
+ this.listeners = [];
1393
+ }
1394
+ var e = n.prototype;
1395
+ e.addListener = function(t, i) {
1396
+ this.listeners.push({
1397
+ event: t,
1398
+ callback: i
1399
+ });
1400
+ }, e.removeListener = function(t, i) {
1401
+ for (var r = this.listeners.length; r >= 0; r--) {
1402
+ var h = this.listeners[r];
1403
+ h.event === t && h.callback === i && this.listeners.splice(r, 1);
1404
+ }
1405
+ }, e.emit = function(t, i) {
1406
+ for (var r = 0; r < this.listeners.length; r++) {
1407
+ var h = this.listeners[r];
1408
+ t === h.event && h.callback(i);
1409
+ }
1410
+ }, L.exports = n;
1411
+ })
1412
+ ]);
1413
+ });
1414
+ })), Z = /* @__PURE__ */ V(((C, P) => {
1415
+ (function(L, m) {
1416
+ typeof C == "object" && typeof P == "object" ? P.exports = m(z()) : typeof define == "function" && define.amd ? define(["layout-base"], m) : typeof C == "object" ? C.coseBase = m(z()) : L.coseBase = m(L.layoutBase);
1417
+ })(C, function(L) {
1418
+ return (function(m) {
1419
+ var A = {};
1420
+ function n(e) {
1421
+ if (A[e]) return A[e].exports;
1422
+ var t = A[e] = {
1423
+ i: e,
1424
+ l: !1,
1425
+ exports: {}
1426
+ };
1427
+ return m[e].call(t.exports, t, t.exports, n), t.l = !0, t.exports;
1428
+ }
1429
+ return n.m = m, n.c = A, n.i = function(e) {
1430
+ return e;
1431
+ }, n.d = function(e, t, i) {
1432
+ n.o(e, t) || Object.defineProperty(e, t, {
1433
+ configurable: !1,
1434
+ enumerable: !0,
1435
+ get: i
1436
+ });
1437
+ }, n.n = function(e) {
1438
+ var t = e && e.__esModule ? function() {
1439
+ return e.default;
1440
+ } : function() {
1441
+ return e;
1442
+ };
1443
+ return n.d(t, "a", t), t;
1444
+ }, n.o = function(e, t) {
1445
+ return Object.prototype.hasOwnProperty.call(e, t);
1446
+ }, n.p = "", n(n.s = 7);
1447
+ })([
1448
+ (function(m, A) {
1449
+ m.exports = L;
1450
+ }),
1451
+ (function(m, A, n) {
1452
+ var e = n(0).FDLayoutConstants;
1453
+ function t() {
1454
+ }
1455
+ for (var i in e) t[i] = e[i];
1456
+ 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, m.exports = t;
1457
+ }),
1458
+ (function(m, A, n) {
1459
+ var e = n(0).FDLayoutEdge;
1460
+ function t(r, h, o) {
1461
+ e.call(this, r, h, o);
1462
+ }
1463
+ for (var i in t.prototype = Object.create(e.prototype), e) t[i] = e[i];
1464
+ m.exports = t;
1465
+ }),
1466
+ (function(m, A, n) {
1467
+ var e = n(0).LGraph;
1468
+ function t(r, h, o) {
1469
+ e.call(this, r, h, o);
1470
+ }
1471
+ for (var i in t.prototype = Object.create(e.prototype), e) t[i] = e[i];
1472
+ m.exports = t;
1473
+ }),
1474
+ (function(m, A, n) {
1475
+ var e = n(0).LGraphManager;
1476
+ function t(r) {
1477
+ e.call(this, r);
1478
+ }
1479
+ for (var i in t.prototype = Object.create(e.prototype), e) t[i] = e[i];
1480
+ m.exports = t;
1481
+ }),
1482
+ (function(m, A, n) {
1483
+ var e = n(0).FDLayoutNode, t = n(0).IMath;
1484
+ function i(h, o, N, s) {
1485
+ e.call(this, h, o, N, s);
1486
+ }
1487
+ for (var r in i.prototype = Object.create(e.prototype), e) i[r] = e[r];
1488
+ i.prototype.move = function() {
1489
+ var h = this.graphManager.getLayout();
1490
+ this.displacementX = h.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = h.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementX = h.coolingFactor * h.maxNodeDisplacement * t.sign(this.displacementX)), Math.abs(this.displacementY) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementY = h.coolingFactor * h.maxNodeDisplacement * t.sign(this.displacementY)), this.child == null || this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), h.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
1491
+ }, i.prototype.propogateDisplacementToChildren = function(h, o) {
1492
+ for (var N = this.getChild().getNodes(), s, g = 0; g < N.length; g++) s = N[g], s.getChild() == null ? (s.moveBy(h, o), s.displacementX += h, s.displacementY += o) : s.propogateDisplacementToChildren(h, o);
1493
+ }, i.prototype.setPred1 = function(h) {
1494
+ this.pred1 = h;
1495
+ }, i.prototype.getPred1 = function() {
1496
+ return pred1;
1497
+ }, i.prototype.getPred2 = function() {
1498
+ return pred2;
1499
+ }, i.prototype.setNext = function(h) {
1500
+ this.next = h;
1501
+ }, i.prototype.getNext = function() {
1502
+ return next;
1503
+ }, i.prototype.setProcessed = function(h) {
1504
+ this.processed = h;
1505
+ }, i.prototype.isProcessed = function() {
1506
+ return processed;
1507
+ }, m.exports = i;
1508
+ }),
1509
+ (function(m, A, n) {
1510
+ var e = n(0).FDLayout, t = n(4), i = n(3), r = n(5), h = n(2), o = n(1), N = n(0).FDLayoutConstants, s = n(0).LayoutConstants, g = n(0).Point, u = n(0).PointD, p = n(0).Layout, y = n(0).Integer, c = n(0).IGeometry, f = n(0).LGraph, T = n(0).Transform;
1511
+ function E() {
1512
+ e.call(this), this.toBeTiled = {};
1513
+ }
1514
+ for (var O in E.prototype = Object.create(e.prototype), e) E[O] = e[O];
1515
+ E.prototype.newGraphManager = function() {
1516
+ var a = new t(this);
1517
+ return this.graphManager = a, a;
1518
+ }, E.prototype.newGraph = function(a) {
1519
+ return new i(null, this.graphManager, a);
1520
+ }, E.prototype.newNode = function(a) {
1521
+ return new r(this.graphManager, a);
1522
+ }, E.prototype.newEdge = function(a) {
1523
+ return new h(null, null, a);
1524
+ }, E.prototype.initParameters = function() {
1525
+ e.prototype.initParameters.call(this, arguments), this.isSubLayout || (o.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = o.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = N.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = N.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = N.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = N.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = N.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = N.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 / N.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = N.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1526
+ }, E.prototype.layout = function() {
1527
+ return s.DEFAULT_CREATE_BENDS_AS_NEEDED && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1528
+ }, E.prototype.classicLayout = function() {
1529
+ 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) {
1530
+ var a = this.getFlatForest();
1531
+ if (a.length > 0) this.positionNodesRadially(a);
1532
+ else {
1533
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1534
+ var d = new Set(this.getAllNodes()), l = this.nodesWithGravity.filter(function(v) {
1535
+ return d.has(v);
1536
+ });
1537
+ this.graphManager.setAllNodesToApplyGravitation(l), this.positionNodesRandomly();
1538
+ }
1539
+ } else if (o.TREE_REDUCTION_ON_INCREMENTAL) {
1540
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1541
+ var d = new Set(this.getAllNodes()), l = this.nodesWithGravity.filter(function(D) {
1542
+ return d.has(D);
1543
+ });
1544
+ this.graphManager.setAllNodesToApplyGravitation(l);
1545
+ }
1546
+ return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1547
+ }, E.prototype.tick = function() {
1548
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1549
+ else return !0;
1550
+ if (this.totalIterations % N.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1551
+ if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1552
+ else return !0;
1553
+ this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - 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));
1554
+ }
1555
+ if (this.isTreeGrowing) {
1556
+ if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
1557
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1558
+ var a = new Set(this.getAllNodes()), d = this.nodesWithGravity.filter(function(_) {
1559
+ return a.has(_);
1560
+ });
1561
+ this.graphManager.setAllNodesToApplyGravitation(d), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = N.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1562
+ } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1563
+ this.growTreeIterations++;
1564
+ }
1565
+ if (this.isGrowthFinished) {
1566
+ if (this.isConverged()) return !0;
1567
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = N.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1568
+ }
1569
+ var l = !this.isTreeGrowing && !this.isGrowthFinished, v = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1570
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(l, v), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1571
+ }, E.prototype.getPositionsData = function() {
1572
+ for (var a = this.graphManager.getAllNodes(), d = {}, l = 0; l < a.length; l++) {
1573
+ var v = a[l].rect, _ = a[l].id;
1574
+ d[_] = {
1575
+ id: _,
1576
+ x: v.getCenterX(),
1577
+ y: v.getCenterY(),
1578
+ w: v.width,
1579
+ h: v.height
1580
+ };
1581
+ }
1582
+ return d;
1583
+ }, E.prototype.runSpringEmbedder = function() {
1584
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1585
+ var a = !1;
1586
+ if (N.ANIMATE === "during") this.emit("layoutstarted");
1587
+ else {
1588
+ for (; !a; ) a = this.tick();
1589
+ this.graphManager.updateBounds();
1590
+ }
1591
+ }, E.prototype.calculateNodesToApplyGravitationTo = function() {
1592
+ var a = [], d, l = this.graphManager.getGraphs(), v = l.length, _;
1593
+ for (_ = 0; _ < v; _++) d = l[_], d.updateConnected(), d.isConnected || (a = a.concat(d.getNodes()));
1594
+ return a;
1595
+ }, E.prototype.createBendpoints = function() {
1596
+ var a = [];
1597
+ a = a.concat(this.graphManager.getAllEdges());
1598
+ var d = /* @__PURE__ */ new Set(), l;
1599
+ for (l = 0; l < a.length; l++) {
1600
+ var v = a[l];
1601
+ if (!d.has(v)) {
1602
+ var _ = v.getSource(), D = v.getTarget();
1603
+ if (_ == D) v.getBendpoints().push(new u()), v.getBendpoints().push(new u()), this.createDummyNodesForBendpoints(v), d.add(v);
1604
+ else {
1605
+ var I = [];
1606
+ if (I = I.concat(_.getEdgeListToNode(D)), I = I.concat(D.getEdgeListToNode(_)), !d.has(I[0])) {
1607
+ if (I.length > 1) {
1608
+ var w;
1609
+ for (w = 0; w < I.length; w++) {
1610
+ var R = I[w];
1611
+ R.getBendpoints().push(new u()), this.createDummyNodesForBendpoints(R);
1612
+ }
1613
+ }
1614
+ I.forEach(function(G) {
1615
+ d.add(G);
1616
+ });
1617
+ }
1618
+ }
1619
+ }
1620
+ if (d.size == a.length) break;
1621
+ }
1622
+ }, E.prototype.positionNodesRadially = function(a) {
1623
+ for (var d = new g(0, 0), l = Math.ceil(Math.sqrt(a.length)), v = 0, _ = 0, D = 0, I = new u(0, 0), w = 0; w < a.length; w++) {
1624
+ w % l == 0 && (D = 0, _ = v, w != 0 && (_ += o.DEFAULT_COMPONENT_SEPERATION), v = 0);
1625
+ var R = a[w], G = p.findCenterOfTree(R);
1626
+ d.x = D, d.y = _, I = E.radialLayout(R, G, d), I.y > v && (v = Math.floor(I.y)), D = Math.floor(I.x + o.DEFAULT_COMPONENT_SEPERATION);
1627
+ }
1628
+ this.transform(new u(s.WORLD_CENTER_X - I.x / 2, s.WORLD_CENTER_Y - I.y / 2));
1629
+ }, E.radialLayout = function(a, d, l) {
1630
+ var v = Math.max(this.maxDiagonalInTree(a), o.DEFAULT_RADIAL_SEPARATION);
1631
+ E.branchRadialLayout(d, null, 0, 359, 0, v);
1632
+ var _ = f.calculateBounds(a), D = new T();
1633
+ D.setDeviceOrgX(_.getMinX()), D.setDeviceOrgY(_.getMinY()), D.setWorldOrgX(l.x), D.setWorldOrgY(l.y);
1634
+ for (var I = 0; I < a.length; I++) a[I].transform(D);
1635
+ var w = new u(_.getMaxX(), _.getMaxY());
1636
+ return D.inverseTransformPoint(w);
1637
+ }, E.branchRadialLayout = function(a, d, l, v, _, D) {
1638
+ var I = (v - l + 1) / 2;
1639
+ I < 0 && (I += 180);
1640
+ var w = (I + l) % 360 * c.TWO_PI / 360, R = _ * Math.cos(w), G = _ * Math.sin(w);
1641
+ a.setCenter(R, G);
1642
+ var x = [];
1643
+ x = x.concat(a.getEdges());
1644
+ var M = x.length;
1645
+ d != null && M--;
1646
+ for (var U = 0, b = x.length, F, S = a.getEdgesBetween(d); S.length > 1; ) {
1647
+ var Y = S[0];
1648
+ S.splice(0, 1);
1649
+ var X = x.indexOf(Y);
1650
+ X >= 0 && x.splice(X, 1), b--, M--;
1651
+ }
1652
+ F = d == null ? 0 : (x.indexOf(S[0]) + 1) % b;
1653
+ for (var W = Math.abs(v - l) / M, B = F; U != M; B = ++B % b) {
1654
+ var H = x[B].getOtherEnd(a);
1655
+ if (H != d) {
1656
+ var q = (l + U * W) % 360, ot = (q + W) % 360;
1657
+ E.branchRadialLayout(H, a, q, ot, _ + D, D), U++;
1658
+ }
1659
+ }
1660
+ }, E.maxDiagonalInTree = function(a) {
1661
+ for (var d = y.MIN_VALUE, l = 0; l < a.length; l++) {
1662
+ var v = a[l].getDiagonal();
1663
+ v > d && (d = v);
1664
+ }
1665
+ return d;
1666
+ }, E.prototype.calcRepulsionRange = function() {
1667
+ return 2 * (this.level + 1) * this.idealEdgeLength;
1668
+ }, E.prototype.groupZeroDegreeMembers = function() {
1669
+ var a = this, d = {};
1670
+ this.memberGroups = {}, this.idToDummyNode = {};
1671
+ for (var l = [], v = this.graphManager.getAllNodes(), _ = 0; _ < v.length; _++) {
1672
+ var D = v[_], I = D.getParent();
1673
+ this.getNodeDegreeWithChildren(D) === 0 && (I.id == null || !this.getToBeTiled(I)) && l.push(D);
1674
+ }
1675
+ for (var _ = 0; _ < l.length; _++) {
1676
+ var D = l[_], w = D.getParent().id;
1677
+ d[w] === void 0 && (d[w] = []), d[w] = d[w].concat(D);
1678
+ }
1679
+ Object.keys(d).forEach(function(R) {
1680
+ if (d[R].length > 1) {
1681
+ var G = "DummyCompound_" + R;
1682
+ a.memberGroups[G] = d[R];
1683
+ var x = d[R][0].getParent(), M = new r(a.graphManager);
1684
+ M.id = G, M.paddingLeft = x.paddingLeft || 0, M.paddingRight = x.paddingRight || 0, M.paddingBottom = x.paddingBottom || 0, M.paddingTop = x.paddingTop || 0, a.idToDummyNode[G] = M;
1685
+ var U = a.getGraphManager().add(a.newGraph(), M), b = x.getChild();
1686
+ b.add(M);
1687
+ for (var F = 0; F < d[R].length; F++) {
1688
+ var S = d[R][F];
1689
+ b.remove(S), U.add(S);
1690
+ }
1691
+ }
1692
+ });
1693
+ }, E.prototype.clearCompounds = function() {
1694
+ var a = {}, d = {};
1695
+ this.performDFSOnCompounds();
1696
+ for (var l = 0; l < this.compoundOrder.length; l++) d[this.compoundOrder[l].id] = this.compoundOrder[l], a[this.compoundOrder[l].id] = [].concat(this.compoundOrder[l].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[l].getChild()), this.compoundOrder[l].child = null;
1697
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(a, d);
1698
+ }, E.prototype.clearZeroDegreeMembers = function() {
1699
+ var a = this, d = this.tiledZeroDegreePack = [];
1700
+ Object.keys(this.memberGroups).forEach(function(l) {
1701
+ var v = a.idToDummyNode[l];
1702
+ d[l] = a.tileNodes(a.memberGroups[l], v.paddingLeft + v.paddingRight), v.rect.width = d[l].width, v.rect.height = d[l].height;
1703
+ });
1704
+ }, E.prototype.repopulateCompounds = function() {
1705
+ for (var a = this.compoundOrder.length - 1; a >= 0; a--) {
1706
+ var d = this.compoundOrder[a], l = d.id, v = d.paddingLeft, _ = d.paddingTop;
1707
+ this.adjustLocations(this.tiledMemberPack[l], d.rect.x, d.rect.y, v, _);
1708
+ }
1709
+ }, E.prototype.repopulateZeroDegreeMembers = function() {
1710
+ var a = this, d = this.tiledZeroDegreePack;
1711
+ Object.keys(d).forEach(function(l) {
1712
+ var v = a.idToDummyNode[l], _ = v.paddingLeft, D = v.paddingTop;
1713
+ a.adjustLocations(d[l], v.rect.x, v.rect.y, _, D);
1714
+ });
1715
+ }, E.prototype.getToBeTiled = function(a) {
1716
+ var d = a.id;
1717
+ if (this.toBeTiled[d] != null) return this.toBeTiled[d];
1718
+ var l = a.getChild();
1719
+ if (l == null) return this.toBeTiled[d] = !1, !1;
1720
+ for (var v = l.getNodes(), _ = 0; _ < v.length; _++) {
1721
+ var D = v[_];
1722
+ if (this.getNodeDegree(D) > 0) return this.toBeTiled[d] = !1, !1;
1723
+ if (D.getChild() == null) {
1724
+ this.toBeTiled[D.id] = !1;
1725
+ continue;
1726
+ }
1727
+ if (!this.getToBeTiled(D)) return this.toBeTiled[d] = !1, !1;
1728
+ }
1729
+ return this.toBeTiled[d] = !0, !0;
1730
+ }, E.prototype.getNodeDegree = function(a) {
1731
+ a.id;
1732
+ for (var d = a.getEdges(), l = 0, v = 0; v < d.length; v++) {
1733
+ var _ = d[v];
1734
+ _.getSource().id !== _.getTarget().id && (l += 1);
1735
+ }
1736
+ return l;
1737
+ }, E.prototype.getNodeDegreeWithChildren = function(a) {
1738
+ var d = this.getNodeDegree(a);
1739
+ if (a.getChild() == null) return d;
1740
+ for (var l = a.getChild().getNodes(), v = 0; v < l.length; v++) {
1741
+ var _ = l[v];
1742
+ d += this.getNodeDegreeWithChildren(_);
1743
+ }
1744
+ return d;
1745
+ }, E.prototype.performDFSOnCompounds = function() {
1746
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
1747
+ }, E.prototype.fillCompexOrderByDFS = function(a) {
1748
+ for (var d = 0; d < a.length; d++) {
1749
+ var l = a[d];
1750
+ l.getChild() != null && this.fillCompexOrderByDFS(l.getChild().getNodes()), this.getToBeTiled(l) && this.compoundOrder.push(l);
1751
+ }
1752
+ }, E.prototype.adjustLocations = function(a, d, l, v, _) {
1753
+ d += v, l += _;
1754
+ for (var D = d, I = 0; I < a.rows.length; I++) {
1755
+ var w = a.rows[I];
1756
+ d = D;
1757
+ for (var R = 0, G = 0; G < w.length; G++) {
1758
+ var x = w[G];
1759
+ x.rect.x = d, x.rect.y = l, d += x.rect.width + a.horizontalPadding, x.rect.height > R && (R = x.rect.height);
1760
+ }
1761
+ l += R + a.verticalPadding;
1762
+ }
1763
+ }, E.prototype.tileCompoundMembers = function(a, d) {
1764
+ var l = this;
1765
+ this.tiledMemberPack = [], Object.keys(a).forEach(function(v) {
1766
+ var _ = d[v];
1767
+ l.tiledMemberPack[v] = l.tileNodes(a[v], _.paddingLeft + _.paddingRight), _.rect.width = l.tiledMemberPack[v].width, _.rect.height = l.tiledMemberPack[v].height;
1768
+ });
1769
+ }, E.prototype.tileNodes = function(a, d) {
1770
+ var l = {
1771
+ rows: [],
1772
+ rowWidth: [],
1773
+ rowHeight: [],
1774
+ width: 0,
1775
+ height: d,
1776
+ verticalPadding: o.TILING_PADDING_VERTICAL,
1777
+ horizontalPadding: o.TILING_PADDING_HORIZONTAL
1778
+ };
1779
+ a.sort(function(D, I) {
1780
+ return D.rect.width * D.rect.height > I.rect.width * I.rect.height ? -1 : +(D.rect.width * D.rect.height < I.rect.width * I.rect.height);
1781
+ });
1782
+ for (var v = 0; v < a.length; v++) {
1783
+ var _ = a[v];
1784
+ l.rows.length == 0 ? this.insertNodeToRow(l, _, 0, d) : this.canAddHorizontal(l, _.rect.width, _.rect.height) ? this.insertNodeToRow(l, _, this.getShortestRowIndex(l), d) : this.insertNodeToRow(l, _, l.rows.length, d), this.shiftToLastRow(l);
1785
+ }
1786
+ return l;
1787
+ }, E.prototype.insertNodeToRow = function(a, d, l, v) {
1788
+ var _ = v;
1789
+ l == a.rows.length && (a.rows.push([]), a.rowWidth.push(_), a.rowHeight.push(0));
1790
+ var D = a.rowWidth[l] + d.rect.width;
1791
+ a.rows[l].length > 0 && (D += a.horizontalPadding), a.rowWidth[l] = D, a.width < D && (a.width = D);
1792
+ var I = d.rect.height;
1793
+ l > 0 && (I += a.verticalPadding);
1794
+ var w = 0;
1795
+ I > a.rowHeight[l] && (w = a.rowHeight[l], a.rowHeight[l] = I, w = a.rowHeight[l] - w), a.height += w, a.rows[l].push(d);
1796
+ }, E.prototype.getShortestRowIndex = function(a) {
1797
+ for (var d = -1, l = Number.MAX_VALUE, v = 0; v < a.rows.length; v++) a.rowWidth[v] < l && (d = v, l = a.rowWidth[v]);
1798
+ return d;
1799
+ }, E.prototype.getLongestRowIndex = function(a) {
1800
+ for (var d = -1, l = Number.MIN_VALUE, v = 0; v < a.rows.length; v++) a.rowWidth[v] > l && (d = v, l = a.rowWidth[v]);
1801
+ return d;
1802
+ }, E.prototype.canAddHorizontal = function(a, d, l) {
1803
+ var v = this.getShortestRowIndex(a);
1804
+ if (v < 0) return !0;
1805
+ var _ = a.rowWidth[v];
1806
+ if (_ + a.horizontalPadding + d <= a.width) return !0;
1807
+ var D = 0;
1808
+ a.rowHeight[v] < l && v > 0 && (D = l + a.verticalPadding - a.rowHeight[v]);
1809
+ var I = a.width - _ >= d + a.horizontalPadding ? (a.height + D) / (_ + d + a.horizontalPadding) : (a.height + D) / a.width;
1810
+ D = l + a.verticalPadding;
1811
+ var w = a.width < d ? (a.height + D) / d : (a.height + D) / a.width;
1812
+ return w < 1 && (w = 1 / w), I < 1 && (I = 1 / I), I < w;
1813
+ }, E.prototype.shiftToLastRow = function(a) {
1814
+ var d = this.getLongestRowIndex(a), l = a.rowWidth.length - 1, v = a.rows[d], _ = v[v.length - 1], D = _.width + a.horizontalPadding;
1815
+ if (a.width - a.rowWidth[l] > D && d != l) {
1816
+ v.splice(-1, 1), a.rows[l].push(_), a.rowWidth[d] = a.rowWidth[d] - D, a.rowWidth[l] = a.rowWidth[l] + D, a.width = a.rowWidth[instance.getLongestRowIndex(a)];
1817
+ for (var I = Number.MIN_VALUE, w = 0; w < v.length; w++) v[w].height > I && (I = v[w].height);
1818
+ d > 0 && (I += a.verticalPadding);
1819
+ var R = a.rowHeight[d] + a.rowHeight[l];
1820
+ a.rowHeight[d] = I, a.rowHeight[l] < _.height + a.verticalPadding && (a.rowHeight[l] = _.height + a.verticalPadding);
1821
+ var G = a.rowHeight[d] + a.rowHeight[l];
1822
+ a.height += G - R, this.shiftToLastRow(a);
1823
+ }
1824
+ }, E.prototype.tilingPreLayout = function() {
1825
+ o.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
1826
+ }, E.prototype.tilingPostLayout = function() {
1827
+ o.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
1828
+ }, E.prototype.reduceTrees = function() {
1829
+ for (var a = [], d = !0, l; d; ) {
1830
+ var v = this.graphManager.getAllNodes(), _ = [];
1831
+ d = !1;
1832
+ for (var D = 0; D < v.length; D++) l = v[D], l.getEdges().length == 1 && !l.getEdges()[0].isInterGraph && l.getChild() == null && (_.push([
1833
+ l,
1834
+ l.getEdges()[0],
1835
+ l.getOwner()
1836
+ ]), d = !0);
1837
+ if (d == 1) {
1838
+ for (var I = [], w = 0; w < _.length; w++) _[w][0].getEdges().length == 1 && (I.push(_[w]), _[w][0].getOwner().remove(_[w][0]));
1839
+ a.push(I), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
1840
+ }
1841
+ }
1842
+ this.prunedNodesAll = a;
1843
+ }, E.prototype.growTree = function(a) {
1844
+ for (var d = a[a.length - 1], l, v = 0; v < d.length; v++) l = d[v], this.findPlaceforPrunedNode(l), l[2].add(l[0]), l[2].add(l[1], l[1].source, l[1].target);
1845
+ a.splice(a.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
1846
+ }, E.prototype.findPlaceforPrunedNode = function(a) {
1847
+ var d, l, v = a[0];
1848
+ l = v == a[1].source ? a[1].target : a[1].source;
1849
+ var _ = l.startX, D = l.finishX, I = l.startY, w = l.finishY, R = [
1850
+ 0,
1851
+ 0,
1852
+ 0,
1853
+ 0
1854
+ ];
1855
+ if (I > 0) for (var G = _; G <= D; G++) R[0] += this.grid[G][I - 1].length + this.grid[G][I].length - 1;
1856
+ if (D < this.grid.length - 1) for (var G = I; G <= w; G++) R[1] += this.grid[D + 1][G].length + this.grid[D][G].length - 1;
1857
+ if (w < this.grid[0].length - 1) for (var G = _; G <= D; G++) R[2] += this.grid[G][w + 1].length + this.grid[G][w].length - 1;
1858
+ if (_ > 0) for (var G = I; G <= w; G++) R[3] += this.grid[_ - 1][G].length + this.grid[_][G].length - 1;
1859
+ for (var x = y.MAX_VALUE, M, U, b = 0; b < R.length; b++) R[b] < x ? (x = R[b], M = 1, U = b) : R[b] == x && M++;
1860
+ if (M == 3 && x == 0) R[0] == 0 && R[1] == 0 && R[2] == 0 ? d = 1 : R[0] == 0 && R[1] == 0 && R[3] == 0 ? d = 0 : R[0] == 0 && R[2] == 0 && R[3] == 0 ? d = 3 : R[1] == 0 && R[2] == 0 && R[3] == 0 && (d = 2);
1861
+ else if (M == 2 && x == 0) {
1862
+ var F = Math.floor(Math.random() * 2);
1863
+ d = R[0] == 0 && R[1] == 0 ? F == 0 ? 0 : 1 : R[0] == 0 && R[2] == 0 ? F == 0 ? 0 : 2 : R[0] == 0 && R[3] == 0 ? F == 0 ? 0 : 3 : R[1] == 0 && R[2] == 0 ? F == 0 ? 1 : 2 : R[1] == 0 && R[3] == 0 ? F == 0 ? 1 : 3 : F == 0 ? 2 : 3;
1864
+ } else if (M == 4 && x == 0) {
1865
+ var F = Math.floor(Math.random() * 4);
1866
+ d = F;
1867
+ } else d = U;
1868
+ d == 0 ? v.setCenter(l.getCenterX(), l.getCenterY() - l.getHeight() / 2 - N.DEFAULT_EDGE_LENGTH - v.getHeight() / 2) : d == 1 ? v.setCenter(l.getCenterX() + l.getWidth() / 2 + N.DEFAULT_EDGE_LENGTH + v.getWidth() / 2, l.getCenterY()) : d == 2 ? v.setCenter(l.getCenterX(), l.getCenterY() + l.getHeight() / 2 + N.DEFAULT_EDGE_LENGTH + v.getHeight() / 2) : v.setCenter(l.getCenterX() - l.getWidth() / 2 - N.DEFAULT_EDGE_LENGTH - v.getWidth() / 2, l.getCenterY());
1869
+ }, m.exports = E;
1870
+ }),
1871
+ (function(m, A, n) {
1872
+ var e = {};
1873
+ e.layoutBase = n(0), e.CoSEConstants = n(1), e.CoSEEdge = n(2), e.CoSEGraph = n(3), e.CoSEGraphManager = n(4), e.CoSELayout = n(6), e.CoSENode = n(5), m.exports = e;
1874
+ })
1875
+ ]);
1876
+ });
1877
+ })), at = /* @__PURE__ */ st((/* @__PURE__ */ V(((C, P) => {
1878
+ (function(L, m) {
1879
+ typeof C == "object" && typeof P == "object" ? P.exports = m(Z()) : typeof define == "function" && define.amd ? define(["cose-base"], m) : typeof C == "object" ? C.cytoscapeCoseBilkent = m(Z()) : L.cytoscapeCoseBilkent = m(L.coseBase);
1880
+ })(C, function(L) {
1881
+ return (function(m) {
1882
+ var A = {};
1883
+ function n(e) {
1884
+ if (A[e]) return A[e].exports;
1885
+ var t = A[e] = {
1886
+ i: e,
1887
+ l: !1,
1888
+ exports: {}
1889
+ };
1890
+ return m[e].call(t.exports, t, t.exports, n), t.l = !0, t.exports;
1891
+ }
1892
+ return n.m = m, n.c = A, n.i = function(e) {
1893
+ return e;
1894
+ }, n.d = function(e, t, i) {
1895
+ n.o(e, t) || Object.defineProperty(e, t, {
1896
+ configurable: !1,
1897
+ enumerable: !0,
1898
+ get: i
1899
+ });
1900
+ }, n.n = function(e) {
1901
+ var t = e && e.__esModule ? function() {
1902
+ return e.default;
1903
+ } : function() {
1904
+ return e;
1905
+ };
1906
+ return n.d(t, "a", t), t;
1907
+ }, n.o = function(e, t) {
1908
+ return Object.prototype.hasOwnProperty.call(e, t);
1909
+ }, n.p = "", n(n.s = 1);
1910
+ })([(function(m, A) {
1911
+ m.exports = L;
1912
+ }), (function(m, A, n) {
1913
+ var e = n(0).layoutBase.LayoutConstants, t = n(0).layoutBase.FDLayoutConstants, i = n(0).CoSEConstants, r = n(0).CoSELayout, h = n(0).CoSENode, o = n(0).layoutBase.PointD, N = n(0).layoutBase.DimensionD, s = {
1914
+ ready: function() {
1915
+ },
1916
+ stop: function() {
1917
+ },
1918
+ quality: "default",
1919
+ nodeDimensionsIncludeLabels: !1,
1920
+ refresh: 30,
1921
+ fit: !0,
1922
+ padding: 10,
1923
+ randomize: !0,
1924
+ nodeRepulsion: 4500,
1925
+ idealEdgeLength: 50,
1926
+ edgeElasticity: 0.45,
1927
+ nestingFactor: 0.1,
1928
+ gravity: 0.25,
1929
+ numIter: 2500,
1930
+ tile: !0,
1931
+ animate: "end",
1932
+ animationDuration: 500,
1933
+ tilingPaddingVertical: 10,
1934
+ tilingPaddingHorizontal: 10,
1935
+ gravityRangeCompound: 1.5,
1936
+ gravityCompound: 1,
1937
+ gravityRange: 3.8,
1938
+ initialEnergyOnIncremental: 0.5
1939
+ };
1940
+ function g(c, f) {
1941
+ var T = {};
1942
+ for (var E in c) T[E] = c[E];
1943
+ for (var E in f) T[E] = f[E];
1944
+ return T;
1945
+ }
1946
+ function u(c) {
1947
+ this.options = g(s, c), p(this.options);
1948
+ }
1949
+ var p = function(c) {
1950
+ c.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = t.DEFAULT_REPULSION_STRENGTH = c.nodeRepulsion), c.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = t.DEFAULT_EDGE_LENGTH = c.idealEdgeLength), c.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = t.DEFAULT_SPRING_STRENGTH = c.edgeElasticity), c.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = c.nestingFactor), c.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = t.DEFAULT_GRAVITY_STRENGTH = c.gravity), c.numIter != null && (i.MAX_ITERATIONS = t.MAX_ITERATIONS = c.numIter), c.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = t.DEFAULT_GRAVITY_RANGE_FACTOR = c.gravityRange), c.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = c.gravityCompound), c.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = c.gravityRangeCompound), c.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = t.DEFAULT_COOLING_FACTOR_INCREMENTAL = c.initialEnergyOnIncremental), c.quality == "draft" ? e.QUALITY = 0 : c.quality == "proof" ? e.QUALITY = 2 : e.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = c.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = !c.randomize, i.ANIMATE = t.ANIMATE = e.ANIMATE = c.animate, i.TILE = c.tile, i.TILING_PADDING_VERTICAL = typeof c.tilingPaddingVertical == "function" ? c.tilingPaddingVertical.call() : c.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof c.tilingPaddingHorizontal == "function" ? c.tilingPaddingHorizontal.call() : c.tilingPaddingHorizontal;
1951
+ };
1952
+ u.prototype.run = function() {
1953
+ var c, f, T = this.options;
1954
+ this.idToLNode = {};
1955
+ var E = this.layout = new r(), O = this;
1956
+ O.stopped = !1, this.cy = this.options.cy, this.cy.trigger({
1957
+ type: "layoutstart",
1958
+ layout: this
1959
+ });
1960
+ var a = E.newGraphManager();
1961
+ this.gm = a;
1962
+ var d = this.options.eles.nodes(), l = this.options.eles.edges();
1963
+ this.root = a.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(d), E);
1964
+ for (var v = 0; v < l.length; v++) {
1965
+ var _ = l[v], D = this.idToLNode[_.data("source")], I = this.idToLNode[_.data("target")];
1966
+ if (D !== I && D.getEdgesBetween(I).length == 0) {
1967
+ var w = a.add(E.newEdge(), D, I);
1968
+ w.id = _.id();
1969
+ }
1970
+ }
1971
+ var R = function(x, M) {
1972
+ typeof x == "number" && (x = M);
1973
+ var U = x.data("id"), b = O.idToLNode[U];
1974
+ return {
1975
+ x: b.getRect().getCenterX(),
1976
+ y: b.getRect().getCenterY()
1977
+ };
1978
+ }, G = function x() {
1979
+ for (var M = function() {
1980
+ T.fit && T.cy.fit(T.eles, T.padding), c || (c = !0, O.cy.one("layoutready", T.ready), O.cy.trigger({
1981
+ type: "layoutready",
1982
+ layout: O
1983
+ }));
1984
+ }, U = O.options.refresh, b, F = 0; F < U && !b; F++) b = O.stopped || O.layout.tick();
1985
+ if (b) {
1986
+ E.checkLayoutSuccess() && !E.isSubLayout && E.doPostLayout(), E.tilingPostLayout && E.tilingPostLayout(), E.isLayoutFinished = !0, O.options.eles.nodes().positions(R), M(), O.cy.one("layoutstop", O.options.stop), O.cy.trigger({
1987
+ type: "layoutstop",
1988
+ layout: O
1989
+ }), f && cancelAnimationFrame(f), c = !1;
1990
+ return;
1991
+ }
1992
+ var S = O.layout.getPositionsData();
1993
+ T.eles.nodes().positions(function(Y, X) {
1994
+ if (typeof Y == "number" && (Y = X), !Y.isParent()) {
1995
+ for (var W = Y.id(), B = S[W], H = Y; B == null && (B = S[H.data("parent")] || S["DummyCompound_" + H.data("parent")], S[W] = B, H = H.parent()[0], H != null); ) ;
1996
+ return B == null ? {
1997
+ x: Y.position("x"),
1998
+ y: Y.position("y")
1999
+ } : {
2000
+ x: B.x,
2001
+ y: B.y
2002
+ };
2003
+ }
2004
+ }), M(), f = requestAnimationFrame(x);
2005
+ };
2006
+ return E.addListener("layoutstarted", function() {
2007
+ O.options.animate === "during" && (f = requestAnimationFrame(G));
2008
+ }), E.runLayout(), this.options.animate !== "during" && (O.options.eles.nodes().not(":parent").layoutPositions(O, O.options, R), c = !1), this;
2009
+ }, u.prototype.getTopMostNodes = function(c) {
2010
+ for (var f = {}, T = 0; T < c.length; T++) f[c[T].id()] = !0;
2011
+ return c.filter(function(E, O) {
2012
+ typeof E == "number" && (E = O);
2013
+ for (var a = E.parent()[0]; a != null; ) {
2014
+ if (f[a.id()]) return !1;
2015
+ a = a.parent()[0];
2016
+ }
2017
+ return !0;
2018
+ });
2019
+ }, u.prototype.processChildrenList = function(c, f, T) {
2020
+ for (var E = f.length, O = 0; O < E; O++) {
2021
+ var a = f[O], d = a.children(), l, v = a.layoutDimensions({ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels });
2022
+ if (l = a.outerWidth() != null && a.outerHeight() != null ? c.add(new h(T.graphManager, new o(a.position("x") - v.w / 2, a.position("y") - v.h / 2), new N(parseFloat(v.w), parseFloat(v.h)))) : c.add(new h(this.graphManager)), l.id = a.data("id"), l.paddingLeft = parseInt(a.css("padding")), l.paddingTop = parseInt(a.css("padding")), l.paddingRight = parseInt(a.css("padding")), l.paddingBottom = parseInt(a.css("padding")), this.options.nodeDimensionsIncludeLabels && a.isParent()) {
2023
+ var _ = a.boundingBox({
2024
+ includeLabels: !0,
2025
+ includeNodes: !1
2026
+ }).w, D = a.boundingBox({
2027
+ includeLabels: !0,
2028
+ includeNodes: !1
2029
+ }).h, I = a.css("text-halign");
2030
+ l.labelWidth = _, l.labelHeight = D, l.labelPos = I;
2031
+ }
2032
+ if (this.idToLNode[a.data("id")] = l, isNaN(l.rect.x) && (l.rect.x = 0), isNaN(l.rect.y) && (l.rect.y = 0), d != null && d.length > 0) {
2033
+ var w = T.getGraphManager().add(T.newGraph(), l);
2034
+ this.processChildrenList(w, d, T);
2035
+ }
2036
+ }
2037
+ }, u.prototype.stop = function() {
2038
+ return this.stopped = !0, this;
2039
+ };
2040
+ var y = function(c) {
2041
+ c("layout", "cose-bilkent", u);
2042
+ };
2043
+ typeof cytoscape < "u" && y(cytoscape), m.exports = y;
2044
+ })]);
2045
+ });
2046
+ })))());
2047
+ $.use(at.default);
2048
+ function Q(C, P) {
2049
+ C.forEach((L) => {
2050
+ let m = {
2051
+ id: L.id,
2052
+ labelText: L.label,
2053
+ height: L.height,
2054
+ width: L.width,
2055
+ padding: L.padding ?? 0
2056
+ };
2057
+ Object.keys(L).forEach((A) => {
2058
+ [
2059
+ "id",
2060
+ "label",
2061
+ "height",
2062
+ "width",
2063
+ "padding",
2064
+ "x",
2065
+ "y"
2066
+ ].includes(A) || (m[A] = L[A]);
2067
+ }), P.add({
2068
+ group: "nodes",
2069
+ data: m,
2070
+ position: {
2071
+ x: L.x ?? 0,
2072
+ y: L.y ?? 0
2073
+ }
2074
+ });
2075
+ });
2076
+ }
2077
+ k(Q, "addNodes");
2078
+ function K(C, P) {
2079
+ C.forEach((L) => {
2080
+ let m = {
2081
+ id: L.id,
2082
+ source: L.start,
2083
+ target: L.end
2084
+ };
2085
+ Object.keys(L).forEach((A) => {
2086
+ [
2087
+ "id",
2088
+ "start",
2089
+ "end"
2090
+ ].includes(A) || (m[A] = L[A]);
2091
+ }), P.add({
2092
+ group: "edges",
2093
+ data: m
2094
+ });
2095
+ });
2096
+ }
2097
+ k(K, "addEdges");
2098
+ function J(C) {
2099
+ return new Promise((P) => {
2100
+ let L = nt("body").append("div").attr("id", "cy").attr("style", "display:none"), m = $({
2101
+ container: document.getElementById("cy"),
2102
+ style: [{
2103
+ selector: "edge",
2104
+ style: { "curve-style": "bezier" }
2105
+ }]
2106
+ });
2107
+ L.remove(), Q(C.nodes, m), K(C.edges, m), m.nodes().forEach(function(A) {
2108
+ A.layoutDimensions = () => {
2109
+ let n = A.data();
2110
+ return {
2111
+ w: n.width,
2112
+ h: n.height
2113
+ };
2114
+ };
2115
+ }), m.layout({
2116
+ name: "cose-bilkent",
2117
+ quality: "proof",
2118
+ styleEnabled: !1,
2119
+ animate: !1
2120
+ }).run(), m.ready((A) => {
2121
+ j.info("Cytoscape ready", A), P(m);
2122
+ });
2123
+ });
2124
+ }
2125
+ k(J, "createCytoscapeInstance");
2126
+ function tt(C) {
2127
+ return C.nodes().map((P) => {
2128
+ let L = P.data(), m = P.position(), A = {
2129
+ id: L.id,
2130
+ x: m.x,
2131
+ y: m.y
2132
+ };
2133
+ return Object.keys(L).forEach((n) => {
2134
+ n !== "id" && (A[n] = L[n]);
2135
+ }), A;
2136
+ });
2137
+ }
2138
+ k(tt, "extractPositionedNodes");
2139
+ function et(C) {
2140
+ return C.edges().map((P) => {
2141
+ let L = P.data(), m = P._private.rscratch, A = {
2142
+ id: L.id,
2143
+ source: L.source,
2144
+ target: L.target,
2145
+ startX: m.startX,
2146
+ startY: m.startY,
2147
+ midX: m.midX,
2148
+ midY: m.midY,
2149
+ endX: m.endX,
2150
+ endY: m.endY
2151
+ };
2152
+ return Object.keys(L).forEach((n) => {
2153
+ [
2154
+ "id",
2155
+ "source",
2156
+ "target"
2157
+ ].includes(n) || (A[n] = L[n]);
2158
+ }), A;
2159
+ });
2160
+ }
2161
+ k(et, "extractPositionedEdges");
2162
+ async function it(C, P) {
2163
+ j.debug("Starting cose-bilkent layout algorithm");
2164
+ try {
2165
+ rt(C);
2166
+ let L = await J(C), m = tt(L), A = et(L);
2167
+ return j.debug(`Layout completed: ${m.length} nodes, ${A.length} edges`), {
2168
+ nodes: m,
2169
+ edges: A
2170
+ };
2171
+ } catch (L) {
2172
+ throw j.error("Error in cose-bilkent layout algorithm:", L), L;
2173
+ }
2174
+ }
2175
+ k(it, "executeCoseBilkentLayout");
2176
+ function rt(C) {
2177
+ if (!C) throw Error("Layout data is required");
2178
+ if (!C.config) throw Error("Configuration is required in layout data");
2179
+ if (!C.rootNode) throw Error("Root node is required");
2180
+ if (!C.nodes || !Array.isArray(C.nodes)) throw Error("No nodes found in layout data");
2181
+ if (!Array.isArray(C.edges)) throw Error("Edges array is required in layout data");
2182
+ return !0;
2183
+ }
2184
+ k(rt, "validateLayoutData");
2185
+ var gt = /* @__PURE__ */ k(async (C, P, { insertCluster: L, insertEdge: m, insertEdgeLabel: A, insertMarkers: n, insertNode: e, log: t, positionEdgeLabel: i }, { algorithm: r }) => {
2186
+ let h = {}, o = {}, N = P.select("g");
2187
+ n(N, C.markers, C.type, C.diagramId);
2188
+ let s = N.insert("g").attr("class", "subgraphs"), g = N.insert("g").attr("class", "edgePaths"), u = N.insert("g").attr("class", "edgeLabels"), p = N.insert("g").attr("class", "nodes");
2189
+ t.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(C.nodes.map(async (c) => {
2190
+ if (c.isGroup) {
2191
+ let f = { ...c };
2192
+ o[c.id] = f, h[c.id] = f, await L(s, c);
2193
+ } else {
2194
+ let f = { ...c };
2195
+ h[c.id] = f;
2196
+ let T = await e(p, c, {
2197
+ config: C.config,
2198
+ dir: C.direction || "TB"
2199
+ }), E = T.node().getBBox();
2200
+ f.width = E.width, f.height = E.height, f.domId = T, t.debug(`Node ${c.id} dimensions: ${E.width}x${E.height}`);
2201
+ }
2202
+ })), t.debug("Running cose-bilkent layout algorithm");
2203
+ let y = await it({
2204
+ ...C,
2205
+ nodes: C.nodes.map((c) => {
2206
+ let f = h[c.id];
2207
+ return {
2208
+ ...c,
2209
+ width: f.width,
2210
+ height: f.height
2211
+ };
2212
+ })
2213
+ }, C.config);
2214
+ t.debug("Positioning nodes based on layout results"), y.nodes.forEach((c) => {
2215
+ let f = h[c.id];
2216
+ f?.domId && (f.domId.attr("transform", `translate(${c.x}, ${c.y})`), f.x = c.x, f.y = c.y, t.debug(`Positioned node ${f.id} at center (${c.x}, ${c.y})`));
2217
+ }), y.edges.forEach((c) => {
2218
+ let f = C.edges.find((T) => T.id === c.id);
2219
+ f && (f.points = [
2220
+ {
2221
+ x: c.startX,
2222
+ y: c.startY
2223
+ },
2224
+ {
2225
+ x: c.midX,
2226
+ y: c.midY
2227
+ },
2228
+ {
2229
+ x: c.endX,
2230
+ y: c.endY
2231
+ }
2232
+ ]);
2233
+ }), t.debug("Inserting and positioning edges"), await Promise.all(C.edges.map(async (c) => {
2234
+ await A(u, c);
2235
+ let f = h[c.start ?? ""], T = h[c.end ?? ""];
2236
+ if (f && T) {
2237
+ let E = y.edges.find((O) => O.id === c.id);
2238
+ if (E) {
2239
+ t.debug("APA01 positionedEdge", E);
2240
+ let O = { ...c };
2241
+ i(O, m(g, O, o, C.type, f, T, C.diagramId));
2242
+ } else {
2243
+ let O = {
2244
+ ...c,
2245
+ points: [{
2246
+ x: f.x || 0,
2247
+ y: f.y || 0
2248
+ }, {
2249
+ x: T.x || 0,
2250
+ y: T.y || 0
2251
+ }]
2252
+ };
2253
+ i(O, m(g, O, o, C.type, f, T, C.diagramId));
2254
+ }
2255
+ }
2256
+ })), t.debug("Cose-bilkent rendering completed");
2257
+ }, "render");
2258
+ export {
2259
+ gt as render
2260
+ };