@automattic/agenttic-ui 0.1.11 → 0.1.12

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 (343) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2037 -41
  5. package/package.json +2 -5
  6. package/dist/_basePickBy-Co6w2C-t.js +0 -151
  7. package/dist/_baseUniq-BbhifY2s.js +0 -614
  8. package/dist/abap-Y8Dl9g_6.js +0 -6
  9. package/dist/actionscript-3-DZzbMeqX.js +0 -6
  10. package/dist/ada-vP6ak0IW.js +0 -6
  11. package/dist/andromeeda-uXNdzNpk.js +0 -4
  12. package/dist/angular-html-BmadGEgW.js +0 -32
  13. package/dist/angular-ts-D-QQnnGT.js +0 -21
  14. package/dist/apache-BUjz-sD2.js +0 -6
  15. package/dist/apex-D_wPycVx.js +0 -6
  16. package/dist/apl-sitt7C8I.js +0 -16
  17. package/dist/applescript-BPx7YFFu.js +0 -6
  18. package/dist/ara-Z2fSOxSw.js +0 -6
  19. package/dist/arc-DMQNivgh.js +0 -83
  20. package/dist/architecture-O4VJ6CD3-CrsUkgBe.js +0 -5
  21. package/dist/architectureDiagram-KFL7JDKH-BCeU_Tkj.js +0 -4665
  22. package/dist/asciidoc-B-pCoB3G.js +0 -6
  23. package/dist/asm-BTWLY5ym.js +0 -6
  24. package/dist/astro-DHnp0xIo.js +0 -18
  25. package/dist/aurora-x-BwoVEUWZ.js +0 -4
  26. package/dist/awk-Fb0P9dkn.js +0 -6
  27. package/dist/ayu-dark-CxPZkpb2.js +0 -4
  28. package/dist/ballerina-oZK-YekG.js +0 -6
  29. package/dist/bat-0FvbqU9S.js +0 -6
  30. package/dist/beancount-DEfTbbFX.js +0 -6
  31. package/dist/berry-PwsHPR_K.js +0 -6
  32. package/dist/bibtex-EULQRLY5.js +0 -6
  33. package/dist/bicep-DFU2oTl7.js +0 -6
  34. package/dist/blade-OPzGcV14.js +0 -20
  35. package/dist/blockDiagram-ZYB65J3Q-eNfG2owp.js +0 -2265
  36. package/dist/bsl-NkNNwerW.js +0 -8
  37. package/dist/c-eeMepfLm.js +0 -6
  38. package/dist/c4Diagram-AAMF2YG6-CEVcZg_d.js +0 -1581
  39. package/dist/cadence-DMRWHJp4.js +0 -6
  40. package/dist/cairo-DM6WF2e3.js +0 -8
  41. package/dist/catppuccin-frappe-DlGpEc12.js +0 -4
  42. package/dist/catppuccin-latte-DDI4I_Rd.js +0 -4
  43. package/dist/catppuccin-macchiato-BBzuZG5U.js +0 -4
  44. package/dist/catppuccin-mocha-CwrFPXRy.js +0 -4
  45. package/dist/channel-DwkBtswx.js +0 -5
  46. package/dist/chunk-ANTBXLJU-DjsG4Faa.js +0 -9
  47. package/dist/chunk-FHKO5MBM-DvgpKHah.js +0 -15
  48. package/dist/chunk-GLLZNHP4-BS9MWsNn.js +0 -19
  49. package/dist/chunk-JBRWN2VN-BB1oFn95.js +0 -1376
  50. package/dist/chunk-LXBSTHXV-DoWWvL-R.js +0 -1382
  51. package/dist/chunk-NRVI72HA-CN8BG5Yn.js +0 -20
  52. package/dist/chunk-OMD6QJNC-D7UKmZm8.js +0 -64
  53. package/dist/chunk-WVR4S24B-D3bw0yi4.js +0 -8
  54. package/dist/clarity-BseSxcHx.js +0 -6
  55. package/dist/classDiagram-3BZAVTQC-DhpbenB7.js +0 -16
  56. package/dist/classDiagram-v2-QTMF73CY-DhpbenB7.js +0 -16
  57. package/dist/clojure-CXJfHrL3.js +0 -6
  58. package/dist/clone-DmrWxu_i.js +0 -8
  59. package/dist/cmake-BJz8BOTU.js +0 -6
  60. package/dist/cobol-4A8XjHhj.js +0 -10
  61. package/dist/codeowners-Bt9yU6NX.js +0 -6
  62. package/dist/codeql-DHkodjjI.js +0 -6
  63. package/dist/coffee-Dl27lzbd.js +0 -8
  64. package/dist/common-lisp-EVqT9Zhp.js +0 -6
  65. package/dist/coq-B0L9upzn.js +0 -6
  66. package/dist/cpp-Cj177cuW.js +0 -18
  67. package/dist/crystal-ymVvJzbZ.js +0 -18
  68. package/dist/csharp-DmxfTLWR.js +0 -6
  69. package/dist/css-CECN5uSL.js +0 -6
  70. package/dist/csv-CmYOceLb.js +0 -6
  71. package/dist/cue-ZzumE7IT.js +0 -6
  72. package/dist/cypher-jpdmjtA6.js +0 -6
  73. package/dist/cytoscape.esm-ZmItrg9y.js +0 -18731
  74. package/dist/d-CBagWSwH.js +0 -6
  75. package/dist/dagre-2BBEFEWP-DWbEdWsD.js +0 -447
  76. package/dist/dark-plus-pUHDTVV0.js +0 -4
  77. package/dist/dart-6ObCrKr9.js +0 -6
  78. package/dist/dax-CcDT-8dH.js +0 -6
  79. package/dist/defaultLocale-D7EN2tov.js +0 -171
  80. package/dist/desktop-B93p9R9O.js +0 -6
  81. package/dist/diagram-4IRLE6MV-Q8q6qm5n.js +0 -534
  82. package/dist/diagram-GUPCWM2R-B8VhFieT.js +0 -143
  83. package/dist/diagram-RP2FKANI-CYWUKKLB.js +0 -221
  84. package/dist/diff-BxzP2J8R.js +0 -6
  85. package/dist/docker-CsHqm9tx.js +0 -6
  86. package/dist/dotenv-BMjVjUL1.js +0 -6
  87. package/dist/dracula-BtZx2Kac.js +0 -4
  88. package/dist/dracula-soft-BKa-aqBv.js +0 -4
  89. package/dist/dream-maker-PAx17jaB.js +0 -6
  90. package/dist/edge-_LvgTcmu.js +0 -12
  91. package/dist/elixir-BTCUAmQk.js +0 -8
  92. package/dist/elm-BtNbw_Cd.js +0 -8
  93. package/dist/emacs-lisp-Cfxdx5D-.js +0 -6
  94. package/dist/erDiagram-HZWUO2LU-CC0RhTpv.js +0 -842
  95. package/dist/erb-D0PIpZCP.js +0 -10
  96. package/dist/erlang-xM7DPKQj.js +0 -8
  97. package/dist/everforest-dark-DMCBqXCK.js +0 -4
  98. package/dist/everforest-light-BbXl82Em.js +0 -4
  99. package/dist/fennel-N4WcXuKx.js +0 -6
  100. package/dist/fish-B6QqlqeT.js +0 -6
  101. package/dist/flowDiagram-THRYKUMA-B00E_hY6.js +0 -1627
  102. package/dist/fluent-BMXUxfv1.js +0 -6
  103. package/dist/fortran-fixed-form-DUsA-VGo.js +0 -8
  104. package/dist/fortran-free-form-DPIT_jbP.js +0 -6
  105. package/dist/fsharp-BTdsmEUN.js +0 -8
  106. package/dist/ganttDiagram-WV7ZQ7D5-Cv2vsghm.js +0 -2499
  107. package/dist/gdresource-DLfsylRW.js +0 -10
  108. package/dist/gdscript-9lm8qppb.js +0 -6
  109. package/dist/gdshader-Bk8fF6yr.js +0 -6
  110. package/dist/genie-DzUvd7U9.js +0 -6
  111. package/dist/gherkin-DHRaV0YP.js +0 -6
  112. package/dist/git-commit-Bd32YZ0K.js +0 -8
  113. package/dist/git-rebase-ZWUFO_T4.js +0 -8
  114. package/dist/gitGraph-ZV4HHKMB-Bj31zYat.js +0 -5
  115. package/dist/gitGraphDiagram-OJR772UL-BGrYC5q0.js +0 -712
  116. package/dist/github-dark-DenFmJkN.js +0 -4
  117. package/dist/github-dark-default-BJPUVz4H.js +0 -4
  118. package/dist/github-dark-dimmed-DUshB20C.js +0 -4
  119. package/dist/github-dark-high-contrast-D3aGCnF8.js +0 -4
  120. package/dist/github-light-JYsPkUQd.js +0 -4
  121. package/dist/github-light-default-D99KPAby.js +0 -4
  122. package/dist/github-light-high-contrast-BbmZE-Mp.js +0 -4
  123. package/dist/gleam-Bv284lvN.js +0 -6
  124. package/dist/glimmer-js-CkxRszZZ.js +0 -14
  125. package/dist/glimmer-ts-Bi6BYQCn.js +0 -14
  126. package/dist/glsl-CkUcVZNK.js +0 -8
  127. package/dist/gnuplot-yPG9-sE_.js +0 -6
  128. package/dist/go-ChxJuLYK.js +0 -6
  129. package/dist/graph-DaSuptw6.js +0 -247
  130. package/dist/graphql-BLaPX4fU.js +0 -14
  131. package/dist/groovy-CJQTphOW.js +0 -6
  132. package/dist/gruvbox-dark-hard-C2ND4cMr.js +0 -4
  133. package/dist/gruvbox-dark-medium-C8k4c8au.js +0 -4
  134. package/dist/gruvbox-dark-soft-xx9Q6FaG.js +0 -4
  135. package/dist/gruvbox-light-hard-BpUXv5in.js +0 -4
  136. package/dist/gruvbox-light-medium-D3XFCoU1.js +0 -4
  137. package/dist/gruvbox-light-soft-u7hpfz6Z.js +0 -4
  138. package/dist/hack-Bx1jMtBC.js +0 -10
  139. package/dist/haml-6FagfhCM.js +0 -10
  140. package/dist/handlebars-Bd5Y4M6I.js +0 -14
  141. package/dist/haskell-WeIwNIP6.js +0 -6
  142. package/dist/haxe-TztHsm5T.js +0 -6
  143. package/dist/hcl-D438OF-I.js +0 -6
  144. package/dist/hjson-DYBUbqOl.js +0 -6
  145. package/dist/hlsl-Bk8TCZNL.js +0 -6
  146. package/dist/houston-BDYrDoDW.js +0 -4
  147. package/dist/html-7XVNRwN7.js +0 -10
  148. package/dist/html-derivative-BNxZ5Yf6.js +0 -8
  149. package/dist/http-WC357zBG.js +0 -14
  150. package/dist/hxml-GbqSQCLa.js +0 -8
  151. package/dist/hy-Brt5EZ7-.js +0 -6
  152. package/dist/imba-CimUv-Uh.js +0 -6
  153. package/dist/index-DR9mkSeU.js +0 -29474
  154. package/dist/info-63CPKGFF-DnZM8nKQ.js +0 -5
  155. package/dist/infoDiagram-DDUCL6P7-ClQolrbt.js +0 -24
  156. package/dist/ini-BZIuRIvJ.js +0 -6
  157. package/dist/init-DjUOC4st.js +0 -16
  158. package/dist/java-DY6VlHhP.js +0 -6
  159. package/dist/javascript-Dp1Jmi5H.js +0 -6
  160. package/dist/jinja-WEhOU5ES.js +0 -11
  161. package/dist/jison-c2JI40PB.js +0 -8
  162. package/dist/journeyDiagram-FFXJYRFH-P_IVMTj2.js +0 -836
  163. package/dist/json-DxJze_jm.js +0 -6
  164. package/dist/json5-BT4Fjg39.js +0 -6
  165. package/dist/jsonc-CHjZD8gR.js +0 -6
  166. package/dist/jsonl-BGuvDmy9.js +0 -6
  167. package/dist/jsonnet-Bx2cfsXg.js +0 -6
  168. package/dist/jssm-BcADi6EI.js +0 -6
  169. package/dist/jsx-BtKADgXT.js +0 -6
  170. package/dist/julia-DcoDQokW.js +0 -16
  171. package/dist/kanagawa-dragon-CiKur4Hl.js +0 -4
  172. package/dist/kanagawa-lotus-BKu-smKu.js +0 -4
  173. package/dist/kanagawa-wave-CQwozSzG.js +0 -4
  174. package/dist/kanban-definition-KOZQBZVT-Uk8JKe_b.js +0 -720
  175. package/dist/kotlin-ByBMgTeR.js +0 -6
  176. package/dist/kusto-VWFLl2T0.js +0 -6
  177. package/dist/laserwave-6a00oqik.js +0 -4
  178. package/dist/latex-MZCpjnva.js +0 -8
  179. package/dist/layout-BHKAMNdk.js +0 -1324
  180. package/dist/lean-DXqEE_d1.js +0 -6
  181. package/dist/less-B1GLI2Di.js +0 -6
  182. package/dist/light-plus-CZuVqSLX.js +0 -4
  183. package/dist/linear-UAzexi4b.js +0 -255
  184. package/dist/liquid-3HHuHOZ2.js +0 -14
  185. package/dist/llvm-6RQLId6G.js +0 -6
  186. package/dist/log-Al8wyEFV.js +0 -6
  187. package/dist/logo-DBa4JDzV.js +0 -6
  188. package/dist/lua-kX5WP_P5.js +0 -8
  189. package/dist/luau-BeoZWRh5.js +0 -6
  190. package/dist/make-CsMclxtr.js +0 -6
  191. package/dist/markdown-CiI2E98D.js +0 -6
  192. package/dist/marko-L-KhXzqZ.js +0 -14
  193. package/dist/material-theme-D6KBX41T.js +0 -4
  194. package/dist/material-theme-darker-CkRroheE.js +0 -4
  195. package/dist/material-theme-lighter-BUBw43Yz.js +0 -4
  196. package/dist/material-theme-ocean-ClGX14Ja.js +0 -4
  197. package/dist/material-theme-palenight-C1RVm8K1.js +0 -4
  198. package/dist/matlab-BOAaUVP0.js +0 -6
  199. package/dist/mdc-DPBWa7dN.js +0 -12
  200. package/dist/mdx-BOhZZUJ8.js +0 -6
  201. package/dist/mermaid-B0ixDHKN.js +0 -6
  202. package/dist/mermaid-parser.core-FuzJzmL7.js +0 -12921
  203. package/dist/mermaid.core-D7qBd055.js +0 -14002
  204. package/dist/min-dark-C7ak0t6c.js +0 -4
  205. package/dist/min-light-CKFxVcPp.js +0 -4
  206. package/dist/mindmap-definition-LNHGMQRG-D1C2-kkn.js +0 -3229
  207. package/dist/mipsasm-CTx18fBl.js +0 -6
  208. package/dist/mojo-BD611d7o.js +0 -6
  209. package/dist/monokai-C1KBYcO0.js +0 -4
  210. package/dist/move-653S600C.js +0 -6
  211. package/dist/narrat-DmhDCBs-.js +0 -6
  212. package/dist/nextflow-D1Zd9cNl.js +0 -6
  213. package/dist/nginx-5vhPAEw3.js +0 -8
  214. package/dist/night-owl-Bm2rzalh.js +0 -4
  215. package/dist/nim-Fi8wNe6i.js +0 -20
  216. package/dist/nix-ceY58Dty.js +0 -6
  217. package/dist/nord-CC5OiUXg.js +0 -4
  218. package/dist/nushell-Be2rueDv.js +0 -6
  219. package/dist/objective-c-Itk8tzmv.js +0 -6
  220. package/dist/objective-cpp-DGt5UKRO.js +0 -6
  221. package/dist/ocaml-eSVK32Eg.js +0 -6
  222. package/dist/one-dark-pro-DTA3VF0_.js +0 -4
  223. package/dist/one-light-D9sNaUtq.js +0 -4
  224. package/dist/ordinal-DfAQgscy.js +0 -61
  225. package/dist/packet-HUATNLJX-B5EJOyma.js +0 -5
  226. package/dist/pascal-xy8pJNns.js +0 -6
  227. package/dist/perl-BoEn6HmT.js +0 -16
  228. package/dist/php-BRU9zhoN.js +0 -18
  229. package/dist/pie-WTHONI2E-Bl1BKqE7.js +0 -5
  230. package/dist/pieDiagram-DBDJKBY4-BkVTsR1n.js +0 -161
  231. package/dist/plastic-CSTz3KZp.js +0 -4
  232. package/dist/plsql-pVbGZfOv.js +0 -6
  233. package/dist/po-BNfHvqmm.js +0 -6
  234. package/dist/poimandres-C-VADXHD.js +0 -4
  235. package/dist/polar-CAZahv3u.js +0 -6
  236. package/dist/postcss-05aHdL-n.js +0 -6
  237. package/dist/powerquery-DI9HkTvs.js +0 -6
  238. package/dist/powershell-Clc4ydu-.js +0 -6
  239. package/dist/prisma-FZjmVtSl.js +0 -6
  240. package/dist/prolog-C5-yg4TO.js +0 -6
  241. package/dist/proto-MmCPeFAD.js +0 -6
  242. package/dist/pug-CJWI-qSo.js +0 -12
  243. package/dist/puppet-CUJHmnxV.js +0 -6
  244. package/dist/purescript-rUfGld-4.js +0 -6
  245. package/dist/python-BFNSHbwJ.js +0 -6
  246. package/dist/qml-D3ATcgGh.js +0 -8
  247. package/dist/qmldir-BInDYbpo.js +0 -6
  248. package/dist/qss-AeJTysr_.js +0 -6
  249. package/dist/quadrantDiagram-YPSRARAO-D1el8UE7.js +0 -1024
  250. package/dist/r-Bm0uF0U2.js +0 -6
  251. package/dist/racket-B83wSAja.js +0 -6
  252. package/dist/radar-NJJJXTRR-Ba8Estdw.js +0 -5
  253. package/dist/raku-nEQ4ZJJ7.js +0 -6
  254. package/dist/razor-BPFYEoc9.js +0 -10
  255. package/dist/red-7y8PH7HH.js +0 -4
  256. package/dist/reg-m_s_Kiip.js +0 -6
  257. package/dist/regexp-BazyLpPg.js +0 -6
  258. package/dist/rel-BcRfyd6Q.js +0 -6
  259. package/dist/requirementDiagram-EGVEC5DT-DL1bEAjs.js +0 -852
  260. package/dist/riscv-Ce8MAQLP.js +0 -6
  261. package/dist/rose-pine-Cr4kwgAY.js +0 -4
  262. package/dist/rose-pine-dawn-ClRRUdXX.js +0 -4
  263. package/dist/rose-pine-moon-ucNn3Gm8.js +0 -4
  264. package/dist/rst-B6mPMsKo.js +0 -22
  265. package/dist/ruby-DInklMmU.js +0 -30
  266. package/dist/rust-CLzF9zIN.js +0 -6
  267. package/dist/sankeyDiagram-HRAUVNP4-Dyr3TqRu.js +0 -810
  268. package/dist/sas-fpEvgATw.js +0 -8
  269. package/dist/sass-DxHp5rTx.js +0 -6
  270. package/dist/scala-D4grkFkl.js +0 -6
  271. package/dist/scheme-BCRWuEm4.js +0 -6
  272. package/dist/scss-B1FaCqwR.js +0 -8
  273. package/dist/sdbl-B7T8abf4.js +0 -6
  274. package/dist/sequenceDiagram-4MX5Z3NR-CaMVkEvG.js +0 -2283
  275. package/dist/shaderlab-Cr62-Wb4.js +0 -8
  276. package/dist/shellscript-InADTalH.js +0 -6
  277. package/dist/shellsession-DiDJNQdy.js +0 -8
  278. package/dist/slack-dark-i7wN4OET.js +0 -4
  279. package/dist/slack-ochin-ndHf0LoP.js +0 -4
  280. package/dist/smalltalk-BlI1_OkM.js +0 -6
  281. package/dist/snazzy-light-BlSJXAu4.js +0 -4
  282. package/dist/solarized-dark-UTmkh7lw.js +0 -4
  283. package/dist/solarized-light-BheCkDPT.js +0 -4
  284. package/dist/solidity-CneOhxmR.js +0 -6
  285. package/dist/soy-LybuU3Y_.js +0 -8
  286. package/dist/sparql-B0KWFEri.js +0 -8
  287. package/dist/splunk-CRXR8A9s.js +0 -6
  288. package/dist/sql-Cn_v3PB0.js +0 -6
  289. package/dist/ssh-config-DP-hNVbF.js +0 -6
  290. package/dist/stata-B8c5fTjX.js +0 -8
  291. package/dist/stateDiagram-UUKSUZ4H-D-xTiq6H.js +0 -263
  292. package/dist/stateDiagram-v2-EYPG3UTE-BK5bFTpp.js +0 -16
  293. package/dist/stylus-CyKEU1Ej.js +0 -6
  294. package/dist/svelte-BjDUPxZ1.js +0 -14
  295. package/dist/swift-_uF_96_m.js +0 -6
  296. package/dist/synthwave-84-NU3C_KFZ.js +0 -4
  297. package/dist/system-verilog-BCm7smPJ.js +0 -6
  298. package/dist/systemd-C-4qm6XH.js +0 -6
  299. package/dist/talonscript-CFF3LF_O.js +0 -6
  300. package/dist/tasl-Cg_WBUAe.js +0 -6
  301. package/dist/tcl-DN7buRTF.js +0 -6
  302. package/dist/templ-Brj2RH7A.js +0 -12
  303. package/dist/terraform-DGvcn9zM.js +0 -6
  304. package/dist/tex-CmrLTxbG.js +0 -8
  305. package/dist/timeline-definition-3HZDQTIS-DbCuAY-N.js +0 -801
  306. package/dist/tokyo-night-DP4TmcQl.js +0 -4
  307. package/dist/toml-DY62mUL_.js +0 -6
  308. package/dist/treemap-75Q7IDZK-RcudvwLc.js +0 -5
  309. package/dist/ts-tags-CZMzuZh-.js +0 -41
  310. package/dist/tsv-BtvSkaG0.js +0 -6
  311. package/dist/tsx-B8rCNbgL.js +0 -6
  312. package/dist/turtle-_H59FV7D.js +0 -6
  313. package/dist/twig-GjIxYqCX.js +0 -18
  314. package/dist/typescript-mg6ATTE8.js +0 -6
  315. package/dist/typespec-Djmco60m.js +0 -6
  316. package/dist/typst-D_1QKWns.js +0 -6
  317. package/dist/v-BW14IZv7.js +0 -6
  318. package/dist/vala-uxaPR7d1.js +0 -6
  319. package/dist/vb-D8_c5-KN.js +0 -6
  320. package/dist/verilog-B-bybjPF.js +0 -6
  321. package/dist/vesper-BckBta1U.js +0 -4
  322. package/dist/vhdl-CUlNa8ac.js +0 -6
  323. package/dist/viml-DsfA-sWm.js +0 -6
  324. package/dist/vitesse-black-BoGvW84i.js +0 -4
  325. package/dist/vitesse-dark-Cym-eLtO.js +0 -4
  326. package/dist/vitesse-light-CcmG315c.js +0 -4
  327. package/dist/vue-D-ba2-Rx.js +0 -31
  328. package/dist/vue-html-Dn2ZoOSz.js +0 -10
  329. package/dist/vue-vine-Jmfkm6lF.js +0 -20
  330. package/dist/vyper-CPQuu50u.js +0 -6
  331. package/dist/wasm-BBXxrAl7.js +0 -6
  332. package/dist/wasm-DQxwEHae.js +0 -7
  333. package/dist/wenyan-pbVjoM9_.js +0 -6
  334. package/dist/wgsl-DY4iK1q1.js +0 -6
  335. package/dist/wikitext-Z-MoUasO.js +0 -6
  336. package/dist/wit-CQMQOlTg.js +0 -6
  337. package/dist/wolfram-Dz4KXISs.js +0 -6
  338. package/dist/xml-C2J0sS9M.js +0 -8
  339. package/dist/xsl-BmSZphgC.js +0 -8
  340. package/dist/xychartDiagram-FDP5SA34-NGeBTA9Y.js +0 -1340
  341. package/dist/yaml-DaO7k5B1.js +0 -6
  342. package/dist/zenscript-CxBjpf9c.js +0 -6
  343. package/dist/zig-Vm0PO9wB.js +0 -6
