@marimo-team/frontend 0.20.3-dev94 → 0.20.3-dev96

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 (582) hide show
  1. package/dist/assets/{CellStatus-DT32GPB2.js → CellStatus-CofFdpAe.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-BJPiMTXX.js → ConnectedDataExplorerComponent-D0LXEdja.js} +1 -1
  3. package/dist/assets/{DeferredRequestRegistry-TekxUirp.js → DeferredRequestRegistry-CMZsNx4R.js} +1 -1
  4. package/dist/assets/{ImperativeModal-MjC9Owmv.js → ImperativeModal-CRNJOvqT.js} +1 -1
  5. package/dist/assets/{JsonOutput-uf7OFaDU.js → JsonOutput-DKjq8WkX.js} +3 -3
  6. package/dist/assets/LazyAnyLanguageCodeMirror-D8Y5EdeE.js +2 -0
  7. package/dist/assets/{MarimoErrorOutput-BJkHPKWK.js → MarimoErrorOutput-DDEWmSYt.js} +1 -1
  8. package/dist/assets/{RenderHTML-CjCJ1DT4.js → RenderHTML-BKdgJWBR.js} +1 -1
  9. package/dist/assets/{add-cell-with-ai-DJ9tuL4g.js → add-cell-with-ai--93MrwWW.js} +11 -11
  10. package/dist/assets/add-connection-dialog-DwmwDRdR.js +133 -0
  11. package/dist/assets/{agent-panel-DYFbOZ0f.js → agent-panel-C8ZeX_CD.js} +1 -1
  12. package/dist/assets/{ai-model-dropdown-BnQGs6GF.js → ai-model-dropdown-DQy6lXPg.js} +2 -2
  13. package/dist/assets/{alert-dialog-DEeW2awP.js → alert-dialog-DsNfSYaw.js} +1 -1
  14. package/dist/assets/{any-language-editor-gG2nw5Di.js → any-language-editor-BAgyNkKP.js} +1 -1
  15. package/dist/assets/apl-3xKEEmjQ.js +1 -0
  16. package/dist/assets/app-config-button-C_j4LbLr.js +1 -0
  17. package/dist/assets/{architectureDiagram-VXUJARFQ-XoreuVlu.js → architectureDiagram-VXUJARFQ-C6cEIHcZ.js} +1 -1
  18. package/dist/assets/asciiarmor-BCugLX69.js +1 -0
  19. package/dist/assets/asn1-B8ndG_Ze.js +1 -0
  20. package/dist/assets/azure-BOn6W9-m.js +1 -0
  21. package/dist/assets/{blockDiagram-VD42YOAC-D88a3p2S.js → blockDiagram-VD42YOAC-DO4PXhE0.js} +1 -1
  22. package/dist/assets/brainfuck-h1OIoSEo.js +1 -0
  23. package/dist/assets/{c4Diagram-YG6GDRKO-liP4M7aa.js → c4Diagram-YG6GDRKO-CgecOfcG.js} +1 -1
  24. package/dist/assets/{cache-panel-BCMChSTr.js → cache-panel-DRhH4wqG.js} +1 -1
  25. package/dist/assets/{cell-editor-BDJGt0PK.js → cell-editor-B9yTITVj.js} +7 -7
  26. package/dist/assets/{cell-link-CiQrWiPA.js → cell-link-CZP6Kzmf.js} +1 -1
  27. package/dist/assets/{cells-DD42bsu7.js → cells-CigkzIKH.js} +3 -3
  28. package/dist/assets/channel-veQhTJol.js +1 -0
  29. package/dist/assets/{chat-display-DN0dzai8.js → chat-display-C1J9G6Cr.js} +1 -1
  30. package/dist/assets/{chat-panel--gsbOxYb.js → chat-panel-CFDW5ZSi.js} +1 -1
  31. package/dist/assets/{chunk-55IACEB6-Bq5hFuyg.js → chunk-55IACEB6-Du0kncVN.js} +1 -1
  32. package/dist/assets/{chunk-5FQGJX7Z-CKJM3d7z.js → chunk-5FQGJX7Z-XpIxSaxK.js} +3 -3
  33. package/dist/assets/{chunk-ABZYJK2D-B_EusRlI.js → chunk-ABZYJK2D-I6IoK8vx.js} +3 -3
  34. package/dist/assets/{chunk-ATLVNIR6-YSXtuHxk.js → chunk-ATLVNIR6-D9BH6KNI.js} +1 -1
  35. package/dist/assets/{chunk-B4BG7PRW-4H0bTT06.js → chunk-B4BG7PRW-DRGcwRAu.js} +1 -1
  36. package/dist/assets/{chunk-DI55MBZ5-Qa7VdYYC.js → chunk-DI55MBZ5-Drx_rxsy.js} +1 -1
  37. package/dist/assets/{chunk-EXTU4WIE-Dm7JTwJS.js → chunk-EXTU4WIE-eWy-F27y.js} +1 -1
  38. package/dist/assets/{chunk-JA3XYJ7Z-DlWIdoh6.js → chunk-JA3XYJ7Z-CewgnlHS.js} +1 -1
  39. package/dist/assets/{chunk-JZLCHNYA-BjCNnsxN.js → chunk-JZLCHNYA-C66i8G_X.js} +1 -1
  40. package/dist/assets/{chunk-N4CR4FBY-DvejWNHh.js → chunk-N4CR4FBY-C2LW_Vp6.js} +2 -2
  41. package/dist/assets/{chunk-QN33PNHL-D40wYAAe.js → chunk-QN33PNHL-DQKUj-aV.js} +1 -1
  42. package/dist/assets/{chunk-QXUST7PY-CPnoUHx5.js → chunk-QXUST7PY-D0e1KIKP.js} +1 -1
  43. package/dist/assets/{chunk-S3R3BYOJ-BXcnEOaZ.js → chunk-S3R3BYOJ-BhABoI-y.js} +1 -1
  44. package/dist/assets/{chunk-TZMSLE5B-B4dWntTK.js → chunk-TZMSLE5B-B8nFe5cR.js} +1 -1
  45. package/dist/assets/classDiagram-2ON5EDUG-CE34m6Vp.js +1 -0
  46. package/dist/assets/classDiagram-v2-WZHVMYZB-5UcCc04z.js +1 -0
  47. package/dist/assets/{clike-bdcjLdZ4.js → clike-DPuzjNcL.js} +1 -1
  48. package/dist/assets/clojure-yGQavt_D.js +1 -0
  49. package/dist/assets/cmake-yLKyOybp.js +1 -0
  50. package/dist/assets/cobol-C5qkyUSJ.js +1 -0
  51. package/dist/assets/{code-block-37QAKDTI-DfxyEg-6.js → code-block-37QAKDTI-C_PlFQZQ.js} +1 -1
  52. package/dist/assets/coffeescript-CtR3eWCa.js +1 -0
  53. package/dist/assets/{column-preview-BtKDi4j6.js → column-preview-BHAQ5EN7.js} +1 -1
  54. package/dist/assets/{command-2Li9iWG_.js → command-C8WcXqB5.js} +1 -1
  55. package/dist/assets/{command-palette-Ce_7Eh4G.js → command-palette-DzEDXP8h.js} +1 -1
  56. package/dist/assets/{common-BOraucV9.js → common-BsEiWPTg.js} +1 -1
  57. package/dist/assets/commonlisp-D-heOGa1.js +1 -0
  58. package/dist/assets/{components-Bl0CtJtz.js → components-Bis36Fco.js} +1 -1
  59. package/dist/assets/{components-Dv0WjPQ-.js → components-C_r2KU__.js} +1 -1
  60. package/dist/assets/{config-CBwelk8k.js → config-D9X9QKiL.js} +1 -1
  61. package/dist/assets/{context-CRApIvpB.js → context-B1_BdDTF.js} +1 -1
  62. package/dist/assets/{context-aware-panel-DMHGbB_b.js → context-aware-panel-CdVqO_AM.js} +1 -1
  63. package/dist/assets/{copy-icon-HFU_6E8O.js → copy-icon-6RnnFDPt.js} +1 -1
  64. package/dist/assets/{cose-bilkent-S5V4N54A-C5YtuUQc.js → cose-bilkent-S5V4N54A-VDjV6QSR.js} +1 -1
  65. package/dist/assets/crystal-PRx3aORZ.js +1 -0
  66. package/dist/assets/{css-ACAb8MRM.js → css-COQFxLQn.js} +1 -1
  67. package/dist/assets/cypher-whf3KLcn.js +1 -0
  68. package/dist/assets/d-Rxavm_nZ.js +1 -0
  69. package/dist/assets/{dagre-6UL2VRFP-DRNnviF_.js → dagre-6UL2VRFP-DT3YVlhy.js} +1 -1
  70. package/dist/assets/{data-grid-overlay-editor-BEE_UOd2.js → data-grid-overlay-editor-yGRyEuzx.js} +1 -1
  71. package/dist/assets/{datasource-Cturxb4x.js → datasource-B3MFUEL6.js} +1 -1
  72. package/dist/assets/{dates-_ZWMvHpG.js → dates-CzBDvj6R.js} +1 -1
  73. package/dist/assets/{dependency-graph-panel-B8UpJDl-.js → dependency-graph-panel-D4bT9In2.js} +1 -1
  74. package/dist/assets/{diagram-PSM6KHXK-CJ_YTtTV.js → diagram-PSM6KHXK-BLcYlt62.js} +1 -1
  75. package/dist/assets/{diagram-QEK2KX5R-CfHsxOB8.js → diagram-QEK2KX5R-DZlFt2JV.js} +1 -1
  76. package/dist/assets/{diagram-S2PKOQOG-C9iLu9In.js → diagram-S2PKOQOG-C0VzVTxb.js} +1 -1
  77. package/dist/assets/{dialog-D_1x0b57.js → dialog-BXzvlof-.js} +1 -1
  78. package/dist/assets/diff-BuBMfzxS.js +1 -0
  79. package/dist/assets/{dist-BfsJ2nor.js → dist-6ygzAjca.js} +1 -1
  80. package/dist/assets/{dist-Vc8ZMKz4.js → dist-B0_AowCW.js} +1 -1
  81. package/dist/assets/{dist-CLFvKo6g.js → dist-BA8siKK6.js} +1 -1
  82. package/dist/assets/{dist-DTVn6XkJ.js → dist-BMdir9yf.js} +1 -1
  83. package/dist/assets/dist-BRjtiDLy.js +1 -0
  84. package/dist/assets/{dist-CjHEN42s.js → dist-BkKLXyVM.js} +1 -1
  85. package/dist/assets/{dist-CAqJ9n-7.js → dist-BmupR6hJ.js} +1 -1
  86. package/dist/assets/dist-BveopvhJ.js +1 -0
  87. package/dist/assets/dist-Bw5sFnNi.js +1 -0
  88. package/dist/assets/{dist-DcJyOwtT.js → dist-C0GaLmeM.js} +1 -1
  89. package/dist/assets/{dist-CFJh28wG.js → dist-CD1ARvPf.js} +1 -1
  90. package/dist/assets/{dist-DsQvo-tW.js → dist-CIU0Lack.js} +1 -1
  91. package/dist/assets/{dist-BFzRlyBI.js → dist-CRVvx8nD.js} +1 -1
  92. package/dist/assets/{dist-o3bslLiM.js → dist-CTarqYcj.js} +1 -1
  93. package/dist/assets/{dist-VhPaW6Nu.js → dist-CqnPIH_S.js} +1 -1
  94. package/dist/assets/{dist-CCHC36f2.js → dist-CtKltiBh.js} +1 -1
  95. package/dist/assets/dist-CwLG6Za2.js +1 -0
  96. package/dist/assets/dist-D1GHSZQ_.js +1 -0
  97. package/dist/assets/{dist-C83X_psd.js → dist-DArucAWW.js} +1 -1
  98. package/dist/assets/{dist-DjwvucXe.js → dist-DUYSgv8L.js} +1 -1
  99. package/dist/assets/dist-DZhm7iRc.js +1 -0
  100. package/dist/assets/{dist-BOEbbZQx.js → dist-DfBASypd.js} +1 -1
  101. package/dist/assets/dist-DiZV-TgQ.js +1 -0
  102. package/dist/assets/{dist-D-iyTPWR.js → dist-DoVqkx6-.js} +1 -1
  103. package/dist/assets/{dist-DotE4D06.js → dist-Dq_iQ08e.js} +1 -1
  104. package/dist/assets/{dist-Ojy3l4de.js → dist-DwtQnQ8D.js} +1 -1
  105. package/dist/assets/dist-Dz7aLgyk.js +1 -0
  106. package/dist/assets/dist-OAWl1fS6.js +1 -0
  107. package/dist/assets/{dist-YWDQ5GDh.js → dist-gm5AeuIM.js} +1 -1
  108. package/dist/assets/dist-x2aGlNO5.js +1 -0
  109. package/dist/assets/{dockerfile-BaMK2CWc.js → dockerfile-DGts-2Fo.js} +1 -1
  110. package/dist/assets/{documentation-panel-BuGA-sMW.js → documentation-panel-BMnKc5yI.js} +1 -1
  111. package/dist/assets/{download-CmObLKP6.js → download-C35SWaj3.js} +2 -2
  112. package/dist/assets/{dropdown-menu-D9u7_h0R.js → dropdown-menu-CKhrfxsx.js} +1 -1
  113. package/dist/assets/dtd-Byyl3ADK.js +1 -0
  114. package/dist/assets/dylan-zE-fWZ95.js +1 -0
  115. package/dist/assets/ecl-oGqPqdsN.js +1 -0
  116. package/dist/assets/{edit-page-BNA8A6Ux.js → edit-page-BeR5IEJ-.js} +7 -7
  117. package/dist/assets/eiffel-C_tzASKk.js +1 -0
  118. package/dist/assets/elm-DowGsQrq.js +1 -0
  119. package/dist/assets/{erDiagram-Q2GNP2WA-Ci9jIB40.js → erDiagram-Q2GNP2WA-BXdtj02B.js} +1 -1
  120. package/dist/assets/erlang-DXj5Mety.js +1 -0
  121. package/dist/assets/{error-banner-DsP3CCH3.js → error-banner-R2OkQKR0.js} +1 -1
  122. package/dist/assets/{error-panel-CK2L5ciF.js → error-panel-jpJowHuz.js} +1 -1
  123. package/dist/assets/{es-DwwU_CO-.js → es-1hBRXVlM.js} +1 -1
  124. package/dist/assets/{esm-Dm5bJp7V.js → esm-BQUzYly2.js} +1 -1
  125. package/dist/assets/{esm-CqpQNGcZ.js → esm-ByPyfncv.js} +1 -1
  126. package/dist/assets/factor-BBRGvEpt.js +1 -0
  127. package/dist/assets/{factor-C-_cRSDM.js → factor-CkLnJXKV.js} +1 -1
  128. package/dist/assets/{field-Cgpys-pp.js → field-DGtw6Lae.js} +1 -1
  129. package/dist/assets/file-code-D9wtWSiR.js +1 -0
  130. package/dist/assets/file-explorer-panel-BHVDv16o.js +1 -0
  131. package/dist/assets/{floating-outline-BPv4P2vV.js → floating-outline-BxQvjarL.js} +1 -1
  132. package/dist/assets/{flowDiagram-NV44I4VS-CUdl_uoe.js → flowDiagram-NV44I4VS-DX757-U8.js} +1 -1
  133. package/dist/assets/{focus-DiPb_hn6.js → focus-Bci_MkMH.js} +1 -1
  134. package/dist/assets/form-DmsYuKMH.js +2 -0
  135. package/dist/assets/{formats-B4v3ZpGs.js → formats-C3K3rlAZ.js} +1 -1
  136. package/dist/assets/{formatting-BBp_M8-h.js → formatting-8bP-RDnl.js} +1 -1
  137. package/dist/assets/forth-ir5Q2myN.js +1 -0
  138. package/dist/assets/fortran-Ckvuc18T.js +1 -0
  139. package/dist/assets/{gallery-page-Dwy7ttw7.js → gallery-page-BBBIk2lD.js} +1 -1
  140. package/dist/assets/{ganttDiagram-JELNMOA3-D2jWBuvf.js → ganttDiagram-JELNMOA3-BwyL4uqk.js} +1 -1
  141. package/dist/assets/gas-IcbZgopn.js +1 -0
  142. package/dist/assets/gherkin-BUQFbyhq.js +1 -0
  143. package/dist/assets/{gitGraphDiagram-V2S2FVAM-CkEqRLnD.js → gitGraphDiagram-V2S2FVAM-eu9QdpAO.js} +1 -1
  144. package/dist/assets/github-BrsjF9dp.js +1 -0
  145. package/dist/assets/{glide-data-editor-CfedLJF1.js → glide-data-editor-DoJMFmFp.js} +4 -4
  146. package/dist/assets/{globals-Dk7VGE85.js → globals-BIlQtd9Z.js} +1 -1
  147. package/dist/assets/groovy-CPRpPrR6.js +1 -0
  148. package/dist/assets/haskell-BZ64_L1W.js +1 -0
  149. package/dist/assets/haxe-u0gVVSGf.js +1 -0
  150. package/dist/assets/home-page-Dw1bl_Le.js +4 -0
  151. package/dist/assets/html-to-image-DkwDXZ7Q.js +2 -0
  152. package/dist/assets/idl-D6vrTcdT.js +1 -0
  153. package/dist/assets/{index-B-ghuCiq.js → index-D0SHqLyU.js} +9 -9
  154. package/dist/assets/{index-jvqQ7cxf.css → index-DrPzoH7F.css} +1 -1
  155. package/dist/assets/{infoDiagram-HS3SLOUP-Cf_pYPyI.js → infoDiagram-HS3SLOUP-CMZnTs9S.js} +1 -1
  156. package/dist/assets/{input-B49Srsl9.js → input-BPldEXfy.js} +1 -1
  157. package/dist/assets/javascript-DtGa6W6u.js +1 -0
  158. package/dist/assets/{journeyDiagram-XKPGCS4Q-DHw_OuoX.js → journeyDiagram-XKPGCS4Q-Btvq5lIn.js} +1 -1
  159. package/dist/assets/julia-ChDcWdzF.js +1 -0
  160. package/dist/assets/{kanban-definition-3W4ZIXB7-CgJY0dyI.js → kanban-definition-3W4ZIXB7-AW8rZM9d.js} +1 -1
  161. package/dist/assets/katex-YDobqqVd.js +1 -0
  162. package/dist/assets/{kiosk-mode-hbpM_a-j.js → kiosk-mode-BXfU4SPi.js} +1 -1
  163. package/dist/assets/{label-OL3StKg2.js → label-DmqkEXI4.js} +1 -1
  164. package/dist/assets/{layout-D1VtP7GQ.js → layout-Cn07VnUl.js} +3 -3
  165. package/dist/assets/{linear-S_2Z0W1R.js → linear-Dgv6-MEk.js} +1 -1
  166. package/dist/assets/links-syPBpTLO.js +1 -0
  167. package/dist/assets/livescript-D3x57DP6.js +1 -0
  168. package/dist/assets/{logs-panel-CDBBW9DI.js → logs-panel-CNI5XQZv.js} +1 -1
  169. package/dist/assets/{loro_wasm_bg-D0L2fcEg.js → loro_wasm_bg-CvVVQqkx.js} +1 -1
  170. package/dist/assets/lua-CfeyF-5c.js +1 -0
  171. package/dist/assets/{markdown-renderer-YOedNAkc.js → markdown-renderer-DHgbXKHX.js} +4 -4
  172. package/dist/assets/mathematica-CAUFFTVp.js +1 -0
  173. package/dist/assets/mbox-Duq1SQ_k.js +1 -0
  174. package/dist/assets/{menu-items-BpKTKw9I.js → menu-items-Bs2e3wuf.js} +1 -1
  175. package/dist/assets/{mermaid-Dq45ZTSR.js → mermaid-1T_6J8nz.js} +3 -3
  176. package/dist/assets/mermaid-4DMBBIKO-DjCipOuD.js +1 -0
  177. package/dist/assets/{mermaid-parser.core-kXAMYbo2.js → mermaid-parser.core-BSEscn4U.js} +1 -1
  178. package/dist/assets/{mhchem-DYHJI636.js → mhchem-CfNkyXzI.js} +1 -1
  179. package/dist/assets/{mindmap-definition-VGOIOE7T-Dob0y7_P.js → mindmap-definition-VGOIOE7T-BeLI48jR.js} +1 -1
  180. package/dist/assets/mirc-B8ay9N_G.js +1 -0
  181. package/dist/assets/mllike-Cdk-SxrR.js +1 -0
  182. package/dist/assets/modelica-cErGJ40J.js +1 -0
  183. package/dist/assets/mscgen-jRCec7TG.js +1 -0
  184. package/dist/assets/{multi-map-BHEewz4D.js → multi-map-kCmlVJ-5.js} +1 -1
  185. package/dist/assets/mumps-CPuZtknR.js +1 -0
  186. package/dist/assets/{name-cell-input-HEC8dShQ.js → name-cell-input-BVNjrC55.js} +1 -1
  187. package/dist/assets/{nsis-BGZ5EB-j.js → nsis-DLIsIma3.js} +1 -1
  188. package/dist/assets/nsis-ggFWkoqT.js +1 -0
  189. package/dist/assets/ntriples-eQBrW6tI.js +1 -0
  190. package/dist/assets/{number-overlay-editor-knCMh2M3.js → number-overlay-editor-CsBFzyQn.js} +1 -1
  191. package/dist/assets/octave-CcpumlkH.js +1 -0
  192. package/dist/assets/{outline-panel-DzWl_avL.js → outline-panel-DDzSswIl.js} +1 -1
  193. package/dist/assets/oz-D3u6XBI4.js +1 -0
  194. package/dist/assets/{packages-panel-cSLWScXy.js → packages-panel-oV7XPDLu.js} +1 -1
  195. package/dist/assets/{panels-903Vandk.js → panels-OYOPaJTw.js} +1 -1
  196. package/dist/assets/pascal-COvFIqNx.js +1 -0
  197. package/dist/assets/perl-BSxTN_bc.js +1 -0
  198. package/dist/assets/{pieDiagram-ADFJNKIX-CTk6T8fb.js → pieDiagram-ADFJNKIX-CdEk8h7G.js} +1 -1
  199. package/dist/assets/pig-B5SEJPfW.js +1 -0
  200. package/dist/assets/{popover-C7N9RyXk.js → popover-Cvl9xY6R.js} +1 -1
  201. package/dist/assets/powershell-T0AiDBtK.js +1 -0
  202. package/dist/assets/{precisionRound-CCOoIlcP.js → precisionRound-BOmLQIKI.js} +1 -1
  203. package/dist/assets/{process-output-B2WHFsM0.js → process-output-B27UYd5L.js} +1 -1
  204. package/dist/assets/properties-CEyxcWzr.js +1 -0
  205. package/dist/assets/protobuf-BgP8VdyX.js +1 -0
  206. package/dist/assets/pug-D1MIs29p.js +1 -0
  207. package/dist/assets/{pug-CYW0agOo.js → pug-qZYhFFj7.js} +1 -1
  208. package/dist/assets/puppet-DQ0s94I4.js +1 -0
  209. package/dist/assets/python-jVWqyNLt.js +1 -0
  210. package/dist/assets/q-Ddp_9iFq.js +1 -0
  211. package/dist/assets/{quadrantDiagram-AYHSOK5B-BVdFx5wF.js → quadrantDiagram-AYHSOK5B-VU_D3kbi.js} +1 -1
  212. package/dist/assets/r-WnM9HAaQ.js +1 -0
  213. package/dist/assets/react-vega--8ms0ndM.js +1 -0
  214. package/dist/assets/{react-vega-BYVwP1iN.js → react-vega-CfAAc1Op.js} +1 -1
  215. package/dist/assets/{readonly-python-code-XphqxCq8.js → readonly-python-code-CyraFlMm.js} +1 -1
  216. package/dist/assets/{renderShortcut-_nl5_jRy.js → renderShortcut-BJEd-iA7.js} +1 -1
  217. package/dist/assets/{request-registry-D-vPSm0g.js → request-registry-CN4oD1xn.js} +1 -1
  218. package/dist/assets/{requirementDiagram-UZGBJVZJ-DY-OcLwF.js → requirementDiagram-UZGBJVZJ-B_M384Hj.js} +1 -1
  219. package/dist/assets/rpm-Cpb0cYbF.js +1 -0
  220. package/dist/assets/ruby-npoQJqOj.js +1 -0
  221. package/dist/assets/{run-page-DzsjMR6O.js → run-page-DDaD2g7X.js} +1 -1
  222. package/dist/assets/{sankeyDiagram-TZEHDZUN-6t9CRTL3.js → sankeyDiagram-TZEHDZUN-DOz58sVj.js} +1 -1
  223. package/dist/assets/sas-D5R_hCoQ.js +1 -0
  224. package/dist/assets/scheme-oK64G5wG.js +1 -0
  225. package/dist/assets/{scratchpad-panel-DA77C7Q0.js → scratchpad-panel-Bj7X2Na5.js} +1 -1
  226. package/dist/assets/{secrets-panel-CMZi-lXZ.js → secrets-panel-ddOS7gEx.js} +1 -1
  227. package/dist/assets/{select-BRK_BOoG.js → select-DygbgNTD.js} +1 -1
  228. package/dist/assets/{sequenceDiagram-WL72ISMW-BjZ_K9eY.js → sequenceDiagram-WL72ISMW-C4Swv4l1.js} +1 -1
  229. package/dist/assets/session-panel-BCymMoxC.js +1 -0
  230. package/dist/assets/{share-BpyH3qLa.js → share-sD4fbzpH.js} +1 -1
  231. package/dist/assets/shell-D-C8eGy_.js +1 -0
  232. package/dist/assets/sieve-DPRpRdV2.js +1 -0
  233. package/dist/assets/{slides-component-Bf8iP5zM.js → slides-component-uBqtPHL3.js} +1 -1
  234. package/dist/assets/smalltalk-bsl5ZJOd.js +1 -0
  235. package/dist/assets/{snippets-panel-CLQT_rb9.js → snippets-panel-CSczB-sT.js} +1 -1
  236. package/dist/assets/sparql-CJUH6gR2.js +1 -0
  237. package/dist/assets/{spec-CcvA_Vlj.js → spec-Be-iRLAY.js} +1 -1
  238. package/dist/assets/{src-Bp_72rVO.js → src-lcGySDV2.js} +1 -1
  239. package/dist/assets/{state-QwNqaRCk.js → state-B_fNn_z_.js} +1 -1
  240. package/dist/assets/{state-DRCtQIWh.js → state-LFRjhpk7.js} +1 -1
  241. package/dist/assets/{state-C5z8LHqe.js → state-Xu6bDsJl.js} +1 -1
  242. package/dist/assets/{stateDiagram-FKZM4ZOC-NMBeN6_k.js → stateDiagram-FKZM4ZOC-y1h6ccpz.js} +1 -1
  243. package/dist/assets/stateDiagram-v2-4FDKWEC3-BuQ9opQp.js +1 -0
  244. package/dist/assets/stex-pjf-hOob.js +1 -0
  245. package/dist/assets/stylus-Dz-M3k6z.js +1 -0
  246. package/dist/assets/swift-BZHzeogd.js +1 -0
  247. package/dist/assets/{switch-CA8la81g.js → switch-Cp5eQmZx.js} +1 -1
  248. package/dist/assets/tcl-CjjnKQKi.js +1 -0
  249. package/dist/assets/{terminal--Et332AA.js → terminal-Cve2fyoB.js} +1 -1
  250. package/dist/assets/textile-C6DxVHfN.js +1 -0
  251. package/dist/assets/{time-CoU4QCVK.js → time-CW4WrC86.js} +1 -1
  252. package/dist/assets/{timeline-definition-IT6M3QCI-BGiQZTGi.js → timeline-definition-IT6M3QCI-Crfvw3Ai.js} +1 -1
  253. package/dist/assets/{toggle-MO7vjfkt.js → toggle-BhEcsHTu.js} +1 -1
  254. package/dist/assets/toml-DTuUvOIE.js +1 -0
  255. package/dist/assets/{tooltip-oM-h2ZN1.js → tooltip-DOQlecCr.js} +1 -1
  256. package/dist/assets/{tooltip-CcOqovrC.js → tooltip-D_HRHf_c.js} +1 -1
  257. package/dist/assets/{tracing-Bdx3rdWM.js → tracing-DVa-Q9aK.js} +1 -1
  258. package/dist/assets/{tracing-panel-BNSSHFIf.js → tracing-panel-DFqVXy46.js} +2 -2
  259. package/dist/assets/{tree-DKsPUdeu.js → tree-D0AxVJ_I.js} +1 -1
  260. package/dist/assets/triangle-alert-n1-FF7zs.js +1 -0
  261. package/dist/assets/troff-yA83BgDZ.js +1 -0
  262. package/dist/assets/ttcn-F0FnYTMB.js +1 -0
  263. package/dist/assets/ttcn-cfg-CSr0YVH7.js +1 -0
  264. package/dist/assets/turtle-DaAbI02L.js +1 -0
  265. package/dist/assets/types-B737EDbu.js +17 -0
  266. package/dist/assets/{useAddCell-DVMY6vkv.js → useAddCell-CZ1y3fpl.js} +1 -1
  267. package/dist/assets/{useBoolean-Den0ZqeZ.js → useBoolean-eWwLICkT.js} +1 -1
  268. package/dist/assets/useCellActionButton-CGxzkJch.js +1 -0
  269. package/dist/assets/{useDateFormatter-DfEfyPT1.js → useDateFormatter-CmtFqjqu.js} +1 -1
  270. package/dist/assets/{useDeleteCell-CrSQfQw4.js → useDeleteCell-Dok0-XOi.js} +1 -1
  271. package/dist/assets/{useDependencyPanelTab-BqqmAAW7.js → useDependencyPanelTab-CYOtvc7A.js} +1 -1
  272. package/dist/assets/{useInstallPackage-chfmZzat.js → useInstallPackage-jGxNsOWc.js} +1 -1
  273. package/dist/assets/useNotebookActions-C8fdJ-I2.js +1 -0
  274. package/dist/assets/{useNumberFormatter-DQd-h5xR.js → useNumberFormatter-DMA_kIIZ.js} +1 -1
  275. package/dist/assets/{usePress-DcdVsIfA.js → usePress-DsLftN-x.js} +1 -1
  276. package/dist/assets/{useSplitCell-BL-Sir7Y.js → useSplitCell-CEPcLfYT.js} +1 -1
  277. package/dist/assets/vb-BYziWQVS.js +1 -0
  278. package/dist/assets/vbscript-CP_qFLQN.js +1 -0
  279. package/dist/assets/{vega-component-BYA7vCZO.js → vega-component-Ce_zhbUD.js} +1 -1
  280. package/dist/assets/{vega-loader.browser-BJ9oKrvH.js → vega-loader.browser-CZV6_g2i.js} +1 -1
  281. package/dist/assets/velocity-etCBW8YB.js +1 -0
  282. package/dist/assets/verilog-DO_FdUQ9.js +1 -0
  283. package/dist/assets/vhdl-CtT4O7WT.js +1 -0
  284. package/dist/assets/webidl-DUTo0zWa.js +1 -0
  285. package/dist/assets/{write-secret-modal-CkhGEn3N.js → write-secret-modal-DuxmGjDn.js} +1 -1
  286. package/dist/assets/xquery-B0wH9AmB.js +1 -0
  287. package/dist/assets/{xychartDiagram-PRI3JC2R-Cb4TioN6.js → xychartDiagram-PRI3JC2R-BCbKQcrl.js} +1 -1
  288. package/dist/assets/yacas-UtDKR_RQ.js +1 -0
  289. package/dist/assets/z80-gTLyuPxz.js +1 -0
  290. package/dist/index.html +117 -118
  291. package/package.json +1 -1
  292. package/src/components/databases/icons/google-drive.svg +8 -0
  293. package/src/components/datasources/datasources.tsx +5 -5
  294. package/src/components/editor/actions/useNotebookActions.tsx +15 -2
  295. package/src/components/editor/connections/add-connection-dialog.tsx +83 -0
  296. package/src/components/editor/connections/components.tsx +177 -0
  297. package/src/components/editor/{database → connections/database}/__tests__/as-code.test.ts +1 -1
  298. package/src/components/editor/connections/database/add-database-form.tsx +303 -0
  299. package/src/components/editor/{database → connections/database}/as-code.ts +1 -1
  300. package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +100 -0
  301. package/src/components/editor/connections/storage/__tests__/as-code.test.ts +166 -0
  302. package/src/components/editor/connections/storage/add-storage-form.tsx +135 -0
  303. package/src/components/editor/connections/storage/as-code.ts +188 -0
  304. package/src/components/editor/connections/storage/schemas.ts +141 -0
  305. package/src/components/storage/components.tsx +9 -3
  306. package/src/components/storage/storage-inspector.tsx +20 -1
  307. package/src/core/codemirror/__tests__/format.test.ts +9 -1
  308. package/src/core/storage/types.ts +1 -0
  309. package/dist/assets/LazyAnyLanguageCodeMirror-DIzh1FyL.js +0 -2
  310. package/dist/assets/add-database-form-D06OUuSg.js +0 -111
  311. package/dist/assets/apl-EAxnZS_5.js +0 -1
  312. package/dist/assets/app-config-button-Btys3Cin.js +0 -1
  313. package/dist/assets/asciiarmor-zxnaShQE.js +0 -1
  314. package/dist/assets/asn1-7i28Os5R.js +0 -1
  315. package/dist/assets/azure-B7oWrJc_.js +0 -1
  316. package/dist/assets/brainfuck-BZegPsXK.js +0 -1
  317. package/dist/assets/channel-8l73B3Du.js +0 -1
  318. package/dist/assets/classDiagram-2ON5EDUG-DCHm2P5j.js +0 -1
  319. package/dist/assets/classDiagram-v2-WZHVMYZB-BCGAyQvL.js +0 -1
  320. package/dist/assets/clojure-VUVi7fTV.js +0 -1
  321. package/dist/assets/cmake-DZJIDbjY.js +0 -1
  322. package/dist/assets/cobol-klCRwlLm.js +0 -1
  323. package/dist/assets/coffeescript-C9foD9ub.js +0 -1
  324. package/dist/assets/commonlisp-tHxoA35J.js +0 -1
  325. package/dist/assets/crystal-CQ11GdrX.js +0 -1
  326. package/dist/assets/cypher-CJ0Uzw29.js +0 -1
  327. package/dist/assets/d-DP0SUIt1.js +0 -1
  328. package/dist/assets/diff-CNs8MB38.js +0 -1
  329. package/dist/assets/dist-B8Knp6QM.js +0 -1
  330. package/dist/assets/dist-BThe47rt.js +0 -1
  331. package/dist/assets/dist-C6prIILx.js +0 -1
  332. package/dist/assets/dist-CHwE2nmM.js +0 -1
  333. package/dist/assets/dist-CPi-6Hei.js +0 -1
  334. package/dist/assets/dist-CX2pe9zu.js +0 -1
  335. package/dist/assets/dist-Cf_g6O8K.js +0 -1
  336. package/dist/assets/dist-ChxQzK4j.js +0 -1
  337. package/dist/assets/dist-D3fVt494.js +0 -1
  338. package/dist/assets/dist-DNtP2rJw.js +0 -1
  339. package/dist/assets/dtd-BsD0uJw0.js +0 -1
  340. package/dist/assets/dylan-DbrGP1IP.js +0 -1
  341. package/dist/assets/ecl-C0rZlhHw.js +0 -1
  342. package/dist/assets/eiffel-2ZX-OpSJ.js +0 -1
  343. package/dist/assets/elm-CbOSKldD.js +0 -1
  344. package/dist/assets/erlang-BWiOgHIX.js +0 -1
  345. package/dist/assets/factor-CUwFIMOP.js +0 -1
  346. package/dist/assets/file-explorer-panel-BeOWee6Z.js +0 -1
  347. package/dist/assets/form-ibH0eKd-.js +0 -2
  348. package/dist/assets/forth-BEQA4QQL.js +0 -1
  349. package/dist/assets/fortran-DoPpOZgG.js +0 -1
  350. package/dist/assets/gas-BYovsvOE.js +0 -1
  351. package/dist/assets/gherkin-CFiRc1Pf.js +0 -1
  352. package/dist/assets/globe-B68kre4p.js +0 -1
  353. package/dist/assets/groovy-DJNH7evt.js +0 -1
  354. package/dist/assets/haskell-duZvcePm.js +0 -1
  355. package/dist/assets/haxe-B2l95qvB.js +0 -1
  356. package/dist/assets/home-page-Bs5_UsFC.js +0 -4
  357. package/dist/assets/html-to-image-CojwvW9z.js +0 -2
  358. package/dist/assets/idl-CZ_xwU8I.js +0 -1
  359. package/dist/assets/image-CBwHq93J.js +0 -1
  360. package/dist/assets/javascript-CF5KGSAj.js +0 -1
  361. package/dist/assets/julia-BQlq5iZn.js +0 -1
  362. package/dist/assets/katex-BalO4WMU.js +0 -1
  363. package/dist/assets/links-cVjWsr05.js +0 -1
  364. package/dist/assets/livescript-sRMenfqS.js +0 -1
  365. package/dist/assets/lua-a56ITumN.js +0 -1
  366. package/dist/assets/mathematica-B3m4jXeH.js +0 -1
  367. package/dist/assets/mbox-BtL7aO2I.js +0 -1
  368. package/dist/assets/mermaid-4DMBBIKO-DHX6rzjo.js +0 -1
  369. package/dist/assets/mirc-S27kuZ31.js +0 -1
  370. package/dist/assets/mllike-B3kx3KeF.js +0 -1
  371. package/dist/assets/modelica-DgbW4dSi.js +0 -1
  372. package/dist/assets/mscgen-BIa_4d-0.js +0 -1
  373. package/dist/assets/mumps-4fnELyHs.js +0 -1
  374. package/dist/assets/nsis-BfGyMssE.js +0 -1
  375. package/dist/assets/ntriples-DeY1n_tC.js +0 -1
  376. package/dist/assets/octave-7Qn21jzx.js +0 -1
  377. package/dist/assets/oz-CiPFl3Ni.js +0 -1
  378. package/dist/assets/pascal-BH9yQLzw.js +0 -1
  379. package/dist/assets/perl-DfMCx2i2.js +0 -1
  380. package/dist/assets/pig-D9CNebQN.js +0 -1
  381. package/dist/assets/powershell-Dss0bU9F.js +0 -1
  382. package/dist/assets/properties-CHADYQUL.js +0 -1
  383. package/dist/assets/protobuf-DFN-V4SD.js +0 -1
  384. package/dist/assets/pug-DOI9FnEk.js +0 -1
  385. package/dist/assets/puppet-BV0HAkDS.js +0 -1
  386. package/dist/assets/python-C83Db0-4.js +0 -1
  387. package/dist/assets/q-D84S4YaJ.js +0 -1
  388. package/dist/assets/r-jmqrRzXv.js +0 -1
  389. package/dist/assets/react-vega-Dg8Pw8lR.js +0 -1
  390. package/dist/assets/rpm-DUjG0xRk.js +0 -1
  391. package/dist/assets/ruby-SP4FIzir.js +0 -1
  392. package/dist/assets/sas-BxaPz2EX.js +0 -1
  393. package/dist/assets/scheme-HBseLApj.js +0 -1
  394. package/dist/assets/session-panel-DwTnfeqw.js +0 -1
  395. package/dist/assets/shell-w8ATY_lQ.js +0 -1
  396. package/dist/assets/sieve-Dyq0LGDO.js +0 -1
  397. package/dist/assets/smalltalk-D7mAtumc.js +0 -1
  398. package/dist/assets/sparql-DAeEYE_u.js +0 -1
  399. package/dist/assets/stateDiagram-v2-4FDKWEC3-wXzPY2i9.js +0 -1
  400. package/dist/assets/stex-BBWVYm-R.js +0 -1
  401. package/dist/assets/stylus-Cw3Ugan7.js +0 -1
  402. package/dist/assets/swift-CPsNOBsX.js +0 -1
  403. package/dist/assets/tcl-BfWyQdZa.js +0 -1
  404. package/dist/assets/textarea-noyX_YEw.js +0 -1
  405. package/dist/assets/textile-BKgaSzSN.js +0 -1
  406. package/dist/assets/toml-BSOdv04W.js +0 -1
  407. package/dist/assets/troff-C0hD9kig.js +0 -1
  408. package/dist/assets/ttcn-DEqPxhoh.js +0 -1
  409. package/dist/assets/ttcn-cfg-B-7jSlUe.js +0 -1
  410. package/dist/assets/turtle-BTtgFsu8.js +0 -1
  411. package/dist/assets/types-DYD6UxTH.js +0 -17
  412. package/dist/assets/useCellActionButton-HNTLhSrv.js +0 -1
  413. package/dist/assets/useNotebookActions-Bzt5O8Yy.js +0 -1
  414. package/dist/assets/vb-DfRPk_ji.js +0 -1
  415. package/dist/assets/vbscript-C8D4uv5N.js +0 -1
  416. package/dist/assets/velocity-DxKr2FFC.js +0 -1
  417. package/dist/assets/verilog-CxVhamiH.js +0 -1
  418. package/dist/assets/vhdl-B-IpBNOA.js +0 -1
  419. package/dist/assets/webidl-CBjKmBwO.js +0 -1
  420. package/dist/assets/xquery-ABGCbLv0.js +0 -1
  421. package/dist/assets/yacas-Ckyxh7oh.js +0 -1
  422. package/dist/assets/z80-Dr5sQweg.js +0 -1
  423. package/src/components/editor/database/add-database-form.tsx +0 -420
  424. /package/dist/assets/{Combination-BioTNpLP.js → Combination-tjZP3FH6.js} +0 -0
  425. /package/dist/assets/{Deferred-BMfCOLaw.js → Deferred-D2igisxY.js} +0 -0
  426. /package/dist/assets/{SSRProvider-CwqN9FWV.js → SSRProvider-DC7ElCZZ.js} +0 -0
  427. /package/dist/assets/{alert-Bs8tbZo_.js → alert-0YTlkh9P.js} +0 -0
  428. /package/dist/assets/{apl-Byte72fT.js → apl-_OaVDIdj.js} +0 -0
  429. /package/dist/assets/{asciiarmor-BU-VnG1Y.js → asciiarmor-C9F03XGV.js} +0 -0
  430. /package/dist/assets/{asn1-hTvH3S4T.js → asn1-BnyFT2xh.js} +0 -0
  431. /package/dist/assets/{badge-BUFDGZ04.js → badge-CNBv2dAU.js} +0 -0
  432. /package/dist/assets/{blob-DgooIGjS.js → blob-CObhN-9g.js} +0 -0
  433. /package/dist/assets/{brainfuck-C-q1Rv8J.js → brainfuck-BDCj_8tQ.js} +0 -0
  434. /package/dist/assets/{clear-button-jiwoSELH.js → clear-button-BA9qcQQg.js} +0 -0
  435. /package/dist/assets/{clike-BE-9Ct_H.js → clike-CoedqJfF.js} +0 -0
  436. /package/dist/assets/{clojure-Co-TLeNo.js → clojure-BEClvbJJ.js} +0 -0
  437. /package/dist/assets/{cmake-B-Nm_Opd.js → cmake-CCoJFsI7.js} +0 -0
  438. /package/dist/assets/{cobol-BGdihAZT.js → cobol-CrncQb9J.js} +0 -0
  439. /package/dist/assets/{coffeescript-BUZXkMUO.js → coffeescript-DwVkfncu.js} +0 -0
  440. /package/dist/assets/{commonlisp-CFkPbxvX.js → commonlisp-CJ40YQuw.js} +0 -0
  441. /package/dist/assets/{copy-CgddLxfF.js → copy-DMCkK2TI.js} +0 -0
  442. /package/dist/assets/{crystal-CqfqDl34.js → crystal-YUhScjFU.js} +0 -0
  443. /package/dist/assets/{css-DPEtZWJi.js → css-BpYxrU6m.js} +0 -0
  444. /package/dist/assets/{cypher-B0t8FJvU.js → cypher-DtBx1FxP.js} +0 -0
  445. /package/dist/assets/{d-DRa_XRSB.js → d-Dah-rTjO.js} +0 -0
  446. /package/dist/assets/{defaultLocale-CGfP-Ye3.js → defaultLocale-DK1MWd7f.js} +0 -0
  447. /package/dist/assets/{defaultLocale-CuYNS33t.js → defaultLocale-OkOxlkkM.js} +0 -0
  448. /package/dist/assets/{diff-GLneonpD.js → diff-CbRoYxJw.js} +0 -0
  449. /package/dist/assets/{dist-Cr2srKZ5.js → dist-0qXxt1VF.js} +0 -0
  450. /package/dist/assets/{dist-C4QdWMCE.js → dist-51xFOPFs.js} +0 -0
  451. /package/dist/assets/{dist-DBYXupB9.js → dist-BDJDjQTP.js} +0 -0
  452. /package/dist/assets/{dist-jtXWG2b1.js → dist-BTEPE6IB.js} +0 -0
  453. /package/dist/assets/{dist-CX4tr6LY.js → dist-BYbeMVLN.js} +0 -0
  454. /package/dist/assets/{dist-WaT7BL5t.js → dist-BjtLy-VA.js} +0 -0
  455. /package/dist/assets/{dist-DrewQ3CS.js → dist-C9Tymsam.js} +0 -0
  456. /package/dist/assets/{dist-DvNh3ph0.js → dist-CPbQEKNx.js} +0 -0
  457. /package/dist/assets/{dist-CW4ZrmuX.js → dist-DDs9pMUo.js} +0 -0
  458. /package/dist/assets/{dist-DgIBu6pZ.js → dist-DU2EJ7el.js} +0 -0
  459. /package/dist/assets/{dist-DkUBUEhC.js → dist-DnkvqAMq.js} +0 -0
  460. /package/dist/assets/{dist-DWi0RsIc.js → dist-DpVoU5lF.js} +0 -0
  461. /package/dist/assets/{dist-BoFVJhwF.js → dist-odxAaH5Z.js} +0 -0
  462. /package/dist/assets/{dtd-uVrZNVF0.js → dtd-DnxzgohM.js} +0 -0
  463. /package/dist/assets/{dylan-DkNeA4FZ.js → dylan-DV-GV0Um.js} +0 -0
  464. /package/dist/assets/{ecl-CldUgvc9.js → ecl-D5jDMU68.js} +0 -0
  465. /package/dist/assets/{eiffel-CoMDRbRL.js → eiffel-DKJu2v1N.js} +0 -0
  466. /package/dist/assets/{elm-Cb5XC6ev.js → elm-jc1dahX5.js} +0 -0
  467. /package/dist/assets/{emotion-is-prop-valid.esm-lG8j6oqk.js → emotion-is-prop-valid.esm-D7FeWASw.js} +0 -0
  468. /package/dist/assets/{empty-state-BNyDvg_Q.js → empty-state-DFr2pZOz.js} +0 -0
  469. /package/dist/assets/{en-US-k6sS5Nab.js → en-US-DBqDb4Nb.js} +0 -0
  470. /package/dist/assets/{erlang-8H3fTZ3L.js → erlang-xV-AfkqS.js} +0 -0
  471. /package/dist/assets/{errors-0IrrdfSG.js → errors-Bfogio62.js} +0 -0
  472. /package/dist/assets/{extends-B9D0JO9U.js → extends-aq1t6BkR.js} +0 -0
  473. /package/dist/assets/{forth-B8kC4npz.js → forth-C9zvylLL.js} +0 -0
  474. /package/dist/assets/{fortran-CNWGEL3c.js → fortran-CyOyVtLP.js} +0 -0
  475. /package/dist/assets/{gas-DnZQNTHK.js → gas-B3PseLpk.js} +0 -0
  476. /package/dist/assets/{gherkin-JfGcGvci.js → gherkin-BJegP8jG.js} +0 -0
  477. /package/dist/assets/{groovy-D0FWiAVm.js → groovy-B7OnG3ZU.js} +0 -0
  478. /package/dist/assets/{haskell-wUB3uX-G.js → haskell-BtINGz8b.js} +0 -0
  479. /package/dist/assets/{haxe-g0JY6eL-.js → haxe-DG3vLZ0S.js} +0 -0
  480. /package/dist/assets/{idl-CV2cLkPc.js → idl-ARaXQ5Lo.js} +0 -0
  481. /package/dist/assets/{isValid-CUXKlcrM.js → isValid-D3F4nmET.js} +0 -0
  482. /package/dist/assets/{javascript-CT6okXEZ.js → javascript-DbuC-gIm.js} +0 -0
  483. /package/dist/assets/{julia-CKC48ufo.js → julia-C2ly3uah.js} +0 -0
  484. /package/dist/assets/{katex-FSdXOW5Y.js → katex-rvFxOCU-.js} +0 -0
  485. /package/dist/assets/{kbd-Rn7tWvNg.js → kbd-CVbqSkT8.js} +0 -0
  486. /package/dist/assets/{link-BmtFffTv.js → link-Cpo6yhBB.js} +0 -0
  487. /package/dist/assets/{links-MkDbmF2p.js → links-BKV6zi_7.js} +0 -0
  488. /package/dist/assets/{livescript-C43pZ6Ue.js → livescript-BHGtnzZk.js} +0 -0
  489. /package/dist/assets/{loro_wasm_bg-DNKZeVyM.js → loro_wasm_bg-Bj93RhA2.js} +0 -0
  490. /package/dist/assets/{lua-Cs2mb10K.js → lua-0hHWC4O5.js} +0 -0
  491. /package/dist/assets/{marimo-icons-DcMouEVW.js → marimo-icons-BDAuIiW5.js} +0 -0
  492. /package/dist/assets/{mathematica-B5FMK3ma.js → mathematica-BeUaygJp.js} +0 -0
  493. /package/dist/assets/{mbox-36Zrn5Bd.js → mbox-CR4_Euk_.js} +0 -0
  494. /package/dist/assets/{mirc-BKTAABSX.js → mirc-Cc0cHJWO.js} +0 -0
  495. /package/dist/assets/{mllike-DbuClUqc.js → mllike-D58Jm9uo.js} +0 -0
  496. /package/dist/assets/{modelica-CKRvBm7N.js → modelica-CVUPArJj.js} +0 -0
  497. /package/dist/assets/{mscgen-B4BRgnCi.js → mscgen-B_Av7U7x.js} +0 -0
  498. /package/dist/assets/{multi-icon-BFa-He80.js → multi-icon-OxLi6M3I.js} +0 -0
  499. /package/dist/assets/{mumps-BFiMcyFV.js → mumps-CSXER37P.js} +0 -0
  500. /package/dist/assets/{ntriples-QQAkJYAR.js → ntriples-BH96LyUh.js} +0 -0
  501. /package/dist/assets/{numbers-CPeFd6mm.js → numbers-44Cj1Me-.js} +0 -0
  502. /package/dist/assets/{objectWithoutPropertiesLoose-CboCOq4o.js → objectWithoutPropertiesLoose-Dxmp_Bd_.js} +0 -0
  503. /package/dist/assets/{octave-DsTphmGZ.js → octave-MtIOg8Xr.js} +0 -0
  504. /package/dist/assets/{ordinal-CIZb_ice.js → ordinal-Cn9sg_-a.js} +0 -0
  505. /package/dist/assets/{oz-CD9rr5Iz.js → oz-CQSW4u2r.js} +0 -0
  506. /package/dist/assets/{panel-context-D8PoMwqS.js → panel-context-ICWm_stq.js} +0 -0
  507. /package/dist/assets/{pascal-DdHEIlJE.js → pascal-kJIfJeBL.js} +0 -0
  508. /package/dist/assets/{paths-D2lG83Oh.js → paths-bMgYkaP2.js} +0 -0
  509. /package/dist/assets/{perl-DHPJBQ1u.js → perl-DDhi21z2.js} +0 -0
  510. /package/dist/assets/{pig-Yz7ERgca.js → pig-BdUzMo_O.js} +0 -0
  511. /package/dist/assets/{play-CkqWG85-.js → play-D4Tdvkms.js} +0 -0
  512. /package/dist/assets/{plus-C9B_qWUi.js → plus-B-s-VRHt.js} +0 -0
  513. /package/dist/assets/{powershell-CHPZ_bsU.js → powershell-D_qEipPM.js} +0 -0
  514. /package/dist/assets/{preload-helper-BW0IMuFq.js → preload-helper-TXkS1QI3.js} +0 -0
  515. /package/dist/assets/{prop-types-C638SUfx.js → prop-types-DRf51_gT.js} +0 -0
  516. /package/dist/assets/{properties-CI9nc7K4.js → properties-CS6vA6nt.js} +0 -0
  517. /package/dist/assets/{protobuf-BYSIv2pY.js → protobuf-COtqlKri.js} +0 -0
  518. /package/dist/assets/{puppet-CEpLafZX.js → puppet-Ctozq3R1.js} +0 -0
  519. /package/dist/assets/{purify.es-DTgMcyNc.js → purify.es-CPplrWRQ.js} +0 -0
  520. /package/dist/assets/{python-BndVuwG1.js → python-D9pCSume.js} +0 -0
  521. /package/dist/assets/{q-L_cetpiW.js → q-CKhLXEtL.js} +0 -0
  522. /package/dist/assets/{r-Dd37AKWk.js → r-BvAfMHMS.js} +0 -0
  523. /package/dist/assets/{range-ClqUI25v.js → range-DNqFcYmr.js} +0 -0
  524. /package/dist/assets/{react-resizable-panels.browser.esm-DDRqG5ui.js → react-resizable-panels.browser.esm-RgA6v8U3.js} +0 -0
  525. /package/dist/assets/{refresh-ccw-B3lGEyQm.js → refresh-ccw-BOzRCrXK.js} +0 -0
  526. /package/dist/assets/{refresh-cw-fLeDriQe.js → refresh-cw-DeCFDX1B.js} +0 -0
  527. /package/dist/assets/{requests-BtlCsvG4.js → requests-KFvRjaaN.js} +0 -0
  528. /package/dist/assets/{rotate-ccw-DgH8qERb.js → rotate-ccw-BG5BZyzw.js} +0 -0
  529. /package/dist/assets/{rpm-CHrvhtlN.js → rpm-CUTjLkz_.js} +0 -0
  530. /package/dist/assets/{ruby-BPOowfX6.js → ruby-jDDZwg5-.js} +0 -0
  531. /package/dist/assets/{sas-BsEFSvEP.js → sas-mA9119dU.js} +0 -0
  532. /package/dist/assets/{save-C91FTnFa.js → save-I_RGv5p0.js} +0 -0
  533. /package/dist/assets/{scheme-B42INBu7.js → scheme-Bw6sYvQh.js} +0 -0
  534. /package/dist/assets/{session-Deuv0Lgh.js → session-DnMOyddG.js} +0 -0
  535. /package/dist/assets/{settings-DRfuuLRT.js → settings-DD8FJvQ_.js} +0 -0
  536. /package/dist/assets/{shell-BPea12OI.js → shell-BSG_6EVv.js} +0 -0
  537. /package/dist/assets/{sieve-C-yPcLw5.js → sieve-BvqlFANQ.js} +0 -0
  538. /package/dist/assets/{simple-mode-CFlvn0Mm.js → simple-mode-C0eLpHUg.js} +0 -0
  539. /package/dist/assets/{smalltalk-e7OO1ATb.js → smalltalk-CarfjYvX.js} +0 -0
  540. /package/dist/assets/{sparql-B4I2Ledx.js → sparql-DpdbGHkw.js} +0 -0
  541. /package/dist/assets/{spinner-Dt4SmUsI.js → spinner-DCSoZZhh.js} +0 -0
  542. /package/dist/assets/{square-function-DEp1ozoA.js → square-function-4zY5Dv0P.js} +0 -0
  543. /package/dist/assets/{square-DZpWT_hp.js → square-oV8Csj8Y.js} +0 -0
  544. /package/dist/assets/{stex-0ac7Aukl.js → stex-FMMSUPAS.js} +0 -0
  545. /package/dist/assets/{stylus-CBRbZwhN.js → stylus-DwqF5JX3.js} +0 -0
  546. /package/dist/assets/{swift-B2hnU7ha.js → swift-XQW_3Dnq.js} +0 -0
  547. /package/dist/assets/{tcl-BtyamtaZ.js → tcl-DSytfKxX.js} +0 -0
  548. /package/dist/assets/{textile-M9mhyNE9.js → textile-C0sJ895O.js} +0 -0
  549. /package/dist/assets/{timer-CPT_vXom.js → timer-BEJidwwG.js} +0 -0
  550. /package/dist/assets/{toml-YxyxhyRy.js → toml-Bduwr9FD.js} +0 -0
  551. /package/dist/assets/{trash-2-CrA4LwJ2.js → trash-2-DtQaB9NM.js} +0 -0
  552. /package/dist/assets/{trash-ZGxZ3QGq.js → trash-Basz0Kvc.js} +0 -0
  553. /package/dist/assets/{troff-C7xpi05X.js → troff-DhuvYLXE.js} +0 -0
  554. /package/dist/assets/{ttcn-D3YytrJU.js → ttcn-C2K9hXYD.js} +0 -0
  555. /package/dist/assets/{ttcn-cfg-DlZ5vA9E.js → ttcn-cfg-DWjJYHn-.js} +0 -0
  556. /package/dist/assets/{turtle-BSHvAsUe.js → turtle-q-WiynB8.js} +0 -0
  557. /package/dist/assets/{types-CswNghXe.js → types-BhvWC48z.js} +0 -0
  558. /package/dist/assets/{use-toast-Hc8CXlvz.js → use-toast-BhMe50aT.js} +0 -0
  559. /package/dist/assets/{useAsyncData-CI3ntihq.js → useAsyncData-DVm0BCFt.js} +0 -0
  560. /package/dist/assets/{useDebounce-S9zaMzrr.js → useDebounce-BUC67G8E.js} +0 -0
  561. /package/dist/assets/{useDeepCompareMemoize-yyiB9aJX.js → useDeepCompareMemoize-D1hTncYV.js} +0 -0
  562. /package/dist/assets/{useIframeCapabilities-Ba0L-TQN.js → useIframeCapabilities-T3alJPda.js} +0 -0
  563. /package/dist/assets/{useInterval-C2RcswPt.js → useInterval-Bpy5zYCc.js} +0 -0
  564. /package/dist/assets/{useTheme-CAolwY4Q.js → useTheme-CwdqVOYu.js} +0 -0
  565. /package/dist/assets/{uuid-ClFZlR7U.js → uuid-ImXS-885.js} +0 -0
  566. /package/dist/assets/{vb-DdkIDLlO.js → vb-BzUPMIAg.js} +0 -0
  567. /package/dist/assets/{vbscript-DhYGmk_p.js → vbscript-CUBxk5hi.js} +0 -0
  568. /package/dist/assets/{velocity-DAXJNEw4.js → velocity-CFrdKnJ-.js} +0 -0
  569. /package/dist/assets/{verilog-jmuT_L3b.js → verilog-uIU1FX2_.js} +0 -0
  570. /package/dist/assets/{vhdl-DcVQ97RU.js → vhdl-Ca2_GOin.js} +0 -0
  571. /package/dist/assets/{webidl-B-YB_4OQ.js → webidl-Fd2zBPO0.js} +0 -0
  572. /package/dist/assets/{workflow-DgZ_19fF.js → workflow-CU6kAL_h.js} +0 -0
  573. /package/dist/assets/{ws-Sb1KIggW.js → ws-D2eS61zr.js} +0 -0
  574. /package/dist/assets/{xquery-DOmY3Oe8.js → xquery-S8ffVcwS.js} +0 -0
  575. /package/dist/assets/{yacas-pL3kJRXV.js → yacas-BFgZPXn6.js} +0 -0
  576. /package/dist/assets/{youtube-DfMgNU9-.js → youtube-fKFch587.js} +0 -0
  577. /package/dist/assets/{z80-VwVuI_MT.js → z80-P5o2E6_C.js} +0 -0
  578. /package/src/components/editor/{database → connections}/__tests__/secrets.test.ts +0 -0
  579. /package/src/components/editor/{database → connections/database}/__tests__/__snapshots__/as-code.test.ts.snap +0 -0
  580. /package/src/components/editor/{database → connections/database}/schemas.ts +0 -0
  581. /package/src/components/editor/{database → connections}/form-renderers.tsx +0 -0
  582. /package/src/components/editor/{database → connections}/secrets.ts +0 -0
