@jackuait/blok 0.9.0 → 0.10.0-beta.10

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 (492) hide show
  1. package/codemod/migrate-editorjs-to-blok.js +50 -2
  2. package/codemod/test.js +39 -6
  3. package/dist/blok.mjs +3 -3
  4. package/dist/chunks/_basePickBy-DISiGhsr.mjs +410 -0
  5. package/dist/chunks/_baseUniq-gAuHRtRF.mjs +1045 -0
  6. package/dist/chunks/_getTag-Aj56Wgor.mjs +26 -0
  7. package/dist/chunks/arc-D-pL2Ftf.mjs +80 -0
  8. package/dist/chunks/architecture-YZFGNWBL-CuqTb_ae.mjs +3 -0
  9. package/dist/chunks/architectureDiagram-Q4EWVU46-DS7mqjL2.mjs +4066 -0
  10. package/dist/chunks/array-BsrkCVSZ.mjs +6 -0
  11. package/dist/chunks/blockDiagram-DXYQGD6D-BTtcn4NG.mjs +3259 -0
  12. package/dist/chunks/{blok-RJ3hyzDH.mjs → blok-Bg3-zpSu.mjs} +2192 -2156
  13. package/dist/chunks/c-C6JXJf5K.mjs +5 -0
  14. package/dist/chunks/c4Diagram-AHTNJAMY-Y4Dcwcoo.mjs +2956 -0
  15. package/dist/chunks/ccount-C9Y7nqDe.mjs +10 -0
  16. package/dist/chunks/channel-Cln-eWE0.mjs +5 -0
  17. package/dist/chunks/chunk-2KRD3SAO-DkM7qh-k.mjs +20 -0
  18. package/dist/chunks/chunk-336JU56O-B17AtzlK.mjs +49 -0
  19. package/dist/chunks/chunk-426QAEUC-D6UAVUog.mjs +13 -0
  20. package/dist/chunks/chunk-4BX2VUAB-CgIkjF7Z.mjs +19 -0
  21. package/dist/chunks/chunk-4TB4RGXK-BUP4eON3.mjs +3250 -0
  22. package/dist/chunks/chunk-55IACEB6-zZ-IgaSt.mjs +8 -0
  23. package/dist/chunks/chunk-5FUZZQ4R-DsZnJYxM.mjs +3786 -0
  24. package/dist/chunks/chunk-5PVQY5BW-CORl9dnu.mjs +1692 -0
  25. package/dist/chunks/chunk-67CJDMHE-m0UKdcSH.mjs +20 -0
  26. package/dist/chunks/chunk-7N4EOEYR-DKNajFZd.mjs +29 -0
  27. package/dist/chunks/chunk-AA7GKIK3-BeLhNzKa.mjs +24 -0
  28. package/dist/chunks/chunk-BSJP7CBP-CJExmx8a.mjs +83 -0
  29. package/dist/chunks/chunk-CIAEETIT-CTikoJ19.mjs +20 -0
  30. package/dist/chunks/chunk-D6kmoKXy.mjs +20 -0
  31. package/dist/chunks/chunk-EDXVE4YY-DjInnnwb.mjs +26 -0
  32. package/dist/chunks/chunk-ENJZ2VHE-CIl5FRDA.mjs +566 -0
  33. package/dist/chunks/chunk-FMBD7UC4-DjV0W7UE.mjs +5 -0
  34. package/dist/chunks/chunk-FOC6F5B3-LmHCCWYY.mjs +20 -0
  35. package/dist/chunks/chunk-ICPOFSXX-BHZIN46A.mjs +3290 -0
  36. package/dist/chunks/chunk-K5T4RW27-BPZ6fFnW.mjs +16370 -0
  37. package/dist/chunks/chunk-KGLVRYIC-S1OQdW76.mjs +20 -0
  38. package/dist/chunks/chunk-LIHQZDEY-CjtyJlI6.mjs +55 -0
  39. package/dist/chunks/chunk-ORNJ4GCN-CdO0hAge.mjs +25 -0
  40. package/dist/chunks/chunk-OYMX7WX6-ApX8eV4o.mjs +2038 -0
  41. package/dist/chunks/chunk-QZHKN3VN-BGFuA6-k.mjs +12 -0
  42. package/dist/chunks/chunk-U2HBQHQK-B88ZUOTL.mjs +1875 -0
  43. package/dist/chunks/chunk-X2U36JSP-1VS5TyCr.mjs +68 -0
  44. package/dist/chunks/chunk-XPW4576I-BMupdrvo.mjs +1146 -0
  45. package/dist/chunks/chunk-YZCP3GAM-BQ7eEsm2.mjs +60 -0
  46. package/dist/chunks/chunk-ZZ45TVLE-D1xks9zd.mjs +33 -0
  47. package/dist/chunks/classDiagram-6PBFFD2Q-C59BZJxp.mjs +30 -0
  48. package/dist/chunks/classDiagram-v2-HSJHXN6E-7a0qeMsE.mjs +30 -0
  49. package/dist/chunks/clone-Ckjt1LtE.mjs +8 -0
  50. package/dist/chunks/{constants-A3iVmQL8.mjs → constants-D7zjGD5W.mjs} +529 -530
  51. package/dist/chunks/core-Bm6DWt7D.mjs +4501 -0
  52. package/dist/chunks/cose-bilkent-S5V4N54A-Bpcs2jA_.mjs +2246 -0
  53. package/dist/chunks/cpp-BdjvAny0.mjs +16 -0
  54. package/dist/chunks/csharp-YHxeHpeH.mjs +3 -0
  55. package/dist/chunks/css-DdLevFaX.mjs +3 -0
  56. package/dist/chunks/cytoscape.esm-BvD8wo00.mjs +18108 -0
  57. package/dist/chunks/dagre-CGNbYTKq.mjs +1536 -0
  58. package/dist/chunks/dagre-KV5264BT-DUD9ikgN.mjs +298 -0
  59. package/dist/chunks/dart-DrPWqfcC.mjs +3 -0
  60. package/dist/chunks/default-qigT1Xpq.mjs +4 -0
  61. package/dist/chunks/defaultLocale-ChuSeAxU.mjs +201 -0
  62. package/dist/chunks/diagram-5BDNPKRD-CZGfTYEe.mjs +112 -0
  63. package/dist/chunks/diagram-G4DWMVQ6-CuS0-h95.mjs +546 -0
  64. package/dist/chunks/diagram-MMDJMWI5-C-AEApYz.mjs +234 -0
  65. package/dist/chunks/diagram-TYMM5635-CiwAJVMq.mjs +144 -0
  66. package/dist/chunks/dist-Ctq-pyfb.mjs +59 -0
  67. package/dist/chunks/dockerfile-C68ALcaN.mjs +3 -0
  68. package/dist/chunks/engine-javascript-CJpnSvzf.mjs +2373 -0
  69. package/dist/chunks/erDiagram-SMLLAGMA-DeH5yck2.mjs +1712 -0
  70. package/dist/chunks/flowDiagram-DWJPFMVM-Cr6dwmQ5.mjs +4175 -0
  71. package/dist/chunks/ganttDiagram-T4ZO3ILL-K-divBg_.mjs +3083 -0
  72. package/dist/chunks/gitGraph-7Q5UKJZL-Dl-vQzrq.mjs +3 -0
  73. package/dist/chunks/gitGraphDiagram-UUTBAWPF-UytPZv72.mjs +792 -0
  74. package/dist/chunks/go-Fm5N96DN.mjs +3 -0
  75. package/dist/chunks/graphlib-Cye9EPNq.mjs +223 -0
  76. package/dist/chunks/graphql-BSnqmqgO.mjs +11 -0
  77. package/dist/chunks/html-BLNeZvnp.mjs +10 -0
  78. package/dist/chunks/{i18next-Ch0gVA3V.mjs → i18next-CXx5niYF.mjs} +1 -1
  79. package/dist/chunks/{i18next-loader-dH3UPF7S.mjs → i18next-loader-CwsYu0n6.mjs} +2 -2
  80. package/dist/chunks/info-OMHHGYJF-BOejJvJR.mjs +3 -0
  81. package/dist/chunks/infoDiagram-42DDH7IO-DuYnDbF3.mjs +29 -0
  82. package/dist/chunks/init-C6T-mugb.mjs +15 -0
  83. package/dist/chunks/ishikawaDiagram-UXIWVN3A-CHc59dLn.mjs +719 -0
  84. package/dist/chunks/java-83DWBpzu.mjs +5 -0
  85. package/dist/chunks/javascript-CBgeF1Xx.mjs +3 -0
  86. package/dist/chunks/journeyDiagram-VCZTEJTY-CD25C4_n.mjs +885 -0
  87. package/dist/chunks/json-BI17y-1H.mjs +3 -0
  88. package/dist/chunks/kanban-definition-6JOO6SKY-CTCT6N_p.mjs +980 -0
  89. package/dist/chunks/katex-CmTPfM0f.mjs +22026 -0
  90. package/dist/chunks/kotlin-DjnvsrfO.mjs +3 -0
  91. package/dist/chunks/latex-24n3TcOR.mjs +5 -0
  92. package/dist/chunks/{lightweight-i18n-1rbaxIZW.mjs → lightweight-i18n-Cvv8CWh4.mjs} +69 -2
  93. package/dist/chunks/line-Dct5pMmw.mjs +34 -0
  94. package/dist/chunks/linear-BRCpMvtr.mjs +289 -0
  95. package/dist/chunks/lua-DV0fuZWx.mjs +5 -0
  96. package/dist/chunks/markdown-BqQYT45f.mjs +3 -0
  97. package/dist/chunks/mdast-util-math-BlK2Zu-1.mjs +151 -0
  98. package/dist/chunks/mermaid-parser.core-CA3DKkuk.mjs +57 -0
  99. package/dist/chunks/mermaid-vF0cEnZ0.mjs +3 -0
  100. package/dist/chunks/mermaid.core-CA8nc1sZ.mjs +989 -0
  101. package/dist/{messages-DaOnbI6d.mjs → chunks/messages-8IHf7ZP3.mjs} +68 -1
  102. package/dist/chunks/{messages-C9aKfCro.mjs → messages-A_MkXDlG.mjs} +68 -1
  103. package/dist/{messages-BLEVLZve.mjs → chunks/messages-B0vPBsWq.mjs} +68 -1
  104. package/dist/chunks/{messages-C0hQPZmh2.mjs → messages-B2N4fUi72.mjs} +68 -1
  105. package/dist/{messages-HNAtlVax.mjs → chunks/messages-B4UMuyjT.mjs} +73 -6
  106. package/dist/chunks/{messages-DRUkmDVZ.mjs → messages-B9kmbUWV.mjs} +68 -1
  107. package/dist/{messages-Dbsx9m5q2.mjs → chunks/messages-BA8Iv99Y2.mjs} +68 -1
  108. package/dist/chunks/{messages-Da-SOTFW.mjs → messages-BAsb5CgZ.mjs} +68 -1
  109. package/dist/{messages-D1P0QGLz2.mjs → chunks/messages-BDZA10kl2.mjs} +68 -1
  110. package/dist/chunks/{messages-ComLU2T32.mjs → messages-BE6lHKwf.mjs} +68 -1
  111. package/dist/chunks/{messages-gaxTO-87.mjs → messages-BQYvBqm2.mjs} +68 -1
  112. package/dist/chunks/{messages-BwKs-9DF.mjs → messages-BSghd0ez.mjs} +68 -1
  113. package/dist/{messages-BPRR6TMf.mjs → chunks/messages-BUVhHx0q2.mjs} +68 -1
  114. package/dist/{messages-B7jZvo-m.mjs → chunks/messages-BVjoM7P0.mjs} +68 -1
  115. package/dist/{messages-C-4z1-Dh.mjs → chunks/messages-BXM80fdr2.mjs} +68 -1
  116. package/dist/{messages-Bm0nvUuj2.mjs → chunks/messages-BYlSMRkd.mjs} +68 -1
  117. package/dist/chunks/{messages-DLPrj3Dh.mjs → messages-BYxLFj7y.mjs} +68 -1
  118. package/dist/{messages-BRcLIBCd2.mjs → chunks/messages-BeFqtIrc2.mjs} +68 -1
  119. package/dist/{messages-zHkURG6V2.mjs → chunks/messages-Bfnq1xv4.mjs} +68 -1
  120. package/dist/chunks/{messages-Z762-GLL.mjs → messages-BhzzNkN-.mjs} +68 -1
  121. package/dist/chunks/{messages-COJ0CbVV2.mjs → messages-BjadX8jR2.mjs} +68 -1
  122. package/dist/{messages-B2ZwD4n9.mjs → chunks/messages-Bp8qin1R.mjs} +68 -1
  123. package/dist/chunks/{messages-DdEWnfAR.mjs → messages-Bphq_Bt3.mjs} +71 -4
  124. package/dist/{messages-CUDbNJG5.mjs → chunks/messages-Bxvi1ebN.mjs} +68 -1
  125. package/dist/chunks/{messages-B0t2L3bi.mjs → messages-C0HvoMPb.mjs} +68 -1
  126. package/dist/{messages-D6qfWi6H2.mjs → chunks/messages-C3aX3q0H.mjs} +68 -1
  127. package/dist/chunks/{messages-v9NkxRcL.mjs → messages-C6Mpiacw.mjs} +68 -1
  128. package/dist/chunks/{messages-CqZ9vFyx.mjs → messages-C7VGpihw.mjs} +69 -2
  129. package/dist/chunks/{messages-Yj4Q1_uX2.mjs → messages-CKBhDGI3.mjs} +69 -2
  130. package/dist/chunks/{messages-DxtnwNPo.mjs → messages-COO5xmcA.mjs} +68 -1
  131. package/dist/{messages-CZTcgUzd.mjs → chunks/messages-CSJ_zb3a2.mjs} +68 -1
  132. package/dist/{messages-A8aZS7d_2.mjs → chunks/messages-CSL-6xfb2.mjs} +68 -1
  133. package/dist/{messages-CxruHsuD2.mjs → chunks/messages-CVdpweyf2.mjs} +69 -2
  134. package/dist/{messages-D2Mf9z2D.mjs → chunks/messages-Cdf0W9H02.mjs} +68 -1
  135. package/dist/chunks/{messages-DAbCNake2.mjs → messages-Ck81cQkn2.mjs} +68 -1
  136. package/dist/chunks/{messages-Dyku8Cut.mjs → messages-Cmf6NhSC.mjs} +68 -1
  137. package/dist/chunks/{messages-DQ6bFum9.mjs → messages-Cs81Z_Bh.mjs} +68 -1
  138. package/dist/chunks/{messages-cegxHurd2.mjs → messages-Cu-Wevxs2.mjs} +68 -1
  139. package/dist/{messages-D2HwpoUE.mjs → chunks/messages-D3zojZ94.mjs} +69 -2
  140. package/dist/{messages-BfTBVFd9.mjs → chunks/messages-D55HRx5O2.mjs} +68 -1
  141. package/dist/chunks/{messages-Dl03jd4b2.mjs → messages-D9N2MvQx2.mjs} +68 -1
  142. package/dist/{messages-DfXh-i9o.mjs → chunks/messages-DG-4DPmP.mjs} +68 -1
  143. package/dist/chunks/{messages-DmJf9laH2.mjs → messages-DGL1ySqb2.mjs} +68 -1
  144. package/dist/chunks/{messages-DfU4yvkL.mjs → messages-DJoNVjqP.mjs} +68 -1
  145. package/dist/{messages-Bsd4ruEY.mjs → chunks/messages-DMVXnAYj.mjs} +70 -3
  146. package/dist/{messages-3WhPEFd7.mjs → chunks/messages-DOuS1Qge.mjs} +68 -1
  147. package/dist/chunks/{messages-B1kDfIN82.mjs → messages-DWu1r4gc2.mjs} +68 -1
  148. package/dist/{messages-Dtih3ffa2.mjs → chunks/messages-DlLXpgWM2.mjs} +68 -1
  149. package/dist/chunks/{messages-DKNULJpc.mjs → messages-DlonA3wa.mjs} +69 -2
  150. package/dist/{messages-C5pBfa_W.mjs → chunks/messages-Dr0Ekmbz.mjs} +81 -14
  151. package/dist/{messages-Du62vI49.mjs → chunks/messages-DzTk8bJ5.mjs} +68 -1
  152. package/dist/{messages-DNAp0U4l2.mjs → chunks/messages-FWfsxpBz.mjs} +68 -1
  153. package/dist/{messages-B2YeJw8s2.mjs → chunks/messages-G416eyjY.mjs} +68 -1
  154. package/dist/chunks/{messages-C5-aaU2b.mjs → messages-Je5YvxiY.mjs} +68 -1
  155. package/dist/chunks/{messages-DHHZUf_H2.mjs → messages-JyvWu4rf2.mjs} +68 -1
  156. package/dist/chunks/{messages-D_6vPBzT.mjs → messages-KdawW5Na.mjs} +68 -1
  157. package/dist/chunks/{messages-DnuhgHG0.mjs → messages-MxpWO1db.mjs} +68 -1
  158. package/dist/{messages-DT4rHATO2.mjs → chunks/messages-NEqrrYvE2.mjs} +68 -1
  159. package/dist/chunks/{messages-DeSSxLsh.mjs → messages-RInp1ytX.mjs} +68 -1
  160. package/dist/{messages-DfEPVRdJ.mjs → chunks/messages-TRUuyiFB.mjs} +68 -1
  161. package/dist/chunks/{messages--eH7tTJV2.mjs → messages-aZcy0JQq2.mjs} +68 -1
  162. package/dist/{messages-O6z1uabG.mjs → chunks/messages-iS34FHFB.mjs} +68 -1
  163. package/dist/{messages-BE0DjTEC.mjs → chunks/messages-ihCjSFJI2.mjs} +68 -1
  164. package/dist/chunks/{messages-_5Pg5fKy2.mjs → messages-jfVpL9c-2.mjs} +68 -1
  165. package/dist/chunks/{messages-CaRSYuhO.mjs → messages-p1mbe__S.mjs} +68 -1
  166. package/dist/chunks/{messages-BGssMBWM2.mjs → messages-rCd0Rrw6.mjs} +69 -2
  167. package/dist/{messages-COgvIEeW.mjs → chunks/messages-xuqyb6Ff2.mjs} +68 -1
  168. package/dist/chunks/micromark-extension-math-BbkUb36G.mjs +169 -0
  169. package/dist/chunks/micromark-factory-space-y4SDWQKm.mjs +36 -0
  170. package/dist/chunks/mindmap-definition-QFDTVHPH-hNnyBkEP.mjs +1013 -0
  171. package/dist/chunks/{notifier-Butv4Dvo.mjs → notifier-CuvTt9pe.mjs} +1 -1
  172. package/dist/chunks/objectWithoutProperties-D0XxKB4n.mjs +23 -0
  173. package/dist/chunks/one-light-DmNO_Y4X.mjs +4 -0
  174. package/dist/chunks/ordinal-B-kolV-i.mjs +65 -0
  175. package/dist/chunks/packet-4T2RLAQJ-B5ZMgwzZ.mjs +3 -0
  176. package/dist/chunks/path-rIMjg_tH.mjs +85 -0
  177. package/dist/chunks/php-DmXKyPwJ.mjs +18 -0
  178. package/dist/chunks/pie-ZZUOXDRM-B9l6y0XJ.mjs +3 -0
  179. package/dist/chunks/pieDiagram-DEJITSTG-Gw-fsc6U.mjs +179 -0
  180. package/dist/chunks/python-DfwfY9t5.mjs +3 -0
  181. package/dist/chunks/quadrantDiagram-34T5L4WZ-CQ5fGYI5.mjs +1960 -0
  182. package/dist/chunks/r-BD2D7qEW.mjs +5 -0
  183. package/dist/chunks/radar-PYXPWWZC-D5kYmUaB.mjs +3 -0
  184. package/dist/chunks/requirementDiagram-MS252O5E-DjWKB42c.mjs +2224 -0
  185. package/dist/chunks/rough.esm-cmMIcj7N.mjs +1353 -0
  186. package/dist/chunks/ruby-DdOo03Kg.mjs +33 -0
  187. package/dist/chunks/rust-DEDueB5R.mjs +3 -0
  188. package/dist/chunks/sankeyDiagram-XADWPNL6-BIN2evSB.mjs +909 -0
  189. package/dist/chunks/scala-CsjqvxE4.mjs +3 -0
  190. package/dist/chunks/sequenceDiagram-FGHM5R23-CQz2lMoS.mjs +4181 -0
  191. package/dist/chunks/shellscript-Bh5zEpnQ.mjs +3 -0
  192. package/dist/chunks/sql-D9CrOi1i.mjs +3 -0
  193. package/dist/chunks/src-DVJl6f6s.mjs +2149 -0
  194. package/dist/chunks/stateDiagram-FHFEXIEX-BIBFsF65.mjs +218 -0
  195. package/dist/chunks/stateDiagram-v2-QKLJ7IA2-BZUmAVw7.mjs +28 -0
  196. package/dist/chunks/swift-Dpyt0s2c.mjs +3 -0
  197. package/dist/chunks/timeline-definition-GMOUNBTQ-CzvQ7Lav.mjs +1084 -0
  198. package/dist/chunks/{tools-nT6zA9QL.mjs → tools-CrRhWn8L.mjs} +3043 -1303
  199. package/dist/chunks/treeView-SZITEDCU-BNtnNxpI.mjs +3 -0
  200. package/dist/chunks/treemap-W4RFUUIX-DYENULz2.mjs +3 -0
  201. package/dist/chunks/typescript-DO5cd4m8.mjs +5 -0
  202. package/dist/chunks/vennDiagram-DHZGUBPP-B0DmLQqe.mjs +1876 -0
  203. package/dist/chunks/vitesse-dark-CcorSKT2.mjs +4 -0
  204. package/dist/chunks/wardley-RL74JXVD-ByNHVBTb.mjs +3 -0
  205. package/dist/chunks/wardleyDiagram-NUSXRM2D-CzoKesUw.mjs +594 -0
  206. package/dist/chunks/xml-g8kXXALs.mjs +5 -0
  207. package/dist/chunks/xychartDiagram-5P7HB3ND-CixwR8r2.mjs +2017 -0
  208. package/dist/chunks/yaml-CrNNZyLb.mjs +3 -0
  209. package/dist/cli.mjs +1 -1
  210. package/dist/full.mjs +14 -14
  211. package/dist/locales.mjs +135 -68
  212. package/dist/markdown.mjs +3954 -0
  213. package/dist/{messages-D_CUdqU12.mjs → messages-5jvKxQNu2.mjs} +68 -1
  214. package/dist/{chunks/messages-CFfpHyTU.mjs → messages-7QD-X6XT2.mjs} +68 -1
  215. package/dist/{messages-CdX1odk_2.mjs → messages-96iaAUds2.mjs} +68 -1
  216. package/dist/{messages-C8ca-jEa.mjs → messages-B19o-Teb.mjs} +69 -2
  217. package/dist/{messages-I03yFhup.mjs → messages-B1ZUQagA.mjs} +68 -1
  218. package/dist/{chunks/messages-BSw88lIo2.mjs → messages-B7ieAJBd2.mjs} +68 -1
  219. package/dist/{messages-sNSXCkeB.mjs → messages-BECMxmfX.mjs} +68 -1
  220. package/dist/{messages-DgGZsxBB.mjs → messages-BIHc0KHY.mjs} +68 -1
  221. package/dist/{messages-yZj20Fvf.mjs → messages-BIoeoik5.mjs} +68 -1
  222. package/dist/{chunks/messages-D8JFu42v.mjs → messages-BJeGJksD.mjs} +68 -1
  223. package/dist/{messages-BSLErTnW2.mjs → messages-BRZX964b2.mjs} +68 -1
  224. package/dist/{chunks/messages-BW8arxf72.mjs → messages-BTQPpoM42.mjs} +68 -1
  225. package/dist/{messages-C52AiyVV.mjs → messages-BYNcD6uR.mjs} +68 -1
  226. package/dist/{messages-BxJv0qBn2.mjs → messages-BYmmMDrN2.mjs} +68 -1
  227. package/dist/{messages-CoCy2JIP.mjs → messages-BbYq1pk-.mjs} +68 -1
  228. package/dist/{messages-Cnz_SHE32.mjs → messages-BiUGXvYr2.mjs} +68 -1
  229. package/dist/{chunks/messages-Dl6SVT1Z.mjs → messages-BiiongNz2.mjs} +68 -1
  230. package/dist/{chunks/messages-C912bk5I.mjs → messages-Bm0Feca1.mjs} +69 -2
  231. package/dist/{chunks/messages-CTuCPqpJ.mjs → messages-BmAn22OX.mjs} +68 -1
  232. package/dist/{messages-DdiPWkV8.mjs → messages-Bq3F2Tp_.mjs} +68 -1
  233. package/dist/{chunks/messages-DJxXZi1D2.mjs → messages-BsycN_JI2.mjs} +68 -1
  234. package/dist/{chunks/messages-OdEuBvgf.mjs → messages-BwHs4cm1.mjs} +70 -3
  235. package/dist/{chunks/messages-C4ZAJzBh.mjs → messages-CJTy6JZt.mjs} +68 -1
  236. package/dist/{chunks/messages-D2OZ9dbO.mjs → messages-CR_L_UtK.mjs} +68 -1
  237. package/dist/{messages-ypuLZyw12.mjs → messages-CSUHBs4c2.mjs} +68 -1
  238. package/dist/{chunks/messages-BkES2MDr2.mjs → messages-CWIXvnDf2.mjs} +68 -1
  239. package/dist/{messages-Cpeko5kB.mjs → messages-CcF4y-E4.mjs} +68 -1
  240. package/dist/{messages-BmnC-s4X.mjs → messages-Ce6KVEbT.mjs} +68 -1
  241. package/dist/{messages-DTNfG4ZH.mjs → messages-Ci0KqX-J.mjs} +71 -4
  242. package/dist/{chunks/messages-CGh56r-H2.mjs → messages-CjbnogEC.mjs} +68 -1
  243. package/dist/{messages-B3jq5Hpa.mjs → messages-CmB406HW.mjs} +69 -2
  244. package/dist/{chunks/messages-BsZz1Hnn2.mjs → messages-CqXtJTpU.mjs} +68 -1
  245. package/dist/{messages-DL000FUf2.mjs → messages-D0aw5_0k2.mjs} +68 -1
  246. package/dist/{chunks/messages-Df2RYuup2.mjs → messages-D8FQWulF2.mjs} +68 -1
  247. package/dist/{messages-CxHn7cs2.mjs → messages-DBiVgUs2.mjs} +68 -1
  248. package/dist/{chunks/messages-Dsapm4K9.mjs → messages-DIJlIqlQ2.mjs} +68 -1
  249. package/dist/{chunks/messages-517llQmh.mjs → messages-DLX_iBDJ.mjs} +68 -1
  250. package/dist/{chunks/messages-BG8Nq35G.mjs → messages-DLlc9QPw.mjs} +68 -1
  251. package/dist/{messages-cokJPuUp2.mjs → messages-DMr62KiO2.mjs} +68 -1
  252. package/dist/{chunks/messages-Dkp-Eyu02.mjs → messages-DPA-mMWC2.mjs} +68 -1
  253. package/dist/{chunks/messages-7uCUVFea.mjs → messages-DTh9a8mR.mjs} +68 -1
  254. package/dist/{messages-VBFioL2M.mjs → messages-DY4IqlhY.mjs} +68 -1
  255. package/dist/{chunks/messages-C4X0xP3h.mjs → messages-DYTTu0O12.mjs} +68 -1
  256. package/dist/{messages-diSPQ2Da2.mjs → messages-DbySKTKt2.mjs} +69 -2
  257. package/dist/{chunks/messages-BGE43_6M.mjs → messages-Ddnj2iTG2.mjs} +68 -1
  258. package/dist/{chunks/messages-BtUqUzMG2.mjs → messages-DkLU_rWm.mjs} +68 -1
  259. package/dist/{messages-DSX2HaeN2.mjs → messages-Dl3Sv6Rq2.mjs} +68 -1
  260. package/dist/{chunks/messages-BDvpl6Ox.mjs → messages-Dl5Y2-Ia.mjs} +81 -14
  261. package/dist/{chunks/messages-C7plNvNE2.mjs → messages-DnG0ef8t2.mjs} +69 -2
  262. package/dist/{chunks/messages-qS8tM3Dk.mjs → messages-DnGJD4TL.mjs} +68 -1
  263. package/dist/{messages-Ct468oX22.mjs → messages-Dnp9N6RU2.mjs} +68 -1
  264. package/dist/{chunks/messages-CjIA--kO.mjs → messages-Dvn35ksS.mjs} +68 -1
  265. package/dist/{messages-BRxNqmJ8.mjs → messages-Dw__BcTj.mjs} +68 -1
  266. package/dist/{chunks/messages-0zhE8A9X.mjs → messages-Dy-Y_nEI.mjs} +68 -1
  267. package/dist/{chunks/messages-CCH4OETw2.mjs → messages-E_ZuzGDt.mjs} +68 -1
  268. package/dist/{chunks/messages-DZzoT0T_.mjs → messages-F2xRoY1w.mjs} +68 -1
  269. package/dist/{chunks/messages-zGdqNZbH.mjs → messages-Smt4GBbj.mjs} +73 -6
  270. package/dist/{messages-CvIxHHp92.mjs → messages-aMXpHt5X2.mjs} +68 -1
  271. package/dist/{messages-C8JVJUp12.mjs → messages-aWZH50vu2.mjs} +68 -1
  272. package/dist/{messages-Phrqr7a6.mjs → messages-dv19AkyJ.mjs} +68 -1
  273. package/dist/{chunks/messages-DngM4hda2.mjs → messages-hWwSRF-2.mjs} +68 -1
  274. package/dist/{messages-DpGo_Da5.mjs → messages-j7o5rT9s.mjs} +68 -1
  275. package/dist/{messages-C6WJx6Z0.mjs → messages-nUVjeh7K.mjs} +68 -1
  276. package/dist/{messages-CbVilNPE.mjs → messages-nlhESX9t.mjs} +68 -1
  277. package/dist/{messages-C6o0FVy02.mjs → messages-rk-A1Wa42.mjs} +69 -2
  278. package/dist/{messages-D4mCIODv.mjs → messages-xh2eOLvs.mjs} +68 -1
  279. package/dist/{chunks/messages-Ct9UUOrl2.mjs → messages-ynAe7ewZ.mjs} +68 -1
  280. package/dist/react.mjs +26 -25
  281. package/dist/tools.mjs +3 -3
  282. package/dist/vendor.LICENSE.txt +5404 -80
  283. package/package.json +16 -1
  284. package/src/components/blocks.ts +26 -1
  285. package/src/components/constants/data-attributes.ts +2 -2
  286. package/src/components/i18n/locales/am/messages.json +68 -1
  287. package/src/components/i18n/locales/ar/messages.json +68 -1
  288. package/src/components/i18n/locales/az/messages.json +68 -1
  289. package/src/components/i18n/locales/bg/messages.json +68 -1
  290. package/src/components/i18n/locales/bn/messages.json +68 -1
  291. package/src/components/i18n/locales/bs/messages.json +69 -2
  292. package/src/components/i18n/locales/cs/messages.json +70 -3
  293. package/src/components/i18n/locales/da/messages.json +71 -4
  294. package/src/components/i18n/locales/de/messages.json +73 -6
  295. package/src/components/i18n/locales/dv/messages.json +68 -1
  296. package/src/components/i18n/locales/el/messages.json +68 -1
  297. package/src/components/i18n/locales/en/messages.json +68 -1
  298. package/src/components/i18n/locales/es/messages.json +68 -1
  299. package/src/components/i18n/locales/et/messages.json +69 -2
  300. package/src/components/i18n/locales/fa/messages.json +68 -1
  301. package/src/components/i18n/locales/fi/messages.json +68 -1
  302. package/src/components/i18n/locales/fil/messages.json +81 -14
  303. package/src/components/i18n/locales/fr/messages.json +68 -1
  304. package/src/components/i18n/locales/gu/messages.json +68 -1
  305. package/src/components/i18n/locales/he/messages.json +68 -1
  306. package/src/components/i18n/locales/hi/messages.json +68 -1
  307. package/src/components/i18n/locales/hr/messages.json +69 -2
  308. package/src/components/i18n/locales/hu/messages.json +68 -1
  309. package/src/components/i18n/locales/hy/messages.json +68 -1
  310. package/src/components/i18n/locales/id/messages.json +68 -1
  311. package/src/components/i18n/locales/it/messages.json +68 -1
  312. package/src/components/i18n/locales/ja/messages.json +68 -1
  313. package/src/components/i18n/locales/ka/messages.json +68 -1
  314. package/src/components/i18n/locales/km/messages.json +68 -1
  315. package/src/components/i18n/locales/kn/messages.json +68 -1
  316. package/src/components/i18n/locales/ko/messages.json +68 -1
  317. package/src/components/i18n/locales/ku/messages.json +68 -1
  318. package/src/components/i18n/locales/lo/messages.json +68 -1
  319. package/src/components/i18n/locales/lt/messages.json +68 -1
  320. package/src/components/i18n/locales/lv/messages.json +68 -1
  321. package/src/components/i18n/locales/mk/messages.json +68 -1
  322. package/src/components/i18n/locales/ml/messages.json +68 -1
  323. package/src/components/i18n/locales/mn/messages.json +68 -1
  324. package/src/components/i18n/locales/mr/messages.json +68 -1
  325. package/src/components/i18n/locales/ms/messages.json +69 -2
  326. package/src/components/i18n/locales/my/messages.json +68 -1
  327. package/src/components/i18n/locales/ne/messages.json +68 -1
  328. package/src/components/i18n/locales/nl/messages.json +68 -1
  329. package/src/components/i18n/locales/no/messages.json +68 -1
  330. package/src/components/i18n/locales/pa/messages.json +68 -1
  331. package/src/components/i18n/locales/pl/messages.json +68 -1
  332. package/src/components/i18n/locales/ps/messages.json +68 -1
  333. package/src/components/i18n/locales/pt/messages.json +68 -1
  334. package/src/components/i18n/locales/ro/messages.json +68 -1
  335. package/src/components/i18n/locales/ru/messages.json +68 -1
  336. package/src/components/i18n/locales/sd/messages.json +68 -1
  337. package/src/components/i18n/locales/si/messages.json +68 -1
  338. package/src/components/i18n/locales/sk/messages.json +69 -2
  339. package/src/components/i18n/locales/sl/messages.json +69 -2
  340. package/src/components/i18n/locales/sq/messages.json +68 -1
  341. package/src/components/i18n/locales/sr/messages.json +68 -1
  342. package/src/components/i18n/locales/sv/messages.json +68 -1
  343. package/src/components/i18n/locales/sw/messages.json +68 -1
  344. package/src/components/i18n/locales/ta/messages.json +68 -1
  345. package/src/components/i18n/locales/te/messages.json +68 -1
  346. package/src/components/i18n/locales/th/messages.json +68 -1
  347. package/src/components/i18n/locales/tr/messages.json +68 -1
  348. package/src/components/i18n/locales/ug/messages.json +68 -1
  349. package/src/components/i18n/locales/uk/messages.json +68 -1
  350. package/src/components/i18n/locales/ur/messages.json +68 -1
  351. package/src/components/i18n/locales/vi/messages.json +68 -1
  352. package/src/components/i18n/locales/yi/messages.json +68 -1
  353. package/src/components/i18n/locales/zh/messages.json +68 -1
  354. package/src/components/icons/index.ts +78 -0
  355. package/src/components/inline-tools/inline-tool-code.ts +399 -0
  356. package/src/components/modules/api/blocks.ts +17 -0
  357. package/src/components/modules/api/ui.ts +0 -3
  358. package/src/components/modules/blockEvents/composers/blockSelectionKeys.ts +20 -3
  359. package/src/components/modules/paste/handlers/html-handler.ts +13 -10
  360. package/src/components/modules/paste/handlers/index.ts +1 -0
  361. package/src/components/modules/paste/index.ts +6 -0
  362. package/src/components/modules/renderer.ts +17 -0
  363. package/src/components/modules/ui.ts +1 -13
  364. package/src/components/ui/toolbox.ts +9 -0
  365. package/src/components/utils/caret/boundaries.ts +15 -4
  366. package/src/components/utils/popover/popover-desktop.ts +11 -0
  367. package/src/markdown/index.ts +63 -0
  368. package/src/markdown/markdown-handler.ts +110 -0
  369. package/src/markdown/mdast-to-blocks.ts +418 -0
  370. package/src/markdown/phrasing-to-html.ts +60 -0
  371. package/src/markdown/types.ts +42 -0
  372. package/src/stories/EditorModes.stories.ts +0 -60
  373. package/src/styles/main.css +57 -2
  374. package/src/tools/callout/constants.ts +2 -1
  375. package/src/tools/callout/emoji-picker/index.ts +41 -2
  376. package/src/tools/callout/index.ts +25 -0
  377. package/src/tools/code/code-keyboard.ts +142 -0
  378. package/src/tools/code/constants.ts +96 -0
  379. package/src/tools/code/dom-builder.ts +181 -0
  380. package/src/tools/code/highlight-applier.ts +229 -0
  381. package/src/tools/code/index.ts +462 -0
  382. package/src/tools/code/katex-loader.ts +50 -0
  383. package/src/tools/code/language-picker.ts +241 -0
  384. package/src/tools/code/mermaid-loader.ts +45 -0
  385. package/src/tools/code/shiki-loader.ts +135 -0
  386. package/src/tools/divider/index.ts +11 -2
  387. package/src/tools/header/index.ts +2 -0
  388. package/src/tools/index.ts +6 -0
  389. package/src/tools/list/block-operations.ts +3 -1
  390. package/src/tools/list/depth-validator.ts +4 -7
  391. package/src/tools/list/dom-builder.ts +5 -3
  392. package/src/tools/list/index.ts +21 -3
  393. package/src/tools/list/list-helpers.ts +9 -2
  394. package/src/tools/list/list-keyboard.ts +56 -14
  395. package/src/tools/list/list-lifecycle.ts +3 -1
  396. package/src/tools/list/marker-calculator.ts +37 -0
  397. package/src/tools/list/ordered-marker-manager.ts +4 -2
  398. package/src/tools/list/style-config.ts +3 -0
  399. package/src/tools/paragraph/index.ts +1 -0
  400. package/src/tools/quote/index.ts +229 -0
  401. package/src/tools/table/core/table-commands.ts +16 -0
  402. package/src/tools/table/core/table-controller.ts +29 -0
  403. package/src/tools/table/core/table-events.ts +17 -0
  404. package/src/tools/table/index.ts +220 -14
  405. package/src/tools/table/table-cell-blocks.ts +51 -6
  406. package/src/tools/table/table-cell-clipboard.ts +7 -2
  407. package/src/tools/table/table-cell-placement-picker.ts +133 -0
  408. package/src/tools/table/table-cell-selection.ts +174 -19
  409. package/src/tools/table/table-core.ts +321 -113
  410. package/src/tools/table/table-map.ts +279 -0
  411. package/src/tools/table/table-model.ts +901 -1
  412. package/src/tools/table/table-operations.ts +87 -44
  413. package/src/tools/table/table-resize.ts +19 -17
  414. package/src/tools/table/table-row-col-drag.ts +24 -10
  415. package/src/tools/table/types.ts +24 -2
  416. package/src/tools/toggle/index.ts +1 -0
  417. package/types/configs/blok-config.d.ts +7 -0
  418. package/types/data-attributes.d.ts +0 -1
  419. package/types/markdown.d.ts +2 -0
  420. package/types/tools/callout.d.ts +16 -0
  421. package/types/tools/code.d.ts +13 -0
  422. package/types/tools/quote.d.ts +13 -0
  423. package/types/tools/tool-settings.d.ts +7 -0
  424. package/types/tools-entry.d.ts +7 -0
  425. /package/dist/chunks/{am-CHDDMHkd.mjs → am-BxlkYGsI.mjs} +0 -0
  426. /package/dist/chunks/{ar-DoqfNqut.mjs → ar-9vlpr9V8.mjs} +0 -0
  427. /package/dist/chunks/{az-C34P9iEa.mjs → az-ON63W_FP.mjs} +0 -0
  428. /package/dist/chunks/{bg-jroXLY8Y.mjs → bg-CtXWTP5w.mjs} +0 -0
  429. /package/dist/chunks/{bn-BRI-WqxY.mjs → bn-BERvhXM4.mjs} +0 -0
  430. /package/dist/chunks/{bs-CCGUpNHu.mjs → bs-CBg8NVPG.mjs} +0 -0
  431. /package/dist/chunks/{cs-D5qZOGuc.mjs → cs-DeQddxS7.mjs} +0 -0
  432. /package/dist/chunks/{da-DrJ7W37K.mjs → da-DyTo-ec_.mjs} +0 -0
  433. /package/dist/chunks/{de-BW6-kp2c.mjs → de-Cu7545m1.mjs} +0 -0
  434. /package/dist/chunks/{el-C-Vc_Otu.mjs → el-oiubLRBq.mjs} +0 -0
  435. /package/dist/chunks/{es-B6fI5K9i.mjs → es-DZUC6Klv.mjs} +0 -0
  436. /package/dist/chunks/{et-BhVlZ-Yz.mjs → et-CDeklAog.mjs} +0 -0
  437. /package/dist/chunks/{fa-D55Ijdqa.mjs → fa-Cafp7_Li.mjs} +0 -0
  438. /package/dist/chunks/{fi-jNLjhKUQ.mjs → fi-BD_V_aVW.mjs} +0 -0
  439. /package/dist/chunks/{fil-DYd0T5aX.mjs → fil-Crsfbtx4.mjs} +0 -0
  440. /package/dist/chunks/{fr-yxy5xWw_.mjs → fr-BGGc04Zv.mjs} +0 -0
  441. /package/dist/chunks/{gu-CcY_LJe7.mjs → gu-Vg_BgCTp.mjs} +0 -0
  442. /package/dist/chunks/{he-DL9s7wNw.mjs → he-DTY9chlZ.mjs} +0 -0
  443. /package/dist/chunks/{hi-C8eGXgw5.mjs → hi-DChMXk0x.mjs} +0 -0
  444. /package/dist/chunks/{hr-DLpybOhU.mjs → hr-BWVgNU8k.mjs} +0 -0
  445. /package/dist/chunks/{hu-BkT0gT00.mjs → hu-B37awHXA.mjs} +0 -0
  446. /package/dist/chunks/{hy-CVFDCp2S.mjs → hy-DGC_GDHh.mjs} +0 -0
  447. /package/dist/chunks/{id-0P4W9Az0.mjs → id-V7cw6La2.mjs} +0 -0
  448. /package/dist/chunks/{it-mLY6_uoW.mjs → it-DrTGP8Rn.mjs} +0 -0
  449. /package/dist/chunks/{ja-7RkeRNWG.mjs → ja-DS4pbJEG.mjs} +0 -0
  450. /package/dist/chunks/{ka-C7Lx-Qsh.mjs → ka-BueyosRh.mjs} +0 -0
  451. /package/dist/chunks/{km-Q8udaraH.mjs → km-B0K891yW.mjs} +0 -0
  452. /package/dist/chunks/{kn-BiETM-iq.mjs → kn-BQ__skg8.mjs} +0 -0
  453. /package/dist/chunks/{ko-tiB80pF1.mjs → ko-BuPxi_7e.mjs} +0 -0
  454. /package/dist/chunks/{ku-CY-OABkR.mjs → ku-nQjwPRw2.mjs} +0 -0
  455. /package/dist/chunks/{lo-CTBhEnyk.mjs → lo-K5NVFoq1.mjs} +0 -0
  456. /package/dist/chunks/{lt-BHKHEtqK.mjs → lt-D3xD6Eb2.mjs} +0 -0
  457. /package/dist/chunks/{lv-DWxgtfUg.mjs → lv-DH13mzZj.mjs} +0 -0
  458. /package/dist/chunks/{mk-BjookGdx.mjs → mk-Bb48BcDA.mjs} +0 -0
  459. /package/dist/chunks/{ml-L-NnZcp9.mjs → ml-BHPEj1kD.mjs} +0 -0
  460. /package/dist/chunks/{mn-OMWi7Hl_.mjs → mn-BNGzpdI6.mjs} +0 -0
  461. /package/dist/chunks/{mr-B6JPzITo.mjs → mr-D5PgU-cH.mjs} +0 -0
  462. /package/dist/chunks/{ms-CG3S-sPB.mjs → ms-DPkxqKz5.mjs} +0 -0
  463. /package/dist/chunks/{my-BLAmGfhT.mjs → my-DZGcyfxy.mjs} +0 -0
  464. /package/dist/chunks/{native-BPcABu9z.mjs → native-D0cfLXsM.mjs} +0 -0
  465. /package/dist/chunks/{ne-D1JHLfYw.mjs → ne-BU_Wh4Wv.mjs} +0 -0
  466. /package/dist/chunks/{nl-Ca7Q8FnY.mjs → nl-DtAPk1mK.mjs} +0 -0
  467. /package/dist/chunks/{no-Coxcohcz.mjs → no-CdW3n3BY.mjs} +0 -0
  468. /package/dist/chunks/{objectSpread2-CyPxu8-u.mjs → objectSpread2-CWwMYL_U.mjs} +0 -0
  469. /package/dist/chunks/{pa-CCaXqpaI.mjs → pa-BacCHz87.mjs} +0 -0
  470. /package/dist/chunks/{pl-Cl_fAZ84.mjs → pl-8zBJbmhZ.mjs} +0 -0
  471. /package/dist/chunks/{ps-WD5qGAWy.mjs → ps-c6nGXD-W.mjs} +0 -0
  472. /package/dist/chunks/{pt-C4zvLfvq.mjs → pt-B5yR8Qhr.mjs} +0 -0
  473. /package/dist/chunks/{ro-DbefHcmM.mjs → ro-Nscylsqb.mjs} +0 -0
  474. /package/dist/chunks/{ru-uU1J14jd.mjs → ru-DxERQkVJ.mjs} +0 -0
  475. /package/dist/chunks/{sd-DKu368Ip.mjs → sd-5z-QY3q9.mjs} +0 -0
  476. /package/dist/chunks/{si-BsJCiPkZ.mjs → si-DTL0mzrx.mjs} +0 -0
  477. /package/dist/chunks/{sk-CD-a3SN6.mjs → sk-DrGczTvY.mjs} +0 -0
  478. /package/dist/chunks/{sl-CXhrPJe_.mjs → sl-D8nJjig4.mjs} +0 -0
  479. /package/dist/chunks/{sq-CTctCoFQ.mjs → sq-C74Hm3YL.mjs} +0 -0
  480. /package/dist/chunks/{sr-BZkhBwXj.mjs → sr-DAwB05Gj.mjs} +0 -0
  481. /package/dist/chunks/{sv-NmRZb_xi.mjs → sv-BkHBsN4y.mjs} +0 -0
  482. /package/dist/chunks/{sw-Be5ik3H6.mjs → sw-BBQLTq_z.mjs} +0 -0
  483. /package/dist/chunks/{ta-DsXh6neL.mjs → ta-DRRzdKky.mjs} +0 -0
  484. /package/dist/chunks/{te-CwpCbM8M.mjs → te-CedXLsKM.mjs} +0 -0
  485. /package/dist/chunks/{th-CcZ15OLk.mjs → th-DDOlGA0W.mjs} +0 -0
  486. /package/dist/chunks/{tr-q3bTgvhW.mjs → tr-ClgvwOlL.mjs} +0 -0
  487. /package/dist/chunks/{tw-DmW6-pCY.mjs → tw-CqxBf-1Y.mjs} +0 -0
  488. /package/dist/chunks/{ug-919EhLsL.mjs → ug-bXxwiinM.mjs} +0 -0
  489. /package/dist/chunks/{uk-aNMEzd0Y.mjs → uk-Dp46o_VT.mjs} +0 -0
  490. /package/dist/chunks/{ur-BwQI77sh.mjs → ur-MfEEhdFq.mjs} +0 -0
  491. /package/dist/chunks/{vi-Dxq806-F.mjs → vi-bt-3LPGO.mjs} +0 -0
  492. /package/dist/chunks/{zh-BcHuy1Ti.mjs → zh-Dgyb5Ly8.mjs} +0 -0