@@ -1,3229 +0,0 @@
1
- import { _, l as Q, c as nt, K as Et, ac as Lt, H as tt, i as q, ad as Tt, ae as Nt, af as mt, d as Dt, am as Ot, a4 as At } from "./mermaid.core-D7qBd055.js";
2
- import { c as ut } from "./cytoscape.esm-ZmItrg9y.js";
3
- import { c as at, g as It } from "./index-DR9mkSeU.js";
4
- var ft = { exports: {} }, rt = { exports: {} }, it = { exports: {} }, ct;
5
- function Ct() {
6
- return ct || (ct = 1, function(C, M) {
7
- (function(D, y) {
8
- C.exports = y();
9
- })(at, function() {
10
- return (
11
- /******/
12
- function(u) {
13
- var D = {};
14
- function y(r) {
15
- if (D[r])
16
- return D[r].exports;
17
- var t = D[r] = {
18
- /******/
19
- i: r,
20
- /******/
21
- l: !1,
22
- /******/
23
- exports: {}
24
- /******/
25
- };
26
- return u[r].call(t.exports, t, t.exports, y), t.l = !0, t.exports;
27
- }
28
- return y.m = u, y.c = D, y.i = function(r) {
29
- return r;
30
- }, y.d = function(r, t, e) {
31
- y.o(r, t) || Object.defineProperty(r, t, {
32
- /******/
33
- configurable: !1,
34
- /******/
35
- enumerable: !0,
36
- /******/
37
- get: e
38
- /******/
39
- });
40
- }, y.n = function(r) {
41
- var t = r && r.__esModule ? (
42
- /******/
43
- function() {
44
- return r.default;
45
- }
46
- ) : (
47
- /******/
48
- function() {
49
- return r;
50
- }
51
- );
52
- return y.d(t, "a", t), t;
53
- }, y.o = function(r, t) {
54
- return Object.prototype.hasOwnProperty.call(r, t);
55
- }, y.p = "", y(y.s = 26);
56
- }([
57
- /* 0 */
58
- /***/
59
- function(u, D, y) {
60
- function r() {
61
- }
62
- r.QUALITY = 1, r.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, r.DEFAULT_INCREMENTAL = !1, r.DEFAULT_ANIMATION_ON_LAYOUT = !0, r.DEFAULT_ANIMATION_DURING_LAYOUT = !1, r.DEFAULT_ANIMATION_PERIOD = 50, r.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, r.DEFAULT_GRAPH_MARGIN = 15, r.NODE_DIMENSIONS_INCLUDE_LABELS = !1, r.SIMPLE_NODE_SIZE = 40, r.SIMPLE_NODE_HALF_SIZE = r.SIMPLE_NODE_SIZE / 2, r.EMPTY_COMPOUND_NODE_SIZE = 40, r.MIN_EDGE_LENGTH = 1, r.WORLD_BOUNDARY = 1e6, r.INITIAL_WORLD_BOUNDARY = r.WORLD_BOUNDARY / 1e3, r.WORLD_CENTER_X = 1200, r.WORLD_CENTER_Y = 900, u.exports = r;
63
- },
64
- /* 1 */
65
- /***/
66
- function(u, D, y) {
67
- var r = y(2), t = y(8), e = y(9);
68
- function i(g, a, v) {
69
- r.call(this, v), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = v, this.bendpoints = [], this.source = g, this.target = a;
70
- }
71
- i.prototype = Object.create(r.prototype);
72
- for (var o in r)
73
- i[o] = r[o];
74
- i.prototype.getSource = function() {
75
- return this.source;
76
- }, i.prototype.getTarget = function() {
77
- return this.target;
78
- }, i.prototype.isInterGraph = function() {
79
- return this.isInterGraph;
80
- }, i.prototype.getLength = function() {
81
- return this.length;
82
- }, i.prototype.isOverlapingSourceAndTarget = function() {
83
- return this.isOverlapingSourceAndTarget;
84
- }, i.prototype.getBendpoints = function() {
85
- return this.bendpoints;
86
- }, i.prototype.getLca = function() {
87
- return this.lca;
88
- }, i.prototype.getSourceInLca = function() {
89
- return this.sourceInLca;
90
- }, i.prototype.getTargetInLca = function() {
91
- return this.targetInLca;
92
- }, i.prototype.getOtherEnd = function(g) {
93
- if (this.source === g)
94
- return this.target;
95
- if (this.target === g)
96
- return this.source;
97
- throw "Node is not incident with this edge";
98
- }, i.prototype.getOtherEndInGraph = function(g, a) {
99
- for (var v = this.getOtherEnd(g), n = a.getGraphManager().getRoot(); ; ) {
100
- if (v.getOwner() == a)
101
- return v;
102
- if (v.getOwner() == n)
103
- break;
104
- v = v.getOwner().getParent();
105
- }
106
- return null;
107
- }, i.prototype.updateLength = function() {
108
- var g = new Array(4);
109
- this.isOverlapingSourceAndTarget = t.getIntersection(this.target.getRect(), this.source.getRect(), g), this.isOverlapingSourceAndTarget || (this.lengthX = g[0] - g[2], this.lengthY = g[1] - g[3], Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
110
- }, i.prototype.updateLengthSimple = function() {
111
- this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
112
- }, u.exports = i;
113
- },
114
- /* 2 */
115
- /***/
116
- function(u, D, y) {
117
- function r(t) {
118
- this.vGraphObject = t;
119
- }
120
- u.exports = r;
121
- },
122
- /* 3 */
123
- /***/
124
- function(u, D, y) {
125
- var r = y(2), t = y(10), e = y(13), i = y(0), o = y(16), g = y(4);
126
- function a(n, c, l, E) {
127
- l == null && E == null && (E = c), r.call(this, E), n.graphManager != null && (n = n.graphManager), this.estimatedSize = t.MIN_VALUE, this.inclusionTreeDepth = t.MAX_VALUE, this.vGraphObject = E, this.edges = [], this.graphManager = n, l != null && c != null ? this.rect = new e(c.x, c.y, l.width, l.height) : this.rect = new e();
128
- }
129
- a.prototype = Object.create(r.prototype);
130
- for (var v in r)
131
- a[v] = r[v];
132
- a.prototype.getEdges = function() {
133
- return this.edges;
134
- }, a.prototype.getChild = function() {
135
- return this.child;
136
- }, a.prototype.getOwner = function() {
137
- return this.owner;
138
- }, a.prototype.getWidth = function() {
139
- return this.rect.width;
140
- }, a.prototype.setWidth = function(n) {
141
- this.rect.width = n;
142
- }, a.prototype.getHeight = function() {
143
- return this.rect.height;
144
- }, a.prototype.setHeight = function(n) {
145
- this.rect.height = n;
146
- }, a.prototype.getCenterX = function() {
147
- return this.rect.x + this.rect.width / 2;
148
- }, a.prototype.getCenterY = function() {
149
- return this.rect.y + this.rect.height / 2;
150
- }, a.prototype.getCenter = function() {
151
- return new g(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
152
- }, a.prototype.getLocation = function() {
153
- return new g(this.rect.x, this.rect.y);
154
- }, a.prototype.getRect = function() {
155
- return this.rect;
156
- }, a.prototype.getDiagonal = function() {
157
- return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
158
- }, a.prototype.getHalfTheDiagonal = function() {
159
- return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
160
- }, a.prototype.setRect = function(n, c) {
161
- this.rect.x = n.x, this.rect.y = n.y, this.rect.width = c.width, this.rect.height = c.height;
162
- }, a.prototype.setCenter = function(n, c) {
163
- this.rect.x = n - this.rect.width / 2, this.rect.y = c - this.rect.height / 2;
164
- }, a.prototype.setLocation = function(n, c) {
165
- this.rect.x = n, this.rect.y = c;
166
- }, a.prototype.moveBy = function(n, c) {
167
- this.rect.x += n, this.rect.y += c;
168
- }, a.prototype.getEdgeListToNode = function(n) {
169
- var c = [], l = this;
170
- return l.edges.forEach(function(E) {
171
- if (E.target == n) {
172
- if (E.source != l) throw "Incorrect edge source!";
173
- c.push(E);
174
- }
175
- }), c;
176
- }, a.prototype.getEdgesBetween = function(n) {
177
- var c = [], l = this;
178
- return l.edges.forEach(function(E) {
179
- if (!(E.source == l || E.target == l)) throw "Incorrect edge source and/or target";
180
- (E.target == n || E.source == n) && c.push(E);
181
- }), c;
182
- }, a.prototype.getNeighborsList = function() {
183
- var n = /* @__PURE__ */ new Set(), c = this;
184
- return c.edges.forEach(function(l) {
185
- if (l.source == c)
186
- n.add(l.target);
187
- else {
188
- if (l.target != c)
189
- throw "Incorrect incidency!";
190
- n.add(l.source);
191
- }
192
- }), n;
193
- }, a.prototype.withChildren = function() {
194
- var n = /* @__PURE__ */ new Set(), c, l;
195
- if (n.add(this), this.child != null)
196
- for (var E = this.child.getNodes(), T = 0; T < E.length; T++)
197
- c = E[T], l = c.withChildren(), l.forEach(function(m) {
198
- n.add(m);
199
- });
200
- return n;
201
- }, a.prototype.getNoOfChildren = function() {
202
- var n = 0, c;
203
- if (this.child == null)
204
- n = 1;
205
- else
206
- for (var l = this.child.getNodes(), E = 0; E < l.length; E++)
207
- c = l[E], n += c.getNoOfChildren();
208
- return n == 0 && (n = 1), n;
209
- }, a.prototype.getEstimatedSize = function() {
210
- if (this.estimatedSize == t.MIN_VALUE)
211
- throw "assert failed";
212
- return this.estimatedSize;
213
- }, a.prototype.calcEstimatedSize = function() {
214
- return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
215
- }, a.prototype.scatter = function() {
216
- var n, c, l = -i.INITIAL_WORLD_BOUNDARY, E = i.INITIAL_WORLD_BOUNDARY;
217
- n = i.WORLD_CENTER_X + o.nextDouble() * (E - l) + l;
218
- var T = -i.INITIAL_WORLD_BOUNDARY, m = i.INITIAL_WORLD_BOUNDARY;
219
- c = i.WORLD_CENTER_Y + o.nextDouble() * (m - T) + T, this.rect.x = n, this.rect.y = c;
220
- }, a.prototype.updateBounds = function() {
221
- if (this.getChild() == null)
222
- throw "assert failed";
223
- if (this.getChild().getNodes().length != 0) {
224
- var n = this.getChild();
225
- if (n.updateBounds(!0), this.rect.x = n.getLeft(), this.rect.y = n.getTop(), this.setWidth(n.getRight() - n.getLeft()), this.setHeight(n.getBottom() - n.getTop()), i.NODE_DIMENSIONS_INCLUDE_LABELS) {
226
- var c = n.getRight() - n.getLeft(), l = n.getBottom() - n.getTop();
227
- this.labelWidth > c && (this.rect.x -= (this.labelWidth - c) / 2, this.setWidth(this.labelWidth)), this.labelHeight > l && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - l) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - l), this.setHeight(this.labelHeight));
228
- }
229
- }
230
- }, a.prototype.getInclusionTreeDepth = function() {
231
- if (this.inclusionTreeDepth == t.MAX_VALUE)
232
- throw "assert failed";
233
- return this.inclusionTreeDepth;
234
- }, a.prototype.transform = function(n) {
235
- var c = this.rect.x;
236
- c > i.WORLD_BOUNDARY ? c = i.WORLD_BOUNDARY : c < -i.WORLD_BOUNDARY && (c = -i.WORLD_BOUNDARY);
237
- var l = this.rect.y;
238
- l > i.WORLD_BOUNDARY ? l = i.WORLD_BOUNDARY : l < -i.WORLD_BOUNDARY && (l = -i.WORLD_BOUNDARY);
239
- var E = new g(c, l), T = n.inverseTransformPoint(E);
240
- this.setLocation(T.x, T.y);
241
- }, a.prototype.getLeft = function() {
242
- return this.rect.x;
243
- }, a.prototype.getRight = function() {
244
- return this.rect.x + this.rect.width;
245
- }, a.prototype.getTop = function() {
246
- return this.rect.y;
247
- }, a.prototype.getBottom = function() {
248
- return this.rect.y + this.rect.height;
249
- }, a.prototype.getParent = function() {
250
- return this.owner == null ? null : this.owner.getParent();
251
- }, u.exports = a;
252
- },
253
- /* 4 */
254
- /***/
255
- function(u, D, y) {
256
- function r(t, e) {
257
- t == null && e == null ? (this.x = 0, this.y = 0) : (this.x = t, this.y = e);
258
- }
259
- r.prototype.getX = function() {
260
- return this.x;
261
- }, r.prototype.getY = function() {
262
- return this.y;
263
- }, r.prototype.setX = function(t) {
264
- this.x = t;
265
- }, r.prototype.setY = function(t) {
266
- this.y = t;
267
- }, r.prototype.getDifference = function(t) {
268
- return new DimensionD(this.x - t.x, this.y - t.y);
269
- }, r.prototype.getCopy = function() {
270
- return new r(this.x, this.y);
271
- }, r.prototype.translate = function(t) {
272
- return this.x += t.width, this.y += t.height, this;
273
- }, u.exports = r;
274
- },
275
- /* 5 */
276
- /***/
277
- function(u, D, y) {
278
- var r = y(2), t = y(10), e = y(0), i = y(6), o = y(3), g = y(1), a = y(13), v = y(12), n = y(11);
279
- function c(E, T, m) {
280
- r.call(this, m), this.estimatedSize = t.MIN_VALUE, this.margin = e.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = E, T != null && T instanceof i ? this.graphManager = T : T != null && T instanceof Layout && (this.graphManager = T.graphManager);
281
- }
282
- c.prototype = Object.create(r.prototype);
283
- for (var l in r)
284
- c[l] = r[l];
285
- c.prototype.getNodes = function() {
286
- return this.nodes;
287
- }, c.prototype.getEdges = function() {
288
- return this.edges;
289
- }, c.prototype.getGraphManager = function() {
290
- return this.graphManager;
291
- }, c.prototype.getParent = function() {
292
- return this.parent;
293
- }, c.prototype.getLeft = function() {
294
- return this.left;
295
- }, c.prototype.getRight = function() {
296
- return this.right;
297
- }, c.prototype.getTop = function() {
298
- return this.top;
299
- }, c.prototype.getBottom = function() {
300
- return this.bottom;
301
- }, c.prototype.isConnected = function() {
302
- return this.isConnected;
303
- }, c.prototype.add = function(E, T, m) {
304
- if (T == null && m == null) {
305
- var L = E;
306
- if (this.graphManager == null)
307
- throw "Graph has no graph mgr!";
308
- if (this.getNodes().indexOf(L) > -1)
309
- throw "Node already in graph!";
310
- return L.owner = this, this.getNodes().push(L), L;
311
- } else {
312
- var O = E;
313
- if (!(this.getNodes().indexOf(T) > -1 && this.getNodes().indexOf(m) > -1))
314
- throw "Source or target not in graph!";
315
- if (!(T.owner == m.owner && T.owner == this))
316
- throw "Both owners must be this graph!";
317
- return T.owner != m.owner ? null : (O.source = T, O.target = m, O.isInterGraph = !1, this.getEdges().push(O), T.edges.push(O), m != T && m.edges.push(O), O);
318
- }
319
- }, c.prototype.remove = function(E) {
320
- var T = E;
321
- if (E instanceof o) {
322
- if (T == null)
323
- throw "Node is null!";
324
- if (!(T.owner != null && T.owner == this))
325
- throw "Owner graph is invalid!";
326
- if (this.graphManager == null)
327
- throw "Owner graph manager is invalid!";
328
- for (var m = T.edges.slice(), L, O = m.length, d = 0; d < O; d++)
329
- L = m[d], L.isInterGraph ? this.graphManager.remove(L) : L.source.owner.remove(L);
330
- var N = this.nodes.indexOf(T);
331
- if (N == -1)
332
- throw "Node not in owner node list!";
333
- this.nodes.splice(N, 1);
334
- } else if (E instanceof g) {
335
- var L = E;
336
- if (L == null)
337
- throw "Edge is null!";
338
- if (!(L.source != null && L.target != null))
339
- throw "Source and/or target is null!";
340
- if (!(L.source.owner != null && L.target.owner != null && L.source.owner == this && L.target.owner == this))
341
- throw "Source and/or target owner is invalid!";
342
- var s = L.source.edges.indexOf(L), h = L.target.edges.indexOf(L);
343
- if (!(s > -1 && h > -1))
344
- throw "Source and/or target doesn't know this edge!";
345
- L.source.edges.splice(s, 1), L.target != L.source && L.target.edges.splice(h, 1);
346
- var N = L.source.owner.getEdges().indexOf(L);
347
- if (N == -1)
348
- throw "Not in owner's edge list!";
349
- L.source.owner.getEdges().splice(N, 1);
350
- }
351
- }, c.prototype.updateLeftTop = function() {
352
- for (var E = t.MAX_VALUE, T = t.MAX_VALUE, m, L, O, d = this.getNodes(), N = d.length, s = 0; s < N; s++) {
353
- var h = d[s];
354
- m = h.getTop(), L = h.getLeft(), E > m && (E = m), T > L && (T = L);
355
- }
356
- return E == t.MAX_VALUE ? null : (d[0].getParent().paddingLeft != null ? O = d[0].getParent().paddingLeft : O = this.margin, this.left = T - O, this.top = E - O, new v(this.left, this.top));
357
- }, c.prototype.updateBounds = function(E) {
358
- for (var T = t.MAX_VALUE, m = -t.MAX_VALUE, L = t.MAX_VALUE, O = -t.MAX_VALUE, d, N, s, h, f, p = this.nodes, A = p.length, I = 0; I < A; I++) {
359
- var R = p[I];
360
- E && R.child != null && R.updateBounds(), d = R.getLeft(), N = R.getRight(), s = R.getTop(), h = R.getBottom(), T > d && (T = d), m < N && (m = N), L > s && (L = s), O < h && (O = h);
361
- }
362
- var x = new a(T, L, m - T, O - L);
363
- T == t.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), p[0].getParent().paddingLeft != null ? f = p[0].getParent().paddingLeft : f = this.margin, this.left = x.x - f, this.right = x.x + x.width + f, this.top = x.y - f, this.bottom = x.y + x.height + f;
364
- }, c.calculateBounds = function(E) {
365
- for (var T = t.MAX_VALUE, m = -t.MAX_VALUE, L = t.MAX_VALUE, O = -t.MAX_VALUE, d, N, s, h, f = E.length, p = 0; p < f; p++) {
366
- var A = E[p];
367
- d = A.getLeft(), N = A.getRight(), s = A.getTop(), h = A.getBottom(), T > d && (T = d), m < N && (m = N), L > s && (L = s), O < h && (O = h);
368
- }
369
- var I = new a(T, L, m - T, O - L);
370
- return I;
371
- }, c.prototype.getInclusionTreeDepth = function() {
372
- return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
373
- }, c.prototype.getEstimatedSize = function() {
374
- if (this.estimatedSize == t.MIN_VALUE)
375
- throw "assert failed";
376
- return this.estimatedSize;
377
- }, c.prototype.calcEstimatedSize = function() {
378
- for (var E = 0, T = this.nodes, m = T.length, L = 0; L < m; L++) {
379
- var O = T[L];
380
- E += O.calcEstimatedSize();
381
- }
382
- return E == 0 ? this.estimatedSize = e.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = E / Math.sqrt(this.nodes.length), this.estimatedSize;
383
- }, c.prototype.updateConnected = function() {
384
- var E = this;
385
- if (this.nodes.length == 0) {
386
- this.isConnected = !0;
387
- return;
388
- }
389
- var T = new n(), m = /* @__PURE__ */ new Set(), L = this.nodes[0], O, d, N = L.withChildren();
390
- for (N.forEach(function(I) {
391
- T.push(I), m.add(I);
392
- }); T.length !== 0; ) {
393
- L = T.shift(), O = L.getEdges();
394
- for (var s = O.length, h = 0; h < s; h++) {
395
- var f = O[h];
396
- if (d = f.getOtherEndInGraph(L, this), d != null && !m.has(d)) {
397
- var p = d.withChildren();
398
- p.forEach(function(I) {
399
- T.push(I), m.add(I);
400
- });
401
- }
402
- }
403
- }
404
- if (this.isConnected = !1, m.size >= this.nodes.length) {
405
- var A = 0;
406
- m.forEach(function(I) {
407
- I.owner == E && A++;
408
- }), A == this.nodes.length && (this.isConnected = !0);
409
- }
410
- }, u.exports = c;
411
- },
412
- /* 6 */
413
- /***/
414
- function(u, D, y) {
415
- var r, t = y(1);
416
- function e(i) {
417
- r = y(5), this.layout = i, this.graphs = [], this.edges = [];
418
- }
419
- e.prototype.addRoot = function() {
420
- var i = this.layout.newGraph(), o = this.layout.newNode(null), g = this.add(i, o);
421
- return this.setRootGraph(g), this.rootGraph;
422
- }, e.prototype.add = function(i, o, g, a, v) {
423
- if (g == null && a == null && v == null) {
424
- if (i == null)
425
- throw "Graph is null!";
426
- if (o == null)
427
- throw "Parent node is null!";
428
- if (this.graphs.indexOf(i) > -1)
429
- throw "Graph already in this graph mgr!";
430
- if (this.graphs.push(i), i.parent != null)
431
- throw "Already has a parent!";
432
- if (o.child != null)
433
- throw "Already has a child!";
434
- return i.parent = o, o.child = i, i;
435
- } else {
436
- v = g, a = o, g = i;
437
- var n = a.getOwner(), c = v.getOwner();
438
- if (!(n != null && n.getGraphManager() == this))
439
- throw "Source not in this graph mgr!";
440
- if (!(c != null && c.getGraphManager() == this))
441
- throw "Target not in this graph mgr!";
442
- if (n == c)
443
- return g.isInterGraph = !1, n.add(g, a, v);
444
- if (g.isInterGraph = !0, g.source = a, g.target = v, this.edges.indexOf(g) > -1)
445
- throw "Edge already in inter-graph edge list!";
446
- if (this.edges.push(g), !(g.source != null && g.target != null))
447
- throw "Edge source and/or target is null!";
448
- if (!(g.source.edges.indexOf(g) == -1 && g.target.edges.indexOf(g) == -1))
449
- throw "Edge already in source and/or target incidency list!";
450
- return g.source.edges.push(g), g.target.edges.push(g), g;
451
- }
452
- }, e.prototype.remove = function(i) {
453
- if (i instanceof r) {
454
- var o = i;
455
- if (o.getGraphManager() != this)
456
- throw "Graph not in this graph mgr";
457
- if (!(o == this.rootGraph || o.parent != null && o.parent.graphManager == this))
458
- throw "Invalid parent node!";
459
- var g = [];
460
- g = g.concat(o.getEdges());
461
- for (var a, v = g.length, n = 0; n < v; n++)
462
- a = g[n], o.remove(a);
463
- var c = [];
464
- c = c.concat(o.getNodes());
465
- var l;
466
- v = c.length;
467
- for (var n = 0; n < v; n++)
468
- l = c[n], o.remove(l);
469
- o == this.rootGraph && this.setRootGraph(null);
470
- var E = this.graphs.indexOf(o);
471
- this.graphs.splice(E, 1), o.parent = null;
472
- } else if (i instanceof t) {
473
- if (a = i, a == null)
474
- throw "Edge is null!";
475
- if (!a.isInterGraph)
476
- throw "Not an inter-graph edge!";
477
- if (!(a.source != null && a.target != null))
478
- throw "Source and/or target is null!";
479
- if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1))
480
- throw "Source and/or target doesn't know this edge!";
481
- var E = a.source.edges.indexOf(a);
482
- if (a.source.edges.splice(E, 1), E = a.target.edges.indexOf(a), a.target.edges.splice(E, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null))
483
- throw "Edge owner graph or owner graph manager is null!";
484
- if (a.source.owner.getGraphManager().edges.indexOf(a) == -1)
485
- throw "Not in owner graph manager's edge list!";
486
- var E = a.source.owner.getGraphManager().edges.indexOf(a);
487
- a.source.owner.getGraphManager().edges.splice(E, 1);
488
- }
489
- }, e.prototype.updateBounds = function() {
490
- this.rootGraph.updateBounds(!0);
491
- }, e.prototype.getGraphs = function() {
492
- return this.graphs;
493
- }, e.prototype.getAllNodes = function() {
494
- if (this.allNodes == null) {
495
- for (var i = [], o = this.getGraphs(), g = o.length, a = 0; a < g; a++)
496
- i = i.concat(o[a].getNodes());
497
- this.allNodes = i;
498
- }
499
- return this.allNodes;
500
- }, e.prototype.resetAllNodes = function() {
501
- this.allNodes = null;
502
- }, e.prototype.resetAllEdges = function() {
503
- this.allEdges = null;
504
- }, e.prototype.resetAllNodesToApplyGravitation = function() {
505
- this.allNodesToApplyGravitation = null;
506
- }, e.prototype.getAllEdges = function() {
507
- if (this.allEdges == null) {
508
- var i = [], o = this.getGraphs();
509
- o.length;
510
- for (var g = 0; g < o.length; g++)
511
- i = i.concat(o[g].getEdges());
512
- i = i.concat(this.edges), this.allEdges = i;
513
- }
514
- return this.allEdges;
515
- }, e.prototype.getAllNodesToApplyGravitation = function() {
516
- return this.allNodesToApplyGravitation;
517
- }, e.prototype.setAllNodesToApplyGravitation = function(i) {
518
- if (this.allNodesToApplyGravitation != null)
519
- throw "assert failed";
520
- this.allNodesToApplyGravitation = i;
521
- }, e.prototype.getRoot = function() {
522
- return this.rootGraph;
523
- }, e.prototype.setRootGraph = function(i) {
524
- if (i.getGraphManager() != this)
525
- throw "Root not in this graph mgr!";
526
- this.rootGraph = i, i.parent == null && (i.parent = this.layout.newNode("Root node"));
527
- }, e.prototype.getLayout = function() {
528
- return this.layout;
529
- }, e.prototype.isOneAncestorOfOther = function(i, o) {
530
- if (!(i != null && o != null))
531
- throw "assert failed";
532
- if (i == o)
533
- return !0;
534
- var g = i.getOwner(), a;
535
- do {
536
- if (a = g.getParent(), a == null)
537
- break;
538
- if (a == o)
539
- return !0;
540
- if (g = a.getOwner(), g == null)
541
- break;
542
- } while (!0);
543
- g = o.getOwner();
544
- do {
545
- if (a = g.getParent(), a == null)
546
- break;
547
- if (a == i)
548
- return !0;
549
- if (g = a.getOwner(), g == null)
550
- break;
551
- } while (!0);
552
- return !1;
553
- }, e.prototype.calcLowestCommonAncestors = function() {
554
- for (var i, o, g, a, v, n = this.getAllEdges(), c = n.length, l = 0; l < c; l++) {
555
- if (i = n[l], o = i.source, g = i.target, i.lca = null, i.sourceInLca = o, i.targetInLca = g, o == g) {
556
- i.lca = o.getOwner();
557
- continue;
558
- }
559
- for (a = o.getOwner(); i.lca == null; ) {
560
- for (i.targetInLca = g, v = g.getOwner(); i.lca == null; ) {
561
- if (v == a) {
562
- i.lca = v;
563
- break;
564
- }
565
- if (v == this.rootGraph)
566
- break;
567
- if (i.lca != null)
568
- throw "assert failed";
569
- i.targetInLca = v.getParent(), v = i.targetInLca.getOwner();
570
- }
571
- if (a == this.rootGraph)
572
- break;
573
- i.lca == null && (i.sourceInLca = a.getParent(), a = i.sourceInLca.getOwner());
574
- }
575
- if (i.lca == null)
576
- throw "assert failed";
577
- }
578
- }, e.prototype.calcLowestCommonAncestor = function(i, o) {
579
- if (i == o)
580
- return i.getOwner();
581
- var g = i.getOwner();
582
- do {
583
- if (g == null)
584
- break;
585
- var a = o.getOwner();
586
- do {
587
- if (a == null)
588
- break;
589
- if (a == g)
590
- return a;
591
- a = a.getParent().getOwner();
592
- } while (!0);
593
- g = g.getParent().getOwner();
594
- } while (!0);
595
- return g;
596
- }, e.prototype.calcInclusionTreeDepths = function(i, o) {
597
- i == null && o == null && (i = this.rootGraph, o = 1);
598
- for (var g, a = i.getNodes(), v = a.length, n = 0; n < v; n++)
599
- g = a[n], g.inclusionTreeDepth = o, g.child != null && this.calcInclusionTreeDepths(g.child, o + 1);
600
- }, e.prototype.includesInvalidEdge = function() {
601
- for (var i, o = this.edges.length, g = 0; g < o; g++)
602
- if (i = this.edges[g], this.isOneAncestorOfOther(i.source, i.target))
603
- return !0;
604
- return !1;
605
- }, u.exports = e;
606
- },
607
- /* 7 */
608
- /***/
609
- function(u, D, y) {
610
- var r = y(0);
611
- function t() {
612
- }
613
- for (var e in r)
614
- t[e] = r[e];
615
- t.MAX_ITERATIONS = 2500, t.DEFAULT_EDGE_LENGTH = 50, t.DEFAULT_SPRING_STRENGTH = 0.45, t.DEFAULT_REPULSION_STRENGTH = 4500, t.DEFAULT_GRAVITY_STRENGTH = 0.4, t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, t.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, t.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, t.COOLING_ADAPTATION_FACTOR = 0.33, t.ADAPTATION_LOWER_NODE_LIMIT = 1e3, t.ADAPTATION_UPPER_NODE_LIMIT = 5e3, t.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, t.MAX_NODE_DISPLACEMENT = t.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, t.MIN_REPULSION_DIST = t.DEFAULT_EDGE_LENGTH / 10, t.CONVERGENCE_CHECK_PERIOD = 100, t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, t.MIN_EDGE_LENGTH = 1, t.GRID_CALCULATION_CHECK_PERIOD = 10, u.exports = t;
616
- },
617
- /* 8 */
618
- /***/
619
- function(u, D, y) {
620
- var r = y(12);
621
- function t() {
622
- }
623
- t.calcSeparationAmount = function(e, i, o, g) {
624
- if (!e.intersects(i))
625
- throw "assert failed";
626
- var a = new Array(2);
627
- this.decideDirectionsForOverlappingNodes(e, i, a), o[0] = Math.min(e.getRight(), i.getRight()) - Math.max(e.x, i.x), o[1] = Math.min(e.getBottom(), i.getBottom()) - Math.max(e.y, i.y), e.getX() <= i.getX() && e.getRight() >= i.getRight() ? o[0] += Math.min(i.getX() - e.getX(), e.getRight() - i.getRight()) : i.getX() <= e.getX() && i.getRight() >= e.getRight() && (o[0] += Math.min(e.getX() - i.getX(), i.getRight() - e.getRight())), e.getY() <= i.getY() && e.getBottom() >= i.getBottom() ? o[1] += Math.min(i.getY() - e.getY(), e.getBottom() - i.getBottom()) : i.getY() <= e.getY() && i.getBottom() >= e.getBottom() && (o[1] += Math.min(e.getY() - i.getY(), i.getBottom() - e.getBottom()));
628
- var v = Math.abs((i.getCenterY() - e.getCenterY()) / (i.getCenterX() - e.getCenterX()));
629
- i.getCenterY() === e.getCenterY() && i.getCenterX() === e.getCenterX() && (v = 1);
630
- var n = v * o[0], c = o[1] / v;
631
- o[0] < c ? c = o[0] : n = o[1], o[0] = -1 * a[0] * (c / 2 + g), o[1] = -1 * a[1] * (n / 2 + g);
632
- }, t.decideDirectionsForOverlappingNodes = function(e, i, o) {
633
- e.getCenterX() < i.getCenterX() ? o[0] = -1 : o[0] = 1, e.getCenterY() < i.getCenterY() ? o[1] = -1 : o[1] = 1;
634
- }, t.getIntersection2 = function(e, i, o) {
635
- var g = e.getCenterX(), a = e.getCenterY(), v = i.getCenterX(), n = i.getCenterY();
636
- if (e.intersects(i))
637
- return o[0] = g, o[1] = a, o[2] = v, o[3] = n, !0;
638
- var c = e.getX(), l = e.getY(), E = e.getRight(), T = e.getX(), m = e.getBottom(), L = e.getRight(), O = e.getWidthHalf(), d = e.getHeightHalf(), N = i.getX(), s = i.getY(), h = i.getRight(), f = i.getX(), p = i.getBottom(), A = i.getRight(), I = i.getWidthHalf(), R = i.getHeightHalf(), x = !1, G = !1;
639
- if (g === v) {
640
- if (a > n)
641
- return o[0] = g, o[1] = l, o[2] = v, o[3] = p, !1;
642
- if (a < n)
643
- return o[0] = g, o[1] = m, o[2] = v, o[3] = s, !1;
644
- } else if (a === n) {
645
- if (g > v)
646
- return o[0] = c, o[1] = a, o[2] = h, o[3] = n, !1;
647
- if (g < v)
648
- return o[0] = E, o[1] = a, o[2] = N, o[3] = n, !1;
649
- } else {
650
- var U = e.height / e.width, X = i.height / i.width, w = (n - a) / (v - g), S = void 0, F = void 0, b = void 0, Y = void 0, k = void 0, H = void 0;
651
- if (-U === w ? g > v ? (o[0] = T, o[1] = m, x = !0) : (o[0] = E, o[1] = l, x = !0) : U === w && (g > v ? (o[0] = c, o[1] = l, x = !0) : (o[0] = L, o[1] = m, x = !0)), -X === w ? v > g ? (o[2] = f, o[3] = p, G = !0) : (o[2] = h, o[3] = s, G = !0) : X === w && (v > g ? (o[2] = N, o[3] = s, G = !0) : (o[2] = A, o[3] = p, G = !0)), x && G)
652
- return !1;
653
- if (g > v ? a > n ? (S = this.getCardinalDirection(U, w, 4), F = this.getCardinalDirection(X, w, 2)) : (S = this.getCardinalDirection(-U, w, 3), F = this.getCardinalDirection(-X, w, 1)) : a > n ? (S = this.getCardinalDirection(-U, w, 1), F = this.getCardinalDirection(-X, w, 3)) : (S = this.getCardinalDirection(U, w, 2), F = this.getCardinalDirection(X, w, 4)), !x)
654
- switch (S) {
655
- case 1:
656
- Y = l, b = g + -d / w, o[0] = b, o[1] = Y;
657
- break;
658
- case 2:
659
- b = L, Y = a + O * w, o[0] = b, o[1] = Y;
660
- break;
661
- case 3:
662
- Y = m, b = g + d / w, o[0] = b, o[1] = Y;
663
- break;
664
- case 4:
665
- b = T, Y = a + -O * w, o[0] = b, o[1] = Y;
666
- break;
667
- }
668
- if (!G)
669
- switch (F) {
670
- case 1:
671
- H = s, k = v + -R / w, o[2] = k, o[3] = H;
672
- break;
673
- case 2:
674
- k = A, H = n + I * w, o[2] = k, o[3] = H;
675
- break;
676
- case 3:
677
- H = p, k = v + R / w, o[2] = k, o[3] = H;
678
- break;
679
- case 4:
680
- k = f, H = n + -I * w, o[2] = k, o[3] = H;
681
- break;
682
- }
683
- }
684
- return !1;
685
- }, t.getCardinalDirection = function(e, i, o) {
686
- return e > i ? o : 1 + o % 4;
687
- }, t.getIntersection = function(e, i, o, g) {
688
- if (g == null)
689
- return this.getIntersection2(e, i, o);
690
- var a = e.x, v = e.y, n = i.x, c = i.y, l = o.x, E = o.y, T = g.x, m = g.y, L = void 0, O = void 0, d = void 0, N = void 0, s = void 0, h = void 0, f = void 0, p = void 0, A = void 0;
691
- return d = c - v, s = a - n, f = n * v - a * c, N = m - E, h = l - T, p = T * E - l * m, A = d * h - N * s, A === 0 ? null : (L = (s * p - h * f) / A, O = (N * f - d * p) / A, new r(L, O));
692
- }, t.angleOfVector = function(e, i, o, g) {
693
- var a = void 0;
694
- return e !== o ? (a = Math.atan((g - i) / (o - e)), o < e ? a += Math.PI : g < i && (a += this.TWO_PI)) : g < i ? a = this.ONE_AND_HALF_PI : a = this.HALF_PI, a;
695
- }, t.doIntersect = function(e, i, o, g) {
696
- var a = e.x, v = e.y, n = i.x, c = i.y, l = o.x, E = o.y, T = g.x, m = g.y, L = (n - a) * (m - E) - (T - l) * (c - v);
697
- if (L === 0)
698
- return !1;
699
- var O = ((m - E) * (T - a) + (l - T) * (m - v)) / L, d = ((v - c) * (T - a) + (n - a) * (m - v)) / L;
700
- return 0 < O && O < 1 && 0 < d && d < 1;
701
- }, t.HALF_PI = 0.5 * Math.PI, t.ONE_AND_HALF_PI = 1.5 * Math.PI, t.TWO_PI = 2 * Math.PI, t.THREE_PI = 3 * Math.PI, u.exports = t;
702
- },
703
- /* 9 */
704
- /***/
705
- function(u, D, y) {
706
- function r() {
707
- }
708
- r.sign = function(t) {
709
- return t > 0 ? 1 : t < 0 ? -1 : 0;
710
- }, r.floor = function(t) {
711
- return t < 0 ? Math.ceil(t) : Math.floor(t);
712
- }, r.ceil = function(t) {
713
- return t < 0 ? Math.floor(t) : Math.ceil(t);
714
- }, u.exports = r;
715
- },
716
- /* 10 */
717
- /***/
718
- function(u, D, y) {
719
- function r() {
720
- }
721
- r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, u.exports = r;
722
- },
723
- /* 11 */
724
- /***/
725
- function(u, D, y) {
726
- var r = /* @__PURE__ */ function() {
727
- function a(v, n) {
728
- for (var c = 0; c < n.length; c++) {
729
- var l = n[c];
730
- l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(v, l.key, l);
731
- }
732
- }
733
- return function(v, n, c) {
734
- return n && a(v.prototype, n), c && a(v, c), v;
735
- };
736
- }();
737
- function t(a, v) {
738
- if (!(a instanceof v))
739
- throw new TypeError("Cannot call a class as a function");
740
- }
741
- var e = function(v) {
742
- return { value: v, next: null, prev: null };
743
- }, i = function(v, n, c, l) {
744
- return v !== null ? v.next = n : l.head = n, c !== null ? c.prev = n : l.tail = n, n.prev = v, n.next = c, l.length++, n;
745
- }, o = function(v, n) {
746
- var c = v.prev, l = v.next;
747
- return c !== null ? c.next = l : n.head = l, l !== null ? l.prev = c : n.tail = c, v.prev = v.next = null, n.length--, v;
748
- }, g = function() {
749
- function a(v) {
750
- var n = this;
751
- t(this, a), this.length = 0, this.head = null, this.tail = null, v != null && v.forEach(function(c) {
752
- return n.push(c);
753
- });
754
- }
755
- return r(a, [{
756
- key: "size",
757
- value: function() {
758
- return this.length;
759
- }
760
- }, {
761
- key: "insertBefore",
762
- value: function(n, c) {
763
- return i(c.prev, e(n), c, this);
764
- }
765
- }, {
766
- key: "insertAfter",
767
- value: function(n, c) {
768
- return i(c, e(n), c.next, this);
769
- }
770
- }, {
771
- key: "insertNodeBefore",
772
- value: function(n, c) {
773
- return i(c.prev, n, c, this);
774
- }
775
- }, {
776
- key: "insertNodeAfter",
777
- value: function(n, c) {
778
- return i(c, n, c.next, this);
779
- }
780
- }, {
781
- key: "push",
782
- value: function(n) {
783
- return i(this.tail, e(n), null, this);
784
- }
785
- }, {
786
- key: "unshift",
787
- value: function(n) {
788
- return i(null, e(n), this.head, this);
789
- }
790
- }, {
791
- key: "remove",
792
- value: function(n) {
793
- return o(n, this);
794
- }
795
- }, {
796
- key: "pop",
797
- value: function() {
798
- return o(this.tail, this).value;
799
- }
800
- }, {
801
- key: "popNode",
802
- value: function() {
803
- return o(this.tail, this);
804
- }
805
- }, {
806
- key: "shift",
807
- value: function() {
808
- return o(this.head, this).value;
809
- }
810
- }, {
811
- key: "shiftNode",
812
- value: function() {
813
- return o(this.head, this);
814
- }
815
- }, {
816
- key: "get_object_at",
817
- value: function(n) {
818
- if (n <= this.length()) {
819
- for (var c = 1, l = this.head; c < n; )
820
- l = l.next, c++;
821
- return l.value;
822
- }
823
- }
824
- }, {
825
- key: "set_object_at",
826
- value: function(n, c) {
827
- if (n <= this.length()) {
828
- for (var l = 1, E = this.head; l < n; )
829
- E = E.next, l++;
830
- E.value = c;
831
- }
832
- }
833
- }]), a;
834
- }();
835
- u.exports = g;
836
- },
837
- /* 12 */
838
- /***/
839
- function(u, D, y) {
840
- function r(t, e, i) {
841
- this.x = null, this.y = null, t == null && e == null && i == null ? (this.x = 0, this.y = 0) : typeof t == "number" && typeof e == "number" && i == null ? (this.x = t, this.y = e) : t.constructor.name == "Point" && e == null && i == null && (i = t, this.x = i.x, this.y = i.y);
842
- }
843
- r.prototype.getX = function() {
844
- return this.x;
845
- }, r.prototype.getY = function() {
846
- return this.y;
847
- }, r.prototype.getLocation = function() {
848
- return new r(this.x, this.y);
849
- }, r.prototype.setLocation = function(t, e, i) {
850
- t.constructor.name == "Point" && e == null && i == null ? (i = t, this.setLocation(i.x, i.y)) : typeof t == "number" && typeof e == "number" && i == null && (parseInt(t) == t && parseInt(e) == e ? this.move(t, e) : (this.x = Math.floor(t + 0.5), this.y = Math.floor(e + 0.5)));
851
- }, r.prototype.move = function(t, e) {
852
- this.x = t, this.y = e;
853
- }, r.prototype.translate = function(t, e) {
854
- this.x += t, this.y += e;
855
- }, r.prototype.equals = function(t) {
856
- if (t.constructor.name == "Point") {
857
- var e = t;
858
- return this.x == e.x && this.y == e.y;
859
- }
860
- return this == t;
861
- }, r.prototype.toString = function() {
862
- return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
863
- }, u.exports = r;
864
- },
865
- /* 13 */
866
- /***/
867
- function(u, D, y) {
868
- function r(t, e, i, o) {
869
- this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null && e != null && i != null && o != null && (this.x = t, this.y = e, this.width = i, this.height = o);
870
- }
871
- r.prototype.getX = function() {
872
- return this.x;
873
- }, r.prototype.setX = function(t) {
874
- this.x = t;
875
- }, r.prototype.getY = function() {
876
- return this.y;
877
- }, r.prototype.setY = function(t) {
878
- this.y = t;
879
- }, r.prototype.getWidth = function() {
880
- return this.width;
881
- }, r.prototype.setWidth = function(t) {
882
- this.width = t;
883
- }, r.prototype.getHeight = function() {
884
- return this.height;
885
- }, r.prototype.setHeight = function(t) {
886
- this.height = t;
887
- }, r.prototype.getRight = function() {
888
- return this.x + this.width;
889
- }, r.prototype.getBottom = function() {
890
- return this.y + this.height;
891
- }, r.prototype.intersects = function(t) {
892
- return !(this.getRight() < t.x || this.getBottom() < t.y || t.getRight() < this.x || t.getBottom() < this.y);
893
- }, r.prototype.getCenterX = function() {
894
- return this.x + this.width / 2;
895
- }, r.prototype.getMinX = function() {
896
- return this.getX();
897
- }, r.prototype.getMaxX = function() {
898
- return this.getX() + this.width;
899
- }, r.prototype.getCenterY = function() {
900
- return this.y + this.height / 2;
901
- }, r.prototype.getMinY = function() {
902
- return this.getY();
903
- }, r.prototype.getMaxY = function() {
904
- return this.getY() + this.height;
905
- }, r.prototype.getWidthHalf = function() {
906
- return this.width / 2;
907
- }, r.prototype.getHeightHalf = function() {
908
- return this.height / 2;
909
- }, u.exports = r;
910
- },
911
- /* 14 */
912
- /***/
913
- function(u, D, y) {
914
- var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
915
- return typeof e;
916
- } : function(e) {
917
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
918
- };
919
- function t() {
920
- }
921
- t.lastID = 0, t.createID = function(e) {
922
- return t.isPrimitive(e) ? e : (e.uniqueID != null || (e.uniqueID = t.getString(), t.lastID++), e.uniqueID);
923
- }, t.getString = function(e) {
924
- return e == null && (e = t.lastID), "Object#" + e;
925
- }, t.isPrimitive = function(e) {
926
- var i = typeof e > "u" ? "undefined" : r(e);
927
- return e == null || i != "object" && i != "function";
928
- }, u.exports = t;
929
- },
930
- /* 15 */
931
- /***/
932
- function(u, D, y) {
933
- function r(l) {
934
- if (Array.isArray(l)) {
935
- for (var E = 0, T = Array(l.length); E < l.length; E++)
936
- T[E] = l[E];
937
- return T;
938
- } else
939
- return Array.from(l);
940
- }
941
- var t = y(0), e = y(6), i = y(3), o = y(1), g = y(5), a = y(4), v = y(17), n = y(27);
942
- function c(l) {
943
- n.call(this), this.layoutQuality = t.QUALITY, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = t.DEFAULT_INCREMENTAL, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new e(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, l != null && (this.isRemoteUse = l);
944
- }
945
- c.RANDOM_SEED = 1, c.prototype = Object.create(n.prototype), c.prototype.getGraphManager = function() {
946
- return this.graphManager;
947
- }, c.prototype.getAllNodes = function() {
948
- return this.graphManager.getAllNodes();
949
- }, c.prototype.getAllEdges = function() {
950
- return this.graphManager.getAllEdges();
951
- }, c.prototype.getAllNodesToApplyGravitation = function() {
952
- return this.graphManager.getAllNodesToApplyGravitation();
953
- }, c.prototype.newGraphManager = function() {
954
- var l = new e(this);
955
- return this.graphManager = l, l;
956
- }, c.prototype.newGraph = function(l) {
957
- return new g(null, this.graphManager, l);
958
- }, c.prototype.newNode = function(l) {
959
- return new i(this.graphManager, l);
960
- }, c.prototype.newEdge = function(l) {
961
- return new o(null, null, l);
962
- }, c.prototype.checkLayoutSuccess = function() {
963
- return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
964
- }, c.prototype.runLayout = function() {
965
- this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
966
- var l;
967
- return this.checkLayoutSuccess() ? l = !1 : l = this.layout(), t.ANIMATE === "during" ? !1 : (l && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, l);
968
- }, c.prototype.doPostLayout = function() {
969
- this.incremental || this.transform(), this.update();
970
- }, c.prototype.update2 = function() {
971
- if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
972
- for (var l = this.graphManager.getAllEdges(), E = 0; E < l.length; E++)
973
- l[E];
974
- for (var T = this.graphManager.getRoot().getNodes(), E = 0; E < T.length; E++)
975
- T[E];
976
- this.update(this.graphManager.getRoot());
977
- }
978
- }, c.prototype.update = function(l) {
979
- if (l == null)
980
- this.update2();
981
- else if (l instanceof i) {
982
- var E = l;
983
- if (E.getChild() != null)
984
- for (var T = E.getChild().getNodes(), m = 0; m < T.length; m++)
985
- update(T[m]);
986
- if (E.vGraphObject != null) {
987
- var L = E.vGraphObject;
988
- L.update(E);
989
- }
990
- } else if (l instanceof o) {
991
- var O = l;
992
- if (O.vGraphObject != null) {
993
- var d = O.vGraphObject;
994
- d.update(O);
995
- }
996
- } else if (l instanceof g) {
997
- var N = l;
998
- if (N.vGraphObject != null) {
999
- var s = N.vGraphObject;
1000
- s.update(N);
1001
- }
1002
- }
1003
- }, c.prototype.initParameters = function() {
1004
- this.isSubLayout || (this.layoutQuality = t.QUALITY, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = t.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1005
- }, c.prototype.transform = function(l) {
1006
- if (l == null)
1007
- this.transform(new a(0, 0));
1008
- else {
1009
- var E = new v(), T = this.graphManager.getRoot().updateLeftTop();
1010
- if (T != null) {
1011
- E.setWorldOrgX(l.x), E.setWorldOrgY(l.y), E.setDeviceOrgX(T.x), E.setDeviceOrgY(T.y);
1012
- for (var m = this.getAllNodes(), L, O = 0; O < m.length; O++)
1013
- L = m[O], L.transform(E);
1014
- }
1015
- }
1016
- }, c.prototype.positionNodesRandomly = function(l) {
1017
- if (l == null)
1018
- this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1019
- else
1020
- for (var E, T, m = l.getNodes(), L = 0; L < m.length; L++)
1021
- E = m[L], T = E.getChild(), T == null || T.getNodes().length == 0 ? E.scatter() : (this.positionNodesRandomly(T), E.updateBounds());
1022
- }, c.prototype.getFlatForest = function() {
1023
- for (var l = [], E = !0, T = this.graphManager.getRoot().getNodes(), m = !0, L = 0; L < T.length; L++)
1024
- T[L].getChild() != null && (m = !1);
1025
- if (!m)
1026
- return l;
1027
- var O = /* @__PURE__ */ new Set(), d = [], N = /* @__PURE__ */ new Map(), s = [];
1028
- for (s = s.concat(T); s.length > 0 && E; ) {
1029
- for (d.push(s[0]); d.length > 0 && E; ) {
1030
- var h = d[0];
1031
- d.splice(0, 1), O.add(h);
1032
- for (var f = h.getEdges(), L = 0; L < f.length; L++) {
1033
- var p = f[L].getOtherEnd(h);
1034
- if (N.get(h) != p)
1035
- if (!O.has(p))
1036
- d.push(p), N.set(p, h);
1037
- else {
1038
- E = !1;
1039
- break;
1040
- }
1041
- }
1042
- }
1043
- if (!E)
1044
- l = [];
1045
- else {
1046
- var A = [].concat(r(O));
1047
- l.push(A);
1048
- for (var L = 0; L < A.length; L++) {
1049
- var I = A[L], R = s.indexOf(I);
1050
- R > -1 && s.splice(R, 1);
1051
- }
1052
- O = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new Map();
1053
- }
1054
- }
1055
- return l;
1056
- }, c.prototype.createDummyNodesForBendpoints = function(l) {
1057
- for (var E = [], T = l.source, m = this.graphManager.calcLowestCommonAncestor(l.source, l.target), L = 0; L < l.bendpoints.length; L++) {
1058
- var O = this.newNode(null);
1059
- O.setRect(new Point(0, 0), new Dimension(1, 1)), m.add(O);
1060
- var d = this.newEdge(null);
1061
- this.graphManager.add(d, T, O), E.add(O), T = O;
1062
- }
1063
- var d = this.newEdge(null);
1064
- return this.graphManager.add(d, T, l.target), this.edgeToDummyNodes.set(l, E), l.isInterGraph() ? this.graphManager.remove(l) : m.remove(l), E;
1065
- }, c.prototype.createBendpointsFromDummyNodes = function() {
1066
- var l = [];
1067
- l = l.concat(this.graphManager.getAllEdges()), l = [].concat(r(this.edgeToDummyNodes.keys())).concat(l);
1068
- for (var E = 0; E < l.length; E++) {
1069
- var T = l[E];
1070
- if (T.bendpoints.length > 0) {
1071
- for (var m = this.edgeToDummyNodes.get(T), L = 0; L < m.length; L++) {
1072
- var O = m[L], d = new a(O.getCenterX(), O.getCenterY()), N = T.bendpoints.get(L);
1073
- N.x = d.x, N.y = d.y, O.getOwner().remove(O);
1074
- }
1075
- this.graphManager.add(T, T.source, T.target);
1076
- }
1077
- }
1078
- }, c.transform = function(l, E, T, m) {
1079
- if (T != null && m != null) {
1080
- var L = E;
1081
- if (l <= 50) {
1082
- var O = E / T;
1083
- L -= (E - O) / 50 * (50 - l);
1084
- } else {
1085
- var d = E * m;
1086
- L += (d - E) / 50 * (l - 50);
1087
- }
1088
- return L;
1089
- } else {
1090
- var N, s;
1091
- return l <= 50 ? (N = 9 * E / 500, s = E / 10) : (N = 9 * E / 50, s = -8 * E), N * l + s;
1092
- }
1093
- }, c.findCenterOfTree = function(l) {
1094
- var E = [];
1095
- E = E.concat(l);
1096
- var T = [], m = /* @__PURE__ */ new Map(), L = !1, O = null;
1097
- (E.length == 1 || E.length == 2) && (L = !0, O = E[0]);
1098
- for (var d = 0; d < E.length; d++) {
1099
- var N = E[d], s = N.getNeighborsList().size;
1100
- m.set(N, N.getNeighborsList().size), s == 1 && T.push(N);
1101
- }
1102
- var h = [];
1103
- for (h = h.concat(T); !L; ) {
1104
- var f = [];
1105
- f = f.concat(h), h = [];
1106
- for (var d = 0; d < E.length; d++) {
1107
- var N = E[d], p = E.indexOf(N);
1108
- p >= 0 && E.splice(p, 1);
1109
- var A = N.getNeighborsList();
1110
- A.forEach(function(x) {
1111
- if (T.indexOf(x) < 0) {
1112
- var G = m.get(x), U = G - 1;
1113
- U == 1 && h.push(x), m.set(x, U);
1114
- }
1115
- });
1116
- }
1117
- T = T.concat(h), (E.length == 1 || E.length == 2) && (L = !0, O = E[0]);
1118
- }
1119
- return O;
1120
- }, c.prototype.setGraphManager = function(l) {
1121
- this.graphManager = l;
1122
- }, u.exports = c;
1123
- },
1124
- /* 16 */
1125
- /***/
1126
- function(u, D, y) {
1127
- function r() {
1128
- }
1129
- r.seed = 1, r.x = 0, r.nextDouble = function() {
1130
- return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
1131
- }, u.exports = r;
1132
- },
1133
- /* 17 */
1134
- /***/
1135
- function(u, D, y) {
1136
- var r = y(4);
1137
- function t(e, i) {
1138
- this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1139
- }
1140
- t.prototype.getWorldOrgX = function() {
1141
- return this.lworldOrgX;
1142
- }, t.prototype.setWorldOrgX = function(e) {
1143
- this.lworldOrgX = e;
1144
- }, t.prototype.getWorldOrgY = function() {
1145
- return this.lworldOrgY;
1146
- }, t.prototype.setWorldOrgY = function(e) {
1147
- this.lworldOrgY = e;
1148
- }, t.prototype.getWorldExtX = function() {
1149
- return this.lworldExtX;
1150
- }, t.prototype.setWorldExtX = function(e) {
1151
- this.lworldExtX = e;
1152
- }, t.prototype.getWorldExtY = function() {
1153
- return this.lworldExtY;
1154
- }, t.prototype.setWorldExtY = function(e) {
1155
- this.lworldExtY = e;
1156
- }, t.prototype.getDeviceOrgX = function() {
1157
- return this.ldeviceOrgX;
1158
- }, t.prototype.setDeviceOrgX = function(e) {
1159
- this.ldeviceOrgX = e;
1160
- }, t.prototype.getDeviceOrgY = function() {
1161
- return this.ldeviceOrgY;
1162
- }, t.prototype.setDeviceOrgY = function(e) {
1163
- this.ldeviceOrgY = e;
1164
- }, t.prototype.getDeviceExtX = function() {
1165
- return this.ldeviceExtX;
1166
- }, t.prototype.setDeviceExtX = function(e) {
1167
- this.ldeviceExtX = e;
1168
- }, t.prototype.getDeviceExtY = function() {
1169
- return this.ldeviceExtY;
1170
- }, t.prototype.setDeviceExtY = function(e) {
1171
- this.ldeviceExtY = e;
1172
- }, t.prototype.transformX = function(e) {
1173
- var i = 0, o = this.lworldExtX;
1174
- return o != 0 && (i = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / o), i;
1175
- }, t.prototype.transformY = function(e) {
1176
- var i = 0, o = this.lworldExtY;
1177
- return o != 0 && (i = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / o), i;
1178
- }, t.prototype.inverseTransformX = function(e) {
1179
- var i = 0, o = this.ldeviceExtX;
1180
- return o != 0 && (i = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / o), i;
1181
- }, t.prototype.inverseTransformY = function(e) {
1182
- var i = 0, o = this.ldeviceExtY;
1183
- return o != 0 && (i = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / o), i;
1184
- }, t.prototype.inverseTransformPoint = function(e) {
1185
- var i = new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1186
- return i;
1187
- }, u.exports = t;
1188
- },
1189
- /* 18 */
1190
- /***/
1191
- function(u, D, y) {
1192
- function r(n) {
1193
- if (Array.isArray(n)) {
1194
- for (var c = 0, l = Array(n.length); c < n.length; c++)
1195
- l[c] = n[c];
1196
- return l;
1197
- } else
1198
- return Array.from(n);
1199
- }
1200
- var t = y(15), e = y(7), i = y(0), o = y(8), g = y(9);
1201
- function a() {
1202
- t.call(this), this.useSmartIdealEdgeLengthCalculation = e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = e.DEFAULT_EDGE_LENGTH, this.springConstant = e.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = e.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = e.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = e.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * e.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = e.MAX_ITERATIONS;
1203
- }
1204
- a.prototype = Object.create(t.prototype);
1205
- for (var v in t)
1206
- a[v] = t[v];
1207
- a.prototype.initParameters = function() {
1208
- t.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1209
- }, a.prototype.calcIdealEdgeLengths = function() {
1210
- for (var n, c, l, E, T, m, L = this.getGraphManager().getAllEdges(), O = 0; O < L.length; O++)
1211
- n = L[O], n.idealLength = this.idealEdgeLength, n.isInterGraph && (l = n.getSource(), E = n.getTarget(), T = n.getSourceInLca().getEstimatedSize(), m = n.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (n.idealLength += T + m - 2 * i.SIMPLE_NODE_SIZE), c = n.getLca().getInclusionTreeDepth(), n.idealLength += e.DEFAULT_EDGE_LENGTH * e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (l.getInclusionTreeDepth() + E.getInclusionTreeDepth() - 2 * c));
1212
- }, a.prototype.initSpringEmbedder = function() {
1213
- var n = this.getAllNodes().length;
1214
- this.incremental ? (n > e.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * e.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (n - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - e.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (n > e.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(e.COOLING_ADAPTATION_FACTOR, 1 - (n - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * (1 - e.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1215
- }, a.prototype.calcSpringForces = function() {
1216
- for (var n = this.getAllEdges(), c, l = 0; l < n.length; l++)
1217
- c = n[l], this.calcSpringForce(c, c.idealLength);
1218
- }, a.prototype.calcRepulsionForces = function() {
1219
- var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l, E, T, m, L = this.getAllNodes(), O;
1220
- if (this.useFRGridVariant)
1221
- for (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && n && this.updateGrid(), O = /* @__PURE__ */ new Set(), l = 0; l < L.length; l++)
1222
- T = L[l], this.calculateRepulsionForceOfANode(T, O, n, c), O.add(T);
1223
- else
1224
- for (l = 0; l < L.length; l++)
1225
- for (T = L[l], E = l + 1; E < L.length; E++)
1226
- m = L[E], T.getOwner() == m.getOwner() && this.calcRepulsionForce(T, m);
1227
- }, a.prototype.calcGravitationalForces = function() {
1228
- for (var n, c = this.getAllNodesToApplyGravitation(), l = 0; l < c.length; l++)
1229
- n = c[l], this.calcGravitationalForce(n);
1230
- }, a.prototype.moveNodes = function() {
1231
- for (var n = this.getAllNodes(), c, l = 0; l < n.length; l++)
1232
- c = n[l], c.move();
1233
- }, a.prototype.calcSpringForce = function(n, c) {
1234
- var l = n.getSource(), E = n.getTarget(), T, m, L, O;
1235
- if (this.uniformLeafNodeSizes && l.getChild() == null && E.getChild() == null)
1236
- n.updateLengthSimple();
1237
- else if (n.updateLength(), n.isOverlapingSourceAndTarget)
1238
- return;
1239
- T = n.getLength(), T != 0 && (m = this.springConstant * (T - c), L = m * (n.lengthX / T), O = m * (n.lengthY / T), l.springForceX += L, l.springForceY += O, E.springForceX -= L, E.springForceY -= O);
1240
- }, a.prototype.calcRepulsionForce = function(n, c) {
1241
- var l = n.getRect(), E = c.getRect(), T = new Array(2), m = new Array(4), L, O, d, N, s, h, f;
1242
- if (l.intersects(E)) {
1243
- o.calcSeparationAmount(l, E, T, e.DEFAULT_EDGE_LENGTH / 2), h = 2 * T[0], f = 2 * T[1];
1244
- var p = n.noOfChildren * c.noOfChildren / (n.noOfChildren + c.noOfChildren);
1245
- n.repulsionForceX -= p * h, n.repulsionForceY -= p * f, c.repulsionForceX += p * h, c.repulsionForceY += p * f;
1246
- } else
1247
- this.uniformLeafNodeSizes && n.getChild() == null && c.getChild() == null ? (L = E.getCenterX() - l.getCenterX(), O = E.getCenterY() - l.getCenterY()) : (o.getIntersection(l, E, m), L = m[2] - m[0], O = m[3] - m[1]), Math.abs(L) < e.MIN_REPULSION_DIST && (L = g.sign(L) * e.MIN_REPULSION_DIST), Math.abs(O) < e.MIN_REPULSION_DIST && (O = g.sign(O) * e.MIN_REPULSION_DIST), d = L * L + O * O, N = Math.sqrt(d), s = this.repulsionConstant * n.noOfChildren * c.noOfChildren / d, h = s * L / N, f = s * O / N, n.repulsionForceX -= h, n.repulsionForceY -= f, c.repulsionForceX += h, c.repulsionForceY += f;
1248
- }, a.prototype.calcGravitationalForce = function(n) {
1249
- var c, l, E, T, m, L, O, d;
1250
- c = n.getOwner(), l = (c.getRight() + c.getLeft()) / 2, E = (c.getTop() + c.getBottom()) / 2, T = n.getCenterX() - l, m = n.getCenterY() - E, L = Math.abs(T) + n.getWidth() / 2, O = Math.abs(m) + n.getHeight() / 2, n.getOwner() == this.graphManager.getRoot() ? (d = c.getEstimatedSize() * this.gravityRangeFactor, (L > d || O > d) && (n.gravitationForceX = -this.gravityConstant * T, n.gravitationForceY = -this.gravityConstant * m)) : (d = c.getEstimatedSize() * this.compoundGravityRangeFactor, (L > d || O > d) && (n.gravitationForceX = -this.gravityConstant * T * this.compoundGravityConstant, n.gravitationForceY = -this.gravityConstant * m * this.compoundGravityConstant));
1251
- }, a.prototype.isConverged = function() {
1252
- var n, c = !1;
1253
- return this.totalIterations > this.maxIterations / 3 && (c = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), n = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, n || c;
1254
- }, a.prototype.animate = function() {
1255
- this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1256
- }, a.prototype.calcNoOfChildrenForAllNodes = function() {
1257
- for (var n, c = this.graphManager.getAllNodes(), l = 0; l < c.length; l++)
1258
- n = c[l], n.noOfChildren = n.getNoOfChildren();
1259
- }, a.prototype.calcGrid = function(n) {
1260
- var c = 0, l = 0;
1261
- c = parseInt(Math.ceil((n.getRight() - n.getLeft()) / this.repulsionRange)), l = parseInt(Math.ceil((n.getBottom() - n.getTop()) / this.repulsionRange));
1262
- for (var E = new Array(c), T = 0; T < c; T++)
1263
- E[T] = new Array(l);
1264
- for (var T = 0; T < c; T++)
1265
- for (var m = 0; m < l; m++)
1266
- E[T][m] = new Array();
1267
- return E;
1268
- }, a.prototype.addNodeToGrid = function(n, c, l) {
1269
- var E = 0, T = 0, m = 0, L = 0;
1270
- E = parseInt(Math.floor((n.getRect().x - c) / this.repulsionRange)), T = parseInt(Math.floor((n.getRect().width + n.getRect().x - c) / this.repulsionRange)), m = parseInt(Math.floor((n.getRect().y - l) / this.repulsionRange)), L = parseInt(Math.floor((n.getRect().height + n.getRect().y - l) / this.repulsionRange));
1271
- for (var O = E; O <= T; O++)
1272
- for (var d = m; d <= L; d++)
1273
- this.grid[O][d].push(n), n.setGridCoordinates(E, T, m, L);
1274
- }, a.prototype.updateGrid = function() {
1275
- var n, c, l = this.getAllNodes();
1276
- for (this.grid = this.calcGrid(this.graphManager.getRoot()), n = 0; n < l.length; n++)
1277
- c = l[n], this.addNodeToGrid(c, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1278
- }, a.prototype.calculateRepulsionForceOfANode = function(n, c, l, E) {
1279
- if (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && l || E) {
1280
- var T = /* @__PURE__ */ new Set();
1281
- n.surrounding = new Array();
1282
- for (var m, L = this.grid, O = n.startX - 1; O < n.finishX + 2; O++)
1283
- for (var d = n.startY - 1; d < n.finishY + 2; d++)
1284
- if (!(O < 0 || d < 0 || O >= L.length || d >= L[0].length)) {
1285
- for (var N = 0; N < L[O][d].length; N++)
1286
- if (m = L[O][d][N], !(n.getOwner() != m.getOwner() || n == m) && !c.has(m) && !T.has(m)) {
1287
- var s = Math.abs(n.getCenterX() - m.getCenterX()) - (n.getWidth() / 2 + m.getWidth() / 2), h = Math.abs(n.getCenterY() - m.getCenterY()) - (n.getHeight() / 2 + m.getHeight() / 2);
1288
- s <= this.repulsionRange && h <= this.repulsionRange && T.add(m);
1289
- }
1290
- }
1291
- n.surrounding = [].concat(r(T));
1292
- }
1293
- for (O = 0; O < n.surrounding.length; O++)
1294
- this.calcRepulsionForce(n, n.surrounding[O]);
1295
- }, a.prototype.calcRepulsionRange = function() {
1296
- return 0;
1297
- }, u.exports = a;
1298
- },
1299
- /* 19 */
1300
- /***/
1301
- function(u, D, y) {
1302
- var r = y(1), t = y(7);
1303
- function e(o, g, a) {
1304
- r.call(this, o, g, a), this.idealLength = t.DEFAULT_EDGE_LENGTH;
1305
- }
1306
- e.prototype = Object.create(r.prototype);
1307
- for (var i in r)
1308
- e[i] = r[i];
1309
- u.exports = e;
1310
- },
1311
- /* 20 */
1312
- /***/
1313
- function(u, D, y) {
1314
- var r = y(3);
1315
- function t(i, o, g, a) {
1316
- r.call(this, i, o, g, a), 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 = [];
1317
- }
1318
- t.prototype = Object.create(r.prototype);
1319
- for (var e in r)
1320
- t[e] = r[e];
1321
- t.prototype.setGridCoordinates = function(i, o, g, a) {
1322
- this.startX = i, this.finishX = o, this.startY = g, this.finishY = a;
1323
- }, u.exports = t;
1324
- },
1325
- /* 21 */
1326
- /***/
1327
- function(u, D, y) {
1328
- function r(t, e) {
1329
- this.width = 0, this.height = 0, t !== null && e !== null && (this.height = e, this.width = t);
1330
- }
1331
- r.prototype.getWidth = function() {
1332
- return this.width;
1333
- }, r.prototype.setWidth = function(t) {
1334
- this.width = t;
1335
- }, r.prototype.getHeight = function() {
1336
- return this.height;
1337
- }, r.prototype.setHeight = function(t) {
1338
- this.height = t;
1339
- }, u.exports = r;
1340
- },
1341
- /* 22 */
1342
- /***/
1343
- function(u, D, y) {
1344
- var r = y(14);
1345
- function t() {
1346
- this.map = {}, this.keys = [];
1347
- }
1348
- t.prototype.put = function(e, i) {
1349
- var o = r.createID(e);
1350
- this.contains(o) || (this.map[o] = i, this.keys.push(e));
1351
- }, t.prototype.contains = function(e) {
1352
- return r.createID(e), this.map[e] != null;
1353
- }, t.prototype.get = function(e) {
1354
- var i = r.createID(e);
1355
- return this.map[i];
1356
- }, t.prototype.keySet = function() {
1357
- return this.keys;
1358
- }, u.exports = t;
1359
- },
1360
- /* 23 */
1361
- /***/
1362
- function(u, D, y) {
1363
- var r = y(14);
1364
- function t() {
1365
- this.set = {};
1366
- }
1367
- t.prototype.add = function(e) {
1368
- var i = r.createID(e);
1369
- this.contains(i) || (this.set[i] = e);
1370
- }, t.prototype.remove = function(e) {
1371
- delete this.set[r.createID(e)];
1372
- }, t.prototype.clear = function() {
1373
- this.set = {};
1374
- }, t.prototype.contains = function(e) {
1375
- return this.set[r.createID(e)] == e;
1376
- }, t.prototype.isEmpty = function() {
1377
- return this.size() === 0;
1378
- }, t.prototype.size = function() {
1379
- return Object.keys(this.set).length;
1380
- }, t.prototype.addAllTo = function(e) {
1381
- for (var i = Object.keys(this.set), o = i.length, g = 0; g < o; g++)
1382
- e.push(this.set[i[g]]);
1383
- }, t.prototype.size = function() {
1384
- return Object.keys(this.set).length;
1385
- }, t.prototype.addAll = function(e) {
1386
- for (var i = e.length, o = 0; o < i; o++) {
1387
- var g = e[o];
1388
- this.add(g);
1389
- }
1390
- }, u.exports = t;
1391
- },
1392
- /* 24 */
1393
- /***/
1394
- function(u, D, y) {
1395
- var r = /* @__PURE__ */ function() {
1396
- function o(g, a) {
1397
- for (var v = 0; v < a.length; v++) {
1398
- var n = a[v];
1399
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(g, n.key, n);
1400
- }
1401
- }
1402
- return function(g, a, v) {
1403
- return a && o(g.prototype, a), v && o(g, v), g;
1404
- };
1405
- }();
1406
- function t(o, g) {
1407
- if (!(o instanceof g))
1408
- throw new TypeError("Cannot call a class as a function");
1409
- }
1410
- var e = y(11), i = function() {
1411
- function o(g, a) {
1412
- t(this, o), (a !== null || a !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1413
- var v = void 0;
1414
- g instanceof e ? v = g.size() : v = g.length, this._quicksort(g, 0, v - 1);
1415
- }
1416
- return r(o, [{
1417
- key: "_quicksort",
1418
- value: function(a, v, n) {
1419
- if (v < n) {
1420
- var c = this._partition(a, v, n);
1421
- this._quicksort(a, v, c), this._quicksort(a, c + 1, n);
1422
- }
1423
- }
1424
- }, {
1425
- key: "_partition",
1426
- value: function(a, v, n) {
1427
- for (var c = this._get(a, v), l = v, E = n; ; ) {
1428
- for (; this.compareFunction(c, this._get(a, E)); )
1429
- E--;
1430
- for (; this.compareFunction(this._get(a, l), c); )
1431
- l++;
1432
- if (l < E)
1433
- this._swap(a, l, E), l++, E--;
1434
- else return E;
1435
- }
1436
- }
1437
- }, {
1438
- key: "_get",
1439
- value: function(a, v) {
1440
- return a instanceof e ? a.get_object_at(v) : a[v];
1441
- }
1442
- }, {
1443
- key: "_set",
1444
- value: function(a, v, n) {
1445
- a instanceof e ? a.set_object_at(v, n) : a[v] = n;
1446
- }
1447
- }, {
1448
- key: "_swap",
1449
- value: function(a, v, n) {
1450
- var c = this._get(a, v);
1451
- this._set(a, v, this._get(a, n)), this._set(a, n, c);
1452
- }
1453
- }, {
1454
- key: "_defaultCompareFunction",
1455
- value: function(a, v) {
1456
- return v > a;
1457
- }
1458
- }]), o;
1459
- }();
1460
- u.exports = i;
1461
- },
1462
- /* 25 */
1463
- /***/
1464
- function(u, D, y) {
1465
- var r = /* @__PURE__ */ function() {
1466
- function i(o, g) {
1467
- for (var a = 0; a < g.length; a++) {
1468
- var v = g[a];
1469
- v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(o, v.key, v);
1470
- }
1471
- }
1472
- return function(o, g, a) {
1473
- return g && i(o.prototype, g), a && i(o, a), o;
1474
- };
1475
- }();
1476
- function t(i, o) {
1477
- if (!(i instanceof o))
1478
- throw new TypeError("Cannot call a class as a function");
1479
- }
1480
- var e = function() {
1481
- function i(o, g) {
1482
- var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1483
- t(this, i), this.sequence1 = o, this.sequence2 = g, this.match_score = a, this.mismatch_penalty = v, this.gap_penalty = n, this.iMax = o.length + 1, this.jMax = g.length + 1, this.grid = new Array(this.iMax);
1484
- for (var c = 0; c < this.iMax; c++) {
1485
- this.grid[c] = new Array(this.jMax);
1486
- for (var l = 0; l < this.jMax; l++)
1487
- this.grid[c][l] = 0;
1488
- }
1489
- this.tracebackGrid = new Array(this.iMax);
1490
- for (var E = 0; E < this.iMax; E++) {
1491
- this.tracebackGrid[E] = new Array(this.jMax);
1492
- for (var T = 0; T < this.jMax; T++)
1493
- this.tracebackGrid[E][T] = [null, null, null];
1494
- }
1495
- this.alignments = [], this.score = -1, this.computeGrids();
1496
- }
1497
- return r(i, [{
1498
- key: "getScore",
1499
- value: function() {
1500
- return this.score;
1501
- }
1502
- }, {
1503
- key: "getAlignments",
1504
- value: function() {
1505
- return this.alignments;
1506
- }
1507
- // Main dynamic programming procedure
1508
- }, {
1509
- key: "computeGrids",
1510
- value: function() {
1511
- for (var g = 1; g < this.jMax; g++)
1512
- this.grid[0][g] = this.grid[0][g - 1] + this.gap_penalty, this.tracebackGrid[0][g] = [!1, !1, !0];
1513
- for (var a = 1; a < this.iMax; a++)
1514
- this.grid[a][0] = this.grid[a - 1][0] + this.gap_penalty, this.tracebackGrid[a][0] = [!1, !0, !1];
1515
- for (var v = 1; v < this.iMax; v++)
1516
- for (var n = 1; n < this.jMax; n++) {
1517
- var c = void 0;
1518
- this.sequence1[v - 1] === this.sequence2[n - 1] ? c = this.grid[v - 1][n - 1] + this.match_score : c = this.grid[v - 1][n - 1] + this.mismatch_penalty;
1519
- var l = this.grid[v - 1][n] + this.gap_penalty, E = this.grid[v][n - 1] + this.gap_penalty, T = [c, l, E], m = this.arrayAllMaxIndexes(T);
1520
- this.grid[v][n] = T[m[0]], this.tracebackGrid[v][n] = [m.includes(0), m.includes(1), m.includes(2)];
1521
- }
1522
- this.score = this.grid[this.iMax - 1][this.jMax - 1];
1523
- }
1524
- // Gets all possible valid sequence combinations
1525
- }, {
1526
- key: "alignmentTraceback",
1527
- value: function() {
1528
- var g = [];
1529
- for (g.push({
1530
- pos: [this.sequence1.length, this.sequence2.length],
1531
- seq1: "",
1532
- seq2: ""
1533
- }); g[0]; ) {
1534
- var a = g[0], v = this.tracebackGrid[a.pos[0]][a.pos[1]];
1535
- v[0] && g.push({
1536
- pos: [a.pos[0] - 1, a.pos[1] - 1],
1537
- seq1: this.sequence1[a.pos[0] - 1] + a.seq1,
1538
- seq2: this.sequence2[a.pos[1] - 1] + a.seq2
1539
- }), v[1] && g.push({
1540
- pos: [a.pos[0] - 1, a.pos[1]],
1541
- seq1: this.sequence1[a.pos[0] - 1] + a.seq1,
1542
- seq2: "-" + a.seq2
1543
- }), v[2] && g.push({
1544
- pos: [a.pos[0], a.pos[1] - 1],
1545
- seq1: "-" + a.seq1,
1546
- seq2: this.sequence2[a.pos[1] - 1] + a.seq2
1547
- }), a.pos[0] === 0 && a.pos[1] === 0 && this.alignments.push({
1548
- sequence1: a.seq1,
1549
- sequence2: a.seq2
1550
- }), g.shift();
1551
- }
1552
- return this.alignments;
1553
- }
1554
- // Helper Functions
1555
- }, {
1556
- key: "getAllIndexes",
1557
- value: function(g, a) {
1558
- for (var v = [], n = -1; (n = g.indexOf(a, n + 1)) !== -1; )
1559
- v.push(n);
1560
- return v;
1561
- }
1562
- }, {
1563
- key: "arrayAllMaxIndexes",
1564
- value: function(g) {
1565
- return this.getAllIndexes(g, Math.max.apply(null, g));
1566
- }
1567
- }]), i;
1568
- }();
1569
- u.exports = e;
1570
- },
1571
- /* 26 */
1572
- /***/
1573
- function(u, D, y) {
1574
- var r = function() {
1575
- };
1576
- r.FDLayout = y(18), r.FDLayoutConstants = y(7), r.FDLayoutEdge = y(19), r.FDLayoutNode = y(20), r.DimensionD = y(21), r.HashMap = y(22), r.HashSet = y(23), r.IGeometry = y(8), r.IMath = y(9), r.Integer = y(10), r.Point = y(12), r.PointD = y(4), r.RandomSeed = y(16), r.RectangleD = y(13), r.Transform = y(17), r.UniqueIDGeneretor = y(14), r.Quicksort = y(24), r.LinkedList = y(11), r.LGraphObject = y(2), r.LGraph = y(5), r.LEdge = y(1), r.LGraphManager = y(6), r.LNode = y(3), r.Layout = y(15), r.LayoutConstants = y(0), r.NeedlemanWunsch = y(25), u.exports = r;
1577
- },
1578
- /* 27 */
1579
- /***/
1580
- function(u, D, y) {
1581
- function r() {
1582
- this.listeners = [];
1583
- }
1584
- var t = r.prototype;
1585
- t.addListener = function(e, i) {
1586
- this.listeners.push({
1587
- event: e,
1588
- callback: i
1589
- });
1590
- }, t.removeListener = function(e, i) {
1591
- for (var o = this.listeners.length; o >= 0; o--) {
1592
- var g = this.listeners[o];
1593
- g.event === e && g.callback === i && this.listeners.splice(o, 1);
1594
- }
1595
- }, t.emit = function(e, i) {
1596
- for (var o = 0; o < this.listeners.length; o++) {
1597
- var g = this.listeners[o];
1598
- e === g.event && g.callback(i);
1599
- }
1600
- }, u.exports = r;
1601
- }
1602
- /******/
1603
- ])
1604
- );
1605
- });
1606
- }(it)), it.exports;
1607
- }
1608
- var gt;
1609
- function Rt() {
1610
- return gt || (gt = 1, function(C, M) {
1611
- (function(D, y) {
1612
- C.exports = y(Ct());
1613
- })(at, function(u) {
1614
- return (
1615
- /******/
1616
- function(D) {
1617
- var y = {};
1618
- function r(t) {
1619
- if (y[t])
1620
- return y[t].exports;
1621
- var e = y[t] = {
1622
- /******/
1623
- i: t,
1624
- /******/
1625
- l: !1,
1626
- /******/
1627
- exports: {}
1628
- /******/
1629
- };
1630
- return D[t].call(e.exports, e, e.exports, r), e.l = !0, e.exports;
1631
- }
1632
- return r.m = D, r.c = y, r.i = function(t) {
1633
- return t;
1634
- }, r.d = function(t, e, i) {
1635
- r.o(t, e) || Object.defineProperty(t, e, {
1636
- /******/
1637
- configurable: !1,
1638
- /******/
1639
- enumerable: !0,
1640
- /******/
1641
- get: i
1642
- /******/
1643
- });
1644
- }, r.n = function(t) {
1645
- var e = t && t.__esModule ? (
1646
- /******/
1647
- function() {
1648
- return t.default;
1649
- }
1650
- ) : (
1651
- /******/
1652
- function() {
1653
- return t;
1654
- }
1655
- );
1656
- return r.d(e, "a", e), e;
1657
- }, r.o = function(t, e) {
1658
- return Object.prototype.hasOwnProperty.call(t, e);
1659
- }, r.p = "", r(r.s = 7);
1660
- }([
1661
- /* 0 */
1662
- /***/
1663
- function(D, y) {
1664
- D.exports = u;
1665
- },
1666
- /* 1 */
1667
- /***/
1668
- function(D, y, r) {
1669
- var t = r(0).FDLayoutConstants;
1670
- function e() {
1671
- }
1672
- for (var i in t)
1673
- e[i] = t[i];
1674
- e.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, e.DEFAULT_RADIAL_SEPARATION = t.DEFAULT_EDGE_LENGTH, e.DEFAULT_COMPONENT_SEPERATION = 60, e.TILE = !0, e.TILING_PADDING_VERTICAL = 10, e.TILING_PADDING_HORIZONTAL = 10, e.TREE_REDUCTION_ON_INCREMENTAL = !1, D.exports = e;
1675
- },
1676
- /* 2 */
1677
- /***/
1678
- function(D, y, r) {
1679
- var t = r(0).FDLayoutEdge;
1680
- function e(o, g, a) {
1681
- t.call(this, o, g, a);
1682
- }
1683
- e.prototype = Object.create(t.prototype);
1684
- for (var i in t)
1685
- e[i] = t[i];
1686
- D.exports = e;
1687
- },
1688
- /* 3 */
1689
- /***/
1690
- function(D, y, r) {
1691
- var t = r(0).LGraph;
1692
- function e(o, g, a) {
1693
- t.call(this, o, g, a);
1694
- }
1695
- e.prototype = Object.create(t.prototype);
1696
- for (var i in t)
1697
- e[i] = t[i];
1698
- D.exports = e;
1699
- },
1700
- /* 4 */
1701
- /***/
1702
- function(D, y, r) {
1703
- var t = r(0).LGraphManager;
1704
- function e(o) {
1705
- t.call(this, o);
1706
- }
1707
- e.prototype = Object.create(t.prototype);
1708
- for (var i in t)
1709
- e[i] = t[i];
1710
- D.exports = e;
1711
- },
1712
- /* 5 */
1713
- /***/
1714
- function(D, y, r) {
1715
- var t = r(0).FDLayoutNode, e = r(0).IMath;
1716
- function i(g, a, v, n) {
1717
- t.call(this, g, a, v, n);
1718
- }
1719
- i.prototype = Object.create(t.prototype);
1720
- for (var o in t)
1721
- i[o] = t[o];
1722
- i.prototype.move = function() {
1723
- var g = this.graphManager.getLayout();
1724
- this.displacementX = g.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = g.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementX = g.coolingFactor * g.maxNodeDisplacement * e.sign(this.displacementX)), Math.abs(this.displacementY) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementY = g.coolingFactor * g.maxNodeDisplacement * e.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), g.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
1725
- }, i.prototype.propogateDisplacementToChildren = function(g, a) {
1726
- for (var v = this.getChild().getNodes(), n, c = 0; c < v.length; c++)
1727
- n = v[c], n.getChild() == null ? (n.moveBy(g, a), n.displacementX += g, n.displacementY += a) : n.propogateDisplacementToChildren(g, a);
1728
- }, i.prototype.setPred1 = function(g) {
1729
- this.pred1 = g;
1730
- }, i.prototype.getPred1 = function() {
1731
- return pred1;
1732
- }, i.prototype.getPred2 = function() {
1733
- return pred2;
1734
- }, i.prototype.setNext = function(g) {
1735
- this.next = g;
1736
- }, i.prototype.getNext = function() {
1737
- return next;
1738
- }, i.prototype.setProcessed = function(g) {
1739
- this.processed = g;
1740
- }, i.prototype.isProcessed = function() {
1741
- return processed;
1742
- }, D.exports = i;
1743
- },
1744
- /* 6 */
1745
- /***/
1746
- function(D, y, r) {
1747
- var t = r(0).FDLayout, e = r(4), i = r(3), o = r(5), g = r(2), a = r(1), v = r(0).FDLayoutConstants, n = r(0).LayoutConstants, c = r(0).Point, l = r(0).PointD, E = r(0).Layout, T = r(0).Integer, m = r(0).IGeometry, L = r(0).LGraph, O = r(0).Transform;
1748
- function d() {
1749
- t.call(this), this.toBeTiled = {};
1750
- }
1751
- d.prototype = Object.create(t.prototype);
1752
- for (var N in t)
1753
- d[N] = t[N];
1754
- d.prototype.newGraphManager = function() {
1755
- var s = new e(this);
1756
- return this.graphManager = s, s;
1757
- }, d.prototype.newGraph = function(s) {
1758
- return new i(null, this.graphManager, s);
1759
- }, d.prototype.newNode = function(s) {
1760
- return new o(this.graphManager, s);
1761
- }, d.prototype.newEdge = function(s) {
1762
- return new g(null, null, s);
1763
- }, d.prototype.initParameters = function() {
1764
- t.prototype.initParameters.call(this, arguments), this.isSubLayout || (a.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = a.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = v.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = v.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = v.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = v.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = v.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = v.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 / v.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = v.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1765
- }, d.prototype.layout = function() {
1766
- var s = n.DEFAULT_CREATE_BENDS_AS_NEEDED;
1767
- return s && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1768
- }, d.prototype.classicLayout = function() {
1769
- 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) {
1770
- if (a.TREE_REDUCTION_ON_INCREMENTAL) {
1771
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1772
- var h = new Set(this.getAllNodes()), f = this.nodesWithGravity.filter(function(I) {
1773
- return h.has(I);
1774
- });
1775
- this.graphManager.setAllNodesToApplyGravitation(f);
1776
- }
1777
- } else {
1778
- var s = this.getFlatForest();
1779
- if (s.length > 0)
1780
- this.positionNodesRadially(s);
1781
- else {
1782
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1783
- var h = new Set(this.getAllNodes()), f = this.nodesWithGravity.filter(function(p) {
1784
- return h.has(p);
1785
- });
1786
- this.graphManager.setAllNodesToApplyGravitation(f), this.positionNodesRandomly();
1787
- }
1788
- }
1789
- return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1790
- }, d.prototype.tick = function() {
1791
- if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1792
- if (this.prunedNodesAll.length > 0)
1793
- this.isTreeGrowing = !0;
1794
- else
1795
- return !0;
1796
- if (this.totalIterations % v.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1797
- if (this.isConverged())
1798
- if (this.prunedNodesAll.length > 0)
1799
- this.isTreeGrowing = !0;
1800
- else
1801
- return !0;
1802
- 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));
1803
- }
1804
- if (this.isTreeGrowing) {
1805
- if (this.growTreeIterations % 10 == 0)
1806
- if (this.prunedNodesAll.length > 0) {
1807
- this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1808
- var s = new Set(this.getAllNodes()), h = this.nodesWithGravity.filter(function(A) {
1809
- return s.has(A);
1810
- });
1811
- this.graphManager.setAllNodesToApplyGravitation(h), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = v.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1812
- } else
1813
- this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1814
- this.growTreeIterations++;
1815
- }
1816
- if (this.isGrowthFinished) {
1817
- if (this.isConverged())
1818
- return !0;
1819
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = v.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1820
- }
1821
- var f = !this.isTreeGrowing && !this.isGrowthFinished, p = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1822
- return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(f, p), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1823
- }, d.prototype.getPositionsData = function() {
1824
- for (var s = this.graphManager.getAllNodes(), h = {}, f = 0; f < s.length; f++) {
1825
- var p = s[f].rect, A = s[f].id;
1826
- h[A] = {
1827
- id: A,
1828
- x: p.getCenterX(),
1829
- y: p.getCenterY(),
1830
- w: p.width,
1831
- h: p.height
1832
- };
1833
- }
1834
- return h;
1835
- }, d.prototype.runSpringEmbedder = function() {
1836
- this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1837
- var s = !1;
1838
- if (v.ANIMATE === "during")
1839
- this.emit("layoutstarted");
1840
- else {
1841
- for (; !s; )
1842
- s = this.tick();
1843
- this.graphManager.updateBounds();
1844
- }
1845
- }, d.prototype.calculateNodesToApplyGravitationTo = function() {
1846
- var s = [], h, f = this.graphManager.getGraphs(), p = f.length, A;
1847
- for (A = 0; A < p; A++)
1848
- h = f[A], h.updateConnected(), h.isConnected || (s = s.concat(h.getNodes()));
1849
- return s;
1850
- }, d.prototype.createBendpoints = function() {
1851
- var s = [];
1852
- s = s.concat(this.graphManager.getAllEdges());
1853
- var h = /* @__PURE__ */ new Set(), f;
1854
- for (f = 0; f < s.length; f++) {
1855
- var p = s[f];
1856
- if (!h.has(p)) {
1857
- var A = p.getSource(), I = p.getTarget();
1858
- if (A == I)
1859
- p.getBendpoints().push(new l()), p.getBendpoints().push(new l()), this.createDummyNodesForBendpoints(p), h.add(p);
1860
- else {
1861
- var R = [];
1862
- if (R = R.concat(A.getEdgeListToNode(I)), R = R.concat(I.getEdgeListToNode(A)), !h.has(R[0])) {
1863
- if (R.length > 1) {
1864
- var x;
1865
- for (x = 0; x < R.length; x++) {
1866
- var G = R[x];
1867
- G.getBendpoints().push(new l()), this.createDummyNodesForBendpoints(G);
1868
- }
1869
- }
1870
- R.forEach(function(U) {
1871
- h.add(U);
1872
- });
1873
- }
1874
- }
1875
- }
1876
- if (h.size == s.length)
1877
- break;
1878
- }
1879
- }, d.prototype.positionNodesRadially = function(s) {
1880
- for (var h = new c(0, 0), f = Math.ceil(Math.sqrt(s.length)), p = 0, A = 0, I = 0, R = new l(0, 0), x = 0; x < s.length; x++) {
1881
- x % f == 0 && (I = 0, A = p, x != 0 && (A += a.DEFAULT_COMPONENT_SEPERATION), p = 0);
1882
- var G = s[x], U = E.findCenterOfTree(G);
1883
- h.x = I, h.y = A, R = d.radialLayout(G, U, h), R.y > p && (p = Math.floor(R.y)), I = Math.floor(R.x + a.DEFAULT_COMPONENT_SEPERATION);
1884
- }
1885
- this.transform(new l(n.WORLD_CENTER_X - R.x / 2, n.WORLD_CENTER_Y - R.y / 2));
1886
- }, d.radialLayout = function(s, h, f) {
1887
- var p = Math.max(this.maxDiagonalInTree(s), a.DEFAULT_RADIAL_SEPARATION);
1888
- d.branchRadialLayout(h, null, 0, 359, 0, p);
1889
- var A = L.calculateBounds(s), I = new O();
1890
- I.setDeviceOrgX(A.getMinX()), I.setDeviceOrgY(A.getMinY()), I.setWorldOrgX(f.x), I.setWorldOrgY(f.y);
1891
- for (var R = 0; R < s.length; R++) {
1892
- var x = s[R];
1893
- x.transform(I);
1894
- }
1895
- var G = new l(A.getMaxX(), A.getMaxY());
1896
- return I.inverseTransformPoint(G);
1897
- }, d.branchRadialLayout = function(s, h, f, p, A, I) {
1898
- var R = (p - f + 1) / 2;
1899
- R < 0 && (R += 180);
1900
- var x = (R + f) % 360, G = x * m.TWO_PI / 360, U = A * Math.cos(G), X = A * Math.sin(G);
1901
- s.setCenter(U, X);
1902
- var w = [];
1903
- w = w.concat(s.getEdges());
1904
- var S = w.length;
1905
- h != null && S--;
1906
- for (var F = 0, b = w.length, Y, k = s.getEdgesBetween(h); k.length > 1; ) {
1907
- var H = k[0];
1908
- k.splice(0, 1);
1909
- var P = w.indexOf(H);
1910
- P >= 0 && w.splice(P, 1), b--, S--;
1911
- }
1912
- h != null ? Y = (w.indexOf(k[0]) + 1) % b : Y = 0;
1913
- for (var W = Math.abs(p - f) / S, $ = Y; F != S; $ = ++$ % b) {
1914
- var j = w[$].getOtherEnd(s);
1915
- if (j != h) {
1916
- var V = (f + F * W) % 360, z = (V + W) % 360;
1917
- d.branchRadialLayout(j, s, V, z, A + I, I), F++;
1918
- }
1919
- }
1920
- }, d.maxDiagonalInTree = function(s) {
1921
- for (var h = T.MIN_VALUE, f = 0; f < s.length; f++) {
1922
- var p = s[f], A = p.getDiagonal();
1923
- A > h && (h = A);
1924
- }
1925
- return h;
1926
- }, d.prototype.calcRepulsionRange = function() {
1927
- return 2 * (this.level + 1) * this.idealEdgeLength;
1928
- }, d.prototype.groupZeroDegreeMembers = function() {
1929
- var s = this, h = {};
1930
- this.memberGroups = {}, this.idToDummyNode = {};
1931
- for (var f = [], p = this.graphManager.getAllNodes(), A = 0; A < p.length; A++) {
1932
- var I = p[A], R = I.getParent();
1933
- this.getNodeDegreeWithChildren(I) === 0 && (R.id == null || !this.getToBeTiled(R)) && f.push(I);
1934
- }
1935
- for (var A = 0; A < f.length; A++) {
1936
- var I = f[A], x = I.getParent().id;
1937
- typeof h[x] > "u" && (h[x] = []), h[x] = h[x].concat(I);
1938
- }
1939
- Object.keys(h).forEach(function(G) {
1940
- if (h[G].length > 1) {
1941
- var U = "DummyCompound_" + G;
1942
- s.memberGroups[U] = h[G];
1943
- var X = h[G][0].getParent(), w = new o(s.graphManager);
1944
- w.id = U, w.paddingLeft = X.paddingLeft || 0, w.paddingRight = X.paddingRight || 0, w.paddingBottom = X.paddingBottom || 0, w.paddingTop = X.paddingTop || 0, s.idToDummyNode[U] = w;
1945
- var S = s.getGraphManager().add(s.newGraph(), w), F = X.getChild();
1946
- F.add(w);
1947
- for (var b = 0; b < h[G].length; b++) {
1948
- var Y = h[G][b];
1949
- F.remove(Y), S.add(Y);
1950
- }
1951
- }
1952
- });
1953
- }, d.prototype.clearCompounds = function() {
1954
- var s = {}, h = {};
1955
- this.performDFSOnCompounds();
1956
- for (var f = 0; f < this.compoundOrder.length; f++)
1957
- h[this.compoundOrder[f].id] = this.compoundOrder[f], s[this.compoundOrder[f].id] = [].concat(this.compoundOrder[f].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[f].getChild()), this.compoundOrder[f].child = null;
1958
- this.graphManager.resetAllNodes(), this.tileCompoundMembers(s, h);
1959
- }, d.prototype.clearZeroDegreeMembers = function() {
1960
- var s = this, h = this.tiledZeroDegreePack = [];
1961
- Object.keys(this.memberGroups).forEach(function(f) {
1962
- var p = s.idToDummyNode[f];
1963
- h[f] = s.tileNodes(s.memberGroups[f], p.paddingLeft + p.paddingRight), p.rect.width = h[f].width, p.rect.height = h[f].height;
1964
- });
1965
- }, d.prototype.repopulateCompounds = function() {
1966
- for (var s = this.compoundOrder.length - 1; s >= 0; s--) {
1967
- var h = this.compoundOrder[s], f = h.id, p = h.paddingLeft, A = h.paddingTop;
1968
- this.adjustLocations(this.tiledMemberPack[f], h.rect.x, h.rect.y, p, A);
1969
- }
1970
- }, d.prototype.repopulateZeroDegreeMembers = function() {
1971
- var s = this, h = this.tiledZeroDegreePack;
1972
- Object.keys(h).forEach(function(f) {
1973
- var p = s.idToDummyNode[f], A = p.paddingLeft, I = p.paddingTop;
1974
- s.adjustLocations(h[f], p.rect.x, p.rect.y, A, I);
1975
- });
1976
- }, d.prototype.getToBeTiled = function(s) {
1977
- var h = s.id;
1978
- if (this.toBeTiled[h] != null)
1979
- return this.toBeTiled[h];
1980
- var f = s.getChild();
1981
- if (f == null)
1982
- return this.toBeTiled[h] = !1, !1;
1983
- for (var p = f.getNodes(), A = 0; A < p.length; A++) {
1984
- var I = p[A];
1985
- if (this.getNodeDegree(I) > 0)
1986
- return this.toBeTiled[h] = !1, !1;
1987
- if (I.getChild() == null) {
1988
- this.toBeTiled[I.id] = !1;
1989
- continue;
1990
- }
1991
- if (!this.getToBeTiled(I))
1992
- return this.toBeTiled[h] = !1, !1;
1993
- }
1994
- return this.toBeTiled[h] = !0, !0;
1995
- }, d.prototype.getNodeDegree = function(s) {
1996
- s.id;
1997
- for (var h = s.getEdges(), f = 0, p = 0; p < h.length; p++) {
1998
- var A = h[p];
1999
- A.getSource().id !== A.getTarget().id && (f = f + 1);
2000
- }
2001
- return f;
2002
- }, d.prototype.getNodeDegreeWithChildren = function(s) {
2003
- var h = this.getNodeDegree(s);
2004
- if (s.getChild() == null)
2005
- return h;
2006
- for (var f = s.getChild().getNodes(), p = 0; p < f.length; p++) {
2007
- var A = f[p];
2008
- h += this.getNodeDegreeWithChildren(A);
2009
- }
2010
- return h;
2011
- }, d.prototype.performDFSOnCompounds = function() {
2012
- this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2013
- }, d.prototype.fillCompexOrderByDFS = function(s) {
2014
- for (var h = 0; h < s.length; h++) {
2015
- var f = s[h];
2016
- f.getChild() != null && this.fillCompexOrderByDFS(f.getChild().getNodes()), this.getToBeTiled(f) && this.compoundOrder.push(f);
2017
- }
2018
- }, d.prototype.adjustLocations = function(s, h, f, p, A) {
2019
- h += p, f += A;
2020
- for (var I = h, R = 0; R < s.rows.length; R++) {
2021
- var x = s.rows[R];
2022
- h = I;
2023
- for (var G = 0, U = 0; U < x.length; U++) {
2024
- var X = x[U];
2025
- X.rect.x = h, X.rect.y = f, h += X.rect.width + s.horizontalPadding, X.rect.height > G && (G = X.rect.height);
2026
- }
2027
- f += G + s.verticalPadding;
2028
- }
2029
- }, d.prototype.tileCompoundMembers = function(s, h) {
2030
- var f = this;
2031
- this.tiledMemberPack = [], Object.keys(s).forEach(function(p) {
2032
- var A = h[p];
2033
- f.tiledMemberPack[p] = f.tileNodes(s[p], A.paddingLeft + A.paddingRight), A.rect.width = f.tiledMemberPack[p].width, A.rect.height = f.tiledMemberPack[p].height;
2034
- });
2035
- }, d.prototype.tileNodes = function(s, h) {
2036
- var f = a.TILING_PADDING_VERTICAL, p = a.TILING_PADDING_HORIZONTAL, A = {
2037
- rows: [],
2038
- rowWidth: [],
2039
- rowHeight: [],
2040
- width: 0,
2041
- height: h,
2042
- // assume minHeight equals to minWidth
2043
- verticalPadding: f,
2044
- horizontalPadding: p
2045
- };
2046
- s.sort(function(x, G) {
2047
- return x.rect.width * x.rect.height > G.rect.width * G.rect.height ? -1 : x.rect.width * x.rect.height < G.rect.width * G.rect.height ? 1 : 0;
2048
- });
2049
- for (var I = 0; I < s.length; I++) {
2050
- var R = s[I];
2051
- A.rows.length == 0 ? this.insertNodeToRow(A, R, 0, h) : this.canAddHorizontal(A, R.rect.width, R.rect.height) ? this.insertNodeToRow(A, R, this.getShortestRowIndex(A), h) : this.insertNodeToRow(A, R, A.rows.length, h), this.shiftToLastRow(A);
2052
- }
2053
- return A;
2054
- }, d.prototype.insertNodeToRow = function(s, h, f, p) {
2055
- var A = p;
2056
- if (f == s.rows.length) {
2057
- var I = [];
2058
- s.rows.push(I), s.rowWidth.push(A), s.rowHeight.push(0);
2059
- }
2060
- var R = s.rowWidth[f] + h.rect.width;
2061
- s.rows[f].length > 0 && (R += s.horizontalPadding), s.rowWidth[f] = R, s.width < R && (s.width = R);
2062
- var x = h.rect.height;
2063
- f > 0 && (x += s.verticalPadding);
2064
- var G = 0;
2065
- x > s.rowHeight[f] && (G = s.rowHeight[f], s.rowHeight[f] = x, G = s.rowHeight[f] - G), s.height += G, s.rows[f].push(h);
2066
- }, d.prototype.getShortestRowIndex = function(s) {
2067
- for (var h = -1, f = Number.MAX_VALUE, p = 0; p < s.rows.length; p++)
2068
- s.rowWidth[p] < f && (h = p, f = s.rowWidth[p]);
2069
- return h;
2070
- }, d.prototype.getLongestRowIndex = function(s) {
2071
- for (var h = -1, f = Number.MIN_VALUE, p = 0; p < s.rows.length; p++)
2072
- s.rowWidth[p] > f && (h = p, f = s.rowWidth[p]);
2073
- return h;
2074
- }, d.prototype.canAddHorizontal = function(s, h, f) {
2075
- var p = this.getShortestRowIndex(s);
2076
- if (p < 0)
2077
- return !0;
2078
- var A = s.rowWidth[p];
2079
- if (A + s.horizontalPadding + h <= s.width) return !0;
2080
- var I = 0;
2081
- s.rowHeight[p] < f && p > 0 && (I = f + s.verticalPadding - s.rowHeight[p]);
2082
- var R;
2083
- s.width - A >= h + s.horizontalPadding ? R = (s.height + I) / (A + h + s.horizontalPadding) : R = (s.height + I) / s.width, I = f + s.verticalPadding;
2084
- var x;
2085
- return s.width < h ? x = (s.height + I) / h : x = (s.height + I) / s.width, x < 1 && (x = 1 / x), R < 1 && (R = 1 / R), R < x;
2086
- }, d.prototype.shiftToLastRow = function(s) {
2087
- var h = this.getLongestRowIndex(s), f = s.rowWidth.length - 1, p = s.rows[h], A = p[p.length - 1], I = A.width + s.horizontalPadding;
2088
- if (s.width - s.rowWidth[f] > I && h != f) {
2089
- p.splice(-1, 1), s.rows[f].push(A), s.rowWidth[h] = s.rowWidth[h] - I, s.rowWidth[f] = s.rowWidth[f] + I, s.width = s.rowWidth[instance.getLongestRowIndex(s)];
2090
- for (var R = Number.MIN_VALUE, x = 0; x < p.length; x++)
2091
- p[x].height > R && (R = p[x].height);
2092
- h > 0 && (R += s.verticalPadding);
2093
- var G = s.rowHeight[h] + s.rowHeight[f];
2094
- s.rowHeight[h] = R, s.rowHeight[f] < A.height + s.verticalPadding && (s.rowHeight[f] = A.height + s.verticalPadding);
2095
- var U = s.rowHeight[h] + s.rowHeight[f];
2096
- s.height += U - G, this.shiftToLastRow(s);
2097
- }
2098
- }, d.prototype.tilingPreLayout = function() {
2099
- a.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2100
- }, d.prototype.tilingPostLayout = function() {
2101
- a.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2102
- }, d.prototype.reduceTrees = function() {
2103
- for (var s = [], h = !0, f; h; ) {
2104
- var p = this.graphManager.getAllNodes(), A = [];
2105
- h = !1;
2106
- for (var I = 0; I < p.length; I++)
2107
- f = p[I], f.getEdges().length == 1 && !f.getEdges()[0].isInterGraph && f.getChild() == null && (A.push([f, f.getEdges()[0], f.getOwner()]), h = !0);
2108
- if (h == !0) {
2109
- for (var R = [], x = 0; x < A.length; x++)
2110
- A[x][0].getEdges().length == 1 && (R.push(A[x]), A[x][0].getOwner().remove(A[x][0]));
2111
- s.push(R), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2112
- }
2113
- }
2114
- this.prunedNodesAll = s;
2115
- }, d.prototype.growTree = function(s) {
2116
- for (var h = s.length, f = s[h - 1], p, A = 0; A < f.length; A++)
2117
- p = f[A], this.findPlaceforPrunedNode(p), p[2].add(p[0]), p[2].add(p[1], p[1].source, p[1].target);
2118
- s.splice(s.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2119
- }, d.prototype.findPlaceforPrunedNode = function(s) {
2120
- var h, f, p = s[0];
2121
- p == s[1].source ? f = s[1].target : f = s[1].source;
2122
- var A = f.startX, I = f.finishX, R = f.startY, x = f.finishY, G = 0, U = 0, X = 0, w = 0, S = [G, X, U, w];
2123
- if (R > 0)
2124
- for (var F = A; F <= I; F++)
2125
- S[0] += this.grid[F][R - 1].length + this.grid[F][R].length - 1;
2126
- if (I < this.grid.length - 1)
2127
- for (var F = R; F <= x; F++)
2128
- S[1] += this.grid[I + 1][F].length + this.grid[I][F].length - 1;
2129
- if (x < this.grid[0].length - 1)
2130
- for (var F = A; F <= I; F++)
2131
- S[2] += this.grid[F][x + 1].length + this.grid[F][x].length - 1;
2132
- if (A > 0)
2133
- for (var F = R; F <= x; F++)
2134
- S[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
2135
- for (var b = T.MAX_VALUE, Y, k, H = 0; H < S.length; H++)
2136
- S[H] < b ? (b = S[H], Y = 1, k = H) : S[H] == b && Y++;
2137
- if (Y == 3 && b == 0)
2138
- S[0] == 0 && S[1] == 0 && S[2] == 0 ? h = 1 : S[0] == 0 && S[1] == 0 && S[3] == 0 ? h = 0 : S[0] == 0 && S[2] == 0 && S[3] == 0 ? h = 3 : S[1] == 0 && S[2] == 0 && S[3] == 0 && (h = 2);
2139
- else if (Y == 2 && b == 0) {
2140
- var P = Math.floor(Math.random() * 2);
2141
- S[0] == 0 && S[1] == 0 ? P == 0 ? h = 0 : h = 1 : S[0] == 0 && S[2] == 0 ? P == 0 ? h = 0 : h = 2 : S[0] == 0 && S[3] == 0 ? P == 0 ? h = 0 : h = 3 : S[1] == 0 && S[2] == 0 ? P == 0 ? h = 1 : h = 2 : S[1] == 0 && S[3] == 0 ? P == 0 ? h = 1 : h = 3 : P == 0 ? h = 2 : h = 3;
2142
- } else if (Y == 4 && b == 0) {
2143
- var P = Math.floor(Math.random() * 4);
2144
- h = P;
2145
- } else
2146
- h = k;
2147
- h == 0 ? p.setCenter(f.getCenterX(), f.getCenterY() - f.getHeight() / 2 - v.DEFAULT_EDGE_LENGTH - p.getHeight() / 2) : h == 1 ? p.setCenter(f.getCenterX() + f.getWidth() / 2 + v.DEFAULT_EDGE_LENGTH + p.getWidth() / 2, f.getCenterY()) : h == 2 ? p.setCenter(f.getCenterX(), f.getCenterY() + f.getHeight() / 2 + v.DEFAULT_EDGE_LENGTH + p.getHeight() / 2) : p.setCenter(f.getCenterX() - f.getWidth() / 2 - v.DEFAULT_EDGE_LENGTH - p.getWidth() / 2, f.getCenterY());
2148
- }, D.exports = d;
2149
- },
2150
- /* 7 */
2151
- /***/
2152
- function(D, y, r) {
2153
- var t = {};
2154
- t.layoutBase = r(0), t.CoSEConstants = r(1), t.CoSEEdge = r(2), t.CoSEGraph = r(3), t.CoSEGraphManager = r(4), t.CoSELayout = r(6), t.CoSENode = r(5), D.exports = t;
2155
- }
2156
- /******/
2157
- ])
2158
- );
2159
- });
2160
- }(rt)), rt.exports;
2161
- }
2162
- (function(C, M) {
2163
- (function(D, y) {
2164
- C.exports = y(Rt());
2165
- })(at, function(u) {
2166
- return (
2167
- /******/
2168
- function(D) {
2169
- var y = {};
2170
- function r(t) {
2171
- if (y[t])
2172
- return y[t].exports;
2173
- var e = y[t] = {
2174
- /******/
2175
- i: t,
2176
- /******/
2177
- l: !1,
2178
- /******/
2179
- exports: {}
2180
- /******/
2181
- };
2182
- return D[t].call(e.exports, e, e.exports, r), e.l = !0, e.exports;
2183
- }
2184
- return r.m = D, r.c = y, r.i = function(t) {
2185
- return t;
2186
- }, r.d = function(t, e, i) {
2187
- r.o(t, e) || Object.defineProperty(t, e, {
2188
- /******/
2189
- configurable: !1,
2190
- /******/
2191
- enumerable: !0,
2192
- /******/
2193
- get: i
2194
- /******/
2195
- });
2196
- }, r.n = function(t) {
2197
- var e = t && t.__esModule ? (
2198
- /******/
2199
- function() {
2200
- return t.default;
2201
- }
2202
- ) : (
2203
- /******/
2204
- function() {
2205
- return t;
2206
- }
2207
- );
2208
- return r.d(e, "a", e), e;
2209
- }, r.o = function(t, e) {
2210
- return Object.prototype.hasOwnProperty.call(t, e);
2211
- }, r.p = "", r(r.s = 1);
2212
- }([
2213
- /* 0 */
2214
- /***/
2215
- function(D, y) {
2216
- D.exports = u;
2217
- },
2218
- /* 1 */
2219
- /***/
2220
- function(D, y, r) {
2221
- var t = r(0).layoutBase.LayoutConstants, e = r(0).layoutBase.FDLayoutConstants, i = r(0).CoSEConstants, o = r(0).CoSELayout, g = r(0).CoSENode, a = r(0).layoutBase.PointD, v = r(0).layoutBase.DimensionD, n = {
2222
- // Called on `layoutready`
2223
- ready: function() {
2224
- },
2225
- // Called on `layoutstop`
2226
- stop: function() {
2227
- },
2228
- // 'draft', 'default' or 'proof"
2229
- // - 'draft' fast cooling rate
2230
- // - 'default' moderate cooling rate
2231
- // - "proof" slow cooling rate
2232
- quality: "default",
2233
- // include labels in node dimensions
2234
- nodeDimensionsIncludeLabels: !1,
2235
- // number of ticks per frame; higher is faster but more jerky
2236
- refresh: 30,
2237
- // Whether to fit the network view after when done
2238
- fit: !0,
2239
- // Padding on fit
2240
- padding: 10,
2241
- // Whether to enable incremental mode
2242
- randomize: !0,
2243
- // Node repulsion (non overlapping) multiplier
2244
- nodeRepulsion: 4500,
2245
- // Ideal edge (non nested) length
2246
- idealEdgeLength: 50,
2247
- // Divisor to compute edge forces
2248
- edgeElasticity: 0.45,
2249
- // Nesting factor (multiplier) to compute ideal edge length for nested edges
2250
- nestingFactor: 0.1,
2251
- // Gravity force (constant)
2252
- gravity: 0.25,
2253
- // Maximum number of iterations to perform
2254
- numIter: 2500,
2255
- // For enabling tiling
2256
- tile: !0,
2257
- // Type of layout animation. The option set is {'during', 'end', false}
2258
- animate: "end",
2259
- // Duration for animate:end
2260
- animationDuration: 500,
2261
- // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2262
- tilingPaddingVertical: 10,
2263
- // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2264
- tilingPaddingHorizontal: 10,
2265
- // Gravity range (constant) for compounds
2266
- gravityRangeCompound: 1.5,
2267
- // Gravity force (constant) for compounds
2268
- gravityCompound: 1,
2269
- // Gravity range (constant)
2270
- gravityRange: 3.8,
2271
- // Initial cooling factor for incremental layout
2272
- initialEnergyOnIncremental: 0.5
2273
- };
2274
- function c(m, L) {
2275
- var O = {};
2276
- for (var d in m)
2277
- O[d] = m[d];
2278
- for (var d in L)
2279
- O[d] = L[d];
2280
- return O;
2281
- }
2282
- function l(m) {
2283
- this.options = c(n, m), E(this.options);
2284
- }
2285
- var E = function(L) {
2286
- L.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = e.DEFAULT_REPULSION_STRENGTH = L.nodeRepulsion), L.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = e.DEFAULT_EDGE_LENGTH = L.idealEdgeLength), L.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = e.DEFAULT_SPRING_STRENGTH = L.edgeElasticity), L.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = L.nestingFactor), L.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = e.DEFAULT_GRAVITY_STRENGTH = L.gravity), L.numIter != null && (i.MAX_ITERATIONS = e.MAX_ITERATIONS = L.numIter), L.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = e.DEFAULT_GRAVITY_RANGE_FACTOR = L.gravityRange), L.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = L.gravityCompound), L.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = L.gravityRangeCompound), L.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.DEFAULT_COOLING_FACTOR_INCREMENTAL = L.initialEnergyOnIncremental), L.quality == "draft" ? t.QUALITY = 0 : L.quality == "proof" ? t.QUALITY = 2 : t.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = L.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = !L.randomize, i.ANIMATE = e.ANIMATE = t.ANIMATE = L.animate, i.TILE = L.tile, i.TILING_PADDING_VERTICAL = typeof L.tilingPaddingVertical == "function" ? L.tilingPaddingVertical.call() : L.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof L.tilingPaddingHorizontal == "function" ? L.tilingPaddingHorizontal.call() : L.tilingPaddingHorizontal;
2287
- };
2288
- l.prototype.run = function() {
2289
- var m, L, O = this.options;
2290
- this.idToLNode = {};
2291
- var d = this.layout = new o(), N = this;
2292
- N.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2293
- var s = d.newGraphManager();
2294
- this.gm = s;
2295
- var h = this.options.eles.nodes(), f = this.options.eles.edges();
2296
- this.root = s.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(h), d);
2297
- for (var p = 0; p < f.length; p++) {
2298
- var A = f[p], I = this.idToLNode[A.data("source")], R = this.idToLNode[A.data("target")];
2299
- if (I !== R && I.getEdgesBetween(R).length == 0) {
2300
- var x = s.add(d.newEdge(), I, R);
2301
- x.id = A.id();
2302
- }
2303
- }
2304
- var G = function(w, S) {
2305
- typeof w == "number" && (w = S);
2306
- var F = w.data("id"), b = N.idToLNode[F];
2307
- return {
2308
- x: b.getRect().getCenterX(),
2309
- y: b.getRect().getCenterY()
2310
- };
2311
- }, U = function X() {
2312
- for (var w = function() {
2313
- O.fit && O.cy.fit(O.eles, O.padding), m || (m = !0, N.cy.one("layoutready", O.ready), N.cy.trigger({ type: "layoutready", layout: N }));
2314
- }, S = N.options.refresh, F, b = 0; b < S && !F; b++)
2315
- F = N.stopped || N.layout.tick();
2316
- if (F) {
2317
- d.checkLayoutSuccess() && !d.isSubLayout && d.doPostLayout(), d.tilingPostLayout && d.tilingPostLayout(), d.isLayoutFinished = !0, N.options.eles.nodes().positions(G), w(), N.cy.one("layoutstop", N.options.stop), N.cy.trigger({ type: "layoutstop", layout: N }), L && cancelAnimationFrame(L), m = !1;
2318
- return;
2319
- }
2320
- var Y = N.layout.getPositionsData();
2321
- O.eles.nodes().positions(function(k, H) {
2322
- if (typeof k == "number" && (k = H), !k.isParent()) {
2323
- for (var P = k.id(), W = Y[P], $ = k; W == null && (W = Y[$.data("parent")] || Y["DummyCompound_" + $.data("parent")], Y[P] = W, $ = $.parent()[0], $ != null); )
2324
- ;
2325
- return W != null ? {
2326
- x: W.x,
2327
- y: W.y
2328
- } : {
2329
- x: k.position("x"),
2330
- y: k.position("y")
2331
- };
2332
- }
2333
- }), w(), L = requestAnimationFrame(X);
2334
- };
2335
- return d.addListener("layoutstarted", function() {
2336
- N.options.animate === "during" && (L = requestAnimationFrame(U));
2337
- }), d.runLayout(), this.options.animate !== "during" && (N.options.eles.nodes().not(":parent").layoutPositions(N, N.options, G), m = !1), this;
2338
- }, l.prototype.getTopMostNodes = function(m) {
2339
- for (var L = {}, O = 0; O < m.length; O++)
2340
- L[m[O].id()] = !0;
2341
- var d = m.filter(function(N, s) {
2342
- typeof N == "number" && (N = s);
2343
- for (var h = N.parent()[0]; h != null; ) {
2344
- if (L[h.id()])
2345
- return !1;
2346
- h = h.parent()[0];
2347
- }
2348
- return !0;
2349
- });
2350
- return d;
2351
- }, l.prototype.processChildrenList = function(m, L, O) {
2352
- for (var d = L.length, N = 0; N < d; N++) {
2353
- var s = L[N], h = s.children(), f, p = s.layoutDimensions({
2354
- nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2355
- });
2356
- if (s.outerWidth() != null && s.outerHeight() != null ? f = m.add(new g(O.graphManager, new a(s.position("x") - p.w / 2, s.position("y") - p.h / 2), new v(parseFloat(p.w), parseFloat(p.h)))) : f = m.add(new g(this.graphManager)), f.id = s.data("id"), f.paddingLeft = parseInt(s.css("padding")), f.paddingTop = parseInt(s.css("padding")), f.paddingRight = parseInt(s.css("padding")), f.paddingBottom = parseInt(s.css("padding")), this.options.nodeDimensionsIncludeLabels && s.isParent()) {
2357
- var A = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, I = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, R = s.css("text-halign");
2358
- f.labelWidth = A, f.labelHeight = I, f.labelPos = R;
2359
- }
2360
- if (this.idToLNode[s.data("id")] = f, isNaN(f.rect.x) && (f.rect.x = 0), isNaN(f.rect.y) && (f.rect.y = 0), h != null && h.length > 0) {
2361
- var x;
2362
- x = O.getGraphManager().add(O.newGraph(), f), this.processChildrenList(x, h, O);
2363
- }
2364
- }
2365
- }, l.prototype.stop = function() {
2366
- return this.stopped = !0, this;
2367
- };
2368
- var T = function(L) {
2369
- L("layout", "cose-bilkent", l);
2370
- };
2371
- typeof cytoscape < "u" && T(cytoscape), D.exports = T;
2372
- }
2373
- /******/
2374
- ])
2375
- );
2376
- });
2377
- })(ft);
2378
- var xt = ft.exports;
2379
- const Mt = /* @__PURE__ */ It(xt);
2380
- var st = function() {
2381
- var C = /* @__PURE__ */ _(function(O, d, N, s) {
2382
- for (N = N || {}, s = O.length; s--; N[O[s]] = d) ;
2383
- return N;
2384
- }, "o"), M = [1, 4], u = [1, 13], D = [1, 12], y = [1, 15], r = [1, 16], t = [1, 20], e = [1, 19], i = [6, 7, 8], o = [1, 26], g = [1, 24], a = [1, 25], v = [6, 7, 11], n = [1, 6, 13, 15, 16, 19, 22], c = [1, 33], l = [1, 34], E = [1, 6, 7, 11, 13, 15, 16, 19, 22], T = {
2385
- trace: /* @__PURE__ */ _(function() {
2386
- }, "trace"),
2387
- yy: {},
2388
- symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
2389
- terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
2390
- productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
2391
- performAction: /* @__PURE__ */ _(function(d, N, s, h, f, p, A) {
2392
- var I = p.length - 1;
2393
- switch (f) {
2394
- case 6:
2395
- case 7:
2396
- return h;
2397
- case 8:
2398
- h.getLogger().trace("Stop NL ");
2399
- break;
2400
- case 9:
2401
- h.getLogger().trace("Stop EOF ");
2402
- break;
2403
- case 11:
2404
- h.getLogger().trace("Stop NL2 ");
2405
- break;
2406
- case 12:
2407
- h.getLogger().trace("Stop EOF2 ");
2408
- break;
2409
- case 15:
2410
- h.getLogger().info("Node: ", p[I].id), h.addNode(p[I - 1].length, p[I].id, p[I].descr, p[I].type);
2411
- break;
2412
- case 16:
2413
- h.getLogger().trace("Icon: ", p[I]), h.decorateNode({ icon: p[I] });
2414
- break;
2415
- case 17:
2416
- case 21:
2417
- h.decorateNode({ class: p[I] });
2418
- break;
2419
- case 18:
2420
- h.getLogger().trace("SPACELIST");
2421
- break;
2422
- case 19:
2423
- h.getLogger().trace("Node: ", p[I].id), h.addNode(0, p[I].id, p[I].descr, p[I].type);
2424
- break;
2425
- case 20:
2426
- h.decorateNode({ icon: p[I] });
2427
- break;
2428
- case 25:
2429
- h.getLogger().trace("node found ..", p[I - 2]), this.$ = { id: p[I - 1], descr: p[I - 1], type: h.getType(p[I - 2], p[I]) };
2430
- break;
2431
- case 26:
2432
- this.$ = { id: p[I], descr: p[I], type: h.nodeType.DEFAULT };
2433
- break;
2434
- case 27:
2435
- h.getLogger().trace("node found ..", p[I - 3]), this.$ = { id: p[I - 3], descr: p[I - 1], type: h.getType(p[I - 2], p[I]) };
2436
- break;
2437
- }
2438
- }, "anonymous"),
2439
- table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: M }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: M }, { 6: u, 7: [1, 10], 9: 9, 12: 11, 13: D, 14: 14, 15: y, 16: r, 17: 17, 18: 18, 19: t, 22: e }, C(i, [2, 3]), { 1: [2, 2] }, C(i, [2, 4]), C(i, [2, 5]), { 1: [2, 6], 6: u, 12: 21, 13: D, 14: 14, 15: y, 16: r, 17: 17, 18: 18, 19: t, 22: e }, { 6: u, 9: 22, 12: 11, 13: D, 14: 14, 15: y, 16: r, 17: 17, 18: 18, 19: t, 22: e }, { 6: o, 7: g, 10: 23, 11: a }, C(v, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: t, 22: e }), C(v, [2, 18]), C(v, [2, 19]), C(v, [2, 20]), C(v, [2, 21]), C(v, [2, 23]), C(v, [2, 24]), C(v, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: o, 7: g, 10: 32, 11: a }, { 1: [2, 7], 6: u, 12: 21, 13: D, 14: 14, 15: y, 16: r, 17: 17, 18: 18, 19: t, 22: e }, C(n, [2, 14], { 7: c, 11: l }), C(E, [2, 8]), C(E, [2, 9]), C(E, [2, 10]), C(v, [2, 15]), C(v, [2, 16]), C(v, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, C(n, [2, 13], { 7: c, 11: l }), C(E, [2, 11]), C(E, [2, 12]), { 21: [1, 37] }, C(v, [2, 25]), C(v, [2, 27])],
2440
- defaultActions: { 2: [2, 1], 6: [2, 2] },
2441
- parseError: /* @__PURE__ */ _(function(d, N) {
2442
- if (N.recoverable)
2443
- this.trace(d);
2444
- else {
2445
- var s = new Error(d);
2446
- throw s.hash = N, s;
2447
- }
2448
- }, "parseError"),
2449
- parse: /* @__PURE__ */ _(function(d) {
2450
- var N = this, s = [0], h = [], f = [null], p = [], A = this.table, I = "", R = 0, x = 0, G = 2, U = 1, X = p.slice.call(arguments, 1), w = Object.create(this.lexer), S = { yy: {} };
2451
- for (var F in this.yy)
2452
- Object.prototype.hasOwnProperty.call(this.yy, F) && (S.yy[F] = this.yy[F]);
2453
- w.setInput(d, S.yy), S.yy.lexer = w, S.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
2454
- var b = w.yylloc;
2455
- p.push(b);
2456
- var Y = w.options && w.options.ranges;
2457
- typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
2458
- function k(B) {
2459
- s.length = s.length - 2 * B, f.length = f.length - B, p.length = p.length - B;
2460
- }
2461
- _(k, "popStack");
2462
- function H() {
2463
- var B;
2464
- return B = h.pop() || w.lex() || U, typeof B != "number" && (B instanceof Array && (h = B, B = h.pop()), B = N.symbols_[B] || B), B;
2465
- }
2466
- _(H, "lex");
2467
- for (var P, W, $, j, V = {}, z, Z, lt, J; ; ) {
2468
- if (W = s[s.length - 1], this.defaultActions[W] ? $ = this.defaultActions[W] : ((P === null || typeof P > "u") && (P = H()), $ = A[W] && A[W][P]), typeof $ > "u" || !$.length || !$[0]) {
2469
- var et = "";
2470
- J = [];
2471
- for (z in A[W])
2472
- this.terminals_[z] && z > G && J.push("'" + this.terminals_[z] + "'");
2473
- w.showPosition ? et = "Parse error on line " + (R + 1) + `:
2474
- ` + w.showPosition() + `
2475
- Expecting ` + J.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et = "Parse error on line " + (R + 1) + ": Unexpected " + (P == U ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(et, {
2476
- text: w.match,
2477
- token: this.terminals_[P] || P,
2478
- line: w.yylineno,
2479
- loc: b,
2480
- expected: J
2481
- });
2482
- }
2483
- if ($[0] instanceof Array && $.length > 1)
2484
- throw new Error("Parse Error: multiple actions possible at state: " + W + ", token: " + P);
2485
- switch ($[0]) {
2486
- case 1:
2487
- s.push(P), f.push(w.yytext), p.push(w.yylloc), s.push($[1]), P = null, x = w.yyleng, I = w.yytext, R = w.yylineno, b = w.yylloc;
2488
- break;
2489
- case 2:
2490
- if (Z = this.productions_[$[1]][1], V.$ = f[f.length - Z], V._$ = {
2491
- first_line: p[p.length - (Z || 1)].first_line,
2492
- last_line: p[p.length - 1].last_line,
2493
- first_column: p[p.length - (Z || 1)].first_column,
2494
- last_column: p[p.length - 1].last_column
2495
- }, Y && (V._$.range = [
2496
- p[p.length - (Z || 1)].range[0],
2497
- p[p.length - 1].range[1]
2498
- ]), j = this.performAction.apply(V, [
2499
- I,
2500
- x,
2501
- R,
2502
- S.yy,
2503
- $[1],
2504
- f,
2505
- p
2506
- ].concat(X)), typeof j < "u")
2507
- return j;
2508
- Z && (s = s.slice(0, -1 * Z * 2), f = f.slice(0, -1 * Z), p = p.slice(0, -1 * Z)), s.push(this.productions_[$[1]][0]), f.push(V.$), p.push(V._$), lt = A[s[s.length - 2]][s[s.length - 1]], s.push(lt);
2509
- break;
2510
- case 3:
2511
- return !0;
2512
- }
2513
- }
2514
- return !0;
2515
- }, "parse")
2516
- }, m = /* @__PURE__ */ function() {
2517
- var O = {
2518
- EOF: 1,
2519
- parseError: /* @__PURE__ */ _(function(N, s) {
2520
- if (this.yy.parser)
2521
- this.yy.parser.parseError(N, s);
2522
- else
2523
- throw new Error(N);
2524
- }, "parseError"),
2525
- // resets the lexer, sets new input
2526
- setInput: /* @__PURE__ */ _(function(d, N) {
2527
- return this.yy = N || this.yy || {}, this._input = d, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
2528
- first_line: 1,
2529
- first_column: 0,
2530
- last_line: 1,
2531
- last_column: 0
2532
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
2533
- }, "setInput"),
2534
- // consumes and returns one char from the input
2535
- input: /* @__PURE__ */ _(function() {
2536
- var d = this._input[0];
2537
- this.yytext += d, this.yyleng++, this.offset++, this.match += d, this.matched += d;
2538
- var N = d.match(/(?:\r\n?|\n).*/g);
2539
- return N ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), d;
2540
- }, "input"),
2541
- // unshifts one char (or a string) into the input
2542
- unput: /* @__PURE__ */ _(function(d) {
2543
- var N = d.length, s = d.split(/(?:\r\n?|\n)/g);
2544
- this._input = d + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - N), this.offset -= N;
2545
- var h = this.match.split(/(?:\r\n?|\n)/g);
2546
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), s.length - 1 && (this.yylineno -= s.length - 1);
2547
- var f = this.yylloc.range;
2548
- return this.yylloc = {
2549
- first_line: this.yylloc.first_line,
2550
- last_line: this.yylineno + 1,
2551
- first_column: this.yylloc.first_column,
2552
- last_column: s ? (s.length === h.length ? this.yylloc.first_column : 0) + h[h.length - s.length].length - s[0].length : this.yylloc.first_column - N
2553
- }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - N]), this.yyleng = this.yytext.length, this;
2554
- }, "unput"),
2555
- // When called from action, caches matched text and appends it on next action
2556
- more: /* @__PURE__ */ _(function() {
2557
- return this._more = !0, this;
2558
- }, "more"),
2559
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
2560
- reject: /* @__PURE__ */ _(function() {
2561
- if (this.options.backtrack_lexer)
2562
- this._backtrack = !0;
2563
- else
2564
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
2565
- ` + this.showPosition(), {
2566
- text: "",
2567
- token: null,
2568
- line: this.yylineno
2569
- });
2570
- return this;
2571
- }, "reject"),
2572
- // retain first n characters of the match
2573
- less: /* @__PURE__ */ _(function(d) {
2574
- this.unput(this.match.slice(d));
2575
- }, "less"),
2576
- // displays already matched input, i.e. for error messages
2577
- pastInput: /* @__PURE__ */ _(function() {
2578
- var d = this.matched.substr(0, this.matched.length - this.match.length);
2579
- return (d.length > 20 ? "..." : "") + d.substr(-20).replace(/\n/g, "");
2580
- }, "pastInput"),
2581
- // displays upcoming input, i.e. for error messages
2582
- upcomingInput: /* @__PURE__ */ _(function() {
2583
- var d = this.match;
2584
- return d.length < 20 && (d += this._input.substr(0, 20 - d.length)), (d.substr(0, 20) + (d.length > 20 ? "..." : "")).replace(/\n/g, "");
2585
- }, "upcomingInput"),
2586
- // displays the character position where the lexing error occurred, i.e. for error messages
2587
- showPosition: /* @__PURE__ */ _(function() {
2588
- var d = this.pastInput(), N = new Array(d.length + 1).join("-");
2589
- return d + this.upcomingInput() + `
2590
- ` + N + "^";
2591
- }, "showPosition"),
2592
- // test the lexed token: return FALSE when not a match, otherwise return token
2593
- test_match: /* @__PURE__ */ _(function(d, N) {
2594
- var s, h, f;
2595
- if (this.options.backtrack_lexer && (f = {
2596
- yylineno: this.yylineno,
2597
- yylloc: {
2598
- first_line: this.yylloc.first_line,
2599
- last_line: this.last_line,
2600
- first_column: this.yylloc.first_column,
2601
- last_column: this.yylloc.last_column
2602
- },
2603
- yytext: this.yytext,
2604
- match: this.match,
2605
- matches: this.matches,
2606
- matched: this.matched,
2607
- yyleng: this.yyleng,
2608
- offset: this.offset,
2609
- _more: this._more,
2610
- _input: this._input,
2611
- yy: this.yy,
2612
- conditionStack: this.conditionStack.slice(0),
2613
- done: this.done
2614
- }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), h = d[0].match(/(?:\r\n?|\n).*/g), h && (this.yylineno += h.length), this.yylloc = {
2615
- first_line: this.yylloc.last_line,
2616
- last_line: this.yylineno + 1,
2617
- first_column: this.yylloc.last_column,
2618
- last_column: h ? h[h.length - 1].length - h[h.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + d[0].length
2619
- }, this.yytext += d[0], this.match += d[0], this.matches = d, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(d[0].length), this.matched += d[0], s = this.performAction.call(this, this.yy, this, N, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), s)
2620
- return s;
2621
- if (this._backtrack) {
2622
- for (var p in f)
2623
- this[p] = f[p];
2624
- return !1;
2625
- }
2626
- return !1;
2627
- }, "test_match"),
2628
- // return next match in input
2629
- next: /* @__PURE__ */ _(function() {
2630
- if (this.done)
2631
- return this.EOF;
2632
- this._input || (this.done = !0);
2633
- var d, N, s, h;
2634
- this._more || (this.yytext = "", this.match = "");
2635
- for (var f = this._currentRules(), p = 0; p < f.length; p++)
2636
- if (s = this._input.match(this.rules[f[p]]), s && (!N || s[0].length > N[0].length)) {
2637
- if (N = s, h = p, this.options.backtrack_lexer) {
2638
- if (d = this.test_match(s, f[p]), d !== !1)
2639
- return d;
2640
- if (this._backtrack) {
2641
- N = !1;
2642
- continue;
2643
- } else
2644
- return !1;
2645
- } else if (!this.options.flex)
2646
- break;
2647
- }
2648
- return N ? (d = this.test_match(N, f[h]), d !== !1 ? d : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
2649
- ` + this.showPosition(), {
2650
- text: "",
2651
- token: null,
2652
- line: this.yylineno
2653
- });
2654
- }, "next"),
2655
- // return next match that has a token
2656
- lex: /* @__PURE__ */ _(function() {
2657
- var N = this.next();
2658
- return N || this.lex();
2659
- }, "lex"),
2660
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
2661
- begin: /* @__PURE__ */ _(function(N) {
2662
- this.conditionStack.push(N);
2663
- }, "begin"),
2664
- // pop the previously active lexer condition state off the condition stack
2665
- popState: /* @__PURE__ */ _(function() {
2666
- var N = this.conditionStack.length - 1;
2667
- return N > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2668
- }, "popState"),
2669
- // produce the lexer rule set which is active for the currently active lexer condition state
2670
- _currentRules: /* @__PURE__ */ _(function() {
2671
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2672
- }, "_currentRules"),
2673
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
2674
- topState: /* @__PURE__ */ _(function(N) {
2675
- return N = this.conditionStack.length - 1 - Math.abs(N || 0), N >= 0 ? this.conditionStack[N] : "INITIAL";
2676
- }, "topState"),
2677
- // alias for begin(condition)
2678
- pushState: /* @__PURE__ */ _(function(N) {
2679
- this.begin(N);
2680
- }, "pushState"),
2681
- // return the number of states currently on the stack
2682
- stateStackSize: /* @__PURE__ */ _(function() {
2683
- return this.conditionStack.length;
2684
- }, "stateStackSize"),
2685
- options: { "case-insensitive": !0 },
2686
- performAction: /* @__PURE__ */ _(function(N, s, h, f) {
2687
- switch (h) {
2688
- case 0:
2689
- return N.getLogger().trace("Found comment", s.yytext), 6;
2690
- case 1:
2691
- return 8;
2692
- case 2:
2693
- this.begin("CLASS");
2694
- break;
2695
- case 3:
2696
- return this.popState(), 16;
2697
- case 4:
2698
- this.popState();
2699
- break;
2700
- case 5:
2701
- N.getLogger().trace("Begin icon"), this.begin("ICON");
2702
- break;
2703
- case 6:
2704
- return N.getLogger().trace("SPACELINE"), 6;
2705
- case 7:
2706
- return 7;
2707
- case 8:
2708
- return 15;
2709
- case 9:
2710
- N.getLogger().trace("end icon"), this.popState();
2711
- break;
2712
- case 10:
2713
- return N.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
2714
- case 11:
2715
- return N.getLogger().trace("Cloud"), this.begin("NODE"), 19;
2716
- case 12:
2717
- return N.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
2718
- case 13:
2719
- return N.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
2720
- case 14:
2721
- return this.begin("NODE"), 19;
2722
- case 15:
2723
- return this.begin("NODE"), 19;
2724
- case 16:
2725
- return this.begin("NODE"), 19;
2726
- case 17:
2727
- return this.begin("NODE"), 19;
2728
- case 18:
2729
- return 13;
2730
- case 19:
2731
- return 22;
2732
- case 20:
2733
- return 11;
2734
- case 21:
2735
- this.begin("NSTR2");
2736
- break;
2737
- case 22:
2738
- return "NODE_DESCR";
2739
- case 23:
2740
- this.popState();
2741
- break;
2742
- case 24:
2743
- N.getLogger().trace("Starting NSTR"), this.begin("NSTR");
2744
- break;
2745
- case 25:
2746
- return N.getLogger().trace("description:", s.yytext), "NODE_DESCR";
2747
- case 26:
2748
- this.popState();
2749
- break;
2750
- case 27:
2751
- return this.popState(), N.getLogger().trace("node end ))"), "NODE_DEND";
2752
- case 28:
2753
- return this.popState(), N.getLogger().trace("node end )"), "NODE_DEND";
2754
- case 29:
2755
- return this.popState(), N.getLogger().trace("node end ...", s.yytext), "NODE_DEND";
2756
- case 30:
2757
- return this.popState(), N.getLogger().trace("node end (("), "NODE_DEND";
2758
- case 31:
2759
- return this.popState(), N.getLogger().trace("node end (-"), "NODE_DEND";
2760
- case 32:
2761
- return this.popState(), N.getLogger().trace("node end (-"), "NODE_DEND";
2762
- case 33:
2763
- return this.popState(), N.getLogger().trace("node end (("), "NODE_DEND";
2764
- case 34:
2765
- return this.popState(), N.getLogger().trace("node end (("), "NODE_DEND";
2766
- case 35:
2767
- return N.getLogger().trace("Long description:", s.yytext), 20;
2768
- case 36:
2769
- return N.getLogger().trace("Long description:", s.yytext), 20;
2770
- }
2771
- }, "anonymous"),
2772
- rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
2773
- conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
2774
- };
2775
- return O;
2776
- }();
2777
- T.lexer = m;
2778
- function L() {
2779
- this.yy = {};
2780
- }
2781
- return _(L, "Parser"), L.prototype = T, T.Parser = L, new L();
2782
- }();
2783
- st.parser = st;
2784
- var wt = st, St = {
2785
- DEFAULT: 0,
2786
- NO_BORDER: 0,
2787
- ROUNDED_RECT: 1,
2788
- RECT: 2,
2789
- CIRCLE: 3,
2790
- CLOUD: 4,
2791
- BANG: 5,
2792
- HEXAGON: 6
2793
- }, K, Gt = (K = class {
2794
- constructor() {
2795
- this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = St, this.clear(), this.getType = this.getType.bind(this), this.getMindmap = this.getMindmap.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
2796
- }
2797
- clear() {
2798
- this.nodes = [], this.count = 0, this.elements = {};
2799
- }
2800
- getParent(M) {
2801
- for (let u = this.nodes.length - 1; u >= 0; u--)
2802
- if (this.nodes[u].level < M)
2803
- return this.nodes[u];
2804
- return null;
2805
- }
2806
- getMindmap() {
2807
- return this.nodes.length > 0 ? this.nodes[0] : null;
2808
- }
2809
- addNode(M, u, D, y) {
2810
- var o, g;
2811
- Q.info("addNode", M, u, D, y);
2812
- const r = nt();
2813
- let t = ((o = r.mindmap) == null ? void 0 : o.padding) ?? tt.mindmap.padding;
2814
- switch (y) {
2815
- case this.nodeType.ROUNDED_RECT:
2816
- case this.nodeType.RECT:
2817
- case this.nodeType.HEXAGON:
2818
- t *= 2;
2819
- break;
2820
- }
2821
- const e = {
2822
- id: this.count++,
2823
- nodeId: q(u, r),
2824
- level: M,
2825
- descr: q(D, r),
2826
- type: y,
2827
- children: [],
2828
- width: ((g = r.mindmap) == null ? void 0 : g.maxNodeWidth) ?? tt.mindmap.maxNodeWidth,
2829
- padding: t
2830
- }, i = this.getParent(M);
2831
- if (i)
2832
- i.children.push(e), this.nodes.push(e);
2833
- else if (this.nodes.length === 0)
2834
- this.nodes.push(e);
2835
- else
2836
- throw new Error(
2837
- `There can be only one root. No parent could be found for ("${e.descr}")`
2838
- );
2839
- }
2840
- getType(M, u) {
2841
- switch (Q.debug("In get type", M, u), M) {
2842
- case "[":
2843
- return this.nodeType.RECT;
2844
- case "(":
2845
- return u === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
2846
- case "((":
2847
- return this.nodeType.CIRCLE;
2848
- case ")":
2849
- return this.nodeType.CLOUD;
2850
- case "))":
2851
- return this.nodeType.BANG;
2852
- case "{{":
2853
- return this.nodeType.HEXAGON;
2854
- default:
2855
- return this.nodeType.DEFAULT;
2856
- }
2857
- }
2858
- setElementForId(M, u) {
2859
- this.elements[M] = u;
2860
- }
2861
- getElementById(M) {
2862
- return this.elements[M];
2863
- }
2864
- decorateNode(M) {
2865
- if (!M)
2866
- return;
2867
- const u = nt(), D = this.nodes[this.nodes.length - 1];
2868
- M.icon && (D.icon = q(M.icon, u)), M.class && (D.class = q(M.class, u));
2869
- }
2870
- type2Str(M) {
2871
- switch (M) {
2872
- case this.nodeType.DEFAULT:
2873
- return "no-border";
2874
- case this.nodeType.RECT:
2875
- return "rect";
2876
- case this.nodeType.ROUNDED_RECT:
2877
- return "rounded-rect";
2878
- case this.nodeType.CIRCLE:
2879
- return "circle";
2880
- case this.nodeType.CLOUD:
2881
- return "cloud";
2882
- case this.nodeType.BANG:
2883
- return "bang";
2884
- case this.nodeType.HEXAGON:
2885
- return "hexgon";
2886
- default:
2887
- return "no-border";
2888
- }
2889
- }
2890
- getLogger() {
2891
- return Q;
2892
- }
2893
- }, _(K, "MindmapDB"), K), _t = 12, Ft = /* @__PURE__ */ _(function(C, M, u, D) {
2894
- M.append("path").attr("id", "node-" + u.id).attr("class", "node-bkg node-" + C.type2Str(u.type)).attr(
2895
- "d",
2896
- `M0 ${u.height - 5} v${-u.height + 2 * 5} q0,-5 5,-5 h${u.width - 2 * 5} q5,0 5,5 v${u.height - 5} H0 Z`
2897
- ), M.append("line").attr("class", "node-line-" + D).attr("x1", 0).attr("y1", u.height).attr("x2", u.width).attr("y2", u.height);
2898
- }, "defaultBkg"), bt = /* @__PURE__ */ _(function(C, M, u) {
2899
- M.append("rect").attr("id", "node-" + u.id).attr("class", "node-bkg node-" + C.type2Str(u.type)).attr("height", u.height).attr("width", u.width);
2900
- }, "rectBkg"), Ut = /* @__PURE__ */ _(function(C, M, u) {
2901
- const D = u.width, y = u.height, r = 0.15 * D, t = 0.25 * D, e = 0.35 * D, i = 0.2 * D;
2902
- M.append("path").attr("id", "node-" + u.id).attr("class", "node-bkg node-" + C.type2Str(u.type)).attr(
2903
- "d",
2904
- `M0 0 a${r},${r} 0 0,1 ${D * 0.25},${-1 * D * 0.1}
2905
- a${e},${e} 1 0,1 ${D * 0.4},${-1 * D * 0.1}
2906
- a${t},${t} 1 0,1 ${D * 0.35},${1 * D * 0.2}
2907
-
2908
- a${r},${r} 1 0,1 ${D * 0.15},${1 * y * 0.35}
2909
- a${i},${i} 1 0,1 ${-1 * D * 0.15},${1 * y * 0.65}
2910
-
2911
- a${t},${r} 1 0,1 ${-1 * D * 0.25},${D * 0.15}
2912
- a${e},${e} 1 0,1 ${-1 * D * 0.5},0
2913
- a${r},${r} 1 0,1 ${-1 * D * 0.25},${-1 * D * 0.15}
2914
-
2915
- a${r},${r} 1 0,1 ${-1 * D * 0.1},${-1 * y * 0.35}
2916
- a${i},${i} 1 0,1 ${D * 0.1},${-1 * y * 0.65}
2917
-
2918
- H0 V0 Z`
2919
- );
2920
- }, "cloudBkg"), Pt = /* @__PURE__ */ _(function(C, M, u) {
2921
- const D = u.width, y = u.height, r = 0.15 * D;
2922
- M.append("path").attr("id", "node-" + u.id).attr("class", "node-bkg node-" + C.type2Str(u.type)).attr(
2923
- "d",
2924
- `M0 0 a${r},${r} 1 0,0 ${D * 0.25},${-1 * y * 0.1}
2925
- a${r},${r} 1 0,0 ${D * 0.25},0
2926
- a${r},${r} 1 0,0 ${D * 0.25},0
2927
- a${r},${r} 1 0,0 ${D * 0.25},${1 * y * 0.1}
2928
-
2929
- a${r},${r} 1 0,0 ${D * 0.15},${1 * y * 0.33}
2930
- a${r * 0.8},${r * 0.8} 1 0,0 0,${1 * y * 0.34}
2931
- a${r},${r} 1 0,0 ${-1 * D * 0.15},${1 * y * 0.33}
2932
-
2933
- a${r},${r} 1 0,0 ${-1 * D * 0.25},${y * 0.15}
2934
- a${r},${r} 1 0,0 ${-1 * D * 0.25},0
2935
- a${r},${r} 1 0,0 ${-1 * D * 0.25},0
2936
- a${r},${r} 1 0,0 ${-1 * D * 0.25},${-1 * y * 0.15}
2937
-
2938
- a${r},${r} 1 0,0 ${-1 * D * 0.1},${-1 * y * 0.33}
2939
- a${r * 0.8},${r * 0.8} 1 0,0 0,${-1 * y * 0.34}
2940
- a${r},${r} 1 0,0 ${D * 0.1},${-1 * y * 0.33}
2941
-
2942
- H0 V0 Z`
2943
- );
2944
- }, "bangBkg"), Yt = /* @__PURE__ */ _(function(C, M, u) {
2945
- M.append("circle").attr("id", "node-" + u.id).attr("class", "node-bkg node-" + C.type2Str(u.type)).attr("r", u.width / 2);
2946
- }, "circleBkg");
2947
- function pt(C, M, u, D, y) {
2948
- return C.insert("polygon", ":first-child").attr(
2949
- "points",
2950
- D.map(function(r) {
2951
- return r.x + "," + r.y;
2952
- }).join(" ")
2953
- ).attr("transform", "translate(" + (y.width - M) / 2 + ", " + u + ")");
2954
- }
2955
- _(pt, "insertPolygonShape");
2956
- var Xt = /* @__PURE__ */ _(function(C, M, u) {
2957
- const D = u.height, r = D / 4, t = u.width - u.padding + 2 * r, e = [
2958
- { x: r, y: 0 },
2959
- { x: t - r, y: 0 },
2960
- { x: t, y: -D / 2 },
2961
- { x: t - r, y: -D },
2962
- { x: r, y: -D },
2963
- { x: 0, y: -D / 2 }
2964
- ];
2965
- pt(M, t, D, e, u);
2966
- }, "hexagonBkg"), kt = /* @__PURE__ */ _(function(C, M, u) {
2967
- M.append("rect").attr("id", "node-" + u.id).attr("class", "node-bkg node-" + C.type2Str(u.type)).attr("height", u.height).attr("rx", u.padding).attr("ry", u.padding).attr("width", u.width);
2968
- }, "roundedRectBkg"), Ht = /* @__PURE__ */ _(async function(C, M, u, D, y) {
2969
- const r = y.htmlLabels, t = D % (_t - 1), e = M.append("g");
2970
- u.section = t;
2971
- let i = "section-" + t;
2972
- t < 0 && (i += " section-root"), e.attr("class", (u.class ? u.class + " " : "") + "mindmap-node " + i);
2973
- const o = e.append("g"), g = e.append("g"), a = u.descr.replace(/(<br\/*>)/g, `
2974
- `);
2975
- await Ot(
2976
- g,
2977
- a,
2978
- {
2979
- useHtmlLabels: r,
2980
- width: u.width,
2981
- classes: "mindmap-node-label"
2982
- },
2983
- y
2984
- ), r || g.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
2985
- const v = g.node().getBBox(), [n] = At(y.fontSize);
2986
- if (u.height = v.height + n * 1.1 * 0.5 + u.padding, u.width = v.width + 2 * u.padding, u.icon)
2987
- if (u.type === C.nodeType.CIRCLE)
2988
- u.height += 50, u.width += 50, e.append("foreignObject").attr("height", "50px").attr("width", u.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + u.icon), g.attr(
2989
- "transform",
2990
- "translate(" + u.width / 2 + ", " + (u.height / 2 - 1.5 * u.padding) + ")"
2991
- );
2992
- else {
2993
- u.width += 50;
2994
- const c = u.height;
2995
- u.height = Math.max(c, 60);
2996
- const l = Math.abs(u.height - c);
2997
- e.append("foreignObject").attr("width", "60px").attr("height", u.height).attr("style", "text-align: center;margin-top:" + l / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + u.icon), g.attr(
2998
- "transform",
2999
- "translate(" + (25 + u.width / 2) + ", " + (l / 2 + u.padding / 2) + ")"
3000
- );
3001
- }
3002
- else if (r) {
3003
- const c = (u.width - v.width) / 2, l = (u.height - v.height) / 2;
3004
- g.attr("transform", "translate(" + c + ", " + l + ")");
3005
- } else {
3006
- const c = u.width / 2, l = u.padding / 2;
3007
- g.attr("transform", "translate(" + c + ", " + l + ")");
3008
- }
3009
- switch (u.type) {
3010
- case C.nodeType.DEFAULT:
3011
- Ft(C, o, u, t);
3012
- break;
3013
- case C.nodeType.ROUNDED_RECT:
3014
- kt(C, o, u, t);
3015
- break;
3016
- case C.nodeType.RECT:
3017
- bt(C, o, u, t);
3018
- break;
3019
- case C.nodeType.CIRCLE:
3020
- o.attr("transform", "translate(" + u.width / 2 + ", " + +u.height / 2 + ")"), Yt(C, o, u, t);
3021
- break;
3022
- case C.nodeType.CLOUD:
3023
- Ut(C, o, u, t);
3024
- break;
3025
- case C.nodeType.BANG:
3026
- Pt(C, o, u, t);
3027
- break;
3028
- case C.nodeType.HEXAGON:
3029
- Xt(C, o, u, t);
3030
- break;
3031
- }
3032
- return C.setElementForId(u.id, e), u.height;
3033
- }, "drawNode"), $t = /* @__PURE__ */ _(function(C, M) {
3034
- const u = C.getElementById(M.id), D = M.x || 0, y = M.y || 0;
3035
- u.attr("transform", "translate(" + D + "," + y + ")");
3036
- }, "positionNode");
3037
- ut.use(Mt);
3038
- async function ot(C, M, u, D, y) {
3039
- await Ht(C, M, u, D, y), u.children && await Promise.all(
3040
- u.children.map(
3041
- (r, t) => ot(C, M, r, D < 0 ? t : D, y)
3042
- )
3043
- );
3044
- }
3045
- _(ot, "drawNodes");
3046
- function dt(C, M) {
3047
- M.edges().map((u, D) => {
3048
- const y = u.data();
3049
- if (u[0]._private.bodyBounds) {
3050
- const r = u[0]._private.rscratch;
3051
- Q.trace("Edge: ", D, y), C.insert("path").attr(
3052
- "d",
3053
- `M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `
3054
- ).attr("class", "edge section-edge-" + y.section + " edge-depth-" + y.depth);
3055
- }
3056
- });
3057
- }
3058
- _(dt, "drawEdges");
3059
- function ht(C, M, u, D) {
3060
- M.add({
3061
- group: "nodes",
3062
- data: {
3063
- id: C.id.toString(),
3064
- labelText: C.descr,
3065
- height: C.height,
3066
- width: C.width,
3067
- level: D,
3068
- nodeId: C.id,
3069
- padding: C.padding,
3070
- type: C.type
3071
- },
3072
- position: {
3073
- x: C.x,
3074
- y: C.y
3075
- }
3076
- }), C.children && C.children.forEach((y) => {
3077
- ht(y, M, u, D + 1), M.add({
3078
- group: "edges",
3079
- data: {
3080
- id: `${C.id}_${y.id}`,
3081
- source: C.id,
3082
- target: y.id,
3083
- depth: D,
3084
- section: y.section
3085
- }
3086
- });
3087
- });
3088
- }
3089
- _(ht, "addNodes");
3090
- function vt(C, M) {
3091
- return new Promise((u) => {
3092
- const D = Dt("body").append("div").attr("id", "cy").attr("style", "display:none"), y = ut({
3093
- container: document.getElementById("cy"),
3094
- // container to render in
3095
- style: [
3096
- {
3097
- selector: "edge",
3098
- style: {
3099
- "curve-style": "bezier"
3100
- }
3101
- }
3102
- ]
3103
- });
3104
- D.remove(), ht(C, y, M, 0), y.nodes().forEach(function(r) {
3105
- r.layoutDimensions = () => {
3106
- const t = r.data();
3107
- return { w: t.width, h: t.height };
3108
- };
3109
- }), y.layout({
3110
- name: "cose-bilkent",
3111
- // @ts-ignore Types for cose-bilkent are not correct?
3112
- quality: "proof",
3113
- styleEnabled: !1,
3114
- animate: !1
3115
- }).run(), y.ready((r) => {
3116
- Q.info("Ready", r), u(y);
3117
- });
3118
- });
3119
- }
3120
- _(vt, "layoutMindmap");
3121
- function yt(C, M) {
3122
- M.nodes().map((u, D) => {
3123
- const y = u.data();
3124
- y.x = u.position().x, y.y = u.position().y, $t(C, y);
3125
- const r = C.getElementById(y.nodeId);
3126
- Q.info("id:", D, "Position: (", u.position().x, ", ", u.position().y, ")", y), r.attr(
3127
- "transform",
3128
- `translate(${u.position().x - y.width / 2}, ${u.position().y - y.height / 2})`
3129
- ), r.attr("attr", `apa-${D})`);
3130
- });
3131
- }
3132
- _(yt, "positionNodes");
3133
- var Wt = /* @__PURE__ */ _(async (C, M, u, D) => {
3134
- var a, v;
3135
- Q.debug(`Rendering mindmap diagram
3136
- ` + C);
3137
- const y = D.db, r = y.getMindmap();
3138
- if (!r)
3139
- return;
3140
- const t = nt();
3141
- t.htmlLabels = !1;
3142
- const e = Et(M), i = e.append("g");
3143
- i.attr("class", "mindmap-edges");
3144
- const o = e.append("g");
3145
- o.attr("class", "mindmap-nodes"), await ot(y, o, r, -1, t);
3146
- const g = await vt(r, t);
3147
- dt(i, g), yt(y, g), Lt(
3148
- void 0,
3149
- e,
3150
- ((a = t.mindmap) == null ? void 0 : a.padding) ?? tt.mindmap.padding,
3151
- ((v = t.mindmap) == null ? void 0 : v.useMaxWidth) ?? tt.mindmap.useMaxWidth
3152
- );
3153
- }, "draw"), Bt = {
3154
- draw: Wt
3155
- }, Vt = /* @__PURE__ */ _((C) => {
3156
- let M = "";
3157
- for (let u = 0; u < C.THEME_COLOR_LIMIT; u++)
3158
- C["lineColor" + u] = C["lineColor" + u] || C["cScaleInv" + u], Tt(C["lineColor" + u]) ? C["lineColor" + u] = Nt(C["lineColor" + u], 20) : C["lineColor" + u] = mt(C["lineColor" + u], 20);
3159
- for (let u = 0; u < C.THEME_COLOR_LIMIT; u++) {
3160
- const D = "" + (17 - 3 * u);
3161
- M += `
3162
- .section-${u - 1} rect, .section-${u - 1} path, .section-${u - 1} circle, .section-${u - 1} polygon, .section-${u - 1} path {
3163
- fill: ${C["cScale" + u]};
3164
- }
3165
- .section-${u - 1} text {
3166
- fill: ${C["cScaleLabel" + u]};
3167
- }
3168
- .node-icon-${u - 1} {
3169
- font-size: 40px;
3170
- color: ${C["cScaleLabel" + u]};
3171
- }
3172
- .section-edge-${u - 1}{
3173
- stroke: ${C["cScale" + u]};
3174
- }
3175
- .edge-depth-${u - 1}{
3176
- stroke-width: ${D};
3177
- }
3178
- .section-${u - 1} line {
3179
- stroke: ${C["cScaleInv" + u]} ;
3180
- stroke-width: 3;
3181
- }
3182
-
3183
- .disabled, .disabled circle, .disabled text {
3184
- fill: lightgray;
3185
- }
3186
- .disabled text {
3187
- fill: #efefef;
3188
- }
3189
- `;
3190
- }
3191
- return M;
3192
- }, "genSections"), Zt = /* @__PURE__ */ _((C) => `
3193
- .edge {
3194
- stroke-width: 3;
3195
- }
3196
- ${Vt(C)}
3197
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
3198
- fill: ${C.git0};
3199
- }
3200
- .section-root text {
3201
- fill: ${C.gitBranchLabel0};
3202
- }
3203
- .icon-container {
3204
- height:100%;
3205
- display: flex;
3206
- justify-content: center;
3207
- align-items: center;
3208
- }
3209
- .edge {
3210
- fill: none;
3211
- }
3212
- .mindmap-node-label {
3213
- dy: 1em;
3214
- alignment-baseline: middle;
3215
- text-anchor: middle;
3216
- dominant-baseline: middle;
3217
- text-align: center;
3218
- }
3219
- `, "getStyles"), Qt = Zt, Jt = {
3220
- get db() {
3221
- return new Gt();
3222
- },
3223
- renderer: Bt,
3224
- parser: wt,
3225
- styles: Qt
3226
- };
3227
- export {
3228
- Jt as diagram
3229
- };