@@ -1,3 +1,3 @@
1
- var jr=Object.defineProperty;var mt=g=>{throw TypeError(g)};var Lr=(g,y,E)=>y in g?jr(g,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):g[y]=E;var a=(g,y,E)=>Lr(g,typeof y!="symbol"?y+"":y,E),Ce=(g,y,E)=>y.has(g)||mt("Cannot "+E);var l=(g,y,E)=>(Ce(g,y,"read from private field"),E?E.call(g):y.get(g)),F=(g,y,E)=>y.has(g)?mt("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(g):y.set(g,E),k=(g,y,E,de)=>(Ce(g,y,"write to private field"),de?de.call(g,E):y.set(g,E),E),$=(g,y,E)=>(Ce(g,y,"access private method"),E);import{s as pt}from"./chunk-LvLJmgfZ.js";import{i as se,l as ye,p as V,u as Ar}from"./useEvent-WUlsM6MC.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{Dn as Ur,ai as Tr,b as Wr,ci as zr,mi as ie,ni as Or,oi as Dr,pi as Br,st as ft,x as Hr,__tla as $r}from"./cells-DD42bsu7.js";import{t as gt}from"./compiler-runtime-B3qBwwSJ.js";import{t as Vr}from"./get-6uJrSKbw.js";import{t as Xr}from"./assertNever-Dw9aFN4h.js";import{t as Yr}from"./debounce-D8CkpJG7.js";import{t as Qr}from"./_baseSet-BEHvSeoM.js";import{g as x,m as f}from"./useEventListener-CjXriKgk.js";import{t as Jr}from"./invariant-awXiPaF0.js";import{S as Gr}from"./utils-CORJ8yYa.js";import{S as Kr,n as Zr}from"./config-CBwelk8k.js";import{a as en}from"./switch-CA8la81g.js";import{n as yt}from"./globals-Dk7VGE85.js";import{t as bt}from"./ErrorBoundary-dVj6GVNE.js";import{t as tn}from"./jsx-runtime-CP2fAiZX.js";import{t as rn}from"./button-BmOH9agK.js";import{t as nn}from"./cn-d_A4rA-x.js";import{J as Re,Y as wt,Z as sn,__tla as an}from"./JsonOutput-uf7OFaDU.js";import{t as on}from"./createReducer-BcTiTw8T.js";import{t as Se}from"./requests-DZy_SQ_v.js";import{t as vt}from"./createLucideIcon-BvP5LBIs.js";import{t as ln}from"./x-yqLqiq5Q.js";import{a as xt,l as dn,r as _t}from"./markdown-renderer-YOedNAkc.js";import{t as un}from"./DeferredRequestRegistry-TekxUirp.js";import{t as cn}from"./preload-helper-BW0IMuFq.js";import{t as Et}from"./Deferred-BMfCOLaw.js";import{t as Ct}from"./uuid-ClFZlR7U.js";import{t as hn}from"./use-toast-Hc8CXlvz.js";import{t as Rt}from"./tooltip-oM-h2ZN1.js";import{n as mn,r as pn,t as fn}from"./share-BpyH3qLa.js";import{t as gn}from"./blob-DgooIGjS.js";import{r as yn,t as bn}from"./react-resizable-panels.browser.esm-DDRqG5ui.js";import{t as St}from"./toggle-MO7vjfkt.js";let Fe,ae,Ft,kt,ke,Nt,qt,Mt,oe,Pt,le,jt,Ne,qe,Lt,Me,Pe,be,je,At,It,Le,Ae,Ie,Ue,Ut,Tt,Wt,zt,Te,We,ze,Ot,Dt,Bt,Oe,Ht,$t,Vt,we,wn=Promise.all([(()=>{try{return $r}catch{}})(),(()=>{try{return an}catch{}})()]).then(async()=>{var X,pe,Yt,lt,T,Y,I,dt,z,ut,W,te,G,ve,ct,ht,fe,O,D,K,N,Q,B,Qt,Jt,Gt,ge;function g(t,e,r){return t==null?t:Qr(t,e,r)}let y,E;ae=g,y=vt("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]),E=vt("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);function de(t){return{all:t||(t=new Map),on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(s){s(r)}),(n=t.get("*"))&&n.slice().map(function(s){s(e,r)})}}}var R=pt(Ir(),1),xe=(0,R.createContext)(null),Zt=t=>{let{controller:e}=(0,R.useContext)(xe),r=R.useRef(Symbol("fill"));return(0,R.useEffect)(()=>(e.mount({name:t.name,ref:r.current,children:t.children}),()=>{e.unmount({name:t.name,ref:r.current})}),[]),(0,R.useEffect)(()=>{e.update({name:t.name,ref:r.current,children:t.children})}),null},er=Object.defineProperty,tr=(t,e,r)=>e in t?er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Be=(t,e,r)=>(tr(t,typeof e=="symbol"?e:e+"",r),r),He=console,rr=class{constructor(t){Be(this,"_bus"),Be(this,"_db"),this._bus=t,this.handleFillMount=this.handleFillMount.bind(this),this.handleFillUpdated=this.handleFillUpdated.bind(this),this.handleFillUnmount=this.handleFillUnmount.bind(this),this._db={byName:new Map,byFill:new Map}}mount(){this._bus.on("fill-mount",this.handleFillMount),this._bus.on("fill-updated",this.handleFillUpdated),this._bus.on("fill-unmount",this.handleFillUnmount)}unmount(){this._bus.off("fill-mount",this.handleFillMount),this._bus.off("fill-updated",this.handleFillUpdated),this._bus.off("fill-unmount",this.handleFillUnmount)}handleFillMount({fill:t}){let e=R.Children.toArray(t.children),r=t.name,n={fill:t,children:e,name:r},s=this._db.byName.get(r);s?(s.components.push(n),s.listeners.forEach(i=>i([...s.components]))):this._db.byName.set(r,{listeners:[],components:[n]}),this._db.byFill.set(t.ref,n)}handleFillUpdated({fill:t}){let e=this._db.byFill.get(t.ref),r=R.Children.toArray(t.children);if(e){e.children=r;let n=this._db.byName.get(e.name);if(n)n.listeners.forEach(s=>s([...n.components]));else throw Error("registration was expected to be defined")}else{He.error("[handleFillUpdated] component was expected to be defined");return}}handleFillUnmount({fill:t}){let e=this._db.byFill.get(t.ref);if(!e){He.error("[handleFillUnmount] component was expected to be defined");return}let r=e.name,n=this._db.byName.get(r);if(!n)throw Error("registration was expected to be defined");n.components=n.components.filter(s=>s!==e),this._db.byFill.delete(t.ref),n.listeners.length===0&&n.components.length===0?this._db.byName.delete(r):n.listeners.forEach(s=>s([...n.components]))}onComponentsChange(t,e){let r=this._db.byName.get(t);r?(r.listeners.push(e),e(r.components)):(this._db.byName.set(t,{listeners:[e],components:[]}),e([]))}getFillsByName(t){let e=this._db.byName.get(t);return e?e.components.map(r=>r.fill):[]}getChildrenByName(t){let e=this._db.byName.get(t);return e?e.components.map(r=>r.children).reduce((r,n)=>r.concat(n),[]):[]}removeOnComponentsChange(t,e){let r=this._db.byName.get(t);if(!r)throw Error("expected registration to be defined");let n=r.listeners;n.splice(n.indexOf(e),1)}},nr=Object.defineProperty,sr=(t,e,r)=>e in t?nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e,r)=>(sr(t,typeof e=="symbol"?e:e+"",r),r),$e=class{constructor(){ir(this,"bus",de())}mount(t){this.bus.emit("fill-mount",{fill:t})}unmount(t){this.bus.emit("fill-unmount",{fill:t})}update(t){this.bus.emit("fill-updated",{fill:t})}};function ar(t){let e=t||new $e;return{controller:e,manager:new rr(e.bus)}}Mt=({controller:t,children:e})=>{let[r]=R.useState(()=>{let n=ar(t);return n.manager.mount(),n});return R.useEffect(()=>()=>{r.manager.unmount()},[]),R.createElement(xe.Provider,{value:r},e)},we=function(t,e){let[r,n]=(0,R.useState)([]),{manager:s}=(0,R.useContext)(xe);return(0,R.useEffect)(()=>(s.onComponentsChange(t,n),()=>{s.removeOnComponentsChange(t,n)}),[t]),r.flatMap((i,u)=>{let{children:d}=i;return d.map((p,b)=>{if(typeof p=="number"||typeof p=="string")throw Error("Only element children will work here");return R.cloneElement(p,{key:u.toString()+b.toString(),...e})})})},Ne=t=>{let e=we(t.name,t.childProps);if(typeof t.children=="function"){let r=t.children(e);if(R.isValidElement(r)||r===null)return r;throw Error("Slot rendered with function must return a valid React Element.")}return e},jt=V(null);var{valueAtom:or,useActions:lr}=on(()=>({banners:[]}),{addBanner:(t,e)=>({...t,banners:[...t.banners,{...e,id:Ct()}]}),removeBanner:(t,e)=>({...t,banners:t.banners.filter(r=>r.id!==e)}),clearBanners:t=>({...t,banners:[]})});Nt=()=>Ar(or),qt=function(){return lr()},Pt=new $e,oe={SIDEBAR:"sidebar",CONTEXT_AWARE_PANEL:"context-aware-panel"};let Ve,Xe,Ye;Ve=class{constructor(){a(this,"subscriptions",new Map)}addSubscription(t,e){var r;this.subscriptions.has(t)||this.subscriptions.set(t,new Set),(r=this.subscriptions.get(t))==null||r.add(e)}removeSubscription(t,e){var r;(r=this.subscriptions.get(t))==null||r.delete(e)}notify(t,e){for(let r of this.subscriptions.get(t)??[])r(e)}},Ue=class De{constructor(e){a(this,"subscriptions",new Ve);this.producer=e}static withProducerCallback(e){return new De(e)}static empty(){return new De}startProducer(){this.producer&&this.producer(e=>{this.subscriptions.notify("message",e)})}connect(){return new Promise(e=>setTimeout(e,0)).then(()=>{this.subscriptions.notify("open",new Event("open"))})}get readyState(){return WebSocket.OPEN}reconnect(e,r){this.close(),this.connect()}close(){this.subscriptions.notify("close",new Event("close"))}send(e){return this.subscriptions.notify("message",new MessageEvent("message",{data:e})),Promise.resolve()}addEventListener(e,r){this.subscriptions.addSubscription(e,r),e==="open"&&r(new Event("open")),e==="message"&&this.startProducer()}removeEventListener(e,r){this.subscriptions.removeSubscription(e,r)}},Xe=1e10,Ye=1e3;function ue(t,e){let r=t.map(n=>`"${n}"`).join(", ");return Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`)}function dr(t={}){let e={};function r(o){e=o}let n={};function s(o){var m;n.unregisterHandler&&n.unregisterHandler(),n=o,(m=n.registerHandler)==null||m.call(n,ne)}let i;function u(o){if(typeof o=="function"){i=o;return}i=(m,v)=>{let c=o[m];if(c)return c(v);let w=o._;if(!w)throw Error(`The requested method has no handler: ${m}`);return w(m,v)}}let{maxRequestTime:d=Ye}=t;t.transport&&s(t.transport),t.requestHandler&&u(t.requestHandler),t._debugHooks&&r(t._debugHooks);let p=0;function b(){return p<=Xe?++p:p=0}let C=new Map,_=new Map;function q(o,...m){let v=m[0];return new Promise((c,w)=>{var ee;if(!n.send)throw ue(["send"],"make requests");let U=b(),J={type:"request",id:U,method:o,params:v};C.set(U,{resolve:c,reject:w}),d!==1/0&&_.set(U,setTimeout(()=>{_.delete(U),w(Error("RPC request timed out."))},d)),(ee=e.onSend)==null||ee.call(e,J),n.send(J)})}let M=new Proxy(q,{get:(o,m,v)=>m in o?Reflect.get(o,m,v):c=>q(m,c)}),P=M;function j(o,...m){var w;let v=m[0];if(!n.send)throw ue(["send"],"send messages");let c={type:"message",id:o,payload:v};(w=e.onSend)==null||w.call(e,c),n.send(c)}let L=new Proxy(j,{get:(o,m,v)=>m in o?Reflect.get(o,m,v):c=>j(m,c)}),S=L,A=new Map,H=new Set;function Z(o,m){var v;if(!n.registerHandler)throw ue(["registerHandler"],"register message listeners");if(o==="*"){H.add(m);return}A.has(o)||A.set(o,new Set),(v=A.get(o))==null||v.add(m)}function re(o,m){var v,c;if(o==="*"){H.delete(m);return}(v=A.get(o))==null||v.delete(m),((c=A.get(o))==null?void 0:c.size)===0&&A.delete(o)}async function ne(o){var m,v;if((m=e.onReceive)==null||m.call(e,o),!("type"in o))throw Error("Message does not contain a type.");if(o.type==="request"){if(!n.send||!i)throw ue(["send","requestHandler"],"handle requests");let{id:c,method:w,params:U}=o,J;try{J={type:"response",id:c,success:!0,payload:await i(w,U)}}catch(ee){if(!(ee instanceof Error))throw ee;J={type:"response",id:c,success:!1,error:ee.message}}(v=e.onSend)==null||v.call(e,J),n.send(J);return}if(o.type==="response"){let c=_.get(o.id);c!=null&&clearTimeout(c);let{resolve:w,reject:U}=C.get(o.id)??{};o.success?w==null||w(o.payload):U==null||U(Error(o.error));return}if(o.type==="message"){for(let w of H)w(o.id,o.payload);let c=A.get(o.id);if(!c)return;for(let w of c)w(o.payload);return}throw Error(`Unexpected RPC message type: ${o.type}`)}return{setTransport:s,setRequestHandler:u,request:M,requestProxy:P,send:L,sendProxy:S,addMessageListener:Z,removeMessageListener:re,proxy:{send:S,request:P},_setDebugHooks:r}}function ur(t){return dr(t)}var Qe="[transport-id]";function cr(t,e){let{transportId:r}=e;return r==null?t:{[Qe]:r,data:t}}function hr(t,e){let{transportId:r,filter:n}=e,s=n==null?void 0:n();if(r!=null&&s!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let i=t;if(r){if(t[Qe]!==r)return[!0];i=t.data}return s===!1?[!0]:[!1,i]}function mr(t,e={}){let{transportId:r,filter:n,remotePort:s}=e,i=t,u=s??t,d;return{send(p){u.postMessage(cr(p,{transportId:r}))},registerHandler(p){d=b=>{let C=b.data,[_,q]=hr(C,{transportId:r,filter:()=>n==null?void 0:n(b)});_||p(q)},i.addEventListener("message",d)},unregisterHandler(){d&&i.removeEventListener("message",d)}}}function pr(t,e){return mr(t,e)}function Je(t){return ur({transport:pr(t,{transportId:"marimo-transport"}),maxRequestTime:2e4,_debugHooks:{onSend:e=>{f.debug("[rpc] Parent -> Worker",e)},onReceive:e=>{f.debug("[rpc] Worker -> Parent",e)}}})}Fe=V("Initializing..."),Ut=V(t=>{let e=t(Wr),r=Object.values(e.cellRuntime);return r.some(n=>!dn(n.output))?!0:r.every(n=>n.status==="idle")});var Ge=mn(),Ke="marimo:file",Ze=new Or(null);const fr={saveFile(t){Ze.set(Ke,t)},readFile(){return Ze.get(Ke)}};var gr={saveFile(t){ie.setCodeForHash((0,Ge.compressToEncodedURIComponent)(t))},readFile(){let t=ie.getCodeFromHash()||ie.getCodeFromSearchParam();return t?(0,Ge.decompressFromEncodedURIComponent)(t):null}};const yr={saveFile(t){},readFile(){let t=document.querySelector("marimo-code");return t?decodeURIComponent(t.textContent||"").trim():null}};var br={saveFile(t){},readFile(){if(window.location.hostname!=="marimo.app")return null;let t=new URL("files/wasm-intro.py",document.baseURI);return fetch(t.toString()).then(e=>e.ok?e.text():null).catch(()=>null)}};const wr={saveFile(t){},readFile(){return se.get(Tr)??null}};var vr={saveFile(t){},readFile(){return["import marimo","app = marimo.App()","","@app.cell","def __():"," return","",'if __name__ == "__main__":'," app.run()"].join(`
1
+ var jr=Object.defineProperty;var mt=g=>{throw TypeError(g)};var Lr=(g,y,E)=>y in g?jr(g,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):g[y]=E;var a=(g,y,E)=>Lr(g,typeof y!="symbol"?y+"":y,E),Ce=(g,y,E)=>y.has(g)||mt("Cannot "+E);var l=(g,y,E)=>(Ce(g,y,"read from private field"),E?E.call(g):y.get(g)),F=(g,y,E)=>y.has(g)?mt("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(g):y.set(g,E),k=(g,y,E,de)=>(Ce(g,y,"write to private field"),de?de.call(g,E):y.set(g,E),E),$=(g,y,E)=>(Ce(g,y,"access private method"),E);import{s as pt}from"./chunk-LvLJmgfZ.js";import{i as se,l as ye,p as V,u as Ar}from"./useEvent-WUlsM6MC.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{Dn as Ur,ai as Tr,b as Wr,ci as zr,mi as ie,ni as Or,oi as Dr,pi as Br,st as ft,x as Hr,__tla as $r}from"./cells-CigkzIKH.js";import{t as gt}from"./compiler-runtime-B3qBwwSJ.js";import{t as Vr}from"./get-6uJrSKbw.js";import{t as Xr}from"./assertNever-Dw9aFN4h.js";import{t as Yr}from"./debounce-D8CkpJG7.js";import{t as Qr}from"./_baseSet-BEHvSeoM.js";import{g as x,m as f}from"./useEventListener-CjXriKgk.js";import{t as Jr}from"./invariant-awXiPaF0.js";import{S as Gr}from"./utils-CORJ8yYa.js";import{S as Kr,n as Zr}from"./config-D9X9QKiL.js";import{a as en}from"./switch-Cp5eQmZx.js";import{n as yt}from"./globals-BIlQtd9Z.js";import{t as bt}from"./ErrorBoundary-dVj6GVNE.js";import{t as tn}from"./jsx-runtime-CP2fAiZX.js";import{t as rn}from"./button-BmOH9agK.js";import{t as nn}from"./cn-d_A4rA-x.js";import{J as Re,Y as wt,Z as sn,__tla as an}from"./JsonOutput-DKjq8WkX.js";import{t as on}from"./createReducer-BcTiTw8T.js";import{t as Se}from"./requests-DZy_SQ_v.js";import{t as vt}from"./createLucideIcon-BvP5LBIs.js";import{t as ln}from"./x-yqLqiq5Q.js";import{a as xt,l as dn,r as _t}from"./markdown-renderer-DHgbXKHX.js";import{t as un}from"./DeferredRequestRegistry-CMZsNx4R.js";import{t as cn}from"./preload-helper-TXkS1QI3.js";import{t as Et}from"./Deferred-D2igisxY.js";import{t as Ct}from"./uuid-ImXS-885.js";import{t as hn}from"./use-toast-BhMe50aT.js";import{t as Rt}from"./tooltip-DOQlecCr.js";import{n as mn,r as pn,t as fn}from"./share-sD4fbzpH.js";import{t as gn}from"./blob-CObhN-9g.js";import{r as yn,t as bn}from"./react-resizable-panels.browser.esm-RgA6v8U3.js";import{t as St}from"./toggle-BhEcsHTu.js";let Fe,ae,Ft,kt,ke,Nt,qt,Mt,oe,Pt,le,jt,Ne,qe,Lt,Me,Pe,be,je,At,It,Le,Ae,Ie,Ue,Ut,Tt,Wt,zt,Te,We,ze,Ot,Dt,Bt,Oe,Ht,$t,Vt,we,wn=Promise.all([(()=>{try{return $r}catch{}})(),(()=>{try{return an}catch{}})()]).then(async()=>{var X,pe,Yt,lt,T,Y,I,dt,z,ut,W,te,G,ve,ct,ht,fe,O,D,K,N,Q,B,Qt,Jt,Gt,ge;function g(t,e,r){return t==null?t:Qr(t,e,r)}let y,E;ae=g,y=vt("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]),E=vt("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);function de(t){return{all:t||(t=new Map),on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(s){s(r)}),(n=t.get("*"))&&n.slice().map(function(s){s(e,r)})}}}var R=pt(Ir(),1),xe=(0,R.createContext)(null),Zt=t=>{let{controller:e}=(0,R.useContext)(xe),r=R.useRef(Symbol("fill"));return(0,R.useEffect)(()=>(e.mount({name:t.name,ref:r.current,children:t.children}),()=>{e.unmount({name:t.name,ref:r.current})}),[]),(0,R.useEffect)(()=>{e.update({name:t.name,ref:r.current,children:t.children})}),null},er=Object.defineProperty,tr=(t,e,r)=>e in t?er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Be=(t,e,r)=>(tr(t,typeof e=="symbol"?e:e+"",r),r),He=console,rr=class{constructor(t){Be(this,"_bus"),Be(this,"_db"),this._bus=t,this.handleFillMount=this.handleFillMount.bind(this),this.handleFillUpdated=this.handleFillUpdated.bind(this),this.handleFillUnmount=this.handleFillUnmount.bind(this),this._db={byName:new Map,byFill:new Map}}mount(){this._bus.on("fill-mount",this.handleFillMount),this._bus.on("fill-updated",this.handleFillUpdated),this._bus.on("fill-unmount",this.handleFillUnmount)}unmount(){this._bus.off("fill-mount",this.handleFillMount),this._bus.off("fill-updated",this.handleFillUpdated),this._bus.off("fill-unmount",this.handleFillUnmount)}handleFillMount({fill:t}){let e=R.Children.toArray(t.children),r=t.name,n={fill:t,children:e,name:r},s=this._db.byName.get(r);s?(s.components.push(n),s.listeners.forEach(i=>i([...s.components]))):this._db.byName.set(r,{listeners:[],components:[n]}),this._db.byFill.set(t.ref,n)}handleFillUpdated({fill:t}){let e=this._db.byFill.get(t.ref),r=R.Children.toArray(t.children);if(e){e.children=r;let n=this._db.byName.get(e.name);if(n)n.listeners.forEach(s=>s([...n.components]));else throw Error("registration was expected to be defined")}else{He.error("[handleFillUpdated] component was expected to be defined");return}}handleFillUnmount({fill:t}){let e=this._db.byFill.get(t.ref);if(!e){He.error("[handleFillUnmount] component was expected to be defined");return}let r=e.name,n=this._db.byName.get(r);if(!n)throw Error("registration was expected to be defined");n.components=n.components.filter(s=>s!==e),this._db.byFill.delete(t.ref),n.listeners.length===0&&n.components.length===0?this._db.byName.delete(r):n.listeners.forEach(s=>s([...n.components]))}onComponentsChange(t,e){let r=this._db.byName.get(t);r?(r.listeners.push(e),e(r.components)):(this._db.byName.set(t,{listeners:[e],components:[]}),e([]))}getFillsByName(t){let e=this._db.byName.get(t);return e?e.components.map(r=>r.fill):[]}getChildrenByName(t){let e=this._db.byName.get(t);return e?e.components.map(r=>r.children).reduce((r,n)=>r.concat(n),[]):[]}removeOnComponentsChange(t,e){let r=this._db.byName.get(t);if(!r)throw Error("expected registration to be defined");let n=r.listeners;n.splice(n.indexOf(e),1)}},nr=Object.defineProperty,sr=(t,e,r)=>e in t?nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e,r)=>(sr(t,typeof e=="symbol"?e:e+"",r),r),$e=class{constructor(){ir(this,"bus",de())}mount(t){this.bus.emit("fill-mount",{fill:t})}unmount(t){this.bus.emit("fill-unmount",{fill:t})}update(t){this.bus.emit("fill-updated",{fill:t})}};function ar(t){let e=t||new $e;return{controller:e,manager:new rr(e.bus)}}Mt=({controller:t,children:e})=>{let[r]=R.useState(()=>{let n=ar(t);return n.manager.mount(),n});return R.useEffect(()=>()=>{r.manager.unmount()},[]),R.createElement(xe.Provider,{value:r},e)},we=function(t,e){let[r,n]=(0,R.useState)([]),{manager:s}=(0,R.useContext)(xe);return(0,R.useEffect)(()=>(s.onComponentsChange(t,n),()=>{s.removeOnComponentsChange(t,n)}),[t]),r.flatMap((i,u)=>{let{children:d}=i;return d.map((p,b)=>{if(typeof p=="number"||typeof p=="string")throw Error("Only element children will work here");return R.cloneElement(p,{key:u.toString()+b.toString(),...e})})})},Ne=t=>{let e=we(t.name,t.childProps);if(typeof t.children=="function"){let r=t.children(e);if(R.isValidElement(r)||r===null)return r;throw Error("Slot rendered with function must return a valid React Element.")}return e},jt=V(null);var{valueAtom:or,useActions:lr}=on(()=>({banners:[]}),{addBanner:(t,e)=>({...t,banners:[...t.banners,{...e,id:Ct()}]}),removeBanner:(t,e)=>({...t,banners:t.banners.filter(r=>r.id!==e)}),clearBanners:t=>({...t,banners:[]})});Nt=()=>Ar(or),qt=function(){return lr()},Pt=new $e,oe={SIDEBAR:"sidebar",CONTEXT_AWARE_PANEL:"context-aware-panel"};let Ve,Xe,Ye;Ve=class{constructor(){a(this,"subscriptions",new Map)}addSubscription(t,e){var r;this.subscriptions.has(t)||this.subscriptions.set(t,new Set),(r=this.subscriptions.get(t))==null||r.add(e)}removeSubscription(t,e){var r;(r=this.subscriptions.get(t))==null||r.delete(e)}notify(t,e){for(let r of this.subscriptions.get(t)??[])r(e)}},Ue=class De{constructor(e){a(this,"subscriptions",new Ve);this.producer=e}static withProducerCallback(e){return new De(e)}static empty(){return new De}startProducer(){this.producer&&this.producer(e=>{this.subscriptions.notify("message",e)})}connect(){return new Promise(e=>setTimeout(e,0)).then(()=>{this.subscriptions.notify("open",new Event("open"))})}get readyState(){return WebSocket.OPEN}reconnect(e,r){this.close(),this.connect()}close(){this.subscriptions.notify("close",new Event("close"))}send(e){return this.subscriptions.notify("message",new MessageEvent("message",{data:e})),Promise.resolve()}addEventListener(e,r){this.subscriptions.addSubscription(e,r),e==="open"&&r(new Event("open")),e==="message"&&this.startProducer()}removeEventListener(e,r){this.subscriptions.removeSubscription(e,r)}},Xe=1e10,Ye=1e3;function ue(t,e){let r=t.map(n=>`"${n}"`).join(", ");return Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`)}function dr(t={}){let e={};function r(o){e=o}let n={};function s(o){var m;n.unregisterHandler&&n.unregisterHandler(),n=o,(m=n.registerHandler)==null||m.call(n,ne)}let i;function u(o){if(typeof o=="function"){i=o;return}i=(m,v)=>{let c=o[m];if(c)return c(v);let w=o._;if(!w)throw Error(`The requested method has no handler: ${m}`);return w(m,v)}}let{maxRequestTime:d=Ye}=t;t.transport&&s(t.transport),t.requestHandler&&u(t.requestHandler),t._debugHooks&&r(t._debugHooks);let p=0;function b(){return p<=Xe?++p:p=0}let C=new Map,_=new Map;function q(o,...m){let v=m[0];return new Promise((c,w)=>{var ee;if(!n.send)throw ue(["send"],"make requests");let U=b(),J={type:"request",id:U,method:o,params:v};C.set(U,{resolve:c,reject:w}),d!==1/0&&_.set(U,setTimeout(()=>{_.delete(U),w(Error("RPC request timed out."))},d)),(ee=e.onSend)==null||ee.call(e,J),n.send(J)})}let M=new Proxy(q,{get:(o,m,v)=>m in o?Reflect.get(o,m,v):c=>q(m,c)}),P=M;function j(o,...m){var w;let v=m[0];if(!n.send)throw ue(["send"],"send messages");let c={type:"message",id:o,payload:v};(w=e.onSend)==null||w.call(e,c),n.send(c)}let L=new Proxy(j,{get:(o,m,v)=>m in o?Reflect.get(o,m,v):c=>j(m,c)}),S=L,A=new Map,H=new Set;function Z(o,m){var v;if(!n.registerHandler)throw ue(["registerHandler"],"register message listeners");if(o==="*"){H.add(m);return}A.has(o)||A.set(o,new Set),(v=A.get(o))==null||v.add(m)}function re(o,m){var v,c;if(o==="*"){H.delete(m);return}(v=A.get(o))==null||v.delete(m),((c=A.get(o))==null?void 0:c.size)===0&&A.delete(o)}async function ne(o){var m,v;if((m=e.onReceive)==null||m.call(e,o),!("type"in o))throw Error("Message does not contain a type.");if(o.type==="request"){if(!n.send||!i)throw ue(["send","requestHandler"],"handle requests");let{id:c,method:w,params:U}=o,J;try{J={type:"response",id:c,success:!0,payload:await i(w,U)}}catch(ee){if(!(ee instanceof Error))throw ee;J={type:"response",id:c,success:!1,error:ee.message}}(v=e.onSend)==null||v.call(e,J),n.send(J);return}if(o.type==="response"){let c=_.get(o.id);c!=null&&clearTimeout(c);let{resolve:w,reject:U}=C.get(o.id)??{};o.success?w==null||w(o.payload):U==null||U(Error(o.error));return}if(o.type==="message"){for(let w of H)w(o.id,o.payload);let c=A.get(o.id);if(!c)return;for(let w of c)w(o.payload);return}throw Error(`Unexpected RPC message type: ${o.type}`)}return{setTransport:s,setRequestHandler:u,request:M,requestProxy:P,send:L,sendProxy:S,addMessageListener:Z,removeMessageListener:re,proxy:{send:S,request:P},_setDebugHooks:r}}function ur(t){return dr(t)}var Qe="[transport-id]";function cr(t,e){let{transportId:r}=e;return r==null?t:{[Qe]:r,data:t}}function hr(t,e){let{transportId:r,filter:n}=e,s=n==null?void 0:n();if(r!=null&&s!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let i=t;if(r){if(t[Qe]!==r)return[!0];i=t.data}return s===!1?[!0]:[!1,i]}function mr(t,e={}){let{transportId:r,filter:n,remotePort:s}=e,i=t,u=s??t,d;return{send(p){u.postMessage(cr(p,{transportId:r}))},registerHandler(p){d=b=>{let C=b.data,[_,q]=hr(C,{transportId:r,filter:()=>n==null?void 0:n(b)});_||p(q)},i.addEventListener("message",d)},unregisterHandler(){d&&i.removeEventListener("message",d)}}}function pr(t,e){return mr(t,e)}function Je(t){return ur({transport:pr(t,{transportId:"marimo-transport"}),maxRequestTime:2e4,_debugHooks:{onSend:e=>{f.debug("[rpc] Parent -> Worker",e)},onReceive:e=>{f.debug("[rpc] Worker -> Parent",e)}}})}Fe=V("Initializing..."),Ut=V(t=>{let e=t(Wr),r=Object.values(e.cellRuntime);return r.some(n=>!dn(n.output))?!0:r.every(n=>n.status==="idle")});var Ge=mn(),Ke="marimo:file",Ze=new Or(null);const fr={saveFile(t){Ze.set(Ke,t)},readFile(){return Ze.get(Ke)}};var gr={saveFile(t){ie.setCodeForHash((0,Ge.compressToEncodedURIComponent)(t))},readFile(){let t=ie.getCodeFromHash()||ie.getCodeFromSearchParam();return t?(0,Ge.decompressFromEncodedURIComponent)(t):null}};const yr={saveFile(t){},readFile(){let t=document.querySelector("marimo-code");return t?decodeURIComponent(t.textContent||"").trim():null}};var br={saveFile(t){},readFile(){if(window.location.hostname!=="marimo.app")return null;let t=new URL("files/wasm-intro.py",document.baseURI);return fetch(t.toString()).then(e=>e.ok?e.text():null).catch(()=>null)}};const wr={saveFile(t){},readFile(){return se.get(Tr)??null}};var vr={saveFile(t){},readFile(){return["import marimo","app = marimo.App()","","@app.cell","def __():"," return","",'if __name__ == "__main__":'," app.run()"].join(`
2
2
  `)}},et=class{constructor(t){this.stores=t}insert(t,e){this.stores.splice(t,0,e)}saveFile(t){this.stores.forEach(e=>e.saveFile(t))}readFile(){for(let t of this.stores){let e=t.readFile();if(e)return e}return null}};let ce;le=new et([wr,yr,gr]),ce=new et([fr,br,vr]),ke=class Xt{constructor(){a(this,"initialized",new Et);a(this,"sendRename",async({filename:e})=>(e===null||(ie.setFilename(e),await this.rpc.proxy.request.bridge({functionName:"rename_file",payload:e})),null));a(this,"sendSave",async e=>{if(!this.saveRpc)return f.warn("Save RPC not initialized"),null;await this.saveRpc.saveNotebook(e);let r=await this.readCode();return r.contents&&(le.saveFile(r.contents),ce.saveFile(r.contents)),this.rpc.proxy.request.saveNotebook(e).catch(n=>{f.error(n)}),null});a(this,"sendCopy",async()=>{x()});a(this,"sendStdin",async e=>(await this.rpc.proxy.request.bridge({functionName:"put_input",payload:e.text}),null));a(this,"sendPdb",async()=>{x()});a(this,"sendRun",async e=>(await this.rpc.proxy.request.loadPackages(e.codes.join(`
3
3
  `)),await this.putControlRequest({type:"execute-cells",...e}),null));a(this,"sendRunScratchpad",async e=>(await this.rpc.proxy.request.loadPackages(e.code),await this.putControlRequest({type:"execute-scratchpad",...e}),null));a(this,"sendInterrupt",async()=>(this.interruptBuffer!==void 0&&(this.interruptBuffer[0]=2),null));a(this,"sendShutdown",async()=>(window.close(),null));a(this,"sendFormat",async e=>await this.rpc.proxy.request.bridge({functionName:"format",payload:e}));a(this,"sendDeleteCell",async e=>(await this.putControlRequest({type:"delete-cell",...e}),null));a(this,"sendInstallMissingPackages",async e=>(this.putControlRequest({type:"install-packages",...e}),null));a(this,"sendCodeCompletionRequest",async e=>(se.get(Hr)||await this.rpc.proxy.request.bridge({functionName:"code_complete",payload:e}),null));a(this,"saveUserConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_user_config",payload:e}),en.post("/kernel/save_user_config",e,{baseUrl:"/"}).catch(r=>(f.error(r),null))));a(this,"saveAppConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_app_config",payload:e}),null));a(this,"saveCellConfig",async e=>(await this.putControlRequest({type:"update-cell-config",...e}),null));a(this,"sendRestart",async()=>{let e=await this.readCode();return e.contents&&(le.saveFile(e.contents),ce.saveFile(e.contents)),pn(),null});a(this,"readCode",async()=>this.saveRpc?{contents:await this.saveRpc.readNotebook()}:(f.warn("Save RPC not initialized"),{contents:""}));a(this,"readSnippets",async()=>await this.rpc.proxy.request.bridge({functionName:"read_snippets",payload:void 0}));a(this,"openFile",async({path:e})=>{let r=fn({code:null,baseUrl:window.location.origin});return window.open(r,"_blank"),null});a(this,"sendListFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"list_files",payload:e}));a(this,"sendSearchFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"search_files",payload:e}));a(this,"sendComponentValues",async e=>(await this.putControlRequest({type:"update-ui-element",...e,token:Ct()}),null));a(this,"sendInstantiate",async e=>null);a(this,"sendFunctionRequest",async e=>(await this.putControlRequest({type:"invoke-function",...e}),null));a(this,"sendCreateFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"create_file_or_directory",payload:e}));a(this,"sendDeleteFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"delete_file_or_directory",payload:e}));a(this,"sendRenameFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"move_file_or_directory",payload:e}));a(this,"sendUpdateFile",async e=>await this.rpc.proxy.request.bridge({functionName:"update_file",payload:e}));a(this,"sendFileDetails",async e=>await this.rpc.proxy.request.bridge({functionName:"file_details",payload:e}));a(this,"exportAsHTML",async e=>await this.rpc.proxy.request.bridge({functionName:"export_html",payload:e}));a(this,"exportAsMarkdown",async e=>await this.rpc.proxy.request.bridge({functionName:"export_markdown",payload:e}));a(this,"previewDatasetColumn",async e=>(await this.putControlRequest({type:"preview-dataset-column",...e}),null));a(this,"previewSQLTable",async e=>(await this.putControlRequest({type:"preview-sql-table",...e}),null));a(this,"previewSQLTableList",async e=>(await this.putControlRequest({type:"list-sql-tables",...e}),null));a(this,"previewDataSourceConnection",async e=>(await this.putControlRequest({type:"list-data-source-connection",...e}),null));a(this,"validateSQL",async e=>(await this.putControlRequest({type:"validate-sql",...e}),null));a(this,"sendModelValue",async e=>(await this.putControlRequest({type:"model",...e}),null));a(this,"syncCellIds",()=>Promise.resolve(null));a(this,"addPackage",async e=>this.rpc.proxy.request.addPackage(e));a(this,"removePackage",async e=>this.rpc.proxy.request.removePackage(e));a(this,"getPackageList",async()=>await this.rpc.proxy.request.listPackages());a(this,"getDependencyTree",async()=>({tree:{dependencies:[],name:"",tags:[],version:null}}));a(this,"listSecretKeys",async e=>(await this.putControlRequest({type:"list-secret-keys",...e}),null));a(this,"getUsageStats",x);a(this,"openTutorial",x);a(this,"getRecentFiles",x);a(this,"getWorkspaceFiles",x);a(this,"getRunningNotebooks",x);a(this,"shutdownSession",x);a(this,"exportAsPDF",x);a(this,"autoExportAsHTML",x);a(this,"autoExportAsMarkdown",x);a(this,"autoExportAsIPYNB",x);a(this,"updateCellOutputs",x);a(this,"writeSecret",x);a(this,"invokeAiTool",x);a(this,"clearCache",x);a(this,"getCacheInfo",x);a(this,"listStorageEntries",x);a(this,"downloadStorage",x);Kr()&&(this.rpc=Je(new Worker(new URL(""+new URL("worker-BPV9SmHz.js",import.meta.url).href,""+import.meta.url),{type:"module",name:yt()})),this.rpc.addMessageListener("ready",()=>{this.startSession()}),this.rpc.addMessageListener("initialized",()=>{this.saveRpc=this.getSaveWorker(),this.setInterruptBuffer(),this.initialized.resolve()}),this.rpc.addMessageListener("initializingMessage",({message:e})=>{se.set(Fe,e)}),this.rpc.addMessageListener("initializedError",({error:e})=>{this.initialized.status==="resolved"&&(f.error(e),hn({title:"Error initializing",description:e,variant:"danger"})),this.initialized.reject(Error(e))}),this.rpc.addMessageListener("kernelMessage",({message:e})=>{var r;(r=this.messageConsumer)==null||r.call(this,new MessageEvent("message",{data:e}))}))}static get INSTANCE(){let e="_marimo_private_PyodideBridge";return window[e]||(window[e]=new Xt),window[e]}getSaveWorker(){return ft()==="read"?(f.debug("Skipping SaveWorker in read-mode"),{readFile:x,readNotebook:x,saveNotebook:x}):Je(new Worker(new URL(""+new URL("save-worker-CtJsIYIM.js",import.meta.url).href,""+import.meta.url),{type:"module",name:yt()})).proxy.request}async startSession(){let e=await le.readFile(),r=await ce.readFile(),n=se.get(Dr)??ie.getFilename(),s=se.get(Gr),i={},u=new URLSearchParams(window.location.search);for(let d of u.keys()){let p=u.getAll(d);i[d]=p.length===1?p[0]:p}await this.rpc.proxy.request.startSession({queryParameters:i,code:e||r||"",filename:n,userConfig:{...s,runtime:{...s.runtime,auto_instantiate:ft()==="read"?!0:s.runtime.auto_instantiate}}})}setInterruptBuffer(){crossOriginIsolated?(this.interruptBuffer=new Uint8Array(new SharedArrayBuffer(1)),this.rpc.proxy.request.setInterruptBuffer(this.interruptBuffer)):f.warn("Not running in a secure context; interrupts are not available.")}attachMessageConsumer(e){this.messageConsumer=e,this.rpc.proxy.send.consumerReady({})}async putControlRequest(e){await this.rpc.proxy.request.bridge({functionName:"put_control_request",payload:e})}},kt=function(){return Ue.withProducerCallback(t=>{ke.INSTANCE.attachMessageConsumer(t)})},Ht=function(t=Re()){let e=window.fetch;return window.fetch=async(r,n)=>{let s=r instanceof Request?r.url:r.toString();if(s.startsWith("data:"))return e(r,n);try{let i=he(s,t);if(i){let u=await(await e(i)).arrayBuffer();return new Response(u,{headers:{"Content-Type":xr(s)}})}return e(r,n)}catch(i){return f.error("Error parsing URL",i),e(r,n)}},()=>{window.fetch=e}};function xr(t){return t.endsWith(".csv")?"text/csv":t.endsWith(".json")?"application/json":t.endsWith(".txt")?"text/plain":"application/octet-stream"}Lt=function(t,e=Re()){let r=t.http.bind(t),n=t.load.bind(t);return t.http=async s=>{let i=he(s,e);if(i)return await window.fetch(i).then(u=>u.text());try{return await r(s)}catch(u){if(s.startsWith("data:"))return await window.fetch(s).then(d=>d.text());throw u}},t.load=async s=>{let i=he(s,e);if(i)return await window.fetch(i).then(u=>u.text());try{return await n(s)}catch(u){if(s.startsWith("data:"))return await window.fetch(s).then(d=>d.text());throw u}},()=>{t.http=r,t.load=n}};function tt(t){return t.startsWith(".")?t.slice(1):t}function _r(t,e=Re()){let r=he(t,e);if(!r)return t;let n=gn(r);return URL.createObjectURL(n)}function he(t,e){let r=document.baseURI;r.startsWith("blob:")&&(r=r.replace("blob:",""));let n=new URL(t,r).pathname,s=rt(t),i=rt(n);return e[t]||e[tt(t)]||e[n]||e[tt(n)]||s&&e[s]||i&&e[i]}function rt(t){let e=t.indexOf("/@file/");return e===-1?null:t.slice(e)}function _e(t,e=[]){let r=[];if(t instanceof DataView)r.push(e);else if(Array.isArray(t))for(let[n,s]of t.entries())r.push(..._e(s,[...e,n]));else if(typeof t=="object"&&t)for(let[n,s]of Object.entries(t))r.push(..._e(s,[...e,n]));return r}function Er(t){let e=_e(t);if(e.length===0)return{state:t,buffers:[],bufferPaths:[]};let r=structuredClone(t),n=[],s=[];for(let i of e){let u=Vr(t,i);if(u instanceof DataView){let d=xt(u);n.push(d),s.push(i),ae(r,i,d)}}return{state:r,buffers:n,bufferPaths:s}}function nt(t){let{state:e,bufferPaths:r,buffers:n}=t;if(!r||r.length===0)return e;n&&Jr(n.length===r.length,"Buffers and buffer paths not the same length");let s=e;for(let[i,u]of r.entries()){let d=n==null?void 0:n[i];if(d==null){f.warn("[anywidget] Could not find buffer at path",u);continue}typeof d=="string"?ae(s,u,_t(d)):ae(s,u,d)}return s}const st={invoke:async()=>{let t="anywidget.invoke not supported in marimo. Please file an issue at https://github.com/marimo-team/marimo/issues";throw f.warn(t),Error(t)}};function Cr(t){if(typeof AbortSignal.any=="function")return AbortSignal.any(t);let e=new AbortController;for(let r of t){if(r.aborted)return e.abort(r.reason),e.signal;r.addEventListener("abort",()=>e.abort(r.reason),{once:!0})}return e.signal}var Rr=(lt=class{constructor(){F(this,pe);F(this,X,new Map)}getModule(t,e){let r=l(this,X).get(e);if(r)return r;let n=$(this,pe,Yt).call(this,t).catch(s=>{throw l(this,X).delete(e),s});return l(this,X).set(e,n),n}invalidate(t){f.debug(`[WidgetDefRegistry] Invalidating module cache for hash=${t}`),l(this,X).delete(t)}},X=new WeakMap,pe=new WeakSet,Yt=async function(t){let e=Zr(t).toString();return wt()&&(e=_r(e)),cn(()=>import(e).then(async r=>(await r.__tla,r)),[],import.meta.url)},lt),Sr=(dt=class{constructor(){F(this,T);F(this,Y);F(this,I)}async bind(t,e){var i,u;if(l(this,I)&&l(this,Y)===t)return l(this,I);l(this,I)&&l(this,Y)!==t&&(f.debug("[WidgetBinding] Hot-reload detected, aborting previous binding"),(i=l(this,T))==null||i.abort(),k(this,T,void 0),k(this,I,void 0)),k(this,Y,t),k(this,T,new AbortController);let r=l(this,T).signal,n=typeof t=="function"?await t():t,s=await((u=n.initialize)==null?void 0:u.call(n,{model:e,experimental:st}));return s&&r.addEventListener("abort",s),k(this,I,async(d,p)=>{var C;let b=await((C=n.render)==null?void 0:C.call(n,{model:e,el:d,experimental:st}));b&&Cr([p,r]).addEventListener("abort",()=>{let _=p.aborted?"view unmount":"binding destroyed";f.debug(`[WidgetBinding] Render cleanup triggered (reason: ${_})`),b()})}),l(this,I)}destroy(){var t;f.debug("[WidgetBinding] Destroying binding, aborting initialize lifecycle"),(t=l(this,T))==null||t.abort(),k(this,T,void 0),k(this,Y,void 0),k(this,I,void 0)}},T=new WeakMap,Y=new WeakMap,I=new WeakMap,dt),Fr=(ut=class{constructor(){F(this,z,new Map)}getOrCreate(t){let e=l(this,z).get(t);return e||(e=new Sr,l(this,z).set(t,e)),e}destroy(t){let e=l(this,z).get(t);e&&(f.debug(`[BindingManager] Destroying binding for model=${t}`),e.destroy(),l(this,z).delete(t))}has(t){return l(this,z).has(t)}},z=new WeakMap,ut);Ft=new Rr,qe=new Fr;var kr=(ct=class{constructor(t=1e4){F(this,G);F(this,W,new Map);F(this,te);k(this,te,t)}get(t){let e=$(this,G,ve).call(this,t);return e.deferred.status==="pending"&&setTimeout(()=>{e.deferred.status==="pending"&&(e.deferred.reject(Error(`Model not found for key: ${t}`)),l(this,W).delete(t))},l(this,te)),e.deferred.promise}create(t,e){let r=$(this,G,ve).call(this,t);r.deferred.resolve(e(r.controller.signal))}set(t,e){$(this,G,ve).call(this,t).deferred.resolve(e)}getSync(t){let e=l(this,W).get(t);if(e&&e.deferred.status==="resolved")return e.deferred.value}delete(t){var e;f.debug(`[ModelManager] Deleting model=${t}, aborting lifecycle signal`),(e=l(this,W).get(t))==null||e.controller.abort(),l(this,W).delete(t)}},W=new WeakMap,te=new WeakMap,G=new WeakSet,ve=function(t){let e=l(this,W).get(t);return e||(e={deferred:new Et,controller:new AbortController},l(this,W).set(t,e)),e},ct),it=Symbol("marimo");function Ee(t){return t[it]}be=new kr;var Nr=(ht=it,Q=class{constructor(e,r,n){F(this,B);F(this,fe,"change");F(this,O);F(this,D);F(this,K);F(this,N,{});a(this,ht,{updateAndEmitDiffs:e=>$(this,B,Jt).call(this,e),emitCustomMessage:(e,r)=>$(this,B,Gt).call(this,e,r)});a(this,"widget_manager",{async get_model(e){let r=await Q._modelManager.get(e);if(!r)throw Error(`Model not found with id: ${e}. This is likely because the model was not registered.`);return r}});F(this,ge,Yr(()=>{let e=l(this,N)[l(this,fe)];if(e)for(let r of e)try{r()}catch(n){f.error("Error emitting event",n)}},0));k(this,D,e),k(this,K,r),k(this,O,new Map),n&&n.addEventListener("abort",()=>{f.debug("[Model] Signal aborted, clearing all listeners"),k(this,N,{})})}off(e,r){var n;if(!e){k(this,N,{});return}if(!r){l(this,N)[e]=new Set;return}(n=l(this,N)[e])==null||n.delete(r)}send(e,r,n){let s=(n??[]).map(i=>i instanceof ArrayBuffer?new DataView(i):new DataView(i.buffer,i.byteOffset,i.byteLength));return l(this,K).sendCustomMessage(e,s).then(()=>r==null?void 0:r())}get(e){return l(this,D)[e]}set(e,r){k(this,D,{...l(this,D),[e]:r}),l(this,O).set(e,r),$(this,B,Qt).call(this,`change:${e}`,r),l(this,ge).call(this)}save_changes(){if(l(this,O).size===0)return;let e=Object.fromEntries(l(this,O).entries());l(this,O).clear(),l(this,K).sendUpdate(e)}on(e,r){l(this,N)[e]||(l(this,N)[e]=new Set),l(this,N)[e].add(r)}},fe=new WeakMap,O=new WeakMap,D=new WeakMap,K=new WeakMap,N=new WeakMap,B=new WeakSet,Qt=function(e,r){if(!l(this,N)[e])return;let n=l(this,N)[e];for(let s of n)try{s(r)}catch(i){f.error("Error emitting event",i)}},Jt=function(e){e!=null&&Object.keys(e).forEach(r=>{let n=r;l(this,D)[n]!==e[n]&&this.set(n,e[n])})},Gt=function(e,r=[]){let n=l(this,N)["msg:custom"];if(n)for(let s of n)try{s(e.content,r)}catch(i){f.error("Error emitting event",i)}},ge=new WeakMap,a(Q,"_modelManager",be),Q);$t=async function(t,e){let r=e.model_id,n=e.message,s=("buffers"in n?n.buffers:[]).map(_t);switch(n.method){case"open":{let{state:i,buffer_paths:u=[]}=n,d=nt({state:i,bufferPaths:u,buffers:s}),p=t.getSync(r);if(p){Ee(p).updateAndEmitDiffs(d);return}t.create(r,b=>new Nr(d,wt()?{sendUpdate:async()=>{},sendCustomMessage:async()=>{}}:{async sendUpdate(C){if(b.aborted){f.debug(`[Model] sendUpdate suppressed for model=${r} (signal aborted)`);return}let{state:_,buffers:q,bufferPaths:M}=Er(C);await Se().sendModelValue({modelId:r,message:{method:"update",state:_,bufferPaths:M},buffers:q})},async sendCustomMessage(C,_){if(b.aborted){f.debug(`[Model] sendCustomMessage suppressed for model=${r} (signal aborted)`);return}await Se().sendModelValue({modelId:r,message:{method:"custom",content:C},buffers:_.map(xt)})}},b));return}case"custom":Ee(await t.get(r)).emitCustomMessage({method:"custom",content:n.content},s);return;case"close":qe.destroy(r),t.delete(r);return;case"update":{let{state:i,buffer_paths:u=[]}=n,d=nt({state:i,bufferPaths:u,buffers:s});Ee(await t.get(r)).updateAndEmitDiffs(d);return}default:Xr(n)}},Ur(be,"MODEL_MANAGER");function me(t){return()=>({TYPE:t,is(e){return e.type===t},create(e){return new CustomEvent(t,e)}})}Le=me("marimo-value-input")(),Oe=me("marimo-value-update")(),Me=me("marimo-value-ready")(),Ae=me("marimo-incoming-message")(),Vt=function(t,e){return Le.create({bubbles:!0,composed:!0,detail:{value:t,element:e}})},We=class Kt{static get INSTANCE(){let e="_marimo_private_UIElementRegistry";return window[e]||(window[e]=new Kt),window[e]}constructor(){this.entries=new Map}has(e){return this.entries.has(e)}set(e,r){this.entries.has(e)&&f.debug("UIElementRegistry overwriting entry for objectId.",e),this.entries.set(e,{objectId:e,value:r,elements:new Set})}registerInstance(e,r){let n=this.entries.get(e);n===void 0?this.entries.set(e,{objectId:e,value:Br(r,this),elements:new Set([r])}):n.elements.add(r)}removeInstance(e,r){let n=this.entries.get(e);n!=null&&n.elements.has(r)&&n.elements.delete(r)}removeElementsByCell(e){[...this.entries.keys()].filter(r=>r.startsWith(`${e}-`)).forEach(r=>{this.entries.delete(r)})}lookupValue(e){let r=this.entries.get(e);return r===void 0?void 0:r.value}broadcastMessage(e,r,n){let s=this.entries.get(e);s===void 0?f.warn("UIElementRegistry missing entry",e):s.elements.forEach(i=>{i.dispatchEvent(Ae.create({bubbles:!1,composed:!0,detail:{objectId:e,message:r,buffers:n}}))})}broadcastValueUpdate(e,r,n){let s=this.entries.get(r);s===void 0?f.warn("UIElementRegistry missing entry",r):(s.value=n,s.elements.forEach(i=>{i!==e&&i.dispatchEvent(Oe.create({bubbles:!1,composed:!0,detail:{value:n,element:i}}))}),document.dispatchEvent(Me.create({bubbles:!0,composed:!0,detail:{objectId:r}})))}},Wt=We.INSTANCE,It=new un("function-call-result",async(t,e)=>{await Se().sendFunctionRequest({functionCallId:t,...e})}),Tt="68px";var qr="288px";let at;Bt=t=>t?/^\d+$/.test(t)?`${t}px`:t:qr,At=zr({isOpen:!0},(t,e)=>{if(!e)return t;switch(e.type){case"toggle":return{...t,isOpen:e.isOpen??t.isOpen};case"setWidth":return{...t,width:e.width};default:return t}}),Te=V(null),Ot=V(null),Pe=V(!1),at=V(!1),je=V(!1);var Mr=gt();Ie=t=>{let e=(0,Mr.c)(8),{onResize:r,startingWidth:n,minWidth:s,maxWidth:i}=t,u=(0,R.useRef)(null),d=(0,R.useRef)(null),p=(0,R.useRef)(null),b,C;e[0]!==i||e[1]!==s||e[2]!==r?(b=()=>{let P=u.current,j=d.current,L=p.current;if(!P||!j&&!L)return;let S=Number.parseInt(window.getComputedStyle(P).width,10),A=0,H=!1,Z=null,re=c=>{if(!P||!H||!Z)return;let w=c.clientX-A;A=c.clientX,S=Z==="left"?S-w:S+w,s&&(S=Math.max(s,S)),i&&(S=Math.min(i,S)),P.style.width=`${S}px`},ne=()=>{H&&(r==null||r(S),H=!1,Z=null),document.removeEventListener("mousemove",re),document.removeEventListener("mouseup",ne)},o=(c,w)=>{c.preventDefault(),H=!0,Z=w,A=c.clientX,document.addEventListener("mousemove",re),document.addEventListener("mouseup",ne)},m=c=>o(c,"left"),v=c=>o(c,"right");return j&&j.addEventListener("mousedown",m),L&&L.addEventListener("mousedown",v),()=>{j&&j.removeEventListener("mousedown",m),L&&L.removeEventListener("mousedown",v),document.removeEventListener("mousemove",re),document.removeEventListener("mouseup",ne)}},C=[s,i,r],e[0]=i,e[1]=s,e[2]=r,e[3]=b,e[4]=C):(b=e[3],C=e[4]),(0,R.useEffect)(b,C);let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_={left:d,right:p},e[5]=_):_=e[5];let q=n==="contentWidth"?"var(--content-width-medium)":`${n}px`,M;return e[6]===q?M=e[7]:(M={resizableDivRef:u,handleRefs:_,style:{width:q}},e[6]=q,e[7]=M),M},ze=function(t){t||window.dispatchEvent(new Event("resize"))};var ot=gt(),h=pt(tn(),1);Dt=()=>{let t=(0,ot.c)(16),[e,r]=ye(Te),[n,s]=ye(Pe),[i,u]=ye(at),[d,p]=ye(je),b;t[0]!==s||t[1]!==r?(b=()=>{r(null),s(!1)},t[0]=s,t[1]=r,t[2]=b):b=t[2];let C=b;if(we(oe.CONTEXT_AWARE_PANEL).length===0||!e||!n)return null;let _;t[3]!==d||t[4]!==i||t[5]!==p||t[6]!==u?(_=()=>(0,h.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,h.jsx)(Rt,{content:i?"Unpin panel":"Pin panel",children:(0,h.jsx)(St,{size:"xs",onPressedChange:()=>u(!i),pressed:i,"aria-label":i?"Unpin panel":"Pin panel",children:i?(0,h.jsx)(E,{className:"w-4 h-4"}):(0,h.jsx)(sn,{className:"w-4 h-4"})})}),(0,h.jsx)(Rt,{content:d?(0,h.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,h.jsx)("span",{children:"Follow focused table"}),(0,h.jsx)("span",{className:"text-xs text-muted-foreground w-64",children:"The panel updates as cells that output tables are focused. Click to fix to the current cell."})]}):(0,h.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,h.jsx)("span",{children:"Focus on current table"}),(0,h.jsx)("span",{className:"text-xs text-muted-foreground w-64",children:"The panel is focused on the current table. Click to update based on which cell is focused."})]}),children:(0,h.jsx)(St,{size:"xs",onPressedChange:()=>p(!d),pressed:d,"aria-label":d?"Follow focused cell":"Fixed",children:(0,h.jsx)(y,{className:nn("w-4 h-4",d&&"text-primary")})})})]}),t[3]=d,t[4]=i,t[5]=p,t[6]=u,t[7]=_):_=t[7];let q=_,M;t[8]!==C||t[9]!==q?(M=()=>(0,h.jsxs)("div",{className:"mt-2 pb-7 mb-4 h-full overflow-auto",children:[(0,h.jsxs)("div",{className:"flex flex-row justify-between items-center mx-2",children:[q(),(0,h.jsx)(rn,{variant:"linkDestructive",size:"icon",onClick:C,"aria-label":"Close selection panel",children:(0,h.jsx)(ln,{className:"w-4 h-4"})})]}),(0,h.jsx)(bt,{children:(0,h.jsx)(Ne,{name:oe.CONTEXT_AWARE_PANEL})})]}),t[8]=C,t[9]=q,t[10]=M):M=t[10];let P=M;if(!i){let S;return t[11]===P?S=t[12]:(S=(0,h.jsx)(Pr,{children:P()}),t[11]=P,t[12]=S),S}let j;t[13]===Symbol.for("react.memo_cache_sentinel")?(j=(0,h.jsx)(yn,{onDragging:ze,className:"resize-handle border-border z-20 print:hidden border-l"}),t[13]=j):j=t[13];let L;return t[14]===P?L=t[15]:(L=(0,h.jsxs)(h.Fragment,{children:[j,(0,h.jsx)(bn,{defaultSize:20,minSize:15,maxSize:80,children:P()})]}),t[14]=P,t[15]=L),L},zt=t=>{let e=(0,ot.c)(2),{children:r}=t,n;return e[0]===r?n=e[1]:(n=(0,h.jsx)(bt,{children:(0,h.jsx)(Zt,{name:oe.CONTEXT_AWARE_PANEL,children:r})}),e[0]=r,e[1]=n),n};var Pr=({children:t})=>{let{resizableDivRef:e,handleRefs:r,style:n}=Ie({startingWidth:400,minWidth:300,maxWidth:1500});return(0,h.jsxs)("div",{className:"absolute z-40 right-0 h-full bg-background flex flex-row",children:[(0,h.jsx)("div",{ref:r.left,className:"w-1 h-full cursor-col-resize border-l"}),(0,h.jsx)("div",{ref:e,style:n,children:t})]})}});export{Fe as A,ae as B,Ft as C,kt as D,ke as E,Nt as F,qt as I,Mt as L,oe as M,Pt as N,le as O,jt as P,Ne as R,qe as S,Lt as T,Me as _,wn as __tla,Pe as a,be as b,je as c,At as d,It as f,Le as g,Ae as h,Ie as i,Ue as j,Ut as k,Tt as l,Wt as m,zt as n,Te as o,We as p,ze as r,Ot as s,Dt as t,Bt as u,Oe as v,Ht as w,$t as x,Vt as y,we as z};
@@ -1 +1 @@
1
- import{s as y}from"./chunk-LvLJmgfZ.js";import{t as j}from"./react-Bj1aDYRI.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as v}from"./jsx-runtime-CP2fAiZX.js";import{r as T}from"./button-BmOH9agK.js";import{t as w}from"./cn-d_A4rA-x.js";import{t as D}from"./check-BnZGcuDh.js";import{t as S}from"./copy-CAR4dOiD.js";import{t as k}from"./use-toast-Hc8CXlvz.js";import{t as E}from"./tooltip-oM-h2ZN1.js";import{t as L}from"./copy-CgddLxfF.js";var P=g(),_=y(j(),1),n=y(v(),1);const q=C=>{let t=(0,P.c)(14),{value:a,className:r,buttonClassName:c,tooltip:d,toastTitle:s,ariaLabel:N}=C,[e,x]=(0,_.useState)(!1),m;t[0]!==s||t[1]!==a?(m=T.stopPropagation(async h=>{await L(typeof a=="function"?a(h):a).then(()=>{x(!0),setTimeout(()=>x(!1),2e3),s&&k({title:s})})}),t[0]=s,t[1]=a,t[2]=m):m=t[2];let f=m,u=N??"Copy to clipboard",o;t[3]!==r||t[4]!==e?(o=e?(0,n.jsx)(D,{className:w(r,"text-(--grass-11)")}):(0,n.jsx)(S,{className:r}),t[3]=r,t[4]=e,t[5]=o):o=t[5];let i;t[6]!==c||t[7]!==f||t[8]!==u||t[9]!==o?(i=(0,n.jsx)("button",{type:"button",onClick:f,"aria-label":u,className:c,children:o}),t[6]=c,t[7]=f,t[8]=u,t[9]=o,t[10]=i):i=t[10];let l=i;if(d===!1)return l;let b=e?"Copied!":d??"Copy to clipboard",p;return t[11]!==l||t[12]!==b?(p=(0,n.jsx)(E,{content:b,delayDuration:400,children:l}),t[11]=l,t[12]=b,t[13]=p):p=t[13],p};export{q as t};
1
+ import{s as y}from"./chunk-LvLJmgfZ.js";import{t as j}from"./react-Bj1aDYRI.js";import{t as g}from"./compiler-runtime-B3qBwwSJ.js";import{t as v}from"./jsx-runtime-CP2fAiZX.js";import{r as T}from"./button-BmOH9agK.js";import{t as w}from"./cn-d_A4rA-x.js";import{t as D}from"./check-BnZGcuDh.js";import{t as S}from"./copy-CAR4dOiD.js";import{t as k}from"./use-toast-BhMe50aT.js";import{t as E}from"./tooltip-DOQlecCr.js";import{t as L}from"./copy-DMCkK2TI.js";var P=g(),_=y(j(),1),n=y(v(),1);const q=C=>{let t=(0,P.c)(14),{value:a,className:r,buttonClassName:c,tooltip:d,toastTitle:s,ariaLabel:N}=C,[e,x]=(0,_.useState)(!1),m;t[0]!==s||t[1]!==a?(m=T.stopPropagation(async h=>{await L(typeof a=="function"?a(h):a).then(()=>{x(!0),setTimeout(()=>x(!1),2e3),s&&k({title:s})})}),t[0]=s,t[1]=a,t[2]=m):m=t[2];let f=m,u=N??"Copy to clipboard",o;t[3]!==r||t[4]!==e?(o=e?(0,n.jsx)(D,{className:w(r,"text-(--grass-11)")}):(0,n.jsx)(S,{className:r}),t[3]=r,t[4]=e,t[5]=o):o=t[5];let i;t[6]!==c||t[7]!==f||t[8]!==u||t[9]!==o?(i=(0,n.jsx)("button",{type:"button",onClick:f,"aria-label":u,className:c,children:o}),t[6]=c,t[7]=f,t[8]=u,t[9]=o,t[10]=i):i=t[10];let l=i;if(d===!1)return l;let b=e?"Copied!":d??"Copy to clipboard",p;return t[11]!==l||t[12]!==b?(p=(0,n.jsx)(E,{content:b,delayDuration:400,children:l}),t[11]=l,t[12]=b,t[13]=p):p=t[13],p};export{q as t};
@@ -1 +1 @@
1
- import{s as nt,t as V}from"./chunk-LvLJmgfZ.js";import{u as st}from"./src-Bp_72rVO.js";import{n as k,r as j}from"./src-D57-7XBB.js";import{t as z}from"./cytoscape.esm-B7Zr-PlQ.js";var Z=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L():typeof define=="function"&&define.amd?define([],L):typeof C=="object"?C.layoutBase=L():m.layoutBase=L()})(C,function(){return(function(m){var L={};function A(n){if(L[n])return L[n].exports;var i=L[n]={i:n,l:!1,exports:{}};return m[n].call(i.exports,i,i.exports,A),i.l=!0,i.exports}return A.m=m,A.c=L,A.i=function(n){return n},A.d=function(n,i,t){A.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:t})},A.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return A.d(i,"a",i),i},A.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},A.p="",A(A.s=26)})([(function(m,L,A){function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,m.exports=n}),(function(m,L,A){var n=A(2),i=A(8),t=A(9);function e(h,o,N){n.call(this,N),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=N,this.bendpoints=[],this.source=h,this.target=o}for(var r in e.prototype=Object.create(n.prototype),n)e[r]=n[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(h){if(this.source===h)return this.target;if(this.target===h)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(h,o){for(var N=this.getOtherEnd(h),s=o.getGraphManager().getRoot();;){if(N.getOwner()==o)return N;if(N.getOwner()==s)break;N=N.getOwner().getParent()}return null},e.prototype.updateLength=function(){var h=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),h),this.isOverlapingSourceAndTarget||(this.lengthX=h[0]-h[2],this.lengthY=h[1]-h[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=e}),(function(m,L,A){function n(i){this.vGraphObject=i}m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(13),e=A(0),r=A(16),h=A(4);function o(s,g,u,p){u==null&&p==null&&(p=g),n.call(this,p),s.graphManager!=null&&(s=s.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=s,u!=null&&g!=null?this.rect=new t(g.x,g.y,u.width,u.height):this.rect=new t}for(var N in o.prototype=Object.create(n.prototype),n)o[N]=n[N];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(s){this.rect.width=s},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(s){this.rect.height=s},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(s,g){this.rect.x=s.x,this.rect.y=s.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(s,g){this.rect.x=s-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(s,g){this.rect.x=s,this.rect.y=g},o.prototype.moveBy=function(s,g){this.rect.x+=s,this.rect.y+=g},o.prototype.getEdgeListToNode=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(p.target==s){if(p.source!=u)throw"Incorrect edge source!";g.push(p)}}),g},o.prototype.getEdgesBetween=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(!(p.source==u||p.target==u))throw"Incorrect edge source and/or target";(p.target==s||p.source==s)&&g.push(p)}),g},o.prototype.getNeighborsList=function(){var s=new Set,g=this;return g.edges.forEach(function(u){if(u.source==g)s.add(u.target);else{if(u.target!=g)throw"Incorrect incidency!";s.add(u.source)}}),s},o.prototype.withChildren=function(){var s=new Set,g,u;if(s.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)g=p[y],u=g.withChildren(),u.forEach(function(c){s.add(c)});return s},o.prototype.getNoOfChildren=function(){var s=0,g;if(this.child==null)s=1;else for(var u=this.child.getNodes(),p=0;p<u.length;p++)g=u[p],s+=g.getNoOfChildren();return s==0&&(s=1),s},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){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)},o.prototype.scatter=function(){var s,g,u=-e.INITIAL_WORLD_BOUNDARY,p=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_X+r.nextDouble()*(p-u)+u;var y=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+r.nextDouble()*(c-y)+y,this.rect.x=s,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var s=this.getChild();if(s.updateBounds(!0),this.rect.x=s.getLeft(),this.rect.y=s.getTop(),this.setWidth(s.getRight()-s.getLeft()),this.setHeight(s.getBottom()-s.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=s.getRight()-s.getLeft(),u=s.getBottom()-s.getTop();this.labelWidth>g&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>u&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-u)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-u),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(s){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var u=this.rect.y;u>e.WORLD_BOUNDARY?u=e.WORLD_BOUNDARY:u<-e.WORLD_BOUNDARY&&(u=-e.WORLD_BOUNDARY);var p=new h(g,u),y=s.inverseTransformPoint(p);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=o}),(function(m,L,A){function n(i,t){i==null&&t==null?(this.x=0,this.y=0):(this.x=i,this.y=t)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(0),e=A(6),r=A(3),h=A(1),o=A(13),N=A(12),s=A(11);function g(p,y,c){n.call(this,c),this.estimatedSize=i.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(p,y,c){if(y==null&&c==null){var f=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(f)>-1)throw"Node already in graph!";return f.owner=this,this.getNodes().push(f),f}else{var T=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(!(y.owner==c.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner==c.owner?(T.source=y,T.target=c,T.isInterGraph=!1,this.getEdges().push(T),y.edges.push(T),c!=y&&c.edges.push(T),T):null}},g.prototype.remove=function(p){var y=p;if(p instanceof r){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var c=y.edges.slice(),f,T=c.length,E=0;E<T;E++)f=c[E],f.isInterGraph?this.graphManager.remove(f):f.source.owner.remove(f);var O=this.nodes.indexOf(y);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof h){var f=p;if(f==null)throw"Edge is null!";if(!(f.source!=null&&f.target!=null))throw"Source and/or target is null!";if(!(f.source.owner!=null&&f.target.owner!=null&&f.source.owner==this&&f.target.owner==this))throw"Source and/or target owner is invalid!";var a=f.source.edges.indexOf(f),d=f.target.edges.indexOf(f);if(!(a>-1&&d>-1))throw"Source and/or target doesn't know this edge!";f.source.edges.splice(a,1),f.target!=f.source&&f.target.edges.splice(d,1);var O=f.source.owner.getEdges().indexOf(f);if(O==-1)throw"Not in owner's edge list!";f.source.owner.getEdges().splice(O,1)}},g.prototype.updateLeftTop=function(){for(var p=i.MAX_VALUE,y=i.MAX_VALUE,c,f,T,E=this.getNodes(),O=E.length,a=0;a<O;a++){var d=E[a];c=d.getTop(),f=d.getLeft(),p>c&&(p=c),y>f&&(y=f)}return p==i.MAX_VALUE?null:(T=E[0].getParent().paddingLeft==null?this.margin:E[0].getParent().paddingLeft,this.left=y-T,this.top=p-T,new N(this.left,this.top))},g.prototype.updateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l,v=this.nodes,_=v.length,D=0;D<_;D++){var I=v[D];p&&I.child!=null&&I.updateBounds(),E=I.getLeft(),O=I.getRight(),a=I.getTop(),d=I.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}var w=new o(y,f,c-y,T-f);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),l=v[0].getParent().paddingLeft==null?this.margin:v[0].getParent().paddingLeft,this.left=w.x-l,this.right=w.x+w.width+l,this.top=w.y-l,this.bottom=w.y+w.height+l},g.calculateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l=p.length,v=0;v<l;v++){var _=p[v];E=_.getLeft(),O=_.getRight(),a=_.getTop(),d=_.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}return new o(y,f,c-y,T-f)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,c=y.length,f=0;f<c;f++){var T=y[f];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new s,c=new Set,f=this.nodes[0],T,E;for(f.withChildren().forEach(function(l){y.push(l),c.add(l)});y.length!==0;){f=y.shift(),T=f.getEdges();for(var O=T.length,a=0;a<O;a++)E=T[a].getOtherEndInGraph(f,this),E!=null&&!c.has(E)&&E.withChildren().forEach(function(l){y.push(l),c.add(l)})}if(this.isConnected=!1,c.size>=this.nodes.length){var d=0;c.forEach(function(l){l.owner==p&&d++}),d==this.nodes.length&&(this.isConnected=!0)}},m.exports=g}),(function(m,L,A){var n,i=A(1);function t(e){n=A(5),this.layout=e,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),h=this.add(e,r);return this.setRootGraph(h),this.rootGraph},t.prototype.add=function(e,r,h,o,N){if(h==null&&o==null&&N==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{N=h,o=r,h=e;var s=o.getOwner(),g=N.getOwner();if(!(s!=null&&s.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(s==g)return h.isInterGraph=!1,s.add(h,o,N);if(h.isInterGraph=!0,h.source=o,h.target=N,this.edges.indexOf(h)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(h),!(h.source!=null&&h.target!=null))throw"Edge source and/or target is null!";if(!(h.source.edges.indexOf(h)==-1&&h.target.edges.indexOf(h)==-1))throw"Edge already in source and/or target incidency list!";return h.source.edges.push(h),h.target.edges.push(h),h}},t.prototype.remove=function(e){if(e instanceof n){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(r.getEdges());for(var o,N=h.length,s=0;s<N;s++)o=h[s],r.remove(o);var g=[];g=g.concat(r.getNodes());var u;N=g.length;for(var s=0;s<N;s++)u=g[s],r.remove(u);r==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(r);this.graphs.splice(p,1),r.parent=null}else if(e instanceof i){if(o=e,o==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(!(o.source!=null&&o.target!=null))throw"Source and/or target is null!";if(!(o.source.edges.indexOf(o)!=-1&&o.target.edges.indexOf(o)!=-1))throw"Source and/or target doesn't know this edge!";var p=o.source.edges.indexOf(o);if(o.source.edges.splice(p,1),p=o.target.edges.indexOf(o),o.target.edges.splice(p,1),!(o.source.owner!=null&&o.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";var p=o.source.owner.getGraphManager().edges.indexOf(o);o.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),h=r.length,o=0;o<h;o++)e=e.concat(r[o].getNodes());this.allNodes=e}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var h=0;h<r.length;h++)e=e.concat(r[h].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent??(e.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var h=e.getOwner(),o;do{if(o=h.getParent(),o==null)break;if(o==r)return!0;if(h=o.getOwner(),h==null)break}while(!0);h=r.getOwner();do{if(o=h.getParent(),o==null)break;if(o==e)return!0;if(h=o.getOwner(),h==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var e,r,h,o,N,s=this.getAllEdges(),g=s.length,u=0;u<g;u++){if(e=s[u],r=e.source,h=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=h,r==h){e.lca=r.getOwner();continue}for(o=r.getOwner();e.lca==null;){for(e.targetInLca=h,N=h.getOwner();e.lca==null;){if(N==o){e.lca=N;break}if(N==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=N.getParent(),N=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca??(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var h=e.getOwner();do{if(h==null)break;var o=r.getOwner();do{if(o==null)break;if(o==h)return o;o=o.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},t.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var h,o=e.getNodes(),N=o.length,s=0;s<N;s++)h=o[s],h.inclusionTreeDepth=r,h.child!=null&&this.calcInclusionTreeDepths(h.child,r+1)},t.prototype.includesInvalidEdge=function(){for(var e,r=this.edges.length,h=0;h<r;h++)if(e=this.edges[h],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},m.exports=t}),(function(m,L,A){var n=A(0);function i(){}for(var t in n)i[t]=n[t];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,m.exports=i}),(function(m,L,A){var n=A(12);function i(){}i.calcSeparationAmount=function(t,e,r,h){if(!t.intersects(e))throw"assert failed";var o=[,,];this.decideDirectionsForOverlappingNodes(t,e,o),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var N=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(N=1);var s=N*r[0],g=r[1]/N;r[0]<g?g=r[0]:s=r[1],r[0]=-1*o[0]*(g/2+h),r[1]=-1*o[1]*(s/2+h)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var h=t.getCenterX(),o=t.getCenterY(),N=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=h,r[1]=o,r[2]=N,r[3]=s,!0;var g=t.getX(),u=t.getY(),p=t.getRight(),y=t.getX(),c=t.getBottom(),f=t.getRight(),T=t.getWidthHalf(),E=t.getHeightHalf(),O=e.getX(),a=e.getY(),d=e.getRight(),l=e.getX(),v=e.getBottom(),_=e.getRight(),D=e.getWidthHalf(),I=e.getHeightHalf(),w=!1,R=!1;if(h===N){if(o>s)return r[0]=h,r[1]=u,r[2]=N,r[3]=v,!1;if(o<s)return r[0]=h,r[1]=c,r[2]=N,r[3]=a,!1}else if(o===s){if(h>N)return r[0]=g,r[1]=o,r[2]=d,r[3]=s,!1;if(h<N)return r[0]=p,r[1]=o,r[2]=O,r[3]=s,!1}else{var G=t.height/t.width,x=e.height/e.width,M=(s-o)/(N-h),U=void 0,b=void 0,F=void 0,S=void 0,Y=void 0,X=void 0;if(-G===M?h>N?(r[0]=y,r[1]=c,w=!0):(r[0]=p,r[1]=u,w=!0):G===M&&(h>N?(r[0]=g,r[1]=u,w=!0):(r[0]=f,r[1]=c,w=!0)),-x===M?N>h?(r[2]=l,r[3]=v,R=!0):(r[2]=d,r[3]=a,R=!0):x===M&&(N>h?(r[2]=O,r[3]=a,R=!0):(r[2]=_,r[3]=v,R=!0)),w&&R)return!1;if(h>N?o>s?(U=this.getCardinalDirection(G,M,4),b=this.getCardinalDirection(x,M,2)):(U=this.getCardinalDirection(-G,M,3),b=this.getCardinalDirection(-x,M,1)):o>s?(U=this.getCardinalDirection(-G,M,1),b=this.getCardinalDirection(-x,M,3)):(U=this.getCardinalDirection(G,M,2),b=this.getCardinalDirection(x,M,4)),!w)switch(U){case 1:S=u,F=h+-E/M,r[0]=F,r[1]=S;break;case 2:F=f,S=o+T*M,r[0]=F,r[1]=S;break;case 3:S=c,F=h+E/M,r[0]=F,r[1]=S;break;case 4:F=y,S=o+-T*M,r[0]=F,r[1]=S;break}if(!R)switch(b){case 1:X=a,Y=N+-I/M,r[2]=Y,r[3]=X;break;case 2:Y=_,X=s+D*M,r[2]=Y,r[3]=X;break;case 3:X=v,Y=N+I/M,r[2]=Y,r[3]=X;break;case 4:Y=l,X=s+-D*M,r[2]=Y,r[3]=X;break}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,h){if(h==null)return this.getIntersection2(t,e,r);var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=void 0,T=void 0,E=void 0,O=void 0,a=void 0,d=void 0,l=void 0,v=void 0,_=void 0;return E=g-N,a=o-s,l=s*N-o*g,O=c-p,d=u-y,v=y*p-u*c,_=E*d-O*a,_===0?null:(f=(a*v-d*l)/_,T=(O*l-E*v)/_,new n(f,T))},i.angleOfVector=function(t,e,r,h){var o=void 0;return t===r?o=h<e?this.ONE_AND_HALF_PI:this.HALF_PI:(o=Math.atan((h-e)/(r-t)),r<t?o+=Math.PI:h<e&&(o+=this.TWO_PI)),o},i.doIntersect=function(t,e,r,h){var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=(s-o)*(c-p)-(y-u)*(g-N);if(f===0)return!1;var T=((c-p)*(y-o)+(u-y)*(c-N))/f,E=((N-g)*(y-o)+(s-o)*(c-N))/f;return 0<T&&T<1&&0<E&&E<1},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,m.exports=i}),(function(m,L,A){function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},m.exports=n}),(function(m,L,A){function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,m.exports=n}),(function(m,L,A){var n=(function(){function h(o,N){for(var s=0;s<N.length;s++){var g=N[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,N,s){return N&&h(o.prototype,N),s&&h(o,s),o}})();function i(h,o){if(!(h instanceof o))throw TypeError("Cannot call a class as a function")}var t=function(h){return{value:h,next:null,prev:null}},e=function(h,o,N,s){return h===null?s.head=o:h.next=o,N===null?s.tail=o:N.prev=o,o.prev=h,o.next=N,s.length++,o},r=function(h,o){var N=h.prev,s=h.next;return N===null?o.head=s:N.next=s,s===null?o.tail=N:s.prev=N,h.prev=h.next=null,o.length--,h};m.exports=(function(){function h(o){var N=this;i(this,h),this.length=0,this.head=null,this.tail=null,o==null||o.forEach(function(s){return N.push(s)})}return n(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,N){return e(N.prev,t(o),N,this)}},{key:"insertAfter",value:function(o,N){return e(N,t(o),N.next,this)}},{key:"insertNodeBefore",value:function(o,N){return e(N.prev,o,N,this)}},{key:"insertNodeAfter",value:function(o,N){return e(N,o,N.next,this)}},{key:"push",value:function(o){return e(this.tail,t(o),null,this)}},{key:"unshift",value:function(o){return e(null,t(o),this.head,this)}},{key:"remove",value:function(o){return r(o,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(o){if(o<=this.length()){for(var N=1,s=this.head;N<o;)s=s.next,N++;return s.value}}},{key:"set_object_at",value:function(o,N){if(o<=this.length()){for(var s=1,g=this.head;s<o;)g=g.next,s++;g.value=N}}}]),h})()}),(function(m,L,A){function n(i,t,e){this.x=null,this.y=null,i==null&&t==null&&e==null?(this.x=0,this.y=0):typeof i=="number"&&typeof t=="number"&&e==null?(this.x=i,this.y=t):i.constructor.name=="Point"&&t==null&&e==null&&(e=i,this.x=e.x,this.y=e.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,t,e){i.constructor.name=="Point"&&t==null&&e==null?(e=i,this.setLocation(e.x,e.y)):typeof i=="number"&&typeof t=="number"&&e==null&&(parseInt(i)==i&&parseInt(t)==t?this.move(i,t):(this.x=Math.floor(i+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(i,t){this.x=i,this.y=t},n.prototype.translate=function(i,t){this.x+=i,this.y+=t},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var t=i;return this.x==t.x&&this.y==t.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},m.exports=n}),(function(m,L,A){function n(i,t,e,r){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&t!=null&&e!=null&&r!=null&&(this.x=i,this.y=t,this.width=e,this.height=r)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},m.exports=n}),(function(m,L,A){var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(t.uniqueID==null&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return t??(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=t===void 0?"undefined":n(t);return t==null||e!="object"&&e!="function"},m.exports=i}),(function(m,L,A){function n(u){if(Array.isArray(u)){for(var p=0,y=Array(u.length);p<u.length;p++)y[p]=u[p];return y}else return Array.from(u)}var i=A(0),t=A(6),e=A(3),r=A(1),h=A(5),o=A(4),N=A(17),s=A(27);function g(u){s.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=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,u!=null&&(this.isRemoteUse=u)}g.RANDOM_SEED=1,g.prototype=Object.create(s.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var u=new t(this);return this.graphManager=u,u},g.prototype.newGraph=function(u){return new h(null,this.graphManager,u)},g.prototype.newNode=function(u){return new e(this.graphManager,u)},g.prototype.newEdge=function(u){return new r(null,null,u)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var u=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE==="during"?!1:(u&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,u)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var u=this.graphManager.getAllEdges(),p=0;p<u.length;p++)u[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},g.prototype.update=function(u){if(u==null)this.update2();else if(u instanceof e){var p=u;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),c=0;c<y.length;c++)update(y[c]);p.vGraphObject!=null&&p.vGraphObject.update(p)}else if(u instanceof r){var f=u;f.vGraphObject!=null&&f.vGraphObject.update(f)}else if(u instanceof h){var T=u;T.vGraphObject!=null&&T.vGraphObject.update(T)}},g.prototype.initParameters=function(){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)},g.prototype.transform=function(u){if(u==null)this.transform(new o(0,0));else{var p=new N,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(u.x),p.setWorldOrgY(u.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var c=this.getAllNodes(),f,T=0;T<c.length;T++)f=c[T],f.transform(p)}}},g.prototype.positionNodesRandomly=function(u){if(u==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,c=u.getNodes(),f=0;f<c.length;f++)p=c[f],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},g.prototype.getFlatForest=function(){for(var u=[],p=!0,y=this.graphManager.getRoot().getNodes(),c=!0,f=0;f<y.length;f++)y[f].getChild()!=null&&(c=!1);if(!c)return u;var T=new Set,E=[],O=new Map,a=[];for(a=a.concat(y);a.length>0&&p;){for(E.push(a[0]);E.length>0&&p;){var d=E[0];E.splice(0,1),T.add(d);for(var l=d.getEdges(),f=0;f<l.length;f++){var v=l[f].getOtherEnd(d);if(O.get(d)!=v)if(!T.has(v))E.push(v),O.set(v,d);else{p=!1;break}}}if(!p)u=[];else{var _=[].concat(n(T));u.push(_);for(var f=0;f<_.length;f++){var D=_[f],I=a.indexOf(D);I>-1&&a.splice(I,1)}T=new Set,O=new Map}}return u},g.prototype.createDummyNodesForBendpoints=function(u){for(var p=[],y=u.source,c=this.graphManager.calcLowestCommonAncestor(u.source,u.target),f=0;f<u.bendpoints.length;f++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),c.add(T);var E=this.newEdge(null);this.graphManager.add(E,y,T),p.add(T),y=T}var E=this.newEdge(null);return this.graphManager.add(E,y,u.target),this.edgeToDummyNodes.set(u,p),u.isInterGraph()?this.graphManager.remove(u):c.remove(u),p},g.prototype.createBendpointsFromDummyNodes=function(){var u=[];u=u.concat(this.graphManager.getAllEdges()),u=[].concat(n(this.edgeToDummyNodes.keys()),u);for(var p=0;p<u.length;p++){var y=u[p];if(y.bendpoints.length>0){for(var c=this.edgeToDummyNodes.get(y),f=0;f<c.length;f++){var T=c[f],E=new o(T.getCenterX(),T.getCenterY()),O=y.bendpoints.get(f);O.x=E.x,O.y=E.y,T.getOwner().remove(T)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(u,p,y,c){if(y!=null&&c!=null){var f=p;if(u<=50){var T=p/y;f-=(p-T)/50*(50-u)}else{var E=p*c;f+=(E-p)/50*(u-50)}return f}else{var O,a;return u<=50?(O=9*p/500,a=p/10):(O=9*p/50,a=-8*p),O*u+a}},g.findCenterOfTree=function(u){var p=[];p=p.concat(u);var y=[],c=new Map,f=!1,T=null;(p.length==1||p.length==2)&&(f=!0,T=p[0]);for(var E=0;E<p.length;E++){var O=p[E],a=O.getNeighborsList().size;c.set(O,O.getNeighborsList().size),a==1&&y.push(O)}var d=[];for(d=d.concat(y);!f;){var l=[];l=l.concat(d),d=[];for(var E=0;E<p.length;E++){var O=p[E],v=p.indexOf(O);v>=0&&p.splice(v,1),O.getNeighborsList().forEach(function(I){if(y.indexOf(I)<0){var w=c.get(I)-1;w==1&&d.push(I),c.set(I,w)}})}y=y.concat(d),(p.length==1||p.length==2)&&(f=!0,T=p[0])}return T},g.prototype.setGraphManager=function(u){this.graphManager=u},m.exports=g}),(function(m,L,A){function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},m.exports=n}),(function(m,L,A){var n=A(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},m.exports=i}),(function(m,L,A){function n(s){if(Array.isArray(s)){for(var g=0,u=Array(s.length);g<s.length;g++)u[g]=s[g];return u}else return Array.from(s)}var i=A(15),t=A(7),e=A(0),r=A(8),h=A(9);function o(){i.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var N in o.prototype=Object.create(i.prototype),i)o[N]=i[N];o.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var s,g,u,p,y,c,f=this.getGraphManager().getAllEdges(),T=0;T<f.length;T++)s=f[T],s.idealLength=this.idealEdgeLength,s.isInterGraph&&(u=s.getSource(),p=s.getTarget(),y=s.getSourceInLca().getEstimatedSize(),c=s.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(s.idealLength+=y+c-2*e.SIMPLE_NODE_SIZE),g=s.getLca().getInclusionTreeDepth(),s.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*g))},o.prototype.initSpringEmbedder=function(){var s=this.getAllNodes().length;this.incremental?(s>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(s>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var s=this.getAllEdges(),g,u=0;u<s.length;u++)g=s[u],this.calcSpringForce(g,g.idealLength)},o.prototype.calcRepulsionForces=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u,p,y,c,f=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),T=new Set,u=0;u<f.length;u++)y=f[u],this.calculateRepulsionForceOfANode(y,T,s,g),T.add(y);else for(u=0;u<f.length;u++)for(y=f[u],p=u+1;p<f.length;p++)c=f[p],y.getOwner()==c.getOwner()&&this.calcRepulsionForce(y,c)},o.prototype.calcGravitationalForces=function(){for(var s,g=this.getAllNodesToApplyGravitation(),u=0;u<g.length;u++)s=g[u],this.calcGravitationalForce(s)},o.prototype.moveNodes=function(){for(var s=this.getAllNodes(),g,u=0;u<s.length;u++)g=s[u],g.move()},o.prototype.calcSpringForce=function(s,g){var u=s.getSource(),p=s.getTarget(),y,c,f,T;if(this.uniformLeafNodeSizes&&u.getChild()==null&&p.getChild()==null)s.updateLengthSimple();else if(s.updateLength(),s.isOverlapingSourceAndTarget)return;y=s.getLength(),y!=0&&(c=this.springConstant*(y-g),f=c*(s.lengthX/y),T=c*(s.lengthY/y),u.springForceX+=f,u.springForceY+=T,p.springForceX-=f,p.springForceY-=T)},o.prototype.calcRepulsionForce=function(s,g){var u=s.getRect(),p=g.getRect(),y=[,,],c=[,,,,],f,T,E,O,a,d,l;if(u.intersects(p)){r.calcSeparationAmount(u,p,y,t.DEFAULT_EDGE_LENGTH/2),d=2*y[0],l=2*y[1];var v=s.noOfChildren*g.noOfChildren/(s.noOfChildren+g.noOfChildren);s.repulsionForceX-=v*d,s.repulsionForceY-=v*l,g.repulsionForceX+=v*d,g.repulsionForceY+=v*l}else this.uniformLeafNodeSizes&&s.getChild()==null&&g.getChild()==null?(f=p.getCenterX()-u.getCenterX(),T=p.getCenterY()-u.getCenterY()):(r.getIntersection(u,p,c),f=c[2]-c[0],T=c[3]-c[1]),Math.abs(f)<t.MIN_REPULSION_DIST&&(f=h.sign(f)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=h.sign(T)*t.MIN_REPULSION_DIST),E=f*f+T*T,O=Math.sqrt(E),a=this.repulsionConstant*s.noOfChildren*g.noOfChildren/E,d=a*f/O,l=a*T/O,s.repulsionForceX-=d,s.repulsionForceY-=l,g.repulsionForceX+=d,g.repulsionForceY+=l},o.prototype.calcGravitationalForce=function(s){var g=s.getOwner(),u=(g.getRight()+g.getLeft())/2,p=(g.getTop()+g.getBottom())/2,y=s.getCenterX()-u,c=s.getCenterY()-p,f=Math.abs(y)+s.getWidth()/2,T=Math.abs(c)+s.getHeight()/2,E;s.getOwner()==this.graphManager.getRoot()?(E=g.getEstimatedSize()*this.gravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y,s.gravitationForceY=-this.gravityConstant*c)):(E=g.getEstimatedSize()*this.compoundGravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,s.gravitationForceY=-this.gravityConstant*c*this.compoundGravityConstant))},o.prototype.isConverged=function(){var s,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),s=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,s||g},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var s,g=this.graphManager.getAllNodes(),u=0;u<g.length;u++)s=g[u],s.noOfChildren=s.getNoOfChildren()},o.prototype.calcGrid=function(s){var g=0,u=0;g=parseInt(Math.ceil((s.getRight()-s.getLeft())/this.repulsionRange)),u=parseInt(Math.ceil((s.getBottom()-s.getTop())/this.repulsionRange));for(var p=Array(g),y=0;y<g;y++)p[y]=Array(u);for(var y=0;y<g;y++)for(var c=0;c<u;c++)p[y][c]=[];return p},o.prototype.addNodeToGrid=function(s,g,u){var p=0,y=0,c=0,f=0;p=parseInt(Math.floor((s.getRect().x-g)/this.repulsionRange)),y=parseInt(Math.floor((s.getRect().width+s.getRect().x-g)/this.repulsionRange)),c=parseInt(Math.floor((s.getRect().y-u)/this.repulsionRange)),f=parseInt(Math.floor((s.getRect().height+s.getRect().y-u)/this.repulsionRange));for(var T=p;T<=y;T++)for(var E=c;E<=f;E++)this.grid[T][E].push(s),s.setGridCoordinates(p,y,c,f)},o.prototype.updateGrid=function(){var s,g,u=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),s=0;s<u.length;s++)g=u[s],this.addNodeToGrid(g,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(s,g,u,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&u||p){var y=new Set;s.surrounding=[];for(var c,f=this.grid,T=s.startX-1;T<s.finishX+2;T++)for(var E=s.startY-1;E<s.finishY+2;E++)if(!(T<0||E<0||T>=f.length||E>=f[0].length)){for(var O=0;O<f[T][E].length;O++)if(c=f[T][E][O],!(s.getOwner()!=c.getOwner()||s==c)&&!g.has(c)&&!y.has(c)){var a=Math.abs(s.getCenterX()-c.getCenterX())-(s.getWidth()/2+c.getWidth()/2),d=Math.abs(s.getCenterY()-c.getCenterY())-(s.getHeight()/2+c.getHeight()/2);a<=this.repulsionRange&&d<=this.repulsionRange&&y.add(c)}}s.surrounding=[].concat(n(y))}for(T=0;T<s.surrounding.length;T++)this.calcRepulsionForce(s,s.surrounding[T])},o.prototype.calcRepulsionRange=function(){return 0},m.exports=o}),(function(m,L,A){var n=A(1),i=A(7);function t(r,h,o){n.call(this,r,h,o),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var e in t.prototype=Object.create(n.prototype),n)t[e]=n[e];m.exports=t}),(function(m,L,A){var n=A(3);function i(e,r,h,o){n.call(this,e,r,h,o),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var t in i.prototype=Object.create(n.prototype),n)i[t]=n[t];i.prototype.setGridCoordinates=function(e,r,h,o){this.startX=e,this.finishX=r,this.startY=h,this.finishY=o},m.exports=i}),(function(m,L,A){function n(i,t){this.width=0,this.height=0,i!==null&&t!==null&&(this.height=t,this.width=i)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},m.exports=n}),(function(m,L,A){var n=A(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),this.map[t]!=null},i.prototype.get=function(t){var e=n.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},m.exports=i}),(function(m,L,A){var n=A(14);function i(){this.set={}}i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,h=0;h<r;h++)t.push(this.set[e[h]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var h=t[r];this.add(h)}},m.exports=i}),(function(m,L,A){var n=(function(){function e(r,h){for(var o=0;o<h.length;o++){var N=h[o];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(r,N.key,N)}}return function(r,h,o){return h&&e(r.prototype,h),o&&e(r,o),r}})();function i(e,r){if(!(e instanceof r))throw TypeError("Cannot call a class as a function")}var t=A(11);m.exports=(function(){function e(r,h){i(this,e),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=r instanceof t?r.size():r.length,this._quicksort(r,0,o-1)}return n(e,[{key:"_quicksort",value:function(r,h,o){if(h<o){var N=this._partition(r,h,o);this._quicksort(r,h,N),this._quicksort(r,N+1,o)}}},{key:"_partition",value:function(r,h,o){for(var N=this._get(r,h),s=h,g=o;;){for(;this.compareFunction(N,this._get(r,g));)g--;for(;this.compareFunction(this._get(r,s),N);)s++;if(s<g)this._swap(r,s,g),s++,g--;else return g}}},{key:"_get",value:function(r,h){return r instanceof t?r.get_object_at(h):r[h]}},{key:"_set",value:function(r,h,o){r instanceof t?r.set_object_at(h,o):r[h]=o}},{key:"_swap",value:function(r,h,o){var N=this._get(r,h);this._set(r,h,this._get(r,o)),this._set(r,o,N)}},{key:"_defaultCompareFunction",value:function(r,h){return h>r}}]),e})()}),(function(m,L,A){var n=(function(){function t(e,r){for(var h=0;h<r.length;h++){var o=r[h];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,r,h){return r&&t(e.prototype,r),h&&t(e,h),e}})();function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}m.exports=(function(){function t(e,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,t),this.sequence1=e,this.sequence2=r,this.match_score=h,this.mismatch_penalty=o,this.gap_penalty=N,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[s][g]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var p=0;p<this.jMax;p++)this.tracebackGrid[u][p]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var o=1;o<this.jMax;o++){var N=void 0;N=this.sequence1[h-1]===this.sequence2[o-1]?this.grid[h-1][o-1]+this.match_score:this.grid[h-1][o-1]+this.mismatch_penalty;var s=this.grid[h-1][o]+this.gap_penalty,g=this.grid[h][o-1]+this.gap_penalty,u=[N,s,g],p=this.arrayAllMaxIndexes(u);this.grid[h][o]=u[p[0]],this.tracebackGrid[h][o]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],h=this.tracebackGrid[r.pos[0]][r.pos[1]];h[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),h[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),h[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var h=[],o=-1;(o=e.indexOf(r,o+1))!==-1;)h.push(o);return h}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),t})()}),(function(m,L,A){var n=function(){};n.FDLayout=A(18),n.FDLayoutConstants=A(7),n.FDLayoutEdge=A(19),n.FDLayoutNode=A(20),n.DimensionD=A(21),n.HashMap=A(22),n.HashSet=A(23),n.IGeometry=A(8),n.IMath=A(9),n.Integer=A(10),n.Point=A(12),n.PointD=A(4),n.RandomSeed=A(16),n.RectangleD=A(13),n.Transform=A(17),n.UniqueIDGeneretor=A(14),n.Quicksort=A(24),n.LinkedList=A(11),n.LGraphObject=A(2),n.LGraph=A(5),n.LEdge=A(1),n.LGraphManager=A(6),n.LNode=A(3),n.Layout=A(15),n.LayoutConstants=A(0),n.NeedlemanWunsch=A(25),m.exports=n}),(function(m,L,A){function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;r>=0;r--){var h=this.listeners[r];h.event===t&&h.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var h=this.listeners[r];t===h.event&&h.callback(e)}},m.exports=n})])})})),Q=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Z()):typeof define=="function"&&define.amd?define(["layout-base"],L):typeof C=="object"?C.coseBase=L(Z()):m.coseBase=L(m.layoutBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=7)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).FDLayoutConstants;function t(){}for(var e in i)t[e]=i[e];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutEdge;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraph;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraphManager;function t(r){i.call(this,r)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutNode,t=n(0).IMath;function e(h,o,N,s){i.call(this,h,o,N,s)}for(var r in e.prototype=Object.create(i.prototype),i)e[r]=i[r];e.prototype.move=function(){var h=this.graphManager.getLayout();this.displacementX=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),h.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},e.prototype.propogateDisplacementToChildren=function(h,o){for(var N=this.getChild().getNodes(),s,g=0;g<N.length;g++)s=N[g],s.getChild()==null?(s.moveBy(h,o),s.displacementX+=h,s.displacementY+=o):s.propogateDisplacementToChildren(h,o)},e.prototype.setPred1=function(h){this.pred1=h},e.prototype.getPred1=function(){return pred1},e.prototype.getPred2=function(){return pred2},e.prototype.setNext=function(h){this.next=h},e.prototype.getNext=function(){return next},e.prototype.setProcessed=function(h){this.processed=h},e.prototype.isProcessed=function(){return processed},L.exports=e}),(function(L,A,n){var i=n(0).FDLayout,t=n(4),e=n(3),r=n(5),h=n(2),o=n(1),N=n(0).FDLayoutConstants,s=n(0).LayoutConstants,g=n(0).Point,u=n(0).PointD,p=n(0).Layout,y=n(0).Integer,c=n(0).IGeometry,f=n(0).LGraph,T=n(0).Transform;function E(){i.call(this),this.toBeTiled={}}for(var O in E.prototype=Object.create(i.prototype),i)E[O]=i[O];E.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},E.prototype.newGraph=function(a){return new e(null,this.graphManager,a)},E.prototype.newNode=function(a){return new r(this.graphManager,a)},E.prototype.newEdge=function(a){return new h(null,null,a)},E.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=N.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=N.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=N.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=N.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=N.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=N.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/N.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=N.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return s.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){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){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(v){return a.has(v)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var l=this.getFlatForest();if(l.length>0)this.positionNodesRadially(l);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return a.has(D)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%N.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;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))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(_){return a.has(_)});this.graphManager.setAllNodesToApplyGravitation(d),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var l=!this.isTreeGrowing&&!this.isGrowthFinished,v=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(l,v),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),d={},l=0;l<a.length;l++){var v=a[l].rect,_=a[l].id;d[_]={id:_,x:v.getCenterX(),y:v.getCenterY(),w:v.width,h:v.height}}return d},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(N.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],d,l=this.graphManager.getGraphs(),v=l.length,_;for(_=0;_<v;_++)d=l[_],d.updateConnected(),d.isConnected||(a=a.concat(d.getNodes()));return a},E.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var d=new Set,l;for(l=0;l<a.length;l++){var v=a[l];if(!d.has(v)){var _=v.getSource(),D=v.getTarget();if(_==D)v.getBendpoints().push(new u),v.getBendpoints().push(new u),this.createDummyNodesForBendpoints(v),d.add(v);else{var I=[];if(I=I.concat(_.getEdgeListToNode(D)),I=I.concat(D.getEdgeListToNode(_)),!d.has(I[0])){if(I.length>1){var w;for(w=0;w<I.length;w++){var R=I[w];R.getBendpoints().push(new u),this.createDummyNodesForBendpoints(R)}}I.forEach(function(G){d.add(G)})}}}if(d.size==a.length)break}},E.prototype.positionNodesRadially=function(a){for(var d=new g(0,0),l=Math.ceil(Math.sqrt(a.length)),v=0,_=0,D=0,I=new u(0,0),w=0;w<a.length;w++){w%l==0&&(D=0,_=v,w!=0&&(_+=o.DEFAULT_COMPONENT_SEPERATION),v=0);var R=a[w],G=p.findCenterOfTree(R);d.x=D,d.y=_,I=E.radialLayout(R,G,d),I.y>v&&(v=Math.floor(I.y)),D=Math.floor(I.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(s.WORLD_CENTER_X-I.x/2,s.WORLD_CENTER_Y-I.y/2))},E.radialLayout=function(a,d,l){var v=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(d,null,0,359,0,v);var _=f.calculateBounds(a),D=new T;D.setDeviceOrgX(_.getMinX()),D.setDeviceOrgY(_.getMinY()),D.setWorldOrgX(l.x),D.setWorldOrgY(l.y);for(var I=0;I<a.length;I++)a[I].transform(D);var w=new u(_.getMaxX(),_.getMaxY());return D.inverseTransformPoint(w)},E.branchRadialLayout=function(a,d,l,v,_,D){var I=(v-l+1)/2;I<0&&(I+=180);var w=(I+l)%360*c.TWO_PI/360,R=_*Math.cos(w),G=_*Math.sin(w);a.setCenter(R,G);var x=[];x=x.concat(a.getEdges());var M=x.length;d!=null&&M--;for(var U=0,b=x.length,F,S=a.getEdgesBetween(d);S.length>1;){var Y=S[0];S.splice(0,1);var X=x.indexOf(Y);X>=0&&x.splice(X,1),b--,M--}F=d==null?0:(x.indexOf(S[0])+1)%b;for(var W=Math.abs(v-l)/M,B=F;U!=M;B=++B%b){var H=x[B].getOtherEnd(a);if(H!=d){var q=(l+U*W)%360,ot=(q+W)%360;E.branchRadialLayout(H,a,q,ot,_+D,D),U++}}},E.maxDiagonalInTree=function(a){for(var d=y.MIN_VALUE,l=0;l<a.length;l++){var v=a[l].getDiagonal();v>d&&(d=v)}return d},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var a=this,d={};this.memberGroups={},this.idToDummyNode={};for(var l=[],v=this.graphManager.getAllNodes(),_=0;_<v.length;_++){var D=v[_],I=D.getParent();this.getNodeDegreeWithChildren(D)===0&&(I.id==null||!this.getToBeTiled(I))&&l.push(D)}for(var _=0;_<l.length;_++){var D=l[_],w=D.getParent().id;d[w]===void 0&&(d[w]=[]),d[w]=d[w].concat(D)}Object.keys(d).forEach(function(R){if(d[R].length>1){var G="DummyCompound_"+R;a.memberGroups[G]=d[R];var x=d[R][0].getParent(),M=new r(a.graphManager);M.id=G,M.paddingLeft=x.paddingLeft||0,M.paddingRight=x.paddingRight||0,M.paddingBottom=x.paddingBottom||0,M.paddingTop=x.paddingTop||0,a.idToDummyNode[G]=M;var U=a.getGraphManager().add(a.newGraph(),M),b=x.getChild();b.add(M);for(var F=0;F<d[R].length;F++){var S=d[R][F];b.remove(S),U.add(S)}}})},E.prototype.clearCompounds=function(){var a={},d={};this.performDFSOnCompounds();for(var l=0;l<this.compoundOrder.length;l++)d[this.compoundOrder[l].id]=this.compoundOrder[l],a[this.compoundOrder[l].id]=[].concat(this.compoundOrder[l].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[l].getChild()),this.compoundOrder[l].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,d)},E.prototype.clearZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(l){var v=a.idToDummyNode[l];d[l]=a.tileNodes(a.memberGroups[l],v.paddingLeft+v.paddingRight),v.rect.width=d[l].width,v.rect.height=d[l].height})},E.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var d=this.compoundOrder[a],l=d.id,v=d.paddingLeft,_=d.paddingTop;this.adjustLocations(this.tiledMemberPack[l],d.rect.x,d.rect.y,v,_)}},E.prototype.repopulateZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack;Object.keys(d).forEach(function(l){var v=a.idToDummyNode[l],_=v.paddingLeft,D=v.paddingTop;a.adjustLocations(d[l],v.rect.x,v.rect.y,_,D)})},E.prototype.getToBeTiled=function(a){var d=a.id;if(this.toBeTiled[d]!=null)return this.toBeTiled[d];var l=a.getChild();if(l==null)return this.toBeTiled[d]=!1,!1;for(var v=l.getNodes(),_=0;_<v.length;_++){var D=v[_];if(this.getNodeDegree(D)>0)return this.toBeTiled[d]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[d]=!1,!1}return this.toBeTiled[d]=!0,!0},E.prototype.getNodeDegree=function(a){a.id;for(var d=a.getEdges(),l=0,v=0;v<d.length;v++){var _=d[v];_.getSource().id!==_.getTarget().id&&(l+=1)}return l},E.prototype.getNodeDegreeWithChildren=function(a){var d=this.getNodeDegree(a);if(a.getChild()==null)return d;for(var l=a.getChild().getNodes(),v=0;v<l.length;v++){var _=l[v];d+=this.getNodeDegreeWithChildren(_)}return d},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(a){for(var d=0;d<a.length;d++){var l=a[d];l.getChild()!=null&&this.fillCompexOrderByDFS(l.getChild().getNodes()),this.getToBeTiled(l)&&this.compoundOrder.push(l)}},E.prototype.adjustLocations=function(a,d,l,v,_){d+=v,l+=_;for(var D=d,I=0;I<a.rows.length;I++){var w=a.rows[I];d=D;for(var R=0,G=0;G<w.length;G++){var x=w[G];x.rect.x=d,x.rect.y=l,d+=x.rect.width+a.horizontalPadding,x.rect.height>R&&(R=x.rect.height)}l+=R+a.verticalPadding}},E.prototype.tileCompoundMembers=function(a,d){var l=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(v){var _=d[v];l.tiledMemberPack[v]=l.tileNodes(a[v],_.paddingLeft+_.paddingRight),_.rect.width=l.tiledMemberPack[v].width,_.rect.height=l.tiledMemberPack[v].height})},E.prototype.tileNodes=function(a,d){var l={rows:[],rowWidth:[],rowHeight:[],width:0,height:d,verticalPadding:o.TILING_PADDING_VERTICAL,horizontalPadding:o.TILING_PADDING_HORIZONTAL};a.sort(function(D,I){return D.rect.width*D.rect.height>I.rect.width*I.rect.height?-1:D.rect.width*D.rect.height<I.rect.width*I.rect.height?1:0});for(var v=0;v<a.length;v++){var _=a[v];l.rows.length==0?this.insertNodeToRow(l,_,0,d):this.canAddHorizontal(l,_.rect.width,_.rect.height)?this.insertNodeToRow(l,_,this.getShortestRowIndex(l),d):this.insertNodeToRow(l,_,l.rows.length,d),this.shiftToLastRow(l)}return l},E.prototype.insertNodeToRow=function(a,d,l,v){var _=v;l==a.rows.length&&(a.rows.push([]),a.rowWidth.push(_),a.rowHeight.push(0));var D=a.rowWidth[l]+d.rect.width;a.rows[l].length>0&&(D+=a.horizontalPadding),a.rowWidth[l]=D,a.width<D&&(a.width=D);var I=d.rect.height;l>0&&(I+=a.verticalPadding);var w=0;I>a.rowHeight[l]&&(w=a.rowHeight[l],a.rowHeight[l]=I,w=a.rowHeight[l]-w),a.height+=w,a.rows[l].push(d)},E.prototype.getShortestRowIndex=function(a){for(var d=-1,l=Number.MAX_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]<l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.getLongestRowIndex=function(a){for(var d=-1,l=Number.MIN_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]>l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.canAddHorizontal=function(a,d,l){var v=this.getShortestRowIndex(a);if(v<0)return!0;var _=a.rowWidth[v];if(_+a.horizontalPadding+d<=a.width)return!0;var D=0;a.rowHeight[v]<l&&v>0&&(D=l+a.verticalPadding-a.rowHeight[v]);var I=a.width-_>=d+a.horizontalPadding?(a.height+D)/(_+d+a.horizontalPadding):(a.height+D)/a.width;D=l+a.verticalPadding;var w=a.width<d?(a.height+D)/d:(a.height+D)/a.width;return w<1&&(w=1/w),I<1&&(I=1/I),I<w},E.prototype.shiftToLastRow=function(a){var d=this.getLongestRowIndex(a),l=a.rowWidth.length-1,v=a.rows[d],_=v[v.length-1],D=_.width+a.horizontalPadding;if(a.width-a.rowWidth[l]>D&&d!=l){v.splice(-1,1),a.rows[l].push(_),a.rowWidth[d]=a.rowWidth[d]-D,a.rowWidth[l]=a.rowWidth[l]+D,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var I=Number.MIN_VALUE,w=0;w<v.length;w++)v[w].height>I&&(I=v[w].height);d>0&&(I+=a.verticalPadding);var R=a.rowHeight[d]+a.rowHeight[l];a.rowHeight[d]=I,a.rowHeight[l]<_.height+a.verticalPadding&&(a.rowHeight[l]=_.height+a.verticalPadding);var G=a.rowHeight[d]+a.rowHeight[l];a.height+=G-R,this.shiftToLastRow(a)}},E.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var a=[],d=!0,l;d;){var v=this.graphManager.getAllNodes(),_=[];d=!1;for(var D=0;D<v.length;D++)l=v[D],l.getEdges().length==1&&!l.getEdges()[0].isInterGraph&&l.getChild()==null&&(_.push([l,l.getEdges()[0],l.getOwner()]),d=!0);if(d==1){for(var I=[],w=0;w<_.length;w++)_[w][0].getEdges().length==1&&(I.push(_[w]),_[w][0].getOwner().remove(_[w][0]));a.push(I),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},E.prototype.growTree=function(a){for(var d=a[a.length-1],l,v=0;v<d.length;v++)l=d[v],this.findPlaceforPrunedNode(l),l[2].add(l[0]),l[2].add(l[1],l[1].source,l[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(a){var d,l,v=a[0];l=v==a[1].source?a[1].target:a[1].source;var _=l.startX,D=l.finishX,I=l.startY,w=l.finishY,R=[0,0,0,0];if(I>0)for(var G=_;G<=D;G++)R[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(D<this.grid.length-1)for(var G=I;G<=w;G++)R[1]+=this.grid[D+1][G].length+this.grid[D][G].length-1;if(w<this.grid[0].length-1)for(var G=_;G<=D;G++)R[2]+=this.grid[G][w+1].length+this.grid[G][w].length-1;if(_>0)for(var G=I;G<=w;G++)R[3]+=this.grid[_-1][G].length+this.grid[_][G].length-1;for(var x=y.MAX_VALUE,M,U,b=0;b<R.length;b++)R[b]<x?(x=R[b],M=1,U=b):R[b]==x&&M++;if(M==3&&x==0)R[0]==0&&R[1]==0&&R[2]==0?d=1:R[0]==0&&R[1]==0&&R[3]==0?d=0:R[0]==0&&R[2]==0&&R[3]==0?d=3:R[1]==0&&R[2]==0&&R[3]==0&&(d=2);else if(M==2&&x==0){var F=Math.floor(Math.random()*2);d=R[0]==0&&R[1]==0?F==0?0:1:R[0]==0&&R[2]==0?F==0?0:2:R[0]==0&&R[3]==0?F==0?0:3:R[1]==0&&R[2]==0?F==0?1:2:R[1]==0&&R[3]==0?F==0?1:3:F==0?2:3}else if(M==4&&x==0){var F=Math.floor(Math.random()*4);d=F}else d=U;d==0?v.setCenter(l.getCenterX(),l.getCenterY()-l.getHeight()/2-N.DEFAULT_EDGE_LENGTH-v.getHeight()/2):d==1?v.setCenter(l.getCenterX()+l.getWidth()/2+N.DEFAULT_EDGE_LENGTH+v.getWidth()/2,l.getCenterY()):d==2?v.setCenter(l.getCenterX(),l.getCenterY()+l.getHeight()/2+N.DEFAULT_EDGE_LENGTH+v.getHeight()/2):v.setCenter(l.getCenterX()-l.getWidth()/2-N.DEFAULT_EDGE_LENGTH-v.getWidth()/2,l.getCenterY())},L.exports=E}),(function(L,A,n){var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),L.exports=i})])})})),at=nt(V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Q()):typeof define=="function"&&define.amd?define(["cose-base"],L):typeof C=="object"?C.cytoscapeCoseBilkent=L(Q()):m.cytoscapeCoseBilkent=L(m.coseBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=1)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,e=n(0).CoSEConstants,r=n(0).CoSELayout,h=n(0).CoSENode,o=n(0).layoutBase.PointD,N=n(0).layoutBase.DimensionD,s={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function g(c,f){var T={};for(var E in c)T[E]=c[E];for(var E in f)T[E]=f[E];return T}function u(c){this.options=g(s,c),p(this.options)}var p=function(c){c.nodeRepulsion!=null&&(e.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(e.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(e.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(e.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(e.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(e.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(e.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?i.QUALITY=0:c.quality=="proof"?i.QUALITY=2:i.QUALITY=1,e.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,e.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!c.randomize,e.ANIMATE=t.ANIMATE=i.ANIMATE=c.animate,e.TILE=c.tile,e.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,e.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};u.prototype.run=function(){var c,f,T=this.options;this.idToLNode={};var E=this.layout=new r,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=E.newGraphManager();this.gm=a;var d=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(d),E);for(var v=0;v<l.length;v++){var _=l[v],D=this.idToLNode[_.data("source")],I=this.idToLNode[_.data("target")];if(D!==I&&D.getEdgesBetween(I).length==0){var w=a.add(E.newEdge(),D,I);w.id=_.id()}}var R=function(x,M){typeof x=="number"&&(x=M);var U=x.data("id"),b=O.idToLNode[U];return{x:b.getRect().getCenterX(),y:b.getRect().getCenterY()}},G=function x(){for(var M=function(){T.fit&&T.cy.fit(T.eles,T.padding),c||(c=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},U=O.options.refresh,b,F=0;F<U&&!b;F++)b=O.stopped||O.layout.tick();if(b){E.checkLayoutSuccess()&&!E.isSubLayout&&E.doPostLayout(),E.tilingPostLayout&&E.tilingPostLayout(),E.isLayoutFinished=!0,O.options.eles.nodes().positions(R),M(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),f&&cancelAnimationFrame(f),c=!1;return}var S=O.layout.getPositionsData();T.eles.nodes().positions(function(Y,X){if(typeof Y=="number"&&(Y=X),!Y.isParent()){for(var W=Y.id(),B=S[W],H=Y;B==null&&(B=S[H.data("parent")]||S["DummyCompound_"+H.data("parent")],S[W]=B,H=H.parent()[0],H!=null););return B==null?{x:Y.position("x"),y:Y.position("y")}:{x:B.x,y:B.y}}}),M(),f=requestAnimationFrame(x)};return E.addListener("layoutstarted",function(){O.options.animate==="during"&&(f=requestAnimationFrame(G))}),E.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,R),c=!1),this},u.prototype.getTopMostNodes=function(c){for(var f={},T=0;T<c.length;T++)f[c[T].id()]=!0;return c.filter(function(E,O){typeof E=="number"&&(E=O);for(var a=E.parent()[0];a!=null;){if(f[a.id()])return!1;a=a.parent()[0]}return!0})},u.prototype.processChildrenList=function(c,f,T){for(var E=f.length,O=0;O<E;O++){var a=f[O],d=a.children(),l,v=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(l=a.outerWidth()!=null&&a.outerHeight()!=null?c.add(new h(T.graphManager,new o(a.position("x")-v.w/2,a.position("y")-v.h/2),new N(parseFloat(v.w),parseFloat(v.h)))):c.add(new h(this.graphManager)),l.id=a.data("id"),l.paddingLeft=parseInt(a.css("padding")),l.paddingTop=parseInt(a.css("padding")),l.paddingRight=parseInt(a.css("padding")),l.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var _=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,D=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,I=a.css("text-halign");l.labelWidth=_,l.labelHeight=D,l.labelPos=I}if(this.idToLNode[a.data("id")]=l,isNaN(l.rect.x)&&(l.rect.x=0),isNaN(l.rect.y)&&(l.rect.y=0),d!=null&&d.length>0){var w=T.getGraphManager().add(T.newGraph(),l);this.processChildrenList(w,d,T)}}},u.prototype.stop=function(){return this.stopped=!0,this};var y=function(c){c("layout","cose-bilkent",u)};typeof cytoscape<"u"&&y(cytoscape),L.exports=y})])})}))(),1);z.use(at.default);function $(C,P){C.forEach(m=>{let L={id:m.id,labelText:m.label,height:m.height,width:m.width,padding:m.padding??0};Object.keys(m).forEach(A=>{["id","label","height","width","padding","x","y"].includes(A)||(L[A]=m[A])}),P.add({group:"nodes",data:L,position:{x:m.x??0,y:m.y??0}})})}k($,"addNodes");function K(C,P){C.forEach(m=>{let L={id:m.id,source:m.start,target:m.end};Object.keys(m).forEach(A=>{["id","start","end"].includes(A)||(L[A]=m[A])}),P.add({group:"edges",data:L})})}k(K,"addEdges");function J(C){return new Promise(P=>{let m=st("body").append("div").attr("id","cy").attr("style","display:none"),L=z({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),$(C.nodes,L),K(C.edges,L),L.nodes().forEach(function(A){A.layoutDimensions=()=>{let n=A.data();return{w:n.width,h:n.height}}}),L.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),L.ready(A=>{j.info("Cytoscape ready",A),P(L)})})}k(J,"createCytoscapeInstance");function tt(C){return C.nodes().map(P=>{let m=P.data(),L=P.position(),A={id:m.id,x:L.x,y:L.y};return Object.keys(m).forEach(n=>{n!=="id"&&(A[n]=m[n])}),A})}k(tt,"extractPositionedNodes");function et(C){return C.edges().map(P=>{let m=P.data(),L=P._private.rscratch,A={id:m.id,source:m.source,target:m.target,startX:L.startX,startY:L.startY,midX:L.midX,midY:L.midY,endX:L.endX,endY:L.endY};return Object.keys(m).forEach(n=>{["id","source","target"].includes(n)||(A[n]=m[n])}),A})}k(et,"extractPositionedEdges");async function it(C,P){j.debug("Starting cose-bilkent layout algorithm");try{rt(C);let m=await J(C),L=tt(m),A=et(m);return j.debug(`Layout completed: ${L.length} nodes, ${A.length} edges`),{nodes:L,edges:A}}catch(m){throw j.error("Error in cose-bilkent layout algorithm:",m),m}}k(it,"executeCoseBilkentLayout");function rt(C){if(!C)throw Error("Layout data is required");if(!C.config)throw Error("Configuration is required in layout data");if(!C.rootNode)throw Error("Root node is required");if(!C.nodes||!Array.isArray(C.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(C.edges))throw Error("Edges array is required in layout data");return!0}k(rt,"validateLayoutData");var ht=k(async(C,P,{insertCluster:m,insertEdge:L,insertEdgeLabel:A,insertMarkers:n,insertNode:i,log:t,positionEdgeLabel:e},{algorithm:r})=>{let h={},o={},N=P.select("g");n(N,C.markers,C.type,C.diagramId);let s=N.insert("g").attr("class","subgraphs"),g=N.insert("g").attr("class","edgePaths"),u=N.insert("g").attr("class","edgeLabels"),p=N.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(C.nodes.map(async c=>{if(c.isGroup){let f={...c};o[c.id]=f,h[c.id]=f,await m(s,c)}else{let f={...c};h[c.id]=f;let T=await i(p,c,{config:C.config,dir:C.direction||"TB"}),E=T.node().getBBox();f.width=E.width,f.height=E.height,f.domId=T,t.debug(`Node ${c.id} dimensions: ${E.width}x${E.height}`)}})),t.debug("Running cose-bilkent layout algorithm");let y=await it({...C,nodes:C.nodes.map(c=>{let f=h[c.id];return{...c,width:f.width,height:f.height}})},C.config);t.debug("Positioning nodes based on layout results"),y.nodes.forEach(c=>{let f=h[c.id];f!=null&&f.domId&&(f.domId.attr("transform",`translate(${c.x}, ${c.y})`),f.x=c.x,f.y=c.y,t.debug(`Positioned node ${f.id} at center (${c.x}, ${c.y})`))}),y.edges.forEach(c=>{let f=C.edges.find(T=>T.id===c.id);f&&(f.points=[{x:c.startX,y:c.startY},{x:c.midX,y:c.midY},{x:c.endX,y:c.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(C.edges.map(async c=>{await A(u,c);let f=h[c.start??""],T=h[c.end??""];if(f&&T){let E=y.edges.find(O=>O.id===c.id);if(E){t.debug("APA01 positionedEdge",E);let O={...c};e(O,L(g,O,o,C.type,f,T,C.diagramId))}else{let O={...c,points:[{x:f.x||0,y:f.y||0},{x:T.x||0,y:T.y||0}]};e(O,L(g,O,o,C.type,f,T,C.diagramId))}}})),t.debug("Cose-bilkent rendering completed")},"render");export{ht as render};
1
+ import{s as nt,t as V}from"./chunk-LvLJmgfZ.js";import{u as st}from"./src-lcGySDV2.js";import{n as k,r as j}from"./src-D57-7XBB.js";import{t as z}from"./cytoscape.esm-B7Zr-PlQ.js";var Z=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L():typeof define=="function"&&define.amd?define([],L):typeof C=="object"?C.layoutBase=L():m.layoutBase=L()})(C,function(){return(function(m){var L={};function A(n){if(L[n])return L[n].exports;var i=L[n]={i:n,l:!1,exports:{}};return m[n].call(i.exports,i,i.exports,A),i.l=!0,i.exports}return A.m=m,A.c=L,A.i=function(n){return n},A.d=function(n,i,t){A.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:t})},A.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return A.d(i,"a",i),i},A.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},A.p="",A(A.s=26)})([(function(m,L,A){function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,m.exports=n}),(function(m,L,A){var n=A(2),i=A(8),t=A(9);function e(h,o,N){n.call(this,N),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=N,this.bendpoints=[],this.source=h,this.target=o}for(var r in e.prototype=Object.create(n.prototype),n)e[r]=n[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(h){if(this.source===h)return this.target;if(this.target===h)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(h,o){for(var N=this.getOtherEnd(h),s=o.getGraphManager().getRoot();;){if(N.getOwner()==o)return N;if(N.getOwner()==s)break;N=N.getOwner().getParent()}return null},e.prototype.updateLength=function(){var h=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),h),this.isOverlapingSourceAndTarget||(this.lengthX=h[0]-h[2],this.lengthY=h[1]-h[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=e}),(function(m,L,A){function n(i){this.vGraphObject=i}m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(13),e=A(0),r=A(16),h=A(4);function o(s,g,u,p){u==null&&p==null&&(p=g),n.call(this,p),s.graphManager!=null&&(s=s.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=s,u!=null&&g!=null?this.rect=new t(g.x,g.y,u.width,u.height):this.rect=new t}for(var N in o.prototype=Object.create(n.prototype),n)o[N]=n[N];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(s){this.rect.width=s},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(s){this.rect.height=s},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(s,g){this.rect.x=s.x,this.rect.y=s.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(s,g){this.rect.x=s-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(s,g){this.rect.x=s,this.rect.y=g},o.prototype.moveBy=function(s,g){this.rect.x+=s,this.rect.y+=g},o.prototype.getEdgeListToNode=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(p.target==s){if(p.source!=u)throw"Incorrect edge source!";g.push(p)}}),g},o.prototype.getEdgesBetween=function(s){var g=[],u=this;return u.edges.forEach(function(p){if(!(p.source==u||p.target==u))throw"Incorrect edge source and/or target";(p.target==s||p.source==s)&&g.push(p)}),g},o.prototype.getNeighborsList=function(){var s=new Set,g=this;return g.edges.forEach(function(u){if(u.source==g)s.add(u.target);else{if(u.target!=g)throw"Incorrect incidency!";s.add(u.source)}}),s},o.prototype.withChildren=function(){var s=new Set,g,u;if(s.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)g=p[y],u=g.withChildren(),u.forEach(function(c){s.add(c)});return s},o.prototype.getNoOfChildren=function(){var s=0,g;if(this.child==null)s=1;else for(var u=this.child.getNodes(),p=0;p<u.length;p++)g=u[p],s+=g.getNoOfChildren();return s==0&&(s=1),s},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){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)},o.prototype.scatter=function(){var s,g,u=-e.INITIAL_WORLD_BOUNDARY,p=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_X+r.nextDouble()*(p-u)+u;var y=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+r.nextDouble()*(c-y)+y,this.rect.x=s,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var s=this.getChild();if(s.updateBounds(!0),this.rect.x=s.getLeft(),this.rect.y=s.getTop(),this.setWidth(s.getRight()-s.getLeft()),this.setHeight(s.getBottom()-s.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=s.getRight()-s.getLeft(),u=s.getBottom()-s.getTop();this.labelWidth>g&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>u&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-u)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-u),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(s){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var u=this.rect.y;u>e.WORLD_BOUNDARY?u=e.WORLD_BOUNDARY:u<-e.WORLD_BOUNDARY&&(u=-e.WORLD_BOUNDARY);var p=new h(g,u),y=s.inverseTransformPoint(p);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=o}),(function(m,L,A){function n(i,t){i==null&&t==null?(this.x=0,this.y=0):(this.x=i,this.y=t)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},m.exports=n}),(function(m,L,A){var n=A(2),i=A(10),t=A(0),e=A(6),r=A(3),h=A(1),o=A(13),N=A(12),s=A(11);function g(p,y,c){n.call(this,c),this.estimatedSize=i.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(p,y,c){if(y==null&&c==null){var f=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(f)>-1)throw"Node already in graph!";return f.owner=this,this.getNodes().push(f),f}else{var T=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(!(y.owner==c.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner==c.owner?(T.source=y,T.target=c,T.isInterGraph=!1,this.getEdges().push(T),y.edges.push(T),c!=y&&c.edges.push(T),T):null}},g.prototype.remove=function(p){var y=p;if(p instanceof r){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var c=y.edges.slice(),f,T=c.length,E=0;E<T;E++)f=c[E],f.isInterGraph?this.graphManager.remove(f):f.source.owner.remove(f);var O=this.nodes.indexOf(y);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof h){var f=p;if(f==null)throw"Edge is null!";if(!(f.source!=null&&f.target!=null))throw"Source and/or target is null!";if(!(f.source.owner!=null&&f.target.owner!=null&&f.source.owner==this&&f.target.owner==this))throw"Source and/or target owner is invalid!";var a=f.source.edges.indexOf(f),d=f.target.edges.indexOf(f);if(!(a>-1&&d>-1))throw"Source and/or target doesn't know this edge!";f.source.edges.splice(a,1),f.target!=f.source&&f.target.edges.splice(d,1);var O=f.source.owner.getEdges().indexOf(f);if(O==-1)throw"Not in owner's edge list!";f.source.owner.getEdges().splice(O,1)}},g.prototype.updateLeftTop=function(){for(var p=i.MAX_VALUE,y=i.MAX_VALUE,c,f,T,E=this.getNodes(),O=E.length,a=0;a<O;a++){var d=E[a];c=d.getTop(),f=d.getLeft(),p>c&&(p=c),y>f&&(y=f)}return p==i.MAX_VALUE?null:(T=E[0].getParent().paddingLeft==null?this.margin:E[0].getParent().paddingLeft,this.left=y-T,this.top=p-T,new N(this.left,this.top))},g.prototype.updateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l,v=this.nodes,_=v.length,D=0;D<_;D++){var I=v[D];p&&I.child!=null&&I.updateBounds(),E=I.getLeft(),O=I.getRight(),a=I.getTop(),d=I.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}var w=new o(y,f,c-y,T-f);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),l=v[0].getParent().paddingLeft==null?this.margin:v[0].getParent().paddingLeft,this.left=w.x-l,this.right=w.x+w.width+l,this.top=w.y-l,this.bottom=w.y+w.height+l},g.calculateBounds=function(p){for(var y=i.MAX_VALUE,c=-i.MAX_VALUE,f=i.MAX_VALUE,T=-i.MAX_VALUE,E,O,a,d,l=p.length,v=0;v<l;v++){var _=p[v];E=_.getLeft(),O=_.getRight(),a=_.getTop(),d=_.getBottom(),y>E&&(y=E),c<O&&(c=O),f>a&&(f=a),T<d&&(T=d)}return new o(y,f,c-y,T-f)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,c=y.length,f=0;f<c;f++){var T=y[f];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new s,c=new Set,f=this.nodes[0],T,E;for(f.withChildren().forEach(function(l){y.push(l),c.add(l)});y.length!==0;){f=y.shift(),T=f.getEdges();for(var O=T.length,a=0;a<O;a++)E=T[a].getOtherEndInGraph(f,this),E!=null&&!c.has(E)&&E.withChildren().forEach(function(l){y.push(l),c.add(l)})}if(this.isConnected=!1,c.size>=this.nodes.length){var d=0;c.forEach(function(l){l.owner==p&&d++}),d==this.nodes.length&&(this.isConnected=!0)}},m.exports=g}),(function(m,L,A){var n,i=A(1);function t(e){n=A(5),this.layout=e,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),h=this.add(e,r);return this.setRootGraph(h),this.rootGraph},t.prototype.add=function(e,r,h,o,N){if(h==null&&o==null&&N==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{N=h,o=r,h=e;var s=o.getOwner(),g=N.getOwner();if(!(s!=null&&s.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(s==g)return h.isInterGraph=!1,s.add(h,o,N);if(h.isInterGraph=!0,h.source=o,h.target=N,this.edges.indexOf(h)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(h),!(h.source!=null&&h.target!=null))throw"Edge source and/or target is null!";if(!(h.source.edges.indexOf(h)==-1&&h.target.edges.indexOf(h)==-1))throw"Edge already in source and/or target incidency list!";return h.source.edges.push(h),h.target.edges.push(h),h}},t.prototype.remove=function(e){if(e instanceof n){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(r.getEdges());for(var o,N=h.length,s=0;s<N;s++)o=h[s],r.remove(o);var g=[];g=g.concat(r.getNodes());var u;N=g.length;for(var s=0;s<N;s++)u=g[s],r.remove(u);r==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(r);this.graphs.splice(p,1),r.parent=null}else if(e instanceof i){if(o=e,o==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(!(o.source!=null&&o.target!=null))throw"Source and/or target is null!";if(!(o.source.edges.indexOf(o)!=-1&&o.target.edges.indexOf(o)!=-1))throw"Source and/or target doesn't know this edge!";var p=o.source.edges.indexOf(o);if(o.source.edges.splice(p,1),p=o.target.edges.indexOf(o),o.target.edges.splice(p,1),!(o.source.owner!=null&&o.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";var p=o.source.owner.getGraphManager().edges.indexOf(o);o.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),h=r.length,o=0;o<h;o++)e=e.concat(r[o].getNodes());this.allNodes=e}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var h=0;h<r.length;h++)e=e.concat(r[h].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent??(e.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var h=e.getOwner(),o;do{if(o=h.getParent(),o==null)break;if(o==r)return!0;if(h=o.getOwner(),h==null)break}while(!0);h=r.getOwner();do{if(o=h.getParent(),o==null)break;if(o==e)return!0;if(h=o.getOwner(),h==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var e,r,h,o,N,s=this.getAllEdges(),g=s.length,u=0;u<g;u++){if(e=s[u],r=e.source,h=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=h,r==h){e.lca=r.getOwner();continue}for(o=r.getOwner();e.lca==null;){for(e.targetInLca=h,N=h.getOwner();e.lca==null;){if(N==o){e.lca=N;break}if(N==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=N.getParent(),N=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca??(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var h=e.getOwner();do{if(h==null)break;var o=r.getOwner();do{if(o==null)break;if(o==h)return o;o=o.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},t.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var h,o=e.getNodes(),N=o.length,s=0;s<N;s++)h=o[s],h.inclusionTreeDepth=r,h.child!=null&&this.calcInclusionTreeDepths(h.child,r+1)},t.prototype.includesInvalidEdge=function(){for(var e,r=this.edges.length,h=0;h<r;h++)if(e=this.edges[h],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},m.exports=t}),(function(m,L,A){var n=A(0);function i(){}for(var t in n)i[t]=n[t];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,m.exports=i}),(function(m,L,A){var n=A(12);function i(){}i.calcSeparationAmount=function(t,e,r,h){if(!t.intersects(e))throw"assert failed";var o=[,,];this.decideDirectionsForOverlappingNodes(t,e,o),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var N=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(N=1);var s=N*r[0],g=r[1]/N;r[0]<g?g=r[0]:s=r[1],r[0]=-1*o[0]*(g/2+h),r[1]=-1*o[1]*(s/2+h)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var h=t.getCenterX(),o=t.getCenterY(),N=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=h,r[1]=o,r[2]=N,r[3]=s,!0;var g=t.getX(),u=t.getY(),p=t.getRight(),y=t.getX(),c=t.getBottom(),f=t.getRight(),T=t.getWidthHalf(),E=t.getHeightHalf(),O=e.getX(),a=e.getY(),d=e.getRight(),l=e.getX(),v=e.getBottom(),_=e.getRight(),D=e.getWidthHalf(),I=e.getHeightHalf(),w=!1,R=!1;if(h===N){if(o>s)return r[0]=h,r[1]=u,r[2]=N,r[3]=v,!1;if(o<s)return r[0]=h,r[1]=c,r[2]=N,r[3]=a,!1}else if(o===s){if(h>N)return r[0]=g,r[1]=o,r[2]=d,r[3]=s,!1;if(h<N)return r[0]=p,r[1]=o,r[2]=O,r[3]=s,!1}else{var G=t.height/t.width,x=e.height/e.width,M=(s-o)/(N-h),U=void 0,b=void 0,F=void 0,S=void 0,Y=void 0,X=void 0;if(-G===M?h>N?(r[0]=y,r[1]=c,w=!0):(r[0]=p,r[1]=u,w=!0):G===M&&(h>N?(r[0]=g,r[1]=u,w=!0):(r[0]=f,r[1]=c,w=!0)),-x===M?N>h?(r[2]=l,r[3]=v,R=!0):(r[2]=d,r[3]=a,R=!0):x===M&&(N>h?(r[2]=O,r[3]=a,R=!0):(r[2]=_,r[3]=v,R=!0)),w&&R)return!1;if(h>N?o>s?(U=this.getCardinalDirection(G,M,4),b=this.getCardinalDirection(x,M,2)):(U=this.getCardinalDirection(-G,M,3),b=this.getCardinalDirection(-x,M,1)):o>s?(U=this.getCardinalDirection(-G,M,1),b=this.getCardinalDirection(-x,M,3)):(U=this.getCardinalDirection(G,M,2),b=this.getCardinalDirection(x,M,4)),!w)switch(U){case 1:S=u,F=h+-E/M,r[0]=F,r[1]=S;break;case 2:F=f,S=o+T*M,r[0]=F,r[1]=S;break;case 3:S=c,F=h+E/M,r[0]=F,r[1]=S;break;case 4:F=y,S=o+-T*M,r[0]=F,r[1]=S;break}if(!R)switch(b){case 1:X=a,Y=N+-I/M,r[2]=Y,r[3]=X;break;case 2:Y=_,X=s+D*M,r[2]=Y,r[3]=X;break;case 3:X=v,Y=N+I/M,r[2]=Y,r[3]=X;break;case 4:Y=l,X=s+-D*M,r[2]=Y,r[3]=X;break}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,h){if(h==null)return this.getIntersection2(t,e,r);var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=void 0,T=void 0,E=void 0,O=void 0,a=void 0,d=void 0,l=void 0,v=void 0,_=void 0;return E=g-N,a=o-s,l=s*N-o*g,O=c-p,d=u-y,v=y*p-u*c,_=E*d-O*a,_===0?null:(f=(a*v-d*l)/_,T=(O*l-E*v)/_,new n(f,T))},i.angleOfVector=function(t,e,r,h){var o=void 0;return t===r?o=h<e?this.ONE_AND_HALF_PI:this.HALF_PI:(o=Math.atan((h-e)/(r-t)),r<t?o+=Math.PI:h<e&&(o+=this.TWO_PI)),o},i.doIntersect=function(t,e,r,h){var o=t.x,N=t.y,s=e.x,g=e.y,u=r.x,p=r.y,y=h.x,c=h.y,f=(s-o)*(c-p)-(y-u)*(g-N);if(f===0)return!1;var T=((c-p)*(y-o)+(u-y)*(c-N))/f,E=((N-g)*(y-o)+(s-o)*(c-N))/f;return 0<T&&T<1&&0<E&&E<1},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,m.exports=i}),(function(m,L,A){function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},m.exports=n}),(function(m,L,A){function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,m.exports=n}),(function(m,L,A){var n=(function(){function h(o,N){for(var s=0;s<N.length;s++){var g=N[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,N,s){return N&&h(o.prototype,N),s&&h(o,s),o}})();function i(h,o){if(!(h instanceof o))throw TypeError("Cannot call a class as a function")}var t=function(h){return{value:h,next:null,prev:null}},e=function(h,o,N,s){return h===null?s.head=o:h.next=o,N===null?s.tail=o:N.prev=o,o.prev=h,o.next=N,s.length++,o},r=function(h,o){var N=h.prev,s=h.next;return N===null?o.head=s:N.next=s,s===null?o.tail=N:s.prev=N,h.prev=h.next=null,o.length--,h};m.exports=(function(){function h(o){var N=this;i(this,h),this.length=0,this.head=null,this.tail=null,o==null||o.forEach(function(s){return N.push(s)})}return n(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,N){return e(N.prev,t(o),N,this)}},{key:"insertAfter",value:function(o,N){return e(N,t(o),N.next,this)}},{key:"insertNodeBefore",value:function(o,N){return e(N.prev,o,N,this)}},{key:"insertNodeAfter",value:function(o,N){return e(N,o,N.next,this)}},{key:"push",value:function(o){return e(this.tail,t(o),null,this)}},{key:"unshift",value:function(o){return e(null,t(o),this.head,this)}},{key:"remove",value:function(o){return r(o,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(o){if(o<=this.length()){for(var N=1,s=this.head;N<o;)s=s.next,N++;return s.value}}},{key:"set_object_at",value:function(o,N){if(o<=this.length()){for(var s=1,g=this.head;s<o;)g=g.next,s++;g.value=N}}}]),h})()}),(function(m,L,A){function n(i,t,e){this.x=null,this.y=null,i==null&&t==null&&e==null?(this.x=0,this.y=0):typeof i=="number"&&typeof t=="number"&&e==null?(this.x=i,this.y=t):i.constructor.name=="Point"&&t==null&&e==null&&(e=i,this.x=e.x,this.y=e.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,t,e){i.constructor.name=="Point"&&t==null&&e==null?(e=i,this.setLocation(e.x,e.y)):typeof i=="number"&&typeof t=="number"&&e==null&&(parseInt(i)==i&&parseInt(t)==t?this.move(i,t):(this.x=Math.floor(i+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(i,t){this.x=i,this.y=t},n.prototype.translate=function(i,t){this.x+=i,this.y+=t},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var t=i;return this.x==t.x&&this.y==t.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},m.exports=n}),(function(m,L,A){function n(i,t,e,r){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&t!=null&&e!=null&&r!=null&&(this.x=i,this.y=t,this.width=e,this.height=r)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},m.exports=n}),(function(m,L,A){var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(t.uniqueID==null&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return t??(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=t===void 0?"undefined":n(t);return t==null||e!="object"&&e!="function"},m.exports=i}),(function(m,L,A){function n(u){if(Array.isArray(u)){for(var p=0,y=Array(u.length);p<u.length;p++)y[p]=u[p];return y}else return Array.from(u)}var i=A(0),t=A(6),e=A(3),r=A(1),h=A(5),o=A(4),N=A(17),s=A(27);function g(u){s.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=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,u!=null&&(this.isRemoteUse=u)}g.RANDOM_SEED=1,g.prototype=Object.create(s.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var u=new t(this);return this.graphManager=u,u},g.prototype.newGraph=function(u){return new h(null,this.graphManager,u)},g.prototype.newNode=function(u){return new e(this.graphManager,u)},g.prototype.newEdge=function(u){return new r(null,null,u)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var u=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE==="during"?!1:(u&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,u)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var u=this.graphManager.getAllEdges(),p=0;p<u.length;p++)u[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},g.prototype.update=function(u){if(u==null)this.update2();else if(u instanceof e){var p=u;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),c=0;c<y.length;c++)update(y[c]);p.vGraphObject!=null&&p.vGraphObject.update(p)}else if(u instanceof r){var f=u;f.vGraphObject!=null&&f.vGraphObject.update(f)}else if(u instanceof h){var T=u;T.vGraphObject!=null&&T.vGraphObject.update(T)}},g.prototype.initParameters=function(){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)},g.prototype.transform=function(u){if(u==null)this.transform(new o(0,0));else{var p=new N,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(u.x),p.setWorldOrgY(u.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var c=this.getAllNodes(),f,T=0;T<c.length;T++)f=c[T],f.transform(p)}}},g.prototype.positionNodesRandomly=function(u){if(u==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,c=u.getNodes(),f=0;f<c.length;f++)p=c[f],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},g.prototype.getFlatForest=function(){for(var u=[],p=!0,y=this.graphManager.getRoot().getNodes(),c=!0,f=0;f<y.length;f++)y[f].getChild()!=null&&(c=!1);if(!c)return u;var T=new Set,E=[],O=new Map,a=[];for(a=a.concat(y);a.length>0&&p;){for(E.push(a[0]);E.length>0&&p;){var d=E[0];E.splice(0,1),T.add(d);for(var l=d.getEdges(),f=0;f<l.length;f++){var v=l[f].getOtherEnd(d);if(O.get(d)!=v)if(!T.has(v))E.push(v),O.set(v,d);else{p=!1;break}}}if(!p)u=[];else{var _=[].concat(n(T));u.push(_);for(var f=0;f<_.length;f++){var D=_[f],I=a.indexOf(D);I>-1&&a.splice(I,1)}T=new Set,O=new Map}}return u},g.prototype.createDummyNodesForBendpoints=function(u){for(var p=[],y=u.source,c=this.graphManager.calcLowestCommonAncestor(u.source,u.target),f=0;f<u.bendpoints.length;f++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),c.add(T);var E=this.newEdge(null);this.graphManager.add(E,y,T),p.add(T),y=T}var E=this.newEdge(null);return this.graphManager.add(E,y,u.target),this.edgeToDummyNodes.set(u,p),u.isInterGraph()?this.graphManager.remove(u):c.remove(u),p},g.prototype.createBendpointsFromDummyNodes=function(){var u=[];u=u.concat(this.graphManager.getAllEdges()),u=[].concat(n(this.edgeToDummyNodes.keys()),u);for(var p=0;p<u.length;p++){var y=u[p];if(y.bendpoints.length>0){for(var c=this.edgeToDummyNodes.get(y),f=0;f<c.length;f++){var T=c[f],E=new o(T.getCenterX(),T.getCenterY()),O=y.bendpoints.get(f);O.x=E.x,O.y=E.y,T.getOwner().remove(T)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(u,p,y,c){if(y!=null&&c!=null){var f=p;if(u<=50){var T=p/y;f-=(p-T)/50*(50-u)}else{var E=p*c;f+=(E-p)/50*(u-50)}return f}else{var O,a;return u<=50?(O=9*p/500,a=p/10):(O=9*p/50,a=-8*p),O*u+a}},g.findCenterOfTree=function(u){var p=[];p=p.concat(u);var y=[],c=new Map,f=!1,T=null;(p.length==1||p.length==2)&&(f=!0,T=p[0]);for(var E=0;E<p.length;E++){var O=p[E],a=O.getNeighborsList().size;c.set(O,O.getNeighborsList().size),a==1&&y.push(O)}var d=[];for(d=d.concat(y);!f;){var l=[];l=l.concat(d),d=[];for(var E=0;E<p.length;E++){var O=p[E],v=p.indexOf(O);v>=0&&p.splice(v,1),O.getNeighborsList().forEach(function(I){if(y.indexOf(I)<0){var w=c.get(I)-1;w==1&&d.push(I),c.set(I,w)}})}y=y.concat(d),(p.length==1||p.length==2)&&(f=!0,T=p[0])}return T},g.prototype.setGraphManager=function(u){this.graphManager=u},m.exports=g}),(function(m,L,A){function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},m.exports=n}),(function(m,L,A){var n=A(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},m.exports=i}),(function(m,L,A){function n(s){if(Array.isArray(s)){for(var g=0,u=Array(s.length);g<s.length;g++)u[g]=s[g];return u}else return Array.from(s)}var i=A(15),t=A(7),e=A(0),r=A(8),h=A(9);function o(){i.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var N in o.prototype=Object.create(i.prototype),i)o[N]=i[N];o.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var s,g,u,p,y,c,f=this.getGraphManager().getAllEdges(),T=0;T<f.length;T++)s=f[T],s.idealLength=this.idealEdgeLength,s.isInterGraph&&(u=s.getSource(),p=s.getTarget(),y=s.getSourceInLca().getEstimatedSize(),c=s.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(s.idealLength+=y+c-2*e.SIMPLE_NODE_SIZE),g=s.getLca().getInclusionTreeDepth(),s.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*g))},o.prototype.initSpringEmbedder=function(){var s=this.getAllNodes().length;this.incremental?(s>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(s>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(s-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var s=this.getAllEdges(),g,u=0;u<s.length;u++)g=s[u],this.calcSpringForce(g,g.idealLength)},o.prototype.calcRepulsionForces=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u,p,y,c,f=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),T=new Set,u=0;u<f.length;u++)y=f[u],this.calculateRepulsionForceOfANode(y,T,s,g),T.add(y);else for(u=0;u<f.length;u++)for(y=f[u],p=u+1;p<f.length;p++)c=f[p],y.getOwner()==c.getOwner()&&this.calcRepulsionForce(y,c)},o.prototype.calcGravitationalForces=function(){for(var s,g=this.getAllNodesToApplyGravitation(),u=0;u<g.length;u++)s=g[u],this.calcGravitationalForce(s)},o.prototype.moveNodes=function(){for(var s=this.getAllNodes(),g,u=0;u<s.length;u++)g=s[u],g.move()},o.prototype.calcSpringForce=function(s,g){var u=s.getSource(),p=s.getTarget(),y,c,f,T;if(this.uniformLeafNodeSizes&&u.getChild()==null&&p.getChild()==null)s.updateLengthSimple();else if(s.updateLength(),s.isOverlapingSourceAndTarget)return;y=s.getLength(),y!=0&&(c=this.springConstant*(y-g),f=c*(s.lengthX/y),T=c*(s.lengthY/y),u.springForceX+=f,u.springForceY+=T,p.springForceX-=f,p.springForceY-=T)},o.prototype.calcRepulsionForce=function(s,g){var u=s.getRect(),p=g.getRect(),y=[,,],c=[,,,,],f,T,E,O,a,d,l;if(u.intersects(p)){r.calcSeparationAmount(u,p,y,t.DEFAULT_EDGE_LENGTH/2),d=2*y[0],l=2*y[1];var v=s.noOfChildren*g.noOfChildren/(s.noOfChildren+g.noOfChildren);s.repulsionForceX-=v*d,s.repulsionForceY-=v*l,g.repulsionForceX+=v*d,g.repulsionForceY+=v*l}else this.uniformLeafNodeSizes&&s.getChild()==null&&g.getChild()==null?(f=p.getCenterX()-u.getCenterX(),T=p.getCenterY()-u.getCenterY()):(r.getIntersection(u,p,c),f=c[2]-c[0],T=c[3]-c[1]),Math.abs(f)<t.MIN_REPULSION_DIST&&(f=h.sign(f)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=h.sign(T)*t.MIN_REPULSION_DIST),E=f*f+T*T,O=Math.sqrt(E),a=this.repulsionConstant*s.noOfChildren*g.noOfChildren/E,d=a*f/O,l=a*T/O,s.repulsionForceX-=d,s.repulsionForceY-=l,g.repulsionForceX+=d,g.repulsionForceY+=l},o.prototype.calcGravitationalForce=function(s){var g=s.getOwner(),u=(g.getRight()+g.getLeft())/2,p=(g.getTop()+g.getBottom())/2,y=s.getCenterX()-u,c=s.getCenterY()-p,f=Math.abs(y)+s.getWidth()/2,T=Math.abs(c)+s.getHeight()/2,E;s.getOwner()==this.graphManager.getRoot()?(E=g.getEstimatedSize()*this.gravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y,s.gravitationForceY=-this.gravityConstant*c)):(E=g.getEstimatedSize()*this.compoundGravityRangeFactor,(f>E||T>E)&&(s.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,s.gravitationForceY=-this.gravityConstant*c*this.compoundGravityConstant))},o.prototype.isConverged=function(){var s,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),s=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,s||g},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var s,g=this.graphManager.getAllNodes(),u=0;u<g.length;u++)s=g[u],s.noOfChildren=s.getNoOfChildren()},o.prototype.calcGrid=function(s){var g=0,u=0;g=parseInt(Math.ceil((s.getRight()-s.getLeft())/this.repulsionRange)),u=parseInt(Math.ceil((s.getBottom()-s.getTop())/this.repulsionRange));for(var p=Array(g),y=0;y<g;y++)p[y]=Array(u);for(var y=0;y<g;y++)for(var c=0;c<u;c++)p[y][c]=[];return p},o.prototype.addNodeToGrid=function(s,g,u){var p=0,y=0,c=0,f=0;p=parseInt(Math.floor((s.getRect().x-g)/this.repulsionRange)),y=parseInt(Math.floor((s.getRect().width+s.getRect().x-g)/this.repulsionRange)),c=parseInt(Math.floor((s.getRect().y-u)/this.repulsionRange)),f=parseInt(Math.floor((s.getRect().height+s.getRect().y-u)/this.repulsionRange));for(var T=p;T<=y;T++)for(var E=c;E<=f;E++)this.grid[T][E].push(s),s.setGridCoordinates(p,y,c,f)},o.prototype.updateGrid=function(){var s,g,u=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),s=0;s<u.length;s++)g=u[s],this.addNodeToGrid(g,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(s,g,u,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&u||p){var y=new Set;s.surrounding=[];for(var c,f=this.grid,T=s.startX-1;T<s.finishX+2;T++)for(var E=s.startY-1;E<s.finishY+2;E++)if(!(T<0||E<0||T>=f.length||E>=f[0].length)){for(var O=0;O<f[T][E].length;O++)if(c=f[T][E][O],!(s.getOwner()!=c.getOwner()||s==c)&&!g.has(c)&&!y.has(c)){var a=Math.abs(s.getCenterX()-c.getCenterX())-(s.getWidth()/2+c.getWidth()/2),d=Math.abs(s.getCenterY()-c.getCenterY())-(s.getHeight()/2+c.getHeight()/2);a<=this.repulsionRange&&d<=this.repulsionRange&&y.add(c)}}s.surrounding=[].concat(n(y))}for(T=0;T<s.surrounding.length;T++)this.calcRepulsionForce(s,s.surrounding[T])},o.prototype.calcRepulsionRange=function(){return 0},m.exports=o}),(function(m,L,A){var n=A(1),i=A(7);function t(r,h,o){n.call(this,r,h,o),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var e in t.prototype=Object.create(n.prototype),n)t[e]=n[e];m.exports=t}),(function(m,L,A){var n=A(3);function i(e,r,h,o){n.call(this,e,r,h,o),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var t in i.prototype=Object.create(n.prototype),n)i[t]=n[t];i.prototype.setGridCoordinates=function(e,r,h,o){this.startX=e,this.finishX=r,this.startY=h,this.finishY=o},m.exports=i}),(function(m,L,A){function n(i,t){this.width=0,this.height=0,i!==null&&t!==null&&(this.height=t,this.width=i)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},m.exports=n}),(function(m,L,A){var n=A(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),this.map[t]!=null},i.prototype.get=function(t){var e=n.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},m.exports=i}),(function(m,L,A){var n=A(14);function i(){this.set={}}i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,h=0;h<r;h++)t.push(this.set[e[h]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var h=t[r];this.add(h)}},m.exports=i}),(function(m,L,A){var n=(function(){function e(r,h){for(var o=0;o<h.length;o++){var N=h[o];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(r,N.key,N)}}return function(r,h,o){return h&&e(r.prototype,h),o&&e(r,o),r}})();function i(e,r){if(!(e instanceof r))throw TypeError("Cannot call a class as a function")}var t=A(11);m.exports=(function(){function e(r,h){i(this,e),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=r instanceof t?r.size():r.length,this._quicksort(r,0,o-1)}return n(e,[{key:"_quicksort",value:function(r,h,o){if(h<o){var N=this._partition(r,h,o);this._quicksort(r,h,N),this._quicksort(r,N+1,o)}}},{key:"_partition",value:function(r,h,o){for(var N=this._get(r,h),s=h,g=o;;){for(;this.compareFunction(N,this._get(r,g));)g--;for(;this.compareFunction(this._get(r,s),N);)s++;if(s<g)this._swap(r,s,g),s++,g--;else return g}}},{key:"_get",value:function(r,h){return r instanceof t?r.get_object_at(h):r[h]}},{key:"_set",value:function(r,h,o){r instanceof t?r.set_object_at(h,o):r[h]=o}},{key:"_swap",value:function(r,h,o){var N=this._get(r,h);this._set(r,h,this._get(r,o)),this._set(r,o,N)}},{key:"_defaultCompareFunction",value:function(r,h){return h>r}}]),e})()}),(function(m,L,A){var n=(function(){function t(e,r){for(var h=0;h<r.length;h++){var o=r[h];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,r,h){return r&&t(e.prototype,r),h&&t(e,h),e}})();function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}m.exports=(function(){function t(e,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,t),this.sequence1=e,this.sequence2=r,this.match_score=h,this.mismatch_penalty=o,this.gap_penalty=N,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[s][g]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var p=0;p<this.jMax;p++)this.tracebackGrid[u][p]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var o=1;o<this.jMax;o++){var N=void 0;N=this.sequence1[h-1]===this.sequence2[o-1]?this.grid[h-1][o-1]+this.match_score:this.grid[h-1][o-1]+this.mismatch_penalty;var s=this.grid[h-1][o]+this.gap_penalty,g=this.grid[h][o-1]+this.gap_penalty,u=[N,s,g],p=this.arrayAllMaxIndexes(u);this.grid[h][o]=u[p[0]],this.tracebackGrid[h][o]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],h=this.tracebackGrid[r.pos[0]][r.pos[1]];h[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),h[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),h[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var h=[],o=-1;(o=e.indexOf(r,o+1))!==-1;)h.push(o);return h}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),t})()}),(function(m,L,A){var n=function(){};n.FDLayout=A(18),n.FDLayoutConstants=A(7),n.FDLayoutEdge=A(19),n.FDLayoutNode=A(20),n.DimensionD=A(21),n.HashMap=A(22),n.HashSet=A(23),n.IGeometry=A(8),n.IMath=A(9),n.Integer=A(10),n.Point=A(12),n.PointD=A(4),n.RandomSeed=A(16),n.RectangleD=A(13),n.Transform=A(17),n.UniqueIDGeneretor=A(14),n.Quicksort=A(24),n.LinkedList=A(11),n.LGraphObject=A(2),n.LGraph=A(5),n.LEdge=A(1),n.LGraphManager=A(6),n.LNode=A(3),n.Layout=A(15),n.LayoutConstants=A(0),n.NeedlemanWunsch=A(25),m.exports=n}),(function(m,L,A){function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;r>=0;r--){var h=this.listeners[r];h.event===t&&h.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var h=this.listeners[r];t===h.event&&h.callback(e)}},m.exports=n})])})})),Q=V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Z()):typeof define=="function"&&define.amd?define(["layout-base"],L):typeof C=="object"?C.coseBase=L(Z()):m.coseBase=L(m.layoutBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=7)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).FDLayoutConstants;function t(){}for(var e in i)t[e]=i[e];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutEdge;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraph;function t(r,h,o){i.call(this,r,h,o)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).LGraphManager;function t(r){i.call(this,r)}for(var e in t.prototype=Object.create(i.prototype),i)t[e]=i[e];L.exports=t}),(function(L,A,n){var i=n(0).FDLayoutNode,t=n(0).IMath;function e(h,o,N,s){i.call(this,h,o,N,s)}for(var r in e.prototype=Object.create(i.prototype),i)e[r]=i[r];e.prototype.move=function(){var h=this.graphManager.getLayout();this.displacementX=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),h.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},e.prototype.propogateDisplacementToChildren=function(h,o){for(var N=this.getChild().getNodes(),s,g=0;g<N.length;g++)s=N[g],s.getChild()==null?(s.moveBy(h,o),s.displacementX+=h,s.displacementY+=o):s.propogateDisplacementToChildren(h,o)},e.prototype.setPred1=function(h){this.pred1=h},e.prototype.getPred1=function(){return pred1},e.prototype.getPred2=function(){return pred2},e.prototype.setNext=function(h){this.next=h},e.prototype.getNext=function(){return next},e.prototype.setProcessed=function(h){this.processed=h},e.prototype.isProcessed=function(){return processed},L.exports=e}),(function(L,A,n){var i=n(0).FDLayout,t=n(4),e=n(3),r=n(5),h=n(2),o=n(1),N=n(0).FDLayoutConstants,s=n(0).LayoutConstants,g=n(0).Point,u=n(0).PointD,p=n(0).Layout,y=n(0).Integer,c=n(0).IGeometry,f=n(0).LGraph,T=n(0).Transform;function E(){i.call(this),this.toBeTiled={}}for(var O in E.prototype=Object.create(i.prototype),i)E[O]=i[O];E.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},E.prototype.newGraph=function(a){return new e(null,this.graphManager,a)},E.prototype.newNode=function(a){return new r(this.graphManager,a)},E.prototype.newEdge=function(a){return new h(null,null,a)},E.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=N.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=N.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=N.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=N.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=N.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=N.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/N.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=N.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return s.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){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){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(v){return a.has(v)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var l=this.getFlatForest();if(l.length>0)this.positionNodesRadially(l);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return a.has(D)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%N.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;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))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(_){return a.has(_)});this.graphManager.setAllNodesToApplyGravitation(d),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=N.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var l=!this.isTreeGrowing&&!this.isGrowthFinished,v=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(l,v),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),d={},l=0;l<a.length;l++){var v=a[l].rect,_=a[l].id;d[_]={id:_,x:v.getCenterX(),y:v.getCenterY(),w:v.width,h:v.height}}return d},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(N.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],d,l=this.graphManager.getGraphs(),v=l.length,_;for(_=0;_<v;_++)d=l[_],d.updateConnected(),d.isConnected||(a=a.concat(d.getNodes()));return a},E.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var d=new Set,l;for(l=0;l<a.length;l++){var v=a[l];if(!d.has(v)){var _=v.getSource(),D=v.getTarget();if(_==D)v.getBendpoints().push(new u),v.getBendpoints().push(new u),this.createDummyNodesForBendpoints(v),d.add(v);else{var I=[];if(I=I.concat(_.getEdgeListToNode(D)),I=I.concat(D.getEdgeListToNode(_)),!d.has(I[0])){if(I.length>1){var w;for(w=0;w<I.length;w++){var R=I[w];R.getBendpoints().push(new u),this.createDummyNodesForBendpoints(R)}}I.forEach(function(G){d.add(G)})}}}if(d.size==a.length)break}},E.prototype.positionNodesRadially=function(a){for(var d=new g(0,0),l=Math.ceil(Math.sqrt(a.length)),v=0,_=0,D=0,I=new u(0,0),w=0;w<a.length;w++){w%l==0&&(D=0,_=v,w!=0&&(_+=o.DEFAULT_COMPONENT_SEPERATION),v=0);var R=a[w],G=p.findCenterOfTree(R);d.x=D,d.y=_,I=E.radialLayout(R,G,d),I.y>v&&(v=Math.floor(I.y)),D=Math.floor(I.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(s.WORLD_CENTER_X-I.x/2,s.WORLD_CENTER_Y-I.y/2))},E.radialLayout=function(a,d,l){var v=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(d,null,0,359,0,v);var _=f.calculateBounds(a),D=new T;D.setDeviceOrgX(_.getMinX()),D.setDeviceOrgY(_.getMinY()),D.setWorldOrgX(l.x),D.setWorldOrgY(l.y);for(var I=0;I<a.length;I++)a[I].transform(D);var w=new u(_.getMaxX(),_.getMaxY());return D.inverseTransformPoint(w)},E.branchRadialLayout=function(a,d,l,v,_,D){var I=(v-l+1)/2;I<0&&(I+=180);var w=(I+l)%360*c.TWO_PI/360,R=_*Math.cos(w),G=_*Math.sin(w);a.setCenter(R,G);var x=[];x=x.concat(a.getEdges());var M=x.length;d!=null&&M--;for(var U=0,b=x.length,F,S=a.getEdgesBetween(d);S.length>1;){var Y=S[0];S.splice(0,1);var X=x.indexOf(Y);X>=0&&x.splice(X,1),b--,M--}F=d==null?0:(x.indexOf(S[0])+1)%b;for(var W=Math.abs(v-l)/M,B=F;U!=M;B=++B%b){var H=x[B].getOtherEnd(a);if(H!=d){var q=(l+U*W)%360,ot=(q+W)%360;E.branchRadialLayout(H,a,q,ot,_+D,D),U++}}},E.maxDiagonalInTree=function(a){for(var d=y.MIN_VALUE,l=0;l<a.length;l++){var v=a[l].getDiagonal();v>d&&(d=v)}return d},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var a=this,d={};this.memberGroups={},this.idToDummyNode={};for(var l=[],v=this.graphManager.getAllNodes(),_=0;_<v.length;_++){var D=v[_],I=D.getParent();this.getNodeDegreeWithChildren(D)===0&&(I.id==null||!this.getToBeTiled(I))&&l.push(D)}for(var _=0;_<l.length;_++){var D=l[_],w=D.getParent().id;d[w]===void 0&&(d[w]=[]),d[w]=d[w].concat(D)}Object.keys(d).forEach(function(R){if(d[R].length>1){var G="DummyCompound_"+R;a.memberGroups[G]=d[R];var x=d[R][0].getParent(),M=new r(a.graphManager);M.id=G,M.paddingLeft=x.paddingLeft||0,M.paddingRight=x.paddingRight||0,M.paddingBottom=x.paddingBottom||0,M.paddingTop=x.paddingTop||0,a.idToDummyNode[G]=M;var U=a.getGraphManager().add(a.newGraph(),M),b=x.getChild();b.add(M);for(var F=0;F<d[R].length;F++){var S=d[R][F];b.remove(S),U.add(S)}}})},E.prototype.clearCompounds=function(){var a={},d={};this.performDFSOnCompounds();for(var l=0;l<this.compoundOrder.length;l++)d[this.compoundOrder[l].id]=this.compoundOrder[l],a[this.compoundOrder[l].id]=[].concat(this.compoundOrder[l].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[l].getChild()),this.compoundOrder[l].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,d)},E.prototype.clearZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(l){var v=a.idToDummyNode[l];d[l]=a.tileNodes(a.memberGroups[l],v.paddingLeft+v.paddingRight),v.rect.width=d[l].width,v.rect.height=d[l].height})},E.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var d=this.compoundOrder[a],l=d.id,v=d.paddingLeft,_=d.paddingTop;this.adjustLocations(this.tiledMemberPack[l],d.rect.x,d.rect.y,v,_)}},E.prototype.repopulateZeroDegreeMembers=function(){var a=this,d=this.tiledZeroDegreePack;Object.keys(d).forEach(function(l){var v=a.idToDummyNode[l],_=v.paddingLeft,D=v.paddingTop;a.adjustLocations(d[l],v.rect.x,v.rect.y,_,D)})},E.prototype.getToBeTiled=function(a){var d=a.id;if(this.toBeTiled[d]!=null)return this.toBeTiled[d];var l=a.getChild();if(l==null)return this.toBeTiled[d]=!1,!1;for(var v=l.getNodes(),_=0;_<v.length;_++){var D=v[_];if(this.getNodeDegree(D)>0)return this.toBeTiled[d]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[d]=!1,!1}return this.toBeTiled[d]=!0,!0},E.prototype.getNodeDegree=function(a){a.id;for(var d=a.getEdges(),l=0,v=0;v<d.length;v++){var _=d[v];_.getSource().id!==_.getTarget().id&&(l+=1)}return l},E.prototype.getNodeDegreeWithChildren=function(a){var d=this.getNodeDegree(a);if(a.getChild()==null)return d;for(var l=a.getChild().getNodes(),v=0;v<l.length;v++){var _=l[v];d+=this.getNodeDegreeWithChildren(_)}return d},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(a){for(var d=0;d<a.length;d++){var l=a[d];l.getChild()!=null&&this.fillCompexOrderByDFS(l.getChild().getNodes()),this.getToBeTiled(l)&&this.compoundOrder.push(l)}},E.prototype.adjustLocations=function(a,d,l,v,_){d+=v,l+=_;for(var D=d,I=0;I<a.rows.length;I++){var w=a.rows[I];d=D;for(var R=0,G=0;G<w.length;G++){var x=w[G];x.rect.x=d,x.rect.y=l,d+=x.rect.width+a.horizontalPadding,x.rect.height>R&&(R=x.rect.height)}l+=R+a.verticalPadding}},E.prototype.tileCompoundMembers=function(a,d){var l=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(v){var _=d[v];l.tiledMemberPack[v]=l.tileNodes(a[v],_.paddingLeft+_.paddingRight),_.rect.width=l.tiledMemberPack[v].width,_.rect.height=l.tiledMemberPack[v].height})},E.prototype.tileNodes=function(a,d){var l={rows:[],rowWidth:[],rowHeight:[],width:0,height:d,verticalPadding:o.TILING_PADDING_VERTICAL,horizontalPadding:o.TILING_PADDING_HORIZONTAL};a.sort(function(D,I){return D.rect.width*D.rect.height>I.rect.width*I.rect.height?-1:D.rect.width*D.rect.height<I.rect.width*I.rect.height?1:0});for(var v=0;v<a.length;v++){var _=a[v];l.rows.length==0?this.insertNodeToRow(l,_,0,d):this.canAddHorizontal(l,_.rect.width,_.rect.height)?this.insertNodeToRow(l,_,this.getShortestRowIndex(l),d):this.insertNodeToRow(l,_,l.rows.length,d),this.shiftToLastRow(l)}return l},E.prototype.insertNodeToRow=function(a,d,l,v){var _=v;l==a.rows.length&&(a.rows.push([]),a.rowWidth.push(_),a.rowHeight.push(0));var D=a.rowWidth[l]+d.rect.width;a.rows[l].length>0&&(D+=a.horizontalPadding),a.rowWidth[l]=D,a.width<D&&(a.width=D);var I=d.rect.height;l>0&&(I+=a.verticalPadding);var w=0;I>a.rowHeight[l]&&(w=a.rowHeight[l],a.rowHeight[l]=I,w=a.rowHeight[l]-w),a.height+=w,a.rows[l].push(d)},E.prototype.getShortestRowIndex=function(a){for(var d=-1,l=Number.MAX_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]<l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.getLongestRowIndex=function(a){for(var d=-1,l=Number.MIN_VALUE,v=0;v<a.rows.length;v++)a.rowWidth[v]>l&&(d=v,l=a.rowWidth[v]);return d},E.prototype.canAddHorizontal=function(a,d,l){var v=this.getShortestRowIndex(a);if(v<0)return!0;var _=a.rowWidth[v];if(_+a.horizontalPadding+d<=a.width)return!0;var D=0;a.rowHeight[v]<l&&v>0&&(D=l+a.verticalPadding-a.rowHeight[v]);var I=a.width-_>=d+a.horizontalPadding?(a.height+D)/(_+d+a.horizontalPadding):(a.height+D)/a.width;D=l+a.verticalPadding;var w=a.width<d?(a.height+D)/d:(a.height+D)/a.width;return w<1&&(w=1/w),I<1&&(I=1/I),I<w},E.prototype.shiftToLastRow=function(a){var d=this.getLongestRowIndex(a),l=a.rowWidth.length-1,v=a.rows[d],_=v[v.length-1],D=_.width+a.horizontalPadding;if(a.width-a.rowWidth[l]>D&&d!=l){v.splice(-1,1),a.rows[l].push(_),a.rowWidth[d]=a.rowWidth[d]-D,a.rowWidth[l]=a.rowWidth[l]+D,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var I=Number.MIN_VALUE,w=0;w<v.length;w++)v[w].height>I&&(I=v[w].height);d>0&&(I+=a.verticalPadding);var R=a.rowHeight[d]+a.rowHeight[l];a.rowHeight[d]=I,a.rowHeight[l]<_.height+a.verticalPadding&&(a.rowHeight[l]=_.height+a.verticalPadding);var G=a.rowHeight[d]+a.rowHeight[l];a.height+=G-R,this.shiftToLastRow(a)}},E.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var a=[],d=!0,l;d;){var v=this.graphManager.getAllNodes(),_=[];d=!1;for(var D=0;D<v.length;D++)l=v[D],l.getEdges().length==1&&!l.getEdges()[0].isInterGraph&&l.getChild()==null&&(_.push([l,l.getEdges()[0],l.getOwner()]),d=!0);if(d==1){for(var I=[],w=0;w<_.length;w++)_[w][0].getEdges().length==1&&(I.push(_[w]),_[w][0].getOwner().remove(_[w][0]));a.push(I),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},E.prototype.growTree=function(a){for(var d=a[a.length-1],l,v=0;v<d.length;v++)l=d[v],this.findPlaceforPrunedNode(l),l[2].add(l[0]),l[2].add(l[1],l[1].source,l[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(a){var d,l,v=a[0];l=v==a[1].source?a[1].target:a[1].source;var _=l.startX,D=l.finishX,I=l.startY,w=l.finishY,R=[0,0,0,0];if(I>0)for(var G=_;G<=D;G++)R[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(D<this.grid.length-1)for(var G=I;G<=w;G++)R[1]+=this.grid[D+1][G].length+this.grid[D][G].length-1;if(w<this.grid[0].length-1)for(var G=_;G<=D;G++)R[2]+=this.grid[G][w+1].length+this.grid[G][w].length-1;if(_>0)for(var G=I;G<=w;G++)R[3]+=this.grid[_-1][G].length+this.grid[_][G].length-1;for(var x=y.MAX_VALUE,M,U,b=0;b<R.length;b++)R[b]<x?(x=R[b],M=1,U=b):R[b]==x&&M++;if(M==3&&x==0)R[0]==0&&R[1]==0&&R[2]==0?d=1:R[0]==0&&R[1]==0&&R[3]==0?d=0:R[0]==0&&R[2]==0&&R[3]==0?d=3:R[1]==0&&R[2]==0&&R[3]==0&&(d=2);else if(M==2&&x==0){var F=Math.floor(Math.random()*2);d=R[0]==0&&R[1]==0?F==0?0:1:R[0]==0&&R[2]==0?F==0?0:2:R[0]==0&&R[3]==0?F==0?0:3:R[1]==0&&R[2]==0?F==0?1:2:R[1]==0&&R[3]==0?F==0?1:3:F==0?2:3}else if(M==4&&x==0){var F=Math.floor(Math.random()*4);d=F}else d=U;d==0?v.setCenter(l.getCenterX(),l.getCenterY()-l.getHeight()/2-N.DEFAULT_EDGE_LENGTH-v.getHeight()/2):d==1?v.setCenter(l.getCenterX()+l.getWidth()/2+N.DEFAULT_EDGE_LENGTH+v.getWidth()/2,l.getCenterY()):d==2?v.setCenter(l.getCenterX(),l.getCenterY()+l.getHeight()/2+N.DEFAULT_EDGE_LENGTH+v.getHeight()/2):v.setCenter(l.getCenterX()-l.getWidth()/2-N.DEFAULT_EDGE_LENGTH-v.getWidth()/2,l.getCenterY())},L.exports=E}),(function(L,A,n){var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),L.exports=i})])})})),at=nt(V(((C,P)=>{(function(m,L){typeof C=="object"&&typeof P=="object"?P.exports=L(Q()):typeof define=="function"&&define.amd?define(["cose-base"],L):typeof C=="object"?C.cytoscapeCoseBilkent=L(Q()):m.cytoscapeCoseBilkent=L(m.coseBase)})(C,function(m){return(function(L){var A={};function n(i){if(A[i])return A[i].exports;var t=A[i]={i,l:!1,exports:{}};return L[i].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=A,n.i=function(i){return i},n.d=function(i,t,e){n.o(i,t)||Object.defineProperty(i,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(t,"a",t),t},n.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},n.p="",n(n.s=1)})([(function(L,A){L.exports=m}),(function(L,A,n){var i=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,e=n(0).CoSEConstants,r=n(0).CoSELayout,h=n(0).CoSENode,o=n(0).layoutBase.PointD,N=n(0).layoutBase.DimensionD,s={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function g(c,f){var T={};for(var E in c)T[E]=c[E];for(var E in f)T[E]=f[E];return T}function u(c){this.options=g(s,c),p(this.options)}var p=function(c){c.nodeRepulsion!=null&&(e.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(e.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(e.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(e.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(e.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(e.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(e.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?i.QUALITY=0:c.quality=="proof"?i.QUALITY=2:i.QUALITY=1,e.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,e.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!c.randomize,e.ANIMATE=t.ANIMATE=i.ANIMATE=c.animate,e.TILE=c.tile,e.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,e.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};u.prototype.run=function(){var c,f,T=this.options;this.idToLNode={};var E=this.layout=new r,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=E.newGraphManager();this.gm=a;var d=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(d),E);for(var v=0;v<l.length;v++){var _=l[v],D=this.idToLNode[_.data("source")],I=this.idToLNode[_.data("target")];if(D!==I&&D.getEdgesBetween(I).length==0){var w=a.add(E.newEdge(),D,I);w.id=_.id()}}var R=function(x,M){typeof x=="number"&&(x=M);var U=x.data("id"),b=O.idToLNode[U];return{x:b.getRect().getCenterX(),y:b.getRect().getCenterY()}},G=function x(){for(var M=function(){T.fit&&T.cy.fit(T.eles,T.padding),c||(c=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},U=O.options.refresh,b,F=0;F<U&&!b;F++)b=O.stopped||O.layout.tick();if(b){E.checkLayoutSuccess()&&!E.isSubLayout&&E.doPostLayout(),E.tilingPostLayout&&E.tilingPostLayout(),E.isLayoutFinished=!0,O.options.eles.nodes().positions(R),M(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),f&&cancelAnimationFrame(f),c=!1;return}var S=O.layout.getPositionsData();T.eles.nodes().positions(function(Y,X){if(typeof Y=="number"&&(Y=X),!Y.isParent()){for(var W=Y.id(),B=S[W],H=Y;B==null&&(B=S[H.data("parent")]||S["DummyCompound_"+H.data("parent")],S[W]=B,H=H.parent()[0],H!=null););return B==null?{x:Y.position("x"),y:Y.position("y")}:{x:B.x,y:B.y}}}),M(),f=requestAnimationFrame(x)};return E.addListener("layoutstarted",function(){O.options.animate==="during"&&(f=requestAnimationFrame(G))}),E.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,R),c=!1),this},u.prototype.getTopMostNodes=function(c){for(var f={},T=0;T<c.length;T++)f[c[T].id()]=!0;return c.filter(function(E,O){typeof E=="number"&&(E=O);for(var a=E.parent()[0];a!=null;){if(f[a.id()])return!1;a=a.parent()[0]}return!0})},u.prototype.processChildrenList=function(c,f,T){for(var E=f.length,O=0;O<E;O++){var a=f[O],d=a.children(),l,v=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(l=a.outerWidth()!=null&&a.outerHeight()!=null?c.add(new h(T.graphManager,new o(a.position("x")-v.w/2,a.position("y")-v.h/2),new N(parseFloat(v.w),parseFloat(v.h)))):c.add(new h(this.graphManager)),l.id=a.data("id"),l.paddingLeft=parseInt(a.css("padding")),l.paddingTop=parseInt(a.css("padding")),l.paddingRight=parseInt(a.css("padding")),l.paddingBottom=parseInt(a.css("padding")),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var _=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,D=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,I=a.css("text-halign");l.labelWidth=_,l.labelHeight=D,l.labelPos=I}if(this.idToLNode[a.data("id")]=l,isNaN(l.rect.x)&&(l.rect.x=0),isNaN(l.rect.y)&&(l.rect.y=0),d!=null&&d.length>0){var w=T.getGraphManager().add(T.newGraph(),l);this.processChildrenList(w,d,T)}}},u.prototype.stop=function(){return this.stopped=!0,this};var y=function(c){c("layout","cose-bilkent",u)};typeof cytoscape<"u"&&y(cytoscape),L.exports=y})])})}))(),1);z.use(at.default);function $(C,P){C.forEach(m=>{let L={id:m.id,labelText:m.label,height:m.height,width:m.width,padding:m.padding??0};Object.keys(m).forEach(A=>{["id","label","height","width","padding","x","y"].includes(A)||(L[A]=m[A])}),P.add({group:"nodes",data:L,position:{x:m.x??0,y:m.y??0}})})}k($,"addNodes");function K(C,P){C.forEach(m=>{let L={id:m.id,source:m.start,target:m.end};Object.keys(m).forEach(A=>{["id","start","end"].includes(A)||(L[A]=m[A])}),P.add({group:"edges",data:L})})}k(K,"addEdges");function J(C){return new Promise(P=>{let m=st("body").append("div").attr("id","cy").attr("style","display:none"),L=z({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),$(C.nodes,L),K(C.edges,L),L.nodes().forEach(function(A){A.layoutDimensions=()=>{let n=A.data();return{w:n.width,h:n.height}}}),L.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),L.ready(A=>{j.info("Cytoscape ready",A),P(L)})})}k(J,"createCytoscapeInstance");function tt(C){return C.nodes().map(P=>{let m=P.data(),L=P.position(),A={id:m.id,x:L.x,y:L.y};return Object.keys(m).forEach(n=>{n!=="id"&&(A[n]=m[n])}),A})}k(tt,"extractPositionedNodes");function et(C){return C.edges().map(P=>{let m=P.data(),L=P._private.rscratch,A={id:m.id,source:m.source,target:m.target,startX:L.startX,startY:L.startY,midX:L.midX,midY:L.midY,endX:L.endX,endY:L.endY};return Object.keys(m).forEach(n=>{["id","source","target"].includes(n)||(A[n]=m[n])}),A})}k(et,"extractPositionedEdges");async function it(C,P){j.debug("Starting cose-bilkent layout algorithm");try{rt(C);let m=await J(C),L=tt(m),A=et(m);return j.debug(`Layout completed: ${L.length} nodes, ${A.length} edges`),{nodes:L,edges:A}}catch(m){throw j.error("Error in cose-bilkent layout algorithm:",m),m}}k(it,"executeCoseBilkentLayout");function rt(C){if(!C)throw Error("Layout data is required");if(!C.config)throw Error("Configuration is required in layout data");if(!C.rootNode)throw Error("Root node is required");if(!C.nodes||!Array.isArray(C.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(C.edges))throw Error("Edges array is required in layout data");return!0}k(rt,"validateLayoutData");var ht=k(async(C,P,{insertCluster:m,insertEdge:L,insertEdgeLabel:A,insertMarkers:n,insertNode:i,log:t,positionEdgeLabel:e},{algorithm:r})=>{let h={},o={},N=P.select("g");n(N,C.markers,C.type,C.diagramId);let s=N.insert("g").attr("class","subgraphs"),g=N.insert("g").attr("class","edgePaths"),u=N.insert("g").attr("class","edgeLabels"),p=N.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(C.nodes.map(async c=>{if(c.isGroup){let f={...c};o[c.id]=f,h[c.id]=f,await m(s,c)}else{let f={...c};h[c.id]=f;let T=await i(p,c,{config:C.config,dir:C.direction||"TB"}),E=T.node().getBBox();f.width=E.width,f.height=E.height,f.domId=T,t.debug(`Node ${c.id} dimensions: ${E.width}x${E.height}`)}})),t.debug("Running cose-bilkent layout algorithm");let y=await it({...C,nodes:C.nodes.map(c=>{let f=h[c.id];return{...c,width:f.width,height:f.height}})},C.config);t.debug("Positioning nodes based on layout results"),y.nodes.forEach(c=>{let f=h[c.id];f!=null&&f.domId&&(f.domId.attr("transform",`translate(${c.x}, ${c.y})`),f.x=c.x,f.y=c.y,t.debug(`Positioned node ${f.id} at center (${c.x}, ${c.y})`))}),y.edges.forEach(c=>{let f=C.edges.find(T=>T.id===c.id);f&&(f.points=[{x:c.startX,y:c.startY},{x:c.midX,y:c.midY},{x:c.endX,y:c.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(C.edges.map(async c=>{await A(u,c);let f=h[c.start??""],T=h[c.end??""];if(f&&T){let E=y.edges.find(O=>O.id===c.id);if(E){t.debug("APA01 positionedEdge",E);let O={...c};e(O,L(g,O,o,C.type,f,T,C.diagramId))}else{let O={...c,points:[{x:f.x||0,y:f.y||0},{x:T.x||0,y:T.y||0}]};e(O,L(g,O,o,C.type,f,T,C.diagramId))}}})),t.debug("Cose-bilkent rendering completed")},"render");export{ht as render};
@@ -0,0 +1 @@
1
+ import{t as r}from"./crystal-YUhScjFU.js";export{r as crystal};
@@ -1 +1 @@
1
- import{a as s,i as a,n as r,o,r as e,t}from"./css-DPEtZWJi.js";export{t as css,r as gss,e as keywords,a as less,s as mkCSS,o as sCSS};
1
+ import{a as s,i as a,n as r,o,r as e,t}from"./css-BpYxrU6m.js";export{t as css,r as gss,e as keywords,a as less,s as mkCSS,o as sCSS};
@@ -0,0 +1 @@
1
+ import{t as r}from"./cypher-DtBx1FxP.js";export{r as cypher};
@@ -0,0 +1 @@
1
+ import{t as o}from"./d-Dah-rTjO.js";export{o as d};