@foris/avocado-not-front 1.12.0 → 2.0.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 (341) hide show
  1. package/dist/avocado-not-front.es.js +2165 -8
  2. package/dist/avocado-not-front.umd.js +3 -4642
  3. package/dist/hooks/useAction.d.ts +3 -3
  4. package/dist/services/axios/useFetchAndLoad.d.ts +1 -1
  5. package/package.json +35 -18
  6. package/dist/abap-Y8Dl9g_6-Y8Dl9g_6.js +0 -6
  7. package/dist/actionscript-3-DZzbMeqX-DZzbMeqX.js +0 -6
  8. package/dist/ada-vP6ak0IW-vP6ak0IW.js +0 -6
  9. package/dist/andromeeda-BIpZ7gaU-BIpZ7gaU.js +0 -4
  10. package/dist/angular-html-DPB4Rf0C-1_1_4tyh.js +0 -34
  11. package/dist/angular-ts-CeqPwKaz-ohSx1G-R.js +0 -24
  12. package/dist/apache-BUjz-sD2-BUjz-sD2.js +0 -6
  13. package/dist/apex-oLhhs58q-oLhhs58q.js +0 -6
  14. package/dist/apl-Bfz1rp5e-DI6exAvT.js +0 -17
  15. package/dist/applescript-BPx7YFFu-BPx7YFFu.js +0 -6
  16. package/dist/ara-Z2fSOxSw-Z2fSOxSw.js +0 -6
  17. package/dist/arc-DHSZg76Q-C6o4oFmD.js +0 -85
  18. package/dist/architectureDiagram-VXUJARFQ-Cp8vugxX-9O3-degh.js +0 -4672
  19. package/dist/asciidoc-B-pCoB3G-B-pCoB3G.js +0 -6
  20. package/dist/asm-BTWLY5ym-BTWLY5ym.js +0 -6
  21. package/dist/astro-CFFExE8Q-D857V_mk.js +0 -18
  22. package/dist/aurora-x-BwoVEUWZ-BwoVEUWZ.js +0 -4
  23. package/dist/awk-Fb0P9dkn-Fb0P9dkn.js +0 -6
  24. package/dist/ayu-dark-CxPZkpb2-CxPZkpb2.js +0 -4
  25. package/dist/ballerina-oZK-YekG-oZK-YekG.js +0 -6
  26. package/dist/bat-0FvbqU9S-0FvbqU9S.js +0 -6
  27. package/dist/beancount-DqJEb89h-DqJEb89h.js +0 -6
  28. package/dist/berry-DODBq_Ff-DODBq_Ff.js +0 -6
  29. package/dist/bibtex-EULQRLY5-EULQRLY5.js +0 -6
  30. package/dist/bicep-BorU73w0-BorU73w0.js +0 -6
  31. package/dist/blade-DRRSiTQz-DuQj1Sqy.js +0 -21
  32. package/dist/blockDiagram-VD42YOAC-B4cTulr6-CNlYtTjf.js +0 -2407
  33. package/dist/bsl-NkNNwerW-DeWv6DbE.js +0 -8
  34. package/dist/c-eeMepfLm-eeMepfLm.js +0 -6
  35. package/dist/c4Diagram-YG6GDRKO-B8--s8xx-CZw1PsLU.js +0 -1585
  36. package/dist/cadence-02UX7mW8-02UX7mW8.js +0 -6
  37. package/dist/cairo-DM6WF2e3-BLxuUSuB.js +0 -8
  38. package/dist/catppuccin-frappe-D3cH2rXe-D3cH2rXe.js +0 -4
  39. package/dist/catppuccin-latte-C0LRGUW4-C0LRGUW4.js +0 -4
  40. package/dist/catppuccin-macchiato-c5wQ11TT-c5wQ11TT.js +0 -4
  41. package/dist/catppuccin-mocha-WMD6Qvya-WMD6Qvya.js +0 -4
  42. package/dist/channel-Cqk_cOiy-72hMZ_v0.js +0 -5
  43. package/dist/chunk-4BX2VUAB-Cb-wAjVN-DlY_dtbp.js +0 -9
  44. package/dist/chunk-55IACEB6-QFXfbMHG-AnxyrPT-.js +0 -8
  45. package/dist/chunk-B4BG7PRW-CFs53zrP-DB12fnkn.js +0 -1375
  46. package/dist/chunk-DI55MBZ5-CKjAOeh7-D98MsfUL.js +0 -1383
  47. package/dist/chunk-FMBD7UC4-B29MtLTn-tjtGIWPm.js +0 -19
  48. package/dist/chunk-QN33PNHL-5bU-bM6A-vK9OZVa6.js +0 -20
  49. package/dist/chunk-QZHKN3VN-B_Q6cMrq-78n0e61s.js +0 -15
  50. package/dist/chunk-TZMSLE5B-DlULRafu-BlGLxuE_.js +0 -64
  51. package/dist/clarity-PKm5CwqM-PKm5CwqM.js +0 -6
  52. package/dist/classDiagram-2ON5EDUG-DJmXfcVi-CF8YlvOv.js +0 -22
  53. package/dist/classDiagram-v2-WZHVMYZB-DJmXfcVi-CF8YlvOv.js +0 -22
  54. package/dist/clojure-CXJfHrL3-CXJfHrL3.js +0 -6
  55. package/dist/cmake-BJz8BOTU-BJz8BOTU.js +0 -6
  56. package/dist/cobol-DYTFdEK1-1eoMdnt0.js +0 -12
  57. package/dist/code-block-QI2IAROF-C_F85uim-MNaL7yo9.js +0 -2805
  58. package/dist/codeowners-Bt9yU6NX-Bt9yU6NX.js +0 -6
  59. package/dist/codeql-DHkodjjI-DHkodjjI.js +0 -6
  60. package/dist/coffee-DGBR_nr_-Cu5d6u6p.js +0 -8
  61. package/dist/common-lisp-EVqT9Zhp-EVqT9Zhp.js +0 -6
  62. package/dist/coq-B0L9upzn-B0L9upzn.js +0 -6
  63. package/dist/cose-bilkent-S5V4N54A-N3jM_XQd-BbbJbKzj.js +0 -2612
  64. package/dist/cpp-ZFnOq6fV-CkUSzFY-.js +0 -19
  65. package/dist/crystal-CRJyc4G--B_7jzPPy.js +0 -18
  66. package/dist/csharp-C7yUs7-w-C7yUs7-w.js +0 -6
  67. package/dist/css-CECN5uSL-CECN5uSL.js +0 -6
  68. package/dist/csv-CmYOceLb-DlI6xKnA.js +0 -6
  69. package/dist/cue-ZzumE7IT-ZzumE7IT.js +0 -6
  70. package/dist/cypher-jpdmjtA6-jpdmjtA6.js +0 -6
  71. package/dist/cytoscape.esm-ClN43hhW-Dh4GqQxb.js +0 -18836
  72. package/dist/d-CBagWSwH-CBagWSwH.js +0 -6
  73. package/dist/dagre-6UL2VRFP-CJdrtgOu-CLaqjT6l.js +0 -451
  74. package/dist/dark-plus-pUHDTVV0-pUHDTVV0.js +0 -4
  75. package/dist/dart-6ObCrKr9-6ObCrKr9.js +0 -6
  76. package/dist/dax-CcDT-8dH-CcDT-8dH.js +0 -6
  77. package/dist/defaultLocale-DcQU6Vee-C62bXCQv.js +0 -177
  78. package/dist/desktop-B93p9R9O-B93p9R9O.js +0 -6
  79. package/dist/diagram-PSM6KHXK-DSaDqHvO-DVH1Sew6.js +0 -544
  80. package/dist/diagram-QEK2KX5R-BbxboH_--DYDmO4S1.js +0 -224
  81. package/dist/diagram-S2PKOQOG-DWsCb5He--yPVUK-A.js +0 -146
  82. package/dist/diff-BxzP2J8R-BxzP2J8R.js +0 -6
  83. package/dist/docker-CsHqm9tx-CsHqm9tx.js +0 -6
  84. package/dist/dotenv-BMjVjUL1-BMjVjUL1.js +0 -6
  85. package/dist/dracula-BtZx2Kac-BtZx2Kac.js +0 -4
  86. package/dist/dracula-soft-BKa-aqBv-BKa-aqBv.js +0 -4
  87. package/dist/dream-maker-PAx17jaB-PAx17jaB.js +0 -6
  88. package/dist/edge-B882-fmN-CXsL8OuZ.js +0 -14
  89. package/dist/elixir-DRzNHQCz-EnC5QsDh.js +0 -10
  90. package/dist/elm-DZPAA5Qn-BCPZo0aa.js +0 -9
  91. package/dist/emacs-lisp-Cfxdx5D--Cfxdx5D-.js +0 -6
  92. package/dist/erDiagram-Q2GNP2WA-Bl0uHx93-Cm6cgw10.js +0 -844
  93. package/dist/erb-DB1DqdBc-CnAEHkSC.js +0 -27
  94. package/dist/erlang-DNcDT8Hi-Cs3llSSi.js +0 -8
  95. package/dist/everforest-dark-DMCBqXCK-DMCBqXCK.js +0 -4
  96. package/dist/everforest-light-BbXl82Em-BbXl82Em.js +0 -4
  97. package/dist/fennel-N4WcXuKx-N4WcXuKx.js +0 -6
  98. package/dist/fish-BTDEUgqH-BTDEUgqH.js +0 -6
  99. package/dist/flowDiagram-NV44I4VS-Dq0mXT8f-BL0sk42H.js +0 -1631
  100. package/dist/fluent-BMXUxfv1-BMXUxfv1.js +0 -6
  101. package/dist/fortran-fixed-form-DUsA-VGo-CYX4aMfD.js +0 -8
  102. package/dist/fortran-free-form-DPIT_jbP-DPIT_jbP.js +0 -6
  103. package/dist/fsharp-CYOiIVNx-D3KYyprZ.js +0 -8
  104. package/dist/ganttDiagram-JELNMOA3-Dj1adndm-BODWVm5T.js +0 -2702
  105. package/dist/gdresource-BwtMIoBm-DVtwhfL2.js +0 -10
  106. package/dist/gdscript-BifyeYhI-BifyeYhI.js +0 -6
  107. package/dist/gdshader-Bk8fF6yr-Bk8fF6yr.js +0 -6
  108. package/dist/genie-DzUvd7U9-DzUvd7U9.js +0 -6
  109. package/dist/gherkin-DHRaV0YP-DHRaV0YP.js +0 -6
  110. package/dist/git-commit-Bd32YZ0K-D9qSjMiw.js +0 -8
  111. package/dist/git-rebase-ZWUFO_T4-uqUGWt5o.js +0 -8
  112. package/dist/gitGraphDiagram-NY62KEGX-DIFZugA1-BsIE257G.js +0 -715
  113. package/dist/github-dark-DenFmJkN-DenFmJkN.js +0 -4
  114. package/dist/github-dark-default-BJPUVz4H-BJPUVz4H.js +0 -4
  115. package/dist/github-dark-dimmed-DUshB20C-DUshB20C.js +0 -4
  116. package/dist/github-dark-high-contrast-D3aGCnF8-D3aGCnF8.js +0 -4
  117. package/dist/github-light-JYsPkUQd-JYsPkUQd.js +0 -4
  118. package/dist/github-light-default-D99KPAby-D99KPAby.js +0 -4
  119. package/dist/github-light-high-contrast-BbmZE-Mp-BbmZE-Mp.js +0 -4
  120. package/dist/gleam-Bv284lvN-Bv284lvN.js +0 -6
  121. package/dist/glimmer-js-DkxNrfPT-Dr8vv_dk.js +0 -14
  122. package/dist/glimmer-ts-D6YZEmK_-CeJS1lkt.js +0 -14
  123. package/dist/glsl-CkUcVZNK-D6P60Alb.js +0 -8
  124. package/dist/gnuplot-yPG9-sE_-yPG9-sE_.js +0 -6
  125. package/dist/go-ChxJuLYK-ChxJuLYK.js +0 -6
  126. package/dist/graph-DB2UxkYH-Bs-uwV4G.js +0 -1190
  127. package/dist/graphql-CBu2ehBn-B9KpeKh4.js +0 -14
  128. package/dist/groovy-CJQTphOW-CJQTphOW.js +0 -6
  129. package/dist/gruvbox-dark-hard-C5HOtKIh-C5HOtKIh.js +0 -4
  130. package/dist/gruvbox-dark-medium-FVgwJHuz-FVgwJHuz.js +0 -4
  131. package/dist/gruvbox-dark-soft-B46F314v-B46F314v.js +0 -4
  132. package/dist/gruvbox-light-hard-CJD38wDZ-CJD38wDZ.js +0 -4
  133. package/dist/gruvbox-light-medium-BlIhMYTA-BlIhMYTA.js +0 -4
  134. package/dist/gruvbox-light-soft-DoPHyLVZ-DoPHyLVZ.js +0 -4
  135. package/dist/hack-DVWgrvc2-CFszvyOs.js +0 -12
  136. package/dist/haml-NZLVzu_R-6sAynSNG.js +0 -10
  137. package/dist/handlebars-mxStpSE7-C1GOcwW1.js +0 -14
  138. package/dist/haskell-WeIwNIP6-WeIwNIP6.js +0 -6
  139. package/dist/haxe-TztHsm5T-TztHsm5T.js +0 -6
  140. package/dist/hcl-D438OF-I-D438OF-I.js +0 -6
  141. package/dist/hjson-DYBUbqOl-DYBUbqOl.js +0 -6
  142. package/dist/hlsl-Bk8TCZNL-Bk8TCZNL.js +0 -6
  143. package/dist/houston-BDYrDoDW-BDYrDoDW.js +0 -4
  144. package/dist/html-B50bmoVb-BJ3eCZKL.js +0 -10
  145. package/dist/html-derivative-ByyNxAP5-BxLhKRHw.js +0 -10
  146. package/dist/http-BVIWqb92-CjnDmEd8.js +0 -19
  147. package/dist/hurl-B8OTiYoQ-DoRwHSAy.js +0 -17
  148. package/dist/hxml-GbqSQCLa-BnvJylRx.js +0 -8
  149. package/dist/hy-Brt5EZ7--Brt5EZ7-.js +0 -6
  150. package/dist/imba-CimUv-Uh-CimUv-Uh.js +0 -6
  151. package/dist/infoDiagram-WHAUD3N6-DPjzRs82-ChgGSBbk.js +0 -27
  152. package/dist/ini-BZIuRIvJ-BZIuRIvJ.js +0 -6
  153. package/dist/init-DjUOC4st-C8Nwz6AJ.js +0 -16
  154. package/dist/java-DY6VlHhP-DY6VlHhP.js +0 -6
  155. package/dist/javascript-C25yR2R2-C25yR2R2.js +0 -6
  156. package/dist/jinja-CI-LSgSv-BEWEZ83m.js +0 -13
  157. package/dist/jison-DdreslRX-DzaoIrEq.js +0 -8
  158. package/dist/journeyDiagram-XKPGCS4Q-DLrlPVyq-DYzqQ6Qu.js +0 -840
  159. package/dist/json-DxJze_jm-DxJze_jm.js +0 -6
  160. package/dist/json5-BT4Fjg39-BT4Fjg39.js +0 -6
  161. package/dist/jsonc-CHjZD8gR-CHjZD8gR.js +0 -6
  162. package/dist/jsonl-BGuvDmy9-BGuvDmy9.js +0 -6
  163. package/dist/jsonnet-Bx2cfsXg-Bx2cfsXg.js +0 -6
  164. package/dist/jssm-BcADi6EI-BcADi6EI.js +0 -6
  165. package/dist/jsx-BtKADgXT-BtKADgXT.js +0 -6
  166. package/dist/julia-ll8P6QXy-CifMye9u.js +0 -19
  167. package/dist/kanagawa-dragon-CiKur4Hl-CiKur4Hl.js +0 -4
  168. package/dist/kanagawa-lotus-BKu-smKu-BKu-smKu.js +0 -4
  169. package/dist/kanagawa-wave-CQwozSzG-CQwozSzG.js +0 -4
  170. package/dist/kanban-definition-3W4ZIXB7-BTI5yGHx-Bz8MmnxI.js +0 -724
  171. package/dist/katex.min-l0sNRNKZ-l0sNRNKZ.js +0 -1
  172. package/dist/kdl-BNOv9TC3-0Q4F1UAs.js +0 -6
  173. package/dist/kotlin-ByBMgTeR-ByBMgTeR.js +0 -6
  174. package/dist/kusto-VWFLl2T0-VWFLl2T0.js +0 -6
  175. package/dist/laserwave-6a00oqik-6a00oqik.js +0 -4
  176. package/dist/latex-DF20280u-RMy1LUrW.js +0 -9
  177. package/dist/layout-Q6wQN5dr-BC95Y2G0.js +0 -1727
  178. package/dist/lean-D5yRrexI-D5yRrexI.js +0 -6
  179. package/dist/less-B1GLI2Di-B1GLI2Di.js +0 -6
  180. package/dist/light-plus-CZuVqSLX-CZuVqSLX.js +0 -4
  181. package/dist/linear-UL3ZZUJv-CWZvrkAD.js +0 -277
  182. package/dist/liquid-CHzkx3jT-G75tv0iE.js +0 -14
  183. package/dist/llvm-co1rIKs3-co1rIKs3.js +0 -6
  184. package/dist/log-Al8wyEFV-Al8wyEFV.js +0 -6
  185. package/dist/logo-DBa4JDzV-DBa4JDzV.js +0 -6
  186. package/dist/lua-kX5WP_P5-DxLUTRud.js +0 -8
  187. package/dist/luau-DtBSxLyz-DtBSxLyz.js +0 -6
  188. package/dist/make-CsMclxtr-CsMclxtr.js +0 -6
  189. package/dist/markdown-CrScaQ96-CrScaQ96.js +0 -6
  190. package/dist/marko-ls0Jg2j8-BHrfxEh0.js +0 -14
  191. package/dist/material-theme-D6KBX41T-D6KBX41T.js +0 -4
  192. package/dist/material-theme-darker-CkRroheE-CkRroheE.js +0 -4
  193. package/dist/material-theme-lighter-BUBw43Yz-BUBw43Yz.js +0 -4
  194. package/dist/material-theme-ocean-ClGX14Ja-ClGX14Ja.js +0 -4
  195. package/dist/material-theme-palenight-C1RVm8K1-C1RVm8K1.js +0 -4
  196. package/dist/matlab-BOAaUVP0-BOAaUVP0.js +0 -6
  197. package/dist/mdc-DIP5_jeM-Cff0amyo.js +0 -15
  198. package/dist/mdx-BOhZZUJ8-BOhZZUJ8.js +0 -6
  199. package/dist/mermaid-B0ixDHKN-B0ixDHKN.js +0 -6
  200. package/dist/mermaid-NA5CF7SZ-BDJrKfjz-Cq0tva8U.js +0 -140994
  201. package/dist/mermaid.core-Cpfp0NBU-DQS-fLaZ.js +0 -14401
  202. package/dist/min-dark-C7ak0t6c-C7ak0t6c.js +0 -4
  203. package/dist/min-light-CKFxVcPp-CKFxVcPp.js +0 -4
  204. package/dist/mindmap-definition-VGOIOE7T-B6ovfeib-CXlRkpn9.js +0 -790
  205. package/dist/mipsasm-CTx18fBl-CTx18fBl.js +0 -6
  206. package/dist/mojo-BD611d7o-BD611d7o.js +0 -6
  207. package/dist/monokai-C1KBYcO0-C1KBYcO0.js +0 -4
  208. package/dist/move-F-dICmj2-F-dICmj2.js +0 -6
  209. package/dist/narrat-DmhDCBs--DmhDCBs-.js +0 -6
  210. package/dist/nextflow-DmSVRGjG-DmSVRGjG.js +0 -6
  211. package/dist/nginx-COxS3qoU-CvZmIOfz.js +0 -9
  212. package/dist/night-owl-Bm2rzalh-Bm2rzalh.js +0 -4
  213. package/dist/nim-CCwXZLHG-CVhjPGL5.js +0 -21
  214. package/dist/nix-BZK5F767-BZK5F767.js +0 -9
  215. package/dist/nord-CC5OiUXg-CC5OiUXg.js +0 -4
  216. package/dist/nushell-D8j3dhT--D8j3dhT-.js +0 -6
  217. package/dist/objective-c-Itk8tzmv-Itk8tzmv.js +0 -6
  218. package/dist/objective-cpp-DGt5UKRO-DGt5UKRO.js +0 -6
  219. package/dist/ocaml-eSVK32Eg-eSVK32Eg.js +0 -6
  220. package/dist/one-dark-pro-DTA3VF0_-DTA3VF0_.js +0 -4
  221. package/dist/one-light-D9sNaUtq-D9sNaUtq.js +0 -4
  222. package/dist/openscad-Sp5uZ6f2-Sp5uZ6f2.js +0 -6
  223. package/dist/ordinal-MUacOSdK-B1MUT0BL.js +0 -65
  224. package/dist/pascal-xy8pJNns-xy8pJNns.js +0 -6
  225. package/dist/perl-NvKK8p2P-DbsmNmLT.js +0 -17
  226. package/dist/php-CK5hNnT0-DEpqLZ_n.js +0 -19
  227. package/dist/pieDiagram-ADFJNKIX-Bn24elWA-iGwy_4tX.js +0 -166
  228. package/dist/pkl-C-zSNmaA-C-zSNmaA.js +0 -6
  229. package/dist/plastic-CSTz3KZp-CSTz3KZp.js +0 -4
  230. package/dist/plsql-pVbGZfOv-pVbGZfOv.js +0 -6
  231. package/dist/po-BNfHvqmm-BNfHvqmm.js +0 -6
  232. package/dist/poimandres-C-VADXHD-C-VADXHD.js +0 -4
  233. package/dist/polar-CAZahv3u-CAZahv3u.js +0 -6
  234. package/dist/postcss-05aHdL-n-05aHdL-n.js +0 -6
  235. package/dist/powerquery-DI9HkTvs-DI9HkTvs.js +0 -6
  236. package/dist/powershell-Clc4ydu--Clc4ydu-.js +0 -6
  237. package/dist/prisma-FZjmVtSl-FZjmVtSl.js +0 -6
  238. package/dist/prolog-C5-yg4TO-C5-yg4TO.js +0 -6
  239. package/dist/proto-MmCPeFAD-MmCPeFAD.js +0 -6
  240. package/dist/pug-XOw9Q1Ho-BO4tUzTj.js +0 -12
  241. package/dist/puppet-CUJHmnxV-CUJHmnxV.js +0 -6
  242. package/dist/purescript-rUfGld-4-rUfGld-4.js +0 -6
  243. package/dist/python-BFNSHbwJ-BFNSHbwJ.js +0 -6
  244. package/dist/qml-rTNXsquU-DeTe0b4l.js +0 -8
  245. package/dist/qmldir-BInDYbpo-BInDYbpo.js +0 -6
  246. package/dist/qss-AeJTysr_-AeJTysr_.js +0 -6
  247. package/dist/quadrantDiagram-AYHSOK5B-CsbmyLll-CFP8fgtI.js +0 -1030
  248. package/dist/r-Bm0uF0U2-Bm0uF0U2.js +0 -6
  249. package/dist/racket-B83wSAja-B83wSAja.js +0 -6
  250. package/dist/raku-nEQ4ZJJ7-nEQ4ZJJ7.js +0 -6
  251. package/dist/razor-CoqPuKQU-DUBs-Qe6.js +0 -12
  252. package/dist/red-7y8PH7HH-7y8PH7HH.js +0 -4
  253. package/dist/reg-m_s_Kiip-m_s_Kiip.js +0 -6
  254. package/dist/regexp-BazyLpPg-BazyLpPg.js +0 -6
  255. package/dist/rel-BcRfyd6Q-BcRfyd6Q.js +0 -6
  256. package/dist/requirementDiagram-UZGBJVZJ--9rfbKaz-CC8EZoyz.js +0 -854
  257. package/dist/riscv-Ce8MAQLP-Ce8MAQLP.js +0 -6
  258. package/dist/rose-pine-BKc3yVeu-BKc3yVeu.js +0 -4
  259. package/dist/rose-pine-dawn-BulJcPZT-BulJcPZT.js +0 -4
  260. package/dist/rose-pine-moon-j6jiXKV8-j6jiXKV8.js +0 -4
  261. package/dist/rosmsg-Cz0w1km8-Cz0w1km8.js +0 -6
  262. package/dist/rst-AoEjemIj-Dr7TcJwd.js +0 -36
  263. package/dist/ruby-CGSl8JoB-D4hDjzwe.js +0 -36
  264. package/dist/rust-CLzF9zIN-CLzF9zIN.js +0 -6
  265. package/dist/sankeyDiagram-TZEHDZUN-Cp2id-3k-DhByp8vU.js +0 -830
  266. package/dist/sas-fpEvgATw-D9dNv8Ej.js +0 -8
  267. package/dist/sass-DxHp5rTx-DxHp5rTx.js +0 -6
  268. package/dist/scala-D4grkFkl-D4grkFkl.js +0 -6
  269. package/dist/scheme-BCRWuEm4-BCRWuEm4.js +0 -6
  270. package/dist/scss-B1FaCqwR-DbNEJJFR.js +0 -8
  271. package/dist/sdbl-B7T8abf4-B7T8abf4.js +0 -6
  272. package/dist/sequenceDiagram-WL72ISMW-Bdoz1Co7-DcFuWrLs.js +0 -2526
  273. package/dist/shaderlab-Cr62-Wb4-D_jbKjpl.js +0 -8
  274. package/dist/shellscript-InADTalH-InADTalH.js +0 -6
  275. package/dist/shellsession-DiDJNQdy-BGvYrs9g.js +0 -8
  276. package/dist/slack-dark-i7wN4OET-i7wN4OET.js +0 -4
  277. package/dist/slack-ochin-ndHf0LoP-ndHf0LoP.js +0 -4
  278. package/dist/smalltalk-BlI1_OkM-BlI1_OkM.js +0 -6
  279. package/dist/snazzy-light-BlSJXAu4-BlSJXAu4.js +0 -4
  280. package/dist/solarized-dark-UTmkh7lw-UTmkh7lw.js +0 -4
  281. package/dist/solarized-light-BheCkDPT-BheCkDPT.js +0 -4
  282. package/dist/solidity-DUWnFhS6-DUWnFhS6.js +0 -6
  283. package/dist/soy-YPoZ1G2p-C1q7UQeu.js +0 -10
  284. package/dist/sparql-B0KWFEri-CqC-y0Su.js +0 -8
  285. package/dist/splunk-CRXR8A9s-CRXR8A9s.js +0 -6
  286. package/dist/sql-Cn_v3PB0-Cn_v3PB0.js +0 -6
  287. package/dist/ssh-config-DP-hNVbF-DP-hNVbF.js +0 -6
  288. package/dist/stata-B8c5fTjX-Bf3brRPV.js +0 -8
  289. package/dist/stateDiagram-FKZM4ZOC-BLHxjrc8-FBnBvaVW.js +0 -268
  290. package/dist/stateDiagram-v2-4FDKWEC3-CbxCwS8b-B_Pfgmu4.js +0 -21
  291. package/dist/stylus-CyKEU1Ej-CyKEU1Ej.js +0 -6
  292. package/dist/svelte-5UasyOg7-e8KUCojE.js +0 -14
  293. package/dist/swift-9UzSvamq-9UzSvamq.js +0 -6
  294. package/dist/synthwave-84-NU3C_KFZ-NU3C_KFZ.js +0 -4
  295. package/dist/system-verilog-BCm7smPJ-BCm7smPJ.js +0 -6
  296. package/dist/systemd-C-4qm6XH-C-4qm6XH.js +0 -6
  297. package/dist/talonscript-CFF3LF_O-CvtCkGGO.js +0 -6
  298. package/dist/tasl-Cg_WBUAe-Cg_WBUAe.js +0 -6
  299. package/dist/tcl-DN7buRTF-DN7buRTF.js +0 -6
  300. package/dist/templ-peLZIM2D-DkTUdVi-.js +0 -12
  301. package/dist/terraform-DGvcn9zM-DGvcn9zM.js +0 -6
  302. package/dist/tex-DpOayVob-BjP51rYh.js +0 -8
  303. package/dist/timeline-definition-IT6M3QCI-s3Wsbz6h-DfdfMl2Q.js +0 -805
  304. package/dist/tokyo-night-DP4TmcQl-DP4TmcQl.js +0 -4
  305. package/dist/toml-DY62mUL_-DY62mUL_.js +0 -6
  306. package/dist/treemap-KMMF4GRG-D_L55G0b-CANAYd5X.js +0 -15006
  307. package/dist/ts-tags-CWmBp2js-DrKIoTCJ.js +0 -43
  308. package/dist/tsv-BtvSkaG0-BtvSkaG0.js +0 -6
  309. package/dist/tsx-B8rCNbgL-B8rCNbgL.js +0 -6
  310. package/dist/turtle-_H59FV7D-_H59FV7D.js +0 -6
  311. package/dist/twig-Cpoho6oi-CQE9XWXP.js +0 -35
  312. package/dist/typescript-RycA9KXf-RycA9KXf.js +0 -6
  313. package/dist/typespec-DWqp-kUU-DWqp-kUU.js +0 -6
  314. package/dist/typst-D_1QKWns-D_1QKWns.js +0 -6
  315. package/dist/v-BPCNiyYe-BPCNiyYe.js +0 -6
  316. package/dist/vala-uxaPR7d1-uxaPR7d1.js +0 -6
  317. package/dist/vb-D8_c5-KN-D8_c5-KN.js +0 -6
  318. package/dist/verilog-B-bybjPF-B-bybjPF.js +0 -6
  319. package/dist/vesper-BckBta1U-BckBta1U.js +0 -4
  320. package/dist/vhdl-CUlNa8ac-CUlNa8ac.js +0 -6
  321. package/dist/viml-DsfA-sWm-DsfA-sWm.js +0 -6
  322. package/dist/vitesse-black-BoGvW84i-BoGvW84i.js +0 -4
  323. package/dist/vitesse-dark-Cym-eLtO-Cym-eLtO.js +0 -4
  324. package/dist/vitesse-light-CcmG315c-CcmG315c.js +0 -4
  325. package/dist/vue-DmFKWfEU-DXvRBLDJ.js +0 -31
  326. package/dist/vue-html-BB2aI7Yc-e0S8MQFq.js +0 -15
  327. package/dist/vue-vine-CznNap4x-DAbzn77p.js +0 -24
  328. package/dist/vyper-CPQuu50u-CPQuu50u.js +0 -6
  329. package/dist/wasm-BBXxrAl7-BBXxrAl7.js +0 -6
  330. package/dist/wasm-DQxwEHae-DQxwEHae.js +0 -7
  331. package/dist/wenyan-pbVjoM9_-pbVjoM9_.js +0 -6
  332. package/dist/wgsl-DY4iK1q1-DY4iK1q1.js +0 -6
  333. package/dist/wikitext-Z-MoUasO-Z-MoUasO.js +0 -6
  334. package/dist/wit-CQMQOlTg-CQMQOlTg.js +0 -6
  335. package/dist/wolfram-Dz4KXISs-Dz4KXISs.js +0 -6
  336. package/dist/xml-C2J0sS9M-IZlib8U3.js +0 -8
  337. package/dist/xsl-CbTBIiv3-CgleMmCH.js +0 -9
  338. package/dist/xychartDiagram-PRI3JC2R-D3ejwy7u-CFsnZXTL.js +0 -1345
  339. package/dist/yaml-DaO7k5B1-DaO7k5B1.js +0 -6
  340. package/dist/zenscript-CxBjpf9c-CxBjpf9c.js +0 -6
  341. package/dist/zig-Vm0PO9wB-Vm0PO9wB.js +0 -6