@@ -0,0 +1,4066 @@
1
+ import { o as e, t } from "./chunk-D6kmoKXy.mjs";
2
+ import { t as n } from "./objectSpread2-CWwMYL_U.mjs";
3
+ import "./chunk-K5T4RW27-BPZ6fFnW.mjs";
4
+ import "./chunk-7N4EOEYR-DKNajFZd.mjs";
5
+ import "./chunk-67CJDMHE-m0UKdcSH.mjs";
6
+ import "./chunk-KGLVRYIC-S1OQdW76.mjs";
7
+ import "./chunk-FOC6F5B3-LmHCCWYY.mjs";
8
+ import "./chunk-AA7GKIK3-BeLhNzKa.mjs";
9
+ import "./chunk-2KRD3SAO-DkM7qh-k.mjs";
10
+ import "./chunk-ORNJ4GCN-CdO0hAge.mjs";
11
+ import "./chunk-LIHQZDEY-CjtyJlI6.mjs";
12
+ import "./chunk-CIAEETIT-CTikoJ19.mjs";
13
+ import { g as r, h as i, p as a } from "./src-DVJl6f6s.mjs";
14
+ import { B as o, C as s, K as c, L as l, V as u, W as d, _ as f, a as p, b as m, d as h, v as g, y as _ } from "./chunk-ICPOFSXX-BHZIN46A.mjs";
15
+ import "./dist-Ctq-pyfb.mjs";
16
+ import { r as v, s as y } from "./chunk-5PVQY5BW-CORl9dnu.mjs";
17
+ import { t as b } from "./chunk-426QAEUC-D6UAVUog.mjs";
18
+ import { a as x, i as S, n as C, r as w } from "./chunk-U2HBQHQK-B88ZUOTL.mjs";
19
+ import { t as T } from "./chunk-4BX2VUAB-CgIkjF7Z.mjs";
20
+ import { t as E } from "./mermaid-parser.core-CA3DKkuk.mjs";
21
+ import { t as D } from "./cytoscape.esm-BvD8wo00.mjs";
22
+ //#region node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js
23
+ var O = /* @__PURE__ */ t(((e, t) => {
24
+ (function(n, r) {
25
+ typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.layoutBase = r() : n.layoutBase = r();
26
+ })(e, function() {
27
+ return (function(e) {
28
+ var t = {};
29
+ function n(r) {
30
+ if (t[r]) return t[r].exports;
31
+ var i = t[r] = {
32
+ i: r,
33
+ l: !1,
34
+ exports: {}
35
+ };
36
+ return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
37
+ }
38
+ return n.m = e, n.c = t, n.i = function(e) {
39
+ return e;
40
+ }, n.d = function(e, t, r) {
41
+ n.o(e, t) || Object.defineProperty(e, t, {
42
+ configurable: !1,
43
+ enumerable: !0,
44
+ get: r
45
+ });
46
+ }, n.n = function(e) {
47
+ var t = e && e.__esModule ? function() {
48
+ return e.default;
49
+ } : function() {
50
+ return e;
51
+ };
52
+ return n.d(t, "a", t), t;
53
+ }, n.o = function(e, t) {
54
+ return Object.prototype.hasOwnProperty.call(e, t);
55
+ }, n.p = "", n(n.s = 28);
56
+ })([
57
+ (function(e, t, n) {
58
+ function r() {}
59
+ 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, e.exports = r;
60
+ }),
61
+ (function(e, t, n) {
62
+ var r = n(2), i = n(8), a = n(9);
63
+ function o(e, t, n) {
64
+ r.call(this, n), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = n, this.bendpoints = [], this.source = e, this.target = t;
65
+ }
66
+ for (var s in o.prototype = Object.create(r.prototype), r) o[s] = r[s];
67
+ o.prototype.getSource = function() {
68
+ return this.source;
69
+ }, o.prototype.getTarget = function() {
70
+ return this.target;
71
+ }, o.prototype.isInterGraph = function() {
72
+ return this.isInterGraph;
73
+ }, o.prototype.getLength = function() {
74
+ return this.length;
75
+ }, o.prototype.isOverlapingSourceAndTarget = function() {
76
+ return this.isOverlapingSourceAndTarget;
77
+ }, o.prototype.getBendpoints = function() {
78
+ return this.bendpoints;
79
+ }, o.prototype.getLca = function() {
80
+ return this.lca;
81
+ }, o.prototype.getSourceInLca = function() {
82
+ return this.sourceInLca;
83
+ }, o.prototype.getTargetInLca = function() {
84
+ return this.targetInLca;
85
+ }, o.prototype.getOtherEnd = function(e) {
86
+ if (this.source === e) return this.target;
87
+ if (this.target === e) return this.source;
88
+ throw "Node is not incident with this edge";
89
+ }, o.prototype.getOtherEndInGraph = function(e, t) {
90
+ for (var n = this.getOtherEnd(e), r = t.getGraphManager().getRoot();;) {
91
+ if (n.getOwner() == t) return n;
92
+ if (n.getOwner() == r) break;
93
+ n = n.getOwner().getParent();
94
+ }
95
+ return null;
96
+ }, o.prototype.updateLength = function() {
97
+ var e = [
98
+ ,
99
+ ,
100
+ ,
101
+ ,
102
+ ];
103
+ this.isOverlapingSourceAndTarget = i.getIntersection(this.target.getRect(), this.source.getRect(), e), this.isOverlapingSourceAndTarget || (this.lengthX = e[0] - e[2], this.lengthY = e[1] - e[3], Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
104
+ }, o.prototype.updateLengthSimple = function() {
105
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = a.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = a.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
106
+ }, e.exports = o;
107
+ }),
108
+ (function(e, t, n) {
109
+ function r(e) {
110
+ this.vGraphObject = e;
111
+ }
112
+ e.exports = r;
113
+ }),
114
+ (function(e, t, n) {
115
+ var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(5);
116
+ function l(e, t, n, o) {
117
+ n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ? this.rect = new a(t.x, t.y, n.width, n.height) : this.rect = new a();
118
+ }
119
+ for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
120
+ l.prototype.getEdges = function() {
121
+ return this.edges;
122
+ }, l.prototype.getChild = function() {
123
+ return this.child;
124
+ }, l.prototype.getOwner = function() {
125
+ return this.owner;
126
+ }, l.prototype.getWidth = function() {
127
+ return this.rect.width;
128
+ }, l.prototype.setWidth = function(e) {
129
+ this.rect.width = e;
130
+ }, l.prototype.getHeight = function() {
131
+ return this.rect.height;
132
+ }, l.prototype.setHeight = function(e) {
133
+ this.rect.height = e;
134
+ }, l.prototype.getCenterX = function() {
135
+ return this.rect.x + this.rect.width / 2;
136
+ }, l.prototype.getCenterY = function() {
137
+ return this.rect.y + this.rect.height / 2;
138
+ }, l.prototype.getCenter = function() {
139
+ return new c(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
140
+ }, l.prototype.getLocation = function() {
141
+ return new c(this.rect.x, this.rect.y);
142
+ }, l.prototype.getRect = function() {
143
+ return this.rect;
144
+ }, l.prototype.getDiagonal = function() {
145
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
146
+ }, l.prototype.getHalfTheDiagonal = function() {
147
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
148
+ }, l.prototype.setRect = function(e, t) {
149
+ this.rect.x = e.x, this.rect.y = e.y, this.rect.width = t.width, this.rect.height = t.height;
150
+ }, l.prototype.setCenter = function(e, t) {
151
+ this.rect.x = e - this.rect.width / 2, this.rect.y = t - this.rect.height / 2;
152
+ }, l.prototype.setLocation = function(e, t) {
153
+ this.rect.x = e, this.rect.y = t;
154
+ }, l.prototype.moveBy = function(e, t) {
155
+ this.rect.x += e, this.rect.y += t;
156
+ }, l.prototype.getEdgeListToNode = function(e) {
157
+ var t = [], n = this;
158
+ return n.edges.forEach(function(r) {
159
+ if (r.target == e) {
160
+ if (r.source != n) throw "Incorrect edge source!";
161
+ t.push(r);
162
+ }
163
+ }), t;
164
+ }, l.prototype.getEdgesBetween = function(e) {
165
+ var t = [], n = this;
166
+ return n.edges.forEach(function(r) {
167
+ if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
168
+ (r.target == e || r.source == e) && t.push(r);
169
+ }), t;
170
+ }, l.prototype.getNeighborsList = function() {
171
+ var e = /* @__PURE__ */ new Set(), t = this;
172
+ return t.edges.forEach(function(n) {
173
+ if (n.source == t) e.add(n.target);
174
+ else {
175
+ if (n.target != t) throw "Incorrect incidency!";
176
+ e.add(n.source);
177
+ }
178
+ }), e;
179
+ }, l.prototype.withChildren = function() {
180
+ var e = /* @__PURE__ */ new Set(), t, n;
181
+ if (e.add(this), this.child != null) for (var r = this.child.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.withChildren(), n.forEach(function(t) {
182
+ e.add(t);
183
+ });
184
+ return e;
185
+ }, l.prototype.getNoOfChildren = function() {
186
+ var e = 0, t;
187
+ if (this.child == null) e = 1;
188
+ else for (var n = this.child.getNodes(), r = 0; r < n.length; r++) t = n[r], e += t.getNoOfChildren();
189
+ return e == 0 && (e = 1), e;
190
+ }, l.prototype.getEstimatedSize = function() {
191
+ if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
192
+ return this.estimatedSize;
193
+ }, l.prototype.calcEstimatedSize = function() {
194
+ 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);
195
+ }, l.prototype.scatter = function() {
196
+ var e, t, n = -o.INITIAL_WORLD_BOUNDARY, r = o.INITIAL_WORLD_BOUNDARY;
197
+ e = o.WORLD_CENTER_X + s.nextDouble() * (r - n) + n;
198
+ var i = -o.INITIAL_WORLD_BOUNDARY, a = o.INITIAL_WORLD_BOUNDARY;
199
+ t = o.WORLD_CENTER_Y + s.nextDouble() * (a - i) + i, this.rect.x = e, this.rect.y = t;
200
+ }, l.prototype.updateBounds = function() {
201
+ if (this.getChild() == null) throw "assert failed";
202
+ if (this.getChild().getNodes().length != 0) {
203
+ var e = this.getChild();
204
+ if (e.updateBounds(!0), this.rect.x = e.getLeft(), this.rect.y = e.getTop(), this.setWidth(e.getRight() - e.getLeft()), this.setHeight(e.getBottom() - e.getTop()), o.NODE_DIMENSIONS_INCLUDE_LABELS) {
205
+ var t = e.getRight() - e.getLeft(), n = e.getBottom() - e.getTop();
206
+ this.labelWidth && (this.labelPosHorizontal == "left" ? (this.rect.x -= this.labelWidth, this.setWidth(t + this.labelWidth)) : this.labelPosHorizontal == "center" && this.labelWidth > t ? (this.rect.x -= (this.labelWidth - t) / 2, this.setWidth(this.labelWidth)) : this.labelPosHorizontal == "right" && this.setWidth(t + this.labelWidth)), this.labelHeight && (this.labelPosVertical == "top" ? (this.rect.y -= this.labelHeight, this.setHeight(n + this.labelHeight)) : this.labelPosVertical == "center" && this.labelHeight > n ? (this.rect.y -= (this.labelHeight - n) / 2, this.setHeight(this.labelHeight)) : this.labelPosVertical == "bottom" && this.setHeight(n + this.labelHeight));
207
+ }
208
+ }
209
+ }, l.prototype.getInclusionTreeDepth = function() {
210
+ if (this.inclusionTreeDepth == i.MAX_VALUE) throw "assert failed";
211
+ return this.inclusionTreeDepth;
212
+ }, l.prototype.transform = function(e) {
213
+ var t = this.rect.x;
214
+ t > o.WORLD_BOUNDARY ? t = o.WORLD_BOUNDARY : t < -o.WORLD_BOUNDARY && (t = -o.WORLD_BOUNDARY);
215
+ var n = this.rect.y;
216
+ n > o.WORLD_BOUNDARY ? n = o.WORLD_BOUNDARY : n < -o.WORLD_BOUNDARY && (n = -o.WORLD_BOUNDARY);
217
+ var r = new c(t, n), i = e.inverseTransformPoint(r);
218
+ this.setLocation(i.x, i.y);
219
+ }, l.prototype.getLeft = function() {
220
+ return this.rect.x;
221
+ }, l.prototype.getRight = function() {
222
+ return this.rect.x + this.rect.width;
223
+ }, l.prototype.getTop = function() {
224
+ return this.rect.y;
225
+ }, l.prototype.getBottom = function() {
226
+ return this.rect.y + this.rect.height;
227
+ }, l.prototype.getParent = function() {
228
+ return this.owner == null ? null : this.owner.getParent();
229
+ }, e.exports = l;
230
+ }),
231
+ (function(e, t, n) {
232
+ var r = n(0);
233
+ function i() {}
234
+ for (var a in r) i[a] = r[a];
235
+ i.MAX_ITERATIONS = 2500, i.DEFAULT_EDGE_LENGTH = 50, i.DEFAULT_SPRING_STRENGTH = .45, i.DEFAULT_REPULSION_STRENGTH = 4500, i.DEFAULT_GRAVITY_STRENGTH = .4, i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, i.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, i.DEFAULT_COOLING_FACTOR_INCREMENTAL = .3, i.COOLING_ADAPTATION_FACTOR = .33, i.ADAPTATION_LOWER_NODE_LIMIT = 1e3, i.ADAPTATION_UPPER_NODE_LIMIT = 5e3, i.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, i.MAX_NODE_DISPLACEMENT = i.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, i.MIN_REPULSION_DIST = i.DEFAULT_EDGE_LENGTH / 10, i.CONVERGENCE_CHECK_PERIOD = 100, i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = .1, i.MIN_EDGE_LENGTH = 1, i.GRID_CALCULATION_CHECK_PERIOD = 10, e.exports = i;
236
+ }),
237
+ (function(e, t, n) {
238
+ function r(e, t) {
239
+ e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
240
+ }
241
+ r.prototype.getX = function() {
242
+ return this.x;
243
+ }, r.prototype.getY = function() {
244
+ return this.y;
245
+ }, r.prototype.setX = function(e) {
246
+ this.x = e;
247
+ }, r.prototype.setY = function(e) {
248
+ this.y = e;
249
+ }, r.prototype.getDifference = function(e) {
250
+ return new DimensionD(this.x - e.x, this.y - e.y);
251
+ }, r.prototype.getCopy = function() {
252
+ return new r(this.x, this.y);
253
+ }, r.prototype.translate = function(e) {
254
+ return this.x += e.width, this.y += e.height, this;
255
+ }, e.exports = r;
256
+ }),
257
+ (function(e, t, n) {
258
+ var r = n(2), i = n(10), a = n(0), o = n(7), s = n(3), c = n(1), l = n(13), u = n(12), d = n(11);
259
+ function f(e, t, n) {
260
+ r.call(this, n), this.estimatedSize = i.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = e, t != null && t instanceof o ? this.graphManager = t : t != null && t instanceof Layout && (this.graphManager = t.graphManager);
261
+ }
262
+ for (var p in f.prototype = Object.create(r.prototype), r) f[p] = r[p];
263
+ f.prototype.getNodes = function() {
264
+ return this.nodes;
265
+ }, f.prototype.getEdges = function() {
266
+ return this.edges;
267
+ }, f.prototype.getGraphManager = function() {
268
+ return this.graphManager;
269
+ }, f.prototype.getParent = function() {
270
+ return this.parent;
271
+ }, f.prototype.getLeft = function() {
272
+ return this.left;
273
+ }, f.prototype.getRight = function() {
274
+ return this.right;
275
+ }, f.prototype.getTop = function() {
276
+ return this.top;
277
+ }, f.prototype.getBottom = function() {
278
+ return this.bottom;
279
+ }, f.prototype.isConnected = function() {
280
+ return this.isConnected;
281
+ }, f.prototype.add = function(e, t, n) {
282
+ if (t == null && n == null) {
283
+ var r = e;
284
+ if (this.graphManager == null) throw "Graph has no graph mgr!";
285
+ if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
286
+ return r.owner = this, this.getNodes().push(r), r;
287
+ } else {
288
+ var i = e;
289
+ if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
290
+ if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
291
+ return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
292
+ }
293
+ }, f.prototype.remove = function(e) {
294
+ var t = e;
295
+ if (e instanceof s) {
296
+ if (t == null) throw "Node is null!";
297
+ if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
298
+ if (this.graphManager == null) throw "Owner graph manager is invalid!";
299
+ for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
300
+ var o = this.nodes.indexOf(t);
301
+ if (o == -1) throw "Node not in owner node list!";
302
+ this.nodes.splice(o, 1);
303
+ } else if (e instanceof c) {
304
+ var r = e;
305
+ if (r == null) throw "Edge is null!";
306
+ if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
307
+ if (!(r.source.owner != null && r.target.owner != null && r.source.owner == this && r.target.owner == this)) throw "Source and/or target owner is invalid!";
308
+ var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
309
+ if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
310
+ r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
311
+ var o = r.source.owner.getEdges().indexOf(r);
312
+ if (o == -1) throw "Not in owner's edge list!";
313
+ r.source.owner.getEdges().splice(o, 1);
314
+ }
315
+ }, f.prototype.updateLeftTop = function() {
316
+ for (var e = i.MAX_VALUE, t = i.MAX_VALUE, n, r, a, o = this.getNodes(), s = o.length, c = 0; c < s; c++) {
317
+ var l = o[c];
318
+ n = l.getTop(), r = l.getLeft(), e > n && (e = n), t > r && (t = r);
319
+ }
320
+ return e == i.MAX_VALUE ? null : (a = o[0].getParent().paddingLeft == null ? this.margin : o[0].getParent().paddingLeft, this.left = t - a, this.top = e - a, new u(this.left, this.top));
321
+ }, f.prototype.updateBounds = function(e) {
322
+ for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d, f = this.nodes, p = f.length, m = 0; m < p; m++) {
323
+ var h = f[m];
324
+ e && h.child != null && h.updateBounds(), o = h.getLeft(), s = h.getRight(), c = h.getTop(), u = h.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
325
+ }
326
+ var g = new l(t, r, n - t, a - r);
327
+ t == i.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), d = f[0].getParent().paddingLeft == null ? this.margin : f[0].getParent().paddingLeft, this.left = g.x - d, this.right = g.x + g.width + d, this.top = g.y - d, this.bottom = g.y + g.height + d;
328
+ }, f.calculateBounds = function(e) {
329
+ for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d = e.length, f = 0; f < d; f++) {
330
+ var p = e[f];
331
+ o = p.getLeft(), s = p.getRight(), c = p.getTop(), u = p.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
332
+ }
333
+ return new l(t, r, n - t, a - r);
334
+ }, f.prototype.getInclusionTreeDepth = function() {
335
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
336
+ }, f.prototype.getEstimatedSize = function() {
337
+ if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
338
+ return this.estimatedSize;
339
+ }, f.prototype.calcEstimatedSize = function() {
340
+ for (var e = 0, t = this.nodes, n = t.length, r = 0; r < n; r++) {
341
+ var i = t[r];
342
+ e += i.calcEstimatedSize();
343
+ }
344
+ return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
345
+ }, f.prototype.updateConnected = function() {
346
+ var e = this;
347
+ if (this.nodes.length == 0) {
348
+ this.isConnected = !0;
349
+ return;
350
+ }
351
+ var t = new d(), n = /* @__PURE__ */ new Set(), r = this.nodes[0], i, a;
352
+ for (r.withChildren().forEach(function(e) {
353
+ t.push(e), n.add(e);
354
+ }); t.length !== 0;) {
355
+ r = t.shift(), i = r.getEdges();
356
+ for (var o = i.length, s = 0; s < o; s++) a = i[s].getOtherEndInGraph(r, this), a != null && !n.has(a) && a.withChildren().forEach(function(e) {
357
+ t.push(e), n.add(e);
358
+ });
359
+ }
360
+ if (this.isConnected = !1, n.size >= this.nodes.length) {
361
+ var c = 0;
362
+ n.forEach(function(t) {
363
+ t.owner == e && c++;
364
+ }), c == this.nodes.length && (this.isConnected = !0);
365
+ }
366
+ }, e.exports = f;
367
+ }),
368
+ (function(e, t, n) {
369
+ var r, i = n(1);
370
+ function a(e) {
371
+ r = n(6), this.layout = e, this.graphs = [], this.edges = [];
372
+ }
373
+ a.prototype.addRoot = function() {
374
+ var e = this.layout.newGraph(), t = this.layout.newNode(null), n = this.add(e, t);
375
+ return this.setRootGraph(n), this.rootGraph;
376
+ }, a.prototype.add = function(e, t, n, r, i) {
377
+ if (n == null && r == null && i == null) {
378
+ if (e == null) throw "Graph is null!";
379
+ if (t == null) throw "Parent node is null!";
380
+ if (this.graphs.indexOf(e) > -1) throw "Graph already in this graph mgr!";
381
+ if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
382
+ if (t.child != null) throw "Already has a child!";
383
+ return e.parent = t, t.child = e, e;
384
+ } else {
385
+ i = n, r = t, n = e;
386
+ var a = r.getOwner(), o = i.getOwner();
387
+ if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
388
+ if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
389
+ if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
390
+ if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
391
+ if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
392
+ if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
393
+ return n.source.edges.push(n), n.target.edges.push(n), n;
394
+ }
395
+ }, a.prototype.remove = function(e) {
396
+ if (e instanceof r) {
397
+ var t = e;
398
+ if (t.getGraphManager() != this) throw "Graph not in this graph mgr";
399
+ if (!(t == this.rootGraph || t.parent != null && t.parent.graphManager == this)) throw "Invalid parent node!";
400
+ var n = [];
401
+ n = n.concat(t.getEdges());
402
+ for (var a, o = n.length, s = 0; s < o; s++) a = n[s], t.remove(a);
403
+ var c = [];
404
+ c = c.concat(t.getNodes());
405
+ var l;
406
+ o = c.length;
407
+ for (var s = 0; s < o; s++) l = c[s], t.remove(l);
408
+ t == this.rootGraph && this.setRootGraph(null);
409
+ var u = this.graphs.indexOf(t);
410
+ this.graphs.splice(u, 1), t.parent = null;
411
+ } else if (e instanceof i) {
412
+ if (a = e, a == null) throw "Edge is null!";
413
+ if (!a.isInterGraph) throw "Not an inter-graph edge!";
414
+ if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
415
+ if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
416
+ var u = a.source.edges.indexOf(a);
417
+ if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
418
+ if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
419
+ var u = a.source.owner.getGraphManager().edges.indexOf(a);
420
+ a.source.owner.getGraphManager().edges.splice(u, 1);
421
+ }
422
+ }, a.prototype.updateBounds = function() {
423
+ this.rootGraph.updateBounds(!0);
424
+ }, a.prototype.getGraphs = function() {
425
+ return this.graphs;
426
+ }, a.prototype.getAllNodes = function() {
427
+ if (this.allNodes == null) {
428
+ for (var e = [], t = this.getGraphs(), n = t.length, r = 0; r < n; r++) e = e.concat(t[r].getNodes());
429
+ this.allNodes = e;
430
+ }
431
+ return this.allNodes;
432
+ }, a.prototype.resetAllNodes = function() {
433
+ this.allNodes = null;
434
+ }, a.prototype.resetAllEdges = function() {
435
+ this.allEdges = null;
436
+ }, a.prototype.resetAllNodesToApplyGravitation = function() {
437
+ this.allNodesToApplyGravitation = null;
438
+ }, a.prototype.getAllEdges = function() {
439
+ if (this.allEdges == null) {
440
+ var e = [], t = this.getGraphs();
441
+ t.length;
442
+ for (var n = 0; n < t.length; n++) e = e.concat(t[n].getEdges());
443
+ e = e.concat(this.edges), this.allEdges = e;
444
+ }
445
+ return this.allEdges;
446
+ }, a.prototype.getAllNodesToApplyGravitation = function() {
447
+ return this.allNodesToApplyGravitation;
448
+ }, a.prototype.setAllNodesToApplyGravitation = function(e) {
449
+ if (this.allNodesToApplyGravitation != null) throw "assert failed";
450
+ this.allNodesToApplyGravitation = e;
451
+ }, a.prototype.getRoot = function() {
452
+ return this.rootGraph;
453
+ }, a.prototype.setRootGraph = function(e) {
454
+ if (e.getGraphManager() != this) throw "Root not in this graph mgr!";
455
+ this.rootGraph = e, e.parent == null && (e.parent = this.layout.newNode("Root node"));
456
+ }, a.prototype.getLayout = function() {
457
+ return this.layout;
458
+ }, a.prototype.isOneAncestorOfOther = function(e, t) {
459
+ if (!(e != null && t != null)) throw "assert failed";
460
+ if (e == t) return !0;
461
+ var n = e.getOwner(), r;
462
+ do {
463
+ if (r = n.getParent(), r == null) break;
464
+ if (r == t) return !0;
465
+ if (n = r.getOwner(), n == null) break;
466
+ } while (!0);
467
+ n = t.getOwner();
468
+ do {
469
+ if (r = n.getParent(), r == null) break;
470
+ if (r == e) return !0;
471
+ if (n = r.getOwner(), n == null) break;
472
+ } while (!0);
473
+ return !1;
474
+ }, a.prototype.calcLowestCommonAncestors = function() {
475
+ for (var e, t, n, r, i, a = this.getAllEdges(), o = a.length, s = 0; s < o; s++) {
476
+ if (e = a[s], t = e.source, n = e.target, e.lca = null, e.sourceInLca = t, e.targetInLca = n, t == n) {
477
+ e.lca = t.getOwner();
478
+ continue;
479
+ }
480
+ for (r = t.getOwner(); e.lca == null;) {
481
+ for (e.targetInLca = n, i = n.getOwner(); e.lca == null;) {
482
+ if (i == r) {
483
+ e.lca = i;
484
+ break;
485
+ }
486
+ if (i == this.rootGraph) break;
487
+ if (e.lca != null) throw "assert failed";
488
+ e.targetInLca = i.getParent(), i = e.targetInLca.getOwner();
489
+ }
490
+ if (r == this.rootGraph) break;
491
+ e.lca == null && (e.sourceInLca = r.getParent(), r = e.sourceInLca.getOwner());
492
+ }
493
+ if (e.lca == null) throw "assert failed";
494
+ }
495
+ }, a.prototype.calcLowestCommonAncestor = function(e, t) {
496
+ if (e == t) return e.getOwner();
497
+ var n = e.getOwner();
498
+ do {
499
+ if (n == null) break;
500
+ var r = t.getOwner();
501
+ do {
502
+ if (r == null) break;
503
+ if (r == n) return r;
504
+ r = r.getParent().getOwner();
505
+ } while (!0);
506
+ n = n.getParent().getOwner();
507
+ } while (!0);
508
+ return n;
509
+ }, a.prototype.calcInclusionTreeDepths = function(e, t) {
510
+ e == null && t == null && (e = this.rootGraph, t = 1);
511
+ for (var n, r = e.getNodes(), i = r.length, a = 0; a < i; a++) n = r[a], n.inclusionTreeDepth = t, n.child != null && this.calcInclusionTreeDepths(n.child, t + 1);
512
+ }, a.prototype.includesInvalidEdge = function() {
513
+ for (var e, t = [], n = this.edges.length, r = 0; r < n; r++) e = this.edges[r], this.isOneAncestorOfOther(e.source, e.target) && t.push(e);
514
+ for (var r = 0; r < t.length; r++) this.remove(t[r]);
515
+ return !1;
516
+ }, e.exports = a;
517
+ }),
518
+ (function(e, t, n) {
519
+ var r = n(12);
520
+ function i() {}
521
+ i.calcSeparationAmount = function(e, t, n, r) {
522
+ if (!e.intersects(t)) throw "assert failed";
523
+ var i = [, ,];
524
+ this.decideDirectionsForOverlappingNodes(e, t, i), n[0] = Math.min(e.getRight(), t.getRight()) - Math.max(e.x, t.x), n[1] = Math.min(e.getBottom(), t.getBottom()) - Math.max(e.y, t.y), e.getX() <= t.getX() && e.getRight() >= t.getRight() ? n[0] += Math.min(t.getX() - e.getX(), e.getRight() - t.getRight()) : t.getX() <= e.getX() && t.getRight() >= e.getRight() && (n[0] += Math.min(e.getX() - t.getX(), t.getRight() - e.getRight())), e.getY() <= t.getY() && e.getBottom() >= t.getBottom() ? n[1] += Math.min(t.getY() - e.getY(), e.getBottom() - t.getBottom()) : t.getY() <= e.getY() && t.getBottom() >= e.getBottom() && (n[1] += Math.min(e.getY() - t.getY(), t.getBottom() - e.getBottom()));
525
+ var a = Math.abs((t.getCenterY() - e.getCenterY()) / (t.getCenterX() - e.getCenterX()));
526
+ t.getCenterY() === e.getCenterY() && t.getCenterX() === e.getCenterX() && (a = 1);
527
+ var o = a * n[0], s = n[1] / a;
528
+ n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
529
+ }, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
530
+ e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
531
+ }, i.getIntersection2 = function(e, t, n) {
532
+ var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
533
+ if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
534
+ var s = e.getX(), c = e.getY(), l = e.getRight(), u = e.getX(), d = e.getBottom(), f = e.getRight(), p = e.getWidthHalf(), m = e.getHeightHalf(), h = t.getX(), g = t.getY(), _ = t.getRight(), v = t.getX(), y = t.getBottom(), b = t.getRight(), x = t.getWidthHalf(), S = t.getHeightHalf(), C = !1, w = !1;
535
+ if (r === a) {
536
+ if (i > o) return n[0] = r, n[1] = c, n[2] = a, n[3] = y, !1;
537
+ if (i < o) return n[0] = r, n[1] = d, n[2] = a, n[3] = g, !1;
538
+ } else if (i === o) {
539
+ if (r > a) return n[0] = s, n[1] = i, n[2] = _, n[3] = o, !1;
540
+ if (r < a) return n[0] = l, n[1] = i, n[2] = h, n[3] = o, !1;
541
+ } else {
542
+ var T = e.height / e.width, E = t.height / t.width, D = (o - i) / (a - r), O = void 0, k = void 0, A = void 0, j = void 0, M = void 0, N = void 0;
543
+ if (-T === D ? r > a ? (n[0] = u, n[1] = d, C = !0) : (n[0] = l, n[1] = c, C = !0) : T === D && (r > a ? (n[0] = s, n[1] = c, C = !0) : (n[0] = f, n[1] = d, C = !0)), -E === D ? a > r ? (n[2] = v, n[3] = y, w = !0) : (n[2] = _, n[3] = g, w = !0) : E === D && (a > r ? (n[2] = h, n[3] = g, w = !0) : (n[2] = b, n[3] = y, w = !0)), C && w) return !1;
544
+ if (r > a ? i > o ? (O = this.getCardinalDirection(T, D, 4), k = this.getCardinalDirection(E, D, 2)) : (O = this.getCardinalDirection(-T, D, 3), k = this.getCardinalDirection(-E, D, 1)) : i > o ? (O = this.getCardinalDirection(-T, D, 1), k = this.getCardinalDirection(-E, D, 3)) : (O = this.getCardinalDirection(T, D, 2), k = this.getCardinalDirection(E, D, 4)), !C) switch (O) {
545
+ case 1:
546
+ j = c, A = r + -m / D, n[0] = A, n[1] = j;
547
+ break;
548
+ case 2:
549
+ A = f, j = i + p * D, n[0] = A, n[1] = j;
550
+ break;
551
+ case 3:
552
+ j = d, A = r + m / D, n[0] = A, n[1] = j;
553
+ break;
554
+ case 4:
555
+ A = u, j = i + -p * D, n[0] = A, n[1] = j;
556
+ break;
557
+ }
558
+ if (!w) switch (k) {
559
+ case 1:
560
+ N = g, M = a + -S / D, n[2] = M, n[3] = N;
561
+ break;
562
+ case 2:
563
+ M = b, N = o + x * D, n[2] = M, n[3] = N;
564
+ break;
565
+ case 3:
566
+ N = y, M = a + S / D, n[2] = M, n[3] = N;
567
+ break;
568
+ case 4:
569
+ M = v, N = o + -x * D, n[2] = M, n[3] = N;
570
+ break;
571
+ }
572
+ }
573
+ return !1;
574
+ }, i.getCardinalDirection = function(e, t, n) {
575
+ return e > t ? n : 1 + n % 4;
576
+ }, i.getIntersection = function(e, t, n, i) {
577
+ if (i == null) return this.getIntersection2(e, t, n);
578
+ var a = e.x, o = e.y, s = t.x, c = t.y, l = n.x, u = n.y, d = i.x, f = i.y, p = void 0, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0, y = void 0, b = void 0, x = void 0;
579
+ return h = c - o, _ = a - s, y = s * o - a * c, g = f - u, v = l - d, b = d * u - l * f, x = h * v - g * _, x === 0 ? null : (p = (_ * b - v * y) / x, m = (g * y - h * b) / x, new r(p, m));
580
+ }, i.angleOfVector = function(e, t, n, r) {
581
+ var i = void 0;
582
+ return e === n ? i = r < t ? this.ONE_AND_HALF_PI : this.HALF_PI : (i = Math.atan((r - t) / (n - e)), n < e ? i += Math.PI : r < t && (i += this.TWO_PI)), i;
583
+ }, i.doIntersect = function(e, t, n, r) {
584
+ var i = e.x, a = e.y, o = t.x, s = t.y, c = n.x, l = n.y, u = r.x, d = r.y, f = (o - i) * (d - l) - (u - c) * (s - a);
585
+ if (f === 0) return !1;
586
+ var p = ((d - l) * (u - i) + (c - u) * (d - a)) / f, m = ((a - s) * (u - i) + (o - i) * (d - a)) / f;
587
+ return 0 < p && p < 1 && 0 < m && m < 1;
588
+ }, i.findCircleLineIntersections = function(e, t, n, r, i, a, o) {
589
+ var s = (n - e) * (n - e) + (r - t) * (r - t), c = 2 * ((e - i) * (n - e) + (t - a) * (r - t)), l = (e - i) * (e - i) + (t - a) * (t - a) - o * o;
590
+ if (c * c - 4 * s * l >= 0) {
591
+ var u = (-c + Math.sqrt(c * c - 4 * s * l)) / (2 * s), d = (-c - Math.sqrt(c * c - 4 * s * l)) / (2 * s);
592
+ return u >= 0 && u <= 1 ? [u] : d >= 0 && d <= 1 ? [d] : null;
593
+ } else return null;
594
+ }, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
595
+ }),
596
+ (function(e, t, n) {
597
+ function r() {}
598
+ r.sign = function(e) {
599
+ return e > 0 ? 1 : e < 0 ? -1 : 0;
600
+ }, r.floor = function(e) {
601
+ return e < 0 ? Math.ceil(e) : Math.floor(e);
602
+ }, r.ceil = function(e) {
603
+ return e < 0 ? Math.floor(e) : Math.ceil(e);
604
+ }, e.exports = r;
605
+ }),
606
+ (function(e, t, n) {
607
+ function r() {}
608
+ r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, e.exports = r;
609
+ }),
610
+ (function(e, t, n) {
611
+ var r = function() {
612
+ function e(e, t) {
613
+ for (var n = 0; n < t.length; n++) {
614
+ var r = t[n];
615
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
616
+ }
617
+ }
618
+ return function(t, n, r) {
619
+ return n && e(t.prototype, n), r && e(t, r), t;
620
+ };
621
+ }();
622
+ function i(e, t) {
623
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
624
+ }
625
+ var a = function(e) {
626
+ return {
627
+ value: e,
628
+ next: null,
629
+ prev: null
630
+ };
631
+ }, o = function(e, t, n, r) {
632
+ return e === null ? r.head = t : e.next = t, n === null ? r.tail = t : n.prev = t, t.prev = e, t.next = n, r.length++, t;
633
+ }, s = function(e, t) {
634
+ var n = e.prev, r = e.next;
635
+ return n === null ? t.head = r : n.next = r, r === null ? t.tail = n : r.prev = n, e.prev = e.next = null, t.length--, e;
636
+ };
637
+ e.exports = function() {
638
+ function e(t) {
639
+ var n = this;
640
+ i(this, e), this.length = 0, this.head = null, this.tail = null, t != null && t.forEach(function(e) {
641
+ return n.push(e);
642
+ });
643
+ }
644
+ return r(e, [
645
+ {
646
+ key: "size",
647
+ value: function() {
648
+ return this.length;
649
+ }
650
+ },
651
+ {
652
+ key: "insertBefore",
653
+ value: function(e, t) {
654
+ return o(t.prev, a(e), t, this);
655
+ }
656
+ },
657
+ {
658
+ key: "insertAfter",
659
+ value: function(e, t) {
660
+ return o(t, a(e), t.next, this);
661
+ }
662
+ },
663
+ {
664
+ key: "insertNodeBefore",
665
+ value: function(e, t) {
666
+ return o(t.prev, e, t, this);
667
+ }
668
+ },
669
+ {
670
+ key: "insertNodeAfter",
671
+ value: function(e, t) {
672
+ return o(t, e, t.next, this);
673
+ }
674
+ },
675
+ {
676
+ key: "push",
677
+ value: function(e) {
678
+ return o(this.tail, a(e), null, this);
679
+ }
680
+ },
681
+ {
682
+ key: "unshift",
683
+ value: function(e) {
684
+ return o(null, a(e), this.head, this);
685
+ }
686
+ },
687
+ {
688
+ key: "remove",
689
+ value: function(e) {
690
+ return s(e, this);
691
+ }
692
+ },
693
+ {
694
+ key: "pop",
695
+ value: function() {
696
+ return s(this.tail, this).value;
697
+ }
698
+ },
699
+ {
700
+ key: "popNode",
701
+ value: function() {
702
+ return s(this.tail, this);
703
+ }
704
+ },
705
+ {
706
+ key: "shift",
707
+ value: function() {
708
+ return s(this.head, this).value;
709
+ }
710
+ },
711
+ {
712
+ key: "shiftNode",
713
+ value: function() {
714
+ return s(this.head, this);
715
+ }
716
+ },
717
+ {
718
+ key: "get_object_at",
719
+ value: function(e) {
720
+ if (e <= this.length()) {
721
+ for (var t = 1, n = this.head; t < e;) n = n.next, t++;
722
+ return n.value;
723
+ }
724
+ }
725
+ },
726
+ {
727
+ key: "set_object_at",
728
+ value: function(e, t) {
729
+ if (e <= this.length()) {
730
+ for (var n = 1, r = this.head; n < e;) r = r.next, n++;
731
+ r.value = t;
732
+ }
733
+ }
734
+ }
735
+ ]), e;
736
+ }();
737
+ }),
738
+ (function(e, t, n) {
739
+ function r(e, t, n) {
740
+ this.x = null, this.y = null, e == null && t == null && n == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && n == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && n == null && (n = e, this.x = n.x, this.y = n.y);
741
+ }
742
+ r.prototype.getX = function() {
743
+ return this.x;
744
+ }, r.prototype.getY = function() {
745
+ return this.y;
746
+ }, r.prototype.getLocation = function() {
747
+ return new r(this.x, this.y);
748
+ }, r.prototype.setLocation = function(e, t, n) {
749
+ e.constructor.name == "Point" && t == null && n == null ? (n = e, this.setLocation(n.x, n.y)) : typeof e == "number" && typeof t == "number" && n == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + .5), this.y = Math.floor(t + .5)));
750
+ }, r.prototype.move = function(e, t) {
751
+ this.x = e, this.y = t;
752
+ }, r.prototype.translate = function(e, t) {
753
+ this.x += e, this.y += t;
754
+ }, r.prototype.equals = function(e) {
755
+ if (e.constructor.name == "Point") {
756
+ var t = e;
757
+ return this.x == t.x && this.y == t.y;
758
+ }
759
+ return this == e;
760
+ }, r.prototype.toString = function() {
761
+ return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
762
+ }, e.exports = r;
763
+ }),
764
+ (function(e, t, n) {
765
+ function r(e, t, n, r) {
766
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && n != null && r != null && (this.x = e, this.y = t, this.width = n, this.height = r);
767
+ }
768
+ r.prototype.getX = function() {
769
+ return this.x;
770
+ }, r.prototype.setX = function(e) {
771
+ this.x = e;
772
+ }, r.prototype.getY = function() {
773
+ return this.y;
774
+ }, r.prototype.setY = function(e) {
775
+ this.y = e;
776
+ }, r.prototype.getWidth = function() {
777
+ return this.width;
778
+ }, r.prototype.setWidth = function(e) {
779
+ this.width = e;
780
+ }, r.prototype.getHeight = function() {
781
+ return this.height;
782
+ }, r.prototype.setHeight = function(e) {
783
+ this.height = e;
784
+ }, r.prototype.getRight = function() {
785
+ return this.x + this.width;
786
+ }, r.prototype.getBottom = function() {
787
+ return this.y + this.height;
788
+ }, r.prototype.intersects = function(e) {
789
+ return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
790
+ }, r.prototype.getCenterX = function() {
791
+ return this.x + this.width / 2;
792
+ }, r.prototype.getMinX = function() {
793
+ return this.getX();
794
+ }, r.prototype.getMaxX = function() {
795
+ return this.getX() + this.width;
796
+ }, r.prototype.getCenterY = function() {
797
+ return this.y + this.height / 2;
798
+ }, r.prototype.getMinY = function() {
799
+ return this.getY();
800
+ }, r.prototype.getMaxY = function() {
801
+ return this.getY() + this.height;
802
+ }, r.prototype.getWidthHalf = function() {
803
+ return this.width / 2;
804
+ }, r.prototype.getHeightHalf = function() {
805
+ return this.height / 2;
806
+ }, e.exports = r;
807
+ }),
808
+ (function(e, t, n) {
809
+ var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
810
+ return typeof e;
811
+ } : function(e) {
812
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
813
+ };
814
+ function i() {}
815
+ i.lastID = 0, i.createID = function(e) {
816
+ return i.isPrimitive(e) ? e : e.uniqueID == null ? (e.uniqueID = i.getString(), i.lastID++, e.uniqueID) : e.uniqueID;
817
+ }, i.getString = function(e) {
818
+ return e == null && (e = i.lastID), "Object#" + e;
819
+ }, i.isPrimitive = function(e) {
820
+ var t = e === void 0 ? "undefined" : r(e);
821
+ return e == null || t != "object" && t != "function";
822
+ }, e.exports = i;
823
+ }),
824
+ (function(e, t, n) {
825
+ function r(e) {
826
+ if (Array.isArray(e)) {
827
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
828
+ return n;
829
+ } else return Array.from(e);
830
+ }
831
+ var i = n(0), a = n(7), o = n(3), s = n(1), c = n(6), l = n(5), u = n(17), d = n(29);
832
+ function f(e) {
833
+ d.call(this), this.layoutQuality = i.QUALITY, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = i.DEFAULT_INCREMENTAL, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new a(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, e != null && (this.isRemoteUse = e);
834
+ }
835
+ f.RANDOM_SEED = 1, f.prototype = Object.create(d.prototype), f.prototype.getGraphManager = function() {
836
+ return this.graphManager;
837
+ }, f.prototype.getAllNodes = function() {
838
+ return this.graphManager.getAllNodes();
839
+ }, f.prototype.getAllEdges = function() {
840
+ return this.graphManager.getAllEdges();
841
+ }, f.prototype.getAllNodesToApplyGravitation = function() {
842
+ return this.graphManager.getAllNodesToApplyGravitation();
843
+ }, f.prototype.newGraphManager = function() {
844
+ var e = new a(this);
845
+ return this.graphManager = e, e;
846
+ }, f.prototype.newGraph = function(e) {
847
+ return new c(null, this.graphManager, e);
848
+ }, f.prototype.newNode = function(e) {
849
+ return new o(this.graphManager, e);
850
+ }, f.prototype.newEdge = function(e) {
851
+ return new s(null, null, e);
852
+ }, f.prototype.checkLayoutSuccess = function() {
853
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
854
+ }, f.prototype.runLayout = function() {
855
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
856
+ var e = this.checkLayoutSuccess() ? !1 : this.layout();
857
+ return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
858
+ }, f.prototype.doPostLayout = function() {
859
+ this.incremental || this.transform(), this.update();
860
+ }, f.prototype.update2 = function() {
861
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
862
+ for (var e = this.graphManager.getAllEdges(), t = 0; t < e.length; t++) e[t];
863
+ for (var n = this.graphManager.getRoot().getNodes(), t = 0; t < n.length; t++) n[t];
864
+ this.update(this.graphManager.getRoot());
865
+ }
866
+ }, f.prototype.update = function(e) {
867
+ if (e == null) this.update2();
868
+ else if (e instanceof o) {
869
+ var t = e;
870
+ if (t.getChild() != null) for (var n = t.getChild().getNodes(), r = 0; r < n.length; r++) update(n[r]);
871
+ t.vGraphObject != null && t.vGraphObject.update(t);
872
+ } else if (e instanceof s) {
873
+ var i = e;
874
+ i.vGraphObject != null && i.vGraphObject.update(i);
875
+ } else if (e instanceof c) {
876
+ var a = e;
877
+ a.vGraphObject != null && a.vGraphObject.update(a);
878
+ }
879
+ }, f.prototype.initParameters = function() {
880
+ this.isSubLayout || (this.layoutQuality = i.QUALITY, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = i.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
881
+ }, f.prototype.transform = function(e) {
882
+ if (e == null) this.transform(new l(0, 0));
883
+ else {
884
+ var t = new u(), n = this.graphManager.getRoot().updateLeftTop();
885
+ if (n != null) {
886
+ t.setWorldOrgX(e.x), t.setWorldOrgY(e.y), t.setDeviceOrgX(n.x), t.setDeviceOrgY(n.y);
887
+ for (var r = this.getAllNodes(), i, a = 0; a < r.length; a++) i = r[a], i.transform(t);
888
+ }
889
+ }
890
+ }, f.prototype.positionNodesRandomly = function(e) {
891
+ if (e == null) this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
892
+ else for (var t, n, r = e.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.getChild(), n == null || n.getNodes().length == 0 ? t.scatter() : (this.positionNodesRandomly(n), t.updateBounds());
893
+ }, f.prototype.getFlatForest = function() {
894
+ for (var e = [], t = !0, n = this.graphManager.getRoot().getNodes(), i = !0, a = 0; a < n.length; a++) n[a].getChild() != null && (i = !1);
895
+ if (!i) return e;
896
+ var o = /* @__PURE__ */ new Set(), s = [], c = /* @__PURE__ */ new Map(), l = [];
897
+ for (l = l.concat(n); l.length > 0 && t;) {
898
+ for (s.push(l[0]); s.length > 0 && t;) {
899
+ var u = s[0];
900
+ s.splice(0, 1), o.add(u);
901
+ for (var d = u.getEdges(), a = 0; a < d.length; a++) {
902
+ var f = d[a].getOtherEnd(u);
903
+ if (c.get(u) != f) if (!o.has(f)) s.push(f), c.set(f, u);
904
+ else {
905
+ t = !1;
906
+ break;
907
+ }
908
+ }
909
+ }
910
+ if (!t) e = [];
911
+ else {
912
+ var p = [].concat(r(o));
913
+ e.push(p);
914
+ for (var a = 0; a < p.length; a++) {
915
+ var m = p[a], h = l.indexOf(m);
916
+ h > -1 && l.splice(h, 1);
917
+ }
918
+ o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
919
+ }
920
+ }
921
+ return e;
922
+ }, f.prototype.createDummyNodesForBendpoints = function(e) {
923
+ for (var t = [], n = e.source, r = this.graphManager.calcLowestCommonAncestor(e.source, e.target), i = 0; i < e.bendpoints.length; i++) {
924
+ var a = this.newNode(null);
925
+ a.setRect(new Point(0, 0), new Dimension(1, 1)), r.add(a);
926
+ var o = this.newEdge(null);
927
+ this.graphManager.add(o, n, a), t.add(a), n = a;
928
+ }
929
+ var o = this.newEdge(null);
930
+ return this.graphManager.add(o, n, e.target), this.edgeToDummyNodes.set(e, t), e.isInterGraph() ? this.graphManager.remove(e) : r.remove(e), t;
931
+ }, f.prototype.createBendpointsFromDummyNodes = function() {
932
+ var e = [];
933
+ e = e.concat(this.graphManager.getAllEdges()), e = [].concat(r(this.edgeToDummyNodes.keys()), e);
934
+ for (var t = 0; t < e.length; t++) {
935
+ var n = e[t];
936
+ if (n.bendpoints.length > 0) {
937
+ for (var i = this.edgeToDummyNodes.get(n), a = 0; a < i.length; a++) {
938
+ var o = i[a], s = new l(o.getCenterX(), o.getCenterY()), c = n.bendpoints.get(a);
939
+ c.x = s.x, c.y = s.y, o.getOwner().remove(o);
940
+ }
941
+ this.graphManager.add(n, n.source, n.target);
942
+ }
943
+ }
944
+ }, f.transform = function(e, t, n, r) {
945
+ if (n != null && r != null) {
946
+ var i = t;
947
+ if (e <= 50) {
948
+ var a = t / n;
949
+ i -= (t - a) / 50 * (50 - e);
950
+ } else {
951
+ var o = t * r;
952
+ i += (o - t) / 50 * (e - 50);
953
+ }
954
+ return i;
955
+ } else {
956
+ var s, c;
957
+ return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
958
+ }
959
+ }, f.findCenterOfTree = function(e) {
960
+ var t = [];
961
+ t = t.concat(e);
962
+ var n = [], r = /* @__PURE__ */ new Map(), i = !1, a = null;
963
+ (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
964
+ for (var o = 0; o < t.length; o++) {
965
+ var s = t[o], c = s.getNeighborsList().size;
966
+ r.set(s, s.getNeighborsList().size), c == 1 && n.push(s);
967
+ }
968
+ var l = [];
969
+ for (l = l.concat(n); !i;) {
970
+ var u = [];
971
+ u = u.concat(l), l = [];
972
+ for (var o = 0; o < t.length; o++) {
973
+ var s = t[o], d = t.indexOf(s);
974
+ d >= 0 && t.splice(d, 1), s.getNeighborsList().forEach(function(e) {
975
+ if (n.indexOf(e) < 0) {
976
+ var t = r.get(e) - 1;
977
+ t == 1 && l.push(e), r.set(e, t);
978
+ }
979
+ });
980
+ }
981
+ n = n.concat(l), (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
982
+ }
983
+ return a;
984
+ }, f.prototype.setGraphManager = function(e) {
985
+ this.graphManager = e;
986
+ }, e.exports = f;
987
+ }),
988
+ (function(e, t, n) {
989
+ function r() {}
990
+ r.seed = 1, r.x = 0, r.nextDouble = function() {
991
+ return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
992
+ }, e.exports = r;
993
+ }),
994
+ (function(e, t, n) {
995
+ var r = n(5);
996
+ function i(e, t) {
997
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
998
+ }
999
+ i.prototype.getWorldOrgX = function() {
1000
+ return this.lworldOrgX;
1001
+ }, i.prototype.setWorldOrgX = function(e) {
1002
+ this.lworldOrgX = e;
1003
+ }, i.prototype.getWorldOrgY = function() {
1004
+ return this.lworldOrgY;
1005
+ }, i.prototype.setWorldOrgY = function(e) {
1006
+ this.lworldOrgY = e;
1007
+ }, i.prototype.getWorldExtX = function() {
1008
+ return this.lworldExtX;
1009
+ }, i.prototype.setWorldExtX = function(e) {
1010
+ this.lworldExtX = e;
1011
+ }, i.prototype.getWorldExtY = function() {
1012
+ return this.lworldExtY;
1013
+ }, i.prototype.setWorldExtY = function(e) {
1014
+ this.lworldExtY = e;
1015
+ }, i.prototype.getDeviceOrgX = function() {
1016
+ return this.ldeviceOrgX;
1017
+ }, i.prototype.setDeviceOrgX = function(e) {
1018
+ this.ldeviceOrgX = e;
1019
+ }, i.prototype.getDeviceOrgY = function() {
1020
+ return this.ldeviceOrgY;
1021
+ }, i.prototype.setDeviceOrgY = function(e) {
1022
+ this.ldeviceOrgY = e;
1023
+ }, i.prototype.getDeviceExtX = function() {
1024
+ return this.ldeviceExtX;
1025
+ }, i.prototype.setDeviceExtX = function(e) {
1026
+ this.ldeviceExtX = e;
1027
+ }, i.prototype.getDeviceExtY = function() {
1028
+ return this.ldeviceExtY;
1029
+ }, i.prototype.setDeviceExtY = function(e) {
1030
+ this.ldeviceExtY = e;
1031
+ }, i.prototype.transformX = function(e) {
1032
+ var t = 0, n = this.lworldExtX;
1033
+ return n != 0 && (t = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / n), t;
1034
+ }, i.prototype.transformY = function(e) {
1035
+ var t = 0, n = this.lworldExtY;
1036
+ return n != 0 && (t = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / n), t;
1037
+ }, i.prototype.inverseTransformX = function(e) {
1038
+ var t = 0, n = this.ldeviceExtX;
1039
+ return n != 0 && (t = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / n), t;
1040
+ }, i.prototype.inverseTransformY = function(e) {
1041
+ var t = 0, n = this.ldeviceExtY;
1042
+ return n != 0 && (t = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / n), t;
1043
+ }, i.prototype.inverseTransformPoint = function(e) {
1044
+ return new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1045
+ }, e.exports = i;
1046
+ }),
1047
+ (function(e, t, n) {
1048
+ function r(e) {
1049
+ if (Array.isArray(e)) {
1050
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
1051
+ return n;
1052
+ } else return Array.from(e);
1053
+ }
1054
+ var i = n(15), a = n(4), o = n(0), s = n(8), c = n(9);
1055
+ function l() {
1056
+ i.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = a.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = a.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = a.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = a.MAX_ITERATIONS;
1057
+ }
1058
+ for (var u in l.prototype = Object.create(i.prototype), i) l[u] = i[u];
1059
+ l.prototype.initParameters = function() {
1060
+ i.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1061
+ }, l.prototype.calcIdealEdgeLengths = function() {
1062
+ for (var e, t, n, r, i, s, c, l = this.getGraphManager().getAllEdges(), u = 0; u < l.length; u++) e = l[u], t = e.idealLength, e.isInterGraph && (r = e.getSource(), i = e.getTarget(), s = e.getSourceInLca().getEstimatedSize(), c = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += s + c - 2 * o.SIMPLE_NODE_SIZE), n = e.getLca().getInclusionTreeDepth(), e.idealLength += t * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (r.getInclusionTreeDepth() + i.getInclusionTreeDepth() - 2 * n));
1063
+ }, l.prototype.initSpringEmbedder = function() {
1064
+ var e = this.getAllNodes().length;
1065
+ this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1066
+ }, l.prototype.calcSpringForces = function() {
1067
+ for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
1068
+ }, l.prototype.calcRepulsionForces = function() {
1069
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n, r, i, o, s = this.getAllNodes(), c;
1070
+ if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
1071
+ else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
1072
+ }, l.prototype.calcGravitationalForces = function() {
1073
+ for (var e, t = this.getAllNodesToApplyGravitation(), n = 0; n < t.length; n++) e = t[n], this.calcGravitationalForce(e);
1074
+ }, l.prototype.moveNodes = function() {
1075
+ for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.move();
1076
+ }, l.prototype.calcSpringForce = function(e, t) {
1077
+ var n = e.getSource(), r = e.getTarget(), i, a, o, s;
1078
+ if (this.uniformLeafNodeSizes && n.getChild() == null && r.getChild() == null) e.updateLengthSimple();
1079
+ else if (e.updateLength(), e.isOverlapingSourceAndTarget) return;
1080
+ i = e.getLength(), i != 0 && (a = e.edgeElasticity * (i - t), o = a * (e.lengthX / i), s = a * (e.lengthY / i), n.springForceX += o, n.springForceY += s, r.springForceX -= o, r.springForceY -= s);
1081
+ }, l.prototype.calcRepulsionForce = function(e, t) {
1082
+ var n = e.getRect(), r = t.getRect(), i = [, ,], o = [
1083
+ ,
1084
+ ,
1085
+ ,
1086
+ ,
1087
+ ], l, u, d, f, p, m, h;
1088
+ if (n.intersects(r)) {
1089
+ s.calcSeparationAmount(n, r, i, a.DEFAULT_EDGE_LENGTH / 2), m = 2 * i[0], h = 2 * i[1];
1090
+ var g = e.noOfChildren * t.noOfChildren / (e.noOfChildren + t.noOfChildren);
1091
+ e.repulsionForceX -= g * m, e.repulsionForceY -= g * h, t.repulsionForceX += g * m, t.repulsionForceY += g * h;
1092
+ } else this.uniformLeafNodeSizes && e.getChild() == null && t.getChild() == null ? (l = r.getCenterX() - n.getCenterX(), u = r.getCenterY() - n.getCenterY()) : (s.getIntersection(n, r, o), l = o[2] - o[0], u = o[3] - o[1]), Math.abs(l) < a.MIN_REPULSION_DIST && (l = c.sign(l) * a.MIN_REPULSION_DIST), Math.abs(u) < a.MIN_REPULSION_DIST && (u = c.sign(u) * a.MIN_REPULSION_DIST), d = l * l + u * u, f = Math.sqrt(d), p = (e.nodeRepulsion / 2 + t.nodeRepulsion / 2) * e.noOfChildren * t.noOfChildren / d, m = p * l / f, h = p * u / f, e.repulsionForceX -= m, e.repulsionForceY -= h, t.repulsionForceX += m, t.repulsionForceY += h;
1093
+ }, l.prototype.calcGravitationalForce = function(e) {
1094
+ var t = e.getOwner(), n = (t.getRight() + t.getLeft()) / 2, r = (t.getTop() + t.getBottom()) / 2, i = e.getCenterX() - n, a = e.getCenterY() - r, o = Math.abs(i) + e.getWidth() / 2, s = Math.abs(a) + e.getHeight() / 2, c;
1095
+ e.getOwner() == this.graphManager.getRoot() ? (c = t.getEstimatedSize() * this.gravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i, e.gravitationForceY = -this.gravityConstant * a)) : (c = t.getEstimatedSize() * this.compoundGravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i * this.compoundGravityConstant, e.gravitationForceY = -this.gravityConstant * a * this.compoundGravityConstant));
1096
+ }, l.prototype.isConverged = function() {
1097
+ var e, t = !1;
1098
+ return this.totalIterations > this.maxIterations / 3 && (t = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), e = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, e || t;
1099
+ }, l.prototype.animate = function() {
1100
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1101
+ }, l.prototype.calcNoOfChildrenForAllNodes = function() {
1102
+ for (var e, t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) e = t[n], e.noOfChildren = e.getNoOfChildren();
1103
+ }, l.prototype.calcGrid = function(e) {
1104
+ var t = 0, n = 0;
1105
+ t = parseInt(Math.ceil((e.getRight() - e.getLeft()) / this.repulsionRange)), n = parseInt(Math.ceil((e.getBottom() - e.getTop()) / this.repulsionRange));
1106
+ for (var r = Array(t), i = 0; i < t; i++) r[i] = Array(n);
1107
+ for (var i = 0; i < t; i++) for (var a = 0; a < n; a++) r[i][a] = [];
1108
+ return r;
1109
+ }, l.prototype.addNodeToGrid = function(e, t, n) {
1110
+ var r = 0, i = 0, a = 0, o = 0;
1111
+ r = parseInt(Math.floor((e.getRect().x - t) / this.repulsionRange)), i = parseInt(Math.floor((e.getRect().width + e.getRect().x - t) / this.repulsionRange)), a = parseInt(Math.floor((e.getRect().y - n) / this.repulsionRange)), o = parseInt(Math.floor((e.getRect().height + e.getRect().y - n) / this.repulsionRange));
1112
+ for (var s = r; s <= i; s++) for (var c = a; c <= o; c++) this.grid[s][c].push(e), e.setGridCoordinates(r, i, a, o);
1113
+ }, l.prototype.updateGrid = function() {
1114
+ var e, t, n = this.getAllNodes();
1115
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), e = 0; e < n.length; e++) t = n[e], this.addNodeToGrid(t, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1116
+ }, l.prototype.calculateRepulsionForceOfANode = function(e, t, n, i) {
1117
+ if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && n || i) {
1118
+ var o = /* @__PURE__ */ new Set();
1119
+ e.surrounding = [];
1120
+ for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
1121
+ for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], !(e.getOwner() != s.getOwner() || e == s) && !t.has(s) && !o.has(s)) {
1122
+ var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
1123
+ f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
1124
+ }
1125
+ }
1126
+ e.surrounding = [].concat(r(o));
1127
+ }
1128
+ for (l = 0; l < e.surrounding.length; l++) this.calcRepulsionForce(e, e.surrounding[l]);
1129
+ }, l.prototype.calcRepulsionRange = function() {
1130
+ return 0;
1131
+ }, e.exports = l;
1132
+ }),
1133
+ (function(e, t, n) {
1134
+ var r = n(1), i = n(4);
1135
+ function a(e, t, n) {
1136
+ r.call(this, e, t, n), this.idealLength = i.DEFAULT_EDGE_LENGTH, this.edgeElasticity = i.DEFAULT_SPRING_STRENGTH;
1137
+ }
1138
+ for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1139
+ e.exports = a;
1140
+ }),
1141
+ (function(e, t, n) {
1142
+ var r = n(3), i = n(4);
1143
+ function a(e, t, n, a) {
1144
+ r.call(this, e, t, n, a), this.nodeRepulsion = i.DEFAULT_REPULSION_STRENGTH, 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 = [];
1145
+ }
1146
+ for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1147
+ a.prototype.setGridCoordinates = function(e, t, n, r) {
1148
+ this.startX = e, this.finishX = t, this.startY = n, this.finishY = r;
1149
+ }, e.exports = a;
1150
+ }),
1151
+ (function(e, t, n) {
1152
+ function r(e, t) {
1153
+ this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1154
+ }
1155
+ r.prototype.getWidth = function() {
1156
+ return this.width;
1157
+ }, r.prototype.setWidth = function(e) {
1158
+ this.width = e;
1159
+ }, r.prototype.getHeight = function() {
1160
+ return this.height;
1161
+ }, r.prototype.setHeight = function(e) {
1162
+ this.height = e;
1163
+ }, e.exports = r;
1164
+ }),
1165
+ (function(e, t, n) {
1166
+ var r = n(14);
1167
+ function i() {
1168
+ this.map = {}, this.keys = [];
1169
+ }
1170
+ i.prototype.put = function(e, t) {
1171
+ var n = r.createID(e);
1172
+ this.contains(n) || (this.map[n] = t, this.keys.push(e));
1173
+ }, i.prototype.contains = function(e) {
1174
+ return r.createID(e), this.map[e] != null;
1175
+ }, i.prototype.get = function(e) {
1176
+ var t = r.createID(e);
1177
+ return this.map[t];
1178
+ }, i.prototype.keySet = function() {
1179
+ return this.keys;
1180
+ }, e.exports = i;
1181
+ }),
1182
+ (function(e, t, n) {
1183
+ var r = n(14);
1184
+ function i() {
1185
+ this.set = {};
1186
+ }
1187
+ i.prototype.add = function(e) {
1188
+ var t = r.createID(e);
1189
+ this.contains(t) || (this.set[t] = e);
1190
+ }, i.prototype.remove = function(e) {
1191
+ delete this.set[r.createID(e)];
1192
+ }, i.prototype.clear = function() {
1193
+ this.set = {};
1194
+ }, i.prototype.contains = function(e) {
1195
+ return this.set[r.createID(e)] == e;
1196
+ }, i.prototype.isEmpty = function() {
1197
+ return this.size() === 0;
1198
+ }, i.prototype.size = function() {
1199
+ return Object.keys(this.set).length;
1200
+ }, i.prototype.addAllTo = function(e) {
1201
+ for (var t = Object.keys(this.set), n = t.length, r = 0; r < n; r++) e.push(this.set[t[r]]);
1202
+ }, i.prototype.size = function() {
1203
+ return Object.keys(this.set).length;
1204
+ }, i.prototype.addAll = function(e) {
1205
+ for (var t = e.length, n = 0; n < t; n++) {
1206
+ var r = e[n];
1207
+ this.add(r);
1208
+ }
1209
+ }, e.exports = i;
1210
+ }),
1211
+ (function(e, t, n) {
1212
+ function r() {}
1213
+ r.multMat = function(e, t) {
1214
+ for (var n = [], r = 0; r < e.length; r++) {
1215
+ n[r] = [];
1216
+ for (var i = 0; i < t[0].length; i++) {
1217
+ n[r][i] = 0;
1218
+ for (var a = 0; a < e[0].length; a++) n[r][i] += e[r][a] * t[a][i];
1219
+ }
1220
+ }
1221
+ return n;
1222
+ }, r.transpose = function(e) {
1223
+ for (var t = [], n = 0; n < e[0].length; n++) {
1224
+ t[n] = [];
1225
+ for (var r = 0; r < e.length; r++) t[n][r] = e[r][n];
1226
+ }
1227
+ return t;
1228
+ }, r.multCons = function(e, t) {
1229
+ for (var n = [], r = 0; r < e.length; r++) n[r] = e[r] * t;
1230
+ return n;
1231
+ }, r.minusOp = function(e, t) {
1232
+ for (var n = [], r = 0; r < e.length; r++) n[r] = e[r] - t[r];
1233
+ return n;
1234
+ }, r.dotProduct = function(e, t) {
1235
+ for (var n = 0, r = 0; r < e.length; r++) n += e[r] * t[r];
1236
+ return n;
1237
+ }, r.mag = function(e) {
1238
+ return Math.sqrt(this.dotProduct(e, e));
1239
+ }, r.normalize = function(e) {
1240
+ for (var t = [], n = this.mag(e), r = 0; r < e.length; r++) t[r] = e[r] / n;
1241
+ return t;
1242
+ }, r.multGamma = function(e) {
1243
+ for (var t = [], n = 0, r = 0; r < e.length; r++) n += e[r];
1244
+ n *= -1 / e.length;
1245
+ for (var i = 0; i < e.length; i++) t[i] = n + e[i];
1246
+ return t;
1247
+ }, r.multL = function(e, t, n) {
1248
+ for (var r = [], i = [], a = [], o = 0; o < t[0].length; o++) {
1249
+ for (var s = 0, c = 0; c < t.length; c++) s += -.5 * t[c][o] * e[c];
1250
+ i[o] = s;
1251
+ }
1252
+ for (var l = 0; l < n.length; l++) {
1253
+ for (var u = 0, d = 0; d < n.length; d++) u += n[l][d] * i[d];
1254
+ a[l] = u;
1255
+ }
1256
+ for (var f = 0; f < t.length; f++) {
1257
+ for (var p = 0, m = 0; m < t[0].length; m++) p += t[f][m] * a[m];
1258
+ r[f] = p;
1259
+ }
1260
+ return r;
1261
+ }, e.exports = r;
1262
+ }),
1263
+ (function(e, t, n) {
1264
+ var r = function() {
1265
+ function e(e, t) {
1266
+ for (var n = 0; n < t.length; n++) {
1267
+ var r = t[n];
1268
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1269
+ }
1270
+ }
1271
+ return function(t, n, r) {
1272
+ return n && e(t.prototype, n), r && e(t, r), t;
1273
+ };
1274
+ }();
1275
+ function i(e, t) {
1276
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1277
+ }
1278
+ var a = n(11);
1279
+ e.exports = function() {
1280
+ function e(t, n) {
1281
+ i(this, e), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1282
+ var r = void 0;
1283
+ r = t instanceof a ? t.size() : t.length, this._quicksort(t, 0, r - 1);
1284
+ }
1285
+ return r(e, [
1286
+ {
1287
+ key: "_quicksort",
1288
+ value: function(e, t, n) {
1289
+ if (t < n) {
1290
+ var r = this._partition(e, t, n);
1291
+ this._quicksort(e, t, r), this._quicksort(e, r + 1, n);
1292
+ }
1293
+ }
1294
+ },
1295
+ {
1296
+ key: "_partition",
1297
+ value: function(e, t, n) {
1298
+ for (var r = this._get(e, t), i = t, a = n;;) {
1299
+ for (; this.compareFunction(r, this._get(e, a));) a--;
1300
+ for (; this.compareFunction(this._get(e, i), r);) i++;
1301
+ if (i < a) this._swap(e, i, a), i++, a--;
1302
+ else return a;
1303
+ }
1304
+ }
1305
+ },
1306
+ {
1307
+ key: "_get",
1308
+ value: function(e, t) {
1309
+ return e instanceof a ? e.get_object_at(t) : e[t];
1310
+ }
1311
+ },
1312
+ {
1313
+ key: "_set",
1314
+ value: function(e, t, n) {
1315
+ e instanceof a ? e.set_object_at(t, n) : e[t] = n;
1316
+ }
1317
+ },
1318
+ {
1319
+ key: "_swap",
1320
+ value: function(e, t, n) {
1321
+ var r = this._get(e, t);
1322
+ this._set(e, t, this._get(e, n)), this._set(e, n, r);
1323
+ }
1324
+ },
1325
+ {
1326
+ key: "_defaultCompareFunction",
1327
+ value: function(e, t) {
1328
+ return t > e;
1329
+ }
1330
+ }
1331
+ ]), e;
1332
+ }();
1333
+ }),
1334
+ (function(e, t, n) {
1335
+ function r() {}
1336
+ r.svd = function(e) {
1337
+ this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = e.length, this.n = e[0].length;
1338
+ var t = Math.min(this.m, this.n);
1339
+ this.s = function(e) {
1340
+ for (var t = []; e-- > 0;) t.push(0);
1341
+ return t;
1342
+ }(Math.min(this.m + 1, this.n)), this.U = function(e) {
1343
+ return function e(t) {
1344
+ if (t.length == 0) return 0;
1345
+ for (var n = [], r = 0; r < t[0]; r++) n.push(e(t.slice(1)));
1346
+ return n;
1347
+ }(e);
1348
+ }([this.m, t]), this.V = function(e) {
1349
+ return function e(t) {
1350
+ if (t.length == 0) return 0;
1351
+ for (var n = [], r = 0; r < t[0]; r++) n.push(e(t.slice(1)));
1352
+ return n;
1353
+ }(e);
1354
+ }([this.n, this.n]);
1355
+ for (var n = function(e) {
1356
+ for (var t = []; e-- > 0;) t.push(0);
1357
+ return t;
1358
+ }(this.n), i = function(e) {
1359
+ for (var t = []; e-- > 0;) t.push(0);
1360
+ return t;
1361
+ }(this.m), a = !0, o = !0, s = Math.min(this.m - 1, this.n), c = Math.max(0, Math.min(this.n - 2, this.m)), l = 0; l < Math.max(s, c); l++) {
1362
+ if (l < s) {
1363
+ this.s[l] = 0;
1364
+ for (var u = l; u < this.m; u++) this.s[l] = r.hypot(this.s[l], e[u][l]);
1365
+ if (this.s[l] !== 0) {
1366
+ e[l][l] < 0 && (this.s[l] = -this.s[l]);
1367
+ for (var d = l; d < this.m; d++) e[d][l] /= this.s[l];
1368
+ e[l][l] += 1;
1369
+ }
1370
+ this.s[l] = -this.s[l];
1371
+ }
1372
+ for (var f = l + 1; f < this.n; f++) {
1373
+ if (function(e, t) {
1374
+ return e && t;
1375
+ }(l < s, this.s[l] !== 0)) {
1376
+ for (var p = 0, m = l; m < this.m; m++) p += e[m][l] * e[m][f];
1377
+ p = -p / e[l][l];
1378
+ for (var h = l; h < this.m; h++) e[h][f] += p * e[h][l];
1379
+ }
1380
+ n[f] = e[l][f];
1381
+ }
1382
+ if (function(e, t) {
1383
+ return e && t;
1384
+ }(a, l < s)) for (var g = l; g < this.m; g++) this.U[g][l] = e[g][l];
1385
+ if (l < c) {
1386
+ n[l] = 0;
1387
+ for (var _ = l + 1; _ < this.n; _++) n[l] = r.hypot(n[l], n[_]);
1388
+ if (n[l] !== 0) {
1389
+ n[l + 1] < 0 && (n[l] = -n[l]);
1390
+ for (var v = l + 1; v < this.n; v++) n[v] /= n[l];
1391
+ n[l + 1] += 1;
1392
+ }
1393
+ if (n[l] = -n[l], function(e, t) {
1394
+ return e && t;
1395
+ }(l + 1 < this.m, n[l] !== 0)) {
1396
+ for (var y = l + 1; y < this.m; y++) i[y] = 0;
1397
+ for (var b = l + 1; b < this.n; b++) for (var x = l + 1; x < this.m; x++) i[x] += n[b] * e[x][b];
1398
+ for (var S = l + 1; S < this.n; S++) for (var C = -n[S] / n[l + 1], w = l + 1; w < this.m; w++) e[w][S] += C * i[w];
1399
+ }
1400
+ if (o) for (var T = l + 1; T < this.n; T++) this.V[T][l] = n[T];
1401
+ }
1402
+ }
1403
+ var E = Math.min(this.n, this.m + 1);
1404
+ if (s < this.n && (this.s[s] = e[s][s]), this.m < E && (this.s[E - 1] = 0), c + 1 < E && (n[c] = e[c][E - 1]), n[E - 1] = 0, a) {
1405
+ for (var D = s; D < t; D++) {
1406
+ for (var O = 0; O < this.m; O++) this.U[O][D] = 0;
1407
+ this.U[D][D] = 1;
1408
+ }
1409
+ for (var k = s - 1; k >= 0; k--) if (this.s[k] !== 0) {
1410
+ for (var A = k + 1; A < t; A++) {
1411
+ for (var j = 0, M = k; M < this.m; M++) j += this.U[M][k] * this.U[M][A];
1412
+ j = -j / this.U[k][k];
1413
+ for (var N = k; N < this.m; N++) this.U[N][A] += j * this.U[N][k];
1414
+ }
1415
+ for (var P = k; P < this.m; P++) this.U[P][k] = -this.U[P][k];
1416
+ this.U[k][k] = 1 + this.U[k][k];
1417
+ for (var ee = 0; ee < k - 1; ee++) this.U[ee][k] = 0;
1418
+ } else {
1419
+ for (var F = 0; F < this.m; F++) this.U[F][k] = 0;
1420
+ this.U[k][k] = 1;
1421
+ }
1422
+ }
1423
+ if (o) for (var I = this.n - 1; I >= 0; I--) {
1424
+ if (function(e, t) {
1425
+ return e && t;
1426
+ }(I < c, n[I] !== 0)) for (var L = I + 1; L < t; L++) {
1427
+ for (var R = 0, z = I + 1; z < this.n; z++) R += this.V[z][I] * this.V[z][L];
1428
+ R = -R / this.V[I + 1][I];
1429
+ for (var B = I + 1; B < this.n; B++) this.V[B][L] += R * this.V[B][I];
1430
+ }
1431
+ for (var V = 0; V < this.n; V++) this.V[V][I] = 0;
1432
+ this.V[I][I] = 1;
1433
+ }
1434
+ for (var te = E - 1, H = 0, ne = 2 ** -52, re = 2 ** -966; E > 0;) {
1435
+ var U = void 0, W = void 0;
1436
+ for (U = E - 2; U >= -1 && U !== -1; U--) if (Math.abs(n[U]) <= re + ne * (Math.abs(this.s[U]) + Math.abs(this.s[U + 1]))) {
1437
+ n[U] = 0;
1438
+ break;
1439
+ }
1440
+ if (U === E - 2) W = 4;
1441
+ else {
1442
+ var G = void 0;
1443
+ for (G = E - 1; G >= U && G !== U; G--) {
1444
+ var ie = (G === E ? 0 : Math.abs(n[G])) + (G === U + 1 ? 0 : Math.abs(n[G - 1]));
1445
+ if (Math.abs(this.s[G]) <= re + ne * ie) {
1446
+ this.s[G] = 0;
1447
+ break;
1448
+ }
1449
+ }
1450
+ G === U ? W = 3 : G === E - 1 ? W = 1 : (W = 2, U = G);
1451
+ }
1452
+ switch (U++, W) {
1453
+ case 1:
1454
+ var K = n[E - 2];
1455
+ n[E - 2] = 0;
1456
+ for (var q = E - 2; q >= U; q--) {
1457
+ var J = r.hypot(this.s[q], K), Y = this.s[q] / J, X = K / J;
1458
+ if (this.s[q] = J, q !== U && (K = -X * n[q - 1], n[q - 1] = Y * n[q - 1]), o) for (var Z = 0; Z < this.n; Z++) J = Y * this.V[Z][q] + X * this.V[Z][E - 1], this.V[Z][E - 1] = -X * this.V[Z][q] + Y * this.V[Z][E - 1], this.V[Z][q] = J;
1459
+ }
1460
+ break;
1461
+ case 2:
1462
+ var ae = n[U - 1];
1463
+ n[U - 1] = 0;
1464
+ for (var Q = U; Q < E; Q++) {
1465
+ var oe = r.hypot(this.s[Q], ae), se = this.s[Q] / oe, ce = ae / oe;
1466
+ if (this.s[Q] = oe, ae = -ce * n[Q], n[Q] = se * n[Q], a) for (var le = 0; le < this.m; le++) oe = se * this.U[le][Q] + ce * this.U[le][U - 1], this.U[le][U - 1] = -ce * this.U[le][Q] + se * this.U[le][U - 1], this.U[le][Q] = oe;
1467
+ }
1468
+ break;
1469
+ case 3:
1470
+ var ue = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[E - 1]), Math.abs(this.s[E - 2])), Math.abs(n[E - 2])), Math.abs(this.s[U])), Math.abs(n[U])), de = this.s[E - 1] / ue, fe = this.s[E - 2] / ue, pe = n[E - 2] / ue, me = this.s[U] / ue, he = n[U] / ue, ge = ((fe + de) * (fe - de) + pe * pe) / 2, _e = de * pe * (de * pe), ve = 0;
1471
+ (function(e, t) {
1472
+ return e || t;
1473
+ })(ge !== 0, _e !== 0) && (ve = Math.sqrt(ge * ge + _e), ge < 0 && (ve = -ve), ve = _e / (ge + ve));
1474
+ for (var ye = (me + de) * (me - de) + ve, be = me * he, $ = U; $ < E - 1; $++) {
1475
+ var xe = r.hypot(ye, be), Se = ye / xe, Ce = be / xe;
1476
+ if ($ !== U && (n[$ - 1] = xe), ye = Se * this.s[$] + Ce * n[$], n[$] = Se * n[$] - Ce * this.s[$], be = Ce * this.s[$ + 1], this.s[$ + 1] = Se * this.s[$ + 1], o) for (var we = 0; we < this.n; we++) xe = Se * this.V[we][$] + Ce * this.V[we][$ + 1], this.V[we][$ + 1] = -Ce * this.V[we][$] + Se * this.V[we][$ + 1], this.V[we][$] = xe;
1477
+ if (xe = r.hypot(ye, be), Se = ye / xe, Ce = be / xe, this.s[$] = xe, ye = Se * n[$] + Ce * this.s[$ + 1], this.s[$ + 1] = -Ce * n[$] + Se * this.s[$ + 1], be = Ce * n[$ + 1], n[$ + 1] = Se * n[$ + 1], a && $ < this.m - 1) for (var Te = 0; Te < this.m; Te++) xe = Se * this.U[Te][$] + Ce * this.U[Te][$ + 1], this.U[Te][$ + 1] = -Ce * this.U[Te][$] + Se * this.U[Te][$ + 1], this.U[Te][$] = xe;
1478
+ }
1479
+ n[E - 2] = ye, H += 1;
1480
+ break;
1481
+ case 4:
1482
+ if (this.s[U] <= 0 && (this.s[U] = this.s[U] < 0 ? -this.s[U] : 0, o)) for (var Ee = 0; Ee <= te; Ee++) this.V[Ee][U] = -this.V[Ee][U];
1483
+ for (; U < te && !(this.s[U] >= this.s[U + 1]);) {
1484
+ var De = this.s[U];
1485
+ if (this.s[U] = this.s[U + 1], this.s[U + 1] = De, o && U < this.n - 1) for (var Oe = 0; Oe < this.n; Oe++) De = this.V[Oe][U + 1], this.V[Oe][U + 1] = this.V[Oe][U], this.V[Oe][U] = De;
1486
+ if (a && U < this.m - 1) for (var ke = 0; ke < this.m; ke++) De = this.U[ke][U + 1], this.U[ke][U + 1] = this.U[ke][U], this.U[ke][U] = De;
1487
+ U++;
1488
+ }
1489
+ H = 0, E--;
1490
+ break;
1491
+ }
1492
+ }
1493
+ return {
1494
+ U: this.U,
1495
+ V: this.V,
1496
+ S: this.s
1497
+ };
1498
+ }, r.hypot = function(e, t) {
1499
+ var n = void 0;
1500
+ return Math.abs(e) > Math.abs(t) ? (n = t / e, n = Math.abs(e) * Math.sqrt(1 + n * n)) : t == 0 ? n = 0 : (n = e / t, n = Math.abs(t) * Math.sqrt(1 + n * n)), n;
1501
+ }, e.exports = r;
1502
+ }),
1503
+ (function(e, t, n) {
1504
+ var r = function() {
1505
+ function e(e, t) {
1506
+ for (var n = 0; n < t.length; n++) {
1507
+ var r = t[n];
1508
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1509
+ }
1510
+ }
1511
+ return function(t, n, r) {
1512
+ return n && e(t.prototype, n), r && e(t, r), t;
1513
+ };
1514
+ }();
1515
+ function i(e, t) {
1516
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1517
+ }
1518
+ e.exports = function() {
1519
+ function e(t, n) {
1520
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1521
+ i(this, e), this.sequence1 = t, this.sequence2 = n, this.match_score = r, this.mismatch_penalty = a, this.gap_penalty = o, this.iMax = t.length + 1, this.jMax = n.length + 1, this.grid = Array(this.iMax);
1522
+ for (var s = 0; s < this.iMax; s++) {
1523
+ this.grid[s] = Array(this.jMax);
1524
+ for (var c = 0; c < this.jMax; c++) this.grid[s][c] = 0;
1525
+ }
1526
+ this.tracebackGrid = Array(this.iMax);
1527
+ for (var l = 0; l < this.iMax; l++) {
1528
+ this.tracebackGrid[l] = Array(this.jMax);
1529
+ for (var u = 0; u < this.jMax; u++) this.tracebackGrid[l][u] = [
1530
+ null,
1531
+ null,
1532
+ null
1533
+ ];
1534
+ }
1535
+ this.alignments = [], this.score = -1, this.computeGrids();
1536
+ }
1537
+ return r(e, [
1538
+ {
1539
+ key: "getScore",
1540
+ value: function() {
1541
+ return this.score;
1542
+ }
1543
+ },
1544
+ {
1545
+ key: "getAlignments",
1546
+ value: function() {
1547
+ return this.alignments;
1548
+ }
1549
+ },
1550
+ {
1551
+ key: "computeGrids",
1552
+ value: function() {
1553
+ for (var e = 1; e < this.jMax; e++) this.grid[0][e] = this.grid[0][e - 1] + this.gap_penalty, this.tracebackGrid[0][e] = [
1554
+ !1,
1555
+ !1,
1556
+ !0
1557
+ ];
1558
+ for (var t = 1; t < this.iMax; t++) this.grid[t][0] = this.grid[t - 1][0] + this.gap_penalty, this.tracebackGrid[t][0] = [
1559
+ !1,
1560
+ !0,
1561
+ !1
1562
+ ];
1563
+ for (var n = 1; n < this.iMax; n++) for (var r = 1; r < this.jMax; r++) {
1564
+ var i = void 0;
1565
+ i = this.sequence1[n - 1] === this.sequence2[r - 1] ? this.grid[n - 1][r - 1] + this.match_score : this.grid[n - 1][r - 1] + this.mismatch_penalty;
1566
+ var a = this.grid[n - 1][r] + this.gap_penalty, o = this.grid[n][r - 1] + this.gap_penalty, s = [
1567
+ i,
1568
+ a,
1569
+ o
1570
+ ], c = this.arrayAllMaxIndexes(s);
1571
+ this.grid[n][r] = s[c[0]], this.tracebackGrid[n][r] = [
1572
+ c.includes(0),
1573
+ c.includes(1),
1574
+ c.includes(2)
1575
+ ];
1576
+ }
1577
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1578
+ }
1579
+ },
1580
+ {
1581
+ key: "alignmentTraceback",
1582
+ value: function() {
1583
+ var e = [];
1584
+ for (e.push({
1585
+ pos: [this.sequence1.length, this.sequence2.length],
1586
+ seq1: "",
1587
+ seq2: ""
1588
+ }); e[0];) {
1589
+ var t = e[0], n = this.tracebackGrid[t.pos[0]][t.pos[1]];
1590
+ n[0] && e.push({
1591
+ pos: [t.pos[0] - 1, t.pos[1] - 1],
1592
+ seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1593
+ seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1594
+ }), n[1] && e.push({
1595
+ pos: [t.pos[0] - 1, t.pos[1]],
1596
+ seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1597
+ seq2: "-" + t.seq2
1598
+ }), n[2] && e.push({
1599
+ pos: [t.pos[0], t.pos[1] - 1],
1600
+ seq1: "-" + t.seq1,
1601
+ seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1602
+ }), t.pos[0] === 0 && t.pos[1] === 0 && this.alignments.push({
1603
+ sequence1: t.seq1,
1604
+ sequence2: t.seq2
1605
+ }), e.shift();
1606
+ }
1607
+ return this.alignments;
1608
+ }
1609
+ },
1610
+ {
1611
+ key: "getAllIndexes",
1612
+ value: function(e, t) {
1613
+ for (var n = [], r = -1; (r = e.indexOf(t, r + 1)) !== -1;) n.push(r);
1614
+ return n;
1615
+ }
1616
+ },
1617
+ {
1618
+ key: "arrayAllMaxIndexes",
1619
+ value: function(e) {
1620
+ return this.getAllIndexes(e, Math.max.apply(null, e));
1621
+ }
1622
+ }
1623
+ ]), e;
1624
+ }();
1625
+ }),
1626
+ (function(e, t, n) {
1627
+ var r = function() {};
1628
+ r.FDLayout = n(18), r.FDLayoutConstants = n(4), r.FDLayoutEdge = n(19), r.FDLayoutNode = n(20), r.DimensionD = n(21), r.HashMap = n(22), r.HashSet = n(23), r.IGeometry = n(8), r.IMath = n(9), r.Integer = n(10), r.Point = n(12), r.PointD = n(5), r.RandomSeed = n(16), r.RectangleD = n(13), r.Transform = n(17), r.UniqueIDGeneretor = n(14), r.Quicksort = n(25), r.LinkedList = n(11), r.LGraphObject = n(2), r.LGraph = n(6), r.LEdge = n(1), r.LGraphManager = n(7), r.LNode = n(3), r.Layout = n(15), r.LayoutConstants = n(0), r.NeedlemanWunsch = n(27), r.Matrix = n(24), r.SVD = n(26), e.exports = r;
1629
+ }),
1630
+ (function(e, t, n) {
1631
+ function r() {
1632
+ this.listeners = [];
1633
+ }
1634
+ var i = r.prototype;
1635
+ i.addListener = function(e, t) {
1636
+ this.listeners.push({
1637
+ event: e,
1638
+ callback: t
1639
+ });
1640
+ }, i.removeListener = function(e, t) {
1641
+ for (var n = this.listeners.length; n >= 0; n--) {
1642
+ var r = this.listeners[n];
1643
+ r.event === e && r.callback === t && this.listeners.splice(n, 1);
1644
+ }
1645
+ }, i.emit = function(e, t) {
1646
+ for (var n = 0; n < this.listeners.length; n++) {
1647
+ var r = this.listeners[n];
1648
+ e === r.event && r.callback(t);
1649
+ }
1650
+ }, e.exports = r;
1651
+ })
1652
+ ]);
1653
+ });
1654
+ })), k = /* @__PURE__ */ t(((e, t) => {
1655
+ (function(n, r) {
1656
+ typeof e == "object" && typeof t == "object" ? t.exports = r(O()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(O()) : n.coseBase = r(n.layoutBase);
1657
+ })(e, function(e) {
1658
+ return (() => {
1659
+ var t = {
1660
+ 45: ((e, t, n) => {
1661
+ var r = {};
1662
+ r.layoutBase = n(551), r.CoSEConstants = n(806), r.CoSEEdge = n(767), r.CoSEGraph = n(880), r.CoSEGraphManager = n(578), r.CoSELayout = n(765), r.CoSENode = n(991), r.ConstraintHandler = n(902), e.exports = r;
1663
+ }),
1664
+ 806: ((e, t, n) => {
1665
+ var r = n(551).FDLayoutConstants;
1666
+ function i() {}
1667
+ for (var a in r) i[a] = r[a];
1668
+ i.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, i.DEFAULT_RADIAL_SEPARATION = r.DEFAULT_EDGE_LENGTH, i.DEFAULT_COMPONENT_SEPERATION = 60, i.TILE = !0, i.TILING_PADDING_VERTICAL = 10, i.TILING_PADDING_HORIZONTAL = 10, i.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, i.ENFORCE_CONSTRAINTS = !0, i.APPLY_LAYOUT = !0, i.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, i.TREE_REDUCTION_ON_INCREMENTAL = !0, i.PURE_INCREMENTAL = i.DEFAULT_INCREMENTAL, e.exports = i;
1669
+ }),
1670
+ 767: ((e, t, n) => {
1671
+ var r = n(551).FDLayoutEdge;
1672
+ function i(e, t, n) {
1673
+ r.call(this, e, t, n);
1674
+ }
1675
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1676
+ e.exports = i;
1677
+ }),
1678
+ 880: ((e, t, n) => {
1679
+ var r = n(551).LGraph;
1680
+ function i(e, t, n) {
1681
+ r.call(this, e, t, n);
1682
+ }
1683
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1684
+ e.exports = i;
1685
+ }),
1686
+ 578: ((e, t, n) => {
1687
+ var r = n(551).LGraphManager;
1688
+ function i(e) {
1689
+ r.call(this, e);
1690
+ }
1691
+ for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1692
+ e.exports = i;
1693
+ }),
1694
+ 765: ((e, t, n) => {
1695
+ var r = n(551).FDLayout, i = n(578), a = n(880), o = n(991), s = n(767), c = n(806), l = n(902), u = n(551).FDLayoutConstants, d = n(551).LayoutConstants, f = n(551).Point, p = n(551).PointD, m = n(551).DimensionD, h = n(551).Layout, g = n(551).Integer, _ = n(551).IGeometry, v = n(551).LGraph, y = n(551).Transform, b = n(551).LinkedList;
1696
+ function x() {
1697
+ r.call(this), this.toBeTiled = {}, this.constraints = {};
1698
+ }
1699
+ for (var S in x.prototype = Object.create(r.prototype), r) x[S] = r[S];
1700
+ x.prototype.newGraphManager = function() {
1701
+ var e = new i(this);
1702
+ return this.graphManager = e, e;
1703
+ }, x.prototype.newGraph = function(e) {
1704
+ return new a(null, this.graphManager, e);
1705
+ }, x.prototype.newNode = function(e) {
1706
+ return new o(this.graphManager, e);
1707
+ }, x.prototype.newEdge = function(e) {
1708
+ return new s(null, null, e);
1709
+ }, x.prototype.initParameters = function() {
1710
+ r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1711
+ }, x.prototype.initSpringEmbedder = function() {
1712
+ r.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / u.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = .04, this.coolingAdjuster = 1;
1713
+ }, x.prototype.layout = function() {
1714
+ return d.DEFAULT_CREATE_BENDS_AS_NEEDED && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1715
+ }, x.prototype.classicLayout = function() {
1716
+ 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) {
1717
+ var e = this.getFlatForest();
1718
+ if (e.length > 0) this.positionNodesRadially(e);
1719
+ else {
1720
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1721
+ var t = new Set(this.getAllNodes()), n = this.nodesWithGravity.filter(function(e) {
1722
+ return t.has(e);
1723
+ });
1724
+ this.graphManager.setAllNodesToApplyGravitation(n), this.positionNodesRandomly();
1725
+ }
1726
+ } else if (c.TREE_REDUCTION_ON_INCREMENTAL) {
1727
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1728
+ var t = new Set(this.getAllNodes()), n = this.nodesWithGravity.filter(function(e) {
1729
+ return t.has(e);
1730
+ });
1731
+ this.graphManager.setAllNodesToApplyGravitation(n);
1732
+ }
1733
+ return Object.keys(this.constraints).length > 0 && (l.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), c.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
1734
+ }, x.prototype.tick = function() {
1735
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1736
+ else return !0;
1737
+ if (this.totalIterations % u.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1738
+ if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1739
+ else return !0;
1740
+ this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - this.coolingCycle ** +(Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
1741
+ }
1742
+ if (this.isTreeGrowing) {
1743
+ if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
1744
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1745
+ var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1746
+ return e.has(t);
1747
+ });
1748
+ this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1749
+ } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1750
+ this.growTreeIterations++;
1751
+ }
1752
+ if (this.isGrowthFinished) {
1753
+ if (this.isConverged()) return !0;
1754
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1755
+ }
1756
+ var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1757
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1758
+ }, x.prototype.getPositionsData = function() {
1759
+ for (var e = this.graphManager.getAllNodes(), t = {}, n = 0; n < e.length; n++) {
1760
+ var r = e[n].rect, i = e[n].id;
1761
+ t[i] = {
1762
+ id: i,
1763
+ x: r.getCenterX(),
1764
+ y: r.getCenterY(),
1765
+ w: r.width,
1766
+ h: r.height
1767
+ };
1768
+ }
1769
+ return t;
1770
+ }, x.prototype.runSpringEmbedder = function() {
1771
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1772
+ var e = !1;
1773
+ if (u.ANIMATE === "during") this.emit("layoutstarted");
1774
+ else {
1775
+ for (; !e;) e = this.tick();
1776
+ this.graphManager.updateBounds();
1777
+ }
1778
+ }, x.prototype.moveNodes = function() {
1779
+ for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.calculateDisplacement();
1780
+ Object.keys(this.constraints).length > 0 && this.updateDisplacements();
1781
+ for (var n = 0; n < e.length; n++) t = e[n], t.move();
1782
+ }, x.prototype.initConstraintVariables = function() {
1783
+ var e = this;
1784
+ this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
1785
+ for (var t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) {
1786
+ var r = t[n];
1787
+ this.idToNodeMap.set(r.id, r);
1788
+ }
1789
+ var i = function t(n) {
1790
+ for (var r = n.getChild().getNodes(), i, a = 0, o = 0; o < r.length; o++) i = r[o], i.getChild() == null ? e.fixedNodeSet.has(i.id) && (a += 100) : a += t(i);
1791
+ return a;
1792
+ };
1793
+ if (this.constraints.fixedNodeConstraint) {
1794
+ this.constraints.fixedNodeConstraint.forEach(function(t) {
1795
+ e.fixedNodeSet.add(t.nodeId);
1796
+ });
1797
+ for (var t = this.graphManager.getAllNodes(), r, n = 0; n < t.length; n++) if (r = t[n], r.getChild() != null) {
1798
+ var a = i(r);
1799
+ a > 0 && (r.fixedNodeWeight = a);
1800
+ }
1801
+ }
1802
+ if (this.constraints.relativePlacementConstraint) {
1803
+ var o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
1804
+ if (this.dummyToNodeForVerticalAlignment = /* @__PURE__ */ new Map(), this.dummyToNodeForHorizontalAlignment = /* @__PURE__ */ new Map(), this.fixedNodesOnHorizontal = /* @__PURE__ */ new Set(), this.fixedNodesOnVertical = /* @__PURE__ */ new Set(), this.fixedNodeSet.forEach(function(t) {
1805
+ e.fixedNodesOnHorizontal.add(t), e.fixedNodesOnVertical.add(t);
1806
+ }), this.constraints.alignmentConstraint) {
1807
+ if (this.constraints.alignmentConstraint.vertical) for (var l = this.constraints.alignmentConstraint.vertical, n = 0; n < l.length; n++) this.dummyToNodeForVerticalAlignment.set("dummy" + n, []), l[n].forEach(function(t) {
1808
+ o.set(t, "dummy" + n), e.dummyToNodeForVerticalAlignment.get("dummy" + n).push(t), e.fixedNodeSet.has(t) && e.fixedNodesOnHorizontal.add("dummy" + n);
1809
+ });
1810
+ if (this.constraints.alignmentConstraint.horizontal) for (var u = this.constraints.alignmentConstraint.horizontal, n = 0; n < u.length; n++) this.dummyToNodeForHorizontalAlignment.set("dummy" + n, []), u[n].forEach(function(t) {
1811
+ s.set(t, "dummy" + n), e.dummyToNodeForHorizontalAlignment.get("dummy" + n).push(t), e.fixedNodeSet.has(t) && e.fixedNodesOnVertical.add("dummy" + n);
1812
+ });
1813
+ }
1814
+ if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.shuffle = function(e) {
1815
+ var t, n, r;
1816
+ for (r = e.length - 1; r >= 2 * e.length / 3; r--) t = Math.floor(Math.random() * (r + 1)), n = e[r], e[r] = e[t], e[t] = n;
1817
+ return e;
1818
+ }, this.nodesInRelativeHorizontal = [], this.nodesInRelativeVertical = [], this.nodeToRelativeConstraintMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToRelativeConstraintMapVertical = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapVertical = /* @__PURE__ */ new Map(), this.constraints.relativePlacementConstraint.forEach(function(t) {
1819
+ if (t.left) {
1820
+ var n = o.has(t.left) ? o.get(t.left) : t.left, r = o.has(t.right) ? o.get(t.right) : t.right;
1821
+ e.nodesInRelativeHorizontal.includes(n) || (e.nodesInRelativeHorizontal.push(n), e.nodeToRelativeConstraintMapHorizontal.set(n, []), e.dummyToNodeForVerticalAlignment.has(n) ? e.nodeToTempPositionMapHorizontal.set(n, e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()) : e.nodeToTempPositionMapHorizontal.set(n, e.idToNodeMap.get(n).getCenterX())), e.nodesInRelativeHorizontal.includes(r) || (e.nodesInRelativeHorizontal.push(r), e.nodeToRelativeConstraintMapHorizontal.set(r, []), e.dummyToNodeForVerticalAlignment.has(r) ? e.nodeToTempPositionMapHorizontal.set(r, e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()) : e.nodeToTempPositionMapHorizontal.set(r, e.idToNodeMap.get(r).getCenterX())), e.nodeToRelativeConstraintMapHorizontal.get(n).push({
1822
+ right: r,
1823
+ gap: t.gap
1824
+ }), e.nodeToRelativeConstraintMapHorizontal.get(r).push({
1825
+ left: n,
1826
+ gap: t.gap
1827
+ });
1828
+ } else {
1829
+ var i = s.has(t.top) ? s.get(t.top) : t.top, a = s.has(t.bottom) ? s.get(t.bottom) : t.bottom;
1830
+ e.nodesInRelativeVertical.includes(i) || (e.nodesInRelativeVertical.push(i), e.nodeToRelativeConstraintMapVertical.set(i, []), e.dummyToNodeForHorizontalAlignment.has(i) ? e.nodeToTempPositionMapVertical.set(i, e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()) : e.nodeToTempPositionMapVertical.set(i, e.idToNodeMap.get(i).getCenterY())), e.nodesInRelativeVertical.includes(a) || (e.nodesInRelativeVertical.push(a), e.nodeToRelativeConstraintMapVertical.set(a, []), e.dummyToNodeForHorizontalAlignment.has(a) ? e.nodeToTempPositionMapVertical.set(a, e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()) : e.nodeToTempPositionMapVertical.set(a, e.idToNodeMap.get(a).getCenterY())), e.nodeToRelativeConstraintMapVertical.get(i).push({
1831
+ bottom: a,
1832
+ gap: t.gap
1833
+ }), e.nodeToRelativeConstraintMapVertical.get(a).push({
1834
+ top: i,
1835
+ gap: t.gap
1836
+ });
1837
+ }
1838
+ });
1839
+ else {
1840
+ var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1841
+ this.constraints.relativePlacementConstraint.forEach(function(e) {
1842
+ if (e.left) {
1843
+ var t = o.has(e.left) ? o.get(e.left) : e.left, n = o.has(e.right) ? o.get(e.right) : e.right;
1844
+ d.has(t) ? d.get(t).push(n) : d.set(t, [n]), d.has(n) ? d.get(n).push(t) : d.set(n, [t]);
1845
+ } else {
1846
+ var r = s.has(e.top) ? s.get(e.top) : e.top, i = s.has(e.bottom) ? s.get(e.bottom) : e.bottom;
1847
+ f.has(r) ? f.get(r).push(i) : f.set(r, [i]), f.has(i) ? f.get(i).push(r) : f.set(i, [r]);
1848
+ }
1849
+ });
1850
+ var p = function(e, t) {
1851
+ var n = [], r = [], i = new b(), a = /* @__PURE__ */ new Set(), o = 0;
1852
+ return e.forEach(function(s, c) {
1853
+ if (!a.has(c)) {
1854
+ n[o] = [], r[o] = !1;
1855
+ var l = c;
1856
+ for (i.push(l), a.add(l), n[o].push(l); i.length != 0;) l = i.shift(), t.has(l) && (r[o] = !0), e.get(l).forEach(function(e) {
1857
+ a.has(e) || (i.push(e), a.add(e), n[o].push(e));
1858
+ });
1859
+ o++;
1860
+ }
1861
+ }), {
1862
+ components: n,
1863
+ isFixed: r
1864
+ };
1865
+ }, m = p(d, e.fixedNodesOnHorizontal);
1866
+ this.componentsOnHorizontal = m.components, this.fixedComponentsOnHorizontal = m.isFixed;
1867
+ var h = p(f, e.fixedNodesOnVertical);
1868
+ this.componentsOnVertical = h.components, this.fixedComponentsOnVertical = h.isFixed;
1869
+ }
1870
+ }
1871
+ }, x.prototype.updateDisplacements = function() {
1872
+ var e = this;
1873
+ if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(t) {
1874
+ var n = e.idToNodeMap.get(t.nodeId);
1875
+ n.displacementX = 0, n.displacementY = 0;
1876
+ }), this.constraints.alignmentConstraint) {
1877
+ if (this.constraints.alignmentConstraint.vertical) for (var t = this.constraints.alignmentConstraint.vertical, n = 0; n < t.length; n++) {
1878
+ for (var r = 0, i = 0; i < t[n].length; i++) {
1879
+ if (this.fixedNodeSet.has(t[n][i])) {
1880
+ r = 0;
1881
+ break;
1882
+ }
1883
+ r += this.idToNodeMap.get(t[n][i]).displacementX;
1884
+ }
1885
+ for (var a = r / t[n].length, i = 0; i < t[n].length; i++) this.idToNodeMap.get(t[n][i]).displacementX = a;
1886
+ }
1887
+ if (this.constraints.alignmentConstraint.horizontal) for (var o = this.constraints.alignmentConstraint.horizontal, n = 0; n < o.length; n++) {
1888
+ for (var s = 0, i = 0; i < o[n].length; i++) {
1889
+ if (this.fixedNodeSet.has(o[n][i])) {
1890
+ s = 0;
1891
+ break;
1892
+ }
1893
+ s += this.idToNodeMap.get(o[n][i]).displacementY;
1894
+ }
1895
+ for (var l = s / o[n].length, i = 0; i < o[n].length; i++) this.idToNodeMap.get(o[n][i]).displacementY = l;
1896
+ }
1897
+ }
1898
+ if (this.constraints.relativePlacementConstraint) if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(t) {
1899
+ if (!e.fixedNodesOnHorizontal.has(t)) {
1900
+ var n = 0;
1901
+ n = e.dummyToNodeForVerticalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX : e.idToNodeMap.get(t).displacementX, e.nodeToRelativeConstraintMapHorizontal.get(t).forEach(function(r) {
1902
+ if (r.right) {
1903
+ var i = e.nodeToTempPositionMapHorizontal.get(r.right) - e.nodeToTempPositionMapHorizontal.get(t) - n;
1904
+ i < r.gap && (n -= r.gap - i);
1905
+ } else {
1906
+ var i = e.nodeToTempPositionMapHorizontal.get(t) - e.nodeToTempPositionMapHorizontal.get(r.left) + n;
1907
+ i < r.gap && (n += r.gap - i);
1908
+ }
1909
+ }), e.nodeToTempPositionMapHorizontal.set(t, e.nodeToTempPositionMapHorizontal.get(t) + n), e.dummyToNodeForVerticalAlignment.has(t) ? e.dummyToNodeForVerticalAlignment.get(t).forEach(function(t) {
1910
+ e.idToNodeMap.get(t).displacementX = n;
1911
+ }) : e.idToNodeMap.get(t).displacementX = n;
1912
+ }
1913
+ }), this.nodesInRelativeVertical.forEach(function(t) {
1914
+ if (!e.fixedNodesOnHorizontal.has(t)) {
1915
+ var n = 0;
1916
+ n = e.dummyToNodeForHorizontalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY : e.idToNodeMap.get(t).displacementY, e.nodeToRelativeConstraintMapVertical.get(t).forEach(function(r) {
1917
+ if (r.bottom) {
1918
+ var i = e.nodeToTempPositionMapVertical.get(r.bottom) - e.nodeToTempPositionMapVertical.get(t) - n;
1919
+ i < r.gap && (n -= r.gap - i);
1920
+ } else {
1921
+ var i = e.nodeToTempPositionMapVertical.get(t) - e.nodeToTempPositionMapVertical.get(r.top) + n;
1922
+ i < r.gap && (n += r.gap - i);
1923
+ }
1924
+ }), e.nodeToTempPositionMapVertical.set(t, e.nodeToTempPositionMapVertical.get(t) + n), e.dummyToNodeForHorizontalAlignment.has(t) ? e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t) {
1925
+ e.idToNodeMap.get(t).displacementY = n;
1926
+ }) : e.idToNodeMap.get(t).displacementY = n;
1927
+ }
1928
+ });
1929
+ else {
1930
+ for (var n = 0; n < this.componentsOnHorizontal.length; n++) {
1931
+ var u = this.componentsOnHorizontal[n];
1932
+ if (this.fixedComponentsOnHorizontal[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1933
+ e.idToNodeMap.get(t).displacementX = 0;
1934
+ }) : this.idToNodeMap.get(u[i]).displacementX = 0;
1935
+ else {
1936
+ for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForVerticalAlignment.has(u[i])) {
1937
+ var p = this.dummyToNodeForVerticalAlignment.get(u[i]);
1938
+ d += p.length * this.idToNodeMap.get(p[0]).displacementX, f += p.length;
1939
+ } else d += this.idToNodeMap.get(u[i]).displacementX, f++;
1940
+ for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1941
+ e.idToNodeMap.get(t).displacementX = m;
1942
+ }) : this.idToNodeMap.get(u[i]).displacementX = m;
1943
+ }
1944
+ }
1945
+ for (var n = 0; n < this.componentsOnVertical.length; n++) {
1946
+ var u = this.componentsOnVertical[n];
1947
+ if (this.fixedComponentsOnVertical[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1948
+ e.idToNodeMap.get(t).displacementY = 0;
1949
+ }) : this.idToNodeMap.get(u[i]).displacementY = 0;
1950
+ else {
1951
+ for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForHorizontalAlignment.has(u[i])) {
1952
+ var p = this.dummyToNodeForHorizontalAlignment.get(u[i]);
1953
+ d += p.length * this.idToNodeMap.get(p[0]).displacementY, f += p.length;
1954
+ } else d += this.idToNodeMap.get(u[i]).displacementY, f++;
1955
+ for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1956
+ e.idToNodeMap.get(t).displacementY = m;
1957
+ }) : this.idToNodeMap.get(u[i]).displacementY = m;
1958
+ }
1959
+ }
1960
+ }
1961
+ }, x.prototype.calculateNodesToApplyGravitationTo = function() {
1962
+ var e = [], t, n = this.graphManager.getGraphs(), r = n.length, i;
1963
+ for (i = 0; i < r; i++) t = n[i], t.updateConnected(), t.isConnected || (e = e.concat(t.getNodes()));
1964
+ return e;
1965
+ }, x.prototype.createBendpoints = function() {
1966
+ var e = [];
1967
+ e = e.concat(this.graphManager.getAllEdges());
1968
+ var t = /* @__PURE__ */ new Set(), n;
1969
+ for (n = 0; n < e.length; n++) {
1970
+ var r = e[n];
1971
+ if (!t.has(r)) {
1972
+ var i = r.getSource(), a = r.getTarget();
1973
+ if (i == a) r.getBendpoints().push(new p()), r.getBendpoints().push(new p()), this.createDummyNodesForBendpoints(r), t.add(r);
1974
+ else {
1975
+ var o = [];
1976
+ if (o = o.concat(i.getEdgeListToNode(a)), o = o.concat(a.getEdgeListToNode(i)), !t.has(o[0])) {
1977
+ if (o.length > 1) {
1978
+ var s;
1979
+ for (s = 0; s < o.length; s++) {
1980
+ var c = o[s];
1981
+ c.getBendpoints().push(new p()), this.createDummyNodesForBendpoints(c);
1982
+ }
1983
+ }
1984
+ o.forEach(function(e) {
1985
+ t.add(e);
1986
+ });
1987
+ }
1988
+ }
1989
+ }
1990
+ if (t.size == e.length) break;
1991
+ }
1992
+ }, x.prototype.positionNodesRadially = function(e) {
1993
+ for (var t = new f(0, 0), n = Math.ceil(Math.sqrt(e.length)), r = 0, i = 0, a = 0, o = new p(0, 0), s = 0; s < e.length; s++) {
1994
+ s % n == 0 && (a = 0, i = r, s != 0 && (i += c.DEFAULT_COMPONENT_SEPERATION), r = 0);
1995
+ var l = e[s], u = h.findCenterOfTree(l);
1996
+ t.x = a, t.y = i, o = x.radialLayout(l, u, t), o.y > r && (r = Math.floor(o.y)), a = Math.floor(o.x + c.DEFAULT_COMPONENT_SEPERATION);
1997
+ }
1998
+ this.transform(new p(d.WORLD_CENTER_X - o.x / 2, d.WORLD_CENTER_Y - o.y / 2));
1999
+ }, x.radialLayout = function(e, t, n) {
2000
+ var r = Math.max(this.maxDiagonalInTree(e), c.DEFAULT_RADIAL_SEPARATION);
2001
+ x.branchRadialLayout(t, null, 0, 359, 0, r);
2002
+ var i = v.calculateBounds(e), a = new y();
2003
+ a.setDeviceOrgX(i.getMinX()), a.setDeviceOrgY(i.getMinY()), a.setWorldOrgX(n.x), a.setWorldOrgY(n.y);
2004
+ for (var o = 0; o < e.length; o++) e[o].transform(a);
2005
+ var s = new p(i.getMaxX(), i.getMaxY());
2006
+ return a.inverseTransformPoint(s);
2007
+ }, x.branchRadialLayout = function(e, t, n, r, i, a) {
2008
+ var o = (r - n + 1) / 2;
2009
+ o < 0 && (o += 180);
2010
+ var s = (o + n) % 360 * _.TWO_PI / 360, c = i * Math.cos(s), l = i * Math.sin(s);
2011
+ e.setCenter(c, l);
2012
+ var u = [];
2013
+ u = u.concat(e.getEdges());
2014
+ var d = u.length;
2015
+ t != null && d--;
2016
+ for (var f = 0, p = u.length, m, h = e.getEdgesBetween(t); h.length > 1;) {
2017
+ var g = h[0];
2018
+ h.splice(0, 1);
2019
+ var v = u.indexOf(g);
2020
+ v >= 0 && u.splice(v, 1), p--, d--;
2021
+ }
2022
+ m = t == null ? 0 : (u.indexOf(h[0]) + 1) % p;
2023
+ for (var y = Math.abs(r - n) / d, b = m; f != d; b = ++b % p) {
2024
+ var S = u[b].getOtherEnd(e);
2025
+ if (S != t) {
2026
+ var C = (n + f * y) % 360, w = (C + y) % 360;
2027
+ x.branchRadialLayout(S, e, C, w, i + a, a), f++;
2028
+ }
2029
+ }
2030
+ }, x.maxDiagonalInTree = function(e) {
2031
+ for (var t = g.MIN_VALUE, n = 0; n < e.length; n++) {
2032
+ var r = e[n].getDiagonal();
2033
+ r > t && (t = r);
2034
+ }
2035
+ return t;
2036
+ }, x.prototype.calcRepulsionRange = function() {
2037
+ return 2 * (this.level + 1) * this.idealEdgeLength;
2038
+ }, x.prototype.groupZeroDegreeMembers = function() {
2039
+ var e = this, t = {};
2040
+ this.memberGroups = {}, this.idToDummyNode = {};
2041
+ for (var n = [], r = this.graphManager.getAllNodes(), i = 0; i < r.length; i++) {
2042
+ var a = r[i], s = a.getParent();
2043
+ this.getNodeDegreeWithChildren(a) === 0 && (s.id == null || !this.getToBeTiled(s)) && n.push(a);
2044
+ }
2045
+ for (var i = 0; i < n.length; i++) {
2046
+ var a = n[i], c = a.getParent().id;
2047
+ t[c] === void 0 && (t[c] = []), t[c] = t[c].concat(a);
2048
+ }
2049
+ Object.keys(t).forEach(function(n) {
2050
+ if (t[n].length > 1) {
2051
+ var r = "DummyCompound_" + n;
2052
+ e.memberGroups[r] = t[n];
2053
+ var i = t[n][0].getParent(), a = new o(e.graphManager);
2054
+ a.id = r, a.paddingLeft = i.paddingLeft || 0, a.paddingRight = i.paddingRight || 0, a.paddingBottom = i.paddingBottom || 0, a.paddingTop = i.paddingTop || 0, e.idToDummyNode[r] = a;
2055
+ var s = e.getGraphManager().add(e.newGraph(), a), c = i.getChild();
2056
+ c.add(a);
2057
+ for (var l = 0; l < t[n].length; l++) {
2058
+ var u = t[n][l];
2059
+ c.remove(u), s.add(u);
2060
+ }
2061
+ }
2062
+ });
2063
+ }, x.prototype.clearCompounds = function() {
2064
+ var e = {}, t = {};
2065
+ this.performDFSOnCompounds();
2066
+ for (var n = 0; n < this.compoundOrder.length; n++) t[this.compoundOrder[n].id] = this.compoundOrder[n], e[this.compoundOrder[n].id] = [].concat(this.compoundOrder[n].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[n].getChild()), this.compoundOrder[n].child = null;
2067
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(e, t);
2068
+ }, x.prototype.clearZeroDegreeMembers = function() {
2069
+ var e = this, t = this.tiledZeroDegreePack = [];
2070
+ Object.keys(this.memberGroups).forEach(function(n) {
2071
+ var r = e.idToDummyNode[n];
2072
+ if (t[n] = e.tileNodes(e.memberGroups[n], r.paddingLeft + r.paddingRight), r.rect.width = t[n].width, r.rect.height = t[n].height, r.setCenter(t[n].centerX, t[n].centerY), r.labelMarginLeft = 0, r.labelMarginTop = 0, c.NODE_DIMENSIONS_INCLUDE_LABELS) {
2073
+ var i = r.rect.width, a = r.rect.height;
2074
+ r.labelWidth && (r.labelPosHorizontal == "left" ? (r.rect.x -= r.labelWidth, r.setWidth(i + r.labelWidth), r.labelMarginLeft = r.labelWidth) : r.labelPosHorizontal == "center" && r.labelWidth > i ? (r.rect.x -= (r.labelWidth - i) / 2, r.setWidth(r.labelWidth), r.labelMarginLeft = (r.labelWidth - i) / 2) : r.labelPosHorizontal == "right" && r.setWidth(i + r.labelWidth)), r.labelHeight && (r.labelPosVertical == "top" ? (r.rect.y -= r.labelHeight, r.setHeight(a + r.labelHeight), r.labelMarginTop = r.labelHeight) : r.labelPosVertical == "center" && r.labelHeight > a ? (r.rect.y -= (r.labelHeight - a) / 2, r.setHeight(r.labelHeight), r.labelMarginTop = (r.labelHeight - a) / 2) : r.labelPosVertical == "bottom" && r.setHeight(a + r.labelHeight));
2075
+ }
2076
+ });
2077
+ }, x.prototype.repopulateCompounds = function() {
2078
+ for (var e = this.compoundOrder.length - 1; e >= 0; e--) {
2079
+ var t = this.compoundOrder[e], n = t.id, r = t.paddingLeft, i = t.paddingTop, a = t.labelMarginLeft, o = t.labelMarginTop;
2080
+ this.adjustLocations(this.tiledMemberPack[n], t.rect.x, t.rect.y, r, i, a, o);
2081
+ }
2082
+ }, x.prototype.repopulateZeroDegreeMembers = function() {
2083
+ var e = this, t = this.tiledZeroDegreePack;
2084
+ Object.keys(t).forEach(function(n) {
2085
+ var r = e.idToDummyNode[n], i = r.paddingLeft, a = r.paddingTop, o = r.labelMarginLeft, s = r.labelMarginTop;
2086
+ e.adjustLocations(t[n], r.rect.x, r.rect.y, i, a, o, s);
2087
+ });
2088
+ }, x.prototype.getToBeTiled = function(e) {
2089
+ var t = e.id;
2090
+ if (this.toBeTiled[t] != null) return this.toBeTiled[t];
2091
+ var n = e.getChild();
2092
+ if (n == null) return this.toBeTiled[t] = !1, !1;
2093
+ for (var r = n.getNodes(), i = 0; i < r.length; i++) {
2094
+ var a = r[i];
2095
+ if (this.getNodeDegree(a) > 0) return this.toBeTiled[t] = !1, !1;
2096
+ if (a.getChild() == null) {
2097
+ this.toBeTiled[a.id] = !1;
2098
+ continue;
2099
+ }
2100
+ if (!this.getToBeTiled(a)) return this.toBeTiled[t] = !1, !1;
2101
+ }
2102
+ return this.toBeTiled[t] = !0, !0;
2103
+ }, x.prototype.getNodeDegree = function(e) {
2104
+ e.id;
2105
+ for (var t = e.getEdges(), n = 0, r = 0; r < t.length; r++) {
2106
+ var i = t[r];
2107
+ i.getSource().id !== i.getTarget().id && (n += 1);
2108
+ }
2109
+ return n;
2110
+ }, x.prototype.getNodeDegreeWithChildren = function(e) {
2111
+ var t = this.getNodeDegree(e);
2112
+ if (e.getChild() == null) return t;
2113
+ for (var n = e.getChild().getNodes(), r = 0; r < n.length; r++) {
2114
+ var i = n[r];
2115
+ t += this.getNodeDegreeWithChildren(i);
2116
+ }
2117
+ return t;
2118
+ }, x.prototype.performDFSOnCompounds = function() {
2119
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2120
+ }, x.prototype.fillCompexOrderByDFS = function(e) {
2121
+ for (var t = 0; t < e.length; t++) {
2122
+ var n = e[t];
2123
+ n.getChild() != null && this.fillCompexOrderByDFS(n.getChild().getNodes()), this.getToBeTiled(n) && this.compoundOrder.push(n);
2124
+ }
2125
+ }, x.prototype.adjustLocations = function(e, t, n, r, i, a, o) {
2126
+ t += r + a, n += i + o;
2127
+ for (var s = t, c = 0; c < e.rows.length; c++) {
2128
+ var l = e.rows[c];
2129
+ t = s;
2130
+ for (var u = 0, d = 0; d < l.length; d++) {
2131
+ var f = l[d];
2132
+ f.rect.x = t, f.rect.y = n, t += f.rect.width + e.horizontalPadding, f.rect.height > u && (u = f.rect.height);
2133
+ }
2134
+ n += u + e.verticalPadding;
2135
+ }
2136
+ }, x.prototype.tileCompoundMembers = function(e, t) {
2137
+ var n = this;
2138
+ this.tiledMemberPack = [], Object.keys(e).forEach(function(r) {
2139
+ var i = t[r];
2140
+ if (n.tiledMemberPack[r] = n.tileNodes(e[r], i.paddingLeft + i.paddingRight), i.rect.width = n.tiledMemberPack[r].width, i.rect.height = n.tiledMemberPack[r].height, i.setCenter(n.tiledMemberPack[r].centerX, n.tiledMemberPack[r].centerY), i.labelMarginLeft = 0, i.labelMarginTop = 0, c.NODE_DIMENSIONS_INCLUDE_LABELS) {
2141
+ var a = i.rect.width, o = i.rect.height;
2142
+ i.labelWidth && (i.labelPosHorizontal == "left" ? (i.rect.x -= i.labelWidth, i.setWidth(a + i.labelWidth), i.labelMarginLeft = i.labelWidth) : i.labelPosHorizontal == "center" && i.labelWidth > a ? (i.rect.x -= (i.labelWidth - a) / 2, i.setWidth(i.labelWidth), i.labelMarginLeft = (i.labelWidth - a) / 2) : i.labelPosHorizontal == "right" && i.setWidth(a + i.labelWidth)), i.labelHeight && (i.labelPosVertical == "top" ? (i.rect.y -= i.labelHeight, i.setHeight(o + i.labelHeight), i.labelMarginTop = i.labelHeight) : i.labelPosVertical == "center" && i.labelHeight > o ? (i.rect.y -= (i.labelHeight - o) / 2, i.setHeight(i.labelHeight), i.labelMarginTop = (i.labelHeight - o) / 2) : i.labelPosVertical == "bottom" && i.setHeight(o + i.labelHeight));
2143
+ }
2144
+ });
2145
+ }, x.prototype.tileNodes = function(e, t) {
2146
+ var n = this.tileNodesByFavoringDim(e, t, !0), r = this.tileNodesByFavoringDim(e, t, !1), i = this.getOrgRatio(n);
2147
+ return this.getOrgRatio(r) < i ? r : n;
2148
+ }, x.prototype.getOrgRatio = function(e) {
2149
+ var t = e.width / e.height;
2150
+ return t < 1 && (t = 1 / t), t;
2151
+ }, x.prototype.calcIdealRowWidth = function(e, t) {
2152
+ var n = c.TILING_PADDING_VERTICAL, r = c.TILING_PADDING_HORIZONTAL, i = e.length, a = 0, o = 0, s = 0;
2153
+ e.forEach(function(e) {
2154
+ a += e.getWidth(), o += e.getHeight(), e.getWidth() > s && (s = e.getWidth());
2155
+ });
2156
+ var l = a / i, u = o / i, d = (n - r) ** 2 + 4 * (l + r) * (u + n) * i, f = (r - n + Math.sqrt(d)) / (2 * (l + r)), p;
2157
+ t ? (p = Math.ceil(f), p == f && p++) : p = Math.floor(f);
2158
+ var m = p * (l + r) - r;
2159
+ return s > m && (m = s), m += r * 2, m;
2160
+ }, x.prototype.tileNodesByFavoringDim = function(e, t, n) {
2161
+ var r = c.TILING_PADDING_VERTICAL, i = c.TILING_PADDING_HORIZONTAL, a = c.TILING_COMPARE_BY, o = {
2162
+ rows: [],
2163
+ rowWidth: [],
2164
+ rowHeight: [],
2165
+ width: 0,
2166
+ height: t,
2167
+ verticalPadding: r,
2168
+ horizontalPadding: i,
2169
+ centerX: 0,
2170
+ centerY: 0
2171
+ };
2172
+ a && (o.idealRowWidth = this.calcIdealRowWidth(e, n));
2173
+ var s = function(e) {
2174
+ return e.rect.width * e.rect.height;
2175
+ }, l = function(e, t) {
2176
+ return s(t) - s(e);
2177
+ };
2178
+ e.sort(function(e, t) {
2179
+ var n = l;
2180
+ return o.idealRowWidth ? (n = a, n(e.id, t.id)) : n(e, t);
2181
+ });
2182
+ for (var u = 0, d = 0, f = 0; f < e.length; f++) {
2183
+ var p = e[f];
2184
+ u += p.getCenterX(), d += p.getCenterY();
2185
+ }
2186
+ o.centerX = u / e.length, o.centerY = d / e.length;
2187
+ for (var f = 0; f < e.length; f++) {
2188
+ var p = e[f];
2189
+ if (o.rows.length == 0) this.insertNodeToRow(o, p, 0, t);
2190
+ else if (this.canAddHorizontal(o, p.rect.width, p.rect.height)) {
2191
+ var m = o.rows.length - 1;
2192
+ o.idealRowWidth || (m = this.getShortestRowIndex(o)), this.insertNodeToRow(o, p, m, t);
2193
+ } else this.insertNodeToRow(o, p, o.rows.length, t);
2194
+ this.shiftToLastRow(o);
2195
+ }
2196
+ return o;
2197
+ }, x.prototype.insertNodeToRow = function(e, t, n, r) {
2198
+ var i = r;
2199
+ n == e.rows.length && (e.rows.push([]), e.rowWidth.push(i), e.rowHeight.push(0));
2200
+ var a = e.rowWidth[n] + t.rect.width;
2201
+ e.rows[n].length > 0 && (a += e.horizontalPadding), e.rowWidth[n] = a, e.width < a && (e.width = a);
2202
+ var o = t.rect.height;
2203
+ n > 0 && (o += e.verticalPadding);
2204
+ var s = 0;
2205
+ o > e.rowHeight[n] && (s = e.rowHeight[n], e.rowHeight[n] = o, s = e.rowHeight[n] - s), e.height += s, e.rows[n].push(t);
2206
+ }, x.prototype.getShortestRowIndex = function(e) {
2207
+ for (var t = -1, n = Number.MAX_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] < n && (t = r, n = e.rowWidth[r]);
2208
+ return t;
2209
+ }, x.prototype.getLongestRowIndex = function(e) {
2210
+ for (var t = -1, n = Number.MIN_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] > n && (t = r, n = e.rowWidth[r]);
2211
+ return t;
2212
+ }, x.prototype.canAddHorizontal = function(e, t, n) {
2213
+ if (e.idealRowWidth) {
2214
+ var r = e.rows.length - 1;
2215
+ return e.rowWidth[r] + t + e.horizontalPadding <= e.idealRowWidth;
2216
+ }
2217
+ var i = this.getShortestRowIndex(e);
2218
+ if (i < 0) return !0;
2219
+ var a = e.rowWidth[i];
2220
+ if (a + e.horizontalPadding + t <= e.width) return !0;
2221
+ var o = 0;
2222
+ e.rowHeight[i] < n && i > 0 && (o = n + e.verticalPadding - e.rowHeight[i]);
2223
+ var s = e.width - a >= t + e.horizontalPadding ? (e.height + o) / (a + t + e.horizontalPadding) : (e.height + o) / e.width;
2224
+ o = n + e.verticalPadding;
2225
+ var c = e.width < t ? (e.height + o) / t : (e.height + o) / e.width;
2226
+ return c < 1 && (c = 1 / c), s < 1 && (s = 1 / s), s < c;
2227
+ }, x.prototype.shiftToLastRow = function(e) {
2228
+ var t = this.getLongestRowIndex(e), n = e.rowWidth.length - 1, r = e.rows[t], i = r[r.length - 1], a = i.width + e.horizontalPadding;
2229
+ if (e.width - e.rowWidth[n] > a && t != n) {
2230
+ r.splice(-1, 1), e.rows[n].push(i), e.rowWidth[t] = e.rowWidth[t] - a, e.rowWidth[n] = e.rowWidth[n] + a, e.width = e.rowWidth[instance.getLongestRowIndex(e)];
2231
+ for (var o = Number.MIN_VALUE, s = 0; s < r.length; s++) r[s].height > o && (o = r[s].height);
2232
+ t > 0 && (o += e.verticalPadding);
2233
+ var c = e.rowHeight[t] + e.rowHeight[n];
2234
+ e.rowHeight[t] = o, e.rowHeight[n] < i.height + e.verticalPadding && (e.rowHeight[n] = i.height + e.verticalPadding);
2235
+ var l = e.rowHeight[t] + e.rowHeight[n];
2236
+ e.height += l - c, this.shiftToLastRow(e);
2237
+ }
2238
+ }, x.prototype.tilingPreLayout = function() {
2239
+ c.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2240
+ }, x.prototype.tilingPostLayout = function() {
2241
+ c.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2242
+ }, x.prototype.reduceTrees = function() {
2243
+ for (var e = [], t = !0, n; t;) {
2244
+ var r = this.graphManager.getAllNodes(), i = [];
2245
+ t = !1;
2246
+ for (var a = 0; a < r.length; a++) if (n = r[a], n.getEdges().length == 1 && !n.getEdges()[0].isInterGraph && n.getChild() == null) {
2247
+ if (c.PURE_INCREMENTAL) {
2248
+ var o = n.getEdges()[0].getOtherEnd(n), s = new m(n.getCenterX() - o.getCenterX(), n.getCenterY() - o.getCenterY());
2249
+ i.push([
2250
+ n,
2251
+ n.getEdges()[0],
2252
+ n.getOwner(),
2253
+ s
2254
+ ]);
2255
+ } else i.push([
2256
+ n,
2257
+ n.getEdges()[0],
2258
+ n.getOwner()
2259
+ ]);
2260
+ t = !0;
2261
+ }
2262
+ if (t == 1) {
2263
+ for (var l = [], u = 0; u < i.length; u++) i[u][0].getEdges().length == 1 && (l.push(i[u]), i[u][0].getOwner().remove(i[u][0]));
2264
+ e.push(l), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2265
+ }
2266
+ }
2267
+ this.prunedNodesAll = e;
2268
+ }, x.prototype.growTree = function(e) {
2269
+ for (var t = e[e.length - 1], n, r = 0; r < t.length; r++) n = t[r], this.findPlaceforPrunedNode(n), n[2].add(n[0]), n[2].add(n[1], n[1].source, n[1].target);
2270
+ e.splice(e.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2271
+ }, x.prototype.findPlaceforPrunedNode = function(e) {
2272
+ var t, n, r = e[0];
2273
+ if (n = r == e[1].source ? e[1].target : e[1].source, c.PURE_INCREMENTAL) r.setCenter(n.getCenterX() + e[3].getWidth(), n.getCenterY() + e[3].getHeight());
2274
+ else {
2275
+ var i = n.startX, a = n.finishX, o = n.startY, s = n.finishY, l = [
2276
+ 0,
2277
+ 0,
2278
+ 0,
2279
+ 0
2280
+ ];
2281
+ if (o > 0) for (var d = i; d <= a; d++) l[0] += this.grid[d][o - 1].length + this.grid[d][o].length - 1;
2282
+ if (a < this.grid.length - 1) for (var d = o; d <= s; d++) l[1] += this.grid[a + 1][d].length + this.grid[a][d].length - 1;
2283
+ if (s < this.grid[0].length - 1) for (var d = i; d <= a; d++) l[2] += this.grid[d][s + 1].length + this.grid[d][s].length - 1;
2284
+ if (i > 0) for (var d = o; d <= s; d++) l[3] += this.grid[i - 1][d].length + this.grid[i][d].length - 1;
2285
+ for (var f = g.MAX_VALUE, p, m, h = 0; h < l.length; h++) l[h] < f ? (f = l[h], p = 1, m = h) : l[h] == f && p++;
2286
+ if (p == 3 && f == 0) l[0] == 0 && l[1] == 0 && l[2] == 0 ? t = 1 : l[0] == 0 && l[1] == 0 && l[3] == 0 ? t = 0 : l[0] == 0 && l[2] == 0 && l[3] == 0 ? t = 3 : l[1] == 0 && l[2] == 0 && l[3] == 0 && (t = 2);
2287
+ else if (p == 2 && f == 0) {
2288
+ var _ = Math.floor(Math.random() * 2);
2289
+ t = l[0] == 0 && l[1] == 0 ? _ == 0 ? 0 : 1 : l[0] == 0 && l[2] == 0 ? _ == 0 ? 0 : 2 : l[0] == 0 && l[3] == 0 ? _ == 0 ? 0 : 3 : l[1] == 0 && l[2] == 0 ? _ == 0 ? 1 : 2 : l[1] == 0 && l[3] == 0 ? _ == 0 ? 1 : 3 : _ == 0 ? 2 : 3;
2290
+ } else if (p == 4 && f == 0) {
2291
+ var _ = Math.floor(Math.random() * 4);
2292
+ t = _;
2293
+ } else t = m;
2294
+ t == 0 ? r.setCenter(n.getCenterX(), n.getCenterY() - n.getHeight() / 2 - u.DEFAULT_EDGE_LENGTH - r.getHeight() / 2) : t == 1 ? r.setCenter(n.getCenterX() + n.getWidth() / 2 + u.DEFAULT_EDGE_LENGTH + r.getWidth() / 2, n.getCenterY()) : t == 2 ? r.setCenter(n.getCenterX(), n.getCenterY() + n.getHeight() / 2 + u.DEFAULT_EDGE_LENGTH + r.getHeight() / 2) : r.setCenter(n.getCenterX() - n.getWidth() / 2 - u.DEFAULT_EDGE_LENGTH - r.getWidth() / 2, n.getCenterY());
2295
+ }
2296
+ }, e.exports = x;
2297
+ }),
2298
+ 991: ((e, t, n) => {
2299
+ var r = n(551).FDLayoutNode, i = n(551).IMath;
2300
+ function a(e, t, n, i) {
2301
+ r.call(this, e, t, n, i);
2302
+ }
2303
+ for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
2304
+ a.prototype.calculateDisplacement = function() {
2305
+ var e = this.graphManager.getLayout();
2306
+ this.getChild() != null && this.fixedNodeWeight ? (this.displacementX += e.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight, this.displacementY += e.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight) : (this.displacementX += e.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY += e.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren), Math.abs(this.displacementX) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementX = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementX)), Math.abs(this.displacementY) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementY = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementY)), this.child && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
2307
+ }, a.prototype.propogateDisplacementToChildren = function(e, t) {
2308
+ for (var n = this.getChild().getNodes(), r, i = 0; i < n.length; i++) r = n[i], r.getChild() == null ? (r.displacementX += e, r.displacementY += t) : r.propogateDisplacementToChildren(e, t);
2309
+ }, a.prototype.move = function() {
2310
+ var e = this.graphManager.getLayout();
2311
+ (this.child == null || this.child.getNodes().length == 0) && (this.moveBy(this.displacementX, this.displacementY), e.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;
2312
+ }, a.prototype.setPred1 = function(e) {
2313
+ this.pred1 = e;
2314
+ }, a.prototype.getPred1 = function() {
2315
+ return pred1;
2316
+ }, a.prototype.getPred2 = function() {
2317
+ return pred2;
2318
+ }, a.prototype.setNext = function(e) {
2319
+ this.next = e;
2320
+ }, a.prototype.getNext = function() {
2321
+ return next;
2322
+ }, a.prototype.setProcessed = function(e) {
2323
+ this.processed = e;
2324
+ }, a.prototype.isProcessed = function() {
2325
+ return processed;
2326
+ }, e.exports = a;
2327
+ }),
2328
+ 902: ((e, t, n) => {
2329
+ function r(e) {
2330
+ if (Array.isArray(e)) {
2331
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
2332
+ return n;
2333
+ } else return Array.from(e);
2334
+ }
2335
+ var i = n(806), a = n(551).LinkedList, o = n(551).Matrix, s = n(551).SVD;
2336
+ function c() {}
2337
+ c.handleConstraints = function(e) {
2338
+ var t = {};
2339
+ t.fixedNodeConstraint = e.constraints.fixedNodeConstraint, t.alignmentConstraint = e.constraints.alignmentConstraint, t.relativePlacementConstraint = e.constraints.relativePlacementConstraint;
2340
+ for (var n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = [], u = [], d = e.getAllNodes(), f = 0, p = 0; p < d.length; p++) {
2341
+ var m = d[p];
2342
+ m.getChild() == null && (c.set(m.id, f++), l.push(m.getCenterX()), u.push(m.getCenterY()), n.set(m.id, m));
2343
+ }
2344
+ t.relativePlacementConstraint && t.relativePlacementConstraint.forEach(function(e) {
2345
+ !e.gap && e.gap != 0 && (e.left ? e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
2346
+ });
2347
+ var h = function(e, t) {
2348
+ return {
2349
+ x: e.x - t.x,
2350
+ y: e.y - t.y
2351
+ };
2352
+ }, g = function(e) {
2353
+ var t = 0, n = 0;
2354
+ return e.forEach(function(e) {
2355
+ t += l[c.get(e)], n += u[c.get(e)];
2356
+ }), {
2357
+ x: t / e.size,
2358
+ y: n / e.size
2359
+ };
2360
+ }, _ = function(e, t, n, i, o) {
2361
+ function s(e, t) {
2362
+ var n = new Set(e), r = !0, i = !1, a = void 0;
2363
+ try {
2364
+ for (var o = t[Symbol.iterator](), s; !(r = (s = o.next()).done); r = !0) {
2365
+ var c = s.value;
2366
+ n.add(c);
2367
+ }
2368
+ } catch (e) {
2369
+ i = !0, a = e;
2370
+ } finally {
2371
+ try {
2372
+ !r && o.return && o.return();
2373
+ } finally {
2374
+ if (i) throw a;
2375
+ }
2376
+ }
2377
+ return n;
2378
+ }
2379
+ var d = /* @__PURE__ */ new Map();
2380
+ e.forEach(function(e, t) {
2381
+ d.set(t, 0);
2382
+ }), e.forEach(function(e, t) {
2383
+ e.forEach(function(e) {
2384
+ d.set(e.id, d.get(e.id) + 1);
2385
+ });
2386
+ });
2387
+ var f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = new a();
2388
+ d.forEach(function(e, r) {
2389
+ e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, new Set([r]));
2390
+ }), n && o.forEach(function(e) {
2391
+ var r = [];
2392
+ if (e.forEach(function(e) {
2393
+ n.has(e) && r.push(e);
2394
+ }), r.length > 0) {
2395
+ var a = 0;
2396
+ r.forEach(function(e) {
2397
+ t == "horizontal" ? (f.set(e, c.has(e) ? l[c.get(e)] : i.get(e)), a += f.get(e)) : (f.set(e, c.has(e) ? u[c.get(e)] : i.get(e)), a += f.get(e));
2398
+ }), a /= r.length, e.forEach(function(e) {
2399
+ n.has(e) || f.set(e, a);
2400
+ });
2401
+ } else {
2402
+ var o = 0;
2403
+ e.forEach(function(e) {
2404
+ t == "horizontal" ? o += c.has(e) ? l[c.get(e)] : i.get(e) : o += c.has(e) ? u[c.get(e)] : i.get(e);
2405
+ }), o /= e.length, e.forEach(function(e) {
2406
+ f.set(e, o);
2407
+ });
2408
+ }
2409
+ });
2410
+ for (var h = function() {
2411
+ var r = m.shift();
2412
+ e.get(r).forEach(function(e) {
2413
+ if (f.get(e.id) < f.get(r) + e.gap) if (n && n.has(e.id)) {
2414
+ var a = void 0;
2415
+ if (a = t == "horizontal" ? c.has(e.id) ? l[c.get(e.id)] : i.get(e.id) : c.has(e.id) ? u[c.get(e.id)] : i.get(e.id), f.set(e.id, a), a < f.get(r) + e.gap) {
2416
+ var o = f.get(r) + e.gap - a;
2417
+ p.get(r).forEach(function(e) {
2418
+ f.set(e, f.get(e) - o);
2419
+ });
2420
+ }
2421
+ } else f.set(e.id, f.get(r) + e.gap);
2422
+ d.set(e.id, d.get(e.id) - 1), d.get(e.id) == 0 && m.push(e.id), n && p.set(e.id, s(p.get(r), p.get(e.id)));
2423
+ });
2424
+ }; m.length != 0;) h();
2425
+ if (n) {
2426
+ var g = /* @__PURE__ */ new Set();
2427
+ e.forEach(function(e, t) {
2428
+ e.length == 0 && g.add(t);
2429
+ });
2430
+ var _ = [];
2431
+ p.forEach(function(e, t) {
2432
+ if (g.has(t)) {
2433
+ var i = !1, a = !0, o = !1, s = void 0;
2434
+ try {
2435
+ for (var c = e[Symbol.iterator](), l; !(a = (l = c.next()).done); a = !0) {
2436
+ var u = l.value;
2437
+ n.has(u) && (i = !0);
2438
+ }
2439
+ } catch (e) {
2440
+ o = !0, s = e;
2441
+ } finally {
2442
+ try {
2443
+ !a && c.return && c.return();
2444
+ } finally {
2445
+ if (o) throw s;
2446
+ }
2447
+ }
2448
+ if (!i) {
2449
+ var d = !1, f = void 0;
2450
+ _.forEach(function(t, n) {
2451
+ t.has([].concat(r(e))[0]) && (d = !0, f = n);
2452
+ }), d ? e.forEach(function(e) {
2453
+ _[f].add(e);
2454
+ }) : _.push(new Set(e));
2455
+ }
2456
+ }
2457
+ }), _.forEach(function(e, n) {
2458
+ var r = Infinity, a = Infinity, o = -Infinity, s = -Infinity, d = !0, p = !1, m = void 0;
2459
+ try {
2460
+ for (var h = e[Symbol.iterator](), g; !(d = (g = h.next()).done); d = !0) {
2461
+ var _ = g.value, v = void 0;
2462
+ v = t == "horizontal" ? c.has(_) ? l[c.get(_)] : i.get(_) : c.has(_) ? u[c.get(_)] : i.get(_);
2463
+ var y = f.get(_);
2464
+ v < r && (r = v), v > o && (o = v), y < a && (a = y), y > s && (s = y);
2465
+ }
2466
+ } catch (e) {
2467
+ p = !0, m = e;
2468
+ } finally {
2469
+ try {
2470
+ !d && h.return && h.return();
2471
+ } finally {
2472
+ if (p) throw m;
2473
+ }
2474
+ }
2475
+ var b = (r + o) / 2 - (a + s) / 2, x = !0, S = !1, C = void 0;
2476
+ try {
2477
+ for (var w = e[Symbol.iterator](), T; !(x = (T = w.next()).done); x = !0) {
2478
+ var E = T.value;
2479
+ f.set(E, f.get(E) + b);
2480
+ }
2481
+ } catch (e) {
2482
+ S = !0, C = e;
2483
+ } finally {
2484
+ try {
2485
+ !x && w.return && w.return();
2486
+ } finally {
2487
+ if (S) throw C;
2488
+ }
2489
+ }
2490
+ });
2491
+ }
2492
+ return f;
2493
+ }, v = function(e) {
2494
+ var t = 0, n = 0, r = 0, i = 0;
2495
+ if (e.forEach(function(e) {
2496
+ e.left ? l[c.get(e.left)] - l[c.get(e.right)] >= 0 ? t++ : n++ : u[c.get(e.top)] - u[c.get(e.bottom)] >= 0 ? r++ : i++;
2497
+ }), t > n && r > i) for (var a = 0; a < c.size; a++) l[a] = -1 * l[a], u[a] = -1 * u[a];
2498
+ else if (t > n) for (var o = 0; o < c.size; o++) l[o] = -1 * l[o];
2499
+ else if (r > i) for (var s = 0; s < c.size; s++) u[s] = -1 * u[s];
2500
+ }, y = function(e) {
2501
+ var t = [], n = new a(), r = /* @__PURE__ */ new Set(), i = 0;
2502
+ return e.forEach(function(a, o) {
2503
+ if (!r.has(o)) {
2504
+ t[i] = [];
2505
+ var s = o;
2506
+ for (n.push(s), r.add(s), t[i].push(s); n.length != 0;) s = n.shift(), e.get(s).forEach(function(e) {
2507
+ r.has(e.id) || (n.push(e.id), r.add(e.id), t[i].push(e.id));
2508
+ });
2509
+ i++;
2510
+ }
2511
+ }), t;
2512
+ }, b = function(e) {
2513
+ var t = /* @__PURE__ */ new Map();
2514
+ return e.forEach(function(e, n) {
2515
+ t.set(n, []);
2516
+ }), e.forEach(function(e, n) {
2517
+ e.forEach(function(e) {
2518
+ t.get(n).push(e), t.get(e.id).push({
2519
+ id: n,
2520
+ gap: e.gap,
2521
+ direction: e.direction
2522
+ });
2523
+ });
2524
+ }), t;
2525
+ }, x = function(e) {
2526
+ var t = /* @__PURE__ */ new Map();
2527
+ return e.forEach(function(e, n) {
2528
+ t.set(n, []);
2529
+ }), e.forEach(function(e, n) {
2530
+ e.forEach(function(e) {
2531
+ t.get(e.id).push({
2532
+ id: n,
2533
+ gap: e.gap,
2534
+ direction: e.direction
2535
+ });
2536
+ });
2537
+ }), t;
2538
+ }, S = [], C = [], w = !1, T = !1, E = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), k = [];
2539
+ if (t.fixedNodeConstraint && t.fixedNodeConstraint.forEach(function(e) {
2540
+ E.add(e.nodeId);
2541
+ }), t.relativePlacementConstraint && (t.relativePlacementConstraint.forEach(function(e) {
2542
+ e.left ? (D.has(e.left) ? D.get(e.left).push({
2543
+ id: e.right,
2544
+ gap: e.gap,
2545
+ direction: "horizontal"
2546
+ }) : D.set(e.left, [{
2547
+ id: e.right,
2548
+ gap: e.gap,
2549
+ direction: "horizontal"
2550
+ }]), D.has(e.right) || D.set(e.right, [])) : (D.has(e.top) ? D.get(e.top).push({
2551
+ id: e.bottom,
2552
+ gap: e.gap,
2553
+ direction: "vertical"
2554
+ }) : D.set(e.top, [{
2555
+ id: e.bottom,
2556
+ gap: e.gap,
2557
+ direction: "vertical"
2558
+ }]), D.has(e.bottom) || D.set(e.bottom, []));
2559
+ }), O = b(D), k = y(O)), i.TRANSFORM_ON_CONSTRAINT_HANDLING) {
2560
+ if (t.fixedNodeConstraint && t.fixedNodeConstraint.length > 1) t.fixedNodeConstraint.forEach(function(e, t) {
2561
+ S[t] = [e.position.x, e.position.y], C[t] = [l[c.get(e.nodeId)], u[c.get(e.nodeId)]];
2562
+ }), w = !0;
2563
+ else if (t.alignmentConstraint) (function() {
2564
+ var e = 0;
2565
+ if (t.alignmentConstraint.vertical) {
2566
+ for (var n = t.alignmentConstraint.vertical, i = function(t) {
2567
+ var i = /* @__PURE__ */ new Set();
2568
+ n[t].forEach(function(e) {
2569
+ i.add(e);
2570
+ });
2571
+ var a = new Set([].concat(r(i)).filter(function(e) {
2572
+ return E.has(e);
2573
+ })), o = void 0;
2574
+ o = a.size > 0 ? l[c.get(a.values().next().value)] : g(i).x, n[t].forEach(function(t) {
2575
+ S[e] = [o, u[c.get(t)]], C[e] = [l[c.get(t)], u[c.get(t)]], e++;
2576
+ });
2577
+ }, a = 0; a < n.length; a++) i(a);
2578
+ w = !0;
2579
+ }
2580
+ if (t.alignmentConstraint.horizontal) {
2581
+ for (var o = t.alignmentConstraint.horizontal, s = function(t) {
2582
+ var n = /* @__PURE__ */ new Set();
2583
+ o[t].forEach(function(e) {
2584
+ n.add(e);
2585
+ });
2586
+ var i = new Set([].concat(r(n)).filter(function(e) {
2587
+ return E.has(e);
2588
+ })), a = void 0;
2589
+ a = i.size > 0 ? l[c.get(i.values().next().value)] : g(n).y, o[t].forEach(function(t) {
2590
+ S[e] = [l[c.get(t)], a], C[e] = [l[c.get(t)], u[c.get(t)]], e++;
2591
+ });
2592
+ }, d = 0; d < o.length; d++) s(d);
2593
+ w = !0;
2594
+ }
2595
+ t.relativePlacementConstraint && (T = !0);
2596
+ })();
2597
+ else if (t.relativePlacementConstraint) {
2598
+ for (var A = 0, j = 0, M = 0; M < k.length; M++) k[M].length > A && (A = k[M].length, j = M);
2599
+ if (A < O.size / 2) v(t.relativePlacementConstraint), w = !1, T = !1;
2600
+ else {
2601
+ var N = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), ee = [];
2602
+ k[j].forEach(function(e) {
2603
+ D.get(e).forEach(function(t) {
2604
+ t.direction == "horizontal" ? (N.has(e) ? N.get(e).push(t) : N.set(e, [t]), N.has(t.id) || N.set(t.id, []), ee.push({
2605
+ left: e,
2606
+ right: t.id
2607
+ })) : (P.has(e) ? P.get(e).push(t) : P.set(e, [t]), P.has(t.id) || P.set(t.id, []), ee.push({
2608
+ top: e,
2609
+ bottom: t.id
2610
+ }));
2611
+ });
2612
+ }), v(ee), T = !1;
2613
+ var F = _(N, "horizontal"), I = _(P, "vertical");
2614
+ k[j].forEach(function(e, t) {
2615
+ C[t] = [l[c.get(e)], u[c.get(e)]], S[t] = [], F.has(e) ? S[t][0] = F.get(e) : S[t][0] = l[c.get(e)], I.has(e) ? S[t][1] = I.get(e) : S[t][1] = u[c.get(e)];
2616
+ }), w = !0;
2617
+ }
2618
+ }
2619
+ if (w) {
2620
+ for (var L = void 0, R = o.transpose(S), z = o.transpose(C), B = 0; B < R.length; B++) R[B] = o.multGamma(R[B]), z[B] = o.multGamma(z[B]);
2621
+ var V = o.multMat(R, o.transpose(z)), te = s.svd(V);
2622
+ L = o.multMat(te.V, o.transpose(te.U));
2623
+ for (var H = 0; H < c.size; H++) {
2624
+ var ne = [l[H], u[H]], re = [L[0][0], L[1][0]], U = [L[0][1], L[1][1]];
2625
+ l[H] = o.dotProduct(ne, re), u[H] = o.dotProduct(ne, U);
2626
+ }
2627
+ T && v(t.relativePlacementConstraint);
2628
+ }
2629
+ }
2630
+ if (i.ENFORCE_CONSTRAINTS) {
2631
+ if (t.fixedNodeConstraint && t.fixedNodeConstraint.length > 0) {
2632
+ var W = {
2633
+ x: 0,
2634
+ y: 0
2635
+ };
2636
+ t.fixedNodeConstraint.forEach(function(e, t) {
2637
+ var n = {
2638
+ x: l[c.get(e.nodeId)],
2639
+ y: u[c.get(e.nodeId)]
2640
+ }, r = e.position, i = h(r, n);
2641
+ W.x += i.x, W.y += i.y;
2642
+ }), W.x /= t.fixedNodeConstraint.length, W.y /= t.fixedNodeConstraint.length, l.forEach(function(e, t) {
2643
+ l[t] += W.x;
2644
+ }), u.forEach(function(e, t) {
2645
+ u[t] += W.y;
2646
+ }), t.fixedNodeConstraint.forEach(function(e) {
2647
+ l[c.get(e.nodeId)] = e.position.x, u[c.get(e.nodeId)] = e.position.y;
2648
+ });
2649
+ }
2650
+ if (t.alignmentConstraint) {
2651
+ if (t.alignmentConstraint.vertical) for (var G = t.alignmentConstraint.vertical, ie = function(e) {
2652
+ var t = /* @__PURE__ */ new Set();
2653
+ G[e].forEach(function(e) {
2654
+ t.add(e);
2655
+ });
2656
+ var n = new Set([].concat(r(t)).filter(function(e) {
2657
+ return E.has(e);
2658
+ })), i = void 0;
2659
+ i = n.size > 0 ? l[c.get(n.values().next().value)] : g(t).x, t.forEach(function(e) {
2660
+ E.has(e) || (l[c.get(e)] = i);
2661
+ });
2662
+ }, K = 0; K < G.length; K++) ie(K);
2663
+ if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal, J = function(e) {
2664
+ var t = /* @__PURE__ */ new Set();
2665
+ q[e].forEach(function(e) {
2666
+ t.add(e);
2667
+ });
2668
+ var n = new Set([].concat(r(t)).filter(function(e) {
2669
+ return E.has(e);
2670
+ })), i = void 0;
2671
+ i = n.size > 0 ? u[c.get(n.values().next().value)] : g(t).y, t.forEach(function(e) {
2672
+ E.has(e) || (u[c.get(e)] = i);
2673
+ });
2674
+ }, Y = 0; Y < q.length; Y++) J(Y);
2675
+ }
2676
+ t.relativePlacementConstraint && (function() {
2677
+ var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
2678
+ if (E.forEach(function(e) {
2679
+ s.add(e), d.add(e);
2680
+ }), t.alignmentConstraint) {
2681
+ if (t.alignmentConstraint.vertical) for (var f = t.alignmentConstraint.vertical, p = function(t) {
2682
+ r.set("dummy" + t, []), f[t].forEach(function(n) {
2683
+ e.set(n, "dummy" + t), r.get("dummy" + t).push(n), E.has(n) && s.add("dummy" + t);
2684
+ }), a.set("dummy" + t, l[c.get(f[t][0])]);
2685
+ }, m = 0; m < f.length; m++) p(m);
2686
+ if (t.alignmentConstraint.horizontal) for (var h = t.alignmentConstraint.horizontal, g = function(e) {
2687
+ i.set("dummy" + e, []), h[e].forEach(function(t) {
2688
+ n.set(t, "dummy" + e), i.get("dummy" + e).push(t), E.has(t) && d.add("dummy" + e);
2689
+ }), o.set("dummy" + e, u[c.get(h[e][0])]);
2690
+ }, v = 0; v < h.length; v++) g(v);
2691
+ }
2692
+ var S = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), w = function(t) {
2693
+ D.get(t).forEach(function(r) {
2694
+ var i = void 0, a = void 0;
2695
+ r.direction == "horizontal" ? (i = e.get(t) ? e.get(t) : t, a = e.get(r.id) ? {
2696
+ id: e.get(r.id),
2697
+ gap: r.gap,
2698
+ direction: r.direction
2699
+ } : r, S.has(i) ? S.get(i).push(a) : S.set(i, [a]), S.has(a.id) || S.set(a.id, [])) : (i = n.get(t) ? n.get(t) : t, a = n.get(r.id) ? {
2700
+ id: n.get(r.id),
2701
+ gap: r.gap,
2702
+ direction: r.direction
2703
+ } : r, C.has(i) ? C.get(i).push(a) : C.set(i, [a]), C.has(a.id) || C.set(a.id, []));
2704
+ });
2705
+ }, T = !0, O = !1, k = void 0;
2706
+ try {
2707
+ for (var A = D.keys()[Symbol.iterator](), j; !(T = (j = A.next()).done); T = !0) {
2708
+ var M = j.value;
2709
+ w(M);
2710
+ }
2711
+ } catch (e) {
2712
+ O = !0, k = e;
2713
+ } finally {
2714
+ try {
2715
+ !T && A.return && A.return();
2716
+ } finally {
2717
+ if (O) throw k;
2718
+ }
2719
+ }
2720
+ var N = b(S), P = b(C), ee = y(N), F = y(P), I = x(S), L = x(C), R = [], z = [];
2721
+ ee.forEach(function(e, t) {
2722
+ R[t] = [], e.forEach(function(e) {
2723
+ I.get(e).length == 0 && R[t].push(e);
2724
+ });
2725
+ }), F.forEach(function(e, t) {
2726
+ z[t] = [], e.forEach(function(e) {
2727
+ L.get(e).length == 0 && z[t].push(e);
2728
+ });
2729
+ });
2730
+ var B = _(S, "horizontal", s, a, R), V = _(C, "vertical", d, o, z), te = function(e) {
2731
+ r.get(e) ? r.get(e).forEach(function(t) {
2732
+ l[c.get(t)] = B.get(e);
2733
+ }) : l[c.get(e)] = B.get(e);
2734
+ }, H = !0, ne = !1, re = void 0;
2735
+ try {
2736
+ for (var U = B.keys()[Symbol.iterator](), W; !(H = (W = U.next()).done); H = !0) {
2737
+ var G = W.value;
2738
+ te(G);
2739
+ }
2740
+ } catch (e) {
2741
+ ne = !0, re = e;
2742
+ } finally {
2743
+ try {
2744
+ !H && U.return && U.return();
2745
+ } finally {
2746
+ if (ne) throw re;
2747
+ }
2748
+ }
2749
+ var ie = function(e) {
2750
+ i.get(e) ? i.get(e).forEach(function(t) {
2751
+ u[c.get(t)] = V.get(e);
2752
+ }) : u[c.get(e)] = V.get(e);
2753
+ }, K = !0, q = !1, J = void 0;
2754
+ try {
2755
+ for (var Y = V.keys()[Symbol.iterator](), X; !(K = (X = Y.next()).done); K = !0) {
2756
+ var G = X.value;
2757
+ ie(G);
2758
+ }
2759
+ } catch (e) {
2760
+ q = !0, J = e;
2761
+ } finally {
2762
+ try {
2763
+ !K && Y.return && Y.return();
2764
+ } finally {
2765
+ if (q) throw J;
2766
+ }
2767
+ }
2768
+ })();
2769
+ }
2770
+ for (var X = 0; X < d.length; X++) {
2771
+ var Z = d[X];
2772
+ Z.getChild() == null && Z.setCenter(l[c.get(Z.id)], u[c.get(Z.id)]);
2773
+ }
2774
+ }, e.exports = c;
2775
+ }),
2776
+ 551: ((t) => {
2777
+ t.exports = e;
2778
+ })
2779
+ }, n = {};
2780
+ function r(e) {
2781
+ var i = n[e];
2782
+ if (i !== void 0) return i.exports;
2783
+ var a = n[e] = { exports: {} };
2784
+ return t[e](a, a.exports, r), a.exports;
2785
+ }
2786
+ return r(45);
2787
+ })();
2788
+ });
2789
+ })), A = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2790
+ (function(n, r) {
2791
+ typeof e == "object" && typeof t == "object" ? t.exports = r(k()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeFcose = r(k()) : n.cytoscapeFcose = r(n.coseBase);
2792
+ })(e, function(e) {
2793
+ return (() => {
2794
+ var t = {
2795
+ 658: ((e) => {
2796
+ e.exports = Object.assign == null ? function(e) {
2797
+ return [...arguments].slice(1).forEach(function(t) {
2798
+ Object.keys(t).forEach(function(n) {
2799
+ return e[n] = t[n];
2800
+ });
2801
+ }), e;
2802
+ } : Object.assign.bind(Object);
2803
+ }),
2804
+ 548: ((e, t, n) => {
2805
+ var r = function() {
2806
+ function e(e, t) {
2807
+ var n = [], r = !0, i = !1, a = void 0;
2808
+ try {
2809
+ for (var o = e[Symbol.iterator](), s; !(r = (s = o.next()).done) && (n.push(s.value), !(t && n.length === t)); r = !0);
2810
+ } catch (e) {
2811
+ i = !0, a = e;
2812
+ } finally {
2813
+ try {
2814
+ !r && o.return && o.return();
2815
+ } finally {
2816
+ if (i) throw a;
2817
+ }
2818
+ }
2819
+ return n;
2820
+ }
2821
+ return function(t, n) {
2822
+ if (Array.isArray(t)) return t;
2823
+ if (Symbol.iterator in Object(t)) return e(t, n);
2824
+ throw TypeError("Invalid attempt to destructure non-iterable instance");
2825
+ };
2826
+ }(), i = n(140).layoutBase.LinkedList, a = {};
2827
+ a.getTopMostNodes = function(e) {
2828
+ for (var t = {}, n = 0; n < e.length; n++) t[e[n].id()] = !0;
2829
+ return e.filter(function(e, n) {
2830
+ typeof e == "number" && (e = n);
2831
+ for (var r = e.parent()[0]; r != null;) {
2832
+ if (t[r.id()]) return !1;
2833
+ r = r.parent()[0];
2834
+ }
2835
+ return !0;
2836
+ });
2837
+ }, a.connectComponents = function(e, t, n, r) {
2838
+ var a = new i(), o = /* @__PURE__ */ new Set(), s = [], c = void 0, l = void 0, u = void 0, d = !1, f = 1, p = [], m = [], h = function() {
2839
+ var r = e.collection();
2840
+ m.push(r);
2841
+ var i = n[0], h = e.collection();
2842
+ h.merge(i).merge(i.descendants().intersection(t)), s.push(i), h.forEach(function(e) {
2843
+ a.push(e), o.add(e), r.merge(e);
2844
+ });
2845
+ for (var g = function() {
2846
+ i = a.shift();
2847
+ var l = e.collection();
2848
+ i.neighborhood().nodes().forEach(function(e) {
2849
+ t.intersection(i.edgesWith(e)).length > 0 && l.merge(e);
2850
+ });
2851
+ for (var u = 0; u < l.length; u++) {
2852
+ var d = l[u];
2853
+ c = n.intersection(d.union(d.ancestors())), c != null && !o.has(c[0]) && c.union(c.descendants()).forEach(function(e) {
2854
+ a.push(e), o.add(e), r.merge(e), n.has(e) && s.push(e);
2855
+ });
2856
+ }
2857
+ }; a.length != 0;) g();
2858
+ if (r.forEach(function(e) {
2859
+ t.intersection(e.connectedEdges()).forEach(function(e) {
2860
+ r.has(e.source()) && r.has(e.target()) && r.merge(e);
2861
+ });
2862
+ }), s.length == n.length && (d = !0), !d || d && f > 1) {
2863
+ l = s[0], u = l.connectedEdges().length, s.forEach(function(e) {
2864
+ e.connectedEdges().length < u && (u = e.connectedEdges().length, l = e);
2865
+ }), p.push(l.id());
2866
+ var _ = e.collection();
2867
+ _.merge(s[0]), s.forEach(function(e) {
2868
+ _.merge(e);
2869
+ }), s = [], n = n.difference(_), f++;
2870
+ }
2871
+ };
2872
+ do
2873
+ h();
2874
+ while (!d);
2875
+ return r && p.length > 0 && r.set("dummy" + (r.size + 1), p), m;
2876
+ }, a.relocateComponent = function(e, t, n) {
2877
+ if (!n.fixedNodeConstraint) {
2878
+ var i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
2879
+ if (n.quality == "draft") {
2880
+ var c = !0, l = !1, u = void 0;
2881
+ try {
2882
+ for (var d = t.nodeIndexes[Symbol.iterator](), f; !(c = (f = d.next()).done); c = !0) {
2883
+ var p = f.value, m = r(p, 2), h = m[0], g = m[1], _ = n.cy.getElementById(h);
2884
+ if (_) {
2885
+ var v = _.boundingBox(), y = t.xCoords[g] - v.w / 2, b = t.xCoords[g] + v.w / 2, x = t.yCoords[g] - v.h / 2, S = t.yCoords[g] + v.h / 2;
2886
+ y < i && (i = y), b > a && (a = b), x < o && (o = x), S > s && (s = S);
2887
+ }
2888
+ }
2889
+ } catch (e) {
2890
+ l = !0, u = e;
2891
+ } finally {
2892
+ try {
2893
+ !c && d.return && d.return();
2894
+ } finally {
2895
+ if (l) throw u;
2896
+ }
2897
+ }
2898
+ var C = e.x - (a + i) / 2, w = e.y - (s + o) / 2;
2899
+ t.xCoords = t.xCoords.map(function(e) {
2900
+ return e + C;
2901
+ }), t.yCoords = t.yCoords.map(function(e) {
2902
+ return e + w;
2903
+ });
2904
+ } else {
2905
+ Object.keys(t).forEach(function(e) {
2906
+ var n = t[e], r = n.getRect().x, c = n.getRect().x + n.getRect().width, l = n.getRect().y, u = n.getRect().y + n.getRect().height;
2907
+ r < i && (i = r), c > a && (a = c), l < o && (o = l), u > s && (s = u);
2908
+ });
2909
+ var T = e.x - (a + i) / 2, E = e.y - (s + o) / 2;
2910
+ Object.keys(t).forEach(function(e) {
2911
+ var n = t[e];
2912
+ n.setCenter(n.getCenterX() + T, n.getCenterY() + E);
2913
+ });
2914
+ }
2915
+ }
2916
+ }, a.calcBoundingBox = function(e, t, n, r) {
2917
+ for (var i = 2 ** 53 - 1, a = -(2 ** 53 - 1), o = 2 ** 53 - 1, s = -(2 ** 53 - 1), c = void 0, l = void 0, u = void 0, d = void 0, f = e.descendants().not(":parent"), p = f.length, m = 0; m < p; m++) {
2918
+ var h = f[m];
2919
+ c = t[r.get(h.id())] - h.width() / 2, l = t[r.get(h.id())] + h.width() / 2, u = n[r.get(h.id())] - h.height() / 2, d = n[r.get(h.id())] + h.height() / 2, i > c && (i = c), a < l && (a = l), o > u && (o = u), s < d && (s = d);
2920
+ }
2921
+ var g = {};
2922
+ return g.topLeftX = i, g.topLeftY = o, g.width = a - i, g.height = s - o, g;
2923
+ }, a.calcParentsWithoutChildren = function(e, t) {
2924
+ var n = e.collection();
2925
+ return t.nodes(":parent").forEach(function(e) {
2926
+ var t = !1;
2927
+ e.children().forEach(function(e) {
2928
+ e.css("display") != "none" && (t = !0);
2929
+ }), t || n.merge(e);
2930
+ }), n;
2931
+ }, e.exports = a;
2932
+ }),
2933
+ 816: ((e, t, n) => {
2934
+ var r = n(548), i = n(140).CoSELayout, a = n(140).CoSENode, o = n(140).layoutBase.PointD, s = n(140).layoutBase.DimensionD, c = n(140).layoutBase.LayoutConstants, l = n(140).layoutBase.FDLayoutConstants, u = n(140).CoSEConstants;
2935
+ e.exports = { coseLayout: function(e, t) {
2936
+ var n = e.cy, d = e.eles, f = d.nodes(), p = d.edges(), m = void 0, h = void 0, g = void 0, _ = {};
2937
+ e.randomize && (m = t.nodeIndexes, h = t.xCoords, g = t.yCoords);
2938
+ var v = function(e) {
2939
+ return typeof e == "function";
2940
+ }, y = function(e, t) {
2941
+ return v(e) ? e(t) : e;
2942
+ }, b = r.calcParentsWithoutChildren(n, d), x = function e(t, n, i, c) {
2943
+ for (var l = n.length, u = 0; u < l; u++) {
2944
+ var d = n[u], f = null;
2945
+ d.intersection(b).length == 0 && (f = d.children());
2946
+ var p = void 0, v = d.layoutDimensions({ nodeDimensionsIncludeLabels: c.nodeDimensionsIncludeLabels });
2947
+ if (d.outerWidth() != null && d.outerHeight() != null) if (c.randomize) if (!d.isParent()) p = t.add(new a(i.graphManager, new o(h[m.get(d.id())] - v.w / 2, g[m.get(d.id())] - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2948
+ else {
2949
+ var x = r.calcBoundingBox(d, h, g, m);
2950
+ p = d.intersection(b).length == 0 ? t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(x.width, x.height))) : t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(parseFloat(v.w), parseFloat(v.h))));
2951
+ }
2952
+ else p = t.add(new a(i.graphManager, new o(d.position("x") - v.w / 2, d.position("y") - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2953
+ else p = t.add(new a(this.graphManager));
2954
+ if (p.id = d.data("id"), p.nodeRepulsion = y(c.nodeRepulsion, d), p.paddingLeft = parseInt(d.css("padding")), p.paddingTop = parseInt(d.css("padding")), p.paddingRight = parseInt(d.css("padding")), p.paddingBottom = parseInt(d.css("padding")), c.nodeDimensionsIncludeLabels && (p.labelWidth = d.boundingBox({
2955
+ includeLabels: !0,
2956
+ includeNodes: !1,
2957
+ includeOverlays: !1
2958
+ }).w, p.labelHeight = d.boundingBox({
2959
+ includeLabels: !0,
2960
+ includeNodes: !1,
2961
+ includeOverlays: !1
2962
+ }).h, p.labelPosVertical = d.css("text-valign"), p.labelPosHorizontal = d.css("text-halign")), _[d.data("id")] = p, isNaN(p.rect.x) && (p.rect.x = 0), isNaN(p.rect.y) && (p.rect.y = 0), f != null && f.length > 0) {
2963
+ var S = void 0;
2964
+ S = i.getGraphManager().add(i.newGraph(), p), e(S, f, i, c);
2965
+ }
2966
+ }
2967
+ }, S = function(t, n, r) {
2968
+ for (var i = 0, a = 0, o = 0; o < r.length; o++) {
2969
+ var s = r[o], c = _[s.data("source")], d = _[s.data("target")];
2970
+ if (c && d && c !== d && c.getEdgesBetween(d).length == 0) {
2971
+ var f = n.add(t.newEdge(), c, d);
2972
+ f.id = s.id(), f.idealLength = y(e.idealEdgeLength, s), f.edgeElasticity = y(e.edgeElasticity, s), i += f.idealLength, a++;
2973
+ }
2974
+ }
2975
+ e.idealEdgeLength != null && (a > 0 ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = i / a : v(e.idealEdgeLength) ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = 50 : u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
2976
+ }, C = function(e, t) {
2977
+ t.fixedNodeConstraint && (e.constraints.fixedNodeConstraint = t.fixedNodeConstraint), t.alignmentConstraint && (e.constraints.alignmentConstraint = t.alignmentConstraint), t.relativePlacementConstraint && (e.constraints.relativePlacementConstraint = t.relativePlacementConstraint);
2978
+ };
2979
+ e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), e.quality == "proof" ? c.QUALITY = 2 : c.QUALITY = 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (e.randomize ? u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint ? u.TREE_REDUCTION_ON_INCREMENTAL = !1 : u.TREE_REDUCTION_ON_INCREMENTAL = !0;
2980
+ var w = new i(), T = w.newGraphManager();
2981
+ return x(T.addRoot(), r.getTopMostNodes(f), w, e), S(w, T, p), C(w, e), w.runLayout(), _;
2982
+ } };
2983
+ }),
2984
+ 212: ((e, t, n) => {
2985
+ var r = function() {
2986
+ function e(e, t) {
2987
+ for (var n = 0; n < t.length; n++) {
2988
+ var r = t[n];
2989
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
2990
+ }
2991
+ }
2992
+ return function(t, n, r) {
2993
+ return n && e(t.prototype, n), r && e(t, r), t;
2994
+ };
2995
+ }();
2996
+ function i(e, t) {
2997
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
2998
+ }
2999
+ var a = n(658), o = n(548), s = n(657).spectralLayout, c = n(816).coseLayout, l = Object.freeze({
3000
+ quality: "default",
3001
+ randomize: !0,
3002
+ animate: !0,
3003
+ animationDuration: 1e3,
3004
+ animationEasing: void 0,
3005
+ fit: !0,
3006
+ padding: 30,
3007
+ nodeDimensionsIncludeLabels: !1,
3008
+ uniformNodeDimensions: !1,
3009
+ packComponents: !0,
3010
+ step: "all",
3011
+ samplingType: !0,
3012
+ sampleSize: 25,
3013
+ nodeSeparation: 75,
3014
+ piTol: 1e-7,
3015
+ nodeRepulsion: function(e) {
3016
+ return 4500;
3017
+ },
3018
+ idealEdgeLength: function(e) {
3019
+ return 50;
3020
+ },
3021
+ edgeElasticity: function(e) {
3022
+ return .45;
3023
+ },
3024
+ nestingFactor: .1,
3025
+ gravity: .25,
3026
+ numIter: 2500,
3027
+ tile: !0,
3028
+ tilingCompareBy: void 0,
3029
+ tilingPaddingVertical: 10,
3030
+ tilingPaddingHorizontal: 10,
3031
+ gravityRangeCompound: 1.5,
3032
+ gravityCompound: 1,
3033
+ gravityRange: 3.8,
3034
+ initialEnergyOnIncremental: .3,
3035
+ fixedNodeConstraint: void 0,
3036
+ alignmentConstraint: void 0,
3037
+ relativePlacementConstraint: void 0,
3038
+ ready: function() {},
3039
+ stop: function() {}
3040
+ });
3041
+ e.exports = function() {
3042
+ function e(t) {
3043
+ i(this, e), this.options = a({}, l, t);
3044
+ }
3045
+ return r(e, [{
3046
+ key: "run",
3047
+ value: function() {
3048
+ var e = this, t = this.options, n = t.cy, r = t.eles, i = [], a = [], l = void 0, u = [];
3049
+ t.fixedNodeConstraint && (!Array.isArray(t.fixedNodeConstraint) || t.fixedNodeConstraint.length == 0) && (t.fixedNodeConstraint = void 0), t.alignmentConstraint && (t.alignmentConstraint.vertical && (!Array.isArray(t.alignmentConstraint.vertical) || t.alignmentConstraint.vertical.length == 0) && (t.alignmentConstraint.vertical = void 0), t.alignmentConstraint.horizontal && (!Array.isArray(t.alignmentConstraint.horizontal) || t.alignmentConstraint.horizontal.length == 0) && (t.alignmentConstraint.horizontal = void 0)), t.relativePlacementConstraint && (!Array.isArray(t.relativePlacementConstraint) || t.relativePlacementConstraint.length == 0) && (t.relativePlacementConstraint = void 0), (t.fixedNodeConstraint || t.alignmentConstraint || t.relativePlacementConstraint) && (t.tile = !1, t.packComponents = !1);
3050
+ var d = void 0, f = !1;
3051
+ if (n.layoutUtilities && t.packComponents && (d = n.layoutUtilities("get"), d || (d = n.layoutUtilities()), f = !0), r.nodes().length > 0) if (f) {
3052
+ var p = o.getTopMostNodes(t.eles.nodes());
3053
+ if (l = o.connectComponents(n, t.eles, p), l.forEach(function(e) {
3054
+ var t = e.boundingBox();
3055
+ u.push({
3056
+ x: t.x1 + t.w / 2,
3057
+ y: t.y1 + t.h / 2
3058
+ });
3059
+ }), t.randomize && l.forEach(function(e) {
3060
+ t.eles = e, i.push(s(t));
3061
+ }), t.quality == "default" || t.quality == "proof") {
3062
+ var m = n.collection();
3063
+ if (t.tile) {
3064
+ var h = /* @__PURE__ */ new Map(), g = [], _ = [], v = 0, y = {
3065
+ nodeIndexes: h,
3066
+ xCoords: g,
3067
+ yCoords: _
3068
+ }, b = [];
3069
+ if (l.forEach(function(e, t) {
3070
+ e.edges().length == 0 && (e.nodes().forEach(function(t, n) {
3071
+ m.merge(e.nodes()[n]), t.isParent() || (y.nodeIndexes.set(e.nodes()[n].id(), v++), y.xCoords.push(e.nodes()[0].position().x), y.yCoords.push(e.nodes()[0].position().y));
3072
+ }), b.push(t));
3073
+ }), m.length > 1) {
3074
+ var x = m.boundingBox();
3075
+ u.push({
3076
+ x: x.x1 + x.w / 2,
3077
+ y: x.y1 + x.h / 2
3078
+ }), l.push(m), i.push(y);
3079
+ for (var S = b.length - 1; S >= 0; S--) l.splice(b[S], 1), i.splice(b[S], 1), u.splice(b[S], 1);
3080
+ }
3081
+ }
3082
+ l.forEach(function(e, n) {
3083
+ t.eles = e, a.push(c(t, i[n])), o.relocateComponent(u[n], a[n], t);
3084
+ });
3085
+ } else l.forEach(function(e, n) {
3086
+ o.relocateComponent(u[n], i[n], t);
3087
+ });
3088
+ var C = /* @__PURE__ */ new Set();
3089
+ if (l.length > 1) {
3090
+ var w = [], T = r.filter(function(e) {
3091
+ return e.css("display") == "none";
3092
+ });
3093
+ l.forEach(function(e, n) {
3094
+ var r = void 0;
3095
+ if (t.quality == "draft" && (r = i[n].nodeIndexes), e.nodes().not(T).length > 0) {
3096
+ var s = {};
3097
+ s.edges = [], s.nodes = [];
3098
+ var c = void 0;
3099
+ e.nodes().not(T).forEach(function(e) {
3100
+ if (t.quality == "draft") if (!e.isParent()) c = r.get(e.id()), s.nodes.push({
3101
+ x: i[n].xCoords[c] - e.boundingbox().w / 2,
3102
+ y: i[n].yCoords[c] - e.boundingbox().h / 2,
3103
+ width: e.boundingbox().w,
3104
+ height: e.boundingbox().h
3105
+ });
3106
+ else {
3107
+ var l = o.calcBoundingBox(e, i[n].xCoords, i[n].yCoords, r);
3108
+ s.nodes.push({
3109
+ x: l.topLeftX,
3110
+ y: l.topLeftY,
3111
+ width: l.width,
3112
+ height: l.height
3113
+ });
3114
+ }
3115
+ else a[n][e.id()] && s.nodes.push({
3116
+ x: a[n][e.id()].getLeft(),
3117
+ y: a[n][e.id()].getTop(),
3118
+ width: a[n][e.id()].getWidth(),
3119
+ height: a[n][e.id()].getHeight()
3120
+ });
3121
+ }), e.edges().forEach(function(e) {
3122
+ var c = e.source(), l = e.target();
3123
+ if (c.css("display") != "none" && l.css("display") != "none") if (t.quality == "draft") {
3124
+ var u = r.get(c.id()), d = r.get(l.id()), f = [], p = [];
3125
+ if (c.isParent()) {
3126
+ var m = o.calcBoundingBox(c, i[n].xCoords, i[n].yCoords, r);
3127
+ f.push(m.topLeftX + m.width / 2), f.push(m.topLeftY + m.height / 2);
3128
+ } else f.push(i[n].xCoords[u]), f.push(i[n].yCoords[u]);
3129
+ if (l.isParent()) {
3130
+ var h = o.calcBoundingBox(l, i[n].xCoords, i[n].yCoords, r);
3131
+ p.push(h.topLeftX + h.width / 2), p.push(h.topLeftY + h.height / 2);
3132
+ } else p.push(i[n].xCoords[d]), p.push(i[n].yCoords[d]);
3133
+ s.edges.push({
3134
+ startX: f[0],
3135
+ startY: f[1],
3136
+ endX: p[0],
3137
+ endY: p[1]
3138
+ });
3139
+ } else a[n][c.id()] && a[n][l.id()] && s.edges.push({
3140
+ startX: a[n][c.id()].getCenterX(),
3141
+ startY: a[n][c.id()].getCenterY(),
3142
+ endX: a[n][l.id()].getCenterX(),
3143
+ endY: a[n][l.id()].getCenterY()
3144
+ });
3145
+ }), s.nodes.length > 0 && (w.push(s), C.add(n));
3146
+ }
3147
+ });
3148
+ var E = d.packComponents(w, t.randomize).shifts;
3149
+ if (t.quality == "draft") i.forEach(function(e, t) {
3150
+ var n = e.xCoords.map(function(e) {
3151
+ return e + E[t].dx;
3152
+ }), r = e.yCoords.map(function(e) {
3153
+ return e + E[t].dy;
3154
+ });
3155
+ e.xCoords = n, e.yCoords = r;
3156
+ });
3157
+ else {
3158
+ var D = 0;
3159
+ C.forEach(function(e) {
3160
+ Object.keys(a[e]).forEach(function(t) {
3161
+ var n = a[e][t];
3162
+ n.setCenter(n.getCenterX() + E[D].dx, n.getCenterY() + E[D].dy);
3163
+ }), D++;
3164
+ });
3165
+ }
3166
+ }
3167
+ } else {
3168
+ var O = t.eles.boundingBox();
3169
+ if (u.push({
3170
+ x: O.x1 + O.w / 2,
3171
+ y: O.y1 + O.h / 2
3172
+ }), t.randomize) {
3173
+ var k = s(t);
3174
+ i.push(k);
3175
+ }
3176
+ t.quality == "default" || t.quality == "proof" ? (a.push(c(t, i[0])), o.relocateComponent(u[0], a[0], t)) : o.relocateComponent(u[0], i[0], t);
3177
+ }
3178
+ var A = function(e, n) {
3179
+ if (t.quality == "default" || t.quality == "proof") {
3180
+ typeof e == "number" && (e = n);
3181
+ var r = void 0, o = void 0, s = e.data("id");
3182
+ return a.forEach(function(e) {
3183
+ s in e && (r = {
3184
+ x: e[s].getRect().getCenterX(),
3185
+ y: e[s].getRect().getCenterY()
3186
+ }, o = e[s]);
3187
+ }), t.nodeDimensionsIncludeLabels && (o.labelWidth && (o.labelPosHorizontal == "left" ? r.x += o.labelWidth / 2 : o.labelPosHorizontal == "right" && (r.x -= o.labelWidth / 2)), o.labelHeight && (o.labelPosVertical == "top" ? r.y += o.labelHeight / 2 : o.labelPosVertical == "bottom" && (r.y -= o.labelHeight / 2))), r == null && (r = {
3188
+ x: e.position("x"),
3189
+ y: e.position("y")
3190
+ }), {
3191
+ x: r.x,
3192
+ y: r.y
3193
+ };
3194
+ } else {
3195
+ var c = void 0;
3196
+ return i.forEach(function(t) {
3197
+ var n = t.nodeIndexes.get(e.id());
3198
+ n != null && (c = {
3199
+ x: t.xCoords[n],
3200
+ y: t.yCoords[n]
3201
+ });
3202
+ }), c == null && (c = {
3203
+ x: e.position("x"),
3204
+ y: e.position("y")
3205
+ }), {
3206
+ x: c.x,
3207
+ y: c.y
3208
+ };
3209
+ }
3210
+ };
3211
+ if (t.quality == "default" || t.quality == "proof" || t.randomize) {
3212
+ var j = o.calcParentsWithoutChildren(n, r), M = r.filter(function(e) {
3213
+ return e.css("display") == "none";
3214
+ });
3215
+ t.eles = r.not(M), r.nodes().not(":parent").not(M).layoutPositions(e, t, A), j.length > 0 && j.forEach(function(e) {
3216
+ e.position(A(e));
3217
+ });
3218
+ } else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
3219
+ }
3220
+ }]), e;
3221
+ }();
3222
+ }),
3223
+ 657: ((e, t, n) => {
3224
+ var r = n(548), i = n(140).layoutBase.Matrix, a = n(140).layoutBase.SVD;
3225
+ e.exports = { spectralLayout: function(e) {
3226
+ var t = e.cy, n = e.eles, o = n.nodes(), s = n.nodes(":parent"), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = [], f = [], p = [], m = [], h = [], g = [], _ = [], v = [], y = void 0, b = 1e8, x = 1e-9, S = e.piTol, C = e.samplingType, w = e.nodeSeparation, T = void 0, E = function() {
3227
+ for (var e = 0, t = 0, n = !1; t < T;) {
3228
+ e = Math.floor(Math.random() * y), n = !1;
3229
+ for (var r = 0; r < t; r++) if (m[r] == e) {
3230
+ n = !0;
3231
+ break;
3232
+ }
3233
+ if (!n) m[t] = e, t++;
3234
+ else continue;
3235
+ }
3236
+ }, D = function(e, t, n) {
3237
+ for (var r = [], i = 0, a = 0, o = 0, s = void 0, c = [], u = 0, f = 1, p = 0; p < y; p++) c[p] = b;
3238
+ for (r[a] = e, c[e] = 0; a >= i;) {
3239
+ o = r[i++];
3240
+ for (var m = d[o], _ = 0; _ < m.length; _++) s = l.get(m[_]), c[s] == b && (c[s] = c[o] + 1, r[++a] = s);
3241
+ g[o][t] = c[o] * w;
3242
+ }
3243
+ if (n) {
3244
+ for (var v = 0; v < y; v++) g[v][t] < h[v] && (h[v] = g[v][t]);
3245
+ for (var x = 0; x < y; x++) h[x] > u && (u = h[x], f = x);
3246
+ }
3247
+ return f;
3248
+ }, O = function(e) {
3249
+ var t = void 0;
3250
+ if (e) {
3251
+ t = Math.floor(Math.random() * y);
3252
+ for (var n = 0; n < y; n++) h[n] = b;
3253
+ for (var r = 0; r < T; r++) m[r] = t, t = D(t, r, e);
3254
+ } else {
3255
+ E();
3256
+ for (var i = 0; i < T; i++) D(m[i], i, e, !1);
3257
+ }
3258
+ for (var a = 0; a < y; a++) for (var o = 0; o < T; o++) g[a][o] *= g[a][o];
3259
+ for (var s = 0; s < T; s++) _[s] = [];
3260
+ for (var c = 0; c < T; c++) for (var l = 0; l < T; l++) _[c][l] = g[m[l]][c];
3261
+ }, k = function() {
3262
+ for (var e = a.svd(_), t = e.S, n = e.U, r = e.V, o = t[0] * t[0] * t[0], s = [], c = 0; c < T; c++) {
3263
+ s[c] = [];
3264
+ for (var l = 0; l < T; l++) s[c][l] = 0, c == l && (s[c][l] = t[c] / (t[c] * t[c] + o / (t[c] * t[c])));
3265
+ }
3266
+ v = i.multMat(i.multMat(r, s), i.transpose(n));
3267
+ }, A = function() {
3268
+ for (var e = void 0, t = void 0, n = [], r = [], a = [], o = [], s = 0; s < y; s++) n[s] = Math.random(), r[s] = Math.random();
3269
+ n = i.normalize(n), r = i.normalize(r);
3270
+ for (var c = 0, l = x, u = x, d = void 0;;) {
3271
+ c++;
3272
+ for (var m = 0; m < y; m++) a[m] = n[m];
3273
+ if (n = i.multGamma(i.multL(i.multGamma(a), g, v)), e = i.dotProduct(a, n), n = i.normalize(n), l = i.dotProduct(a, n), d = Math.abs(l / u), d <= 1 + S && d >= 1) break;
3274
+ u = l;
3275
+ }
3276
+ for (var h = 0; h < y; h++) a[h] = n[h];
3277
+ for (c = 0, u = x;;) {
3278
+ c++;
3279
+ for (var _ = 0; _ < y; _++) o[_] = r[_];
3280
+ if (o = i.minusOp(o, i.multCons(a, i.dotProduct(a, o))), r = i.multGamma(i.multL(i.multGamma(o), g, v)), t = i.dotProduct(o, r), r = i.normalize(r), l = i.dotProduct(o, r), d = Math.abs(l / u), d <= 1 + S && d >= 1) break;
3281
+ u = l;
3282
+ }
3283
+ for (var b = 0; b < y; b++) o[b] = r[b];
3284
+ f = i.multCons(a, Math.sqrt(Math.abs(e))), p = i.multCons(o, Math.sqrt(Math.abs(t)));
3285
+ };
3286
+ r.connectComponents(t, n, r.getTopMostNodes(o), c), s.forEach(function(e) {
3287
+ r.connectComponents(t, n, r.getTopMostNodes(e.descendants().intersection(n)), c);
3288
+ });
3289
+ for (var j = 0, M = 0; M < o.length; M++) o[M].isParent() || l.set(o[M].id(), j++);
3290
+ var N = !0, P = !1, ee = void 0;
3291
+ try {
3292
+ for (var F = c.keys()[Symbol.iterator](), I; !(N = (I = F.next()).done); N = !0) {
3293
+ var L = I.value;
3294
+ l.set(L, j++);
3295
+ }
3296
+ } catch (e) {
3297
+ P = !0, ee = e;
3298
+ } finally {
3299
+ try {
3300
+ !N && F.return && F.return();
3301
+ } finally {
3302
+ if (P) throw ee;
3303
+ }
3304
+ }
3305
+ for (var R = 0; R < l.size; R++) d[R] = [];
3306
+ s.forEach(function(e) {
3307
+ for (var t = e.children().intersection(n); t.nodes(":childless").length == 0;) t = t.nodes()[0].children().intersection(n);
3308
+ var r = 0, i = t.nodes(":childless")[0].connectedEdges().length;
3309
+ t.nodes(":childless").forEach(function(e, t) {
3310
+ e.connectedEdges().length < i && (i = e.connectedEdges().length, r = t);
3311
+ }), u.set(e.id(), t.nodes(":childless")[r].id());
3312
+ }), o.forEach(function(e) {
3313
+ var t = void 0;
3314
+ t = e.isParent() ? l.get(u.get(e.id())) : l.get(e.id()), e.neighborhood().nodes().forEach(function(r) {
3315
+ n.intersection(e.edgesWith(r)).length > 0 && (r.isParent() ? d[t].push(u.get(r.id())) : d[t].push(r.id()));
3316
+ });
3317
+ });
3318
+ var z = function(e) {
3319
+ var n = l.get(e), r = void 0;
3320
+ c.get(e).forEach(function(i) {
3321
+ r = t.getElementById(i).isParent() ? u.get(i) : i, d[n].push(r), d[l.get(r)].push(e);
3322
+ });
3323
+ }, B = !0, V = !1, te = void 0;
3324
+ try {
3325
+ for (var H = c.keys()[Symbol.iterator](), ne; !(B = (ne = H.next()).done); B = !0) {
3326
+ var re = ne.value;
3327
+ z(re);
3328
+ }
3329
+ } catch (e) {
3330
+ V = !0, te = e;
3331
+ } finally {
3332
+ try {
3333
+ !B && H.return && H.return();
3334
+ } finally {
3335
+ if (V) throw te;
3336
+ }
3337
+ }
3338
+ y = l.size;
3339
+ var U = void 0;
3340
+ if (y > 2) {
3341
+ T = y < e.sampleSize ? y : e.sampleSize;
3342
+ for (var W = 0; W < y; W++) g[W] = [];
3343
+ for (var G = 0; G < T; G++) v[G] = [];
3344
+ return e.quality == "draft" || e.step == "all" ? (O(C), k(), A(), U = {
3345
+ nodeIndexes: l,
3346
+ xCoords: f,
3347
+ yCoords: p
3348
+ }) : (l.forEach(function(e, n) {
3349
+ f.push(t.getElementById(n).position("x")), p.push(t.getElementById(n).position("y"));
3350
+ }), U = {
3351
+ nodeIndexes: l,
3352
+ xCoords: f,
3353
+ yCoords: p
3354
+ }), U;
3355
+ } else {
3356
+ var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), J = K.outerWidth();
3357
+ if (f.push(q.x), p.push(q.y), y == 2) {
3358
+ var Y = t.getElementById(ie.next().value).outerWidth();
3359
+ f.push(q.x + J / 2 + Y / 2 + e.idealEdgeLength), p.push(q.y);
3360
+ }
3361
+ return U = {
3362
+ nodeIndexes: l,
3363
+ xCoords: f,
3364
+ yCoords: p
3365
+ }, U;
3366
+ }
3367
+ } };
3368
+ }),
3369
+ 579: ((e, t, n) => {
3370
+ var r = n(212), i = function(e) {
3371
+ e && e("layout", "fcose", r);
3372
+ };
3373
+ typeof cytoscape < "u" && i(cytoscape), e.exports = i;
3374
+ }),
3375
+ 140: ((t) => {
3376
+ t.exports = e;
3377
+ })
3378
+ }, n = {};
3379
+ function r(e) {
3380
+ var i = n[e];
3381
+ if (i !== void 0) return i.exports;
3382
+ var a = n[e] = { exports: {} };
3383
+ return t[e](a, a.exports, r), a.exports;
3384
+ }
3385
+ return r(579);
3386
+ })();
3387
+ });
3388
+ })))(), 1), j, M = {
3389
+ L: "left",
3390
+ R: "right",
3391
+ T: "top",
3392
+ B: "bottom"
3393
+ }, N = {
3394
+ L: /* @__PURE__ */ i((e) => `${e},${e / 2} 0,${e} 0,0`, "L"),
3395
+ R: /* @__PURE__ */ i((e) => `0,${e / 2} ${e},0 ${e},${e}`, "R"),
3396
+ T: /* @__PURE__ */ i((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
3397
+ B: /* @__PURE__ */ i((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
3398
+ }, P = {
3399
+ L: /* @__PURE__ */ i((e, t) => e - t + 2, "L"),
3400
+ R: /* @__PURE__ */ i((e, t) => e - 2, "R"),
3401
+ T: /* @__PURE__ */ i((e, t) => e - t + 2, "T"),
3402
+ B: /* @__PURE__ */ i((e, t) => e - 2, "B")
3403
+ }, ee = /* @__PURE__ */ i(function(e) {
3404
+ return I(e) ? e === "L" ? "R" : "L" : e === "T" ? "B" : "T";
3405
+ }, "getOppositeArchitectureDirection"), F = /* @__PURE__ */ i(function(e) {
3406
+ let t = e;
3407
+ return t === "L" || t === "R" || t === "T" || t === "B";
3408
+ }, "isArchitectureDirection"), I = /* @__PURE__ */ i(function(e) {
3409
+ let t = e;
3410
+ return t === "L" || t === "R";
3411
+ }, "isArchitectureDirectionX"), L = /* @__PURE__ */ i(function(e) {
3412
+ let t = e;
3413
+ return t === "T" || t === "B";
3414
+ }, "isArchitectureDirectionY"), R = /* @__PURE__ */ i(function(e, t) {
3415
+ let n = I(e) && L(t), r = L(e) && I(t);
3416
+ return n || r;
3417
+ }, "isArchitectureDirectionXY"), z = /* @__PURE__ */ i(function(e) {
3418
+ let t = e[0], n = e[1], r = I(t) && L(n), i = L(t) && I(n);
3419
+ return r || i;
3420
+ }, "isArchitecturePairXY"), B = /* @__PURE__ */ i(function(e) {
3421
+ return e !== "LL" && e !== "RR" && e !== "TT" && e !== "BB";
3422
+ }, "isValidArchitectureDirectionPair"), V = /* @__PURE__ */ i(function(e, t) {
3423
+ let n = `${e}${t}`;
3424
+ return B(n) ? n : void 0;
3425
+ }, "getArchitectureDirectionPair"), te = /* @__PURE__ */ i(function([e, t], n) {
3426
+ let r = n[0], i = n[1];
3427
+ return I(r) ? L(i) ? [e + (r === "L" ? -1 : 1), t + (i === "T" ? 1 : -1)] : [e + (r === "L" ? -1 : 1), t] : I(i) ? [e + (i === "L" ? 1 : -1), t + (r === "T" ? 1 : -1)] : [e, t + (r === "T" ? 1 : -1)];
3428
+ }, "shiftPositionByArchitectureDirectionPair"), H = /* @__PURE__ */ i(function(e) {
3429
+ return e === "LT" || e === "TL" ? [1, 1] : e === "BL" || e === "LB" ? [1, -1] : e === "BR" || e === "RB" ? [-1, -1] : [-1, 1];
3430
+ }, "getArchitectureDirectionXYFactors"), ne = /* @__PURE__ */ i(function(e, t) {
3431
+ return R(e, t) ? "bend" : I(e) ? "horizontal" : "vertical";
3432
+ }, "getArchitectureDirectionAlignment"), re = /* @__PURE__ */ i(function(e) {
3433
+ return e.type === "service";
3434
+ }, "isArchitectureService"), U = /* @__PURE__ */ i(function(e) {
3435
+ return e.type === "junction";
3436
+ }, "isArchitectureJunction"), W = /* @__PURE__ */ i((e) => e.data(), "edgeData"), G = /* @__PURE__ */ i((e) => e.data(), "nodeData"), ie = h.architecture, K = (j = class {
3437
+ constructor() {
3438
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.diagramId = "", this.setAccTitle = u, this.getAccTitle = g, this.setDiagramTitle = d, this.getDiagramTitle = s, this.getAccDescription = f, this.setAccDescription = o, this.clear();
3439
+ }
3440
+ setDiagramId(e) {
3441
+ this.diagramId = e;
3442
+ }
3443
+ getDiagramId() {
3444
+ return this.diagramId;
3445
+ }
3446
+ clear() {
3447
+ this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", p();
3448
+ }
3449
+ addService({ id: e, icon: t, in: n, title: r, iconText: i }) {
3450
+ if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
3451
+ if (n !== void 0) {
3452
+ if (e === n) throw Error(`The service [${e}] cannot be placed within itself`);
3453
+ if (this.registeredIds[n] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
3454
+ if (this.registeredIds[n] === "node") throw Error(`The service [${e}]'s parent is not a group`);
3455
+ }
3456
+ this.registeredIds[e] = "node", this.nodes[e] = {
3457
+ id: e,
3458
+ type: "service",
3459
+ icon: t,
3460
+ iconText: i,
3461
+ title: r,
3462
+ edges: [],
3463
+ in: n
3464
+ };
3465
+ }
3466
+ getServices() {
3467
+ return Object.values(this.nodes).filter(re);
3468
+ }
3469
+ addJunction({ id: e, in: t }) {
3470
+ if (this.registeredIds[e] !== void 0) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);
3471
+ if (t !== void 0) {
3472
+ if (e === t) throw Error(`The junction [${e}] cannot be placed within itself`);
3473
+ if (this.registeredIds[t] === void 0) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
3474
+ if (this.registeredIds[t] === "node") throw Error(`The junction [${e}]'s parent is not a group`);
3475
+ }
3476
+ this.registeredIds[e] = "node", this.nodes[e] = {
3477
+ id: e,
3478
+ type: "junction",
3479
+ edges: [],
3480
+ in: t
3481
+ };
3482
+ }
3483
+ getJunctions() {
3484
+ return Object.values(this.nodes).filter(U);
3485
+ }
3486
+ getNodes() {
3487
+ return Object.values(this.nodes);
3488
+ }
3489
+ getNode(e) {
3490
+ var t;
3491
+ return (t = this.nodes[e]) == null ? null : t;
3492
+ }
3493
+ addGroup({ id: e, icon: t, in: n, title: r }) {
3494
+ var i;
3495
+ if (((i = this.registeredIds) == null ? void 0 : i[e]) !== void 0) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);
3496
+ if (n !== void 0) {
3497
+ var a, o;
3498
+ if (e === n) throw Error(`The group [${e}] cannot be placed within itself`);
3499
+ if (((a = this.registeredIds) == null ? void 0 : a[n]) === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
3500
+ if (((o = this.registeredIds) == null ? void 0 : o[n]) === "node") throw Error(`The group [${e}]'s parent is not a group`);
3501
+ }
3502
+ this.registeredIds[e] = "group", this.groups[e] = {
3503
+ id: e,
3504
+ icon: t,
3505
+ title: r,
3506
+ in: n
3507
+ };
3508
+ }
3509
+ getGroups() {
3510
+ return Object.values(this.groups);
3511
+ }
3512
+ addEdge({ lhsId: e, rhsId: t, lhsDir: n, rhsDir: r, lhsInto: i, rhsInto: a, lhsGroup: o, rhsGroup: s, title: c }) {
3513
+ if (!F(n)) throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);
3514
+ if (!F(r)) throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);
3515
+ if (this.nodes[e] === void 0 && this.groups[e] === void 0) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3516
+ if (this.nodes[t] === void 0 && this.groups[t] === void 0) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3517
+ let l = this.nodes[e].in, u = this.nodes[t].in;
3518
+ if (o && l && u && l == u) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3519
+ if (s && l && u && l == u) throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3520
+ let d = {
3521
+ lhsId: e,
3522
+ lhsDir: n,
3523
+ lhsInto: i,
3524
+ lhsGroup: o,
3525
+ rhsId: t,
3526
+ rhsDir: r,
3527
+ rhsInto: a,
3528
+ rhsGroup: s,
3529
+ title: c
3530
+ };
3531
+ this.edges.push(d), this.nodes[e] && this.nodes[t] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[t].edges.push(this.edges[this.edges.length - 1]));
3532
+ }
3533
+ getEdges() {
3534
+ return this.edges;
3535
+ }
3536
+ getDataStructures() {
3537
+ if (this.dataStructures === void 0) {
3538
+ let e = {}, t = Object.entries(this.nodes).reduce((t, [n, r]) => (t[n] = r.edges.reduce((t, r) => {
3539
+ var i, a;
3540
+ let o = (i = this.getNode(r.lhsId)) == null ? void 0 : i.in, s = (a = this.getNode(r.rhsId)) == null ? void 0 : a.in;
3541
+ if (o && s && o !== s) {
3542
+ let t = ne(r.lhsDir, r.rhsDir);
3543
+ t !== "bend" && (e[o] != null || (e[o] = {}), e[o][s] = t, e[s] != null || (e[s] = {}), e[s][o] = t);
3544
+ }
3545
+ if (r.lhsId === n) {
3546
+ let e = V(r.lhsDir, r.rhsDir);
3547
+ e && (t[e] = r.rhsId);
3548
+ } else {
3549
+ let e = V(r.rhsDir, r.lhsDir);
3550
+ e && (t[e] = r.lhsId);
3551
+ }
3552
+ return t;
3553
+ }, {}), t), {}), r = Object.keys(t)[0], a = { [r]: 1 }, o = Object.keys(t).reduce((e, t) => t === r ? e : n(n({}, e), {}, { [t]: 1 }), {}), s = /* @__PURE__ */ i((e) => {
3554
+ let n = { [e]: [0, 0] }, r = [e];
3555
+ for (; r.length > 0;) {
3556
+ let e = r.shift();
3557
+ if (e) {
3558
+ a[e] = 1, delete o[e];
3559
+ let i = t[e], [s, c] = n[e];
3560
+ Object.entries(i).forEach(([e, t]) => {
3561
+ a[t] || (n[t] = te([s, c], e), r.push(t));
3562
+ });
3563
+ }
3564
+ }
3565
+ return n;
3566
+ }, "BFS"), c = [s(r)];
3567
+ for (; Object.keys(o).length > 0;) c.push(s(Object.keys(o)[0]));
3568
+ this.dataStructures = {
3569
+ adjList: t,
3570
+ spatialMaps: c,
3571
+ groupAlignments: e
3572
+ };
3573
+ }
3574
+ return this.dataStructures;
3575
+ }
3576
+ setElementForId(e, t) {
3577
+ this.elements[e] = t;
3578
+ }
3579
+ getElementById(e) {
3580
+ return this.elements[e];
3581
+ }
3582
+ getConfig() {
3583
+ return v(n(n({}, ie), _().architecture));
3584
+ }
3585
+ getConfigField(e) {
3586
+ return this.getConfig()[e];
3587
+ }
3588
+ }, i(j, "ArchitectureDB"), j), q = /* @__PURE__ */ i((e, t) => {
3589
+ T(e, t), e.groups.map((e) => t.addGroup(e)), e.services.map((e) => t.addService(n(n({}, e), {}, { type: "service" }))), e.junctions.map((e) => t.addJunction(n(n({}, e), {}, { type: "junction" }))), e.edges.map((e) => t.addEdge(e));
3590
+ }, "populateDb"), J = {
3591
+ parser: { yy: void 0 },
3592
+ parse: /* @__PURE__ */ i(async (e) => {
3593
+ var t;
3594
+ let n = await E("architecture", e);
3595
+ r.debug(n);
3596
+ let i = (t = J.parser) == null ? void 0 : t.yy;
3597
+ if (!(i instanceof K)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
3598
+ q(n, i);
3599
+ }, "parse")
3600
+ }, Y = /* @__PURE__ */ i((e) => `
3601
+ .edge {
3602
+ stroke-width: ${e.archEdgeWidth};
3603
+ stroke: ${e.archEdgeColor};
3604
+ fill: none;
3605
+ }
3606
+
3607
+ .arrow {
3608
+ fill: ${e.archEdgeArrowColor};
3609
+ }
3610
+
3611
+ .node-bkg {
3612
+ fill: none;
3613
+ stroke: ${e.archGroupBorderColor};
3614
+ stroke-width: ${e.archGroupBorderWidth};
3615
+ stroke-dasharray: 8;
3616
+ }
3617
+ .node-icon-text {
3618
+ display: flex;
3619
+ align-items: center;
3620
+ }
3621
+
3622
+ .node-icon-text > div {
3623
+ color: #fff;
3624
+ margin: 1px;
3625
+ height: fit-content;
3626
+ text-align: center;
3627
+ overflow: hidden;
3628
+ display: -webkit-box;
3629
+ -webkit-box-orient: vertical;
3630
+ }
3631
+ `, "getStyles"), X = /* @__PURE__ */ i((e) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`, "wrapIcon"), Z = {
3632
+ prefix: "mermaid-architecture",
3633
+ height: 80,
3634
+ width: 80,
3635
+ icons: {
3636
+ database: { body: X("<path id=\"b\" data-name=\"4\" d=\"m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"c\" data-name=\"3\" d=\"m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"d\" data-name=\"2\" d=\"m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse id=\"e\" data-name=\"1\" cx=\"40\" cy=\"22.14\" rx=\"20\" ry=\"7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"20\" y1=\"57.86\" x2=\"20\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"60\" y1=\"57.86\" x2=\"60\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3637
+ server: { body: X("<rect x=\"17.5\" y=\"17.5\" width=\"45\" height=\"45\" rx=\"2\" ry=\"2\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"32.5\" x2=\"62.5\" y2=\"32.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"47.5\" x2=\"62.5\" y2=\"47.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><g><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g>") },
3638
+ disk: { body: X("<rect x=\"20\" y=\"15\" width=\"40\" height=\"50\" rx=\"1\" ry=\"1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"14\" ry=\"14.58\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"4\" ry=\"4.17\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z\" style=\"fill: #fff; stroke-width: 0px;\"/>") },
3639
+ internet: { body: X("<circle cx=\"40\" cy=\"40\" r=\"22.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"40\" y1=\"17.5\" x2=\"40\" y2=\"62.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"40\" x2=\"62.5\" y2=\"40\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"30.1\" x2=\"60.25\" y2=\"30.1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"49.9\" x2=\"60.25\" y2=\"49.9\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3640
+ cloud: { body: X("<path d=\"m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3641
+ unknown: x,
3642
+ blank: { body: X("") }
3643
+ }
3644
+ }, ae = /* @__PURE__ */ i(async function(e, t, n, r) {
3645
+ let i = n.getConfigField("padding"), a = n.getConfigField("iconSize"), o = a / 2, s = a / 6, c = s / 2;
3646
+ await Promise.all(t.edges().map(async (t) => {
3647
+ var a, l;
3648
+ let { source: u, sourceDir: d, sourceArrow: f, sourceGroup: p, target: h, targetDir: g, targetArrow: _, targetGroup: v, label: b } = W(t), { x, y: S } = t[0].sourceEndpoint(), { x: w, y: T } = t[0].midpoint(), { x: E, y: D } = t[0].targetEndpoint(), O = i + 4;
3649
+ if (p && (I(d) ? x += d === "L" ? -O : O : S += d === "T" ? -O : O + 18), v && (I(g) ? E += g === "L" ? -O : O : D += g === "T" ? -O : O + 18), !p && ((a = n.getNode(u)) == null ? void 0 : a.type) === "junction" && (I(d) ? x += d === "L" ? o : -o : S += d === "T" ? o : -o), !v && ((l = n.getNode(h)) == null ? void 0 : l.type) === "junction" && (I(g) ? E += g === "L" ? o : -o : D += g === "T" ? o : -o), t[0]._private.rscratch) {
3650
+ let t = e.insert("g");
3651
+ if (t.insert("path").attr("d", `M ${x},${S} L ${w},${T} L${E},${D} `).attr("class", "edge").attr("id", `${r}-${y(u, h, { prefix: "L" })}`), f) {
3652
+ let e = I(d) ? P[d](x, s) : x - c, n = L(d) ? P[d](S, s) : S - c;
3653
+ t.insert("polygon").attr("points", N[d](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3654
+ }
3655
+ if (_) {
3656
+ let e = I(g) ? P[g](E, s) : E - c, n = L(g) ? P[g](D, s) : D - c;
3657
+ t.insert("polygon").attr("points", N[g](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3658
+ }
3659
+ if (b) {
3660
+ let e = R(d, g) ? "XY" : I(d) ? "X" : "Y", n = 0;
3661
+ n = e === "X" ? Math.abs(x - E) : e === "Y" ? Math.abs(S - D) / 1.5 : Math.abs(x - E) / 2;
3662
+ let r = t.append("g");
3663
+ if (await C(r, b, {
3664
+ useHtmlLabels: !1,
3665
+ width: n,
3666
+ classes: "architecture-service-label"
3667
+ }, m()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + w + ", " + T + ")");
3668
+ else if (e === "Y") r.attr("transform", "translate(" + w + ", " + T + ") rotate(-90)");
3669
+ else if (e === "XY") {
3670
+ let e = V(d, g);
3671
+ if (e && z(e)) {
3672
+ let t = r.node().getBoundingClientRect(), [n, i] = H(e);
3673
+ r.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * n * i * 45})`);
3674
+ let a = r.node().getBoundingClientRect();
3675
+ r.attr("transform", `
3676
+ translate(${w}, ${T - t.height / 2})
3677
+ translate(${n * a.width / 2}, ${i * a.height / 2})
3678
+ rotate(${-1 * n * i * 45}, 0, ${t.height / 2})
3679
+ `);
3680
+ }
3681
+ }
3682
+ }
3683
+ }
3684
+ }));
3685
+ }, "drawEdges"), Q = /* @__PURE__ */ i(async function(e, t, n, r) {
3686
+ let i = n.getConfigField("padding") * .75, a = n.getConfigField("fontSize"), o = n.getConfigField("iconSize") / 2;
3687
+ await Promise.all(t.nodes().map(async (t) => {
3688
+ let s = G(t);
3689
+ if (s.type === "group") {
3690
+ let { h: c, w: l, x1: u, y1: d } = t.boundingBox(), f = e.append("rect");
3691
+ f.attr("id", `${r}-group-${s.id}`).attr("x", u + o).attr("y", d + o).attr("width", l).attr("height", c).attr("class", "node-bkg");
3692
+ let p = e.append("g"), h = u, g = d;
3693
+ if (s.icon) {
3694
+ let e = p.append("g");
3695
+ e.html(`<g>${await w(s.icon, {
3696
+ height: i,
3697
+ width: i,
3698
+ fallbackPrefix: Z.prefix
3699
+ })}</g>`), e.attr("transform", "translate(" + (h + o + 1) + ", " + (g + o + 1) + ")"), h += i, g += a / 2 - 1 - 2;
3700
+ }
3701
+ if (s.label) {
3702
+ let e = p.append("g");
3703
+ await C(e, s.label, {
3704
+ useHtmlLabels: !1,
3705
+ width: l,
3706
+ classes: "architecture-service-label"
3707
+ }, m()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (h + o + 4) + ", " + (g + o + 2) + ")");
3708
+ }
3709
+ n.setElementForId(s.id, f);
3710
+ }
3711
+ }));
3712
+ }, "drawGroups"), oe = /* @__PURE__ */ i(async function(e, t, n, r) {
3713
+ let i = m();
3714
+ for (let o of n) {
3715
+ let n = t.append("g"), s = e.getConfigField("iconSize");
3716
+ if (o.title) {
3717
+ let e = n.append("g");
3718
+ await C(e, o.title, {
3719
+ useHtmlLabels: !1,
3720
+ width: s * 1.5,
3721
+ classes: "architecture-service-label"
3722
+ }, i), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + s / 2 + ", " + s + ")");
3723
+ }
3724
+ let c = n.append("g");
3725
+ if (o.icon) c.html(`<g>${await w(o.icon, {
3726
+ height: s,
3727
+ width: s,
3728
+ fallbackPrefix: Z.prefix
3729
+ })}</g>`);
3730
+ else if (o.iconText) {
3731
+ var a;
3732
+ c.html(`<g>${await w("blank", {
3733
+ height: s,
3734
+ width: s,
3735
+ fallbackPrefix: Z.prefix
3736
+ })}</g>`);
3737
+ let e = c.append("g").append("foreignObject").attr("width", s).attr("height", s).append("div").attr("class", "node-icon-text").attr("style", `height: ${s}px;`).append("div").html(l(o.iconText, i)), t = (a = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, ""))) == null ? 16 : a;
3738
+ e.attr("style", `-webkit-line-clamp: ${Math.floor((s - 2) / t)};`);
3739
+ } else c.append("path").attr("class", "node-bkg").attr("id", `${r}-node-${o.id}`).attr("d", `M0,${s} V5 Q0,0 5,0 H${s - 5} Q${s},0 ${s},5 V${s} Z`);
3740
+ n.attr("id", `${r}-service-${o.id}`).attr("class", "architecture-service");
3741
+ let { width: u, height: d } = n.node().getBBox();
3742
+ o.width = u, o.height = d, e.setElementForId(o.id, n);
3743
+ }
3744
+ return 0;
3745
+ }, "drawServices"), se = /* @__PURE__ */ i(function(e, t, n, r) {
3746
+ n.forEach((n) => {
3747
+ let i = t.append("g"), a = e.getConfigField("iconSize");
3748
+ i.append("g").append("rect").attr("id", `${r}-node-${n.id}`).attr("fill-opacity", "0").attr("width", a).attr("height", a), i.attr("class", "architecture-junction");
3749
+ let { width: o, height: s } = i._groups[0][0].getBBox();
3750
+ i.width = o, i.height = s, e.setElementForId(n.id, i);
3751
+ });
3752
+ }, "drawJunctions");
3753
+ S([{
3754
+ name: Z.prefix,
3755
+ icons: Z
3756
+ }]), D.use(A.default);
3757
+ function ce(e, t, n) {
3758
+ e.forEach((e) => {
3759
+ t.add({
3760
+ group: "nodes",
3761
+ data: {
3762
+ type: "service",
3763
+ id: e.id,
3764
+ icon: e.icon,
3765
+ label: e.title,
3766
+ parent: e.in,
3767
+ width: n.getConfigField("iconSize"),
3768
+ height: n.getConfigField("iconSize")
3769
+ },
3770
+ classes: "node-service"
3771
+ });
3772
+ });
3773
+ }
3774
+ i(ce, "addServices");
3775
+ function le(e, t, n) {
3776
+ e.forEach((e) => {
3777
+ t.add({
3778
+ group: "nodes",
3779
+ data: {
3780
+ type: "junction",
3781
+ id: e.id,
3782
+ parent: e.in,
3783
+ width: n.getConfigField("iconSize"),
3784
+ height: n.getConfigField("iconSize")
3785
+ },
3786
+ classes: "node-junction"
3787
+ });
3788
+ });
3789
+ }
3790
+ i(le, "addJunctions");
3791
+ function ue(e, t) {
3792
+ t.nodes().map((t) => {
3793
+ let n = G(t);
3794
+ n.type !== "group" && (n.x = t.position().x, n.y = t.position().y, e.getElementById(n.id).attr("transform", "translate(" + (n.x || 0) + "," + (n.y || 0) + ")"));
3795
+ });
3796
+ }
3797
+ i(ue, "positionNodes");
3798
+ function de(e, t) {
3799
+ e.forEach((e) => {
3800
+ t.add({
3801
+ group: "nodes",
3802
+ data: {
3803
+ type: "group",
3804
+ id: e.id,
3805
+ icon: e.icon,
3806
+ label: e.title,
3807
+ parent: e.in
3808
+ },
3809
+ classes: "node-group"
3810
+ });
3811
+ });
3812
+ }
3813
+ i(de, "addGroups");
3814
+ function fe(e, t) {
3815
+ e.forEach((e) => {
3816
+ let { lhsId: n, rhsId: r, lhsInto: i, lhsGroup: a, rhsInto: o, lhsDir: s, rhsDir: c, rhsGroup: l, title: u } = e, d = R(e.lhsDir, e.rhsDir) ? "segments" : "straight", f = {
3817
+ id: `${n}-${r}`,
3818
+ label: u,
3819
+ source: n,
3820
+ sourceDir: s,
3821
+ sourceArrow: i,
3822
+ sourceGroup: a,
3823
+ sourceEndpoint: s === "L" ? "0 50%" : s === "R" ? "100% 50%" : s === "T" ? "50% 0" : "50% 100%",
3824
+ target: r,
3825
+ targetDir: c,
3826
+ targetArrow: o,
3827
+ targetGroup: l,
3828
+ targetEndpoint: c === "L" ? "0 50%" : c === "R" ? "100% 50%" : c === "T" ? "50% 0" : "50% 100%"
3829
+ };
3830
+ t.add({
3831
+ group: "edges",
3832
+ data: f,
3833
+ classes: d
3834
+ });
3835
+ });
3836
+ }
3837
+ i(fe, "addEdges");
3838
+ function pe(e, t, n) {
3839
+ let r = /* @__PURE__ */ i((e, t) => Object.entries(e).reduce((e, [r, i]) => {
3840
+ let a = 0, o = Object.entries(i);
3841
+ if (o.length === 1) return e[r] = o[0][1], e;
3842
+ for (let i = 0; i < o.length - 1; i++) for (let c = i + 1; c < o.length; c++) {
3843
+ var s;
3844
+ let [l, u] = o[i], [d, f] = o[c];
3845
+ if (((s = n[l]) == null ? void 0 : s[d]) === t) e[r] != null || (e[r] = []), e[r] = [
3846
+ ...e[r],
3847
+ ...u,
3848
+ ...f
3849
+ ];
3850
+ else if (l === "default" || d === "default") e[r] != null || (e[r] = []), e[r] = [
3851
+ ...e[r],
3852
+ ...u,
3853
+ ...f
3854
+ ];
3855
+ else {
3856
+ let t = `${r}-${a++}`;
3857
+ e[t] = u;
3858
+ let n = `${r}-${a++}`;
3859
+ e[n] = f;
3860
+ }
3861
+ }
3862
+ return e;
3863
+ }, {}), "flattenAlignments"), [a, o] = t.map((t) => {
3864
+ let n = {}, i = {};
3865
+ return Object.entries(t).forEach(([t, [r, a]]) => {
3866
+ var o, s, c, l;
3867
+ let u = (o = (s = e.getNode(t)) == null ? void 0 : s.in) == null ? "default" : o;
3868
+ n[a] != null || (n[a] = {}), (c = n[a])[u] != null || (c[u] = []), n[a][u].push(t), i[r] != null || (i[r] = {}), (l = i[r])[u] != null || (l[u] = []), i[r][u].push(t);
3869
+ }), {
3870
+ horiz: Object.values(r(n, "horizontal")).filter((e) => e.length > 1),
3871
+ vert: Object.values(r(i, "vertical")).filter((e) => e.length > 1)
3872
+ };
3873
+ }).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]);
3874
+ return {
3875
+ horizontal: a,
3876
+ vertical: o
3877
+ };
3878
+ }
3879
+ i(pe, "getAlignments");
3880
+ function me(e, t) {
3881
+ let n = [], r = /* @__PURE__ */ i((e) => `${e[0]},${e[1]}`, "posToStr"), a = /* @__PURE__ */ i((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
3882
+ return e.forEach((e) => {
3883
+ let i = Object.fromEntries(Object.entries(e).map(([e, t]) => [r(t), e])), o = [r([0, 0])], s = {}, c = {
3884
+ L: [-1, 0],
3885
+ R: [1, 0],
3886
+ T: [0, 1],
3887
+ B: [0, -1]
3888
+ };
3889
+ for (; o.length > 0;) {
3890
+ let e = o.shift();
3891
+ if (e) {
3892
+ s[e] = 1;
3893
+ let l = i[e];
3894
+ if (l) {
3895
+ let u = a(e);
3896
+ Object.entries(c).forEach(([e, a]) => {
3897
+ let c = r([u[0] + a[0], u[1] + a[1]]), d = i[c];
3898
+ d && !s[c] && (o.push(c), n.push({
3899
+ [M[e]]: d,
3900
+ [M[ee(e)]]: l,
3901
+ gap: 1.5 * t.getConfigField("iconSize")
3902
+ }));
3903
+ });
3904
+ }
3905
+ }
3906
+ }
3907
+ }), n;
3908
+ }
3909
+ i(me, "getRelativeConstraints");
3910
+ function he(e, t, n, o, s, { spatialMaps: c, groupAlignments: l }) {
3911
+ return new Promise((u) => {
3912
+ let d = a("body").append("div").attr("id", "cy").attr("style", "display:none"), f = D({
3913
+ container: document.getElementById("cy"),
3914
+ style: [
3915
+ {
3916
+ selector: "edge",
3917
+ style: {
3918
+ "curve-style": "straight",
3919
+ "source-endpoint": "data(sourceEndpoint)",
3920
+ "target-endpoint": "data(targetEndpoint)"
3921
+ }
3922
+ },
3923
+ {
3924
+ selector: "edge[label]",
3925
+ style: { label: "data(label)" }
3926
+ },
3927
+ {
3928
+ selector: "edge.segments",
3929
+ style: {
3930
+ "curve-style": "segments",
3931
+ "segment-weights": "0",
3932
+ "segment-distances": [.5],
3933
+ "edge-distances": "endpoints",
3934
+ "source-endpoint": "data(sourceEndpoint)",
3935
+ "target-endpoint": "data(targetEndpoint)"
3936
+ }
3937
+ },
3938
+ {
3939
+ selector: "node",
3940
+ style: { "compound-sizing-wrt-labels": "include" }
3941
+ },
3942
+ {
3943
+ selector: "node[label]",
3944
+ style: {
3945
+ "text-valign": "bottom",
3946
+ "text-halign": "center",
3947
+ "font-size": `${s.getConfigField("fontSize")}px`
3948
+ }
3949
+ },
3950
+ {
3951
+ selector: ".node-service",
3952
+ style: {
3953
+ label: "data(label)",
3954
+ width: "data(width)",
3955
+ height: "data(height)"
3956
+ }
3957
+ },
3958
+ {
3959
+ selector: ".node-junction",
3960
+ style: {
3961
+ width: "data(width)",
3962
+ height: "data(height)"
3963
+ }
3964
+ },
3965
+ {
3966
+ selector: ".node-group",
3967
+ style: { padding: `${s.getConfigField("padding")}px` }
3968
+ }
3969
+ ],
3970
+ layout: {
3971
+ name: "grid",
3972
+ boundingBox: {
3973
+ x1: 0,
3974
+ x2: 100,
3975
+ y1: 0,
3976
+ y2: 100
3977
+ }
3978
+ }
3979
+ });
3980
+ d.remove(), de(n, f), ce(e, f, s), le(t, f, s), fe(o, f);
3981
+ let p = pe(s, c, l), m = me(c, s), h = f.layout({
3982
+ name: "fcose",
3983
+ quality: "proof",
3984
+ randomize: s.getConfigField("randomize"),
3985
+ styleEnabled: !1,
3986
+ animate: !1,
3987
+ nodeDimensionsIncludeLabels: !1,
3988
+ idealEdgeLength(e) {
3989
+ let [t, n] = e.connectedNodes(), { parent: r } = G(t), { parent: i } = G(n);
3990
+ return r === i ? 1.5 * s.getConfigField("iconSize") : .5 * s.getConfigField("iconSize");
3991
+ },
3992
+ edgeElasticity(e) {
3993
+ let [t, n] = e.connectedNodes(), { parent: r } = G(t), { parent: i } = G(n);
3994
+ return r === i ? .45 : .001;
3995
+ },
3996
+ alignmentConstraint: p,
3997
+ relativePlacementConstraint: m
3998
+ });
3999
+ h.one("layoutstop", () => {
4000
+ function e(e, t, n, r) {
4001
+ let i, a, { x: o, y: s } = e, { x: c, y: l } = t;
4002
+ a = (r - s + (o - n) * (s - l) / (o - c)) / Math.sqrt(1 + ((s - l) / (o - c)) ** 2), i = Math.sqrt((r - s) ** 2 + (n - o) ** 2 - a ** 2);
4003
+ let u = Math.sqrt((c - o) ** 2 + (l - s) ** 2);
4004
+ i /= u;
4005
+ let d = (c - o) * (r - s) - (l - s) * (n - o);
4006
+ switch (!0) {
4007
+ case d >= 0:
4008
+ d = 1;
4009
+ break;
4010
+ case d < 0:
4011
+ d = -1;
4012
+ break;
4013
+ }
4014
+ let f = (c - o) * (n - o) + (l - s) * (r - s);
4015
+ switch (!0) {
4016
+ case f >= 0:
4017
+ f = 1;
4018
+ break;
4019
+ case f < 0:
4020
+ f = -1;
4021
+ break;
4022
+ }
4023
+ return a = Math.abs(a) * d, i *= f, {
4024
+ distances: a,
4025
+ weights: i
4026
+ };
4027
+ }
4028
+ i(e, "getSegmentWeights"), f.startBatch();
4029
+ for (let n of Object.values(f.edges())) {
4030
+ var t;
4031
+ if ((t = n.data) != null && t.call(n)) {
4032
+ let { x: t, y: r } = n.source().position(), { x: i, y: a } = n.target().position();
4033
+ if (t !== i && r !== a) {
4034
+ let t = n.sourceEndpoint(), r = n.targetEndpoint(), { sourceDir: i } = W(n), [a, o] = L(i) ? [t.x, r.y] : [r.x, t.y], { weights: s, distances: c } = e(t, r, a, o);
4035
+ n.style("segment-distances", c), n.style("segment-weights", s);
4036
+ }
4037
+ }
4038
+ }
4039
+ f.endBatch(), h.run();
4040
+ }), h.run(), f.ready((e) => {
4041
+ r.info("Ready", e), u(f);
4042
+ });
4043
+ });
4044
+ }
4045
+ i(he, "layoutArchitecture");
4046
+ var ge = {
4047
+ parser: J,
4048
+ get db() {
4049
+ return new K();
4050
+ },
4051
+ renderer: { draw: /* @__PURE__ */ i(async (e, t, n, r) => {
4052
+ let i = r.db;
4053
+ i.setDiagramId(t);
4054
+ let a = i.getServices(), o = i.getJunctions(), s = i.getGroups(), l = i.getEdges(), u = i.getDataStructures(), d = b(t), f = d.append("g");
4055
+ f.attr("class", "architecture-edges");
4056
+ let p = d.append("g");
4057
+ p.attr("class", "architecture-services");
4058
+ let m = d.append("g");
4059
+ m.attr("class", "architecture-groups"), await oe(i, p, a, t), se(i, p, o, t);
4060
+ let h = await he(a, o, s, l, i, u);
4061
+ await ae(f, h, i, t), await Q(m, h, i, t), ue(i, h), c(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4062
+ }, "draw") },
4063
+ styles: Y
4064
+ };
4065
+ //#endregion
4066
+ export { ge as diagram };