@orangelogic/design-system 2.162.0 → 2.164.0

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