@@ -1,2612 +0,0 @@
1
- import { _ as W, j as gt, l as V } from "./mermaid.core-Cpfp0NBU-DQS-fLaZ.js";
2
- import { e as J } from "./cytoscape.esm-ClN43hhW-Dh4GqQxb.js";
3
- import { V as j, A as lt } from "./mermaid-NA5CF7SZ-BDJrKfjz-Cq0tva8U.js";
4
- import "react";
5
- import "react-dom";
6
- var tt = { exports: {} }, Z = { exports: {} }, Q = { exports: {} }, $;
7
- function ut() {
8
- return $ || ($ = 1, function(x, X) {
9
- (function(_, I) {
10
- x.exports = I();
11
- })(j, function() {
12
- return (
13
- /******/
14
- function(_) {
15
- var I = {};
16
- function T(n) {
17
- if (I[n])
18
- return I[n].exports;
19
- var e = I[n] = {
20
- /******/
21
- i: n,
22
- /******/
23
- l: !1,
24
- /******/
25
- exports: {}
26
- /******/
27
- };
28
- return _[n].call(e.exports, e, e.exports, T), e.l = !0, e.exports;
29
- }
30
- return T.m = _, T.c = I, T.i = function(n) {
31
- return n;
32
- }, T.d = function(n, e, t) {
33
- T.o(n, e) || Object.defineProperty(n, e, {
34
- /******/
35
- configurable: !1,
36
- /******/
37
- enumerable: !0,
38
- /******/
39
- get: t
40
- /******/
41
- });
42
- }, T.n = function(n) {
43
- var e = n && n.__esModule ? (
44
- /******/
45
- function() {
46
- return n.default;
47
- }
48
- ) : (
49
- /******/
50
- function() {
51
- return n;
52
- }
53
- );
54
- return T.d(e, "a", e), e;
55
- }, T.o = function(n, e) {
56
- return Object.prototype.hasOwnProperty.call(n, e);
57
- }, T.p = "", T(T.s = 26);
58
- }([
59
- /* 0 */
60
- /***/
61
- function(_, I, T) {
62
- function n() {
63
- }
64
- n.QUALITY = 1, n.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, n.DEFAULT_INCREMENTAL = !1, n.DEFAULT_ANIMATION_ON_LAYOUT = !0, n.DEFAULT_ANIMATION_DURING_LAYOUT = !1, n.DEFAULT_ANIMATION_PERIOD = 50, n.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, n.DEFAULT_GRAPH_MARGIN = 15, n.NODE_DIMENSIONS_INCLUDE_LABELS = !1, n.SIMPLE_NODE_SIZE = 40, n.SIMPLE_NODE_HALF_SIZE = n.SIMPLE_NODE_SIZE / 2, n.EMPTY_COMPOUND_NODE_SIZE = 40, n.MIN_EDGE_LENGTH = 1, n.WORLD_BOUNDARY = 1e6, n.INITIAL_WORLD_BOUNDARY = n.WORLD_BOUNDARY / 1e3, n.WORLD_CENTER_X = 1200, n.WORLD_CENTER_Y = 900, _.exports = n;
65
- },
66
- /* 1 */
67
- /***/
68
- function(_, I, T) {
69
- var n = T(2), e = T(8), t = T(9);
70
- function i(a, o, p) {
71
- n.call(this, p), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = p, this.bendpoints = [], this.source = a, this.target = o;
72
- }
73
- i.prototype = Object.create(n.prototype);
74
- for (var h in n)
75
- i[h] = n[h];
76
- i.prototype.getSource = function() {
77
- return this.source;
78
- }, i.prototype.getTarget = function() {
79
- return this.target;
80
- }, i.prototype.isInterGraph = function() {
81
- return this.isInterGraph;
82
- }, i.prototype.getLength = function() {
83
- return this.length;
84
- }, i.prototype.isOverlapingSourceAndTarget = function() {
85
- return this.isOverlapingSourceAndTarget;
86
- }, i.prototype.getBendpoints = function() {
87
- return this.bendpoints;
88
- }, i.prototype.getLca = function() {
89
- return this.lca;
90
- }, i.prototype.getSourceInLca = function() {
91
- return this.sourceInLca;
92
- }, i.prototype.getTargetInLca = function() {
93
- return this.targetInLca;
94
- }, i.prototype.getOtherEnd = function(a) {
95
- if (this.source === a)
96
- return this.target;
97
- if (this.target === a)
98
- return this.source;
99
- throw "Node is not incident with this edge";
100
- }, i.prototype.getOtherEndInGraph = function(a, o) {
101
- for (var p = this.getOtherEnd(a), r = o.getGraphManager().getRoot(); ; ) {
102
- if (p.getOwner() == o)
103
- return p;
104
- if (p.getOwner() == r)
105
- break;
106
- p = p.getOwner().getParent();
107
- }
108
- return null;
109
- }, i.prototype.updateLength = function() {
110
- var a = new Array(4);
111
- this.isOverlapingSourceAndTarget = e.getIntersection(this.target.getRect(), this.source.getRect(), a), this.isOverlapingSourceAndTarget || (this.lengthX = a[0] - a[2], this.lengthY = a[1] - a[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));
112
- }, i.prototype.updateLengthSimple = function() {
113
- this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = 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);
114
- }, _.exports = i;
115
- },
116
- /* 2 */
117
- /***/
118
- function(_, I, T) {
119
- function n(e) {
120
- this.vGraphObject = e;
121
- }
122
- _.exports = n;
123
- },
124
- /* 3 */
125
- /***/
126
- function(_, I, T) {
127
- var n = T(2), e = T(10), t = T(13), i = T(0), h = T(16), a = T(4);
128
- function o(r, l, g, f) {
129
- g == null && f == null && (f = l), n.call(this, f), r.graphManager != null && (r = r.graphManager), this.estimatedSize = e.MIN_VALUE, this.inclusionTreeDepth = e.MAX_VALUE, this.vGraphObject = f, this.edges = [], this.graphManager = r, g != null && l != null ? this.rect = new t(l.x, l.y, g.width, g.height) : this.rect = new t();
130
- }
131
- o.prototype = Object.create(n.prototype);
132
- for (var p in n)
133
- o[p] = n[p];
134
- o.prototype.getEdges = function() {
135
- return this.edges;
136
- }, o.prototype.getChild = function() {
137
- return this.child;
138
- }, o.prototype.getOwner = function() {
139
- return this.owner;
140
- }, o.prototype.getWidth = function() {
141
- return this.rect.width;
142
- }, o.prototype.setWidth = function(r) {
143
- this.rect.width = r;
144
- }, o.prototype.getHeight = function() {
145
- return this.rect.height;
146
- }, o.prototype.setHeight = function(r) {
147
- this.rect.height = r;
148
- }, o.prototype.getCenterX = function() {
149
- return this.rect.x + this.rect.width / 2;
150
- }, o.prototype.getCenterY = function() {
151
- return this.rect.y + this.rect.height / 2;
152
- }, o.prototype.getCenter = function() {
153
- return new a(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
154
- }, o.prototype.getLocation = function() {
155
- return new a(this.rect.x, this.rect.y);
156
- }, o.prototype.getRect = function() {
157
- return this.rect;
158
- }, o.prototype.getDiagonal = function() {
159
- return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
160
- }, o.prototype.getHalfTheDiagonal = function() {
161
- return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
162
- }, o.prototype.setRect = function(r, l) {
163
- this.rect.x = r.x, this.rect.y = r.y, this.rect.width = l.width, this.rect.height = l.height;
164
- }, o.prototype.setCenter = function(r, l) {
165
- this.rect.x = r - this.rect.width / 2, this.rect.y = l - this.rect.height / 2;
166
- }, o.prototype.setLocation = function(r, l) {
167
- this.rect.x = r, this.rect.y = l;
168
- }, o.prototype.moveBy = function(r, l) {
169
- this.rect.x += r, this.rect.y += l;
170
- }, o.prototype.getEdgeListToNode = function(r) {
171
- var l = [], g = this;
172
- return g.edges.forEach(function(f) {
173
- if (f.target == r) {
174
- if (f.source != g)
175
- throw "Incorrect edge source!";
176
- l.push(f);
177
- }
178
- }), l;
179
- }, o.prototype.getEdgesBetween = function(r) {
180
- var l = [], g = this;
181
- return g.edges.forEach(function(f) {
182
- if (!(f.source == g || f.target == g))
183
- throw "Incorrect edge source and/or target";
184
- (f.target == r || f.source == r) && l.push(f);
185
- }), l;
186
- }, o.prototype.getNeighborsList = function() {
187
- var r = /* @__PURE__ */ new Set(), l = this;
188
- return l.edges.forEach(function(g) {
189
- if (g.source == l)
190
- r.add(g.target);
191
- else {
192
- if (g.target != l)
193
- throw "Incorrect incidency!";
194
- r.add(g.source);
195
- }
196
- }), r;
197
- }, o.prototype.withChildren = function() {
198
- var r = /* @__PURE__ */ new Set(), l, g;
199
- if (r.add(this), this.child != null)
200
- for (var f = this.child.getNodes(), E = 0; E < f.length; E++)
201
- l = f[E], g = l.withChildren(), g.forEach(function(y) {
202
- r.add(y);
203
- });
204
- return r;
205
- }, o.prototype.getNoOfChildren = function() {
206
- var r = 0, l;
207
- if (this.child == null)
208
- r = 1;
209
- else
210
- for (var g = this.child.getNodes(), f = 0; f < g.length; f++)
211
- l = g[f], r += l.getNoOfChildren();
212
- return r == 0 && (r = 1), r;
213
- }, o.prototype.getEstimatedSize = function() {
214
- if (this.estimatedSize == e.MIN_VALUE)
215
- throw "assert failed";
216
- return this.estimatedSize;
217
- }, o.prototype.calcEstimatedSize = function() {
218
- 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);
219
- }, o.prototype.scatter = function() {
220
- var r, l, g = -i.INITIAL_WORLD_BOUNDARY, f = i.INITIAL_WORLD_BOUNDARY;
221
- r = i.WORLD_CENTER_X + h.nextDouble() * (f - g) + g;
222
- var E = -i.INITIAL_WORLD_BOUNDARY, y = i.INITIAL_WORLD_BOUNDARY;
223
- l = i.WORLD_CENTER_Y + h.nextDouble() * (y - E) + E, this.rect.x = r, this.rect.y = l;
224
- }, o.prototype.updateBounds = function() {
225
- if (this.getChild() == null)
226
- throw "assert failed";
227
- if (this.getChild().getNodes().length != 0) {
228
- var r = this.getChild();
229
- 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) {
230
- var l = r.getRight() - r.getLeft(), g = r.getBottom() - r.getTop();
231
- this.labelWidth > l && (this.rect.x -= (this.labelWidth - l) / 2, this.setWidth(this.labelWidth)), this.labelHeight > g && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - g) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - g), this.setHeight(this.labelHeight));
232
- }
233
- }
234
- }, o.prototype.getInclusionTreeDepth = function() {
235
- if (this.inclusionTreeDepth == e.MAX_VALUE)
236
- throw "assert failed";
237
- return this.inclusionTreeDepth;
238
- }, o.prototype.transform = function(r) {
239
- var l = this.rect.x;
240
- l > i.WORLD_BOUNDARY ? l = i.WORLD_BOUNDARY : l < -i.WORLD_BOUNDARY && (l = -i.WORLD_BOUNDARY);
241
- var g = this.rect.y;
242
- g > i.WORLD_BOUNDARY ? g = i.WORLD_BOUNDARY : g < -i.WORLD_BOUNDARY && (g = -i.WORLD_BOUNDARY);
243
- var f = new a(l, g), E = r.inverseTransformPoint(f);
244
- this.setLocation(E.x, E.y);
245
- }, o.prototype.getLeft = function() {
246
- return this.rect.x;
247
- }, o.prototype.getRight = function() {
248
- return this.rect.x + this.rect.width;
249
- }, o.prototype.getTop = function() {
250
- return this.rect.y;
251
- }, o.prototype.getBottom = function() {
252
- return this.rect.y + this.rect.height;
253
- }, o.prototype.getParent = function() {
254
- return this.owner == null ? null : this.owner.getParent();
255
- }, _.exports = o;
256
- },
257
- /* 4 */
258
- /***/
259
- function(_, I, T) {
260
- function n(e, t) {
261
- e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
262
- }
263
- n.prototype.getX = function() {
264
- return this.x;
265
- }, n.prototype.getY = function() {
266
- return this.y;
267
- }, n.prototype.setX = function(e) {
268
- this.x = e;
269
- }, n.prototype.setY = function(e) {
270
- this.y = e;
271
- }, n.prototype.getDifference = function(e) {
272
- return new DimensionD(this.x - e.x, this.y - e.y);
273
- }, n.prototype.getCopy = function() {
274
- return new n(this.x, this.y);
275
- }, n.prototype.translate = function(e) {
276
- return this.x += e.width, this.y += e.height, this;
277
- }, _.exports = n;
278
- },
279
- /* 5 */
280
- /***/
281
- function(_, I, T) {
282
- var n = T(2), e = T(10), t = T(0), i = T(6), h = T(3), a = T(1), o = T(13), p = T(12), r = T(11);
283
- function l(f, E, y) {
284
- n.call(this, y), this.estimatedSize = e.MIN_VALUE, this.margin = t.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = f, E != null && E instanceof i ? this.graphManager = E : E != null && E instanceof Layout && (this.graphManager = E.graphManager);
285
- }
286
- l.prototype = Object.create(n.prototype);
287
- for (var g in n)
288
- l[g] = n[g];
289
- l.prototype.getNodes = function() {
290
- return this.nodes;
291
- }, l.prototype.getEdges = function() {
292
- return this.edges;
293
- }, l.prototype.getGraphManager = function() {
294
- return this.graphManager;
295
- }, l.prototype.getParent = function() {
296
- return this.parent;
297
- }, l.prototype.getLeft = function() {
298
- return this.left;
299
- }, l.prototype.getRight = function() {
300
- return this.right;
301
- }, l.prototype.getTop = function() {
302
- return this.top;
303
- }, l.prototype.getBottom = function() {
304
- return this.bottom;
305
- }, l.prototype.isConnected = function() {
306
- return this.isConnected;
307
- }, l.prototype.add = function(f, E, y) {
308
- if (E == null && y == null) {
309
- var d = f;
310
- if (this.graphManager == null)
311
- throw "Graph has no graph mgr!";
312
- if (this.getNodes().indexOf(d) > -1)
313
- throw "Node already in graph!";
314
- return d.owner = this, this.getNodes().push(d), d;
315
- } else {
316
- var N = f;
317
- if (!(this.getNodes().indexOf(E) > -1 && this.getNodes().indexOf(y) > -1))
318
- throw "Source or target not in graph!";
319
- if (!(E.owner == y.owner && E.owner == this))
320
- throw "Both owners must be this graph!";
321
- return E.owner != y.owner ? null : (N.source = E, N.target = y, N.isInterGraph = !1, this.getEdges().push(N), E.edges.push(N), y != E && y.edges.push(N), N);
322
- }
323
- }, l.prototype.remove = function(f) {
324
- var E = f;
325
- if (f instanceof h) {
326
- if (E == null)
327
- throw "Node is null!";
328
- if (!(E.owner != null && E.owner == this))
329
- throw "Owner graph is invalid!";
330
- if (this.graphManager == null)
331
- throw "Owner graph manager is invalid!";
332
- for (var y = E.edges.slice(), d, N = y.length, v = 0; v < N; v++)
333
- d = y[v], d.isInterGraph ? this.graphManager.remove(d) : d.source.owner.remove(d);
334
- var L = this.nodes.indexOf(E);
335
- if (L == -1)
336
- throw "Node not in owner node list!";
337
- this.nodes.splice(L, 1);
338
- } else if (f instanceof a) {
339
- var d = f;
340
- if (d == null)
341
- throw "Edge is null!";
342
- if (!(d.source != null && d.target != null))
343
- throw "Source and/or target is null!";
344
- if (!(d.source.owner != null && d.target.owner != null && d.source.owner == this && d.target.owner == this))
345
- throw "Source and/or target owner is invalid!";
346
- var s = d.source.edges.indexOf(d), u = d.target.edges.indexOf(d);
347
- if (!(s > -1 && u > -1))
348
- throw "Source and/or target doesn't know this edge!";
349
- d.source.edges.splice(s, 1), d.target != d.source && d.target.edges.splice(u, 1);
350
- var L = d.source.owner.getEdges().indexOf(d);
351
- if (L == -1)
352
- throw "Not in owner's edge list!";
353
- d.source.owner.getEdges().splice(L, 1);
354
- }
355
- }, l.prototype.updateLeftTop = function() {
356
- for (var f = e.MAX_VALUE, E = e.MAX_VALUE, y, d, N, v = this.getNodes(), L = v.length, s = 0; s < L; s++) {
357
- var u = v[s];
358
- y = u.getTop(), d = u.getLeft(), f > y && (f = y), E > d && (E = d);
359
- }
360
- return f == e.MAX_VALUE ? null : (v[0].getParent().paddingLeft != null ? N = v[0].getParent().paddingLeft : N = this.margin, this.left = E - N, this.top = f - N, new p(this.left, this.top));
361
- }, l.prototype.updateBounds = function(f) {
362
- for (var E = e.MAX_VALUE, y = -e.MAX_VALUE, d = e.MAX_VALUE, N = -e.MAX_VALUE, v, L, s, u, c, A = this.nodes, m = A.length, O = 0; O < m; O++) {
363
- var D = A[O];
364
- f && D.child != null && D.updateBounds(), v = D.getLeft(), L = D.getRight(), s = D.getTop(), u = D.getBottom(), E > v && (E = v), y < L && (y = L), d > s && (d = s), N < u && (N = u);
365
- }
366
- var w = new o(E, d, y - E, N - d);
367
- E == e.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), A[0].getParent().paddingLeft != null ? c = A[0].getParent().paddingLeft : c = this.margin, this.left = w.x - c, this.right = w.x + w.width + c, this.top = w.y - c, this.bottom = w.y + w.height + c;
368
- }, l.calculateBounds = function(f) {
369
- for (var E = e.MAX_VALUE, y = -e.MAX_VALUE, d = e.MAX_VALUE, N = -e.MAX_VALUE, v, L, s, u, c = f.length, A = 0; A < c; A++) {
370
- var m = f[A];
371
- v = m.getLeft(), L = m.getRight(), s = m.getTop(), u = m.getBottom(), E > v && (E = v), y < L && (y = L), d > s && (d = s), N < u && (N = u);
372
- }
373
- var O = new o(E, d, y - E, N - d);
374
- return O;
375
- }, l.prototype.getInclusionTreeDepth = function() {
376
- return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
377
- }, l.prototype.getEstimatedSize = function() {
378
- if (this.estimatedSize == e.MIN_VALUE)
379
- throw "assert failed";
380
- return this.estimatedSize;
381
- }, l.prototype.calcEstimatedSize = function() {
382
- for (var f = 0, E = this.nodes, y = E.length, d = 0; d < y; d++) {
383
- var N = E[d];
384
- f += N.calcEstimatedSize();
385
- }
386
- return f == 0 ? this.estimatedSize = t.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = f / Math.sqrt(this.nodes.length), this.estimatedSize;
387
- }, l.prototype.updateConnected = function() {
388
- var f = this;
389
- if (this.nodes.length == 0) {
390
- this.isConnected = !0;
391
- return;
392
- }
393
- var E = new r(), y = /* @__PURE__ */ new Set(), d = this.nodes[0], N, v, L = d.withChildren();
394
- for (L.forEach(function(O) {
395
- E.push(O), y.add(O);
396
- }); E.length !== 0; ) {
397
- d = E.shift(), N = d.getEdges();
398
- for (var s = N.length, u = 0; u < s; u++) {
399
- var c = N[u];
400
- if (v = c.getOtherEndInGraph(d, this), v != null && !y.has(v)) {
401
- var A = v.withChildren();
402
- A.forEach(function(O) {
403
- E.push(O), y.add(O);
404
- });
405
- }
406
- }
407
- }
408
- if (this.isConnected = !1, y.size >= this.nodes.length) {
409
- var m = 0;
410
- y.forEach(function(O) {
411
- O.owner == f && m++;
412
- }), m == this.nodes.length && (this.isConnected = !0);
413
- }
414
- }, _.exports = l;
415
- },
416
- /* 6 */
417
- /***/
418
- function(_, I, T) {
419
- var n, e = T(1);
420
- function t(i) {
421
- n = T(5), this.layout = i, this.graphs = [], this.edges = [];
422
- }
423
- t.prototype.addRoot = function() {
424
- var i = this.layout.newGraph(), h = this.layout.newNode(null), a = this.add(i, h);
425
- return this.setRootGraph(a), this.rootGraph;
426
- }, t.prototype.add = function(i, h, a, o, p) {
427
- if (a == null && o == null && p == null) {
428
- if (i == null)
429
- throw "Graph is null!";
430
- if (h == null)
431
- throw "Parent node is null!";
432
- if (this.graphs.indexOf(i) > -1)
433
- throw "Graph already in this graph mgr!";
434
- if (this.graphs.push(i), i.parent != null)
435
- throw "Already has a parent!";
436
- if (h.child != null)
437
- throw "Already has a child!";
438
- return i.parent = h, h.child = i, i;
439
- } else {
440
- p = a, o = h, a = i;
441
- var r = o.getOwner(), l = p.getOwner();
442
- if (!(r != null && r.getGraphManager() == this))
443
- throw "Source not in this graph mgr!";
444
- if (!(l != null && l.getGraphManager() == this))
445
- throw "Target not in this graph mgr!";
446
- if (r == l)
447
- return a.isInterGraph = !1, r.add(a, o, p);
448
- if (a.isInterGraph = !0, a.source = o, a.target = p, this.edges.indexOf(a) > -1)
449
- throw "Edge already in inter-graph edge list!";
450
- if (this.edges.push(a), !(a.source != null && a.target != null))
451
- throw "Edge source and/or target is null!";
452
- if (!(a.source.edges.indexOf(a) == -1 && a.target.edges.indexOf(a) == -1))
453
- throw "Edge already in source and/or target incidency list!";
454
- return a.source.edges.push(a), a.target.edges.push(a), a;
455
- }
456
- }, t.prototype.remove = function(i) {
457
- if (i instanceof n) {
458
- var h = i;
459
- if (h.getGraphManager() != this)
460
- throw "Graph not in this graph mgr";
461
- if (!(h == this.rootGraph || h.parent != null && h.parent.graphManager == this))
462
- throw "Invalid parent node!";
463
- var a = [];
464
- a = a.concat(h.getEdges());
465
- for (var o, p = a.length, r = 0; r < p; r++)
466
- o = a[r], h.remove(o);
467
- var l = [];
468
- l = l.concat(h.getNodes());
469
- var g;
470
- p = l.length;
471
- for (var r = 0; r < p; r++)
472
- g = l[r], h.remove(g);
473
- h == this.rootGraph && this.setRootGraph(null);
474
- var f = this.graphs.indexOf(h);
475
- this.graphs.splice(f, 1), h.parent = null;
476
- } else if (i instanceof e) {
477
- if (o = i, o == null)
478
- throw "Edge is null!";
479
- if (!o.isInterGraph)
480
- throw "Not an inter-graph edge!";
481
- if (!(o.source != null && o.target != null))
482
- throw "Source and/or target is null!";
483
- if (!(o.source.edges.indexOf(o) != -1 && o.target.edges.indexOf(o) != -1))
484
- throw "Source and/or target doesn't know this edge!";
485
- var f = o.source.edges.indexOf(o);
486
- if (o.source.edges.splice(f, 1), f = o.target.edges.indexOf(o), o.target.edges.splice(f, 1), !(o.source.owner != null && o.source.owner.getGraphManager() != null))
487
- throw "Edge owner graph or owner graph manager is null!";
488
- if (o.source.owner.getGraphManager().edges.indexOf(o) == -1)
489
- throw "Not in owner graph manager's edge list!";
490
- var f = o.source.owner.getGraphManager().edges.indexOf(o);
491
- o.source.owner.getGraphManager().edges.splice(f, 1);
492
- }
493
- }, t.prototype.updateBounds = function() {
494
- this.rootGraph.updateBounds(!0);
495
- }, t.prototype.getGraphs = function() {
496
- return this.graphs;
497
- }, t.prototype.getAllNodes = function() {
498
- if (this.allNodes == null) {
499
- for (var i = [], h = this.getGraphs(), a = h.length, o = 0; o < a; o++)
500
- i = i.concat(h[o].getNodes());
501
- this.allNodes = i;
502
- }
503
- return this.allNodes;
504
- }, t.prototype.resetAllNodes = function() {
505
- this.allNodes = null;
506
- }, t.prototype.resetAllEdges = function() {
507
- this.allEdges = null;
508
- }, t.prototype.resetAllNodesToApplyGravitation = function() {
509
- this.allNodesToApplyGravitation = null;
510
- }, t.prototype.getAllEdges = function() {
511
- if (this.allEdges == null) {
512
- var i = [], h = this.getGraphs();
513
- h.length;
514
- for (var a = 0; a < h.length; a++)
515
- i = i.concat(h[a].getEdges());
516
- i = i.concat(this.edges), this.allEdges = i;
517
- }
518
- return this.allEdges;
519
- }, t.prototype.getAllNodesToApplyGravitation = function() {
520
- return this.allNodesToApplyGravitation;
521
- }, t.prototype.setAllNodesToApplyGravitation = function(i) {
522
- if (this.allNodesToApplyGravitation != null)
523
- throw "assert failed";
524
- this.allNodesToApplyGravitation = i;
525
- }, t.prototype.getRoot = function() {
526
- return this.rootGraph;
527
- }, t.prototype.setRootGraph = function(i) {
528
- if (i.getGraphManager() != this)
529
- throw "Root not in this graph mgr!";
530
- this.rootGraph = i, i.parent == null && (i.parent = this.layout.newNode("Root node"));
531
- }, t.prototype.getLayout = function() {
532
- return this.layout;
533
- }, t.prototype.isOneAncestorOfOther = function(i, h) {
534
- if (!(i != null && h != null))
535
- throw "assert failed";
536
- if (i == h)
537
- return !0;
538
- var a = i.getOwner(), o;
539
- do {
540
- if (o = a.getParent(), o == null)
541
- break;
542
- if (o == h)
543
- return !0;
544
- if (a = o.getOwner(), a == null)
545
- break;
546
- } while (!0);
547
- a = h.getOwner();
548
- do {
549
- if (o = a.getParent(), o == null)
550
- break;
551
- if (o == i)
552
- return !0;
553
- if (a = o.getOwner(), a == null)
554
- break;
555
- } while (!0);
556
- return !1;
557
- }, t.prototype.calcLowestCommonAncestors = function() {
558
- for (var i, h, a, o, p, r = this.getAllEdges(), l = r.length, g = 0; g < l; g++) {
559
- if (i = r[g], h = i.source, a = i.target, i.lca = null, i.sourceInLca = h, i.targetInLca = a, h == a) {
560
- i.lca = h.getOwner();
561
- continue;
562
- }
563
- for (o = h.getOwner(); i.lca == null; ) {
564
- for (i.targetInLca = a, p = a.getOwner(); i.lca == null; ) {
565
- if (p == o) {
566
- i.lca = p;
567
- break;
568
- }
569
- if (p == this.rootGraph)
570
- break;
571
- if (i.lca != null)
572
- throw "assert failed";
573
- i.targetInLca = p.getParent(), p = i.targetInLca.getOwner();
574
- }
575
- if (o == this.rootGraph)
576
- break;
577
- i.lca == null && (i.sourceInLca = o.getParent(), o = i.sourceInLca.getOwner());
578
- }
579
- if (i.lca == null)
580
- throw "assert failed";
581
- }
582
- }, t.prototype.calcLowestCommonAncestor = function(i, h) {
583
- if (i == h)
584
- return i.getOwner();
585
- var a = i.getOwner();
586
- do {
587
- if (a == null)
588
- break;
589
- var o = h.getOwner();
590
- do {
591
- if (o == null)
592
- break;
593
- if (o == a)
594
- return o;
595
- o = o.getParent().getOwner();
596
- } while (!0);
597
- a = a.getParent().getOwner();
598
- } while (!0);
599
- return a;
600
- }, t.prototype.calcInclusionTreeDepths = function(i, h) {
601
- i == null && h == null && (i = this.rootGraph, h = 1);
602
- for (var a, o = i.getNodes(), p = o.length, r = 0; r < p; r++)
603
- a = o[r], a.inclusionTreeDepth = h, a.child != null && this.calcInclusionTreeDepths(a.child, h + 1);
604
- }, t.prototype.includesInvalidEdge = function() {
605
- for (var i, h = this.edges.length, a = 0; a < h; a++)
606
- if (i = this.edges[a], this.isOneAncestorOfOther(i.source, i.target))
607
- return !0;
608
- return !1;
609
- }, _.exports = t;
610
- },
611
- /* 7 */
612
- /***/
613
- function(_, I, T) {
614
- var n = T(0);
615
- function e() {
616
- }
617
- for (var t in n)
618
- e[t] = n[t];
619
- 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, _.exports = e;
620
- },
621
- /* 8 */
622
- /***/
623
- function(_, I, T) {
624
- var n = T(12);
625
- function e() {
626
- }
627
- e.calcSeparationAmount = function(t, i, h, a) {
628
- if (!t.intersects(i))
629
- throw "assert failed";
630
- var o = new Array(2);
631
- this.decideDirectionsForOverlappingNodes(t, i, o), h[0] = Math.min(t.getRight(), i.getRight()) - Math.max(t.x, i.x), h[1] = Math.min(t.getBottom(), i.getBottom()) - Math.max(t.y, i.y), t.getX() <= i.getX() && t.getRight() >= i.getRight() ? h[0] += Math.min(i.getX() - t.getX(), t.getRight() - i.getRight()) : i.getX() <= t.getX() && i.getRight() >= t.getRight() && (h[0] += Math.min(t.getX() - i.getX(), i.getRight() - t.getRight())), t.getY() <= i.getY() && t.getBottom() >= i.getBottom() ? h[1] += Math.min(i.getY() - t.getY(), t.getBottom() - i.getBottom()) : i.getY() <= t.getY() && i.getBottom() >= t.getBottom() && (h[1] += Math.min(t.getY() - i.getY(), i.getBottom() - t.getBottom()));
632
- var p = Math.abs((i.getCenterY() - t.getCenterY()) / (i.getCenterX() - t.getCenterX()));
633
- i.getCenterY() === t.getCenterY() && i.getCenterX() === t.getCenterX() && (p = 1);
634
- var r = p * h[0], l = h[1] / p;
635
- h[0] < l ? l = h[0] : r = h[1], h[0] = -1 * o[0] * (l / 2 + a), h[1] = -1 * o[1] * (r / 2 + a);
636
- }, e.decideDirectionsForOverlappingNodes = function(t, i, h) {
637
- t.getCenterX() < i.getCenterX() ? h[0] = -1 : h[0] = 1, t.getCenterY() < i.getCenterY() ? h[1] = -1 : h[1] = 1;
638
- }, e.getIntersection2 = function(t, i, h) {
639
- var a = t.getCenterX(), o = t.getCenterY(), p = i.getCenterX(), r = i.getCenterY();
640
- if (t.intersects(i))
641
- return h[0] = a, h[1] = o, h[2] = p, h[3] = r, !0;
642
- var l = t.getX(), g = t.getY(), f = t.getRight(), E = t.getX(), y = t.getBottom(), d = t.getRight(), N = t.getWidthHalf(), v = t.getHeightHalf(), L = i.getX(), s = i.getY(), u = i.getRight(), c = i.getX(), A = i.getBottom(), m = i.getRight(), O = i.getWidthHalf(), D = i.getHeightHalf(), w = !1, M = !1;
643
- if (a === p) {
644
- if (o > r)
645
- return h[0] = a, h[1] = g, h[2] = p, h[3] = A, !1;
646
- if (o < r)
647
- return h[0] = a, h[1] = y, h[2] = p, h[3] = s, !1;
648
- } else if (o === r) {
649
- if (a > p)
650
- return h[0] = l, h[1] = o, h[2] = u, h[3] = r, !1;
651
- if (a < p)
652
- return h[0] = f, h[1] = o, h[2] = L, h[3] = r, !1;
653
- } else {
654
- var F = t.height / t.width, b = i.height / i.width, C = (r - o) / (p - a), R = void 0, G = void 0, P = void 0, S = void 0, U = void 0, Y = void 0;
655
- if (-F === C ? a > p ? (h[0] = E, h[1] = y, w = !0) : (h[0] = f, h[1] = g, w = !0) : F === C && (a > p ? (h[0] = l, h[1] = g, w = !0) : (h[0] = d, h[1] = y, w = !0)), -b === C ? p > a ? (h[2] = c, h[3] = A, M = !0) : (h[2] = u, h[3] = s, M = !0) : b === C && (p > a ? (h[2] = L, h[3] = s, M = !0) : (h[2] = m, h[3] = A, M = !0)), w && M)
656
- return !1;
657
- if (a > p ? o > r ? (R = this.getCardinalDirection(F, C, 4), G = this.getCardinalDirection(b, C, 2)) : (R = this.getCardinalDirection(-F, C, 3), G = this.getCardinalDirection(-b, C, 1)) : o > r ? (R = this.getCardinalDirection(-F, C, 1), G = this.getCardinalDirection(-b, C, 3)) : (R = this.getCardinalDirection(F, C, 2), G = this.getCardinalDirection(b, C, 4)), !w)
658
- switch (R) {
659
- case 1:
660
- S = g, P = a + -v / C, h[0] = P, h[1] = S;
661
- break;
662
- case 2:
663
- P = d, S = o + N * C, h[0] = P, h[1] = S;
664
- break;
665
- case 3:
666
- S = y, P = a + v / C, h[0] = P, h[1] = S;
667
- break;
668
- case 4:
669
- P = E, S = o + -N * C, h[0] = P, h[1] = S;
670
- break;
671
- }
672
- if (!M)
673
- switch (G) {
674
- case 1:
675
- Y = s, U = p + -D / C, h[2] = U, h[3] = Y;
676
- break;
677
- case 2:
678
- U = m, Y = r + O * C, h[2] = U, h[3] = Y;
679
- break;
680
- case 3:
681
- Y = A, U = p + D / C, h[2] = U, h[3] = Y;
682
- break;
683
- case 4:
684
- U = c, Y = r + -O * C, h[2] = U, h[3] = Y;
685
- break;
686
- }
687
- }
688
- return !1;
689
- }, e.getCardinalDirection = function(t, i, h) {
690
- return t > i ? h : 1 + h % 4;
691
- }, e.getIntersection = function(t, i, h, a) {
692
- if (a == null)
693
- return this.getIntersection2(t, i, h);
694
- var o = t.x, p = t.y, r = i.x, l = i.y, g = h.x, f = h.y, E = a.x, y = a.y, d = void 0, N = void 0, v = void 0, L = void 0, s = void 0, u = void 0, c = void 0, A = void 0, m = void 0;
695
- return v = l - p, s = o - r, c = r * p - o * l, L = y - f, u = g - E, A = E * f - g * y, m = v * u - L * s, m === 0 ? null : (d = (s * A - u * c) / m, N = (L * c - v * A) / m, new n(d, N));
696
- }, e.angleOfVector = function(t, i, h, a) {
697
- var o = void 0;
698
- return t !== h ? (o = Math.atan((a - i) / (h - t)), h < t ? o += Math.PI : a < i && (o += this.TWO_PI)) : a < i ? o = this.ONE_AND_HALF_PI : o = this.HALF_PI, o;
699
- }, e.doIntersect = function(t, i, h, a) {
700
- var o = t.x, p = t.y, r = i.x, l = i.y, g = h.x, f = h.y, E = a.x, y = a.y, d = (r - o) * (y - f) - (E - g) * (l - p);
701
- if (d === 0)
702
- return !1;
703
- var N = ((y - f) * (E - o) + (g - E) * (y - p)) / d, v = ((p - l) * (E - o) + (r - o) * (y - p)) / d;
704
- return 0 < N && N < 1 && 0 < v && v < 1;
705
- }, 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, _.exports = e;
706
- },
707
- /* 9 */
708
- /***/
709
- function(_, I, T) {
710
- function n() {
711
- }
712
- n.sign = function(e) {
713
- return e > 0 ? 1 : e < 0 ? -1 : 0;
714
- }, n.floor = function(e) {
715
- return e < 0 ? Math.ceil(e) : Math.floor(e);
716
- }, n.ceil = function(e) {
717
- return e < 0 ? Math.floor(e) : Math.ceil(e);
718
- }, _.exports = n;
719
- },
720
- /* 10 */
721
- /***/
722
- function(_, I, T) {
723
- function n() {
724
- }
725
- n.MAX_VALUE = 2147483647, n.MIN_VALUE = -2147483648, _.exports = n;
726
- },
727
- /* 11 */
728
- /***/
729
- function(_, I, T) {
730
- var n = /* @__PURE__ */ function() {
731
- function o(p, r) {
732
- for (var l = 0; l < r.length; l++) {
733
- var g = r[l];
734
- g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(p, g.key, g);
735
- }
736
- }
737
- return function(p, r, l) {
738
- return r && o(p.prototype, r), l && o(p, l), p;
739
- };
740
- }();
741
- function e(o, p) {
742
- if (!(o instanceof p))
743
- throw new TypeError("Cannot call a class as a function");
744
- }
745
- var t = function(o) {
746
- return { value: o, next: null, prev: null };
747
- }, i = function(o, p, r, l) {
748
- return o !== null ? o.next = p : l.head = p, r !== null ? r.prev = p : l.tail = p, p.prev = o, p.next = r, l.length++, p;
749
- }, h = function(o, p) {
750
- var r = o.prev, l = o.next;
751
- return r !== null ? r.next = l : p.head = l, l !== null ? l.prev = r : p.tail = r, o.prev = o.next = null, p.length--, o;
752
- }, a = function() {
753
- function o(p) {
754
- var r = this;
755
- e(this, o), this.length = 0, this.head = null, this.tail = null, p != null && p.forEach(function(l) {
756
- return r.push(l);
757
- });
758
- }
759
- return n(o, [{
760
- key: "size",
761
- value: function() {
762
- return this.length;
763
- }
764
- }, {
765
- key: "insertBefore",
766
- value: function(p, r) {
767
- return i(r.prev, t(p), r, this);
768
- }
769
- }, {
770
- key: "insertAfter",
771
- value: function(p, r) {
772
- return i(r, t(p), r.next, this);
773
- }
774
- }, {
775
- key: "insertNodeBefore",
776
- value: function(p, r) {
777
- return i(r.prev, p, r, this);
778
- }
779
- }, {
780
- key: "insertNodeAfter",
781
- value: function(p, r) {
782
- return i(r, p, r.next, this);
783
- }
784
- }, {
785
- key: "push",
786
- value: function(p) {
787
- return i(this.tail, t(p), null, this);
788
- }
789
- }, {
790
- key: "unshift",
791
- value: function(p) {
792
- return i(null, t(p), this.head, this);
793
- }
794
- }, {
795
- key: "remove",
796
- value: function(p) {
797
- return h(p, this);
798
- }
799
- }, {
800
- key: "pop",
801
- value: function() {
802
- return h(this.tail, this).value;
803
- }
804
- }, {
805
- key: "popNode",
806
- value: function() {
807
- return h(this.tail, this);
808
- }
809
- }, {
810
- key: "shift",
811
- value: function() {
812
- return h(this.head, this).value;
813
- }
814
- }, {
815
- key: "shiftNode",
816
- value: function() {
817
- return h(this.head, this);
818
- }
819
- }, {
820
- key: "get_object_at",
821
- value: function(p) {
822
- if (p <= this.length()) {
823
- for (var r = 1, l = this.head; r < p; )
824
- l = l.next, r++;
825
- return l.value;
826
- }
827
- }
828
- }, {
829
- key: "set_object_at",
830
- value: function(p, r) {
831
- if (p <= this.length()) {
832
- for (var l = 1, g = this.head; l < p; )
833
- g = g.next, l++;
834
- g.value = r;
835
- }
836
- }
837
- }]), o;
838
- }();
839
- _.exports = a;
840
- },
841
- /* 12 */
842
- /***/
843
- function(_, I, T) {
844
- function n(e, t, i) {
845
- 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);
846
- }
847
- n.prototype.getX = function() {
848
- return this.x;
849
- }, n.prototype.getY = function() {
850
- return this.y;
851
- }, n.prototype.getLocation = function() {
852
- return new n(this.x, this.y);
853
- }, n.prototype.setLocation = function(e, t, i) {
854
- 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)));
855
- }, n.prototype.move = function(e, t) {
856
- this.x = e, this.y = t;
857
- }, n.prototype.translate = function(e, t) {
858
- this.x += e, this.y += t;
859
- }, n.prototype.equals = function(e) {
860
- if (e.constructor.name == "Point") {
861
- var t = e;
862
- return this.x == t.x && this.y == t.y;
863
- }
864
- return this == e;
865
- }, n.prototype.toString = function() {
866
- return new n().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
867
- }, _.exports = n;
868
- },
869
- /* 13 */
870
- /***/
871
- function(_, I, T) {
872
- function n(e, t, i, h) {
873
- this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && i != null && h != null && (this.x = e, this.y = t, this.width = i, this.height = h);
874
- }
875
- n.prototype.getX = function() {
876
- return this.x;
877
- }, n.prototype.setX = function(e) {
878
- this.x = e;
879
- }, n.prototype.getY = function() {
880
- return this.y;
881
- }, n.prototype.setY = function(e) {
882
- this.y = e;
883
- }, n.prototype.getWidth = function() {
884
- return this.width;
885
- }, n.prototype.setWidth = function(e) {
886
- this.width = e;
887
- }, n.prototype.getHeight = function() {
888
- return this.height;
889
- }, n.prototype.setHeight = function(e) {
890
- this.height = e;
891
- }, n.prototype.getRight = function() {
892
- return this.x + this.width;
893
- }, n.prototype.getBottom = function() {
894
- return this.y + this.height;
895
- }, n.prototype.intersects = function(e) {
896
- return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
897
- }, n.prototype.getCenterX = function() {
898
- return this.x + this.width / 2;
899
- }, n.prototype.getMinX = function() {
900
- return this.getX();
901
- }, n.prototype.getMaxX = function() {
902
- return this.getX() + this.width;
903
- }, n.prototype.getCenterY = function() {
904
- return this.y + this.height / 2;
905
- }, n.prototype.getMinY = function() {
906
- return this.getY();
907
- }, n.prototype.getMaxY = function() {
908
- return this.getY() + this.height;
909
- }, n.prototype.getWidthHalf = function() {
910
- return this.width / 2;
911
- }, n.prototype.getHeightHalf = function() {
912
- return this.height / 2;
913
- }, _.exports = n;
914
- },
915
- /* 14 */
916
- /***/
917
- function(_, I, T) {
918
- var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
919
- return typeof t;
920
- } : function(t) {
921
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
922
- };
923
- function e() {
924
- }
925
- e.lastID = 0, e.createID = function(t) {
926
- return e.isPrimitive(t) ? t : (t.uniqueID != null || (t.uniqueID = e.getString(), e.lastID++), t.uniqueID);
927
- }, e.getString = function(t) {
928
- return t == null && (t = e.lastID), "Object#" + t;
929
- }, e.isPrimitive = function(t) {
930
- var i = typeof t > "u" ? "undefined" : n(t);
931
- return t == null || i != "object" && i != "function";
932
- }, _.exports = e;
933
- },
934
- /* 15 */
935
- /***/
936
- function(_, I, T) {
937
- function n(g) {
938
- if (Array.isArray(g)) {
939
- for (var f = 0, E = Array(g.length); f < g.length; f++)
940
- E[f] = g[f];
941
- return E;
942
- } else
943
- return Array.from(g);
944
- }
945
- var e = T(0), t = T(6), i = T(3), h = T(1), a = T(5), o = T(4), p = T(17), r = T(27);
946
- function l(g) {
947
- 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, g != null && (this.isRemoteUse = g);
948
- }
949
- l.RANDOM_SEED = 1, l.prototype = Object.create(r.prototype), l.prototype.getGraphManager = function() {
950
- return this.graphManager;
951
- }, l.prototype.getAllNodes = function() {
952
- return this.graphManager.getAllNodes();
953
- }, l.prototype.getAllEdges = function() {
954
- return this.graphManager.getAllEdges();
955
- }, l.prototype.getAllNodesToApplyGravitation = function() {
956
- return this.graphManager.getAllNodesToApplyGravitation();
957
- }, l.prototype.newGraphManager = function() {
958
- var g = new t(this);
959
- return this.graphManager = g, g;
960
- }, l.prototype.newGraph = function(g) {
961
- return new a(null, this.graphManager, g);
962
- }, l.prototype.newNode = function(g) {
963
- return new i(this.graphManager, g);
964
- }, l.prototype.newEdge = function(g) {
965
- return new h(null, null, g);
966
- }, l.prototype.checkLayoutSuccess = function() {
967
- return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
968
- }, l.prototype.runLayout = function() {
969
- this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
970
- var g;
971
- return this.checkLayoutSuccess() ? g = !1 : g = this.layout(), e.ANIMATE === "during" ? !1 : (g && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, g);
972
- }, l.prototype.doPostLayout = function() {
973
- this.incremental || this.transform(), this.update();
974
- }, l.prototype.update2 = function() {
975
- if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
976
- for (var g = this.graphManager.getAllEdges(), f = 0; f < g.length; f++)
977
- g[f];
978
- for (var E = this.graphManager.getRoot().getNodes(), f = 0; f < E.length; f++)
979
- E[f];
980
- this.update(this.graphManager.getRoot());
981
- }
982
- }, l.prototype.update = function(g) {
983
- if (g == null)
984
- this.update2();
985
- else if (g instanceof i) {
986
- var f = g;
987
- if (f.getChild() != null)
988
- for (var E = f.getChild().getNodes(), y = 0; y < E.length; y++)
989
- update(E[y]);
990
- if (f.vGraphObject != null) {
991
- var d = f.vGraphObject;
992
- d.update(f);
993
- }
994
- } else if (g instanceof h) {
995
- var N = g;
996
- if (N.vGraphObject != null) {
997
- var v = N.vGraphObject;
998
- v.update(N);
999
- }
1000
- } else if (g instanceof a) {
1001
- var L = g;
1002
- if (L.vGraphObject != null) {
1003
- var s = L.vGraphObject;
1004
- s.update(L);
1005
- }
1006
- }
1007
- }, l.prototype.initParameters = function() {
1008
- 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);
1009
- }, l.prototype.transform = function(g) {
1010
- if (g == null)
1011
- this.transform(new o(0, 0));
1012
- else {
1013
- var f = new p(), E = this.graphManager.getRoot().updateLeftTop();
1014
- if (E != null) {
1015
- f.setWorldOrgX(g.x), f.setWorldOrgY(g.y), f.setDeviceOrgX(E.x), f.setDeviceOrgY(E.y);
1016
- for (var y = this.getAllNodes(), d, N = 0; N < y.length; N++)
1017
- d = y[N], d.transform(f);
1018
- }
1019
- }
1020
- }, l.prototype.positionNodesRandomly = function(g) {
1021
- if (g == null)
1022
- this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1023
- else
1024
- for (var f, E, y = g.getNodes(), d = 0; d < y.length; d++)
1025
- f = y[d], E = f.getChild(), E == null || E.getNodes().length == 0 ? f.scatter() : (this.positionNodesRandomly(E), f.updateBounds());
1026
- }, l.prototype.getFlatForest = function() {
1027
- for (var g = [], f = !0, E = this.graphManager.getRoot().getNodes(), y = !0, d = 0; d < E.length; d++)
1028
- E[d].getChild() != null && (y = !1);
1029
- if (!y)
1030
- return g;
1031
- var N = /* @__PURE__ */ new Set(), v = [], L = /* @__PURE__ */ new Map(), s = [];
1032
- for (s = s.concat(E); s.length > 0 && f; ) {
1033
- for (v.push(s[0]); v.length > 0 && f; ) {
1034
- var u = v[0];
1035
- v.splice(0, 1), N.add(u);
1036
- for (var c = u.getEdges(), d = 0; d < c.length; d++) {
1037
- var A = c[d].getOtherEnd(u);
1038
- if (L.get(u) != A)
1039
- if (!N.has(A))
1040
- v.push(A), L.set(A, u);
1041
- else {
1042
- f = !1;
1043
- break;
1044
- }
1045
- }
1046
- }
1047
- if (!f)
1048
- g = [];
1049
- else {
1050
- var m = [].concat(n(N));
1051
- g.push(m);
1052
- for (var d = 0; d < m.length; d++) {
1053
- var O = m[d], D = s.indexOf(O);
1054
- D > -1 && s.splice(D, 1);
1055
- }
1056
- N = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map();
1057
- }
1058
- }
1059
- return g;
1060
- }, l.prototype.createDummyNodesForBendpoints = function(g) {
1061
- for (var f = [], E = g.source, y = this.graphManager.calcLowestCommonAncestor(g.source, g.target), d = 0; d < g.bendpoints.length; d++) {
1062
- var N = this.newNode(null);
1063
- N.setRect(new Point(0, 0), new Dimension(1, 1)), y.add(N);
1064
- var v = this.newEdge(null);
1065
- this.graphManager.add(v, E, N), f.add(N), E = N;
1066
- }
1067
- var v = this.newEdge(null);
1068
- return this.graphManager.add(v, E, g.target), this.edgeToDummyNodes.set(g, f), g.isInterGraph() ? this.graphManager.remove(g) : y.remove(g), f;
1069
- }, l.prototype.createBendpointsFromDummyNodes = function() {
1070
- var g = [];
1071
- g = g.concat(this.graphManager.getAllEdges()), g = [].concat(n(this.edgeToDummyNodes.keys())).concat(g);
1072
- for (var f = 0; f < g.length; f++) {
1073
- var E = g[f];
1074
- if (E.bendpoints.length > 0) {
1075
- for (var y = this.edgeToDummyNodes.get(E), d = 0; d < y.length; d++) {
1076
- var N = y[d], v = new o(N.getCenterX(), N.getCenterY()), L = E.bendpoints.get(d);
1077
- L.x = v.x, L.y = v.y, N.getOwner().remove(N);
1078
- }
1079
- this.graphManager.add(E, E.source, E.target);
1080
- }
1081
- }
1082
- }, l.transform = function(g, f, E, y) {
1083
- if (E != null && y != null) {
1084
- var d = f;
1085
- if (g <= 50) {
1086
- var N = f / E;
1087
- d -= (f - N) / 50 * (50 - g);
1088
- } else {
1089
- var v = f * y;
1090
- d += (v - f) / 50 * (g - 50);
1091
- }
1092
- return d;
1093
- } else {
1094
- var L, s;
1095
- return g <= 50 ? (L = 9 * f / 500, s = f / 10) : (L = 9 * f / 50, s = -8 * f), L * g + s;
1096
- }
1097
- }, l.findCenterOfTree = function(g) {
1098
- var f = [];
1099
- f = f.concat(g);
1100
- var E = [], y = /* @__PURE__ */ new Map(), d = !1, N = null;
1101
- (f.length == 1 || f.length == 2) && (d = !0, N = f[0]);
1102
- for (var v = 0; v < f.length; v++) {
1103
- var L = f[v], s = L.getNeighborsList().size;
1104
- y.set(L, L.getNeighborsList().size), s == 1 && E.push(L);
1105
- }
1106
- var u = [];
1107
- for (u = u.concat(E); !d; ) {
1108
- var c = [];
1109
- c = c.concat(u), u = [];
1110
- for (var v = 0; v < f.length; v++) {
1111
- var L = f[v], A = f.indexOf(L);
1112
- A >= 0 && f.splice(A, 1);
1113
- var m = L.getNeighborsList();
1114
- m.forEach(function(w) {
1115
- if (E.indexOf(w) < 0) {
1116
- var M = y.get(w), F = M - 1;
1117
- F == 1 && u.push(w), y.set(w, F);
1118
- }
1119
- });
1120
- }
1121
- E = E.concat(u), (f.length == 1 || f.length == 2) && (d = !0, N = f[0]);
1122
- }
1123
- return N;
1124
- }, l.prototype.setGraphManager = function(g) {
1125
- this.graphManager = g;
1126
- }, _.exports = l;
1127
- },
1128
- /* 16 */
1129
- /***/
1130
- function(_, I, T) {
1131
- function n() {
1132
- }
1133
- n.seed = 1, n.x = 0, n.nextDouble = function() {
1134
- return n.x = Math.sin(n.seed++) * 1e4, n.x - Math.floor(n.x);
1135
- }, _.exports = n;
1136
- },
1137
- /* 17 */
1138
- /***/
1139
- function(_, I, T) {
1140
- var n = T(4);
1141
- function e(t, i) {
1142
- this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1143
- }
1144
- e.prototype.getWorldOrgX = function() {
1145
- return this.lworldOrgX;
1146
- }, e.prototype.setWorldOrgX = function(t) {
1147
- this.lworldOrgX = t;
1148
- }, e.prototype.getWorldOrgY = function() {
1149
- return this.lworldOrgY;
1150
- }, e.prototype.setWorldOrgY = function(t) {
1151
- this.lworldOrgY = t;
1152
- }, e.prototype.getWorldExtX = function() {
1153
- return this.lworldExtX;
1154
- }, e.prototype.setWorldExtX = function(t) {
1155
- this.lworldExtX = t;
1156
- }, e.prototype.getWorldExtY = function() {
1157
- return this.lworldExtY;
1158
- }, e.prototype.setWorldExtY = function(t) {
1159
- this.lworldExtY = t;
1160
- }, e.prototype.getDeviceOrgX = function() {
1161
- return this.ldeviceOrgX;
1162
- }, e.prototype.setDeviceOrgX = function(t) {
1163
- this.ldeviceOrgX = t;
1164
- }, e.prototype.getDeviceOrgY = function() {
1165
- return this.ldeviceOrgY;
1166
- }, e.prototype.setDeviceOrgY = function(t) {
1167
- this.ldeviceOrgY = t;
1168
- }, e.prototype.getDeviceExtX = function() {
1169
- return this.ldeviceExtX;
1170
- }, e.prototype.setDeviceExtX = function(t) {
1171
- this.ldeviceExtX = t;
1172
- }, e.prototype.getDeviceExtY = function() {
1173
- return this.ldeviceExtY;
1174
- }, e.prototype.setDeviceExtY = function(t) {
1175
- this.ldeviceExtY = t;
1176
- }, e.prototype.transformX = function(t) {
1177
- var i = 0, h = this.lworldExtX;
1178
- return h != 0 && (i = this.ldeviceOrgX + (t - this.lworldOrgX) * this.ldeviceExtX / h), i;
1179
- }, e.prototype.transformY = function(t) {
1180
- var i = 0, h = this.lworldExtY;
1181
- return h != 0 && (i = this.ldeviceOrgY + (t - this.lworldOrgY) * this.ldeviceExtY / h), i;
1182
- }, e.prototype.inverseTransformX = function(t) {
1183
- var i = 0, h = this.ldeviceExtX;
1184
- return h != 0 && (i = this.lworldOrgX + (t - this.ldeviceOrgX) * this.lworldExtX / h), i;
1185
- }, e.prototype.inverseTransformY = function(t) {
1186
- var i = 0, h = this.ldeviceExtY;
1187
- return h != 0 && (i = this.lworldOrgY + (t - this.ldeviceOrgY) * this.lworldExtY / h), i;
1188
- }, e.prototype.inverseTransformPoint = function(t) {
1189
- var i = new n(this.inverseTransformX(t.x), this.inverseTransformY(t.y));
1190
- return i;
1191
- }, _.exports = e;
1192
- },
1193
- /* 18 */
1194
- /***/
1195
- function(_, I, T) {
1196
- function n(r) {
1197
- if (Array.isArray(r)) {
1198
- for (var l = 0, g = Array(r.length); l < r.length; l++)
1199
- g[l] = r[l];
1200
- return g;
1201
- } else
1202
- return Array.from(r);
1203
- }
1204
- var e = T(15), t = T(7), i = T(0), h = T(8), a = T(9);
1205
- function o() {
1206
- 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;
1207
- }
1208
- o.prototype = Object.create(e.prototype);
1209
- for (var p in e)
1210
- o[p] = e[p];
1211
- o.prototype.initParameters = function() {
1212
- e.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1213
- }, o.prototype.calcIdealEdgeLengths = function() {
1214
- for (var r, l, g, f, E, y, d = this.getGraphManager().getAllEdges(), N = 0; N < d.length; N++)
1215
- r = d[N], r.idealLength = this.idealEdgeLength, r.isInterGraph && (g = r.getSource(), f = r.getTarget(), E = r.getSourceInLca().getEstimatedSize(), y = r.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (r.idealLength += E + y - 2 * i.SIMPLE_NODE_SIZE), l = r.getLca().getInclusionTreeDepth(), r.idealLength += t.DEFAULT_EDGE_LENGTH * t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (g.getInclusionTreeDepth() + f.getInclusionTreeDepth() - 2 * l));
1216
- }, o.prototype.initSpringEmbedder = function() {
1217
- var r = this.getAllNodes().length;
1218
- 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();
1219
- }, o.prototype.calcSpringForces = function() {
1220
- for (var r = this.getAllEdges(), l, g = 0; g < r.length; g++)
1221
- l = r[g], this.calcSpringForce(l, l.idealLength);
1222
- }, o.prototype.calcRepulsionForces = function() {
1223
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, g, f, E, y, d = this.getAllNodes(), N;
1224
- if (this.useFRGridVariant)
1225
- for (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && r && this.updateGrid(), N = /* @__PURE__ */ new Set(), g = 0; g < d.length; g++)
1226
- E = d[g], this.calculateRepulsionForceOfANode(E, N, r, l), N.add(E);
1227
- else
1228
- for (g = 0; g < d.length; g++)
1229
- for (E = d[g], f = g + 1; f < d.length; f++)
1230
- y = d[f], E.getOwner() == y.getOwner() && this.calcRepulsionForce(E, y);
1231
- }, o.prototype.calcGravitationalForces = function() {
1232
- for (var r, l = this.getAllNodesToApplyGravitation(), g = 0; g < l.length; g++)
1233
- r = l[g], this.calcGravitationalForce(r);
1234
- }, o.prototype.moveNodes = function() {
1235
- for (var r = this.getAllNodes(), l, g = 0; g < r.length; g++)
1236
- l = r[g], l.move();
1237
- }, o.prototype.calcSpringForce = function(r, l) {
1238
- var g = r.getSource(), f = r.getTarget(), E, y, d, N;
1239
- if (this.uniformLeafNodeSizes && g.getChild() == null && f.getChild() == null)
1240
- r.updateLengthSimple();
1241
- else if (r.updateLength(), r.isOverlapingSourceAndTarget)
1242
- return;
1243
- E = r.getLength(), E != 0 && (y = this.springConstant * (E - l), d = y * (r.lengthX / E), N = y * (r.lengthY / E), g.springForceX += d, g.springForceY += N, f.springForceX -= d, f.springForceY -= N);
1244
- }, o.prototype.calcRepulsionForce = function(r, l) {
1245
- var g = r.getRect(), f = l.getRect(), E = new Array(2), y = new Array(4), d, N, v, L, s, u, c;
1246
- if (g.intersects(f)) {
1247
- h.calcSeparationAmount(g, f, E, t.DEFAULT_EDGE_LENGTH / 2), u = 2 * E[0], c = 2 * E[1];
1248
- var A = r.noOfChildren * l.noOfChildren / (r.noOfChildren + l.noOfChildren);
1249
- r.repulsionForceX -= A * u, r.repulsionForceY -= A * c, l.repulsionForceX += A * u, l.repulsionForceY += A * c;
1250
- } else
1251
- this.uniformLeafNodeSizes && r.getChild() == null && l.getChild() == null ? (d = f.getCenterX() - g.getCenterX(), N = f.getCenterY() - g.getCenterY()) : (h.getIntersection(g, f, y), d = y[2] - y[0], N = y[3] - y[1]), Math.abs(d) < t.MIN_REPULSION_DIST && (d = a.sign(d) * t.MIN_REPULSION_DIST), Math.abs(N) < t.MIN_REPULSION_DIST && (N = a.sign(N) * t.MIN_REPULSION_DIST), v = d * d + N * N, L = Math.sqrt(v), s = this.repulsionConstant * r.noOfChildren * l.noOfChildren / v, u = s * d / L, c = s * N / L, r.repulsionForceX -= u, r.repulsionForceY -= c, l.repulsionForceX += u, l.repulsionForceY += c;
1252
- }, o.prototype.calcGravitationalForce = function(r) {
1253
- var l, g, f, E, y, d, N, v;
1254
- l = r.getOwner(), g = (l.getRight() + l.getLeft()) / 2, f = (l.getTop() + l.getBottom()) / 2, E = r.getCenterX() - g, y = r.getCenterY() - f, d = Math.abs(E) + r.getWidth() / 2, N = Math.abs(y) + r.getHeight() / 2, r.getOwner() == this.graphManager.getRoot() ? (v = l.getEstimatedSize() * this.gravityRangeFactor, (d > v || N > v) && (r.gravitationForceX = -this.gravityConstant * E, r.gravitationForceY = -this.gravityConstant * y)) : (v = l.getEstimatedSize() * this.compoundGravityRangeFactor, (d > v || N > v) && (r.gravitationForceX = -this.gravityConstant * E * this.compoundGravityConstant, r.gravitationForceY = -this.gravityConstant * y * this.compoundGravityConstant));
1255
- }, o.prototype.isConverged = function() {
1256
- var r, l = !1;
1257
- return this.totalIterations > this.maxIterations / 3 && (l = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), r = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, r || l;
1258
- }, o.prototype.animate = function() {
1259
- this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1260
- }, o.prototype.calcNoOfChildrenForAllNodes = function() {
1261
- for (var r, l = this.graphManager.getAllNodes(), g = 0; g < l.length; g++)
1262
- r = l[g], r.noOfChildren = r.getNoOfChildren();
1263
- }, o.prototype.calcGrid = function(r) {
1264
- var l = 0, g = 0;
1265
- l = parseInt(Math.ceil((r.getRight() - r.getLeft()) / this.repulsionRange)), g = parseInt(Math.ceil((r.getBottom() - r.getTop()) / this.repulsionRange));
1266
- for (var f = new Array(l), E = 0; E < l; E++)
1267
- f[E] = new Array(g);
1268
- for (var E = 0; E < l; E++)
1269
- for (var y = 0; y < g; y++)
1270
- f[E][y] = new Array();
1271
- return f;
1272
- }, o.prototype.addNodeToGrid = function(r, l, g) {
1273
- var f = 0, E = 0, y = 0, d = 0;
1274
- f = parseInt(Math.floor((r.getRect().x - l) / this.repulsionRange)), E = parseInt(Math.floor((r.getRect().width + r.getRect().x - l) / this.repulsionRange)), y = parseInt(Math.floor((r.getRect().y - g) / this.repulsionRange)), d = parseInt(Math.floor((r.getRect().height + r.getRect().y - g) / this.repulsionRange));
1275
- for (var N = f; N <= E; N++)
1276
- for (var v = y; v <= d; v++)
1277
- this.grid[N][v].push(r), r.setGridCoordinates(f, E, y, d);
1278
- }, o.prototype.updateGrid = function() {
1279
- var r, l, g = this.getAllNodes();
1280
- for (this.grid = this.calcGrid(this.graphManager.getRoot()), r = 0; r < g.length; r++)
1281
- l = g[r], this.addNodeToGrid(l, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1282
- }, o.prototype.calculateRepulsionForceOfANode = function(r, l, g, f) {
1283
- if (this.totalIterations % t.GRID_CALCULATION_CHECK_PERIOD == 1 && g || f) {
1284
- var E = /* @__PURE__ */ new Set();
1285
- r.surrounding = new Array();
1286
- for (var y, d = this.grid, N = r.startX - 1; N < r.finishX + 2; N++)
1287
- for (var v = r.startY - 1; v < r.finishY + 2; v++)
1288
- if (!(N < 0 || v < 0 || N >= d.length || v >= d[0].length)) {
1289
- for (var L = 0; L < d[N][v].length; L++)
1290
- if (y = d[N][v][L], !(r.getOwner() != y.getOwner() || r == y) && !l.has(y) && !E.has(y)) {
1291
- var s = Math.abs(r.getCenterX() - y.getCenterX()) - (r.getWidth() / 2 + y.getWidth() / 2), u = Math.abs(r.getCenterY() - y.getCenterY()) - (r.getHeight() / 2 + y.getHeight() / 2);
1292
- s <= this.repulsionRange && u <= this.repulsionRange && E.add(y);
1293
- }
1294
- }
1295
- r.surrounding = [].concat(n(E));
1296
- }
1297
- for (N = 0; N < r.surrounding.length; N++)
1298
- this.calcRepulsionForce(r, r.surrounding[N]);
1299
- }, o.prototype.calcRepulsionRange = function() {
1300
- return 0;
1301
- }, _.exports = o;
1302
- },
1303
- /* 19 */
1304
- /***/
1305
- function(_, I, T) {
1306
- var n = T(1), e = T(7);
1307
- function t(h, a, o) {
1308
- n.call(this, h, a, o), this.idealLength = e.DEFAULT_EDGE_LENGTH;
1309
- }
1310
- t.prototype = Object.create(n.prototype);
1311
- for (var i in n)
1312
- t[i] = n[i];
1313
- _.exports = t;
1314
- },
1315
- /* 20 */
1316
- /***/
1317
- function(_, I, T) {
1318
- var n = T(3);
1319
- function e(i, h, a, o) {
1320
- n.call(this, i, h, a, o), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
1321
- }
1322
- e.prototype = Object.create(n.prototype);
1323
- for (var t in n)
1324
- e[t] = n[t];
1325
- e.prototype.setGridCoordinates = function(i, h, a, o) {
1326
- this.startX = i, this.finishX = h, this.startY = a, this.finishY = o;
1327
- }, _.exports = e;
1328
- },
1329
- /* 21 */
1330
- /***/
1331
- function(_, I, T) {
1332
- function n(e, t) {
1333
- this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1334
- }
1335
- n.prototype.getWidth = function() {
1336
- return this.width;
1337
- }, n.prototype.setWidth = function(e) {
1338
- this.width = e;
1339
- }, n.prototype.getHeight = function() {
1340
- return this.height;
1341
- }, n.prototype.setHeight = function(e) {
1342
- this.height = e;
1343
- }, _.exports = n;
1344
- },
1345
- /* 22 */
1346
- /***/
1347
- function(_, I, T) {
1348
- var n = T(14);
1349
- function e() {
1350
- this.map = {}, this.keys = [];
1351
- }
1352
- e.prototype.put = function(t, i) {
1353
- var h = n.createID(t);
1354
- this.contains(h) || (this.map[h] = i, this.keys.push(t));
1355
- }, e.prototype.contains = function(t) {
1356
- return n.createID(t), this.map[t] != null;
1357
- }, e.prototype.get = function(t) {
1358
- var i = n.createID(t);
1359
- return this.map[i];
1360
- }, e.prototype.keySet = function() {
1361
- return this.keys;
1362
- }, _.exports = e;
1363
- },
1364
- /* 23 */
1365
- /***/
1366
- function(_, I, T) {
1367
- var n = T(14);
1368
- function e() {
1369
- this.set = {};
1370
- }
1371
- e.prototype.add = function(t) {
1372
- var i = n.createID(t);
1373
- this.contains(i) || (this.set[i] = t);
1374
- }, e.prototype.remove = function(t) {
1375
- delete this.set[n.createID(t)];
1376
- }, e.prototype.clear = function() {
1377
- this.set = {};
1378
- }, e.prototype.contains = function(t) {
1379
- return this.set[n.createID(t)] == t;
1380
- }, e.prototype.isEmpty = function() {
1381
- return this.size() === 0;
1382
- }, e.prototype.size = function() {
1383
- return Object.keys(this.set).length;
1384
- }, e.prototype.addAllTo = function(t) {
1385
- for (var i = Object.keys(this.set), h = i.length, a = 0; a < h; a++)
1386
- t.push(this.set[i[a]]);
1387
- }, e.prototype.size = function() {
1388
- return Object.keys(this.set).length;
1389
- }, e.prototype.addAll = function(t) {
1390
- for (var i = t.length, h = 0; h < i; h++) {
1391
- var a = t[h];
1392
- this.add(a);
1393
- }
1394
- }, _.exports = e;
1395
- },
1396
- /* 24 */
1397
- /***/
1398
- function(_, I, T) {
1399
- var n = /* @__PURE__ */ function() {
1400
- function h(a, o) {
1401
- for (var p = 0; p < o.length; p++) {
1402
- var r = o[p];
1403
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(a, r.key, r);
1404
- }
1405
- }
1406
- return function(a, o, p) {
1407
- return o && h(a.prototype, o), p && h(a, p), a;
1408
- };
1409
- }();
1410
- function e(h, a) {
1411
- if (!(h instanceof a))
1412
- throw new TypeError("Cannot call a class as a function");
1413
- }
1414
- var t = T(11), i = function() {
1415
- function h(a, o) {
1416
- e(this, h), (o !== null || o !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1417
- var p = void 0;
1418
- a instanceof t ? p = a.size() : p = a.length, this._quicksort(a, 0, p - 1);
1419
- }
1420
- return n(h, [{
1421
- key: "_quicksort",
1422
- value: function(a, o, p) {
1423
- if (o < p) {
1424
- var r = this._partition(a, o, p);
1425
- this._quicksort(a, o, r), this._quicksort(a, r + 1, p);
1426
- }
1427
- }
1428
- }, {
1429
- key: "_partition",
1430
- value: function(a, o, p) {
1431
- for (var r = this._get(a, o), l = o, g = p; ; ) {
1432
- for (; this.compareFunction(r, this._get(a, g)); )
1433
- g--;
1434
- for (; this.compareFunction(this._get(a, l), r); )
1435
- l++;
1436
- if (l < g)
1437
- this._swap(a, l, g), l++, g--;
1438
- else
1439
- return g;
1440
- }
1441
- }
1442
- }, {
1443
- key: "_get",
1444
- value: function(a, o) {
1445
- return a instanceof t ? a.get_object_at(o) : a[o];
1446
- }
1447
- }, {
1448
- key: "_set",
1449
- value: function(a, o, p) {
1450
- a instanceof t ? a.set_object_at(o, p) : a[o] = p;
1451
- }
1452
- }, {
1453
- key: "_swap",
1454
- value: function(a, o, p) {
1455
- var r = this._get(a, o);
1456
- this._set(a, o, this._get(a, p)), this._set(a, p, r);
1457
- }
1458
- }, {
1459
- key: "_defaultCompareFunction",
1460
- value: function(a, o) {
1461
- return o > a;
1462
- }
1463
- }]), h;
1464
- }();
1465
- _.exports = i;
1466
- },
1467
- /* 25 */
1468
- /***/
1469
- function(_, I, T) {
1470
- var n = /* @__PURE__ */ function() {
1471
- function i(h, a) {
1472
- for (var o = 0; o < a.length; o++) {
1473
- var p = a[o];
1474
- p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(h, p.key, p);
1475
- }
1476
- }
1477
- return function(h, a, o) {
1478
- return a && i(h.prototype, a), o && i(h, o), h;
1479
- };
1480
- }();
1481
- function e(i, h) {
1482
- if (!(i instanceof h))
1483
- throw new TypeError("Cannot call a class as a function");
1484
- }
1485
- var t = function() {
1486
- function i(h, a) {
1487
- var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, p = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1488
- e(this, i), this.sequence1 = h, this.sequence2 = a, this.match_score = o, this.mismatch_penalty = p, this.gap_penalty = r, this.iMax = h.length + 1, this.jMax = a.length + 1, this.grid = new Array(this.iMax);
1489
- for (var l = 0; l < this.iMax; l++) {
1490
- this.grid[l] = new Array(this.jMax);
1491
- for (var g = 0; g < this.jMax; g++)
1492
- this.grid[l][g] = 0;
1493
- }
1494
- this.tracebackGrid = new Array(this.iMax);
1495
- for (var f = 0; f < this.iMax; f++) {
1496
- this.tracebackGrid[f] = new Array(this.jMax);
1497
- for (var E = 0; E < this.jMax; E++)
1498
- this.tracebackGrid[f][E] = [null, null, null];
1499
- }
1500
- this.alignments = [], this.score = -1, this.computeGrids();
1501
- }
1502
- return n(i, [{
1503
- key: "getScore",
1504
- value: function() {
1505
- return this.score;
1506
- }
1507
- }, {
1508
- key: "getAlignments",
1509
- value: function() {
1510
- return this.alignments;
1511
- }
1512
- // Main dynamic programming procedure
1513
- }, {
1514
- key: "computeGrids",
1515
- value: function() {
1516
- for (var h = 1; h < this.jMax; h++)
1517
- this.grid[0][h] = this.grid[0][h - 1] + this.gap_penalty, this.tracebackGrid[0][h] = [!1, !1, !0];
1518
- for (var a = 1; a < this.iMax; a++)
1519
- this.grid[a][0] = this.grid[a - 1][0] + this.gap_penalty, this.tracebackGrid[a][0] = [!1, !0, !1];
1520
- for (var o = 1; o < this.iMax; o++)
1521
- for (var p = 1; p < this.jMax; p++) {
1522
- var r = void 0;
1523
- this.sequence1[o - 1] === this.sequence2[p - 1] ? r = this.grid[o - 1][p - 1] + this.match_score : r = this.grid[o - 1][p - 1] + this.mismatch_penalty;
1524
- var l = this.grid[o - 1][p] + this.gap_penalty, g = this.grid[o][p - 1] + this.gap_penalty, f = [r, l, g], E = this.arrayAllMaxIndexes(f);
1525
- this.grid[o][p] = f[E[0]], this.tracebackGrid[o][p] = [E.includes(0), E.includes(1), E.includes(2)];
1526
- }
1527
- this.score = this.grid[this.iMax - 1][this.jMax - 1];
1528
- }
1529
- // Gets all possible valid sequence combinations
1530
- }, {
1531
- key: "alignmentTraceback",
1532
- value: function() {
1533
- var h = [];
1534
- for (h.push({
1535
- pos: [this.sequence1.length, this.sequence2.length],
1536
- seq1: "",
1537
- seq2: ""
1538
- }); h[0]; ) {
1539
- var a = h[0], o = this.tracebackGrid[a.pos[0]][a.pos[1]];
1540
- o[0] && h.push({
1541
- pos: [a.pos[0] - 1, a.pos[1] - 1],
1542
- seq1: this.sequence1[a.pos[0] - 1] + a.seq1,
1543
- seq2: this.sequence2[a.pos[1] - 1] + a.seq2
1544
- }), o[1] && h.push({
1545
- pos: [a.pos[0] - 1, a.pos[1]],
1546
- seq1: this.sequence1[a.pos[0] - 1] + a.seq1,
1547
- seq2: "-" + a.seq2
1548
- }), o[2] && h.push({
1549
- pos: [a.pos[0], a.pos[1] - 1],
1550
- seq1: "-" + a.seq1,
1551
- seq2: this.sequence2[a.pos[1] - 1] + a.seq2
1552
- }), a.pos[0] === 0 && a.pos[1] === 0 && this.alignments.push({
1553
- sequence1: a.seq1,
1554
- sequence2: a.seq2
1555
- }), h.shift();
1556
- }
1557
- return this.alignments;
1558
- }
1559
- // Helper Functions
1560
- }, {
1561
- key: "getAllIndexes",
1562
- value: function(h, a) {
1563
- for (var o = [], p = -1; (p = h.indexOf(a, p + 1)) !== -1; )
1564
- o.push(p);
1565
- return o;
1566
- }
1567
- }, {
1568
- key: "arrayAllMaxIndexes",
1569
- value: function(h) {
1570
- return this.getAllIndexes(h, Math.max.apply(null, h));
1571
- }
1572
- }]), i;
1573
- }();
1574
- _.exports = t;
1575
- },
1576
- /* 26 */
1577
- /***/
1578
- function(_, I, T) {
1579
- var n = function() {
1580
- };
1581
- n.FDLayout = T(18), n.FDLayoutConstants = T(7), n.FDLayoutEdge = T(19), n.FDLayoutNode = T(20), n.DimensionD = T(21), n.HashMap = T(22), n.HashSet = T(23), n.IGeometry = T(8), n.IMath = T(9), n.Integer = T(10), n.Point = T(12), n.PointD = T(4), n.RandomSeed = T(16), n.RectangleD = T(13), n.Transform = T(17), n.UniqueIDGeneretor = T(14), n.Quicksort = T(24), n.LinkedList = T(11), n.LGraphObject = T(2), n.LGraph = T(5), n.LEdge = T(1), n.LGraphManager = T(6), n.LNode = T(3), n.Layout = T(15), n.LayoutConstants = T(0), n.NeedlemanWunsch = T(25), _.exports = n;
1582
- },
1583
- /* 27 */
1584
- /***/
1585
- function(_, I, T) {
1586
- function n() {
1587
- this.listeners = [];
1588
- }
1589
- var e = n.prototype;
1590
- e.addListener = function(t, i) {
1591
- this.listeners.push({
1592
- event: t,
1593
- callback: i
1594
- });
1595
- }, e.removeListener = function(t, i) {
1596
- for (var h = this.listeners.length; h >= 0; h--) {
1597
- var a = this.listeners[h];
1598
- a.event === t && a.callback === i && this.listeners.splice(h, 1);
1599
- }
1600
- }, e.emit = function(t, i) {
1601
- for (var h = 0; h < this.listeners.length; h++) {
1602
- var a = this.listeners[h];
1603
- t === a.event && a.callback(i);
1604
- }
1605
- }, _.exports = n;
1606
- }
1607
- /******/
1608
- ])
1609
- );
1610
- });
1611
- }(Q)), Q.exports;
1612
- }
1613
- var K;
1614
- function ct() {
1615
- return K || (K = 1, function(x, X) {
1616
- (function(_, I) {
1617
- x.exports = I(ut());
1618
- })(j, function(_) {
1619
- return (
1620
- /******/
1621
- function(I) {
1622
- var T = {};
1623
- function n(e) {
1624
- if (T[e])
1625
- return T[e].exports;
1626
- var t = T[e] = {
1627
- /******/
1628
- i: e,
1629
- /******/
1630
- l: !1,
1631
- /******/
1632
- exports: {}
1633
- /******/
1634
- };
1635
- return I[e].call(t.exports, t, t.exports, n), t.l = !0, t.exports;
1636
- }
1637
- return n.m = I, n.c = T, n.i = function(e) {
1638
- return e;
1639
- }, n.d = function(e, t, i) {
1640
- n.o(e, t) || Object.defineProperty(e, t, {
1641
- /******/
1642
- configurable: !1,
1643
- /******/
1644
- enumerable: !0,
1645
- /******/
1646
- get: i
1647
- /******/
1648
- });
1649
- }, n.n = function(e) {
1650
- var t = e && e.__esModule ? (
1651
- /******/
1652
- function() {
1653
- return e.default;
1654
- }
1655
- ) : (
1656
- /******/
1657
- function() {
1658
- return e;
1659
- }
1660
- );
1661
- return n.d(t, "a", t), t;
1662
- }, n.o = function(e, t) {
1663
- return Object.prototype.hasOwnProperty.call(e, t);
1664
- }, n.p = "", n(n.s = 7);
1665
- }([
1666
- /* 0 */
1667
- /***/
1668
- function(I, T) {
1669
- I.exports = _;
1670
- },
1671
- /* 1 */
1672
- /***/
1673
- function(I, T, n) {
1674
- var e = n(0).FDLayoutConstants;
1675
- function t() {
1676
- }
1677
- for (var i in e)
1678
- t[i] = e[i];
1679
- 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;
1680
- },
1681
- /* 2 */
1682
- /***/
1683
- function(I, T, n) {
1684
- var e = n(0).FDLayoutEdge;
1685
- function t(h, a, o) {
1686
- e.call(this, h, a, o);
1687
- }
1688
- t.prototype = Object.create(e.prototype);
1689
- for (var i in e)
1690
- t[i] = e[i];
1691
- I.exports = t;
1692
- },
1693
- /* 3 */
1694
- /***/
1695
- function(I, T, n) {
1696
- var e = n(0).LGraph;
1697
- function t(h, a, o) {
1698
- e.call(this, h, a, o);
1699
- }
1700
- t.prototype = Object.create(e.prototype);
1701
- for (var i in e)
1702
- t[i] = e[i];
1703
- I.exports = t;
1704
- },
1705
- /* 4 */
1706
- /***/
1707
- function(I, T, n) {
1708
- var e = n(0).LGraphManager;
1709
- function t(h) {
1710
- e.call(this, h);
1711
- }
1712
- t.prototype = Object.create(e.prototype);
1713
- for (var i in e)
1714
- t[i] = e[i];
1715
- I.exports = t;
1716
- },
1717
- /* 5 */
1718
- /***/
1719
- function(I, T, n) {
1720
- var e = n(0).FDLayoutNode, t = n(0).IMath;
1721
- function i(a, o, p, r) {
1722
- e.call(this, a, o, p, r);
1723
- }
1724
- i.prototype = Object.create(e.prototype);
1725
- for (var h in e)
1726
- i[h] = e[h];
1727
- i.prototype.move = function() {
1728
- var a = this.graphManager.getLayout();
1729
- this.displacementX = a.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = a.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > a.coolingFactor * a.maxNodeDisplacement && (this.displacementX = a.coolingFactor * a.maxNodeDisplacement * t.sign(this.displacementX)), Math.abs(this.displacementY) > a.coolingFactor * a.maxNodeDisplacement && (this.displacementY = a.coolingFactor * a.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), a.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;
1730
- }, i.prototype.propogateDisplacementToChildren = function(a, o) {
1731
- for (var p = this.getChild().getNodes(), r, l = 0; l < p.length; l++)
1732
- r = p[l], r.getChild() == null ? (r.moveBy(a, o), r.displacementX += a, r.displacementY += o) : r.propogateDisplacementToChildren(a, o);
1733
- }, i.prototype.setPred1 = function(a) {
1734
- this.pred1 = a;
1735
- }, i.prototype.getPred1 = function() {
1736
- return pred1;
1737
- }, i.prototype.getPred2 = function() {
1738
- return pred2;
1739
- }, i.prototype.setNext = function(a) {
1740
- this.next = a;
1741
- }, i.prototype.getNext = function() {
1742
- return next;
1743
- }, i.prototype.setProcessed = function(a) {
1744
- this.processed = a;
1745
- }, i.prototype.isProcessed = function() {
1746
- return processed;
1747
- }, I.exports = i;
1748
- },
1749
- /* 6 */
1750
- /***/
1751
- function(I, T, n) {
1752
- var e = n(0).FDLayout, t = n(4), i = n(3), h = n(5), a = n(2), o = n(1), p = n(0).FDLayoutConstants, r = n(0).LayoutConstants, l = n(0).Point, g = n(0).PointD, f = n(0).Layout, E = n(0).Integer, y = n(0).IGeometry, d = n(0).LGraph, N = n(0).Transform;
1753
- function v() {
1754
- e.call(this), this.toBeTiled = {};
1755
- }
1756
- v.prototype = Object.create(e.prototype);
1757
- for (var L in e)
1758
- v[L] = e[L];
1759
- v.prototype.newGraphManager = function() {
1760
- var s = new t(this);
1761
- return this.graphManager = s, s;
1762
- }, v.prototype.newGraph = function(s) {
1763
- return new i(null, this.graphManager, s);
1764
- }, v.prototype.newNode = function(s) {
1765
- return new h(this.graphManager, s);
1766
- }, v.prototype.newEdge = function(s) {
1767
- return new a(null, null, s);
1768
- }, v.prototype.initParameters = function() {
1769
- e.prototype.initParameters.call(this, arguments), this.isSubLayout || (o.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = o.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = p.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = p.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = p.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = p.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = p.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / p.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = p.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1770
- }, v.prototype.layout = function() {
1771
- var s = r.DEFAULT_CREATE_BENDS_AS_NEEDED;
1772
- return s && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1773
- }, v.prototype.classicLayout = function() {
1774
- 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) {
1775
- if (o.TREE_REDUCTION_ON_INCREMENTAL) {
1776
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1777
- var s = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(A) {
1778
- return s.has(A);
1779
- });
1780
- this.graphManager.setAllNodesToApplyGravitation(u);
1781
- }
1782
- } else {
1783
- var c = this.getFlatForest();
1784
- if (c.length > 0)
1785
- this.positionNodesRadially(c);
1786
- else {
1787
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1788
- var s = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(O) {
1789
- return s.has(O);
1790
- });
1791
- this.graphManager.setAllNodesToApplyGravitation(u), this.positionNodesRandomly();
1792
- }
1793
- }
1794
- return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1795
- }, v.prototype.tick = function() {
1796
- if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1797
- if (this.prunedNodesAll.length > 0)
1798
- this.isTreeGrowing = !0;
1799
- else
1800
- return !0;
1801
- if (this.totalIterations % p.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1802
- if (this.isConverged())
1803
- if (this.prunedNodesAll.length > 0)
1804
- this.isTreeGrowing = !0;
1805
- else
1806
- return !0;
1807
- 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));
1808
- }
1809
- if (this.isTreeGrowing) {
1810
- if (this.growTreeIterations % 10 == 0)
1811
- if (this.prunedNodesAll.length > 0) {
1812
- this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1813
- var s = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(m) {
1814
- return s.has(m);
1815
- });
1816
- this.graphManager.setAllNodesToApplyGravitation(u), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = p.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1817
- } else
1818
- this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1819
- this.growTreeIterations++;
1820
- }
1821
- if (this.isGrowthFinished) {
1822
- if (this.isConverged())
1823
- return !0;
1824
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = p.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1825
- }
1826
- var c = !this.isTreeGrowing && !this.isGrowthFinished, A = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1827
- return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(c, A), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1828
- }, v.prototype.getPositionsData = function() {
1829
- for (var s = this.graphManager.getAllNodes(), u = {}, c = 0; c < s.length; c++) {
1830
- var A = s[c].rect, m = s[c].id;
1831
- u[m] = {
1832
- id: m,
1833
- x: A.getCenterX(),
1834
- y: A.getCenterY(),
1835
- w: A.width,
1836
- h: A.height
1837
- };
1838
- }
1839
- return u;
1840
- }, v.prototype.runSpringEmbedder = function() {
1841
- this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1842
- var s = !1;
1843
- if (p.ANIMATE === "during")
1844
- this.emit("layoutstarted");
1845
- else {
1846
- for (; !s; )
1847
- s = this.tick();
1848
- this.graphManager.updateBounds();
1849
- }
1850
- }, v.prototype.calculateNodesToApplyGravitationTo = function() {
1851
- var s = [], u, c = this.graphManager.getGraphs(), A = c.length, m;
1852
- for (m = 0; m < A; m++)
1853
- u = c[m], u.updateConnected(), u.isConnected || (s = s.concat(u.getNodes()));
1854
- return s;
1855
- }, v.prototype.createBendpoints = function() {
1856
- var s = [];
1857
- s = s.concat(this.graphManager.getAllEdges());
1858
- var u = /* @__PURE__ */ new Set(), c;
1859
- for (c = 0; c < s.length; c++) {
1860
- var A = s[c];
1861
- if (!u.has(A)) {
1862
- var m = A.getSource(), O = A.getTarget();
1863
- if (m == O)
1864
- A.getBendpoints().push(new g()), A.getBendpoints().push(new g()), this.createDummyNodesForBendpoints(A), u.add(A);
1865
- else {
1866
- var D = [];
1867
- if (D = D.concat(m.getEdgeListToNode(O)), D = D.concat(O.getEdgeListToNode(m)), !u.has(D[0])) {
1868
- if (D.length > 1) {
1869
- var w;
1870
- for (w = 0; w < D.length; w++) {
1871
- var M = D[w];
1872
- M.getBendpoints().push(new g()), this.createDummyNodesForBendpoints(M);
1873
- }
1874
- }
1875
- D.forEach(function(F) {
1876
- u.add(F);
1877
- });
1878
- }
1879
- }
1880
- }
1881
- if (u.size == s.length)
1882
- break;
1883
- }
1884
- }, v.prototype.positionNodesRadially = function(s) {
1885
- for (var u = new l(0, 0), c = Math.ceil(Math.sqrt(s.length)), A = 0, m = 0, O = 0, D = new g(0, 0), w = 0; w < s.length; w++) {
1886
- w % c == 0 && (O = 0, m = A, w != 0 && (m += o.DEFAULT_COMPONENT_SEPERATION), A = 0);
1887
- var M = s[w], F = f.findCenterOfTree(M);
1888
- u.x = O, u.y = m, D = v.radialLayout(M, F, u), D.y > A && (A = Math.floor(D.y)), O = Math.floor(D.x + o.DEFAULT_COMPONENT_SEPERATION);
1889
- }
1890
- this.transform(new g(r.WORLD_CENTER_X - D.x / 2, r.WORLD_CENTER_Y - D.y / 2));
1891
- }, v.radialLayout = function(s, u, c) {
1892
- var A = Math.max(this.maxDiagonalInTree(s), o.DEFAULT_RADIAL_SEPARATION);
1893
- v.branchRadialLayout(u, null, 0, 359, 0, A);
1894
- var m = d.calculateBounds(s), O = new N();
1895
- O.setDeviceOrgX(m.getMinX()), O.setDeviceOrgY(m.getMinY()), O.setWorldOrgX(c.x), O.setWorldOrgY(c.y);
1896
- for (var D = 0; D < s.length; D++) {
1897
- var w = s[D];
1898
- w.transform(O);
1899
- }
1900
- var M = new g(m.getMaxX(), m.getMaxY());
1901
- return O.inverseTransformPoint(M);
1902
- }, v.branchRadialLayout = function(s, u, c, A, m, O) {
1903
- var D = (A - c + 1) / 2;
1904
- D < 0 && (D += 180);
1905
- var w = (D + c) % 360, M = w * y.TWO_PI / 360, F = m * Math.cos(M), b = m * Math.sin(M);
1906
- s.setCenter(F, b);
1907
- var C = [];
1908
- C = C.concat(s.getEdges());
1909
- var R = C.length;
1910
- u != null && R--;
1911
- for (var G = 0, P = C.length, S, U = s.getEdgesBetween(u); U.length > 1; ) {
1912
- var Y = U[0];
1913
- U.splice(0, 1);
1914
- var B = C.indexOf(Y);
1915
- B >= 0 && C.splice(B, 1), P--, R--;
1916
- }
1917
- u != null ? S = (C.indexOf(U[0]) + 1) % P : S = 0;
1918
- for (var H = Math.abs(A - c) / R, k = S; G != R; k = ++k % P) {
1919
- var q = C[k].getOtherEnd(s);
1920
- if (q != u) {
1921
- var z = (c + G * H) % 360, ht = (z + H) % 360;
1922
- v.branchRadialLayout(q, s, z, ht, m + O, O), G++;
1923
- }
1924
- }
1925
- }, v.maxDiagonalInTree = function(s) {
1926
- for (var u = E.MIN_VALUE, c = 0; c < s.length; c++) {
1927
- var A = s[c], m = A.getDiagonal();
1928
- m > u && (u = m);
1929
- }
1930
- return u;
1931
- }, v.prototype.calcRepulsionRange = function() {
1932
- return 2 * (this.level + 1) * this.idealEdgeLength;
1933
- }, v.prototype.groupZeroDegreeMembers = function() {
1934
- var s = this, u = {};
1935
- this.memberGroups = {}, this.idToDummyNode = {};
1936
- for (var c = [], A = this.graphManager.getAllNodes(), m = 0; m < A.length; m++) {
1937
- var O = A[m], D = O.getParent();
1938
- this.getNodeDegreeWithChildren(O) === 0 && (D.id == null || !this.getToBeTiled(D)) && c.push(O);
1939
- }
1940
- for (var m = 0; m < c.length; m++) {
1941
- var O = c[m], w = O.getParent().id;
1942
- typeof u[w] > "u" && (u[w] = []), u[w] = u[w].concat(O);
1943
- }
1944
- Object.keys(u).forEach(function(M) {
1945
- if (u[M].length > 1) {
1946
- var F = "DummyCompound_" + M;
1947
- s.memberGroups[F] = u[M];
1948
- var b = u[M][0].getParent(), C = new h(s.graphManager);
1949
- C.id = F, C.paddingLeft = b.paddingLeft || 0, C.paddingRight = b.paddingRight || 0, C.paddingBottom = b.paddingBottom || 0, C.paddingTop = b.paddingTop || 0, s.idToDummyNode[F] = C;
1950
- var R = s.getGraphManager().add(s.newGraph(), C), G = b.getChild();
1951
- G.add(C);
1952
- for (var P = 0; P < u[M].length; P++) {
1953
- var S = u[M][P];
1954
- G.remove(S), R.add(S);
1955
- }
1956
- }
1957
- });
1958
- }, v.prototype.clearCompounds = function() {
1959
- var s = {}, u = {};
1960
- this.performDFSOnCompounds();
1961
- for (var c = 0; c < this.compoundOrder.length; c++)
1962
- u[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;
1963
- this.graphManager.resetAllNodes(), this.tileCompoundMembers(s, u);
1964
- }, v.prototype.clearZeroDegreeMembers = function() {
1965
- var s = this, u = this.tiledZeroDegreePack = [];
1966
- Object.keys(this.memberGroups).forEach(function(c) {
1967
- var A = s.idToDummyNode[c];
1968
- u[c] = s.tileNodes(s.memberGroups[c], A.paddingLeft + A.paddingRight), A.rect.width = u[c].width, A.rect.height = u[c].height;
1969
- });
1970
- }, v.prototype.repopulateCompounds = function() {
1971
- for (var s = this.compoundOrder.length - 1; s >= 0; s--) {
1972
- var u = this.compoundOrder[s], c = u.id, A = u.paddingLeft, m = u.paddingTop;
1973
- this.adjustLocations(this.tiledMemberPack[c], u.rect.x, u.rect.y, A, m);
1974
- }
1975
- }, v.prototype.repopulateZeroDegreeMembers = function() {
1976
- var s = this, u = this.tiledZeroDegreePack;
1977
- Object.keys(u).forEach(function(c) {
1978
- var A = s.idToDummyNode[c], m = A.paddingLeft, O = A.paddingTop;
1979
- s.adjustLocations(u[c], A.rect.x, A.rect.y, m, O);
1980
- });
1981
- }, v.prototype.getToBeTiled = function(s) {
1982
- var u = s.id;
1983
- if (this.toBeTiled[u] != null)
1984
- return this.toBeTiled[u];
1985
- var c = s.getChild();
1986
- if (c == null)
1987
- return this.toBeTiled[u] = !1, !1;
1988
- for (var A = c.getNodes(), m = 0; m < A.length; m++) {
1989
- var O = A[m];
1990
- if (this.getNodeDegree(O) > 0)
1991
- return this.toBeTiled[u] = !1, !1;
1992
- if (O.getChild() == null) {
1993
- this.toBeTiled[O.id] = !1;
1994
- continue;
1995
- }
1996
- if (!this.getToBeTiled(O))
1997
- return this.toBeTiled[u] = !1, !1;
1998
- }
1999
- return this.toBeTiled[u] = !0, !0;
2000
- }, v.prototype.getNodeDegree = function(s) {
2001
- s.id;
2002
- for (var u = s.getEdges(), c = 0, A = 0; A < u.length; A++) {
2003
- var m = u[A];
2004
- m.getSource().id !== m.getTarget().id && (c = c + 1);
2005
- }
2006
- return c;
2007
- }, v.prototype.getNodeDegreeWithChildren = function(s) {
2008
- var u = this.getNodeDegree(s);
2009
- if (s.getChild() == null)
2010
- return u;
2011
- for (var c = s.getChild().getNodes(), A = 0; A < c.length; A++) {
2012
- var m = c[A];
2013
- u += this.getNodeDegreeWithChildren(m);
2014
- }
2015
- return u;
2016
- }, v.prototype.performDFSOnCompounds = function() {
2017
- this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2018
- }, v.prototype.fillCompexOrderByDFS = function(s) {
2019
- for (var u = 0; u < s.length; u++) {
2020
- var c = s[u];
2021
- c.getChild() != null && this.fillCompexOrderByDFS(c.getChild().getNodes()), this.getToBeTiled(c) && this.compoundOrder.push(c);
2022
- }
2023
- }, v.prototype.adjustLocations = function(s, u, c, A, m) {
2024
- u += A, c += m;
2025
- for (var O = u, D = 0; D < s.rows.length; D++) {
2026
- var w = s.rows[D];
2027
- u = O;
2028
- for (var M = 0, F = 0; F < w.length; F++) {
2029
- var b = w[F];
2030
- b.rect.x = u, b.rect.y = c, u += b.rect.width + s.horizontalPadding, b.rect.height > M && (M = b.rect.height);
2031
- }
2032
- c += M + s.verticalPadding;
2033
- }
2034
- }, v.prototype.tileCompoundMembers = function(s, u) {
2035
- var c = this;
2036
- this.tiledMemberPack = [], Object.keys(s).forEach(function(A) {
2037
- var m = u[A];
2038
- c.tiledMemberPack[A] = c.tileNodes(s[A], m.paddingLeft + m.paddingRight), m.rect.width = c.tiledMemberPack[A].width, m.rect.height = c.tiledMemberPack[A].height;
2039
- });
2040
- }, v.prototype.tileNodes = function(s, u) {
2041
- var c = o.TILING_PADDING_VERTICAL, A = o.TILING_PADDING_HORIZONTAL, m = {
2042
- rows: [],
2043
- rowWidth: [],
2044
- rowHeight: [],
2045
- width: 0,
2046
- height: u,
2047
- // assume minHeight equals to minWidth
2048
- verticalPadding: c,
2049
- horizontalPadding: A
2050
- };
2051
- s.sort(function(w, M) {
2052
- return w.rect.width * w.rect.height > M.rect.width * M.rect.height ? -1 : w.rect.width * w.rect.height < M.rect.width * M.rect.height ? 1 : 0;
2053
- });
2054
- for (var O = 0; O < s.length; O++) {
2055
- var D = s[O];
2056
- m.rows.length == 0 ? this.insertNodeToRow(m, D, 0, u) : this.canAddHorizontal(m, D.rect.width, D.rect.height) ? this.insertNodeToRow(m, D, this.getShortestRowIndex(m), u) : this.insertNodeToRow(m, D, m.rows.length, u), this.shiftToLastRow(m);
2057
- }
2058
- return m;
2059
- }, v.prototype.insertNodeToRow = function(s, u, c, A) {
2060
- var m = A;
2061
- if (c == s.rows.length) {
2062
- var O = [];
2063
- s.rows.push(O), s.rowWidth.push(m), s.rowHeight.push(0);
2064
- }
2065
- var D = s.rowWidth[c] + u.rect.width;
2066
- s.rows[c].length > 0 && (D += s.horizontalPadding), s.rowWidth[c] = D, s.width < D && (s.width = D);
2067
- var w = u.rect.height;
2068
- c > 0 && (w += s.verticalPadding);
2069
- var M = 0;
2070
- w > s.rowHeight[c] && (M = s.rowHeight[c], s.rowHeight[c] = w, M = s.rowHeight[c] - M), s.height += M, s.rows[c].push(u);
2071
- }, v.prototype.getShortestRowIndex = function(s) {
2072
- for (var u = -1, c = Number.MAX_VALUE, A = 0; A < s.rows.length; A++)
2073
- s.rowWidth[A] < c && (u = A, c = s.rowWidth[A]);
2074
- return u;
2075
- }, v.prototype.getLongestRowIndex = function(s) {
2076
- for (var u = -1, c = Number.MIN_VALUE, A = 0; A < s.rows.length; A++)
2077
- s.rowWidth[A] > c && (u = A, c = s.rowWidth[A]);
2078
- return u;
2079
- }, v.prototype.canAddHorizontal = function(s, u, c) {
2080
- var A = this.getShortestRowIndex(s);
2081
- if (A < 0)
2082
- return !0;
2083
- var m = s.rowWidth[A];
2084
- if (m + s.horizontalPadding + u <= s.width)
2085
- return !0;
2086
- var O = 0;
2087
- s.rowHeight[A] < c && A > 0 && (O = c + s.verticalPadding - s.rowHeight[A]);
2088
- var D;
2089
- s.width - m >= u + s.horizontalPadding ? D = (s.height + O) / (m + u + s.horizontalPadding) : D = (s.height + O) / s.width, O = c + s.verticalPadding;
2090
- var w;
2091
- return s.width < u ? w = (s.height + O) / u : w = (s.height + O) / s.width, w < 1 && (w = 1 / w), D < 1 && (D = 1 / D), D < w;
2092
- }, v.prototype.shiftToLastRow = function(s) {
2093
- var u = this.getLongestRowIndex(s), c = s.rowWidth.length - 1, A = s.rows[u], m = A[A.length - 1], O = m.width + s.horizontalPadding;
2094
- if (s.width - s.rowWidth[c] > O && u != c) {
2095
- A.splice(-1, 1), s.rows[c].push(m), s.rowWidth[u] = s.rowWidth[u] - O, s.rowWidth[c] = s.rowWidth[c] + O, s.width = s.rowWidth[instance.getLongestRowIndex(s)];
2096
- for (var D = Number.MIN_VALUE, w = 0; w < A.length; w++)
2097
- A[w].height > D && (D = A[w].height);
2098
- u > 0 && (D += s.verticalPadding);
2099
- var M = s.rowHeight[u] + s.rowHeight[c];
2100
- s.rowHeight[u] = D, s.rowHeight[c] < m.height + s.verticalPadding && (s.rowHeight[c] = m.height + s.verticalPadding);
2101
- var F = s.rowHeight[u] + s.rowHeight[c];
2102
- s.height += F - M, this.shiftToLastRow(s);
2103
- }
2104
- }, v.prototype.tilingPreLayout = function() {
2105
- o.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2106
- }, v.prototype.tilingPostLayout = function() {
2107
- o.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2108
- }, v.prototype.reduceTrees = function() {
2109
- for (var s = [], u = !0, c; u; ) {
2110
- var A = this.graphManager.getAllNodes(), m = [];
2111
- u = !1;
2112
- for (var O = 0; O < A.length; O++)
2113
- c = A[O], c.getEdges().length == 1 && !c.getEdges()[0].isInterGraph && c.getChild() == null && (m.push([c, c.getEdges()[0], c.getOwner()]), u = !0);
2114
- if (u == !0) {
2115
- for (var D = [], w = 0; w < m.length; w++)
2116
- m[w][0].getEdges().length == 1 && (D.push(m[w]), m[w][0].getOwner().remove(m[w][0]));
2117
- s.push(D), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2118
- }
2119
- }
2120
- this.prunedNodesAll = s;
2121
- }, v.prototype.growTree = function(s) {
2122
- for (var u = s.length, c = s[u - 1], A, m = 0; m < c.length; m++)
2123
- A = c[m], this.findPlaceforPrunedNode(A), A[2].add(A[0]), A[2].add(A[1], A[1].source, A[1].target);
2124
- s.splice(s.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2125
- }, v.prototype.findPlaceforPrunedNode = function(s) {
2126
- var u, c, A = s[0];
2127
- A == s[1].source ? c = s[1].target : c = s[1].source;
2128
- var m = c.startX, O = c.finishX, D = c.startY, w = c.finishY, M = 0, F = 0, b = 0, C = 0, R = [M, b, F, C];
2129
- if (D > 0)
2130
- for (var G = m; G <= O; G++)
2131
- R[0] += this.grid[G][D - 1].length + this.grid[G][D].length - 1;
2132
- if (O < this.grid.length - 1)
2133
- for (var G = D; G <= w; G++)
2134
- R[1] += this.grid[O + 1][G].length + this.grid[O][G].length - 1;
2135
- if (w < this.grid[0].length - 1)
2136
- for (var G = m; G <= O; G++)
2137
- R[2] += this.grid[G][w + 1].length + this.grid[G][w].length - 1;
2138
- if (m > 0)
2139
- for (var G = D; G <= w; G++)
2140
- R[3] += this.grid[m - 1][G].length + this.grid[m][G].length - 1;
2141
- for (var P = E.MAX_VALUE, S, U, Y = 0; Y < R.length; Y++)
2142
- R[Y] < P ? (P = R[Y], S = 1, U = Y) : R[Y] == P && S++;
2143
- if (S == 3 && P == 0)
2144
- R[0] == 0 && R[1] == 0 && R[2] == 0 ? u = 1 : R[0] == 0 && R[1] == 0 && R[3] == 0 ? u = 0 : R[0] == 0 && R[2] == 0 && R[3] == 0 ? u = 3 : R[1] == 0 && R[2] == 0 && R[3] == 0 && (u = 2);
2145
- else if (S == 2 && P == 0) {
2146
- var B = Math.floor(Math.random() * 2);
2147
- R[0] == 0 && R[1] == 0 ? B == 0 ? u = 0 : u = 1 : R[0] == 0 && R[2] == 0 ? B == 0 ? u = 0 : u = 2 : R[0] == 0 && R[3] == 0 ? B == 0 ? u = 0 : u = 3 : R[1] == 0 && R[2] == 0 ? B == 0 ? u = 1 : u = 2 : R[1] == 0 && R[3] == 0 ? B == 0 ? u = 1 : u = 3 : B == 0 ? u = 2 : u = 3;
2148
- } else if (S == 4 && P == 0) {
2149
- var B = Math.floor(Math.random() * 4);
2150
- u = B;
2151
- } else
2152
- u = U;
2153
- u == 0 ? A.setCenter(c.getCenterX(), c.getCenterY() - c.getHeight() / 2 - p.DEFAULT_EDGE_LENGTH - A.getHeight() / 2) : u == 1 ? A.setCenter(c.getCenterX() + c.getWidth() / 2 + p.DEFAULT_EDGE_LENGTH + A.getWidth() / 2, c.getCenterY()) : u == 2 ? A.setCenter(c.getCenterX(), c.getCenterY() + c.getHeight() / 2 + p.DEFAULT_EDGE_LENGTH + A.getHeight() / 2) : A.setCenter(c.getCenterX() - c.getWidth() / 2 - p.DEFAULT_EDGE_LENGTH - A.getWidth() / 2, c.getCenterY());
2154
- }, I.exports = v;
2155
- },
2156
- /* 7 */
2157
- /***/
2158
- function(I, T, n) {
2159
- var e = {};
2160
- e.layoutBase = n(0), e.CoSEConstants = n(1), e.CoSEEdge = n(2), e.CoSEGraph = n(3), e.CoSEGraphManager = n(4), e.CoSELayout = n(6), e.CoSENode = n(5), I.exports = e;
2161
- }
2162
- /******/
2163
- ])
2164
- );
2165
- });
2166
- }(Z)), Z.exports;
2167
- }
2168
- (function(x, X) {
2169
- (function(_, I) {
2170
- x.exports = I(ct());
2171
- })(j, function(_) {
2172
- return (
2173
- /******/
2174
- function(I) {
2175
- var T = {};
2176
- function n(e) {
2177
- if (T[e])
2178
- return T[e].exports;
2179
- var t = T[e] = {
2180
- /******/
2181
- i: e,
2182
- /******/
2183
- l: !1,
2184
- /******/
2185
- exports: {}
2186
- /******/
2187
- };
2188
- return I[e].call(t.exports, t, t.exports, n), t.l = !0, t.exports;
2189
- }
2190
- return n.m = I, n.c = T, n.i = function(e) {
2191
- return e;
2192
- }, n.d = function(e, t, i) {
2193
- n.o(e, t) || Object.defineProperty(e, t, {
2194
- /******/
2195
- configurable: !1,
2196
- /******/
2197
- enumerable: !0,
2198
- /******/
2199
- get: i
2200
- /******/
2201
- });
2202
- }, n.n = function(e) {
2203
- var t = e && e.__esModule ? (
2204
- /******/
2205
- function() {
2206
- return e.default;
2207
- }
2208
- ) : (
2209
- /******/
2210
- function() {
2211
- return e;
2212
- }
2213
- );
2214
- return n.d(t, "a", t), t;
2215
- }, n.o = function(e, t) {
2216
- return Object.prototype.hasOwnProperty.call(e, t);
2217
- }, n.p = "", n(n.s = 1);
2218
- }([
2219
- /* 0 */
2220
- /***/
2221
- function(I, T) {
2222
- I.exports = _;
2223
- },
2224
- /* 1 */
2225
- /***/
2226
- function(I, T, n) {
2227
- var e = n(0).layoutBase.LayoutConstants, t = n(0).layoutBase.FDLayoutConstants, i = n(0).CoSEConstants, h = n(0).CoSELayout, a = n(0).CoSENode, o = n(0).layoutBase.PointD, p = n(0).layoutBase.DimensionD, r = {
2228
- // Called on `layoutready`
2229
- ready: function() {
2230
- },
2231
- // Called on `layoutstop`
2232
- stop: function() {
2233
- },
2234
- // 'draft', 'default' or 'proof"
2235
- // - 'draft' fast cooling rate
2236
- // - 'default' moderate cooling rate
2237
- // - "proof" slow cooling rate
2238
- quality: "default",
2239
- // include labels in node dimensions
2240
- nodeDimensionsIncludeLabels: !1,
2241
- // number of ticks per frame; higher is faster but more jerky
2242
- refresh: 30,
2243
- // Whether to fit the network view after when done
2244
- fit: !0,
2245
- // Padding on fit
2246
- padding: 10,
2247
- // Whether to enable incremental mode
2248
- randomize: !0,
2249
- // Node repulsion (non overlapping) multiplier
2250
- nodeRepulsion: 4500,
2251
- // Ideal edge (non nested) length
2252
- idealEdgeLength: 50,
2253
- // Divisor to compute edge forces
2254
- edgeElasticity: 0.45,
2255
- // Nesting factor (multiplier) to compute ideal edge length for nested edges
2256
- nestingFactor: 0.1,
2257
- // Gravity force (constant)
2258
- gravity: 0.25,
2259
- // Maximum number of iterations to perform
2260
- numIter: 2500,
2261
- // For enabling tiling
2262
- tile: !0,
2263
- // Type of layout animation. The option set is {'during', 'end', false}
2264
- animate: "end",
2265
- // Duration for animate:end
2266
- animationDuration: 500,
2267
- // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2268
- tilingPaddingVertical: 10,
2269
- // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2270
- tilingPaddingHorizontal: 10,
2271
- // Gravity range (constant) for compounds
2272
- gravityRangeCompound: 1.5,
2273
- // Gravity force (constant) for compounds
2274
- gravityCompound: 1,
2275
- // Gravity range (constant)
2276
- gravityRange: 3.8,
2277
- // Initial cooling factor for incremental layout
2278
- initialEnergyOnIncremental: 0.5
2279
- };
2280
- function l(y, d) {
2281
- var N = {};
2282
- for (var v in y)
2283
- N[v] = y[v];
2284
- for (var v in d)
2285
- N[v] = d[v];
2286
- return N;
2287
- }
2288
- function g(y) {
2289
- this.options = l(r, y), f(this.options);
2290
- }
2291
- var f = function(y) {
2292
- y.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = t.DEFAULT_REPULSION_STRENGTH = y.nodeRepulsion), y.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = t.DEFAULT_EDGE_LENGTH = y.idealEdgeLength), y.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = t.DEFAULT_SPRING_STRENGTH = y.edgeElasticity), y.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = y.nestingFactor), y.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = t.DEFAULT_GRAVITY_STRENGTH = y.gravity), y.numIter != null && (i.MAX_ITERATIONS = t.MAX_ITERATIONS = y.numIter), y.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = t.DEFAULT_GRAVITY_RANGE_FACTOR = y.gravityRange), y.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = y.gravityCompound), y.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = y.gravityRangeCompound), y.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = t.DEFAULT_COOLING_FACTOR_INCREMENTAL = y.initialEnergyOnIncremental), y.quality == "draft" ? e.QUALITY = 0 : y.quality == "proof" ? e.QUALITY = 2 : e.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = y.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = !y.randomize, i.ANIMATE = t.ANIMATE = e.ANIMATE = y.animate, i.TILE = y.tile, i.TILING_PADDING_VERTICAL = typeof y.tilingPaddingVertical == "function" ? y.tilingPaddingVertical.call() : y.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof y.tilingPaddingHorizontal == "function" ? y.tilingPaddingHorizontal.call() : y.tilingPaddingHorizontal;
2293
- };
2294
- g.prototype.run = function() {
2295
- var y, d, N = this.options;
2296
- this.idToLNode = {};
2297
- var v = this.layout = new h(), L = this;
2298
- L.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2299
- var s = v.newGraphManager();
2300
- this.gm = s;
2301
- var u = this.options.eles.nodes(), c = this.options.eles.edges();
2302
- this.root = s.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(u), v);
2303
- for (var A = 0; A < c.length; A++) {
2304
- var m = c[A], O = this.idToLNode[m.data("source")], D = this.idToLNode[m.data("target")];
2305
- if (O !== D && O.getEdgesBetween(D).length == 0) {
2306
- var w = s.add(v.newEdge(), O, D);
2307
- w.id = m.id();
2308
- }
2309
- }
2310
- var M = function(b, C) {
2311
- typeof b == "number" && (b = C);
2312
- var R = b.data("id"), G = L.idToLNode[R];
2313
- return {
2314
- x: G.getRect().getCenterX(),
2315
- y: G.getRect().getCenterY()
2316
- };
2317
- }, F = function b() {
2318
- for (var C = function() {
2319
- N.fit && N.cy.fit(N.eles, N.padding), y || (y = !0, L.cy.one("layoutready", N.ready), L.cy.trigger({ type: "layoutready", layout: L }));
2320
- }, R = L.options.refresh, G, P = 0; P < R && !G; P++)
2321
- G = L.stopped || L.layout.tick();
2322
- if (G) {
2323
- v.checkLayoutSuccess() && !v.isSubLayout && v.doPostLayout(), v.tilingPostLayout && v.tilingPostLayout(), v.isLayoutFinished = !0, L.options.eles.nodes().positions(M), C(), L.cy.one("layoutstop", L.options.stop), L.cy.trigger({ type: "layoutstop", layout: L }), d && cancelAnimationFrame(d), y = !1;
2324
- return;
2325
- }
2326
- var S = L.layout.getPositionsData();
2327
- N.eles.nodes().positions(function(U, Y) {
2328
- if (typeof U == "number" && (U = Y), !U.isParent()) {
2329
- for (var B = U.id(), H = S[B], k = U; H == null && (H = S[k.data("parent")] || S["DummyCompound_" + k.data("parent")], S[B] = H, k = k.parent()[0], k != null); )
2330
- ;
2331
- return H != null ? {
2332
- x: H.x,
2333
- y: H.y
2334
- } : {
2335
- x: U.position("x"),
2336
- y: U.position("y")
2337
- };
2338
- }
2339
- }), C(), d = requestAnimationFrame(b);
2340
- };
2341
- return v.addListener("layoutstarted", function() {
2342
- L.options.animate === "during" && (d = requestAnimationFrame(F));
2343
- }), v.runLayout(), this.options.animate !== "during" && (L.options.eles.nodes().not(":parent").layoutPositions(L, L.options, M), y = !1), this;
2344
- }, g.prototype.getTopMostNodes = function(y) {
2345
- for (var d = {}, N = 0; N < y.length; N++)
2346
- d[y[N].id()] = !0;
2347
- var v = y.filter(function(L, s) {
2348
- typeof L == "number" && (L = s);
2349
- for (var u = L.parent()[0]; u != null; ) {
2350
- if (d[u.id()])
2351
- return !1;
2352
- u = u.parent()[0];
2353
- }
2354
- return !0;
2355
- });
2356
- return v;
2357
- }, g.prototype.processChildrenList = function(y, d, N) {
2358
- for (var v = d.length, L = 0; L < v; L++) {
2359
- var s = d[L], u = s.children(), c, A = s.layoutDimensions({
2360
- nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2361
- });
2362
- if (s.outerWidth() != null && s.outerHeight() != null ? c = y.add(new a(N.graphManager, new o(s.position("x") - A.w / 2, s.position("y") - A.h / 2), new p(parseFloat(A.w), parseFloat(A.h)))) : c = y.add(new a(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()) {
2363
- var m = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, O = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, D = s.css("text-halign");
2364
- c.labelWidth = m, c.labelHeight = O, c.labelPos = D;
2365
- }
2366
- if (this.idToLNode[s.data("id")] = c, isNaN(c.rect.x) && (c.rect.x = 0), isNaN(c.rect.y) && (c.rect.y = 0), u != null && u.length > 0) {
2367
- var w;
2368
- w = N.getGraphManager().add(N.newGraph(), c), this.processChildrenList(w, u, N);
2369
- }
2370
- }
2371
- }, g.prototype.stop = function() {
2372
- return this.stopped = !0, this;
2373
- };
2374
- var E = function(y) {
2375
- y("layout", "cose-bilkent", g);
2376
- };
2377
- typeof cytoscape < "u" && E(cytoscape), I.exports = E;
2378
- }
2379
- /******/
2380
- ])
2381
- );
2382
- });
2383
- })(tt);
2384
- var dt = tt.exports;
2385
- const pt = /* @__PURE__ */ lt(dt);
2386
- J.use(pt);
2387
- function et(x, X) {
2388
- x.forEach((_) => {
2389
- const I = {
2390
- id: _.id,
2391
- labelText: _.label,
2392
- height: _.height,
2393
- width: _.width,
2394
- padding: _.padding ?? 0
2395
- };
2396
- Object.keys(_).forEach((T) => {
2397
- ["id", "label", "height", "width", "padding", "x", "y"].includes(T) || (I[T] = _[T]);
2398
- }), X.add({
2399
- group: "nodes",
2400
- data: I,
2401
- position: {
2402
- x: _.x ?? 0,
2403
- y: _.y ?? 0
2404
- }
2405
- });
2406
- });
2407
- }
2408
- W(et, "addNodes");
2409
- function it(x, X) {
2410
- x.forEach((_) => {
2411
- const I = {
2412
- id: _.id,
2413
- source: _.start,
2414
- target: _.end
2415
- };
2416
- Object.keys(_).forEach((T) => {
2417
- ["id", "start", "end"].includes(T) || (I[T] = _[T]);
2418
- }), X.add({
2419
- group: "edges",
2420
- data: I
2421
- });
2422
- });
2423
- }
2424
- W(it, "addEdges");
2425
- function rt(x) {
2426
- return new Promise((X) => {
2427
- const _ = gt("body").append("div").attr("id", "cy").attr("style", "display:none"), I = J({
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
- _.remove(), et(x.nodes, I), it(x.edges, I), I.nodes().forEach(function(n) {
2440
- n.layoutDimensions = () => {
2441
- const e = n.data();
2442
- return { w: e.width, h: e.height };
2443
- };
2444
- });
2445
- const T = {
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(T).run(), I.ready((n) => {
2453
- V.info("Cytoscape ready", n), X(I);
2454
- });
2455
- });
2456
- }
2457
- W(rt, "createCytoscapeInstance");
2458
- function nt(x) {
2459
- return x.nodes().map((X) => {
2460
- const _ = X.data(), I = X.position(), T = {
2461
- id: _.id,
2462
- x: I.x,
2463
- y: I.y
2464
- };
2465
- return Object.keys(_).forEach((n) => {
2466
- n !== "id" && (T[n] = _[n]);
2467
- }), T;
2468
- });
2469
- }
2470
- W(nt, "extractPositionedNodes");
2471
- function ot(x) {
2472
- return x.edges().map((X) => {
2473
- const _ = X.data(), I = X._private.rscratch, T = {
2474
- id: _.id,
2475
- source: _.source,
2476
- target: _.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(_).forEach((n) => {
2485
- ["id", "source", "target"].includes(n) || (T[n] = _[n]);
2486
- }), T;
2487
- });
2488
- }
2489
- W(ot, "extractPositionedEdges");
2490
- async function st(x, X) {
2491
- V.debug("Starting cose-bilkent layout algorithm");
2492
- try {
2493
- at(x);
2494
- const _ = await rt(x), I = nt(_), T = ot(_);
2495
- return V.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`), {
2496
- nodes: I,
2497
- edges: T
2498
- };
2499
- } catch (_) {
2500
- throw V.error("Error in cose-bilkent layout algorithm:", _), _;
2501
- }
2502
- }
2503
- W(st, "executeCoseBilkentLayout");
2504
- function at(x) {
2505
- if (!x)
2506
- throw new Error("Layout data is required");
2507
- if (!x.config)
2508
- throw new Error("Configuration is required in layout data");
2509
- if (!x.rootNode)
2510
- throw new Error("Root node is required");
2511
- if (!x.nodes || !Array.isArray(x.nodes))
2512
- throw new Error("No nodes found in layout data");
2513
- if (!Array.isArray(x.edges))
2514
- throw new Error("Edges array is required in layout data");
2515
- return !0;
2516
- }
2517
- W(at, "validateLayoutData");
2518
- var ft = /* @__PURE__ */ W(async (x, X, {
2519
- insertCluster: _,
2520
- insertEdge: I,
2521
- insertEdgeLabel: T,
2522
- insertMarkers: n,
2523
- insertNode: e,
2524
- log: t,
2525
- positionEdgeLabel: i
2526
- }, { algorithm: h }) => {
2527
- const a = {}, o = {}, p = X.select("g");
2528
- n(p, x.markers, x.type, x.diagramId);
2529
- const r = p.insert("g").attr("class", "subgraphs"), l = p.insert("g").attr("class", "edgePaths"), g = p.insert("g").attr("class", "edgeLabels"), f = p.insert("g").attr("class", "nodes");
2530
- t.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(
2531
- x.nodes.map(async (d) => {
2532
- if (d.isGroup) {
2533
- const N = { ...d };
2534
- o[d.id] = N, a[d.id] = N, await _(r, d);
2535
- } else {
2536
- const N = { ...d };
2537
- a[d.id] = N;
2538
- const v = await e(f, d, {
2539
- config: x.config,
2540
- dir: x.direction || "TB"
2541
- }), L = v.node().getBBox();
2542
- N.width = L.width, N.height = L.height, N.domId = v, t.debug(`Node ${d.id} dimensions: ${L.width}x${L.height}`);
2543
- }
2544
- })
2545
- ), t.debug("Running cose-bilkent layout algorithm");
2546
- const E = {
2547
- ...x,
2548
- nodes: x.nodes.map((d) => {
2549
- const N = a[d.id];
2550
- return {
2551
- ...d,
2552
- width: N.width,
2553
- height: N.height
2554
- };
2555
- })
2556
- }, y = await st(E, x.config);
2557
- t.debug("Positioning nodes based on layout results"), y.nodes.forEach((d) => {
2558
- const N = a[d.id];
2559
- N != null && N.domId && (N.domId.attr(
2560
- "transform",
2561
- `translate(${d.x}, ${d.y})`
2562
- ), N.x = d.x, N.y = d.y, t.debug(`Positioned node ${N.id} at center (${d.x}, ${d.y})`));
2563
- }), y.edges.forEach((d) => {
2564
- const N = x.edges.find((v) => v.id === d.id);
2565
- N && (N.points = [
2566
- { x: d.startX, y: d.startY },
2567
- { x: d.midX, y: d.midY },
2568
- { x: d.endX, y: d.endY }
2569
- ]);
2570
- }), t.debug("Inserting and positioning edges"), await Promise.all(
2571
- x.edges.map(async (d) => {
2572
- await T(g, d);
2573
- const N = a[d.start ?? ""], v = a[d.end ?? ""];
2574
- if (N && v) {
2575
- const L = y.edges.find((s) => s.id === d.id);
2576
- if (L) {
2577
- t.debug("APA01 positionedEdge", L);
2578
- const s = { ...d }, u = I(
2579
- l,
2580
- s,
2581
- o,
2582
- x.type,
2583
- N,
2584
- v,
2585
- x.diagramId
2586
- );
2587
- i(s, u);
2588
- } else {
2589
- const s = {
2590
- ...d,
2591
- points: [
2592
- { x: N.x || 0, y: N.y || 0 },
2593
- { x: v.x || 0, y: v.y || 0 }
2594
- ]
2595
- }, u = I(
2596
- l,
2597
- s,
2598
- o,
2599
- x.type,
2600
- N,
2601
- v,
2602
- x.diagramId
2603
- );
2604
- i(s, u);
2605
- }
2606
- }
2607
- })
2608
- ), t.debug("Cose-bilkent rendering completed");
2609
- }, "render"), Tt = ft;
2610
- export {
2611
- Tt as render
2612
- };