ranui 0.3.1-alpha.1 → 0.4.2-alpha.2
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.
- package/README.md +4 -4
- package/README.zh-CN.md +3 -3
- package/dist/Temml-3BKyDWY9.js +4 -0
- package/dist/Temml-B3J22Yln.cjs +1 -0
- package/dist/{abnfDiagram-VRR7QNED-CTsqwzwi.js → abnfDiagram-VRR7QNED-C21Pc9Db.js} +4 -4
- package/dist/abnfDiagram-VRR7QNED-Do5oGbAb.cjs +1 -0
- package/dist/add-user-Dk1LIZtp.cjs +6 -0
- package/dist/add-user-WnpaBGEK.js +15 -0
- package/dist/arc-BTq35m9x.js +9 -0
- package/dist/arc-BjIU7MOi.cjs +1 -0
- package/dist/{arc-DRPGof21.js → arc-DJJx8BhF.js} +1 -1
- package/dist/architecture-TIHT7OUA-BJNZJd9x.cjs +1 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-8mjyXr-w.js → architectureDiagram-ZJ3FMSHR-Dt0W9V1f.js} +7 -7
- package/dist/{architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs → architectureDiagram-ZJ3FMSHR-WH22GUwo.cjs} +2 -2
- package/dist/{arrow-down-Bi5kqUrX.js → arrow-down-DrjnnTe1.js} +4 -2
- package/dist/arrow-down-Dt-KyDFE.cjs +5 -0
- package/dist/{blockDiagram-677ZJIJ3-3F79MOSt.js → blockDiagram-677ZJIJ3-Cb0N9R3M.js} +8 -8
- package/dist/book-8PpGdTqf.cjs +1 -0
- package/dist/book-CkgJlJ4n.js +10 -0
- package/dist/build/config.d.ts +11 -2
- package/dist/builder-2HD21I6K.cjs +1 -0
- package/dist/builder.js +40 -40
- package/dist/{button-Dw6YKyNd.js → button-BgWXCj7-.js} +14 -12
- package/dist/button.js +1 -1
- package/dist/{c4Diagram-LMCZKHZV-Cxn_gqu_.js → c4Diagram-LMCZKHZV-CFLtikIe.js} +5 -5
- package/dist/{card-BHN9Xp4S.js → card-DzVv3ADA.js} +13 -13
- package/dist/card.js +1 -1
- package/dist/{channel-k5-UxdcV.js → channel-B9hm3LKF.js} +1 -1
- package/dist/check-63MT_RxH.cjs +1 -0
- package/dist/check-circle-Cbsw_Ffd.cjs +1 -0
- package/dist/check-circle-Dpkv0_9Z.js +10 -0
- package/dist/check-circle-fill-DVVjVyV6.cjs +1 -0
- package/dist/check-circle-fill-eBwMoYEo.js +10 -0
- package/dist/{checkbox-O_J_n1_W.js → checkbox-KOXDiwRr.js} +15 -14
- package/dist/checkbox.js +1 -1
- package/dist/{chunk-32BRIVSS-jAuAwMVV.js → chunk-32BRIVSS-DhXCFCbM.js} +3 -3
- package/dist/{chunk-52WLFC77-wpL7en7e.js → chunk-52WLFC77-CLS2Long.js} +8 -8
- package/dist/chunk-5FCAYU7R-M2ohMDGf.cjs +1 -0
- package/dist/chunk-5HE753X5-DkUtBcPF.cjs +1 -0
- package/dist/chunk-5JV3BV7I-BAn3GEjF.cjs +1 -0
- package/dist/chunk-5TONJI2A-Bk0HPVuY.cjs +2 -0
- package/dist/chunk-BIQX33UG-CaI4JSOY.cjs +1 -0
- package/dist/{chunk-C7G6YPKG-CA-DNpvI.js → chunk-C7G6YPKG-CuJexLt7.js} +1 -1
- package/dist/chunk-CQNSW5MT-DHm86rAm.cjs +1 -0
- package/dist/chunk-CYSBUYHQ-8HNynFK-.cjs +1 -0
- package/dist/chunk-EMLP6XTP-DESFjGc5.cjs +1 -0
- package/dist/{chunk-EX3LRPZG-BCmf0iDq.js → chunk-EX3LRPZG-C-g2gFWb.js} +7 -7
- package/dist/{chunk-FWX5IMBZ-DZ5VYvm5.js → chunk-FWX5IMBZ-Cpx1Lg-4.js} +8 -8
- package/dist/{chunk-HOUHSVGY-DRQcQeMT.js → chunk-HOUHSVGY-DpvP0Kt0.js} +2 -2
- package/dist/{chunk-ICXQ74PX-DR8rL-xF.js → chunk-ICXQ74PX-DPZfA3a8.js} +3 -3
- package/dist/chunk-JG7HCLWE-DJPVQhqh.cjs +2 -0
- package/dist/{chunk-MOJQB5TN-BC46HDyu.js → chunk-MOJQB5TN-BWgg4qSh.js} +3 -3
- package/dist/chunk-MOZMSUNE-BiirTonv.cjs +1 -0
- package/dist/{chunk-OGEWGWER-BV51ll2w.js → chunk-OGEWGWER-CYsD5SNd.js} +2 -2
- package/dist/chunk-OSBZ3O6U-BDLnzsCC.cjs +1 -0
- package/dist/{chunk-PUDLZKDR-NdMR0Ft5.js → chunk-PUDLZKDR-Dw2BOPG-.js} +9 -9
- package/dist/{chunk-Q4XR5HBZ-3BHjjc9u.js → chunk-Q4XR5HBZ-D_n2NzvL.js} +4 -4
- package/dist/chunk-QBLGF6JB-DgQIhta2.cjs +1 -0
- package/dist/chunk-R7FJI6CG-BjmGc1OU.cjs +1 -0
- package/dist/{chunk-RYQCIY6F-BER2T9t0.js → chunk-RYQCIY6F-CIHQ94xS.js} +1 -1
- package/dist/chunk-U6XO7XAA-Cxdku9z7.cjs +2 -0
- package/dist/{chunk-V7JOEXUC-Cr_hr02u.js → chunk-V7JOEXUC-DNMlt0_E.js} +7 -7
- package/dist/{chunk-VAUOI2AC-izt0o4id.js → chunk-VAUOI2AC-CrgGIUR-.js} +2 -2
- package/dist/{chunk-VR4S4FIN-CJi5okl4.js → chunk-VR4S4FIN-DQsfbArk.js} +2 -2
- package/dist/{chunk-WYO6CB5R-DDHkKowO.js → chunk-WYO6CB5R-DyGmS3I6.js} +1 -1
- package/dist/{chunk-XXDRQBXY-BB1i_53q.js → chunk-XXDRQBXY-BeVLa_G2.js} +1 -1
- package/dist/chunk-YOTPTUD7-BCQ2zMB7.cjs +1 -0
- package/dist/{chunk-ZGVPDNZ5-6uMbTJXy.js → chunk-ZGVPDNZ5-DlEsNy2g.js} +7 -7
- package/dist/circle-By7YwAJj.cjs +1 -0
- package/dist/circle-fold-BJWGLDa6.cjs +1 -0
- package/dist/circle-fold-DrwUHB-m.js +9 -0
- package/dist/circle-line-BsXpw2HA.cjs +1 -0
- package/dist/circle-line-DCUX3o9u.js +9 -0
- package/dist/circle-rotate-BK1tW3Jv.cjs +1 -0
- package/dist/circle-rotate-DeBqoVVp.js +9 -0
- package/dist/circle-spin-Crycoffl.js +9 -0
- package/dist/circle-spin-Ctoq0Wil.cjs +1 -0
- package/dist/circle-turn-DytKZEgU.js +9 -0
- package/dist/circle-turn-J9aToB75.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-CkQt8O2B.js +30 -0
- package/dist/classDiagram-v2-EOCWNBFH-CkQt8O2B.js +30 -0
- package/dist/close-CDF9aHTU.js +10 -0
- package/dist/close-Ck_jxN7T.cjs +1 -0
- package/dist/close-circle-B3lBlRHE.cjs +1 -0
- package/dist/close-circle-DZZJhaf-.js +10 -0
- package/dist/close-circle-fill-Ds9W-XNo.cjs +1 -0
- package/dist/close-circle-fill-OiY9CVOv.js +10 -0
- package/dist/colorpicker-7adjGSuz.js +250 -0
- package/dist/colorpicker.js +1 -1
- package/dist/components/icon/index.d.ts +7 -0
- package/dist/components/loading/index.d.ts +6 -29
- package/dist/components/loading/types.d.ts +11 -0
- package/dist/components/loading/variants/arc/index.d.ts +6 -0
- package/dist/components/loading/variants/circle/index.d.ts +6 -0
- package/dist/components/loading/variants/circle-fold/index.d.ts +6 -0
- package/dist/components/loading/variants/circle-line/index.d.ts +6 -0
- package/dist/components/loading/variants/circle-rotate/index.d.ts +6 -0
- package/dist/components/loading/variants/circle-spin/index.d.ts +6 -0
- package/dist/components/loading/variants/circle-turn/index.d.ts +6 -0
- package/dist/components/loading/variants/cube/index.d.ts +6 -0
- package/dist/components/loading/variants/cube-dim/index.d.ts +6 -0
- package/dist/components/loading/variants/cube-fold/index.d.ts +6 -0
- package/dist/components/loading/variants/cube-grid/index.d.ts +6 -0
- package/dist/components/loading/variants/dot/index.d.ts +6 -0
- package/dist/components/loading/variants/dot-bar/index.d.ts +6 -0
- package/dist/components/loading/variants/dot-circle/index.d.ts +6 -0
- package/dist/components/loading/variants/dot-line/index.d.ts +6 -0
- package/dist/components/loading/variants/dot-pulse/index.d.ts +6 -0
- package/dist/components/loading/variants/double-bounce/index.d.ts +6 -0
- package/dist/components/loading/variants/drop/index.d.ts +6 -0
- package/dist/components/loading/variants/line/index.d.ts +6 -0
- package/dist/components/loading/variants/line-scale/index.d.ts +6 -0
- package/dist/components/loading/variants/pacman/index.d.ts +6 -0
- package/dist/components/loading/variants/pulse/index.d.ts +6 -0
- package/dist/components/loading/variants/rotate/index.d.ts +6 -0
- package/dist/components/loading/variants/scale-out/index.d.ts +6 -0
- package/dist/components/loading/variants/solar/index.d.ts +6 -0
- package/dist/components/loading/variants/square/index.d.ts +6 -0
- package/dist/components/loading/variants/stretch/index.d.ts +6 -0
- package/dist/components/loading/variants/text/index.d.ts +6 -0
- package/dist/components/loading/variants/triple-bounce/index.d.ts +6 -0
- package/dist/components/math/index.d.ts +37 -1
- package/dist/components/player/index.d.ts +0 -1
- package/dist/components/popover/index.d.ts +5 -5
- package/dist/components/select/index.d.ts +23 -0
- package/dist/{content-YOKzMoc7.js → content-BmwgR8WP.js} +7 -7
- package/dist/content.js +1 -1
- package/dist/copy-CMAYGCsm.cjs +1 -0
- package/dist/{cose-bilkent-JH36ORCC-DTwvJlGw.js → cose-bilkent-JH36ORCC-DCMxiO2H.js} +2 -2
- package/dist/cube-BB32JJuI.cjs +1 -0
- package/dist/cube-dim-DTcZAlcE.cjs +1 -0
- package/dist/cube-dim-DgfzlG3p.js +9 -0
- package/dist/cube-fold-CKVQ1IDZ.cjs +1 -0
- package/dist/cube-fold-Dp4-pf7P.js +9 -0
- package/dist/cube-grid-BrxyqSNh.cjs +1 -0
- package/dist/cube-grid-DprxkSoT.js +9 -0
- package/dist/cube-iOzgFQbc.js +9 -0
- package/dist/cynefin-VYW2F7L2-Yeua0tAa.cjs +1 -0
- package/dist/{cynefinDiagram-TSTJHNR4-Bjt4QTVh.js → cynefinDiagram-TSTJHNR4-B6dEjVBJ.js} +4 -4
- package/dist/{cynefinDiagram-TSTJHNR4-ISDORSxO.cjs → cynefinDiagram-TSTJHNR4-CAx-94I7.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-Dfku86Az.js → dagre-VKFMJZFB-CkNsP9vI.js} +10 -10
- package/dist/{diagram-FQU43EPY-BvQ5jmVn.js → diagram-FQU43EPY-Cefzg0En.js} +3 -3
- package/dist/{diagram-FQU43EPY-BAiRt5eL.cjs → diagram-FQU43EPY-Cn7-Jxoj.cjs} +2 -2
- package/dist/{diagram-G47NLZAW-DT2BBA0T.js → diagram-G47NLZAW-BsDJqCJu.js} +6 -6
- package/dist/{diagram-G47NLZAW-DGnmEa8u.cjs → diagram-G47NLZAW-Clm1JIiF.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-DxgkStA3.cjs → diagram-NH7WQ7WH-BQWzEBKY.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-W7jg4Vh8.js → diagram-NH7WQ7WH-DEGzjxf4.js} +4 -4
- package/dist/{diagram-OA4YK3LP-DkvFII73.cjs → diagram-OA4YK3LP-B90IV5Q-.cjs} +3 -3
- package/dist/{diagram-OA4YK3LP-jU--aqQl.js → diagram-OA4YK3LP-BZUB0lzT.js} +5 -5
- package/dist/{diagram-WEI45ONY-XvzRFmmY.cjs → diagram-WEI45ONY-B-8IP8vK.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-C_Qhf4ny.js → diagram-WEI45ONY-BURO1A6S.js} +4 -4
- package/dist/{dist-C0Fwsvsq.js → dist-9Ly83Lo6.js} +1 -1
- package/dist/dot-bar-C2PcL7wc.cjs +1 -0
- package/dist/dot-bar-vHWpqnhw.js +9 -0
- package/dist/dot-circle-DQqpkRr_.js +9 -0
- package/dist/dot-circle-EInrpGOw.cjs +1 -0
- package/dist/dot-do6V9GYP.cjs +1 -0
- package/dist/dot-line-BEFriL91.cjs +1 -0
- package/dist/dot-line-CorWP6p2.js +9 -0
- package/dist/dot-pulse-BGidqqxA.cjs +1 -0
- package/dist/dot-pulse-OtjDlpwG.js +9 -0
- package/dist/double-bounce-CWAE4F5S.js +9 -0
- package/dist/double-bounce-DOehLE4X.cjs +1 -0
- package/dist/download-DiDwbZL3.cjs +1 -0
- package/dist/drop-BkBi0TEt.cjs +1 -0
- package/dist/drop-CTSvqyOb.js +9 -0
- package/dist/drop-DU-RgWR1.js +16 -0
- package/dist/drop-_Iz47Fmh.cjs +7 -0
- package/dist/{dropdown-CzGAVWYC.js → dropdown-DQy4YvVn.js} +22 -21
- package/dist/dropdown.js +1 -1
- package/dist/ebnfDiagram-CCIWWBDH-B5ZJxr_W.cjs +1 -0
- package/dist/{ebnfDiagram-CCIWWBDH-Gnr20Oc1.js → ebnfDiagram-CCIWWBDH-B6Gh-zq6.js} +4 -4
- package/dist/{erDiagram-Q63AITRT-D0Hh9b-W.js → erDiagram-Q63AITRT-B1iQoGRH.js} +13 -13
- package/dist/eventmodeling-45OFAUF4-_fgxNekW.cjs +1 -0
- package/dist/eye-BoGpexya.cjs +4 -0
- package/dist/eye-close-DdWDFgn0.cjs +4 -0
- package/dist/eye-close-pVr4NTjX.js +13 -0
- package/dist/eye-j7jzy-2Y.js +13 -0
- package/dist/factory-Bbul5tOL.js +653 -0
- package/dist/flowDiagram-23GEKE2U-BxyRR3qT.js +19 -0
- package/dist/{form-B8afuJlF.js → form-DwjKUNz4.js} +9 -9
- package/dist/form.js +1 -1
- package/dist/fullscreen-0HIdaZda.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-B40Eabk0.js → ganttDiagram-NO4QXBWP-BE1v5yrp.js} +6 -6
- package/dist/gitGraph-TEB2WS4Q-BlIs9PSc.cjs +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-BUJNSssA.js → gitGraphDiagram-IHSO6WYX-BVRc2mkM.js} +3 -3
- package/dist/{gitGraphDiagram-IHSO6WYX-DW06165m.cjs → gitGraphDiagram-IHSO6WYX-DODKoP1i.cjs} +1 -1
- package/dist/github-BjP57_Xw.js +11 -0
- package/dist/github-_spzUZUJ.cjs +2 -0
- package/dist/{glass-BniIptBE.js → glass-DKQAEAmc.js} +6 -6
- package/dist/glass.js +1 -1
- package/dist/globe-0D8896Sf.js +15 -0
- package/dist/globe-DOwlStJB.cjs +6 -0
- package/dist/home-C2_ARWjR.cjs +1 -0
- package/dist/home-COHVdQmi.js +10 -0
- package/dist/i18n-B3HBw6rL.js +1 -0
- package/dist/i18n-Cf5TtRb4-BeflTU82.js +175 -0
- package/dist/i18n.js +3 -2
- package/dist/icon-DSIyi1nQ.js +318 -0
- package/dist/icon.js +1 -1
- package/dist/icons.js +91 -3
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +235 -2
- package/dist/iife/content.iife.js +1 -1
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/glass.iife.js +1 -1
- package/dist/iife/icon.iife.js +238 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +238 -1
- package/dist/iife/link.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +332 -260
- package/dist/iife/mermaid.iife.js +489 -252
- package/dist/iife/message.iife.js +238 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +243 -10
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +235 -2
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/iife/theme-switch.iife.js +1 -1
- package/dist/{image-CqoQfJoV.js → image-Bn0VuwO0.js} +8 -8
- package/dist/image.js +1 -1
- package/dist/index.cjs +26 -263
- package/dist/index.d.ts +9 -0
- package/dist/index.iife.js +617 -781
- package/dist/index.js +88 -87
- package/dist/info-DKCQHKI2-Chhdpnw0.cjs +1 -0
- package/dist/info-circle-Ciy6yKz-.js +14 -0
- package/dist/info-circle-fill-ChhhmoCU.cjs +1 -0
- package/dist/info-circle-fill-D5WjbRhd.js +10 -0
- package/dist/info-circle-xp0NNK4i.cjs +5 -0
- package/dist/infoDiagram-FWYZ7A6U-D_0rNuCQ.cjs +2 -0
- package/dist/{infoDiagram-FWYZ7A6U-Dc0m9qAx.js → infoDiagram-FWYZ7A6U-Z_GyAL7u.js} +3 -3
- package/dist/input-2Zz1gLzy.js +195 -0
- package/dist/input.js +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-DuFtHOmf.js → ishikawaDiagram-FXEZZL3T-l087wv0C.js} +4 -4
- package/dist/issue-DF89eLmN.js +11 -0
- package/dist/issue-jx2d2kOG.cjs +2 -0
- package/dist/{journeyDiagram-5HDEW3XC-Bshelnhq.js → journeyDiagram-5HDEW3XC-DmNilMKR.js} +4 -4
- package/dist/{kanban-definition-HUTT4EX6-Dogv2paU.js → kanban-definition-HUTT4EX6-CmUdDowM.js} +9 -9
- package/dist/latinmodernmath-BNPh95x3.cjs +1 -0
- package/dist/latinmodernmath-BnpcbCAh.js +4 -0
- package/dist/line-BFm46PmI.cjs +1 -0
- package/dist/{line-BIPmUVxO.js → line-CteEpfCu.js} +1 -1
- package/dist/line-Dt7YMxyn.js +9 -0
- package/dist/line-scale-BNCCcLKl.js +9 -0
- package/dist/line-scale-Mzdq1fTx.cjs +1 -0
- package/dist/{linear-B2AM4ZBe.js → linear-C8AjwHWi.js} +1 -1
- package/dist/{link-BCrmHvXP.js → link-DcRMinJ9.js} +9 -9
- package/dist/link.js +1 -1
- package/dist/loading-BXZBOAbH.js +116 -0
- package/dist/loading-_bxcEaz0.js +10 -0
- package/dist/loading-fDM8Celd.cjs +1 -0
- package/dist/loading-scene-DTIgBHY7.cjs +53 -0
- package/dist/loading-scene-nEgp25AV.js +62 -0
- package/dist/loading.js +1 -1
- package/dist/lock-DSKjvWfl.cjs +4 -0
- package/dist/lock-Dw1hWtdP.js +13 -0
- package/dist/math-C6oaCrk-.js +223 -0
- package/dist/math.js +1 -1
- package/dist/menu-DQpdpBLB.js +11 -0
- package/dist/menu-DdHtbEk4.cjs +2 -0
- package/dist/{mermaid-C1oQyPE3.js → mermaid-Cmxzclzv.js} +11 -11
- package/dist/mermaid-parser.core-BgDzuhyE.cjs +3 -0
- package/dist/{mermaid.core-B2d5lQW2.js → mermaid.core-do05yX9X.js} +49 -49
- package/dist/{mermaid.core-a1hgpWfs.cjs → mermaid.core-r_D7CSaj.cjs} +2 -2
- package/dist/mermaid.js +1 -1
- package/dist/message-BFv9-X-4.js +10 -0
- package/dist/message-DHzOpb1d.cjs +1 -0
- package/dist/{message-CNdmbeLf.js → message-E92Vu7SO.js} +24 -21
- package/dist/message.js +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-f7s5ZePP.js → mindmap-definition-LN4V7U3C-Mj5HCDww.js} +12 -12
- package/dist/modal-BQUM-5G3.cjs +2 -0
- package/dist/{modal-gRagDkTb.js → modal-TayIRDMV.js} +12 -12
- package/dist/modal.js +1 -1
- package/dist/more-l0-w-c99.js +11 -0
- package/dist/more-tqkE9a7G.cjs +2 -0
- package/dist/packet-7NZHBO7P-BIgRfmDy.cjs +1 -0
- package/dist/pacman-DqDqKzL4.js +9 -0
- package/dist/pacman-hB0Vx_ut.cjs +1 -0
- package/dist/pegDiagram-2B236MQR-CTcfU4SV.cjs +1 -0
- package/dist/{pegDiagram-2B236MQR-B-Xeh55J.js → pegDiagram-2B236MQR-Crdw8nmA.js} +4 -4
- package/dist/pie-RZYD4A2V-BJEu4CoQ.cjs +1 -0
- package/dist/{pieDiagram-ENE6RG2P-CVSE95zc.js → pieDiagram-ENE6RG2P-9GNsaY-6.js} +6 -6
- package/dist/{pieDiagram-ENE6RG2P-BkSiP4iu.cjs → pieDiagram-ENE6RG2P-D1QD_sOE.cjs} +2 -2
- package/dist/{player-BkkmkqR4.js → player-BZVIOmdS.js} +112 -113
- package/dist/player.js +1 -1
- package/dist/plugins/load-svg.d.ts +16 -3
- package/dist/plus-C91b38f6.js +11 -0
- package/dist/plus-DjDn222b.cjs +2 -0
- package/dist/{popover-BZKSLe3D.js → popover-Bimxdeql.js} +17 -15
- package/dist/popover.js +1 -1
- package/dist/power-off-CM1fKRrr.js +10 -0
- package/dist/power-off-C_Akq2D-.cjs +1 -0
- package/dist/preview-ByPt3tw_.cjs +1 -0
- package/dist/preview-CAEhg4Xl.js +10 -0
- package/dist/{progress-vk40tuhm.js → progress-CNUdc_VD.js} +13 -12
- package/dist/progress.js +1 -1
- package/dist/pulse-CPV8p0Lr.cjs +1 -0
- package/dist/pulse-IOuRzRUm.js +9 -0
- package/dist/{quadrantDiagram-ABIIQ3AL-TJ8FmqES.js → quadrantDiagram-ABIIQ3AL-rDltxRrQ.js} +3 -3
- package/dist/{radar-Bg0cexzU.js → radar-Dse0Dgma.js} +12 -10
- package/dist/radar-I7S5WNFK-DYV5_m9_.cjs +1 -0
- package/dist/radar.js +1 -1
- package/dist/railroad-3IZDKUUU-6oFUgWYG.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-DY3xJn9p.cjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-DljDdad3.cjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-DNRdpVaC.cjs +1 -0
- package/dist/{railroadDiagram-RFXS5EU6-0lS5wYI7.js → railroadDiagram-RFXS5EU6-B6b0YncQ.js} +4 -4
- package/dist/railroadDiagram-RFXS5EU6-DCqD-VXV.cjs +1 -0
- package/dist/refresh-CjGodz5_.cjs +1 -0
- package/dist/{requirementDiagram-TGXJPOKE-viCQLyJd.js → requirementDiagram-TGXJPOKE-BVEkrDX1.js} +12 -12
- package/dist/rolldown-runtime-DkpYurw3.js +25 -0
- package/dist/rotate-O1KJozW0.cjs +1 -0
- package/dist/rotate-uZhtaw8R.js +9 -0
- package/dist/{route-CGwS0cd_.js → route-Dh5S2dSW.js} +10 -11
- package/dist/route.js +1 -1
- package/dist/{router-BK6DEkcN.js → router-DUxBSvIi.js} +11 -11
- package/dist/router.js +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-CV6_AuMF.js → sankeyDiagram-HTMAVEWB-C_G-oWGd.js} +2 -2
- package/dist/scale-out-CEERARri.cjs +1 -0
- package/dist/scale-out-mSsKNtie.js +9 -0
- package/dist/{scratch-ClF1awGi.js → scratch-4TCqNbat.js} +8 -8
- package/dist/scratch.js +1 -1
- package/dist/search-Bci4TKOK.js +11 -0
- package/dist/search-DewMt8lt.cjs +2 -0
- package/dist/{section-BL0V7Kjf.js → section-CMN7tQ-S.js} +10 -10
- package/dist/section.js +1 -1
- package/dist/{select-DRKYa3W2.js → select-D48kcwEy.js} +53 -47
- package/dist/select.js +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-B9WNesh2.js → sequenceDiagram-DBY2YBRQ-B8lP53eo.js} +5 -5
- package/dist/setting-BlJhorAQ.cjs +1 -0
- package/dist/setting-RhW6oH2c.js +10 -0
- package/dist/{skeleton-D7JIbROq.js → skeleton-DbgMcQQ0.js} +9 -9
- package/dist/skeleton.js +1 -1
- package/dist/solar-CdvkRr5X.cjs +1 -0
- package/dist/solar-Ck7RIK09.js +9 -0
- package/dist/sort-CZTjWeHC.cjs +7 -0
- package/dist/sort-tAqAKb3x.js +16 -0
- package/dist/sprite-DHG11_c7.cjs +138 -0
- package/dist/sprite-ICuni2rO.js +147 -0
- package/dist/square-exSvykCu.cjs +1 -0
- package/dist/square-xGODzCyr.js +9 -0
- package/dist/{src-DtRLxcYO.js → src-CM-0IT-N.js} +1 -1
- package/dist/ssg.js +1 -1
- package/dist/{ssr-DSGwPtEd.js → ssr-BzHZ2bCe.js} +5 -5
- package/dist/ssr-stream.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/{stateDiagram-2N3HPSRC-DxH4BMSh.js → stateDiagram-2N3HPSRC-DzG4g-Br.js} +15 -15
- package/dist/stateDiagram-v2-6OUMAXLB-tbh4Ib6Z.js +30 -0
- package/dist/stretch-Bv60MZD_.js +9 -0
- package/dist/stretch-CTFwefaK.cjs +1 -0
- package/dist/{swimlanes-5IMT3BWC-DcADNGpg.js → swimlanes-5IMT3BWC-CQpI-vXu.js} +10 -10
- package/dist/swimlanesDiagram-G3AALYLV-C_mEClzT.js +31 -0
- package/dist/{tab-DFVtDJb2.js → tab-ADuziXeq.js} +12 -12
- package/dist/tab.js +1 -1
- package/dist/{tabpane-C3qZGN-D.js → tabpane-Bisq-qpc.js} +11 -11
- package/dist/tabpane.js +1 -1
- package/dist/team-DshvOQrF.cjs +1 -0
- package/dist/team-oJOYGlHy.js +10 -0
- package/dist/temml-DKTWcsY9.js +9934 -0
- package/dist/temml-qMLYhcAb.cjs +96 -0
- package/dist/test/e2e/helpers.d.ts +32 -0
- package/dist/test/unit/select-ssr-upgrade.test.d.ts +1 -0
- package/dist/text-BniFEEB5.cjs +1 -0
- package/dist/text-CX8UkbzB.js +17 -0
- package/dist/theme-DL6q_FZu.js +52 -0
- package/dist/{theme-switch-BXNH5uPD.js → theme-switch-GbuiPclm.js} +16 -17
- package/dist/theme-switch.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timeline-definition-FHXFAJF6-C80VjPLh.js → timeline-definition-FHXFAJF6-JZu2t9NH.js} +5 -5
- package/dist/treeView-QDETBFTQ-JVYSN7d-.cjs +1 -0
- package/dist/treemap-6X3UGDF4-ChqvozdN.cjs +1 -0
- package/dist/triple-bounce-BwxTDpKz.js +9 -0
- package/dist/triple-bounce-BzAtF-TA.cjs +1 -0
- package/dist/typings.d.ts +9 -0
- package/dist/unlock-B6Kz8QUC.cjs +4 -0
- package/dist/unlock-DMG2IKZP.js +13 -0
- package/dist/user-BvjpVTOP.js +10 -0
- package/dist/user-CNTRFuXZ.cjs +1 -0
- package/dist/utils/builder/escape.d.ts +6 -1
- package/dist/utils/dom.d.ts +2 -15
- package/dist/utils/i18n/index.d.ts +2 -69
- package/dist/utils/i18n.js +5 -87
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/style.d.ts +7 -5
- package/dist/utils-X5_TIQTQ.js +48 -0
- package/dist/utils-xccQZnoa.js +650 -0
- package/dist/{vennDiagram-L72KCM5P-BYHB7OW8.js → vennDiagram-L72KCM5P-DM6fQj7p.js} +4 -4
- package/dist/wardley-OPB4EBWU-BI6su3co.cjs +1 -0
- package/dist/{wardleyDiagram-EHGQE667--ubmCaWM.js → wardleyDiagram-EHGQE667-CzH0l2vj.js} +4 -4
- package/dist/{wardleyDiagram-EHGQE667-K6ckkRZS.cjs → wardleyDiagram-EHGQE667-ZMxVQw17.cjs} +2 -2
- package/dist/warning-circle-2Ni7fSPp.js +10 -0
- package/dist/warning-circle-CxDUN_Pg.cjs +1 -0
- package/dist/warning-circle-fill-CNmn_n74.js +10 -0
- package/dist/warning-circle-fill-CRKQ8eDt.cjs +1 -0
- package/dist/without-content-BCQsfG1Q.cjs +1 -0
- package/dist/without-content-C7ATBu1N.js +10 -0
- package/dist/{xychartDiagram-FW5EYKEG-DLqWcTPt.js → xychartDiagram-FW5EYKEG-GL1uK3EN.js} +8 -8
- package/dist/zoom-in-BLTVwnRI.cjs +1 -0
- package/dist/zoom-out-BIXvVAC9.cjs +1 -0
- package/docs/COMPONENTS.md +5 -5
- package/package.json +119 -35
- package/typings.d.ts +9 -0
- package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +0 -1
- package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +0 -1
- package/dist/builtin-1lUEp_ro.js +0 -416
- package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +0 -30
- package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +0 -30
- package/dist/colorpicker-CKA4xN-g.js +0 -314
- package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +0 -1
- package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +0 -1
- package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +0 -1
- package/dist/factory-ZNhcQ4tf.js +0 -482
- package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +0 -19
- package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +0 -1
- package/dist/icon-GZrfSeon.js +0 -256
- package/dist/info-DKCQHKI2-DNOtUIin.cjs +0 -1
- package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +0 -2
- package/dist/input-ZY2Wumze.js +0 -195
- package/dist/katex-es-BTpuCxxV.cjs +0 -261
- package/dist/katex-es-CKRwcaiU.js +0 -23682
- package/dist/loading-M6gWxLbm.js +0 -206
- package/dist/math-8E-45Y8e.js +0 -52
- package/dist/mermaid-parser.core-DYumW1vq.cjs +0 -6
- package/dist/mocks-CMGoftIc.js +0 -179
- package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +0 -1
- package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +0 -1
- package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +0 -1
- package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +0 -1
- package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +0 -1
- package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +0 -1
- package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +0 -1
- package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +0 -1
- package/dist/rolldown-runtime-9ZSF5uba.js +0 -16
- package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +0 -30
- package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +0 -31
- package/dist/test/unit/colorpicker.color.utils.test.d.ts +0 -1
- package/dist/test/unit/utils.math.test.d.ts +0 -1
- package/dist/test/unit/utils.tween.test.d.ts +0 -1
- package/dist/theme-kOWZbKCq.js +0 -70
- package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +0 -1
- package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +0 -1
- package/dist/utils/color.d.ts +0 -52
- package/dist/utils/image.d.ts +0 -39
- package/dist/utils/math.d.ts +0 -26
- package/dist/utils/tween.d.ts +0 -21
- package/dist/utils-D1iZnChu.js +0 -614
- package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +0 -1
- package/dist/warning-circle-fill-Cz0qu7AH.js +0 -23
package/dist/{architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs → architectureDiagram-ZJ3FMSHR-WH22GUwo.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const he=require("./rolldown-runtime-CAnuVJ4g.cjs"),ze=require("./mermaid-parser.core-DYumW1vq.cjs"),lt=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),de=require("./src-C9EhKhbk.cjs"),Wt=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),xe=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),$e=require("./chunk-VAUOI2AC-DfQf5L2_.cjs"),Be=require("./chunk-JWPE2WC7-D8EnWK1B.cjs"),ae=require("./chunk-HOUHSVGY-BGB3dOvI.cjs"),ye=require("./chunk-Q4XR5HBZ-aBnPq509.cjs"),Ie=require("./cytoscape.esm-pygMw4dR.cjs");var Ce=he.__commonJSMin(((L,F)=>{(function(U,N){typeof L=="object"&&typeof F=="object"?F.exports=N():typeof define=="function"&&define.amd?define([],N):typeof L=="object"?L.layoutBase=N():U.layoutBase=N()})(L,function(){return(function(w){var U={};function N(v){if(U[v])return U[v].exports;var s=U[v]={i:v,l:!1,exports:{}};return w[v].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return N.m=w,N.c=U,N.i=function(v){return v},N.d=function(v,s,n){N.o(v,s)||Object.defineProperty(v,s,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var s=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(s,"a",s),s},N.o=function(v,s){return Object.prototype.hasOwnProperty.call(v,s)},N.p="",N(N.s=28)})([(function(w,U,N){"use strict";function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,w.exports=v}),(function(w,U,N){"use strict";var v=N(2),s=N(8),n=N(9);function t(h,e,d){v.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=h,this.target=e}t.prototype=Object.create(v.prototype);for(var a in v)t[a]=v[a];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.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"},t.prototype.getOtherEndInGraph=function(h,e){for(var d=this.getOtherEnd(h),r=e.getGraphManager().getRoot();;){if(d.getOwner()==e)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},t.prototype.updateLength=function(){var h=new Array(4);this.isOverlapingSourceAndTarget=s.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=t}),(function(w,U,N){"use strict";function v(s){this.vGraphObject=s}w.exports=v}),(function(w,U,N){"use strict";var v=N(2),s=N(10),n=N(13),t=N(0),a=N(16),h=N(5);function e(r,i,f,l){f==null&&l==null&&(l=i),v.call(this,l),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=r,f!=null&&i!=null?this.rect=new n(i.x,i.y,f.width,f.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var d in v)e[d]=v[d];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(r){this.rect.width=r},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(r){this.rect.height=r},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(r,i){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(r,i){this.rect.x=r-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(r,i){this.rect.x=r,this.rect.y=i},e.prototype.moveBy=function(r,i){this.rect.x+=r,this.rect.y+=i},e.prototype.getEdgeListToNode=function(r){var i=[],f=this;return f.edges.forEach(function(l){if(l.target==r){if(l.source!=f)throw"Incorrect edge source!";i.push(l)}}),i},e.prototype.getEdgesBetween=function(r){var i=[],f=this;return f.edges.forEach(function(l){if(!(l.source==f||l.target==f))throw"Incorrect edge source and/or target";(l.target==r||l.source==r)&&i.push(l)}),i},e.prototype.getNeighborsList=function(){var r=new Set,i=this;return i.edges.forEach(function(f){if(f.source==i)r.add(f.target);else{if(f.target!=i)throw"Incorrect incidency!";r.add(f.source)}}),r},e.prototype.withChildren=function(){var r=new Set,i,f;if(r.add(this),this.child!=null)for(var l=this.child.getNodes(),p=0;p<l.length;p++)i=l[p],f=i.withChildren(),f.forEach(function(g){r.add(g)});return r},e.prototype.getNoOfChildren=function(){var r=0,i;if(this.child==null)r=1;else for(var f=this.child.getNodes(),l=0;l<f.length;l++)i=f[l],r+=i.getNoOfChildren();return r==0&&(r=1),r},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var r,i,f=-t.INITIAL_WORLD_BOUNDARY,l=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_X+a.nextDouble()*(l-f)+f;var p=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;i=t.WORLD_CENTER_Y+a.nextDouble()*(g-p)+p,this.rect.x=r,this.rect.y=i},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var i=r.getRight()-r.getLeft(),f=r.getBottom()-r.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(i+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>i?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(f+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>f?(this.rect.y-=(this.labelHeight-f)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(f+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(r){var i=this.rect.x;i>t.WORLD_BOUNDARY?i=t.WORLD_BOUNDARY:i<-t.WORLD_BOUNDARY&&(i=-t.WORLD_BOUNDARY);var f=this.rect.y;f>t.WORLD_BOUNDARY?f=t.WORLD_BOUNDARY:f<-t.WORLD_BOUNDARY&&(f=-t.WORLD_BOUNDARY);var l=new h(i,f),p=r.inverseTransformPoint(l);this.setLocation(p.x,p.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=e}),(function(w,U,N){"use strict";var v=N(0);function s(){}for(var n in v)s[n]=v[n];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=s}),(function(w,U,N){"use strict";function v(s,n){s==null&&n==null?(this.x=0,this.y=0):(this.x=s,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(s){this.x=s},v.prototype.setY=function(s){this.y=s},v.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},w.exports=v}),(function(w,U,N){"use strict";var v=N(2),s=N(10),n=N(0),t=N(7),a=N(3),h=N(1),e=N(13),d=N(12),r=N(11);function i(l,p,g){v.call(this,g),this.estimatedSize=s.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=l,p!=null&&p instanceof t?this.graphManager=p:p!=null&&p instanceof Layout&&(this.graphManager=p.graphManager)}i.prototype=Object.create(v.prototype);for(var f in v)i[f]=v[f];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(l,p,g){if(p==null&&g==null){var c=l;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var T=l;if(!(this.getNodes().indexOf(p)>-1&&this.getNodes().indexOf(g)>-1))throw"Source or target not in graph!";if(!(p.owner==g.owner&&p.owner==this))throw"Both owners must be this graph!";return p.owner!=g.owner?null:(T.source=p,T.target=g,T.isInterGraph=!1,this.getEdges().push(T),p.edges.push(T),g!=p&&g.edges.push(T),T)}},i.prototype.remove=function(l){var p=l;if(l instanceof a){if(p==null)throw"Node is null!";if(!(p.owner!=null&&p.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var g=p.edges.slice(),c,T=g.length,A=0;A<T;A++)c=g[A],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var I=this.nodes.indexOf(p);if(I==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(l instanceof h){var c=l;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var S=c.source.edges.indexOf(c),Y=c.target.edges.indexOf(c);if(!(S>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(S,1),c.target!=c.source&&c.target.edges.splice(Y,1);var I=c.source.owner.getEdges().indexOf(c);if(I==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(I,1)}},i.prototype.updateLeftTop=function(){for(var l=s.MAX_VALUE,p=s.MAX_VALUE,g,c,T,A=this.getNodes(),I=A.length,S=0;S<I;S++){var Y=A[S];g=Y.getTop(),c=Y.getLeft(),l>g&&(l=g),p>c&&(p=c)}return l==s.MAX_VALUE?null:(A[0].getParent().paddingLeft!=null?T=A[0].getParent().paddingLeft:T=this.margin,this.left=p-T,this.top=l-T,new d(this.left,this.top))},i.prototype.updateBounds=function(l){for(var p=s.MAX_VALUE,g=-s.MAX_VALUE,c=s.MAX_VALUE,T=-s.MAX_VALUE,A,I,S,Y,W,z=this.nodes,x=z.length,tt=0;tt<x;tt++){var o=z[tt];l&&o.child!=null&&o.updateBounds(),A=o.getLeft(),I=o.getRight(),S=o.getTop(),Y=o.getBottom(),p>A&&(p=A),g<I&&(g=I),c>S&&(c=S),T<Y&&(T=Y)}var m=new e(p,c,g-p,T-c);p==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),z[0].getParent().paddingLeft!=null?W=z[0].getParent().paddingLeft:W=this.margin,this.left=m.x-W,this.right=m.x+m.width+W,this.top=m.y-W,this.bottom=m.y+m.height+W},i.calculateBounds=function(l){for(var p=s.MAX_VALUE,g=-s.MAX_VALUE,c=s.MAX_VALUE,T=-s.MAX_VALUE,A,I,S,Y,W=l.length,z=0;z<W;z++){var x=l[z];A=x.getLeft(),I=x.getRight(),S=x.getTop(),Y=x.getBottom(),p>A&&(p=A),g<I&&(g=I),c>S&&(c=S),T<Y&&(T=Y)}return new e(p,c,g-p,T-c)},i.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){for(var l=0,p=this.nodes,g=p.length,c=0;c<g;c++){var T=p[c];l+=T.calcEstimatedSize()}return l==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=l/Math.sqrt(this.nodes.length),this.estimatedSize},i.prototype.updateConnected=function(){var l=this;if(this.nodes.length==0){this.isConnected=!0;return}var p=new r,g=new Set,c=this.nodes[0],T,A;for(c.withChildren().forEach(function(W){p.push(W),g.add(W)});p.length!==0;){c=p.shift(),T=c.getEdges();for(var I=T.length,S=0;S<I;S++)A=T[S].getOtherEndInGraph(c,this),A!=null&&!g.has(A)&&A.withChildren().forEach(function(W){p.push(W),g.add(W)})}if(this.isConnected=!1,g.size>=this.nodes.length){var Y=0;g.forEach(function(W){W.owner==l&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}},w.exports=i}),(function(w,U,N){"use strict";var v,s=N(1);function n(t){v=N(6),this.layout=t,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var t=this.layout.newGraph(),a=this.layout.newNode(null),h=this.add(t,a);return this.setRootGraph(h),this.rootGraph},n.prototype.add=function(t,a,h,e,d){if(h==null&&e==null&&d==null){if(t==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),t.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return t.parent=a,a.child=t,t}else{d=h,e=a,h=t;var r=e.getOwner(),i=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==i)return h.isInterGraph=!1,r.add(h,e,d);if(h.isInterGraph=!0,h.source=e,h.target=d,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}},n.prototype.remove=function(t){if(t instanceof v){var a=t;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(a.getEdges());for(var e,d=h.length,r=0;r<d;r++)e=h[r],a.remove(e);var i=[];i=i.concat(a.getNodes());var f;d=i.length;for(var r=0;r<d;r++)f=i[r],a.remove(f);a==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(a);this.graphs.splice(l,1),a.parent=null}else if(t instanceof s){if(e=t,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var l=e.source.edges.indexOf(e);if(e.source.edges.splice(l,1),l=e.target.edges.indexOf(e),e.target.edges.splice(l,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var l=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(l,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],a=this.getGraphs(),h=a.length,e=0;e<h;e++)t=t.concat(a[e].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],a=this.getGraphs();a.length;for(var h=0;h<a.length;h++)t=t.concat(a[h].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,t.parent==null&&(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,a){if(!(t!=null&&a!=null))throw"assert failed";if(t==a)return!0;var h=t.getOwner(),e;do{if(e=h.getParent(),e==null)break;if(e==a)return!0;if(h=e.getOwner(),h==null)break}while(!0);h=a.getOwner();do{if(e=h.getParent(),e==null)break;if(e==t)return!0;if(h=e.getOwner(),h==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,a,h,e,d,r=this.getAllEdges(),i=r.length,f=0;f<i;f++){if(t=r[f],a=t.source,h=t.target,t.lca=null,t.sourceInLca=a,t.targetInLca=h,a==h){t.lca=a.getOwner();continue}for(e=a.getOwner();t.lca==null;){for(t.targetInLca=h,d=h.getOwner();t.lca==null;){if(d==e){t.lca=d;break}if(d==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=d.getParent(),d=t.targetInLca.getOwner()}if(e==this.rootGraph)break;t.lca==null&&(t.sourceInLca=e.getParent(),e=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,a){if(t==a)return t.getOwner();var h=t.getOwner();do{if(h==null)break;var e=a.getOwner();do{if(e==null)break;if(e==h)return e;e=e.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},n.prototype.calcInclusionTreeDepths=function(t,a){t==null&&a==null&&(t=this.rootGraph,a=1);for(var h,e=t.getNodes(),d=e.length,r=0;r<d;r++)h=e[r],h.inclusionTreeDepth=a,h.child!=null&&this.calcInclusionTreeDepths(h.child,a+1)},n.prototype.includesInvalidEdge=function(){for(var t,a=[],h=this.edges.length,e=0;e<h;e++)t=this.edges[e],this.isOneAncestorOfOther(t.source,t.target)&&a.push(t);for(var e=0;e<a.length;e++)this.remove(a[e]);return!1},w.exports=n}),(function(w,U,N){"use strict";var v=N(12);function s(){}s.calcSeparationAmount=function(n,t,a,h){if(!n.intersects(t))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(n,t,e),a[0]=Math.min(n.getRight(),t.getRight())-Math.max(n.x,t.x),a[1]=Math.min(n.getBottom(),t.getBottom())-Math.max(n.y,t.y),n.getX()<=t.getX()&&n.getRight()>=t.getRight()?a[0]+=Math.min(t.getX()-n.getX(),n.getRight()-t.getRight()):t.getX()<=n.getX()&&t.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-t.getX(),t.getRight()-n.getRight())),n.getY()<=t.getY()&&n.getBottom()>=t.getBottom()?a[1]+=Math.min(t.getY()-n.getY(),n.getBottom()-t.getBottom()):t.getY()<=n.getY()&&t.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-t.getY(),t.getBottom()-n.getBottom()));var d=Math.abs((t.getCenterY()-n.getCenterY())/(t.getCenterX()-n.getCenterX()));t.getCenterY()===n.getCenterY()&&t.getCenterX()===n.getCenterX()&&(d=1);var r=d*a[0],i=a[1]/d;a[0]<i?i=a[0]:r=a[1],a[0]=-1*e[0]*(i/2+h),a[1]=-1*e[1]*(r/2+h)},s.decideDirectionsForOverlappingNodes=function(n,t,a){n.getCenterX()<t.getCenterX()?a[0]=-1:a[0]=1,n.getCenterY()<t.getCenterY()?a[1]=-1:a[1]=1},s.getIntersection2=function(n,t,a){var h=n.getCenterX(),e=n.getCenterY(),d=t.getCenterX(),r=t.getCenterY();if(n.intersects(t))return a[0]=h,a[1]=e,a[2]=d,a[3]=r,!0;var i=n.getX(),f=n.getY(),l=n.getRight(),p=n.getX(),g=n.getBottom(),c=n.getRight(),T=n.getWidthHalf(),A=n.getHeightHalf(),I=t.getX(),S=t.getY(),Y=t.getRight(),W=t.getX(),z=t.getBottom(),x=t.getRight(),tt=t.getWidthHalf(),o=t.getHeightHalf(),m=!1,u=!1;if(h===d){if(e>r)return a[0]=h,a[1]=f,a[2]=d,a[3]=z,!1;if(e<r)return a[0]=h,a[1]=g,a[2]=d,a[3]=S,!1}else if(e===r){if(h>d)return a[0]=i,a[1]=e,a[2]=Y,a[3]=r,!1;if(h<d)return a[0]=l,a[1]=e,a[2]=I,a[3]=r,!1}else{var E=n.height/n.width,y=t.height/t.width,C=(r-e)/(d-h),M=void 0,G=void 0,O=void 0,R=void 0,V=void 0,B=void 0;if(-E===C?h>d?(a[0]=p,a[1]=g,m=!0):(a[0]=l,a[1]=f,m=!0):E===C&&(h>d?(a[0]=i,a[1]=f,m=!0):(a[0]=c,a[1]=g,m=!0)),-y===C?d>h?(a[2]=W,a[3]=z,u=!0):(a[2]=Y,a[3]=S,u=!0):y===C&&(d>h?(a[2]=I,a[3]=S,u=!0):(a[2]=x,a[3]=z,u=!0)),m&&u)return!1;if(h>d?e>r?(M=this.getCardinalDirection(E,C,4),G=this.getCardinalDirection(y,C,2)):(M=this.getCardinalDirection(-E,C,3),G=this.getCardinalDirection(-y,C,1)):e>r?(M=this.getCardinalDirection(-E,C,1),G=this.getCardinalDirection(-y,C,3)):(M=this.getCardinalDirection(E,C,2),G=this.getCardinalDirection(y,C,4)),!m)switch(M){case 1:R=f,O=h+-A/C,a[0]=O,a[1]=R;break;case 2:O=c,R=e+T*C,a[0]=O,a[1]=R;break;case 3:R=g,O=h+A/C,a[0]=O,a[1]=R;break;case 4:O=p,R=e+-T*C,a[0]=O,a[1]=R;break}if(!u)switch(G){case 1:B=S,V=d+-o/C,a[2]=V,a[3]=B;break;case 2:V=x,B=r+tt*C,a[2]=V,a[3]=B;break;case 3:B=z,V=d+o/C,a[2]=V,a[3]=B;break;case 4:V=W,B=r+-tt*C,a[2]=V,a[3]=B;break}}return!1},s.getCardinalDirection=function(n,t,a){return n>t?a:1+a%4},s.getIntersection=function(n,t,a,h){if(h==null)return this.getIntersection2(n,t,a);var e=n.x,d=n.y,r=t.x,i=t.y,f=a.x,l=a.y,p=h.x,g=h.y,c=void 0,T=void 0,A=void 0,I=void 0,S=void 0,Y=void 0,W=void 0,z=void 0,x=void 0;return A=i-d,S=e-r,W=r*d-e*i,I=g-l,Y=f-p,z=p*l-f*g,x=A*Y-I*S,x===0?null:(c=(S*z-Y*W)/x,T=(I*W-A*z)/x,new v(c,T))},s.angleOfVector=function(n,t,a,h){var e=void 0;return n!==a?(e=Math.atan((h-t)/(a-n)),a<n?e+=Math.PI:h<t&&(e+=this.TWO_PI)):h<t?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},s.doIntersect=function(n,t,a,h){var e=n.x,d=n.y,r=t.x,i=t.y,f=a.x,l=a.y,p=h.x,g=h.y,c=(r-e)*(g-l)-(p-f)*(i-d);if(c===0)return!1;var T=((g-l)*(p-e)+(f-p)*(g-d))/c,A=((d-i)*(p-e)+(r-e)*(g-d))/c;return 0<T&&T<1&&0<A&&A<1},s.findCircleLineIntersections=function(n,t,a,h,e,d,r){var i=(a-n)*(a-n)+(h-t)*(h-t),f=2*((n-e)*(a-n)+(t-d)*(h-t)),l=(n-e)*(n-e)+(t-d)*(t-d)-r*r;if(f*f-4*i*l>=0){var p=(-f+Math.sqrt(f*f-4*i*l))/(2*i),g=(-f-Math.sqrt(f*f-4*i*l))/(2*i),c=null;return p>=0&&p<=1?[p]:g>=0&&g<=1?[g]:c}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,w.exports=s}),(function(w,U,N){"use strict";function v(){}v.sign=function(s){return s>0?1:s<0?-1:0},v.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},v.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},w.exports=v}),(function(w,U,N){"use strict";function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,w.exports=v}),(function(w,U,N){"use strict";var v=(function(){function h(e,d){for(var r=0;r<d.length;r++){var i=d[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,d,r){return d&&h(e.prototype,d),r&&h(e,r),e}})();function s(h,e){if(!(h instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(e){return{value:e,next:null,prev:null}},t=function(e,d,r,i){return e!==null?e.next=d:i.head=d,r!==null?r.prev=d:i.tail=d,d.prev=e,d.next=r,i.length++,d},a=function(e,d){var r=e.prev,i=e.next;return r!==null?r.next=i:d.head=i,i!==null?i.prev=r:d.tail=r,e.prev=e.next=null,d.length--,e};w.exports=(function(){function h(e){var d=this;s(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(r){return d.push(r)})}return v(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(d,r){return t(r.prev,n(d),r,this)}},{key:"insertAfter",value:function(d,r){return t(r,n(d),r.next,this)}},{key:"insertNodeBefore",value:function(d,r){return t(r.prev,d,r,this)}},{key:"insertNodeAfter",value:function(d,r){return t(r,d,r.next,this)}},{key:"push",value:function(d){return t(this.tail,n(d),null,this)}},{key:"unshift",value:function(d){return t(null,n(d),this.head,this)}},{key:"remove",value:function(d){return a(d,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(d){if(d<=this.length()){for(var r=1,i=this.head;r<d;)i=i.next,r++;return i.value}}},{key:"set_object_at",value:function(d,r){if(d<=this.length()){for(var i=1,f=this.head;i<d;)f=f.next,i++;f.value=r}}}]),h})()}),(function(w,U,N){"use strict";function v(s,n,t){this.x=null,this.y=null,s==null&&n==null&&t==null?(this.x=0,this.y=0):typeof s=="number"&&typeof n=="number"&&t==null?(this.x=s,this.y=n):s.constructor.name=="Point"&&n==null&&t==null&&(t=s,this.x=t.x,this.y=t.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(s,n,t){s.constructor.name=="Point"&&n==null&&t==null?(t=s,this.setLocation(t.x,t.y)):typeof s=="number"&&typeof n=="number"&&t==null&&(parseInt(s)==s&&parseInt(n)==n?this.move(s,n):(this.x=Math.floor(s+.5),this.y=Math.floor(n+.5)))},v.prototype.move=function(s,n){this.x=s,this.y=n},v.prototype.translate=function(s,n){this.x+=s,this.y+=n},v.prototype.equals=function(s){if(s.constructor.name=="Point"){var n=s;return this.x==n.x&&this.y==n.y}return this==s},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=v}),(function(w,U,N){"use strict";function v(s,n,t,a){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&n!=null&&t!=null&&a!=null&&(this.x=s,this.y=n,this.width=t,this.height=a)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(s){this.x=s},v.prototype.getY=function(){return this.y},v.prototype.setY=function(s){this.y=s},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(s){this.width=s},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(s){this.height=s},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},w.exports=v}),(function(w,U,N){"use strict";var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function s(){}s.lastID=0,s.createID=function(n){return s.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=s.getString(),s.lastID++),n.uniqueID)},s.getString=function(n){return n==null&&(n=s.lastID),"Object#"+n},s.isPrimitive=function(n){var t=typeof n>"u"?"undefined":v(n);return n==null||t!="object"&&t!="function"},w.exports=s}),(function(w,U,N){"use strict";function v(f){if(Array.isArray(f)){for(var l=0,p=Array(f.length);l<f.length;l++)p[l]=f[l];return p}else return Array.from(f)}var s=N(0),n=N(7),t=N(3),a=N(1),h=N(6),e=N(5),d=N(17),r=N(29);function i(f){r.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,f!=null&&(this.isRemoteUse=f)}i.RANDOM_SEED=1,i.prototype=Object.create(r.prototype),i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},i.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},i.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},i.prototype.newGraphManager=function(){var f=new n(this);return this.graphManager=f,f},i.prototype.newGraph=function(f){return new h(null,this.graphManager,f)},i.prototype.newNode=function(f){return new t(this.graphManager,f)},i.prototype.newEdge=function(f){return new a(null,null,f)},i.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},i.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var f;return this.checkLayoutSuccess()?f=!1:f=this.layout(),s.ANIMATE==="during"?!1:(f&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,f)},i.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},i.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var f=this.graphManager.getAllEdges(),l=0;l<f.length;l++)f[l];for(var p=this.graphManager.getRoot().getNodes(),l=0;l<p.length;l++)p[l];this.update(this.graphManager.getRoot())}},i.prototype.update=function(f){if(f==null)this.update2();else if(f instanceof t){var l=f;if(l.getChild()!=null)for(var p=l.getChild().getNodes(),g=0;g<p.length;g++)update(p[g]);l.vGraphObject!=null&&l.vGraphObject.update(l)}else if(f instanceof a){var c=f;c.vGraphObject!=null&&c.vGraphObject.update(c)}else if(f instanceof h){var T=f;T.vGraphObject!=null&&T.vGraphObject.update(T)}},i.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},i.prototype.transform=function(f){if(f==null)this.transform(new e(0,0));else{var l=new d,p=this.graphManager.getRoot().updateLeftTop();if(p!=null){l.setWorldOrgX(f.x),l.setWorldOrgY(f.y),l.setDeviceOrgX(p.x),l.setDeviceOrgY(p.y);for(var g=this.getAllNodes(),c,T=0;T<g.length;T++)c=g[T],c.transform(l)}}},i.prototype.positionNodesRandomly=function(f){if(f==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var l,p,g=f.getNodes(),c=0;c<g.length;c++)l=g[c],p=l.getChild(),p==null||p.getNodes().length==0?l.scatter():(this.positionNodesRandomly(p),l.updateBounds())},i.prototype.getFlatForest=function(){for(var f=[],l=!0,p=this.graphManager.getRoot().getNodes(),g=!0,c=0;c<p.length;c++)p[c].getChild()!=null&&(g=!1);if(!g)return f;var T=new Set,A=[],I=new Map,S=[];for(S=S.concat(p);S.length>0&&l;){for(A.push(S[0]);A.length>0&&l;){var Y=A[0];A.splice(0,1),T.add(Y);for(var W=Y.getEdges(),c=0;c<W.length;c++){var z=W[c].getOtherEnd(Y);if(I.get(Y)!=z)if(!T.has(z))A.push(z),I.set(z,Y);else{l=!1;break}}}if(!l)f=[];else{var x=[].concat(v(T));f.push(x);for(var c=0;c<x.length;c++){var tt=x[c],o=S.indexOf(tt);o>-1&&S.splice(o,1)}T=new Set,I=new Map}}return f},i.prototype.createDummyNodesForBendpoints=function(f){for(var l=[],p=f.source,g=this.graphManager.calcLowestCommonAncestor(f.source,f.target),c=0;c<f.bendpoints.length;c++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),g.add(T);var A=this.newEdge(null);this.graphManager.add(A,p,T),l.add(T),p=T}var A=this.newEdge(null);return this.graphManager.add(A,p,f.target),this.edgeToDummyNodes.set(f,l),f.isInterGraph()?this.graphManager.remove(f):g.remove(f),l},i.prototype.createBendpointsFromDummyNodes=function(){var f=[];f=f.concat(this.graphManager.getAllEdges()),f=[].concat(v(this.edgeToDummyNodes.keys())).concat(f);for(var l=0;l<f.length;l++){var p=f[l];if(p.bendpoints.length>0){for(var g=this.edgeToDummyNodes.get(p),c=0;c<g.length;c++){var T=g[c],A=new e(T.getCenterX(),T.getCenterY()),I=p.bendpoints.get(c);I.x=A.x,I.y=A.y,T.getOwner().remove(T)}this.graphManager.add(p,p.source,p.target)}}},i.transform=function(f,l,p,g){if(p!=null&&g!=null){var c=l;if(f<=50){var T=l/p;c-=(l-T)/50*(50-f)}else{var A=l*g;c+=(A-l)/50*(f-50)}return c}else{var I,S;return f<=50?(I=9*l/500,S=l/10):(I=9*l/50,S=-8*l),I*f+S}},i.findCenterOfTree=function(f){var l=[];l=l.concat(f);var p=[],g=new Map,c=!1,T=null;(l.length==1||l.length==2)&&(c=!0,T=l[0]);for(var A=0;A<l.length;A++){var I=l[A],S=I.getNeighborsList().size;g.set(I,I.getNeighborsList().size),S==1&&p.push(I)}var Y=[];for(Y=Y.concat(p);!c;){var W=[];W=W.concat(Y),Y=[];for(var A=0;A<l.length;A++){var I=l[A],z=l.indexOf(I);z>=0&&l.splice(z,1),I.getNeighborsList().forEach(function(o){if(p.indexOf(o)<0){var m=g.get(o)-1;m==1&&Y.push(o),g.set(o,m)}})}p=p.concat(Y),(l.length==1||l.length==2)&&(c=!0,T=l[0])}return T},i.prototype.setGraphManager=function(f){this.graphManager=f},w.exports=i}),(function(w,U,N){"use strict";function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},w.exports=v}),(function(w,U,N){"use strict";var v=N(5);function s(n,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(n){this.lworldExtX=n},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(n){this.lworldExtY=n},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},s.prototype.transformX=function(n){var t=0,a=this.lworldExtX;return a!=0&&(t=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),t},s.prototype.transformY=function(n){var t=0,a=this.lworldExtY;return a!=0&&(t=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),t},s.prototype.inverseTransformX=function(n){var t=0,a=this.ldeviceExtX;return a!=0&&(t=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),t},s.prototype.inverseTransformY=function(n){var t=0,a=this.ldeviceExtY;return a!=0&&(t=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),t},s.prototype.inverseTransformPoint=function(n){return new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y))},w.exports=s}),(function(w,U,N){"use strict";function v(r){if(Array.isArray(r)){for(var i=0,f=Array(r.length);i<r.length;i++)f[i]=r[i];return f}else return Array.from(r)}var s=N(15),n=N(4),t=N(0),a=N(8),h=N(9);function e(){s.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}e.prototype=Object.create(s.prototype);for(var d in s)e[d]=s[d];e.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var r,i,f,l,p,g,c,T=this.getGraphManager().getAllEdges(),A=0;A<T.length;A++)r=T[A],i=r.idealLength,r.isInterGraph&&(l=r.getSource(),p=r.getTarget(),g=r.getSourceInLca().getEstimatedSize(),c=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=g+c-2*t.SIMPLE_NODE_SIZE),f=r.getLca().getInclusionTreeDepth(),r.idealLength+=i*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*f))},e.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),i,f=0;f<r.length;f++)i=r[f],this.calcSpringForce(i,i.idealLength)},e.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f,l,p,g,c=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,f=0;f<c.length;f++)p=c[f],this.calculateRepulsionForceOfANode(p,T,r,i),T.add(p);else for(f=0;f<c.length;f++)for(p=c[f],l=f+1;l<c.length;l++)g=c[l],p.getOwner()==g.getOwner()&&this.calcRepulsionForce(p,g)},e.prototype.calcGravitationalForces=function(){for(var r,i=this.getAllNodesToApplyGravitation(),f=0;f<i.length;f++)r=i[f],this.calcGravitationalForce(r)},e.prototype.moveNodes=function(){for(var r=this.getAllNodes(),i,f=0;f<r.length;f++)i=r[f],i.move()},e.prototype.calcSpringForce=function(r,i){var f=r.getSource(),l=r.getTarget(),p,g,c,T;if(this.uniformLeafNodeSizes&&f.getChild()==null&&l.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;p=r.getLength(),p!=0&&(g=r.edgeElasticity*(p-i),c=g*(r.lengthX/p),T=g*(r.lengthY/p),f.springForceX+=c,f.springForceY+=T,l.springForceX-=c,l.springForceY-=T)},e.prototype.calcRepulsionForce=function(r,i){var f=r.getRect(),l=i.getRect(),p=new Array(2),g=new Array(4),c,T,A,I,S,Y,W;if(f.intersects(l)){a.calcSeparationAmount(f,l,p,n.DEFAULT_EDGE_LENGTH/2),Y=2*p[0],W=2*p[1];var z=r.noOfChildren*i.noOfChildren/(r.noOfChildren+i.noOfChildren);r.repulsionForceX-=z*Y,r.repulsionForceY-=z*W,i.repulsionForceX+=z*Y,i.repulsionForceY+=z*W}else this.uniformLeafNodeSizes&&r.getChild()==null&&i.getChild()==null?(c=l.getCenterX()-f.getCenterX(),T=l.getCenterY()-f.getCenterY()):(a.getIntersection(f,l,g),c=g[2]-g[0],T=g[3]-g[1]),Math.abs(c)<n.MIN_REPULSION_DIST&&(c=h.sign(c)*n.MIN_REPULSION_DIST),Math.abs(T)<n.MIN_REPULSION_DIST&&(T=h.sign(T)*n.MIN_REPULSION_DIST),A=c*c+T*T,I=Math.sqrt(A),S=(r.nodeRepulsion/2+i.nodeRepulsion/2)*r.noOfChildren*i.noOfChildren/A,Y=S*c/I,W=S*T/I,r.repulsionForceX-=Y,r.repulsionForceY-=W,i.repulsionForceX+=Y,i.repulsionForceY+=W},e.prototype.calcGravitationalForce=function(r){var i,f,l,p,g,c,T,A;i=r.getOwner(),f=(i.getRight()+i.getLeft())/2,l=(i.getTop()+i.getBottom())/2,p=r.getCenterX()-f,g=r.getCenterY()-l,c=Math.abs(p)+r.getWidth()/2,T=Math.abs(g)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(A=i.getEstimatedSize()*this.gravityRangeFactor,(c>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*p,r.gravitationForceY=-this.gravityConstant*g)):(A=i.getEstimatedSize()*this.compoundGravityRangeFactor,(c>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*p*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},e.prototype.isConverged=function(){var r,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||i},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,i=this.graphManager.getAllNodes(),f=0;f<i.length;f++)r=i[f],r.noOfChildren=r.getNoOfChildren()},e.prototype.calcGrid=function(r){var i=0,f=0;i=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),f=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var l=new Array(i),p=0;p<i;p++)l[p]=new Array(f);for(var p=0;p<i;p++)for(var g=0;g<f;g++)l[p][g]=new Array;return l},e.prototype.addNodeToGrid=function(r,i,f){var l=0,p=0,g=0,c=0;l=parseInt(Math.floor((r.getRect().x-i)/this.repulsionRange)),p=parseInt(Math.floor((r.getRect().width+r.getRect().x-i)/this.repulsionRange)),g=parseInt(Math.floor((r.getRect().y-f)/this.repulsionRange)),c=parseInt(Math.floor((r.getRect().height+r.getRect().y-f)/this.repulsionRange));for(var T=l;T<=p;T++)for(var A=g;A<=c;A++)this.grid[T][A].push(r),r.setGridCoordinates(l,p,g,c)},e.prototype.updateGrid=function(){var r,i,f=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<f.length;r++)i=f[r],this.addNodeToGrid(i,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(r,i,f,l){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&f||l){var p=new Set;r.surrounding=new Array;for(var g,c=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var A=r.startY-1;A<r.finishY+2;A++)if(!(T<0||A<0||T>=c.length||A>=c[0].length)){for(var I=0;I<c[T][A].length;I++)if(g=c[T][A][I],!(r.getOwner()!=g.getOwner()||r==g)&&!i.has(g)&&!p.has(g)){var S=Math.abs(r.getCenterX()-g.getCenterX())-(r.getWidth()/2+g.getWidth()/2),Y=Math.abs(r.getCenterY()-g.getCenterY())-(r.getHeight()/2+g.getHeight()/2);S<=this.repulsionRange&&Y<=this.repulsionRange&&p.add(g)}}r.surrounding=[].concat(v(p))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},e.prototype.calcRepulsionRange=function(){return 0},w.exports=e}),(function(w,U,N){"use strict";var v=N(1),s=N(4);function n(a,h,e){v.call(this,a,h,e),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(v.prototype);for(var t in v)n[t]=v[t];w.exports=n}),(function(w,U,N){"use strict";var v=N(3),s=N(4);function n(a,h,e,d){v.call(this,a,h,e,d),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}n.prototype=Object.create(v.prototype);for(var t in v)n[t]=v[t];n.prototype.setGridCoordinates=function(a,h,e,d){this.startX=a,this.finishX=h,this.startY=e,this.finishY=d},w.exports=n}),(function(w,U,N){"use strict";function v(s,n){this.width=0,this.height=0,s!==null&&n!==null&&(this.height=n,this.width=s)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(s){this.width=s},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(s){this.height=s},w.exports=v}),(function(w,U,N){"use strict";var v=N(14);function s(){this.map={},this.keys=[]}s.prototype.put=function(n,t){var a=v.createID(n);this.contains(a)||(this.map[a]=t,this.keys.push(n))},s.prototype.contains=function(n){return v.createID(n),this.map[n]!=null},s.prototype.get=function(n){var t=v.createID(n);return this.map[t]},s.prototype.keySet=function(){return this.keys},w.exports=s}),(function(w,U,N){"use strict";var v=N(14);function s(){this.set={}}s.prototype.add=function(n){var t=v.createID(n);this.contains(t)||(this.set[t]=n)},s.prototype.remove=function(n){delete this.set[v.createID(n)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(n){return this.set[v.createID(n)]==n},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(n){for(var t=Object.keys(this.set),a=t.length,h=0;h<a;h++)n.push(this.set[t[h]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(n){for(var t=n.length,a=0;a<t;a++){var h=n[a];this.add(h)}},w.exports=s}),(function(w,U,N){"use strict";function v(){}v.multMat=function(s,n){for(var t=[],a=0;a<s.length;a++){t[a]=[];for(var h=0;h<n[0].length;h++){t[a][h]=0;for(var e=0;e<s[0].length;e++)t[a][h]+=s[a][e]*n[e][h]}}return t},v.transpose=function(s){for(var n=[],t=0;t<s[0].length;t++){n[t]=[];for(var a=0;a<s.length;a++)n[t][a]=s[a][t]}return n},v.multCons=function(s,n){for(var t=[],a=0;a<s.length;a++)t[a]=s[a]*n;return t},v.minusOp=function(s,n){for(var t=[],a=0;a<s.length;a++)t[a]=s[a]-n[a];return t},v.dotProduct=function(s,n){for(var t=0,a=0;a<s.length;a++)t+=s[a]*n[a];return t},v.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},v.normalize=function(s){for(var n=[],t=this.mag(s),a=0;a<s.length;a++)n[a]=s[a]/t;return n},v.multGamma=function(s){for(var n=[],t=0,a=0;a<s.length;a++)t+=s[a];t*=-1/s.length;for(var h=0;h<s.length;h++)n[h]=t+s[h];return n},v.multL=function(s,n,t){for(var a=[],h=[],e=[],d=0;d<n[0].length;d++){for(var r=0,i=0;i<n.length;i++)r+=-.5*n[i][d]*s[i];h[d]=r}for(var f=0;f<t.length;f++){for(var l=0,p=0;p<t.length;p++)l+=t[f][p]*h[p];e[f]=l}for(var g=0;g<n.length;g++){for(var c=0,T=0;T<n[0].length;T++)c+=n[g][T]*e[T];a[g]=c}return a},w.exports=v}),(function(w,U,N){"use strict";var v=(function(){function t(a,h){for(var e=0;e<h.length;e++){var d=h[e];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(a,h,e){return h&&t(a.prototype,h),e&&t(a,e),a}})();function s(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}var n=N(11);w.exports=(function(){function t(a,h){s(this,t),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var e=void 0;a instanceof n?e=a.size():e=a.length,this._quicksort(a,0,e-1)}return v(t,[{key:"_quicksort",value:function(h,e,d){if(e<d){var r=this._partition(h,e,d);this._quicksort(h,e,r),this._quicksort(h,r+1,d)}}},{key:"_partition",value:function(h,e,d){for(var r=this._get(h,e),i=e,f=d;;){for(;this.compareFunction(r,this._get(h,f));)f--;for(;this.compareFunction(this._get(h,i),r);)i++;if(i<f)this._swap(h,i,f),i++,f--;else return f}}},{key:"_get",value:function(h,e){return h instanceof n?h.get_object_at(e):h[e]}},{key:"_set",value:function(h,e,d){h instanceof n?h.set_object_at(e,d):h[e]=d}},{key:"_swap",value:function(h,e,d){var r=this._get(h,e);this._set(h,e,this._get(h,d)),this._set(h,d,r)}},{key:"_defaultCompareFunction",value:function(h,e){return e>h}}]),t})()}),(function(w,U,N){"use strict";function v(){}v.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var n=Math.min(this.m,this.n);this.s=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(Math.min(this.m+1,this.n)),this.U=(function(Ot){return(function Tt(Xt){if(Xt.length==0)return 0;for(var St=[],Ut=0;Ut<Xt[0];Ut++)St.push(Tt(Xt.slice(1)));return St})(Ot)})([this.m,n]),this.V=(function(Ot){return(function Tt(Xt){if(Xt.length==0)return 0;for(var St=[],Ut=0;Ut<Xt[0];Ut++)St.push(Tt(Xt.slice(1)));return St})(Ot)})([this.n,this.n]);for(var t=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(this.n),a=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(this.m),h=!0,e=!0,d=Math.min(this.m-1,this.n),r=Math.max(0,Math.min(this.n-2,this.m)),i=0;i<Math.max(d,r);i++){if(i<d){this.s[i]=0;for(var f=i;f<this.m;f++)this.s[i]=v.hypot(this.s[i],s[f][i]);if(this.s[i]!==0){s[i][i]<0&&(this.s[i]=-this.s[i]);for(var l=i;l<this.m;l++)s[l][i]/=this.s[i];s[i][i]+=1}this.s[i]=-this.s[i]}for(var p=i+1;p<this.n;p++){if((function(Ot,Tt){return Ot&&Tt})(i<d,this.s[i]!==0)){for(var g=0,c=i;c<this.m;c++)g+=s[c][i]*s[c][p];g=-g/s[i][i];for(var T=i;T<this.m;T++)s[T][p]+=g*s[T][i]}t[p]=s[i][p]}if((function(Ot,Tt){return Ot&&Tt})(h,i<d))for(var A=i;A<this.m;A++)this.U[A][i]=s[A][i];if(i<r){t[i]=0;for(var I=i+1;I<this.n;I++)t[i]=v.hypot(t[i],t[I]);if(t[i]!==0){t[i+1]<0&&(t[i]=-t[i]);for(var S=i+1;S<this.n;S++)t[S]/=t[i];t[i+1]+=1}if(t[i]=-t[i],(function(Ot,Tt){return Ot&&Tt})(i+1<this.m,t[i]!==0)){for(var Y=i+1;Y<this.m;Y++)a[Y]=0;for(var W=i+1;W<this.n;W++)for(var z=i+1;z<this.m;z++)a[z]+=t[W]*s[z][W];for(var x=i+1;x<this.n;x++)for(var tt=-t[x]/t[i+1],o=i+1;o<this.m;o++)s[o][x]+=tt*a[o]}if(e)for(var m=i+1;m<this.n;m++)this.V[m][i]=t[m]}}var u=Math.min(this.n,this.m+1);if(d<this.n&&(this.s[d]=s[d][d]),this.m<u&&(this.s[u-1]=0),r+1<u&&(t[r]=s[r][u-1]),t[u-1]=0,h){for(var E=d;E<n;E++){for(var y=0;y<this.m;y++)this.U[y][E]=0;this.U[E][E]=1}for(var C=d-1;C>=0;C--)if(this.s[C]!==0){for(var M=C+1;M<n;M++){for(var G=0,O=C;O<this.m;O++)G+=this.U[O][C]*this.U[O][M];G=-G/this.U[C][C];for(var R=C;R<this.m;R++)this.U[R][M]+=G*this.U[R][C]}for(var V=C;V<this.m;V++)this.U[V][C]=-this.U[V][C];this.U[C][C]=1+this.U[C][C];for(var B=0;B<C-1;B++)this.U[B][C]=0}else{for(var rt=0;rt<this.m;rt++)this.U[rt][C]=0;this.U[C][C]=1}}if(e)for(var K=this.n-1;K>=0;K--){if((function(Ot,Tt){return Ot&&Tt})(K<r,t[K]!==0))for(var P=K+1;P<n;P++){for(var b=0,X=K+1;X<this.n;X++)b+=this.V[X][K]*this.V[X][P];b=-b/this.V[K+1][K];for(var Q=K+1;Q<this.n;Q++)this.V[Q][P]+=b*this.V[Q][K]}for(var at=0;at<this.n;at++)this.V[at][K]=0;this.V[K][K]=1}for(var J=u-1,k=0,Et=Math.pow(2,-52),ft=Math.pow(2,-966);u>0;){var q=void 0,mt=void 0;for(q=u-2;q>=-1&&q!==-1;q--)if(Math.abs(t[q])<=ft+Et*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){t[q]=0;break}if(q===u-2)mt=4;else{var ot=void 0;for(ot=u-1;ot>=q&&ot!==q;ot--){var wt=(ot!==u?Math.abs(t[ot]):0)+(ot!==q+1?Math.abs(t[ot-1]):0);if(Math.abs(this.s[ot])<=ft+Et*wt){this.s[ot]=0;break}}ot===q?mt=3:ot===u-1?mt=1:(mt=2,q=ot)}switch(q++,mt){case 1:var Vt=t[u-2];t[u-2]=0;for(var Dt=u-2;Dt>=q;Dt--){var xt=v.hypot(this.s[Dt],Vt),Gt=this.s[Dt]/xt,zt=Vt/xt;if(this.s[Dt]=xt,Dt!==q&&(Vt=-zt*t[Dt-1],t[Dt-1]=Gt*t[Dt-1]),e)for(var Ft=0;Ft<this.n;Ft++)xt=Gt*this.V[Ft][Dt]+zt*this.V[Ft][u-1],this.V[Ft][u-1]=-zt*this.V[Ft][Dt]+Gt*this.V[Ft][u-1],this.V[Ft][Dt]=xt}break;case 2:var Bt=t[q-1];t[q-1]=0;for(var Yt=q;Yt<u;Yt++){var kt=v.hypot(this.s[Yt],Bt),Ct=this.s[Yt]/kt,gt=Bt/kt;if(this.s[Yt]=kt,Bt=-gt*t[Yt],t[Yt]=Ct*t[Yt],h)for(var D=0;D<this.m;D++)kt=Ct*this.U[D][Yt]+gt*this.U[D][q-1],this.U[D][q-1]=-gt*this.U[D][Yt]+Ct*this.U[D][q-1],this.U[D][Yt]=kt}break;case 3:var H=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[q])),Math.abs(t[q])),$=this.s[u-1]/H,j=this.s[u-2]/H,Z=t[u-2]/H,_=this.s[q]/H,pt=t[q]/H,ct=((j+$)*(j-$)+Z*Z)/2,it=$*Z*($*Z),dt=0;(function(Ot,Tt){return Ot||Tt})(ct!==0,it!==0)&&(dt=Math.sqrt(ct*ct+it),ct<0&&(dt=-dt),dt=it/(ct+dt));for(var Lt=(_+$)*(_-$)+dt,Mt=_*pt,et=q;et<u-1;et++){var Nt=v.hypot(Lt,Mt),st=Lt/Nt,nt=Mt/Nt;if(et!==q&&(t[et-1]=Nt),Lt=st*this.s[et]+nt*t[et],t[et]=st*t[et]-nt*this.s[et],Mt=nt*this.s[et+1],this.s[et+1]=st*this.s[et+1],e)for(var ht=0;ht<this.n;ht++)Nt=st*this.V[ht][et]+nt*this.V[ht][et+1],this.V[ht][et+1]=-nt*this.V[ht][et]+st*this.V[ht][et+1],this.V[ht][et]=Nt;if(Nt=v.hypot(Lt,Mt),st=Lt/Nt,nt=Mt/Nt,this.s[et]=Nt,Lt=st*t[et]+nt*this.s[et+1],this.s[et+1]=-nt*t[et]+st*this.s[et+1],Mt=nt*t[et+1],t[et+1]=st*t[et+1],h&&et<this.m-1)for(var yt=0;yt<this.m;yt++)Nt=st*this.U[yt][et]+nt*this.U[yt][et+1],this.U[yt][et+1]=-nt*this.U[yt][et]+st*this.U[yt][et+1],this.U[yt][et]=Nt}t[u-2]=Lt,k=k+1;break;case 4:if(this.s[q]<=0&&(this.s[q]=this.s[q]<0?-this.s[q]:0,e))for(var ut=0;ut<=J;ut++)this.V[ut][q]=-this.V[ut][q];for(;q<J&&!(this.s[q]>=this.s[q+1]);){var Rt=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Rt,e&&q<this.n-1)for(var It=0;It<this.n;It++)Rt=this.V[It][q+1],this.V[It][q+1]=this.V[It][q],this.V[It][q]=Rt;if(h&&q<this.m-1)for(var bt=0;bt<this.m;bt++)Rt=this.U[bt][q+1],this.U[bt][q+1]=this.U[bt][q],this.U[bt][q]=Rt;q++}k=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},v.hypot=function(s,n){var t=void 0;return Math.abs(s)>Math.abs(n)?(t=n/s,t=Math.abs(s)*Math.sqrt(1+t*t)):n!=0?(t=s/n,t=Math.abs(n)*Math.sqrt(1+t*t)):t=0,t},w.exports=v}),(function(w,U,N){"use strict";var v=(function(){function n(t,a){for(var h=0;h<a.length;h++){var e=a[h];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(t,a,h){return a&&n(t.prototype,a),h&&n(t,h),t}})();function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}w.exports=(function(){function n(t,a){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,n),this.sequence1=t,this.sequence2=a,this.match_score=h,this.mismatch_penalty=e,this.gap_penalty=d,this.iMax=t.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var r=0;r<this.iMax;r++){this.grid[r]=new Array(this.jMax);for(var i=0;i<this.jMax;i++)this.grid[r][i]=0}this.tracebackGrid=new Array(this.iMax);for(var f=0;f<this.iMax;f++){this.tracebackGrid[f]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[f][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var a=1;a<this.jMax;a++)this.grid[0][a]=this.grid[0][a-1]+this.gap_penalty,this.tracebackGrid[0][a]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var e=1;e<this.iMax;e++)for(var d=1;d<this.jMax;d++){var r=void 0;this.sequence1[e-1]===this.sequence2[d-1]?r=this.grid[e-1][d-1]+this.match_score:r=this.grid[e-1][d-1]+this.mismatch_penalty;var i=this.grid[e-1][d]+this.gap_penalty,f=this.grid[e][d-1]+this.gap_penalty,l=[r,i,f],p=this.arrayAllMaxIndexes(l);this.grid[e][d]=l[p[0]],this.tracebackGrid[e][d]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var a=[];for(a.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});a[0];){var h=a[0],e=this.tracebackGrid[h.pos[0]][h.pos[1]];e[0]&&a.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),e[1]&&a.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),e[2]&&a.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),a.shift()}return this.alignments}},{key:"getAllIndexes",value:function(a,h){for(var e=[],d=-1;(d=a.indexOf(h,d+1))!==-1;)e.push(d);return e}},{key:"arrayAllMaxIndexes",value:function(a){return this.getAllIndexes(a,Math.max.apply(null,a))}}]),n})()}),(function(w,U,N){"use strict";var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),w.exports=v}),(function(w,U,N){"use strict";function v(){this.listeners=[]}var s=v.prototype;s.addListener=function(n,t){this.listeners.push({event:n,callback:t})},s.removeListener=function(n,t){for(var a=this.listeners.length;a>=0;a--){var h=this.listeners[a];h.event===n&&h.callback===t&&this.listeners.splice(a,1)}},s.emit=function(n,t){for(var a=0;a<this.listeners.length;a++){var h=this.listeners[a];n===h.event&&h.callback(t)}},w.exports=v})])})})),Ae=he.__commonJSMin(((L,F)=>{(function(U,N){typeof L=="object"&&typeof F=="object"?F.exports=N(Ce()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof L=="object"?L.coseBase=N(Ce()):U.coseBase=N(U.layoutBase)})(L,function(w){return(()=>{"use strict";var U={45:((s,n,t)=>{var a={};a.layoutBase=t(551),a.CoSEConstants=t(806),a.CoSEEdge=t(767),a.CoSEGraph=t(880),a.CoSEGraphManager=t(578),a.CoSELayout=t(765),a.CoSENode=t(991),a.ConstraintHandler=t(902),s.exports=a}),806:((s,n,t)=>{var a=t(551).FDLayoutConstants;function h(){}for(var e in a)h[e]=a[e];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=a.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,s.exports=h}),767:((s,n,t)=>{var a=t(551).FDLayoutEdge;function h(d,r,i){a.call(this,d,r,i)}h.prototype=Object.create(a.prototype);for(var e in a)h[e]=a[e];s.exports=h}),880:((s,n,t)=>{var a=t(551).LGraph;function h(d,r,i){a.call(this,d,r,i)}h.prototype=Object.create(a.prototype);for(var e in a)h[e]=a[e];s.exports=h}),578:((s,n,t)=>{var a=t(551).LGraphManager;function h(d){a.call(this,d)}h.prototype=Object.create(a.prototype);for(var e in a)h[e]=a[e];s.exports=h}),765:((s,n,t)=>{var a=t(551).FDLayout,h=t(578),e=t(880),d=t(991),r=t(767),i=t(806),f=t(902),l=t(551).FDLayoutConstants,p=t(551).LayoutConstants,g=t(551).Point,c=t(551).PointD,T=t(551).DimensionD,A=t(551).Layout,I=t(551).Integer,S=t(551).IGeometry,Y=t(551).LGraph,W=t(551).Transform,z=t(551).LinkedList;function x(){a.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(a.prototype);for(var tt in a)x[tt]=a[tt];x.prototype.newGraphManager=function(){var o=new h(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new e(null,this.graphManager,o)},x.prototype.newNode=function(o){return new d(this.graphManager,o)},x.prototype.newEdge=function(o){return new r(null,null,o)},x.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){a.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return p.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.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(i.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(C){return m.has(C)});this.graphManager.setAllNodesToApplyGravitation(u)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),i.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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%l.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-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}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 o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return o.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),i.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),i.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},u=0;u<o.length;u++){var E=o[u].rect,y=o[u].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var o=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!o;)o=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var o=this.getAllNodes(),m,u=0;u<o.length;u++)m=o[u],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<o.length;u++)m=o[u],m.move()},x.prototype.initConstraintVariables=function(){var o=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var E=m[u];this.idToNodeMap.set(E.id,E)}var y=function b(X){for(var Q=X.getChild().getNodes(),at,J=0,k=0;k<Q.length;k++)at=Q[k],at.getChild()==null?o.fixedNodeSet.has(at.id)&&(J+=100):J+=b(at);return J};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(Q){o.fixedNodeSet.add(Q.nodeId)});for(var m=this.graphManager.getAllNodes(),E,u=0;u<m.length;u++)if(E=m[u],E.getChild()!=null){var C=y(E);C>0&&(E.fixedNodeWeight=C)}}if(this.constraints.relativePlacementConstraint){var M=new Map,G=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(b){o.fixedNodesOnHorizontal.add(b),o.fixedNodesOnVertical.add(b)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var O=this.constraints.alignmentConstraint.vertical,u=0;u<O.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),O[u].forEach(function(X){M.set(X,"dummy"+u),o.dummyToNodeForVerticalAlignment.get("dummy"+u).push(X),o.fixedNodeSet.has(X)&&o.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var R=this.constraints.alignmentConstraint.horizontal,u=0;u<R.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),R[u].forEach(function(X){G.set(X,"dummy"+u),o.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(X),o.fixedNodeSet.has(X)&&o.fixedNodesOnVertical.add("dummy"+u)})}if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(b){var X,Q,at;for(at=b.length-1;at>=2*b.length/3;at--)X=Math.floor(Math.random()*(at+1)),Q=b[at],b[at]=b[X],b[X]=Q;return b},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(b){if(b.left){var X=M.has(b.left)?M.get(b.left):b.left,Q=M.has(b.right)?M.get(b.right):b.right;o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodesInRelativeHorizontal.includes(Q)||(o.nodesInRelativeHorizontal.push(Q),o.nodeToRelativeConstraintMapHorizontal.set(Q,[]),o.dummyToNodeForVerticalAlignment.has(Q)?o.nodeToTempPositionMapHorizontal.set(Q,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Q)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Q,o.idToNodeMap.get(Q).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(X).push({right:Q,gap:b.gap}),o.nodeToRelativeConstraintMapHorizontal.get(Q).push({left:X,gap:b.gap})}else{var at=G.has(b.top)?G.get(b.top):b.top,J=G.has(b.bottom)?G.get(b.bottom):b.bottom;o.nodesInRelativeVertical.includes(at)||(o.nodesInRelativeVertical.push(at),o.nodeToRelativeConstraintMapVertical.set(at,[]),o.dummyToNodeForHorizontalAlignment.has(at)?o.nodeToTempPositionMapVertical.set(at,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(at)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(at,o.idToNodeMap.get(at).getCenterY())),o.nodesInRelativeVertical.includes(J)||(o.nodesInRelativeVertical.push(J),o.nodeToRelativeConstraintMapVertical.set(J,[]),o.dummyToNodeForHorizontalAlignment.has(J)?o.nodeToTempPositionMapVertical.set(J,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(J)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(J,o.idToNodeMap.get(J).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(at).push({bottom:J,gap:b.gap}),o.nodeToRelativeConstraintMapVertical.get(J).push({top:at,gap:b.gap})}});else{var V=new Map,B=new Map;this.constraints.relativePlacementConstraint.forEach(function(b){if(b.left){var X=M.has(b.left)?M.get(b.left):b.left,Q=M.has(b.right)?M.get(b.right):b.right;V.has(X)?V.get(X).push(Q):V.set(X,[Q]),V.has(Q)?V.get(Q).push(X):V.set(Q,[X])}else{var at=G.has(b.top)?G.get(b.top):b.top,J=G.has(b.bottom)?G.get(b.bottom):b.bottom;B.has(at)?B.get(at).push(J):B.set(at,[J]),B.has(J)?B.get(J).push(at):B.set(J,[at])}});var rt=function(X,Q){var at=[],J=[],k=new z,Et=new Set,ft=0;return X.forEach(function(q,mt){if(!Et.has(mt)){at[ft]=[],J[ft]=!1;var ot=mt;for(k.push(ot),Et.add(ot),at[ft].push(ot);k.length!=0;)ot=k.shift(),Q.has(ot)&&(J[ft]=!0),X.get(ot).forEach(function(wt){Et.has(wt)||(k.push(wt),Et.add(wt),at[ft].push(wt))});ft++}}),{components:at,isFixed:J}},K=rt(V,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var P=rt(B,o.fixedNodesOnVertical);this.componentsOnVertical=P.components,this.fixedComponentsOnVertical=P.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(P){var b=o.idToNodeMap.get(P.nodeId);b.displacementX=0,b.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var E=0,y=0;y<m[u].length;y++){if(this.fixedNodeSet.has(m[u][y])){E=0;break}E+=this.idToNodeMap.get(m[u][y]).displacementX}for(var C=E/m[u].length,y=0;y<m[u].length;y++)this.idToNodeMap.get(m[u][y]).displacementX=C}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,u=0;u<M.length;u++){for(var G=0,y=0;y<M[u].length;y++){if(this.fixedNodeSet.has(M[u][y])){G=0;break}G+=this.idToNodeMap.get(M[u][y]).displacementY}for(var O=G/M[u].length,y=0;y<M[u].length;y++)this.idToNodeMap.get(M[u][y]).displacementY=O}}if(this.constraints.relativePlacementConstraint)if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(P){if(!o.fixedNodesOnHorizontal.has(P)){var b=0;o.dummyToNodeForVerticalAlignment.has(P)?b=o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(P)[0]).displacementX:b=o.idToNodeMap.get(P).displacementX,o.nodeToRelativeConstraintMapHorizontal.get(P).forEach(function(X){if(X.right){var Q=o.nodeToTempPositionMapHorizontal.get(X.right)-o.nodeToTempPositionMapHorizontal.get(P)-b;Q<X.gap&&(b-=X.gap-Q)}else{var Q=o.nodeToTempPositionMapHorizontal.get(P)-o.nodeToTempPositionMapHorizontal.get(X.left)+b;Q<X.gap&&(b+=X.gap-Q)}}),o.nodeToTempPositionMapHorizontal.set(P,o.nodeToTempPositionMapHorizontal.get(P)+b),o.dummyToNodeForVerticalAlignment.has(P)?o.dummyToNodeForVerticalAlignment.get(P).forEach(function(X){o.idToNodeMap.get(X).displacementX=b}):o.idToNodeMap.get(P).displacementX=b}}),this.nodesInRelativeVertical.forEach(function(P){if(!o.fixedNodesOnHorizontal.has(P)){var b=0;o.dummyToNodeForHorizontalAlignment.has(P)?b=o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(P)[0]).displacementY:b=o.idToNodeMap.get(P).displacementY,o.nodeToRelativeConstraintMapVertical.get(P).forEach(function(X){if(X.bottom){var Q=o.nodeToTempPositionMapVertical.get(X.bottom)-o.nodeToTempPositionMapVertical.get(P)-b;Q<X.gap&&(b-=X.gap-Q)}else{var Q=o.nodeToTempPositionMapVertical.get(P)-o.nodeToTempPositionMapVertical.get(X.top)+b;Q<X.gap&&(b+=X.gap-Q)}}),o.nodeToTempPositionMapVertical.set(P,o.nodeToTempPositionMapVertical.get(P)+b),o.dummyToNodeForHorizontalAlignment.has(P)?o.dummyToNodeForHorizontalAlignment.get(P).forEach(function(X){o.idToNodeMap.get(X).displacementY=b}):o.idToNodeMap.get(P).displacementY=b}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var R=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(X){o.idToNodeMap.get(X).displacementX=0}):this.idToNodeMap.get(R[y]).displacementX=0;else{for(var V=0,B=0,y=0;y<R.length;y++)if(this.dummyToNodeForVerticalAlignment.has(R[y])){var rt=this.dummyToNodeForVerticalAlignment.get(R[y]);V+=rt.length*this.idToNodeMap.get(rt[0]).displacementX,B+=rt.length}else V+=this.idToNodeMap.get(R[y]).displacementX,B++;for(var K=V/B,y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(X){o.idToNodeMap.get(X).displacementX=K}):this.idToNodeMap.get(R[y]).displacementX=K}}for(var u=0;u<this.componentsOnVertical.length;u++){var R=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(Q){o.idToNodeMap.get(Q).displacementY=0}):this.idToNodeMap.get(R[y]).displacementY=0;else{for(var V=0,B=0,y=0;y<R.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(R[y])){var rt=this.dummyToNodeForHorizontalAlignment.get(R[y]);V+=rt.length*this.idToNodeMap.get(rt[0]).displacementY,B+=rt.length}else V+=this.idToNodeMap.get(R[y]).displacementY,B++;for(var K=V/B,y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(k){o.idToNodeMap.get(k).displacementY=K}):this.idToNodeMap.get(R[y]).displacementY=K}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var o=[],m,u=this.graphManager.getGraphs(),E=u.length,y;for(y=0;y<E;y++)m=u[y],m.updateConnected(),m.isConnected||(o=o.concat(m.getNodes()));return o},x.prototype.createBendpoints=function(){var o=[];o=o.concat(this.graphManager.getAllEdges());var m=new Set,u;for(u=0;u<o.length;u++){var E=o[u];if(!m.has(E)){var y=E.getSource(),C=E.getTarget();if(y==C)E.getBendpoints().push(new c),E.getBendpoints().push(new c),this.createDummyNodesForBendpoints(E),m.add(E);else{var M=[];if(M=M.concat(y.getEdgeListToNode(C)),M=M.concat(C.getEdgeListToNode(y)),!m.has(M[0])){if(M.length>1){var G;for(G=0;G<M.length;G++){var O=M[G];O.getBendpoints().push(new c),this.createDummyNodesForBendpoints(O)}}M.forEach(function(R){m.add(R)})}}}if(m.size==o.length)break}},x.prototype.positionNodesRadially=function(o){for(var m=new g(0,0),u=Math.ceil(Math.sqrt(o.length)),E=0,y=0,C=0,M=new c(0,0),G=0;G<o.length;G++){G%u==0&&(C=0,y=E,G!=0&&(y+=i.DEFAULT_COMPONENT_SEPERATION),E=0);var O=o[G],R=A.findCenterOfTree(O);m.x=C,m.y=y,M=x.radialLayout(O,R,m),M.y>E&&(E=Math.floor(M.y)),C=Math.floor(M.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(p.WORLD_CENTER_X-M.x/2,p.WORLD_CENTER_Y-M.y/2))},x.radialLayout=function(o,m,u){var E=Math.max(this.maxDiagonalInTree(o),i.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,E);var y=Y.calculateBounds(o),C=new W;C.setDeviceOrgX(y.getMinX()),C.setDeviceOrgY(y.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var M=0;M<o.length;M++)o[M].transform(C);var G=new c(y.getMaxX(),y.getMaxY());return C.inverseTransformPoint(G)},x.branchRadialLayout=function(o,m,u,E,y,C){var M=(E-u+1)/2;M<0&&(M+=180);var G=(M+u)%360*S.TWO_PI/360,O=y*Math.cos(G),R=y*Math.sin(G);o.setCenter(O,R);var V=[];V=V.concat(o.getEdges());var B=V.length;m!=null&&B--;for(var rt=0,K=V.length,P,b=o.getEdgesBetween(m);b.length>1;){var X=b[0];b.splice(0,1);var Q=V.indexOf(X);Q>=0&&V.splice(Q,1),K--,B--}m!=null?P=(V.indexOf(b[0])+1)%K:P=0;for(var at=Math.abs(E-u)/B,J=P;rt!=B;J=++J%K){var k=V[J].getOtherEnd(o);if(k!=m){var Et=(u+rt*at)%360,ft=(Et+at)%360;x.branchRadialLayout(k,o,Et,ft,y+C,C),rt++}}},x.maxDiagonalInTree=function(o){for(var m=I.MIN_VALUE,u=0;u<o.length;u++){var E=o[u].getDiagonal();E>m&&(m=E)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var C=E[y],M=C.getParent();this.getNodeDegreeWithChildren(C)===0&&(M.id==null||!this.getToBeTiled(M))&&u.push(C)}for(var y=0;y<u.length;y++){var C=u[y],G=C.getParent().id;typeof m[G]>"u"&&(m[G]=[]),m[G]=m[G].concat(C)}Object.keys(m).forEach(function(O){if(m[O].length>1){var R="DummyCompound_"+O;o.memberGroups[R]=m[O];var V=m[O][0].getParent(),B=new d(o.graphManager);B.id=R,B.paddingLeft=V.paddingLeft||0,B.paddingRight=V.paddingRight||0,B.paddingBottom=V.paddingBottom||0,B.paddingTop=V.paddingTop||0,o.idToDummyNode[R]=B;var rt=o.getGraphManager().add(o.newGraph(),B),K=V.getChild();K.add(B);for(var P=0;P<m[O].length;P++){var b=m[O][P];K.remove(b),rt.add(b)}}})},x.prototype.clearCompounds=function(){var o={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],o[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(o,m)},x.prototype.clearZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var E=o.idToDummyNode[u];if(m[u]=o.tileNodes(o.memberGroups[u],E.paddingLeft+E.paddingRight),E.rect.width=m[u].width,E.rect.height=m[u].height,E.setCenter(m[u].centerX,m[u].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,C=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(C+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>C?(E.rect.y-=(E.labelHeight-C)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-C)/2):E.labelPosVertical=="bottom"&&E.setHeight(C+E.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],u=m.id,E=m.paddingLeft,y=m.paddingTop,C=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,E,y,C,M)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var E=o.idToDummyNode[u],y=E.paddingLeft,C=E.paddingTop,M=E.labelMarginLeft,G=E.labelMarginTop;o.adjustLocations(m[u],E.rect.x,E.rect.y,y,C,M,G)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=o.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var E=u.getNodes(),y=0;y<E.length;y++){var C=E[y];if(this.getNodeDegree(C)>0)return this.toBeTiled[m]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){o.id;for(var m=o.getEdges(),u=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(u=u+1)}return u},x.prototype.getNodeDegreeWithChildren=function(o){var m=this.getNodeDegree(o);if(o.getChild()==null)return m;for(var u=o.getChild().getNodes(),E=0;E<u.length;E++){var y=u[E];m+=this.getNodeDegreeWithChildren(y)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(o){for(var m=0;m<o.length;m++){var u=o[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(o,m,u,E,y,C,M){m+=E+C,u+=y+M;for(var G=m,O=0;O<o.rows.length;O++){var R=o.rows[O];m=G;for(var V=0,B=0;B<R.length;B++){var rt=R[B];rt.rect.x=m,rt.rect.y=u,m+=rt.rect.width+o.horizontalPadding,rt.rect.height>V&&(V=rt.rect.height)}u+=V+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var u=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(E){var y=m[E];if(u.tiledMemberPack[E]=u.tileNodes(o[E],y.paddingLeft+y.paddingRight),y.rect.width=u.tiledMemberPack[E].width,y.rect.height=u.tiledMemberPack[E].height,y.setCenter(u.tiledMemberPack[E].centerX,u.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var C=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(C+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>C?(y.rect.x-=(y.labelWidth-C)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-C)/2):y.labelPosHorizontal=="right"&&y.setWidth(C+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},x.prototype.tileNodes=function(o,m){var u=this.tileNodesByFavoringDim(o,m,!0),E=this.tileNodesByFavoringDim(o,m,!1),y=this.getOrgRatio(u),C=this.getOrgRatio(E),M;return C<y?M=E:M=u,M},x.prototype.getOrgRatio=function(o){var m=o.width/o.height;return m<1&&(m=1/m),m},x.prototype.calcIdealRowWidth=function(o,m){var u=i.TILING_PADDING_VERTICAL,E=i.TILING_PADDING_HORIZONTAL,y=o.length,C=0,M=0,G=0;o.forEach(function(P){C+=P.getWidth(),M+=P.getHeight(),P.getWidth()>G&&(G=P.getWidth())});var O=C/y,R=M/y,V=Math.pow(u-E,2)+4*(O+E)*(R+u)*y,B=(E-u+Math.sqrt(V))/(2*(O+E)),rt;m?(rt=Math.ceil(B),rt==B&&rt++):rt=Math.floor(B);var K=rt*(O+E)-E;return G>K&&(K=G),K+=E*2,K},x.prototype.tileNodesByFavoringDim=function(o,m,u){var E=i.TILING_PADDING_VERTICAL,y=i.TILING_PADDING_HORIZONTAL,C=i.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};C&&(M.idealRowWidth=this.calcIdealRowWidth(o,u));var G=function(b){return b.rect.width*b.rect.height},O=function(b,X){return G(X)-G(b)};o.sort(function(P,b){var X=O;return M.idealRowWidth?(X=C,X(P.id,b.id)):X(P,b)});for(var R=0,V=0,B=0;B<o.length;B++){var rt=o[B];R+=rt.getCenterX(),V+=rt.getCenterY()}M.centerX=R/o.length,M.centerY=V/o.length;for(var B=0;B<o.length;B++){var rt=o[B];if(M.rows.length==0)this.insertNodeToRow(M,rt,0,m);else if(this.canAddHorizontal(M,rt.rect.width,rt.rect.height)){var K=M.rows.length-1;M.idealRowWidth||(K=this.getShortestRowIndex(M)),this.insertNodeToRow(M,rt,K,m)}else this.insertNodeToRow(M,rt,M.rows.length,m);this.shiftToLastRow(M)}return M},x.prototype.insertNodeToRow=function(o,m,u,E){var y=E;u==o.rows.length&&(o.rows.push([]),o.rowWidth.push(y),o.rowHeight.push(0));var C=o.rowWidth[u]+m.rect.width;o.rows[u].length>0&&(C+=o.horizontalPadding),o.rowWidth[u]=C,o.width<C&&(o.width=C);var M=m.rect.height;u>0&&(M+=o.verticalPadding);var G=0;M>o.rowHeight[u]&&(G=o.rowHeight[u],o.rowHeight[u]=M,G=o.rowHeight[u]-G),o.height+=G,o.rows[u].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,u=Number.MAX_VALUE,E=0;E<o.rows.length;E++)o.rowWidth[E]<u&&(m=E,u=o.rowWidth[E]);return m},x.prototype.getLongestRowIndex=function(o){for(var m=-1,u=Number.MIN_VALUE,E=0;E<o.rows.length;E++)o.rowWidth[E]>u&&(m=E,u=o.rowWidth[E]);return m},x.prototype.canAddHorizontal=function(o,m,u){if(o.idealRowWidth){var E=o.rows.length-1;return o.rowWidth[E]+m+o.horizontalPadding<=o.idealRowWidth}var y=this.getShortestRowIndex(o);if(y<0)return!0;var C=o.rowWidth[y];if(C+o.horizontalPadding+m<=o.width)return!0;var M=0;o.rowHeight[y]<u&&y>0&&(M=u+o.verticalPadding-o.rowHeight[y]);var G;o.width-C>=m+o.horizontalPadding?G=(o.height+M)/(C+m+o.horizontalPadding):G=(o.height+M)/o.width,M=u+o.verticalPadding;var O;return o.width<m?O=(o.height+M)/m:O=(o.height+M)/o.width,O<1&&(O=1/O),G<1&&(G=1/G),G<O},x.prototype.shiftToLastRow=function(o){var m=this.getLongestRowIndex(o),u=o.rowWidth.length-1,E=o.rows[m],y=E[E.length-1],C=y.width+o.horizontalPadding;if(o.width-o.rowWidth[u]>C&&m!=u){E.splice(-1,1),o.rows[u].push(y),o.rowWidth[m]=o.rowWidth[m]-C,o.rowWidth[u]=o.rowWidth[u]+C,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var M=Number.MIN_VALUE,G=0;G<E.length;G++)E[G].height>M&&(M=E[G].height);m>0&&(M+=o.verticalPadding);var O=o.rowHeight[m]+o.rowHeight[u];o.rowHeight[m]=M,o.rowHeight[u]<y.height+o.verticalPadding&&(o.rowHeight[u]=y.height+o.verticalPadding);var R=o.rowHeight[m]+o.rowHeight[u];o.height+=R-O,this.shiftToLastRow(o)}},x.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var o=[],m=!0,u;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var C=0;C<E.length;C++)if(u=E[C],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(i.PURE_INCREMENTAL){var M=u.getEdges()[0].getOtherEnd(u),G=new T(u.getCenterX()-M.getCenterX(),u.getCenterY()-M.getCenterY());y.push([u,u.getEdges()[0],u.getOwner(),G])}else y.push([u,u.getEdges()[0],u.getOwner()]);m=!0}if(m==!0){for(var O=[],R=0;R<y.length;R++)y[R][0].getEdges().length==1&&(O.push(y[R]),y[R][0].getOwner().remove(y[R][0]));o.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=o},x.prototype.growTree=function(o){for(var m=o[o.length-1],u,E=0;E<m.length;E++)u=m[E],this.findPlaceforPrunedNode(u),u[2].add(u[0]),u[2].add(u[1],u[1].source,u[1].target);o.splice(o.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(o){var m,u,E=o[0];if(E==o[1].source?u=o[1].target:u=o[1].source,i.PURE_INCREMENTAL)E.setCenter(u.getCenterX()+o[3].getWidth(),u.getCenterY()+o[3].getHeight());else{var y=u.startX,C=u.finishX,M=u.startY,G=u.finishY,O=[0,0,0,0];if(M>0)for(var R=y;R<=C;R++)O[0]+=this.grid[R][M-1].length+this.grid[R][M].length-1;if(C<this.grid.length-1)for(var R=M;R<=G;R++)O[1]+=this.grid[C+1][R].length+this.grid[C][R].length-1;if(G<this.grid[0].length-1)for(var R=y;R<=C;R++)O[2]+=this.grid[R][G+1].length+this.grid[R][G].length-1;if(y>0)for(var R=M;R<=G;R++)O[3]+=this.grid[y-1][R].length+this.grid[y][R].length-1;for(var V=I.MAX_VALUE,B,rt,K=0;K<O.length;K++)O[K]<V?(V=O[K],B=1,rt=K):O[K]==V&&B++;if(B==3&&V==0)O[0]==0&&O[1]==0&&O[2]==0?m=1:O[0]==0&&O[1]==0&&O[3]==0?m=0:O[0]==0&&O[2]==0&&O[3]==0?m=3:O[1]==0&&O[2]==0&&O[3]==0&&(m=2);else if(B==2&&V==0){var P=Math.floor(Math.random()*2);O[0]==0&&O[1]==0?P==0?m=0:m=1:O[0]==0&&O[2]==0?P==0?m=0:m=2:O[0]==0&&O[3]==0?P==0?m=0:m=3:O[1]==0&&O[2]==0?P==0?m=1:m=2:O[1]==0&&O[3]==0?P==0?m=1:m=3:P==0?m=2:m=3}else if(B==4&&V==0){var P=Math.floor(Math.random()*4);m=P}else m=rt;m==0?E.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,u.getCenterY()):m==2?E.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,u.getCenterY())}},s.exports=x}),991:((s,n,t)=>{var a=t(551).FDLayoutNode,h=t(551).IMath;function e(r,i,f,l){a.call(this,r,i,f,l)}e.prototype=Object.create(a.prototype);for(var d in a)e[d]=a[d];e.prototype.calculateDisplacement=function(){var r=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementX=r.coolingFactor*r.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementY=r.coolingFactor*r.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},e.prototype.propogateDisplacementToChildren=function(r,i){for(var f=this.getChild().getNodes(),l,p=0;p<f.length;p++)l=f[p],l.getChild()==null?(l.displacementX+=r,l.displacementY+=i):l.propogateDisplacementToChildren(r,i)},e.prototype.move=function(){var r=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),r.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.setPred1=function(r){this.pred1=r},e.prototype.getPred1=function(){return pred1},e.prototype.getPred2=function(){return pred2},e.prototype.setNext=function(r){this.next=r},e.prototype.getNext=function(){return next},e.prototype.setProcessed=function(r){this.processed=r},e.prototype.isProcessed=function(){return processed},s.exports=e}),902:((s,n,t)=>{function a(f){if(Array.isArray(f)){for(var l=0,p=Array(f.length);l<f.length;l++)p[l]=f[l];return p}else return Array.from(f)}var h=t(806),e=t(551).LinkedList,d=t(551).Matrix,r=t(551).SVD;function i(){}i.handleConstraints=function(f){var l={};l.fixedNodeConstraint=f.constraints.fixedNodeConstraint,l.alignmentConstraint=f.constraints.alignmentConstraint,l.relativePlacementConstraint=f.constraints.relativePlacementConstraint;for(var p=new Map,g=new Map,c=[],T=[],A=f.getAllNodes(),I=0,S=0;S<A.length;S++){var Y=A[S];Y.getChild()==null&&(g.set(Y.id,I++),c.push(Y.getCenterX()),T.push(Y.getCenterY()),p.set(Y.id,Y))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(D){!D.gap&&D.gap!=0&&(D.left?D.gap=h.DEFAULT_EDGE_LENGTH+p.get(D.left).getWidth()/2+p.get(D.right).getWidth()/2:D.gap=h.DEFAULT_EDGE_LENGTH+p.get(D.top).getHeight()/2+p.get(D.bottom).getHeight()/2)});var W=function(H,$){return{x:H.x-$.x,y:H.y-$.y}},z=function(H){var $=0,j=0;return H.forEach(function(Z){$+=c[g.get(Z)],j+=T[g.get(Z)]}),{x:$/H.size,y:j/H.size}},x=function(H,$,j,Z,_){function pt(st,nt){var ht=new Set(st),yt=!0,ut=!1,Rt=void 0;try{for(var It=nt[Symbol.iterator](),bt;!(yt=(bt=It.next()).done);yt=!0){var Ot=bt.value;ht.add(Ot)}}catch(Tt){ut=!0,Rt=Tt}finally{try{!yt&&It.return&&It.return()}finally{if(ut)throw Rt}}return ht}var ct=new Map;H.forEach(function(st,nt){ct.set(nt,0)}),H.forEach(function(st,nt){st.forEach(function(ht){ct.set(ht.id,ct.get(ht.id)+1)})});var it=new Map,dt=new Map,Lt=new e;ct.forEach(function(st,nt){st==0?(Lt.push(nt),j||($=="horizontal"?it.set(nt,g.has(nt)?c[g.get(nt)]:Z.get(nt)):it.set(nt,g.has(nt)?T[g.get(nt)]:Z.get(nt)))):it.set(nt,Number.NEGATIVE_INFINITY),j&&dt.set(nt,new Set([nt]))}),j&&_.forEach(function(st){var nt=[];if(st.forEach(function(ut){j.has(ut)&&nt.push(ut)}),nt.length>0){var ht=0;nt.forEach(function(ut){$=="horizontal"?(it.set(ut,g.has(ut)?c[g.get(ut)]:Z.get(ut)),ht+=it.get(ut)):(it.set(ut,g.has(ut)?T[g.get(ut)]:Z.get(ut)),ht+=it.get(ut))}),ht=ht/nt.length,st.forEach(function(ut){j.has(ut)||it.set(ut,ht)})}else{var yt=0;st.forEach(function(ut){$=="horizontal"?yt+=g.has(ut)?c[g.get(ut)]:Z.get(ut):yt+=g.has(ut)?T[g.get(ut)]:Z.get(ut)}),yt=yt/st.length,st.forEach(function(ut){it.set(ut,yt)})}});for(var Mt=function(){var nt=Lt.shift();H.get(nt).forEach(function(ht){if(it.get(ht.id)<it.get(nt)+ht.gap)if(j&&j.has(ht.id)){var yt=void 0;if($=="horizontal"?yt=g.has(ht.id)?c[g.get(ht.id)]:Z.get(ht.id):yt=g.has(ht.id)?T[g.get(ht.id)]:Z.get(ht.id),it.set(ht.id,yt),yt<it.get(nt)+ht.gap){var ut=it.get(nt)+ht.gap-yt;dt.get(nt).forEach(function(Rt){it.set(Rt,it.get(Rt)-ut)})}}else it.set(ht.id,it.get(nt)+ht.gap);ct.set(ht.id,ct.get(ht.id)-1),ct.get(ht.id)==0&&Lt.push(ht.id),j&&dt.set(ht.id,pt(dt.get(nt),dt.get(ht.id)))})};Lt.length!=0;)Mt();if(j){var et=new Set;H.forEach(function(st,nt){st.length==0&&et.add(nt)});var Nt=[];dt.forEach(function(st,nt){if(et.has(nt)){var ht=!1,yt=!0,ut=!1,Rt=void 0;try{for(var It=st[Symbol.iterator](),bt;!(yt=(bt=It.next()).done);yt=!0){var Ot=bt.value;j.has(Ot)&&(ht=!0)}}catch(St){ut=!0,Rt=St}finally{try{!yt&&It.return&&It.return()}finally{if(ut)throw Rt}}if(!ht){var Tt=!1,Xt=void 0;Nt.forEach(function(St,Ut){St.has([].concat(a(st))[0])&&(Tt=!0,Xt=Ut)}),Tt?st.forEach(function(St){Nt[Xt].add(St)}):Nt.push(new Set(st))}}}),Nt.forEach(function(st,nt){var ht=Number.POSITIVE_INFINITY,yt=Number.POSITIVE_INFINITY,ut=Number.NEGATIVE_INFINITY,Rt=Number.NEGATIVE_INFINITY,It=!0,bt=!1,Ot=void 0;try{for(var Tt=st[Symbol.iterator](),Xt;!(It=(Xt=Tt.next()).done);It=!0){var St=Xt.value,Ut=void 0;$=="horizontal"?Ut=g.has(St)?c[g.get(St)]:Z.get(St):Ut=g.has(St)?T[g.get(St)]:Z.get(St);var Kt=it.get(St);Ut<ht&&(ht=Ut),Ut>ut&&(ut=Ut),Kt<yt&&(yt=Kt),Kt>Rt&&(Rt=Kt)}}catch(ee){bt=!0,Ot=ee}finally{try{!It&&Tt.return&&Tt.return()}finally{if(bt)throw Ot}}var le=(ht+ut)/2-(yt+Rt)/2,Jt=!0,_t=!1,jt=void 0;try{for(var Qt=st[Symbol.iterator](),oe;!(Jt=(oe=Qt.next()).done);Jt=!0){var te=oe.value;it.set(te,it.get(te)+le)}}catch(ee){_t=!0,jt=ee}finally{try{!Jt&&Qt.return&&Qt.return()}finally{if(_t)throw jt}}})}return it},tt=function(H){var $=0,j=0,Z=0,_=0;if(H.forEach(function(dt){dt.left?c[g.get(dt.left)]-c[g.get(dt.right)]>=0?$++:j++:T[g.get(dt.top)]-T[g.get(dt.bottom)]>=0?Z++:_++}),$>j&&Z>_)for(var pt=0;pt<g.size;pt++)c[pt]=-1*c[pt],T[pt]=-1*T[pt];else if($>j)for(var ct=0;ct<g.size;ct++)c[ct]=-1*c[ct];else if(Z>_)for(var it=0;it<g.size;it++)T[it]=-1*T[it]},o=function(H){var $=[],j=new e,Z=new Set,_=0;return H.forEach(function(pt,ct){if(!Z.has(ct)){$[_]=[];var it=ct;for(j.push(it),Z.add(it),$[_].push(it);j.length!=0;)it=j.shift(),H.get(it).forEach(function(dt){Z.has(dt.id)||(j.push(dt.id),Z.add(dt.id),$[_].push(dt.id))});_++}}),$},m=function(H){var $=new Map;return H.forEach(function(j,Z){$.set(Z,[])}),H.forEach(function(j,Z){j.forEach(function(_){$.get(Z).push(_),$.get(_.id).push({id:Z,gap:_.gap,direction:_.direction})})}),$},u=function(H){var $=new Map;return H.forEach(function(j,Z){$.set(Z,[])}),H.forEach(function(j,Z){j.forEach(function(_){$.get(_.id).push({id:Z,gap:_.gap,direction:_.direction})})}),$},E=[],y=[],C=!1,M=!1,G=new Set,O=new Map,R=new Map,V=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(D){G.add(D.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(D){D.left?(O.has(D.left)?O.get(D.left).push({id:D.right,gap:D.gap,direction:"horizontal"}):O.set(D.left,[{id:D.right,gap:D.gap,direction:"horizontal"}]),O.has(D.right)||O.set(D.right,[])):(O.has(D.top)?O.get(D.top).push({id:D.bottom,gap:D.gap,direction:"vertical"}):O.set(D.top,[{id:D.bottom,gap:D.gap,direction:"vertical"}]),O.has(D.bottom)||O.set(D.bottom,[]))}),R=m(O),V=o(R)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(D,H){E[H]=[D.position.x,D.position.y],y[H]=[c[g.get(D.nodeId)],T[g.get(D.nodeId)]]}),C=!0;else if(l.alignmentConstraint)(function(){var D=0;if(l.alignmentConstraint.vertical){for(var H=l.alignmentConstraint.vertical,$=function(it){var dt=new Set;H[it].forEach(function(et){dt.add(et)});var Lt=new Set([].concat(a(dt)).filter(function(et){return G.has(et)})),Mt=void 0;Lt.size>0?Mt=c[g.get(Lt.values().next().value)]:Mt=z(dt).x,H[it].forEach(function(et){E[D]=[Mt,T[g.get(et)]],y[D]=[c[g.get(et)],T[g.get(et)]],D++})},j=0;j<H.length;j++)$(j);C=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,_=function(it){var dt=new Set;Z[it].forEach(function(et){dt.add(et)});var Lt=new Set([].concat(a(dt)).filter(function(et){return G.has(et)})),Mt=void 0;Lt.size>0?Mt=c[g.get(Lt.values().next().value)]:Mt=z(dt).y,Z[it].forEach(function(et){E[D]=[c[g.get(et)],Mt],y[D]=[c[g.get(et)],T[g.get(et)]],D++})},pt=0;pt<Z.length;pt++)_(pt);C=!0}l.relativePlacementConstraint&&(M=!0)})();else if(l.relativePlacementConstraint){for(var B=0,rt=0,K=0;K<V.length;K++)V[K].length>B&&(B=V[K].length,rt=K);if(B<R.size/2)tt(l.relativePlacementConstraint),C=!1,M=!1;else{var P=new Map,b=new Map,X=[];V[rt].forEach(function(D){O.get(D).forEach(function(H){H.direction=="horizontal"?(P.has(D)?P.get(D).push(H):P.set(D,[H]),P.has(H.id)||P.set(H.id,[]),X.push({left:D,right:H.id})):(b.has(D)?b.get(D).push(H):b.set(D,[H]),b.has(H.id)||b.set(H.id,[]),X.push({top:D,bottom:H.id}))})}),tt(X),M=!1;var Q=x(P,"horizontal"),at=x(b,"vertical");V[rt].forEach(function(D,H){y[H]=[c[g.get(D)],T[g.get(D)]],E[H]=[],Q.has(D)?E[H][0]=Q.get(D):E[H][0]=c[g.get(D)],at.has(D)?E[H][1]=at.get(D):E[H][1]=T[g.get(D)]}),C=!0}}if(C){for(var J=void 0,k=d.transpose(E),Et=d.transpose(y),ft=0;ft<k.length;ft++)k[ft]=d.multGamma(k[ft]),Et[ft]=d.multGamma(Et[ft]);var q=d.multMat(k,d.transpose(Et)),mt=r.svd(q);J=d.multMat(mt.V,d.transpose(mt.U));for(var ot=0;ot<g.size;ot++){var wt=[c[ot],T[ot]],Vt=[J[0][0],J[1][0]],Dt=[J[0][1],J[1][1]];c[ot]=d.dotProduct(wt,Vt),T[ot]=d.dotProduct(wt,Dt)}M&&tt(l.relativePlacementConstraint)}}if(h.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var xt={x:0,y:0};l.fixedNodeConstraint.forEach(function(D,H){var $={x:c[g.get(D.nodeId)],y:T[g.get(D.nodeId)]},j=D.position,Z=W(j,$);xt.x+=Z.x,xt.y+=Z.y}),xt.x/=l.fixedNodeConstraint.length,xt.y/=l.fixedNodeConstraint.length,c.forEach(function(D,H){c[H]+=xt.x}),T.forEach(function(D,H){T[H]+=xt.y}),l.fixedNodeConstraint.forEach(function(D){c[g.get(D.nodeId)]=D.position.x,T[g.get(D.nodeId)]=D.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Gt=l.alignmentConstraint.vertical,zt=function(H){var $=new Set;Gt[H].forEach(function(_){$.add(_)});var j=new Set([].concat(a($)).filter(function(_){return G.has(_)})),Z=void 0;j.size>0?Z=c[g.get(j.values().next().value)]:Z=z($).x,$.forEach(function(_){G.has(_)||(c[g.get(_)]=Z)})},Ft=0;Ft<Gt.length;Ft++)zt(Ft);if(l.alignmentConstraint.horizontal)for(var Bt=l.alignmentConstraint.horizontal,Yt=function(H){var $=new Set;Bt[H].forEach(function(_){$.add(_)});var j=new Set([].concat(a($)).filter(function(_){return G.has(_)})),Z=void 0;j.size>0?Z=T[g.get(j.values().next().value)]:Z=z($).y,$.forEach(function(_){G.has(_)||(T[g.get(_)]=Z)})},kt=0;kt<Bt.length;kt++)Yt(kt)}l.relativePlacementConstraint&&(function(){var D=new Map,H=new Map,$=new Map,j=new Map,Z=new Map,_=new Map,pt=new Set,ct=new Set;if(G.forEach(function(Pt){pt.add(Pt),ct.add(Pt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var it=l.alignmentConstraint.vertical,dt=function(vt){$.set("dummy"+vt,[]),it[vt].forEach(function(At){D.set(At,"dummy"+vt),$.get("dummy"+vt).push(At),G.has(At)&&pt.add("dummy"+vt)}),Z.set("dummy"+vt,c[g.get(it[vt][0])])},Lt=0;Lt<it.length;Lt++)dt(Lt);if(l.alignmentConstraint.horizontal)for(var Mt=l.alignmentConstraint.horizontal,et=function(vt){j.set("dummy"+vt,[]),Mt[vt].forEach(function(At){H.set(At,"dummy"+vt),j.get("dummy"+vt).push(At),G.has(At)&&ct.add("dummy"+vt)}),_.set("dummy"+vt,T[g.get(Mt[vt][0])])},Nt=0;Nt<Mt.length;Nt++)et(Nt)}var st=new Map,nt=new Map,ht=function(vt){O.get(vt).forEach(function(At){var qt=void 0,$t=void 0;At.direction=="horizontal"?(qt=D.get(vt)?D.get(vt):vt,D.get(At.id)?$t={id:D.get(At.id),gap:At.gap,direction:At.direction}:$t=At,st.has(qt)?st.get(qt).push($t):st.set(qt,[$t]),st.has($t.id)||st.set($t.id,[])):(qt=H.get(vt)?H.get(vt):vt,H.get(At.id)?$t={id:H.get(At.id),gap:At.gap,direction:At.direction}:$t=At,nt.has(qt)?nt.get(qt).push($t):nt.set(qt,[$t]),nt.has($t.id)||nt.set($t.id,[]))})},yt=!0,ut=!1,Rt=void 0;try{for(var It=O.keys()[Symbol.iterator](),bt;!(yt=(bt=It.next()).done);yt=!0){var Ot=bt.value;ht(Ot)}}catch(Pt){ut=!0,Rt=Pt}finally{try{!yt&&It.return&&It.return()}finally{if(ut)throw Rt}}var Tt=m(st),Xt=m(nt),St=o(Tt),Ut=o(Xt),Kt=u(st),le=u(nt),Jt=[],_t=[];St.forEach(function(Pt,vt){Jt[vt]=[],Pt.forEach(function(At){Kt.get(At).length==0&&Jt[vt].push(At)})}),Ut.forEach(function(Pt,vt){_t[vt]=[],Pt.forEach(function(At){le.get(At).length==0&&_t[vt].push(At)})});var jt=x(st,"horizontal",pt,Z,Jt),Qt=x(nt,"vertical",ct,_,_t),oe=function(vt){$.get(vt)?$.get(vt).forEach(function(At){c[g.get(At)]=jt.get(vt)}):c[g.get(vt)]=jt.get(vt)},te=!0,ee=!1,Ee=void 0;try{for(var fe=jt.keys()[Symbol.iterator](),Te;!(te=(Te=fe.next()).done);te=!0){var ce=Te.value;oe(ce)}}catch(Pt){ee=!0,Ee=Pt}finally{try{!te&&fe.return&&fe.return()}finally{if(ee)throw Ee}}var We=function(vt){j.get(vt)?j.get(vt).forEach(function(At){T[g.get(At)]=Qt.get(vt)}):T[g.get(vt)]=Qt.get(vt)},ge=!0,Ne=!1,Le=void 0;try{for(var ue=Qt.keys()[Symbol.iterator](),we;!(ge=(we=ue.next()).done);ge=!0){var ce=we.value;We(ce)}}catch(Pt){Ne=!0,Le=Pt}finally{try{!ge&&ue.return&&ue.return()}finally{if(Ne)throw Le}}})()}for(var Ct=0;Ct<A.length;Ct++){var gt=A[Ct];gt.getChild()==null&>.setCenter(c[g.get(gt.id)],T[g.get(gt.id)])}},s.exports=i}),551:(s=>{s.exports=w})},N={};function v(s){var n=N[s];if(n!==void 0)return n.exports;var t=N[s]={exports:{}};return U[s](t,t.exports,v),t.exports}return v(45)})()})})),ke=he.__commonJSMin(((L,F)=>{(function(U,N){typeof L=="object"&&typeof F=="object"?F.exports=N(Ae()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof L=="object"?L.cytoscapeFcose=N(Ae()):U.cytoscapeFcose=N(U.coseBase)})(L,function(w){return(()=>{"use strict";var U={658:(s=>{s.exports=Object.assign!=null?Object.assign.bind(Object):function(n){for(var t=arguments.length,a=Array(t>1?t-1:0),h=1;h<t;h++)a[h-1]=arguments[h];return a.forEach(function(e){Object.keys(e).forEach(function(d){return n[d]=e[d]})}),n}}),548:((s,n,t)=>{var a=(function(){function d(r,i){var f=[],l=!0,p=!1,g=void 0;try{for(var c=r[Symbol.iterator](),T;!(l=(T=c.next()).done)&&(f.push(T.value),!(i&&f.length===i));l=!0);}catch(A){p=!0,g=A}finally{try{!l&&c.return&&c.return()}finally{if(p)throw g}}return f}return function(r,i){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return d(r,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=t(140).layoutBase.LinkedList,e={};e.getTopMostNodes=function(d){for(var r={},i=0;i<d.length;i++)r[d[i].id()]=!0;return d.filter(function(f,l){typeof f=="number"&&(f=l);for(var p=f.parent()[0];p!=null;){if(r[p.id()])return!1;p=p.parent()[0]}return!0})},e.connectComponents=function(d,r,i,f){var l=new h,p=new Set,g=[],c=void 0,T=void 0,A=void 0,I=!1,S=1,Y=[],W=[],z=function(){var tt=d.collection();W.push(tt);var o=i[0],m=d.collection();m.merge(o).merge(o.descendants().intersection(r)),g.push(o),m.forEach(function(y){l.push(y),p.add(y),tt.merge(y)});for(var u=function(){o=l.shift();var C=d.collection();o.neighborhood().nodes().forEach(function(O){r.intersection(o.edgesWith(O)).length>0&&C.merge(O)});for(var M=0;M<C.length;M++){var G=C[M];c=i.intersection(G.union(G.ancestors())),c!=null&&!p.has(c[0])&&c.union(c.descendants()).forEach(function(O){l.push(O),p.add(O),tt.merge(O),i.has(O)&&g.push(O)})}};l.length!=0;)u();if(tt.forEach(function(y){r.intersection(y.connectedEdges()).forEach(function(C){tt.has(C.source())&&tt.has(C.target())&&tt.merge(C)})}),g.length==i.length&&(I=!0),!I||I&&S>1){T=g[0],A=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<A&&(A=y.connectedEdges().length,T=y)}),Y.push(T.id());var E=d.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],i=i.difference(E),S++}};do z();while(!I);return f&&Y.length>0&&f.set("dummy"+(f.size+1),Y),W},e.relocateComponent=function(d,r,i){if(!i.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(i.quality=="draft"){var c=!0,T=!1,A=void 0;try{for(var I=r.nodeIndexes[Symbol.iterator](),S;!(c=(S=I.next()).done);c=!0){var Y=S.value,W=a(Y,2),z=W[0],x=W[1],tt=i.cy.getElementById(z);if(tt){var o=tt.boundingBox(),m=r.xCoords[x]-o.w/2,u=r.xCoords[x]+o.w/2,E=r.yCoords[x]-o.h/2,y=r.yCoords[x]+o.h/2;m<f&&(f=m),u>l&&(l=u),E<p&&(p=E),y>g&&(g=y)}}}catch(R){T=!0,A=R}finally{try{!c&&I.return&&I.return()}finally{if(T)throw A}}var C=d.x-(l+f)/2,M=d.y-(g+p)/2;r.xCoords=r.xCoords.map(function(R){return R+C}),r.yCoords=r.yCoords.map(function(R){return R+M})}else{Object.keys(r).forEach(function(R){var V=r[R],B=V.getRect().x,rt=V.getRect().x+V.getRect().width,K=V.getRect().y,P=V.getRect().y+V.getRect().height;B<f&&(f=B),rt>l&&(l=rt),K<p&&(p=K),P>g&&(g=P)});var G=d.x-(l+f)/2,O=d.y-(g+p)/2;Object.keys(r).forEach(function(R){var V=r[R];V.setCenter(V.getCenterX()+G,V.getCenterY()+O)})}}},e.calcBoundingBox=function(d,r,i,f){for(var l=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,T=void 0,A=void 0,I=void 0,S=void 0,Y=d.descendants().not(":parent"),W=Y.length,z=0;z<W;z++){var x=Y[z];T=r[f.get(x.id())]-x.width()/2,A=r[f.get(x.id())]+x.width()/2,I=i[f.get(x.id())]-x.height()/2,S=i[f.get(x.id())]+x.height()/2,l>T&&(l=T),p<A&&(p=A),g>I&&(g=I),c<S&&(c=S)}var tt={};return tt.topLeftX=l,tt.topLeftY=g,tt.width=p-l,tt.height=c-g,tt},e.calcParentsWithoutChildren=function(d,r){var i=d.collection();return r.nodes(":parent").forEach(function(f){var l=!1;f.children().forEach(function(p){p.css("display")!="none"&&(l=!0)}),l||i.merge(f)}),i},s.exports=e}),816:((s,n,t)=>{var a=t(548),h=t(140).CoSELayout,e=t(140).CoSENode,d=t(140).layoutBase.PointD,r=t(140).layoutBase.DimensionD,i=t(140).layoutBase.LayoutConstants,f=t(140).layoutBase.FDLayoutConstants,l=t(140).CoSEConstants;s.exports={coseLayout:function(g,c){var T=g.cy,A=g.eles,I=A.nodes(),S=A.edges(),Y=void 0,W=void 0,z=void 0,x={};g.randomize&&(Y=c.nodeIndexes,W=c.xCoords,z=c.yCoords);var tt=function(O){return typeof O=="function"},o=function(O,R){return tt(O)?O(R):O},m=a.calcParentsWithoutChildren(T,A),u=function G(O,R,V,B){for(var rt=R.length,K=0;K<rt;K++){var P=R[K],b=null;P.intersection(m).length==0&&(b=P.children());var X=void 0,Q=P.layoutDimensions({nodeDimensionsIncludeLabels:B.nodeDimensionsIncludeLabels});if(P.outerWidth()!=null&&P.outerHeight()!=null)if(B.randomize)if(!P.isParent())X=O.add(new e(V.graphManager,new d(W[Y.get(P.id())]-Q.w/2,z[Y.get(P.id())]-Q.h/2),new r(parseFloat(Q.w),parseFloat(Q.h))));else{var at=a.calcBoundingBox(P,W,z,Y);P.intersection(m).length==0?X=O.add(new e(V.graphManager,new d(at.topLeftX,at.topLeftY),new r(at.width,at.height))):X=O.add(new e(V.graphManager,new d(at.topLeftX,at.topLeftY),new r(parseFloat(Q.w),parseFloat(Q.h))))}else X=O.add(new e(V.graphManager,new d(P.position("x")-Q.w/2,P.position("y")-Q.h/2),new r(parseFloat(Q.w),parseFloat(Q.h))));else X=O.add(new e(this.graphManager));if(X.id=P.data("id"),X.nodeRepulsion=o(B.nodeRepulsion,P),X.paddingLeft=parseInt(P.css("padding")),X.paddingTop=parseInt(P.css("padding")),X.paddingRight=parseInt(P.css("padding")),X.paddingBottom=parseInt(P.css("padding")),B.nodeDimensionsIncludeLabels&&(X.labelWidth=P.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=P.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=P.css("text-valign"),X.labelPosHorizontal=P.css("text-halign")),x[P.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),b!=null&&b.length>0){var J=void 0;J=V.getGraphManager().add(V.newGraph(),X),G(J,b,V,B)}}},E=function(O,R,V){for(var B=0,rt=0,K=0;K<V.length;K++){var P=V[K],b=x[P.data("source")],X=x[P.data("target")];if(b&&X&&b!==X&&b.getEdgesBetween(X).length==0){var Q=R.add(O.newEdge(),b,X);Q.id=P.id(),Q.idealLength=o(g.idealEdgeLength,P),Q.edgeElasticity=o(g.edgeElasticity,P),B+=Q.idealLength,rt++}}g.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=B/rt:tt(g.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=g.idealEdgeLength,l.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)},y=function(O,R){R.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=R.fixedNodeConstraint),R.alignmentConstraint&&(O.constraints.alignmentConstraint=R.alignmentConstraint),R.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=R.relativePlacementConstraint)};g.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(l.MAX_ITERATIONS=f.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=g.tilingCompareBy),g.quality=="proof"?i.QUALITY=2:i.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!g.randomize,l.ANIMATE=f.ANIMATE=i.ANIMATE=g.animate,l.TILE=g.tile,l.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!g.randomize,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=g.uniformNodeDimensions,g.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),g.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),g.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),g.step=="all"&&(g.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var C=new h,M=C.newGraphManager();return u(M.addRoot(),a.getTopMostNodes(I),C,g),E(C,M,S),y(C,g),C.runLayout(),x}}}),212:((s,n,t)=>{var a=(function(){function l(p,g){for(var c=0;c<g.length;c++){var T=g[c];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(p,T.key,T)}}return function(p,g,c){return g&&l(p.prototype,g),c&&l(p,c),p}})();function h(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}var e=t(658),d=t(548),r=t(657).spectralLayout,i=t(816).coseLayout,f=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(p){return 4500},idealEdgeLength:function(p){return 50},edgeElasticity:function(p){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}});s.exports=(function(){function l(p){h(this,l),this.options=e({},f,p)}return a(l,[{key:"run",value:function(){var g=this,c=this.options,T=c.cy,A=c.eles,I=[],S=[],Y=void 0,W=[];c.fixedNodeConstraint&&(!Array.isArray(c.fixedNodeConstraint)||c.fixedNodeConstraint.length==0)&&(c.fixedNodeConstraint=void 0),c.alignmentConstraint&&(c.alignmentConstraint.vertical&&(!Array.isArray(c.alignmentConstraint.vertical)||c.alignmentConstraint.vertical.length==0)&&(c.alignmentConstraint.vertical=void 0),c.alignmentConstraint.horizontal&&(!Array.isArray(c.alignmentConstraint.horizontal)||c.alignmentConstraint.horizontal.length==0)&&(c.alignmentConstraint.horizontal=void 0)),c.relativePlacementConstraint&&(!Array.isArray(c.relativePlacementConstraint)||c.relativePlacementConstraint.length==0)&&(c.relativePlacementConstraint=void 0),(c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint)&&(c.tile=!1,c.packComponents=!1);var z=void 0,x=!1;if(T.layoutUtilities&&c.packComponents&&(z=T.layoutUtilities("get"),z||(z=T.layoutUtilities()),x=!0),A.nodes().length>0)if(x){var m=d.getTopMostNodes(c.eles.nodes());if(Y=d.connectComponents(T,c.eles,m),Y.forEach(function(J){var k=J.boundingBox();W.push({x:k.x1+k.w/2,y:k.y1+k.h/2})}),c.randomize&&Y.forEach(function(J){c.eles=J,I.push(r(c))}),c.quality=="default"||c.quality=="proof"){var u=T.collection();if(c.tile){var E=new Map,y=[],C=[],M=0,G={nodeIndexes:E,xCoords:y,yCoords:C},O=[];if(Y.forEach(function(J,k){J.edges().length==0&&(J.nodes().forEach(function(Et,ft){u.merge(J.nodes()[ft]),Et.isParent()||(G.nodeIndexes.set(J.nodes()[ft].id(),M++),G.xCoords.push(J.nodes()[0].position().x),G.yCoords.push(J.nodes()[0].position().y))}),O.push(k))}),u.length>1){var R=u.boundingBox();W.push({x:R.x1+R.w/2,y:R.y1+R.h/2}),Y.push(u),I.push(G);for(var V=O.length-1;V>=0;V--)Y.splice(O[V],1),I.splice(O[V],1),W.splice(O[V],1)}}Y.forEach(function(J,k){c.eles=J,S.push(i(c,I[k])),d.relocateComponent(W[k],S[k],c)})}else Y.forEach(function(J,k){d.relocateComponent(W[k],I[k],c)});var B=new Set;if(Y.length>1){var rt=[],K=A.filter(function(J){return J.css("display")=="none"});Y.forEach(function(J,k){var Et=void 0;if(c.quality=="draft"&&(Et=I[k].nodeIndexes),J.nodes().not(K).length>0){var ft={};ft.edges=[],ft.nodes=[];var q=void 0;J.nodes().not(K).forEach(function(mt){if(c.quality=="draft")if(!mt.isParent())q=Et.get(mt.id()),ft.nodes.push({x:I[k].xCoords[q]-mt.boundingbox().w/2,y:I[k].yCoords[q]-mt.boundingbox().h/2,width:mt.boundingbox().w,height:mt.boundingbox().h});else{var ot=d.calcBoundingBox(mt,I[k].xCoords,I[k].yCoords,Et);ft.nodes.push({x:ot.topLeftX,y:ot.topLeftY,width:ot.width,height:ot.height})}else S[k][mt.id()]&&ft.nodes.push({x:S[k][mt.id()].getLeft(),y:S[k][mt.id()].getTop(),width:S[k][mt.id()].getWidth(),height:S[k][mt.id()].getHeight()})}),J.edges().forEach(function(mt){var ot=mt.source(),wt=mt.target();if(ot.css("display")!="none"&&wt.css("display")!="none")if(c.quality=="draft"){var Vt=Et.get(ot.id()),Dt=Et.get(wt.id()),xt=[],Gt=[];if(ot.isParent()){var zt=d.calcBoundingBox(ot,I[k].xCoords,I[k].yCoords,Et);xt.push(zt.topLeftX+zt.width/2),xt.push(zt.topLeftY+zt.height/2)}else xt.push(I[k].xCoords[Vt]),xt.push(I[k].yCoords[Vt]);if(wt.isParent()){var Ft=d.calcBoundingBox(wt,I[k].xCoords,I[k].yCoords,Et);Gt.push(Ft.topLeftX+Ft.width/2),Gt.push(Ft.topLeftY+Ft.height/2)}else Gt.push(I[k].xCoords[Dt]),Gt.push(I[k].yCoords[Dt]);ft.edges.push({startX:xt[0],startY:xt[1],endX:Gt[0],endY:Gt[1]})}else S[k][ot.id()]&&S[k][wt.id()]&&ft.edges.push({startX:S[k][ot.id()].getCenterX(),startY:S[k][ot.id()].getCenterY(),endX:S[k][wt.id()].getCenterX(),endY:S[k][wt.id()].getCenterY()})}),ft.nodes.length>0&&(rt.push(ft),B.add(k))}});var P=z.packComponents(rt,c.randomize).shifts;if(c.quality=="draft")I.forEach(function(J,k){var Et=J.xCoords.map(function(q){return q+P[k].dx}),ft=J.yCoords.map(function(q){return q+P[k].dy});J.xCoords=Et,J.yCoords=ft});else{var b=0;B.forEach(function(J){Object.keys(S[J]).forEach(function(k){var Et=S[J][k];Et.setCenter(Et.getCenterX()+P[b].dx,Et.getCenterY()+P[b].dy)}),b++})}}}else{var tt=c.eles.boundingBox();if(W.push({x:tt.x1+tt.w/2,y:tt.y1+tt.h/2}),c.randomize){var o=r(c);I.push(o)}c.quality=="default"||c.quality=="proof"?(S.push(i(c,I[0])),d.relocateComponent(W[0],S[0],c)):d.relocateComponent(W[0],I[0],c)}var X=function(k,Et){if(c.quality=="default"||c.quality=="proof"){typeof k=="number"&&(k=Et);var ft=void 0,q=void 0,mt=k.data("id");return S.forEach(function(wt){mt in wt&&(ft={x:wt[mt].getRect().getCenterX(),y:wt[mt].getRect().getCenterY()},q=wt[mt])}),c.nodeDimensionsIncludeLabels&&(q.labelWidth&&(q.labelPosHorizontal=="left"?ft.x+=q.labelWidth/2:q.labelPosHorizontal=="right"&&(ft.x-=q.labelWidth/2)),q.labelHeight&&(q.labelPosVertical=="top"?ft.y+=q.labelHeight/2:q.labelPosVertical=="bottom"&&(ft.y-=q.labelHeight/2))),ft==null&&(ft={x:k.position("x"),y:k.position("y")}),{x:ft.x,y:ft.y}}else{var ot=void 0;return I.forEach(function(wt){var Vt=wt.nodeIndexes.get(k.id());Vt!=null&&(ot={x:wt.xCoords[Vt],y:wt.yCoords[Vt]})}),ot==null&&(ot={x:k.position("x"),y:k.position("y")}),{x:ot.x,y:ot.y}}};if(c.quality=="default"||c.quality=="proof"||c.randomize){var Q=d.calcParentsWithoutChildren(T,A),at=A.filter(function(J){return J.css("display")=="none"});c.eles=A.not(at),A.nodes().not(":parent").not(at).layoutPositions(g,c,X),Q.length>0&&Q.forEach(function(J){J.position(X(J))})}}}]),l})()}),657:((s,n,t)=>{var a=t(548),h=t(140).layoutBase.Matrix,e=t(140).layoutBase.SVD;s.exports={spectralLayout:function(r){var i=r.cy,f=r.eles,l=f.nodes(),p=f.nodes(":parent"),g=new Map,c=new Map,T=new Map,A=[],I=[],S=[],Y=[],W=[],z=[],x=[],tt=[],o=void 0,m=1e8,u=1e-9,E=r.piTol,y=r.samplingType,C=r.nodeSeparation,M=void 0,G=function(){for(var gt=0,D=0,H=!1;D<M;){gt=Math.floor(Math.random()*o),H=!1;for(var $=0;$<D;$++)if(Y[$]==gt){H=!0;break}if(!H)Y[D]=gt,D++;else continue}},O=function(gt,D,H){for(var $=[],j=0,Z=0,_=0,pt=void 0,ct=[],it=0,dt=1,Lt=0;Lt<o;Lt++)ct[Lt]=m;for($[Z]=gt,ct[gt]=0;Z>=j;){_=$[j++];for(var Mt=A[_],et=0;et<Mt.length;et++)pt=c.get(Mt[et]),ct[pt]==m&&(ct[pt]=ct[_]+1,$[++Z]=pt);z[_][D]=ct[_]*C}if(H){for(var Nt=0;Nt<o;Nt++)z[Nt][D]<W[Nt]&&(W[Nt]=z[Nt][D]);for(var st=0;st<o;st++)W[st]>it&&(it=W[st],dt=st)}return dt},R=function(gt){var D=void 0;if(gt){D=Math.floor(Math.random()*o);for(var $=0;$<o;$++)W[$]=m;for(var j=0;j<M;j++)Y[j]=D,D=O(D,j,gt)}else{G();for(var H=0;H<M;H++)O(Y[H],H,gt,!1)}for(var Z=0;Z<o;Z++)for(var _=0;_<M;_++)z[Z][_]*=z[Z][_];for(var pt=0;pt<M;pt++)x[pt]=[];for(var ct=0;ct<M;ct++)for(var it=0;it<M;it++)x[ct][it]=z[Y[it]][ct]},V=function(){for(var gt=e.svd(x),D=gt.S,H=gt.U,$=gt.V,j=D[0]*D[0]*D[0],Z=[],_=0;_<M;_++){Z[_]=[];for(var pt=0;pt<M;pt++)Z[_][pt]=0,_==pt&&(Z[_][pt]=D[_]/(D[_]*D[_]+j/(D[_]*D[_])))}tt=h.multMat(h.multMat($,Z),h.transpose(H))},B=function(){for(var gt=void 0,D=void 0,H=[],$=[],j=[],Z=[],_=0;_<o;_++)H[_]=Math.random(),$[_]=Math.random();H=h.normalize(H),$=h.normalize($);for(var pt=0,ct=u,it=u,dt=void 0;;){pt++;for(var Lt=0;Lt<o;Lt++)j[Lt]=H[Lt];if(H=h.multGamma(h.multL(h.multGamma(j),z,tt)),gt=h.dotProduct(j,H),H=h.normalize(H),ct=h.dotProduct(j,H),dt=Math.abs(ct/it),dt<=1+E&&dt>=1)break;it=ct}for(var Mt=0;Mt<o;Mt++)j[Mt]=H[Mt];for(pt=0,it=u;;){pt++;for(var et=0;et<o;et++)Z[et]=$[et];if(Z=h.minusOp(Z,h.multCons(j,h.dotProduct(j,Z))),$=h.multGamma(h.multL(h.multGamma(Z),z,tt)),D=h.dotProduct(Z,$),$=h.normalize($),ct=h.dotProduct(Z,$),dt=Math.abs(ct/it),dt<=1+E&&dt>=1)break;it=ct}for(var Nt=0;Nt<o;Nt++)Z[Nt]=$[Nt];I=h.multCons(j,Math.sqrt(Math.abs(gt))),S=h.multCons(Z,Math.sqrt(Math.abs(D)))};a.connectComponents(i,f,a.getTopMostNodes(l),g),p.forEach(function(Ct){a.connectComponents(i,f,a.getTopMostNodes(Ct.descendants().intersection(f)),g)});for(var rt=0,K=0;K<l.length;K++)l[K].isParent()||c.set(l[K].id(),rt++);var P=!0,b=!1,X=void 0;try{for(var Q=g.keys()[Symbol.iterator](),at;!(P=(at=Q.next()).done);P=!0){var J=at.value;c.set(J,rt++)}}catch(Ct){b=!0,X=Ct}finally{try{!P&&Q.return&&Q.return()}finally{if(b)throw X}}for(var k=0;k<c.size;k++)A[k]=[];p.forEach(function(Ct){for(var gt=Ct.children().intersection(f);gt.nodes(":childless").length==0;)gt=gt.nodes()[0].children().intersection(f);var D=0,H=gt.nodes(":childless")[0].connectedEdges().length;gt.nodes(":childless").forEach(function($,j){$.connectedEdges().length<H&&(H=$.connectedEdges().length,D=j)}),T.set(Ct.id(),gt.nodes(":childless")[D].id())}),l.forEach(function(Ct){var gt=void 0;Ct.isParent()?gt=c.get(T.get(Ct.id())):gt=c.get(Ct.id()),Ct.neighborhood().nodes().forEach(function(D){f.intersection(Ct.edgesWith(D)).length>0&&(D.isParent()?A[gt].push(T.get(D.id())):A[gt].push(D.id()))})});var Et=function(gt){var D=c.get(gt),H=void 0;g.get(gt).forEach(function($){i.getElementById($).isParent()?H=T.get($):H=$,A[D].push(H),A[c.get(H)].push(gt)})},ft=!0,q=!1,mt=void 0;try{for(var ot=g.keys()[Symbol.iterator](),wt;!(ft=(wt=ot.next()).done);ft=!0){var Vt=wt.value;Et(Vt)}}catch(Ct){q=!0,mt=Ct}finally{try{!ft&&ot.return&&ot.return()}finally{if(q)throw mt}}o=c.size;var Dt=void 0;if(o>2){M=o<r.sampleSize?o:r.sampleSize;for(var xt=0;xt<o;xt++)z[xt]=[];for(var Gt=0;Gt<M;Gt++)tt[Gt]=[];return r.quality=="draft"||r.step=="all"?(R(y),V(),B(),Dt={nodeIndexes:c,xCoords:I,yCoords:S}):(c.forEach(function(Ct,gt){I.push(i.getElementById(gt).position("x")),S.push(i.getElementById(gt).position("y"))}),Dt={nodeIndexes:c,xCoords:I,yCoords:S}),Dt}else{var zt=c.keys(),Ft=i.getElementById(zt.next().value),Bt=Ft.position(),Yt=Ft.outerWidth();if(I.push(Bt.x),S.push(Bt.y),o==2){var kt=i.getElementById(zt.next().value).outerWidth();I.push(Bt.x+Yt/2+kt/2+r.idealEdgeLength),S.push(Bt.y)}return Dt={nodeIndexes:c,xCoords:I,yCoords:S},Dt}}}}),579:((s,n,t)=>{var a=t(212),h=function(d){d&&d("layout","fcose",a)};typeof cytoscape<"u"&&h(cytoscape),s.exports=h}),140:(s=>{s.exports=w})},N={};function v(s){var n=N[s];if(n!==void 0)return n.exports;var t=N[s]={exports:{}};return U[s](t,t.exports,v),t.exports}return v(579)})()})})),qe=he.__toESM(ke(),1),Me={L:"left",R:"right",T:"top",B:"bottom"},Oe={L:lt.__name(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:lt.__name(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:lt.__name(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:lt.__name(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},se={L:lt.__name((L,F)=>L-F+2,"L"),R:lt.__name((L,F)=>L-2,"R"),T:lt.__name((L,F)=>L-F+2,"T"),B:lt.__name((L,F)=>L-2,"B")},Ze=lt.__name(function(L){return Ht(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),De=lt.__name(function(L){const F=L;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Ht=lt.__name(function(L){const F=L;return F==="L"||F==="R"},"isArchitectureDirectionX"),Zt=lt.__name(function(L){const F=L;return F==="T"||F==="B"},"isArchitectureDirectionY"),me=lt.__name(function(L,F){const w=Ht(L)&&Zt(F),U=Zt(L)&&Ht(F);return w||U},"isArchitectureDirectionXY"),Je=lt.__name(function(L){const F=L[0],w=L[1],U=Ht(F)&&Zt(w),N=Zt(F)&&Ht(w);return U||N},"isArchitecturePairXY"),Qe=lt.__name(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),ve=lt.__name(function(L,F){const w=`${L}${F}`;return Qe(w)?w:void 0},"getArchitectureDirectionPair"),Ke=lt.__name(function([L,F],w){const U=w[0],N=w[1];return Ht(U)?Zt(N)?[L+(U==="L"?-1:1),F+(N==="T"?1:-1)]:[L+(U==="L"?-1:1),F]:Ht(N)?[L+(N==="L"?1:-1),F+(U==="T"?1:-1)]:[L,F+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),_e=lt.__name(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),je=lt.__name(function(L,F){return me(L,F)?"bend":Ht(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),tr=lt.__name(function(L){return L.type==="service"},"isArchitectureService"),er=lt.__name(function(L){return L.type==="junction"},"isArchitectureJunction"),Re=lt.__name(L=>L.data(),"edgeData"),ie=lt.__name(L=>L.data(),"nodeData"),rr=Wt.defaultConfig_default.architecture,Se=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Wt.setAccTitle,this.getAccTitle=Wt.getAccTitle,this.setDiagramTitle=Wt.setDiagramTitle,this.getDiagramTitle=Wt.getDiagramTitle,this.getAccDescription=Wt.getAccDescription,this.setAccDescription=Wt.setAccDescription,this.clear()}static{lt.__name(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Wt.clear()}addService({id:L,icon:F,in:w,title:U,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(w!==void 0){if(L===w)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:F,iconText:N,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(tr)}addJunction({id:L,in:F}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(F!==void 0){if(L===F)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[F]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[F]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:F}}getJunctions(){return Object.values(this.nodes).filter(er)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:F,in:w,title:U}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(w!==void 0){if(L===w)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:F,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:F,lhsDir:w,rhsDir:U,lhsInto:N,rhsInto:v,lhsGroup:s,rhsGroup:n,title:t}){if(!De(w))throw new Error(`Invalid direction given for left hand side of edge ${L}--${F}. Expected (L,R,T,B) got ${String(w)}`);if(!De(U))throw new Error(`Invalid direction given for right hand side of edge ${L}--${F}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[F]===void 0&&this.groups[F]===void 0)throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,h=this.nodes[F].in;if(s&&a&&h&&a==h)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&a&&h&&a==h)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:w,lhsInto:N,lhsGroup:s,rhsId:F,rhsDir:U,rhsInto:v,rhsGroup:n,title:t};this.edges.push(e),this.nodes[L]&&this.nodes[F]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[F].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const F=new Set;L.members.forEach(w=>{if(this.registeredIds[w]!=="node")throw new Error(`align ${L.direction} references [${w}], which is not a service or junction`);if(F.has(w))throw new Error(`align ${L.direction} lists [${w}] more than once`);F.add(w)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},F=Object.entries(this.nodes).reduce((n,[t,a])=>(n[t]=a.edges.reduce((h,e)=>{const d=this.getNode(e.lhsId)?.in,r=this.getNode(e.rhsId)?.in;if(d&&r&&d!==r){const i=je(e.lhsDir,e.rhsDir);i!=="bend"&&(L[d]??={},L[d][r]=i,L[r]??={},L[r][d]=i)}if(e.lhsId===t){const i=ve(e.lhsDir,e.rhsDir);i&&(h[i]=e.rhsId)}else{const i=ve(e.rhsDir,e.lhsDir);i&&(h[i]=e.lhsId)}return h},{}),n),{}),w=Object.keys(F)[0],U={[w]:1},N=Object.keys(F).reduce((n,t)=>t===w?n:{...n,[t]:1},{}),v=lt.__name(n=>{const t={[n]:[0,0]},a=[n];for(;a.length>0;){const h=a.shift();if(h){U[h]=1,delete N[h];const e=F[h],[d,r]=t[h];Object.entries(e).forEach(([i,f])=>{U[f]||(t[f]=Ke([d,r],i),a.push(f))})}}return t},"BFS"),s=[v(w)];for(;Object.keys(N).length>0;)s.push(v(Object.keys(N)[0]));this.dataStructures={adjList:F,spatialMaps:s,groupAlignments:L}}return this.dataStructures}setElementForId(L,F){this.elements[L]=F}getElementById(L){return this.elements[L]}getConfig(){return xe.cleanAndMerge({...rr,...Wt.getConfig().architecture})}getConfigField(L){return this.getConfig()[L]}},ir=lt.__name((L,F)=>{Be.populateCommonDb(L,F),L.groups.map(w=>F.addGroup(w)),L.services.map(w=>F.addService({...w,type:"service"})),L.junctions.map(w=>F.addJunction({...w,type:"junction"})),L.edges.map(w=>F.addEdge(w)),L.alignments?.map(w=>F.addLayoutHint({direction:w.direction,members:[...w.members]}))},"populateDb"),Fe={parser:{yy:void 0},parse:lt.__name(async L=>{const F=await ze.parse("architecture",L);de.log.debug(F);const w=Fe.parser?.yy;if(!(w instanceof Se))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");ir(F,w)},"parse")},ar=lt.__name(L=>`
|
|
1
|
+
const he=require("./rolldown-runtime-CAnuVJ4g.cjs"),lt=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),de=require("./src-C9EhKhbk.cjs"),Wt=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),xe=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),ze=require("./chunk-VAUOI2AC-DfQf5L2_.cjs"),$e=require("./chunk-JWPE2WC7-D8EnWK1B.cjs"),Be=require("./mermaid-parser.core-BgDzuhyE.cjs"),ae=require("./chunk-HOUHSVGY-BGB3dOvI.cjs"),ye=require("./chunk-Q4XR5HBZ-aBnPq509.cjs"),Ie=require("./cytoscape.esm-pygMw4dR.cjs");var Ce=he.__commonJSMin(((L,F)=>{(function(U,N){typeof L=="object"&&typeof F=="object"?F.exports=N():typeof define=="function"&&define.amd?define([],N):typeof L=="object"?L.layoutBase=N():U.layoutBase=N()})(L,function(){return(function(w){var U={};function N(v){if(U[v])return U[v].exports;var s=U[v]={i:v,l:!1,exports:{}};return w[v].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return N.m=w,N.c=U,N.i=function(v){return v},N.d=function(v,s,n){N.o(v,s)||Object.defineProperty(v,s,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var s=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(s,"a",s),s},N.o=function(v,s){return Object.prototype.hasOwnProperty.call(v,s)},N.p="",N(N.s=28)})([(function(w,U,N){"use strict";function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,w.exports=v}),(function(w,U,N){"use strict";var v=N(2),s=N(8),n=N(9);function t(h,e,d){v.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=h,this.target=e}t.prototype=Object.create(v.prototype);for(var a in v)t[a]=v[a];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.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"},t.prototype.getOtherEndInGraph=function(h,e){for(var d=this.getOtherEnd(h),r=e.getGraphManager().getRoot();;){if(d.getOwner()==e)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},t.prototype.updateLength=function(){var h=new Array(4);this.isOverlapingSourceAndTarget=s.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=t}),(function(w,U,N){"use strict";function v(s){this.vGraphObject=s}w.exports=v}),(function(w,U,N){"use strict";var v=N(2),s=N(10),n=N(13),t=N(0),a=N(16),h=N(5);function e(r,i,f,l){f==null&&l==null&&(l=i),v.call(this,l),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=r,f!=null&&i!=null?this.rect=new n(i.x,i.y,f.width,f.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var d in v)e[d]=v[d];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(r){this.rect.width=r},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(r){this.rect.height=r},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(r,i){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(r,i){this.rect.x=r-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(r,i){this.rect.x=r,this.rect.y=i},e.prototype.moveBy=function(r,i){this.rect.x+=r,this.rect.y+=i},e.prototype.getEdgeListToNode=function(r){var i=[],f=this;return f.edges.forEach(function(l){if(l.target==r){if(l.source!=f)throw"Incorrect edge source!";i.push(l)}}),i},e.prototype.getEdgesBetween=function(r){var i=[],f=this;return f.edges.forEach(function(l){if(!(l.source==f||l.target==f))throw"Incorrect edge source and/or target";(l.target==r||l.source==r)&&i.push(l)}),i},e.prototype.getNeighborsList=function(){var r=new Set,i=this;return i.edges.forEach(function(f){if(f.source==i)r.add(f.target);else{if(f.target!=i)throw"Incorrect incidency!";r.add(f.source)}}),r},e.prototype.withChildren=function(){var r=new Set,i,f;if(r.add(this),this.child!=null)for(var l=this.child.getNodes(),p=0;p<l.length;p++)i=l[p],f=i.withChildren(),f.forEach(function(g){r.add(g)});return r},e.prototype.getNoOfChildren=function(){var r=0,i;if(this.child==null)r=1;else for(var f=this.child.getNodes(),l=0;l<f.length;l++)i=f[l],r+=i.getNoOfChildren();return r==0&&(r=1),r},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var r,i,f=-t.INITIAL_WORLD_BOUNDARY,l=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_X+a.nextDouble()*(l-f)+f;var p=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;i=t.WORLD_CENTER_Y+a.nextDouble()*(g-p)+p,this.rect.x=r,this.rect.y=i},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var i=r.getRight()-r.getLeft(),f=r.getBottom()-r.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(i+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>i?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(f+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>f?(this.rect.y-=(this.labelHeight-f)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(f+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(r){var i=this.rect.x;i>t.WORLD_BOUNDARY?i=t.WORLD_BOUNDARY:i<-t.WORLD_BOUNDARY&&(i=-t.WORLD_BOUNDARY);var f=this.rect.y;f>t.WORLD_BOUNDARY?f=t.WORLD_BOUNDARY:f<-t.WORLD_BOUNDARY&&(f=-t.WORLD_BOUNDARY);var l=new h(i,f),p=r.inverseTransformPoint(l);this.setLocation(p.x,p.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=e}),(function(w,U,N){"use strict";var v=N(0);function s(){}for(var n in v)s[n]=v[n];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=s}),(function(w,U,N){"use strict";function v(s,n){s==null&&n==null?(this.x=0,this.y=0):(this.x=s,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(s){this.x=s},v.prototype.setY=function(s){this.y=s},v.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},w.exports=v}),(function(w,U,N){"use strict";var v=N(2),s=N(10),n=N(0),t=N(7),a=N(3),h=N(1),e=N(13),d=N(12),r=N(11);function i(l,p,g){v.call(this,g),this.estimatedSize=s.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=l,p!=null&&p instanceof t?this.graphManager=p:p!=null&&p instanceof Layout&&(this.graphManager=p.graphManager)}i.prototype=Object.create(v.prototype);for(var f in v)i[f]=v[f];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(l,p,g){if(p==null&&g==null){var c=l;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var T=l;if(!(this.getNodes().indexOf(p)>-1&&this.getNodes().indexOf(g)>-1))throw"Source or target not in graph!";if(!(p.owner==g.owner&&p.owner==this))throw"Both owners must be this graph!";return p.owner!=g.owner?null:(T.source=p,T.target=g,T.isInterGraph=!1,this.getEdges().push(T),p.edges.push(T),g!=p&&g.edges.push(T),T)}},i.prototype.remove=function(l){var p=l;if(l instanceof a){if(p==null)throw"Node is null!";if(!(p.owner!=null&&p.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var g=p.edges.slice(),c,T=g.length,A=0;A<T;A++)c=g[A],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var I=this.nodes.indexOf(p);if(I==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(l instanceof h){var c=l;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var S=c.source.edges.indexOf(c),Y=c.target.edges.indexOf(c);if(!(S>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(S,1),c.target!=c.source&&c.target.edges.splice(Y,1);var I=c.source.owner.getEdges().indexOf(c);if(I==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(I,1)}},i.prototype.updateLeftTop=function(){for(var l=s.MAX_VALUE,p=s.MAX_VALUE,g,c,T,A=this.getNodes(),I=A.length,S=0;S<I;S++){var Y=A[S];g=Y.getTop(),c=Y.getLeft(),l>g&&(l=g),p>c&&(p=c)}return l==s.MAX_VALUE?null:(A[0].getParent().paddingLeft!=null?T=A[0].getParent().paddingLeft:T=this.margin,this.left=p-T,this.top=l-T,new d(this.left,this.top))},i.prototype.updateBounds=function(l){for(var p=s.MAX_VALUE,g=-s.MAX_VALUE,c=s.MAX_VALUE,T=-s.MAX_VALUE,A,I,S,Y,W,z=this.nodes,x=z.length,tt=0;tt<x;tt++){var o=z[tt];l&&o.child!=null&&o.updateBounds(),A=o.getLeft(),I=o.getRight(),S=o.getTop(),Y=o.getBottom(),p>A&&(p=A),g<I&&(g=I),c>S&&(c=S),T<Y&&(T=Y)}var m=new e(p,c,g-p,T-c);p==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),z[0].getParent().paddingLeft!=null?W=z[0].getParent().paddingLeft:W=this.margin,this.left=m.x-W,this.right=m.x+m.width+W,this.top=m.y-W,this.bottom=m.y+m.height+W},i.calculateBounds=function(l){for(var p=s.MAX_VALUE,g=-s.MAX_VALUE,c=s.MAX_VALUE,T=-s.MAX_VALUE,A,I,S,Y,W=l.length,z=0;z<W;z++){var x=l[z];A=x.getLeft(),I=x.getRight(),S=x.getTop(),Y=x.getBottom(),p>A&&(p=A),g<I&&(g=I),c>S&&(c=S),T<Y&&(T=Y)}return new e(p,c,g-p,T-c)},i.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){for(var l=0,p=this.nodes,g=p.length,c=0;c<g;c++){var T=p[c];l+=T.calcEstimatedSize()}return l==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=l/Math.sqrt(this.nodes.length),this.estimatedSize},i.prototype.updateConnected=function(){var l=this;if(this.nodes.length==0){this.isConnected=!0;return}var p=new r,g=new Set,c=this.nodes[0],T,A;for(c.withChildren().forEach(function(W){p.push(W),g.add(W)});p.length!==0;){c=p.shift(),T=c.getEdges();for(var I=T.length,S=0;S<I;S++)A=T[S].getOtherEndInGraph(c,this),A!=null&&!g.has(A)&&A.withChildren().forEach(function(W){p.push(W),g.add(W)})}if(this.isConnected=!1,g.size>=this.nodes.length){var Y=0;g.forEach(function(W){W.owner==l&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}},w.exports=i}),(function(w,U,N){"use strict";var v,s=N(1);function n(t){v=N(6),this.layout=t,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var t=this.layout.newGraph(),a=this.layout.newNode(null),h=this.add(t,a);return this.setRootGraph(h),this.rootGraph},n.prototype.add=function(t,a,h,e,d){if(h==null&&e==null&&d==null){if(t==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),t.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return t.parent=a,a.child=t,t}else{d=h,e=a,h=t;var r=e.getOwner(),i=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==i)return h.isInterGraph=!1,r.add(h,e,d);if(h.isInterGraph=!0,h.source=e,h.target=d,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}},n.prototype.remove=function(t){if(t instanceof v){var a=t;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(a.getEdges());for(var e,d=h.length,r=0;r<d;r++)e=h[r],a.remove(e);var i=[];i=i.concat(a.getNodes());var f;d=i.length;for(var r=0;r<d;r++)f=i[r],a.remove(f);a==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(a);this.graphs.splice(l,1),a.parent=null}else if(t instanceof s){if(e=t,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var l=e.source.edges.indexOf(e);if(e.source.edges.splice(l,1),l=e.target.edges.indexOf(e),e.target.edges.splice(l,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var l=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(l,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],a=this.getGraphs(),h=a.length,e=0;e<h;e++)t=t.concat(a[e].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],a=this.getGraphs();a.length;for(var h=0;h<a.length;h++)t=t.concat(a[h].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,t.parent==null&&(t.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,a){if(!(t!=null&&a!=null))throw"assert failed";if(t==a)return!0;var h=t.getOwner(),e;do{if(e=h.getParent(),e==null)break;if(e==a)return!0;if(h=e.getOwner(),h==null)break}while(!0);h=a.getOwner();do{if(e=h.getParent(),e==null)break;if(e==t)return!0;if(h=e.getOwner(),h==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,a,h,e,d,r=this.getAllEdges(),i=r.length,f=0;f<i;f++){if(t=r[f],a=t.source,h=t.target,t.lca=null,t.sourceInLca=a,t.targetInLca=h,a==h){t.lca=a.getOwner();continue}for(e=a.getOwner();t.lca==null;){for(t.targetInLca=h,d=h.getOwner();t.lca==null;){if(d==e){t.lca=d;break}if(d==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=d.getParent(),d=t.targetInLca.getOwner()}if(e==this.rootGraph)break;t.lca==null&&(t.sourceInLca=e.getParent(),e=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,a){if(t==a)return t.getOwner();var h=t.getOwner();do{if(h==null)break;var e=a.getOwner();do{if(e==null)break;if(e==h)return e;e=e.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},n.prototype.calcInclusionTreeDepths=function(t,a){t==null&&a==null&&(t=this.rootGraph,a=1);for(var h,e=t.getNodes(),d=e.length,r=0;r<d;r++)h=e[r],h.inclusionTreeDepth=a,h.child!=null&&this.calcInclusionTreeDepths(h.child,a+1)},n.prototype.includesInvalidEdge=function(){for(var t,a=[],h=this.edges.length,e=0;e<h;e++)t=this.edges[e],this.isOneAncestorOfOther(t.source,t.target)&&a.push(t);for(var e=0;e<a.length;e++)this.remove(a[e]);return!1},w.exports=n}),(function(w,U,N){"use strict";var v=N(12);function s(){}s.calcSeparationAmount=function(n,t,a,h){if(!n.intersects(t))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(n,t,e),a[0]=Math.min(n.getRight(),t.getRight())-Math.max(n.x,t.x),a[1]=Math.min(n.getBottom(),t.getBottom())-Math.max(n.y,t.y),n.getX()<=t.getX()&&n.getRight()>=t.getRight()?a[0]+=Math.min(t.getX()-n.getX(),n.getRight()-t.getRight()):t.getX()<=n.getX()&&t.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-t.getX(),t.getRight()-n.getRight())),n.getY()<=t.getY()&&n.getBottom()>=t.getBottom()?a[1]+=Math.min(t.getY()-n.getY(),n.getBottom()-t.getBottom()):t.getY()<=n.getY()&&t.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-t.getY(),t.getBottom()-n.getBottom()));var d=Math.abs((t.getCenterY()-n.getCenterY())/(t.getCenterX()-n.getCenterX()));t.getCenterY()===n.getCenterY()&&t.getCenterX()===n.getCenterX()&&(d=1);var r=d*a[0],i=a[1]/d;a[0]<i?i=a[0]:r=a[1],a[0]=-1*e[0]*(i/2+h),a[1]=-1*e[1]*(r/2+h)},s.decideDirectionsForOverlappingNodes=function(n,t,a){n.getCenterX()<t.getCenterX()?a[0]=-1:a[0]=1,n.getCenterY()<t.getCenterY()?a[1]=-1:a[1]=1},s.getIntersection2=function(n,t,a){var h=n.getCenterX(),e=n.getCenterY(),d=t.getCenterX(),r=t.getCenterY();if(n.intersects(t))return a[0]=h,a[1]=e,a[2]=d,a[3]=r,!0;var i=n.getX(),f=n.getY(),l=n.getRight(),p=n.getX(),g=n.getBottom(),c=n.getRight(),T=n.getWidthHalf(),A=n.getHeightHalf(),I=t.getX(),S=t.getY(),Y=t.getRight(),W=t.getX(),z=t.getBottom(),x=t.getRight(),tt=t.getWidthHalf(),o=t.getHeightHalf(),m=!1,u=!1;if(h===d){if(e>r)return a[0]=h,a[1]=f,a[2]=d,a[3]=z,!1;if(e<r)return a[0]=h,a[1]=g,a[2]=d,a[3]=S,!1}else if(e===r){if(h>d)return a[0]=i,a[1]=e,a[2]=Y,a[3]=r,!1;if(h<d)return a[0]=l,a[1]=e,a[2]=I,a[3]=r,!1}else{var E=n.height/n.width,y=t.height/t.width,C=(r-e)/(d-h),M=void 0,G=void 0,O=void 0,R=void 0,V=void 0,B=void 0;if(-E===C?h>d?(a[0]=p,a[1]=g,m=!0):(a[0]=l,a[1]=f,m=!0):E===C&&(h>d?(a[0]=i,a[1]=f,m=!0):(a[0]=c,a[1]=g,m=!0)),-y===C?d>h?(a[2]=W,a[3]=z,u=!0):(a[2]=Y,a[3]=S,u=!0):y===C&&(d>h?(a[2]=I,a[3]=S,u=!0):(a[2]=x,a[3]=z,u=!0)),m&&u)return!1;if(h>d?e>r?(M=this.getCardinalDirection(E,C,4),G=this.getCardinalDirection(y,C,2)):(M=this.getCardinalDirection(-E,C,3),G=this.getCardinalDirection(-y,C,1)):e>r?(M=this.getCardinalDirection(-E,C,1),G=this.getCardinalDirection(-y,C,3)):(M=this.getCardinalDirection(E,C,2),G=this.getCardinalDirection(y,C,4)),!m)switch(M){case 1:R=f,O=h+-A/C,a[0]=O,a[1]=R;break;case 2:O=c,R=e+T*C,a[0]=O,a[1]=R;break;case 3:R=g,O=h+A/C,a[0]=O,a[1]=R;break;case 4:O=p,R=e+-T*C,a[0]=O,a[1]=R;break}if(!u)switch(G){case 1:B=S,V=d+-o/C,a[2]=V,a[3]=B;break;case 2:V=x,B=r+tt*C,a[2]=V,a[3]=B;break;case 3:B=z,V=d+o/C,a[2]=V,a[3]=B;break;case 4:V=W,B=r+-tt*C,a[2]=V,a[3]=B;break}}return!1},s.getCardinalDirection=function(n,t,a){return n>t?a:1+a%4},s.getIntersection=function(n,t,a,h){if(h==null)return this.getIntersection2(n,t,a);var e=n.x,d=n.y,r=t.x,i=t.y,f=a.x,l=a.y,p=h.x,g=h.y,c=void 0,T=void 0,A=void 0,I=void 0,S=void 0,Y=void 0,W=void 0,z=void 0,x=void 0;return A=i-d,S=e-r,W=r*d-e*i,I=g-l,Y=f-p,z=p*l-f*g,x=A*Y-I*S,x===0?null:(c=(S*z-Y*W)/x,T=(I*W-A*z)/x,new v(c,T))},s.angleOfVector=function(n,t,a,h){var e=void 0;return n!==a?(e=Math.atan((h-t)/(a-n)),a<n?e+=Math.PI:h<t&&(e+=this.TWO_PI)):h<t?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},s.doIntersect=function(n,t,a,h){var e=n.x,d=n.y,r=t.x,i=t.y,f=a.x,l=a.y,p=h.x,g=h.y,c=(r-e)*(g-l)-(p-f)*(i-d);if(c===0)return!1;var T=((g-l)*(p-e)+(f-p)*(g-d))/c,A=((d-i)*(p-e)+(r-e)*(g-d))/c;return 0<T&&T<1&&0<A&&A<1},s.findCircleLineIntersections=function(n,t,a,h,e,d,r){var i=(a-n)*(a-n)+(h-t)*(h-t),f=2*((n-e)*(a-n)+(t-d)*(h-t)),l=(n-e)*(n-e)+(t-d)*(t-d)-r*r;if(f*f-4*i*l>=0){var p=(-f+Math.sqrt(f*f-4*i*l))/(2*i),g=(-f-Math.sqrt(f*f-4*i*l))/(2*i),c=null;return p>=0&&p<=1?[p]:g>=0&&g<=1?[g]:c}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,w.exports=s}),(function(w,U,N){"use strict";function v(){}v.sign=function(s){return s>0?1:s<0?-1:0},v.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},v.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},w.exports=v}),(function(w,U,N){"use strict";function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,w.exports=v}),(function(w,U,N){"use strict";var v=(function(){function h(e,d){for(var r=0;r<d.length;r++){var i=d[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,d,r){return d&&h(e.prototype,d),r&&h(e,r),e}})();function s(h,e){if(!(h instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(e){return{value:e,next:null,prev:null}},t=function(e,d,r,i){return e!==null?e.next=d:i.head=d,r!==null?r.prev=d:i.tail=d,d.prev=e,d.next=r,i.length++,d},a=function(e,d){var r=e.prev,i=e.next;return r!==null?r.next=i:d.head=i,i!==null?i.prev=r:d.tail=r,e.prev=e.next=null,d.length--,e};w.exports=(function(){function h(e){var d=this;s(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(r){return d.push(r)})}return v(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(d,r){return t(r.prev,n(d),r,this)}},{key:"insertAfter",value:function(d,r){return t(r,n(d),r.next,this)}},{key:"insertNodeBefore",value:function(d,r){return t(r.prev,d,r,this)}},{key:"insertNodeAfter",value:function(d,r){return t(r,d,r.next,this)}},{key:"push",value:function(d){return t(this.tail,n(d),null,this)}},{key:"unshift",value:function(d){return t(null,n(d),this.head,this)}},{key:"remove",value:function(d){return a(d,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(d){if(d<=this.length()){for(var r=1,i=this.head;r<d;)i=i.next,r++;return i.value}}},{key:"set_object_at",value:function(d,r){if(d<=this.length()){for(var i=1,f=this.head;i<d;)f=f.next,i++;f.value=r}}}]),h})()}),(function(w,U,N){"use strict";function v(s,n,t){this.x=null,this.y=null,s==null&&n==null&&t==null?(this.x=0,this.y=0):typeof s=="number"&&typeof n=="number"&&t==null?(this.x=s,this.y=n):s.constructor.name=="Point"&&n==null&&t==null&&(t=s,this.x=t.x,this.y=t.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(s,n,t){s.constructor.name=="Point"&&n==null&&t==null?(t=s,this.setLocation(t.x,t.y)):typeof s=="number"&&typeof n=="number"&&t==null&&(parseInt(s)==s&&parseInt(n)==n?this.move(s,n):(this.x=Math.floor(s+.5),this.y=Math.floor(n+.5)))},v.prototype.move=function(s,n){this.x=s,this.y=n},v.prototype.translate=function(s,n){this.x+=s,this.y+=n},v.prototype.equals=function(s){if(s.constructor.name=="Point"){var n=s;return this.x==n.x&&this.y==n.y}return this==s},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=v}),(function(w,U,N){"use strict";function v(s,n,t,a){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&n!=null&&t!=null&&a!=null&&(this.x=s,this.y=n,this.width=t,this.height=a)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(s){this.x=s},v.prototype.getY=function(){return this.y},v.prototype.setY=function(s){this.y=s},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(s){this.width=s},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(s){this.height=s},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},w.exports=v}),(function(w,U,N){"use strict";var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function s(){}s.lastID=0,s.createID=function(n){return s.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=s.getString(),s.lastID++),n.uniqueID)},s.getString=function(n){return n==null&&(n=s.lastID),"Object#"+n},s.isPrimitive=function(n){var t=typeof n>"u"?"undefined":v(n);return n==null||t!="object"&&t!="function"},w.exports=s}),(function(w,U,N){"use strict";function v(f){if(Array.isArray(f)){for(var l=0,p=Array(f.length);l<f.length;l++)p[l]=f[l];return p}else return Array.from(f)}var s=N(0),n=N(7),t=N(3),a=N(1),h=N(6),e=N(5),d=N(17),r=N(29);function i(f){r.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,f!=null&&(this.isRemoteUse=f)}i.RANDOM_SEED=1,i.prototype=Object.create(r.prototype),i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},i.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},i.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},i.prototype.newGraphManager=function(){var f=new n(this);return this.graphManager=f,f},i.prototype.newGraph=function(f){return new h(null,this.graphManager,f)},i.prototype.newNode=function(f){return new t(this.graphManager,f)},i.prototype.newEdge=function(f){return new a(null,null,f)},i.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},i.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var f;return this.checkLayoutSuccess()?f=!1:f=this.layout(),s.ANIMATE==="during"?!1:(f&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,f)},i.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},i.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var f=this.graphManager.getAllEdges(),l=0;l<f.length;l++)f[l];for(var p=this.graphManager.getRoot().getNodes(),l=0;l<p.length;l++)p[l];this.update(this.graphManager.getRoot())}},i.prototype.update=function(f){if(f==null)this.update2();else if(f instanceof t){var l=f;if(l.getChild()!=null)for(var p=l.getChild().getNodes(),g=0;g<p.length;g++)update(p[g]);l.vGraphObject!=null&&l.vGraphObject.update(l)}else if(f instanceof a){var c=f;c.vGraphObject!=null&&c.vGraphObject.update(c)}else if(f instanceof h){var T=f;T.vGraphObject!=null&&T.vGraphObject.update(T)}},i.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},i.prototype.transform=function(f){if(f==null)this.transform(new e(0,0));else{var l=new d,p=this.graphManager.getRoot().updateLeftTop();if(p!=null){l.setWorldOrgX(f.x),l.setWorldOrgY(f.y),l.setDeviceOrgX(p.x),l.setDeviceOrgY(p.y);for(var g=this.getAllNodes(),c,T=0;T<g.length;T++)c=g[T],c.transform(l)}}},i.prototype.positionNodesRandomly=function(f){if(f==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var l,p,g=f.getNodes(),c=0;c<g.length;c++)l=g[c],p=l.getChild(),p==null||p.getNodes().length==0?l.scatter():(this.positionNodesRandomly(p),l.updateBounds())},i.prototype.getFlatForest=function(){for(var f=[],l=!0,p=this.graphManager.getRoot().getNodes(),g=!0,c=0;c<p.length;c++)p[c].getChild()!=null&&(g=!1);if(!g)return f;var T=new Set,A=[],I=new Map,S=[];for(S=S.concat(p);S.length>0&&l;){for(A.push(S[0]);A.length>0&&l;){var Y=A[0];A.splice(0,1),T.add(Y);for(var W=Y.getEdges(),c=0;c<W.length;c++){var z=W[c].getOtherEnd(Y);if(I.get(Y)!=z)if(!T.has(z))A.push(z),I.set(z,Y);else{l=!1;break}}}if(!l)f=[];else{var x=[].concat(v(T));f.push(x);for(var c=0;c<x.length;c++){var tt=x[c],o=S.indexOf(tt);o>-1&&S.splice(o,1)}T=new Set,I=new Map}}return f},i.prototype.createDummyNodesForBendpoints=function(f){for(var l=[],p=f.source,g=this.graphManager.calcLowestCommonAncestor(f.source,f.target),c=0;c<f.bendpoints.length;c++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),g.add(T);var A=this.newEdge(null);this.graphManager.add(A,p,T),l.add(T),p=T}var A=this.newEdge(null);return this.graphManager.add(A,p,f.target),this.edgeToDummyNodes.set(f,l),f.isInterGraph()?this.graphManager.remove(f):g.remove(f),l},i.prototype.createBendpointsFromDummyNodes=function(){var f=[];f=f.concat(this.graphManager.getAllEdges()),f=[].concat(v(this.edgeToDummyNodes.keys())).concat(f);for(var l=0;l<f.length;l++){var p=f[l];if(p.bendpoints.length>0){for(var g=this.edgeToDummyNodes.get(p),c=0;c<g.length;c++){var T=g[c],A=new e(T.getCenterX(),T.getCenterY()),I=p.bendpoints.get(c);I.x=A.x,I.y=A.y,T.getOwner().remove(T)}this.graphManager.add(p,p.source,p.target)}}},i.transform=function(f,l,p,g){if(p!=null&&g!=null){var c=l;if(f<=50){var T=l/p;c-=(l-T)/50*(50-f)}else{var A=l*g;c+=(A-l)/50*(f-50)}return c}else{var I,S;return f<=50?(I=9*l/500,S=l/10):(I=9*l/50,S=-8*l),I*f+S}},i.findCenterOfTree=function(f){var l=[];l=l.concat(f);var p=[],g=new Map,c=!1,T=null;(l.length==1||l.length==2)&&(c=!0,T=l[0]);for(var A=0;A<l.length;A++){var I=l[A],S=I.getNeighborsList().size;g.set(I,I.getNeighborsList().size),S==1&&p.push(I)}var Y=[];for(Y=Y.concat(p);!c;){var W=[];W=W.concat(Y),Y=[];for(var A=0;A<l.length;A++){var I=l[A],z=l.indexOf(I);z>=0&&l.splice(z,1),I.getNeighborsList().forEach(function(o){if(p.indexOf(o)<0){var m=g.get(o)-1;m==1&&Y.push(o),g.set(o,m)}})}p=p.concat(Y),(l.length==1||l.length==2)&&(c=!0,T=l[0])}return T},i.prototype.setGraphManager=function(f){this.graphManager=f},w.exports=i}),(function(w,U,N){"use strict";function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},w.exports=v}),(function(w,U,N){"use strict";var v=N(5);function s(n,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(n){this.lworldExtX=n},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(n){this.lworldExtY=n},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},s.prototype.transformX=function(n){var t=0,a=this.lworldExtX;return a!=0&&(t=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),t},s.prototype.transformY=function(n){var t=0,a=this.lworldExtY;return a!=0&&(t=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),t},s.prototype.inverseTransformX=function(n){var t=0,a=this.ldeviceExtX;return a!=0&&(t=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),t},s.prototype.inverseTransformY=function(n){var t=0,a=this.ldeviceExtY;return a!=0&&(t=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),t},s.prototype.inverseTransformPoint=function(n){return new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y))},w.exports=s}),(function(w,U,N){"use strict";function v(r){if(Array.isArray(r)){for(var i=0,f=Array(r.length);i<r.length;i++)f[i]=r[i];return f}else return Array.from(r)}var s=N(15),n=N(4),t=N(0),a=N(8),h=N(9);function e(){s.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}e.prototype=Object.create(s.prototype);for(var d in s)e[d]=s[d];e.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var r,i,f,l,p,g,c,T=this.getGraphManager().getAllEdges(),A=0;A<T.length;A++)r=T[A],i=r.idealLength,r.isInterGraph&&(l=r.getSource(),p=r.getTarget(),g=r.getSourceInLca().getEstimatedSize(),c=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=g+c-2*t.SIMPLE_NODE_SIZE),f=r.getLca().getInclusionTreeDepth(),r.idealLength+=i*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*f))},e.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(r-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),i,f=0;f<r.length;f++)i=r[f],this.calcSpringForce(i,i.idealLength)},e.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f,l,p,g,c=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,f=0;f<c.length;f++)p=c[f],this.calculateRepulsionForceOfANode(p,T,r,i),T.add(p);else for(f=0;f<c.length;f++)for(p=c[f],l=f+1;l<c.length;l++)g=c[l],p.getOwner()==g.getOwner()&&this.calcRepulsionForce(p,g)},e.prototype.calcGravitationalForces=function(){for(var r,i=this.getAllNodesToApplyGravitation(),f=0;f<i.length;f++)r=i[f],this.calcGravitationalForce(r)},e.prototype.moveNodes=function(){for(var r=this.getAllNodes(),i,f=0;f<r.length;f++)i=r[f],i.move()},e.prototype.calcSpringForce=function(r,i){var f=r.getSource(),l=r.getTarget(),p,g,c,T;if(this.uniformLeafNodeSizes&&f.getChild()==null&&l.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;p=r.getLength(),p!=0&&(g=r.edgeElasticity*(p-i),c=g*(r.lengthX/p),T=g*(r.lengthY/p),f.springForceX+=c,f.springForceY+=T,l.springForceX-=c,l.springForceY-=T)},e.prototype.calcRepulsionForce=function(r,i){var f=r.getRect(),l=i.getRect(),p=new Array(2),g=new Array(4),c,T,A,I,S,Y,W;if(f.intersects(l)){a.calcSeparationAmount(f,l,p,n.DEFAULT_EDGE_LENGTH/2),Y=2*p[0],W=2*p[1];var z=r.noOfChildren*i.noOfChildren/(r.noOfChildren+i.noOfChildren);r.repulsionForceX-=z*Y,r.repulsionForceY-=z*W,i.repulsionForceX+=z*Y,i.repulsionForceY+=z*W}else this.uniformLeafNodeSizes&&r.getChild()==null&&i.getChild()==null?(c=l.getCenterX()-f.getCenterX(),T=l.getCenterY()-f.getCenterY()):(a.getIntersection(f,l,g),c=g[2]-g[0],T=g[3]-g[1]),Math.abs(c)<n.MIN_REPULSION_DIST&&(c=h.sign(c)*n.MIN_REPULSION_DIST),Math.abs(T)<n.MIN_REPULSION_DIST&&(T=h.sign(T)*n.MIN_REPULSION_DIST),A=c*c+T*T,I=Math.sqrt(A),S=(r.nodeRepulsion/2+i.nodeRepulsion/2)*r.noOfChildren*i.noOfChildren/A,Y=S*c/I,W=S*T/I,r.repulsionForceX-=Y,r.repulsionForceY-=W,i.repulsionForceX+=Y,i.repulsionForceY+=W},e.prototype.calcGravitationalForce=function(r){var i,f,l,p,g,c,T,A;i=r.getOwner(),f=(i.getRight()+i.getLeft())/2,l=(i.getTop()+i.getBottom())/2,p=r.getCenterX()-f,g=r.getCenterY()-l,c=Math.abs(p)+r.getWidth()/2,T=Math.abs(g)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(A=i.getEstimatedSize()*this.gravityRangeFactor,(c>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*p,r.gravitationForceY=-this.gravityConstant*g)):(A=i.getEstimatedSize()*this.compoundGravityRangeFactor,(c>A||T>A)&&(r.gravitationForceX=-this.gravityConstant*p*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},e.prototype.isConverged=function(){var r,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||i},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,i=this.graphManager.getAllNodes(),f=0;f<i.length;f++)r=i[f],r.noOfChildren=r.getNoOfChildren()},e.prototype.calcGrid=function(r){var i=0,f=0;i=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),f=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var l=new Array(i),p=0;p<i;p++)l[p]=new Array(f);for(var p=0;p<i;p++)for(var g=0;g<f;g++)l[p][g]=new Array;return l},e.prototype.addNodeToGrid=function(r,i,f){var l=0,p=0,g=0,c=0;l=parseInt(Math.floor((r.getRect().x-i)/this.repulsionRange)),p=parseInt(Math.floor((r.getRect().width+r.getRect().x-i)/this.repulsionRange)),g=parseInt(Math.floor((r.getRect().y-f)/this.repulsionRange)),c=parseInt(Math.floor((r.getRect().height+r.getRect().y-f)/this.repulsionRange));for(var T=l;T<=p;T++)for(var A=g;A<=c;A++)this.grid[T][A].push(r),r.setGridCoordinates(l,p,g,c)},e.prototype.updateGrid=function(){var r,i,f=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<f.length;r++)i=f[r],this.addNodeToGrid(i,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(r,i,f,l){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&f||l){var p=new Set;r.surrounding=new Array;for(var g,c=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var A=r.startY-1;A<r.finishY+2;A++)if(!(T<0||A<0||T>=c.length||A>=c[0].length)){for(var I=0;I<c[T][A].length;I++)if(g=c[T][A][I],!(r.getOwner()!=g.getOwner()||r==g)&&!i.has(g)&&!p.has(g)){var S=Math.abs(r.getCenterX()-g.getCenterX())-(r.getWidth()/2+g.getWidth()/2),Y=Math.abs(r.getCenterY()-g.getCenterY())-(r.getHeight()/2+g.getHeight()/2);S<=this.repulsionRange&&Y<=this.repulsionRange&&p.add(g)}}r.surrounding=[].concat(v(p))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},e.prototype.calcRepulsionRange=function(){return 0},w.exports=e}),(function(w,U,N){"use strict";var v=N(1),s=N(4);function n(a,h,e){v.call(this,a,h,e),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(v.prototype);for(var t in v)n[t]=v[t];w.exports=n}),(function(w,U,N){"use strict";var v=N(3),s=N(4);function n(a,h,e,d){v.call(this,a,h,e,d),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}n.prototype=Object.create(v.prototype);for(var t in v)n[t]=v[t];n.prototype.setGridCoordinates=function(a,h,e,d){this.startX=a,this.finishX=h,this.startY=e,this.finishY=d},w.exports=n}),(function(w,U,N){"use strict";function v(s,n){this.width=0,this.height=0,s!==null&&n!==null&&(this.height=n,this.width=s)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(s){this.width=s},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(s){this.height=s},w.exports=v}),(function(w,U,N){"use strict";var v=N(14);function s(){this.map={},this.keys=[]}s.prototype.put=function(n,t){var a=v.createID(n);this.contains(a)||(this.map[a]=t,this.keys.push(n))},s.prototype.contains=function(n){return v.createID(n),this.map[n]!=null},s.prototype.get=function(n){var t=v.createID(n);return this.map[t]},s.prototype.keySet=function(){return this.keys},w.exports=s}),(function(w,U,N){"use strict";var v=N(14);function s(){this.set={}}s.prototype.add=function(n){var t=v.createID(n);this.contains(t)||(this.set[t]=n)},s.prototype.remove=function(n){delete this.set[v.createID(n)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(n){return this.set[v.createID(n)]==n},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(n){for(var t=Object.keys(this.set),a=t.length,h=0;h<a;h++)n.push(this.set[t[h]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(n){for(var t=n.length,a=0;a<t;a++){var h=n[a];this.add(h)}},w.exports=s}),(function(w,U,N){"use strict";function v(){}v.multMat=function(s,n){for(var t=[],a=0;a<s.length;a++){t[a]=[];for(var h=0;h<n[0].length;h++){t[a][h]=0;for(var e=0;e<s[0].length;e++)t[a][h]+=s[a][e]*n[e][h]}}return t},v.transpose=function(s){for(var n=[],t=0;t<s[0].length;t++){n[t]=[];for(var a=0;a<s.length;a++)n[t][a]=s[a][t]}return n},v.multCons=function(s,n){for(var t=[],a=0;a<s.length;a++)t[a]=s[a]*n;return t},v.minusOp=function(s,n){for(var t=[],a=0;a<s.length;a++)t[a]=s[a]-n[a];return t},v.dotProduct=function(s,n){for(var t=0,a=0;a<s.length;a++)t+=s[a]*n[a];return t},v.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},v.normalize=function(s){for(var n=[],t=this.mag(s),a=0;a<s.length;a++)n[a]=s[a]/t;return n},v.multGamma=function(s){for(var n=[],t=0,a=0;a<s.length;a++)t+=s[a];t*=-1/s.length;for(var h=0;h<s.length;h++)n[h]=t+s[h];return n},v.multL=function(s,n,t){for(var a=[],h=[],e=[],d=0;d<n[0].length;d++){for(var r=0,i=0;i<n.length;i++)r+=-.5*n[i][d]*s[i];h[d]=r}for(var f=0;f<t.length;f++){for(var l=0,p=0;p<t.length;p++)l+=t[f][p]*h[p];e[f]=l}for(var g=0;g<n.length;g++){for(var c=0,T=0;T<n[0].length;T++)c+=n[g][T]*e[T];a[g]=c}return a},w.exports=v}),(function(w,U,N){"use strict";var v=(function(){function t(a,h){for(var e=0;e<h.length;e++){var d=h[e];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(a,h,e){return h&&t(a.prototype,h),e&&t(a,e),a}})();function s(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}var n=N(11);w.exports=(function(){function t(a,h){s(this,t),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var e=void 0;a instanceof n?e=a.size():e=a.length,this._quicksort(a,0,e-1)}return v(t,[{key:"_quicksort",value:function(h,e,d){if(e<d){var r=this._partition(h,e,d);this._quicksort(h,e,r),this._quicksort(h,r+1,d)}}},{key:"_partition",value:function(h,e,d){for(var r=this._get(h,e),i=e,f=d;;){for(;this.compareFunction(r,this._get(h,f));)f--;for(;this.compareFunction(this._get(h,i),r);)i++;if(i<f)this._swap(h,i,f),i++,f--;else return f}}},{key:"_get",value:function(h,e){return h instanceof n?h.get_object_at(e):h[e]}},{key:"_set",value:function(h,e,d){h instanceof n?h.set_object_at(e,d):h[e]=d}},{key:"_swap",value:function(h,e,d){var r=this._get(h,e);this._set(h,e,this._get(h,d)),this._set(h,d,r)}},{key:"_defaultCompareFunction",value:function(h,e){return e>h}}]),t})()}),(function(w,U,N){"use strict";function v(){}v.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var n=Math.min(this.m,this.n);this.s=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(Math.min(this.m+1,this.n)),this.U=(function(Ot){return(function Tt(Xt){if(Xt.length==0)return 0;for(var St=[],Ut=0;Ut<Xt[0];Ut++)St.push(Tt(Xt.slice(1)));return St})(Ot)})([this.m,n]),this.V=(function(Ot){return(function Tt(Xt){if(Xt.length==0)return 0;for(var St=[],Ut=0;Ut<Xt[0];Ut++)St.push(Tt(Xt.slice(1)));return St})(Ot)})([this.n,this.n]);for(var t=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(this.n),a=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(this.m),h=!0,e=!0,d=Math.min(this.m-1,this.n),r=Math.max(0,Math.min(this.n-2,this.m)),i=0;i<Math.max(d,r);i++){if(i<d){this.s[i]=0;for(var f=i;f<this.m;f++)this.s[i]=v.hypot(this.s[i],s[f][i]);if(this.s[i]!==0){s[i][i]<0&&(this.s[i]=-this.s[i]);for(var l=i;l<this.m;l++)s[l][i]/=this.s[i];s[i][i]+=1}this.s[i]=-this.s[i]}for(var p=i+1;p<this.n;p++){if((function(Ot,Tt){return Ot&&Tt})(i<d,this.s[i]!==0)){for(var g=0,c=i;c<this.m;c++)g+=s[c][i]*s[c][p];g=-g/s[i][i];for(var T=i;T<this.m;T++)s[T][p]+=g*s[T][i]}t[p]=s[i][p]}if((function(Ot,Tt){return Ot&&Tt})(h,i<d))for(var A=i;A<this.m;A++)this.U[A][i]=s[A][i];if(i<r){t[i]=0;for(var I=i+1;I<this.n;I++)t[i]=v.hypot(t[i],t[I]);if(t[i]!==0){t[i+1]<0&&(t[i]=-t[i]);for(var S=i+1;S<this.n;S++)t[S]/=t[i];t[i+1]+=1}if(t[i]=-t[i],(function(Ot,Tt){return Ot&&Tt})(i+1<this.m,t[i]!==0)){for(var Y=i+1;Y<this.m;Y++)a[Y]=0;for(var W=i+1;W<this.n;W++)for(var z=i+1;z<this.m;z++)a[z]+=t[W]*s[z][W];for(var x=i+1;x<this.n;x++)for(var tt=-t[x]/t[i+1],o=i+1;o<this.m;o++)s[o][x]+=tt*a[o]}if(e)for(var m=i+1;m<this.n;m++)this.V[m][i]=t[m]}}var u=Math.min(this.n,this.m+1);if(d<this.n&&(this.s[d]=s[d][d]),this.m<u&&(this.s[u-1]=0),r+1<u&&(t[r]=s[r][u-1]),t[u-1]=0,h){for(var E=d;E<n;E++){for(var y=0;y<this.m;y++)this.U[y][E]=0;this.U[E][E]=1}for(var C=d-1;C>=0;C--)if(this.s[C]!==0){for(var M=C+1;M<n;M++){for(var G=0,O=C;O<this.m;O++)G+=this.U[O][C]*this.U[O][M];G=-G/this.U[C][C];for(var R=C;R<this.m;R++)this.U[R][M]+=G*this.U[R][C]}for(var V=C;V<this.m;V++)this.U[V][C]=-this.U[V][C];this.U[C][C]=1+this.U[C][C];for(var B=0;B<C-1;B++)this.U[B][C]=0}else{for(var rt=0;rt<this.m;rt++)this.U[rt][C]=0;this.U[C][C]=1}}if(e)for(var K=this.n-1;K>=0;K--){if((function(Ot,Tt){return Ot&&Tt})(K<r,t[K]!==0))for(var P=K+1;P<n;P++){for(var b=0,X=K+1;X<this.n;X++)b+=this.V[X][K]*this.V[X][P];b=-b/this.V[K+1][K];for(var Q=K+1;Q<this.n;Q++)this.V[Q][P]+=b*this.V[Q][K]}for(var at=0;at<this.n;at++)this.V[at][K]=0;this.V[K][K]=1}for(var J=u-1,k=0,Et=Math.pow(2,-52),ft=Math.pow(2,-966);u>0;){var q=void 0,mt=void 0;for(q=u-2;q>=-1&&q!==-1;q--)if(Math.abs(t[q])<=ft+Et*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){t[q]=0;break}if(q===u-2)mt=4;else{var ot=void 0;for(ot=u-1;ot>=q&&ot!==q;ot--){var wt=(ot!==u?Math.abs(t[ot]):0)+(ot!==q+1?Math.abs(t[ot-1]):0);if(Math.abs(this.s[ot])<=ft+Et*wt){this.s[ot]=0;break}}ot===q?mt=3:ot===u-1?mt=1:(mt=2,q=ot)}switch(q++,mt){case 1:var Vt=t[u-2];t[u-2]=0;for(var Dt=u-2;Dt>=q;Dt--){var xt=v.hypot(this.s[Dt],Vt),Gt=this.s[Dt]/xt,zt=Vt/xt;if(this.s[Dt]=xt,Dt!==q&&(Vt=-zt*t[Dt-1],t[Dt-1]=Gt*t[Dt-1]),e)for(var Ft=0;Ft<this.n;Ft++)xt=Gt*this.V[Ft][Dt]+zt*this.V[Ft][u-1],this.V[Ft][u-1]=-zt*this.V[Ft][Dt]+Gt*this.V[Ft][u-1],this.V[Ft][Dt]=xt}break;case 2:var Bt=t[q-1];t[q-1]=0;for(var Yt=q;Yt<u;Yt++){var kt=v.hypot(this.s[Yt],Bt),Ct=this.s[Yt]/kt,gt=Bt/kt;if(this.s[Yt]=kt,Bt=-gt*t[Yt],t[Yt]=Ct*t[Yt],h)for(var D=0;D<this.m;D++)kt=Ct*this.U[D][Yt]+gt*this.U[D][q-1],this.U[D][q-1]=-gt*this.U[D][Yt]+Ct*this.U[D][q-1],this.U[D][Yt]=kt}break;case 3:var H=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[q])),Math.abs(t[q])),$=this.s[u-1]/H,j=this.s[u-2]/H,Z=t[u-2]/H,_=this.s[q]/H,pt=t[q]/H,ct=((j+$)*(j-$)+Z*Z)/2,it=$*Z*($*Z),dt=0;(function(Ot,Tt){return Ot||Tt})(ct!==0,it!==0)&&(dt=Math.sqrt(ct*ct+it),ct<0&&(dt=-dt),dt=it/(ct+dt));for(var Lt=(_+$)*(_-$)+dt,Mt=_*pt,et=q;et<u-1;et++){var Nt=v.hypot(Lt,Mt),st=Lt/Nt,nt=Mt/Nt;if(et!==q&&(t[et-1]=Nt),Lt=st*this.s[et]+nt*t[et],t[et]=st*t[et]-nt*this.s[et],Mt=nt*this.s[et+1],this.s[et+1]=st*this.s[et+1],e)for(var ht=0;ht<this.n;ht++)Nt=st*this.V[ht][et]+nt*this.V[ht][et+1],this.V[ht][et+1]=-nt*this.V[ht][et]+st*this.V[ht][et+1],this.V[ht][et]=Nt;if(Nt=v.hypot(Lt,Mt),st=Lt/Nt,nt=Mt/Nt,this.s[et]=Nt,Lt=st*t[et]+nt*this.s[et+1],this.s[et+1]=-nt*t[et]+st*this.s[et+1],Mt=nt*t[et+1],t[et+1]=st*t[et+1],h&&et<this.m-1)for(var yt=0;yt<this.m;yt++)Nt=st*this.U[yt][et]+nt*this.U[yt][et+1],this.U[yt][et+1]=-nt*this.U[yt][et]+st*this.U[yt][et+1],this.U[yt][et]=Nt}t[u-2]=Lt,k=k+1;break;case 4:if(this.s[q]<=0&&(this.s[q]=this.s[q]<0?-this.s[q]:0,e))for(var ut=0;ut<=J;ut++)this.V[ut][q]=-this.V[ut][q];for(;q<J&&!(this.s[q]>=this.s[q+1]);){var Rt=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Rt,e&&q<this.n-1)for(var It=0;It<this.n;It++)Rt=this.V[It][q+1],this.V[It][q+1]=this.V[It][q],this.V[It][q]=Rt;if(h&&q<this.m-1)for(var bt=0;bt<this.m;bt++)Rt=this.U[bt][q+1],this.U[bt][q+1]=this.U[bt][q],this.U[bt][q]=Rt;q++}k=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},v.hypot=function(s,n){var t=void 0;return Math.abs(s)>Math.abs(n)?(t=n/s,t=Math.abs(s)*Math.sqrt(1+t*t)):n!=0?(t=s/n,t=Math.abs(n)*Math.sqrt(1+t*t)):t=0,t},w.exports=v}),(function(w,U,N){"use strict";var v=(function(){function n(t,a){for(var h=0;h<a.length;h++){var e=a[h];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(t,a,h){return a&&n(t.prototype,a),h&&n(t,h),t}})();function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}w.exports=(function(){function n(t,a){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,n),this.sequence1=t,this.sequence2=a,this.match_score=h,this.mismatch_penalty=e,this.gap_penalty=d,this.iMax=t.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var r=0;r<this.iMax;r++){this.grid[r]=new Array(this.jMax);for(var i=0;i<this.jMax;i++)this.grid[r][i]=0}this.tracebackGrid=new Array(this.iMax);for(var f=0;f<this.iMax;f++){this.tracebackGrid[f]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[f][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var a=1;a<this.jMax;a++)this.grid[0][a]=this.grid[0][a-1]+this.gap_penalty,this.tracebackGrid[0][a]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var e=1;e<this.iMax;e++)for(var d=1;d<this.jMax;d++){var r=void 0;this.sequence1[e-1]===this.sequence2[d-1]?r=this.grid[e-1][d-1]+this.match_score:r=this.grid[e-1][d-1]+this.mismatch_penalty;var i=this.grid[e-1][d]+this.gap_penalty,f=this.grid[e][d-1]+this.gap_penalty,l=[r,i,f],p=this.arrayAllMaxIndexes(l);this.grid[e][d]=l[p[0]],this.tracebackGrid[e][d]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var a=[];for(a.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});a[0];){var h=a[0],e=this.tracebackGrid[h.pos[0]][h.pos[1]];e[0]&&a.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),e[1]&&a.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),e[2]&&a.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),a.shift()}return this.alignments}},{key:"getAllIndexes",value:function(a,h){for(var e=[],d=-1;(d=a.indexOf(h,d+1))!==-1;)e.push(d);return e}},{key:"arrayAllMaxIndexes",value:function(a){return this.getAllIndexes(a,Math.max.apply(null,a))}}]),n})()}),(function(w,U,N){"use strict";var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),w.exports=v}),(function(w,U,N){"use strict";function v(){this.listeners=[]}var s=v.prototype;s.addListener=function(n,t){this.listeners.push({event:n,callback:t})},s.removeListener=function(n,t){for(var a=this.listeners.length;a>=0;a--){var h=this.listeners[a];h.event===n&&h.callback===t&&this.listeners.splice(a,1)}},s.emit=function(n,t){for(var a=0;a<this.listeners.length;a++){var h=this.listeners[a];n===h.event&&h.callback(t)}},w.exports=v})])})})),Ae=he.__commonJSMin(((L,F)=>{(function(U,N){typeof L=="object"&&typeof F=="object"?F.exports=N(Ce()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof L=="object"?L.coseBase=N(Ce()):U.coseBase=N(U.layoutBase)})(L,function(w){return(()=>{"use strict";var U={45:((s,n,t)=>{var a={};a.layoutBase=t(551),a.CoSEConstants=t(806),a.CoSEEdge=t(767),a.CoSEGraph=t(880),a.CoSEGraphManager=t(578),a.CoSELayout=t(765),a.CoSENode=t(991),a.ConstraintHandler=t(902),s.exports=a}),806:((s,n,t)=>{var a=t(551).FDLayoutConstants;function h(){}for(var e in a)h[e]=a[e];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=a.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,s.exports=h}),767:((s,n,t)=>{var a=t(551).FDLayoutEdge;function h(d,r,i){a.call(this,d,r,i)}h.prototype=Object.create(a.prototype);for(var e in a)h[e]=a[e];s.exports=h}),880:((s,n,t)=>{var a=t(551).LGraph;function h(d,r,i){a.call(this,d,r,i)}h.prototype=Object.create(a.prototype);for(var e in a)h[e]=a[e];s.exports=h}),578:((s,n,t)=>{var a=t(551).LGraphManager;function h(d){a.call(this,d)}h.prototype=Object.create(a.prototype);for(var e in a)h[e]=a[e];s.exports=h}),765:((s,n,t)=>{var a=t(551).FDLayout,h=t(578),e=t(880),d=t(991),r=t(767),i=t(806),f=t(902),l=t(551).FDLayoutConstants,p=t(551).LayoutConstants,g=t(551).Point,c=t(551).PointD,T=t(551).DimensionD,A=t(551).Layout,I=t(551).Integer,S=t(551).IGeometry,Y=t(551).LGraph,W=t(551).Transform,z=t(551).LinkedList;function x(){a.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(a.prototype);for(var tt in a)x[tt]=a[tt];x.prototype.newGraphManager=function(){var o=new h(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new e(null,this.graphManager,o)},x.prototype.newNode=function(o){return new d(this.graphManager,o)},x.prototype.newEdge=function(o){return new r(null,null,o)},x.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.isSubLayout||(i.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){a.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return p.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.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(i.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(C){return m.has(C)});this.graphManager.setAllNodesToApplyGravitation(u)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),i.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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%l.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-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}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 o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return o.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),i.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),i.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},u=0;u<o.length;u++){var E=o[u].rect,y=o[u].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var o=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!o;)o=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var o=this.getAllNodes(),m,u=0;u<o.length;u++)m=o[u],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<o.length;u++)m=o[u],m.move()},x.prototype.initConstraintVariables=function(){var o=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var E=m[u];this.idToNodeMap.set(E.id,E)}var y=function b(X){for(var Q=X.getChild().getNodes(),at,J=0,k=0;k<Q.length;k++)at=Q[k],at.getChild()==null?o.fixedNodeSet.has(at.id)&&(J+=100):J+=b(at);return J};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(Q){o.fixedNodeSet.add(Q.nodeId)});for(var m=this.graphManager.getAllNodes(),E,u=0;u<m.length;u++)if(E=m[u],E.getChild()!=null){var C=y(E);C>0&&(E.fixedNodeWeight=C)}}if(this.constraints.relativePlacementConstraint){var M=new Map,G=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(b){o.fixedNodesOnHorizontal.add(b),o.fixedNodesOnVertical.add(b)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var O=this.constraints.alignmentConstraint.vertical,u=0;u<O.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),O[u].forEach(function(X){M.set(X,"dummy"+u),o.dummyToNodeForVerticalAlignment.get("dummy"+u).push(X),o.fixedNodeSet.has(X)&&o.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var R=this.constraints.alignmentConstraint.horizontal,u=0;u<R.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),R[u].forEach(function(X){G.set(X,"dummy"+u),o.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(X),o.fixedNodeSet.has(X)&&o.fixedNodesOnVertical.add("dummy"+u)})}if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(b){var X,Q,at;for(at=b.length-1;at>=2*b.length/3;at--)X=Math.floor(Math.random()*(at+1)),Q=b[at],b[at]=b[X],b[X]=Q;return b},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(b){if(b.left){var X=M.has(b.left)?M.get(b.left):b.left,Q=M.has(b.right)?M.get(b.right):b.right;o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodesInRelativeHorizontal.includes(Q)||(o.nodesInRelativeHorizontal.push(Q),o.nodeToRelativeConstraintMapHorizontal.set(Q,[]),o.dummyToNodeForVerticalAlignment.has(Q)?o.nodeToTempPositionMapHorizontal.set(Q,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Q)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Q,o.idToNodeMap.get(Q).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(X).push({right:Q,gap:b.gap}),o.nodeToRelativeConstraintMapHorizontal.get(Q).push({left:X,gap:b.gap})}else{var at=G.has(b.top)?G.get(b.top):b.top,J=G.has(b.bottom)?G.get(b.bottom):b.bottom;o.nodesInRelativeVertical.includes(at)||(o.nodesInRelativeVertical.push(at),o.nodeToRelativeConstraintMapVertical.set(at,[]),o.dummyToNodeForHorizontalAlignment.has(at)?o.nodeToTempPositionMapVertical.set(at,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(at)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(at,o.idToNodeMap.get(at).getCenterY())),o.nodesInRelativeVertical.includes(J)||(o.nodesInRelativeVertical.push(J),o.nodeToRelativeConstraintMapVertical.set(J,[]),o.dummyToNodeForHorizontalAlignment.has(J)?o.nodeToTempPositionMapVertical.set(J,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(J)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(J,o.idToNodeMap.get(J).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(at).push({bottom:J,gap:b.gap}),o.nodeToRelativeConstraintMapVertical.get(J).push({top:at,gap:b.gap})}});else{var V=new Map,B=new Map;this.constraints.relativePlacementConstraint.forEach(function(b){if(b.left){var X=M.has(b.left)?M.get(b.left):b.left,Q=M.has(b.right)?M.get(b.right):b.right;V.has(X)?V.get(X).push(Q):V.set(X,[Q]),V.has(Q)?V.get(Q).push(X):V.set(Q,[X])}else{var at=G.has(b.top)?G.get(b.top):b.top,J=G.has(b.bottom)?G.get(b.bottom):b.bottom;B.has(at)?B.get(at).push(J):B.set(at,[J]),B.has(J)?B.get(J).push(at):B.set(J,[at])}});var rt=function(X,Q){var at=[],J=[],k=new z,Et=new Set,ft=0;return X.forEach(function(q,mt){if(!Et.has(mt)){at[ft]=[],J[ft]=!1;var ot=mt;for(k.push(ot),Et.add(ot),at[ft].push(ot);k.length!=0;)ot=k.shift(),Q.has(ot)&&(J[ft]=!0),X.get(ot).forEach(function(wt){Et.has(wt)||(k.push(wt),Et.add(wt),at[ft].push(wt))});ft++}}),{components:at,isFixed:J}},K=rt(V,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var P=rt(B,o.fixedNodesOnVertical);this.componentsOnVertical=P.components,this.fixedComponentsOnVertical=P.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(P){var b=o.idToNodeMap.get(P.nodeId);b.displacementX=0,b.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var E=0,y=0;y<m[u].length;y++){if(this.fixedNodeSet.has(m[u][y])){E=0;break}E+=this.idToNodeMap.get(m[u][y]).displacementX}for(var C=E/m[u].length,y=0;y<m[u].length;y++)this.idToNodeMap.get(m[u][y]).displacementX=C}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,u=0;u<M.length;u++){for(var G=0,y=0;y<M[u].length;y++){if(this.fixedNodeSet.has(M[u][y])){G=0;break}G+=this.idToNodeMap.get(M[u][y]).displacementY}for(var O=G/M[u].length,y=0;y<M[u].length;y++)this.idToNodeMap.get(M[u][y]).displacementY=O}}if(this.constraints.relativePlacementConstraint)if(i.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(P){if(!o.fixedNodesOnHorizontal.has(P)){var b=0;o.dummyToNodeForVerticalAlignment.has(P)?b=o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(P)[0]).displacementX:b=o.idToNodeMap.get(P).displacementX,o.nodeToRelativeConstraintMapHorizontal.get(P).forEach(function(X){if(X.right){var Q=o.nodeToTempPositionMapHorizontal.get(X.right)-o.nodeToTempPositionMapHorizontal.get(P)-b;Q<X.gap&&(b-=X.gap-Q)}else{var Q=o.nodeToTempPositionMapHorizontal.get(P)-o.nodeToTempPositionMapHorizontal.get(X.left)+b;Q<X.gap&&(b+=X.gap-Q)}}),o.nodeToTempPositionMapHorizontal.set(P,o.nodeToTempPositionMapHorizontal.get(P)+b),o.dummyToNodeForVerticalAlignment.has(P)?o.dummyToNodeForVerticalAlignment.get(P).forEach(function(X){o.idToNodeMap.get(X).displacementX=b}):o.idToNodeMap.get(P).displacementX=b}}),this.nodesInRelativeVertical.forEach(function(P){if(!o.fixedNodesOnHorizontal.has(P)){var b=0;o.dummyToNodeForHorizontalAlignment.has(P)?b=o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(P)[0]).displacementY:b=o.idToNodeMap.get(P).displacementY,o.nodeToRelativeConstraintMapVertical.get(P).forEach(function(X){if(X.bottom){var Q=o.nodeToTempPositionMapVertical.get(X.bottom)-o.nodeToTempPositionMapVertical.get(P)-b;Q<X.gap&&(b-=X.gap-Q)}else{var Q=o.nodeToTempPositionMapVertical.get(P)-o.nodeToTempPositionMapVertical.get(X.top)+b;Q<X.gap&&(b+=X.gap-Q)}}),o.nodeToTempPositionMapVertical.set(P,o.nodeToTempPositionMapVertical.get(P)+b),o.dummyToNodeForHorizontalAlignment.has(P)?o.dummyToNodeForHorizontalAlignment.get(P).forEach(function(X){o.idToNodeMap.get(X).displacementY=b}):o.idToNodeMap.get(P).displacementY=b}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var R=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(X){o.idToNodeMap.get(X).displacementX=0}):this.idToNodeMap.get(R[y]).displacementX=0;else{for(var V=0,B=0,y=0;y<R.length;y++)if(this.dummyToNodeForVerticalAlignment.has(R[y])){var rt=this.dummyToNodeForVerticalAlignment.get(R[y]);V+=rt.length*this.idToNodeMap.get(rt[0]).displacementX,B+=rt.length}else V+=this.idToNodeMap.get(R[y]).displacementX,B++;for(var K=V/B,y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(X){o.idToNodeMap.get(X).displacementX=K}):this.idToNodeMap.get(R[y]).displacementX=K}}for(var u=0;u<this.componentsOnVertical.length;u++){var R=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(Q){o.idToNodeMap.get(Q).displacementY=0}):this.idToNodeMap.get(R[y]).displacementY=0;else{for(var V=0,B=0,y=0;y<R.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(R[y])){var rt=this.dummyToNodeForHorizontalAlignment.get(R[y]);V+=rt.length*this.idToNodeMap.get(rt[0]).displacementY,B+=rt.length}else V+=this.idToNodeMap.get(R[y]).displacementY,B++;for(var K=V/B,y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(k){o.idToNodeMap.get(k).displacementY=K}):this.idToNodeMap.get(R[y]).displacementY=K}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var o=[],m,u=this.graphManager.getGraphs(),E=u.length,y;for(y=0;y<E;y++)m=u[y],m.updateConnected(),m.isConnected||(o=o.concat(m.getNodes()));return o},x.prototype.createBendpoints=function(){var o=[];o=o.concat(this.graphManager.getAllEdges());var m=new Set,u;for(u=0;u<o.length;u++){var E=o[u];if(!m.has(E)){var y=E.getSource(),C=E.getTarget();if(y==C)E.getBendpoints().push(new c),E.getBendpoints().push(new c),this.createDummyNodesForBendpoints(E),m.add(E);else{var M=[];if(M=M.concat(y.getEdgeListToNode(C)),M=M.concat(C.getEdgeListToNode(y)),!m.has(M[0])){if(M.length>1){var G;for(G=0;G<M.length;G++){var O=M[G];O.getBendpoints().push(new c),this.createDummyNodesForBendpoints(O)}}M.forEach(function(R){m.add(R)})}}}if(m.size==o.length)break}},x.prototype.positionNodesRadially=function(o){for(var m=new g(0,0),u=Math.ceil(Math.sqrt(o.length)),E=0,y=0,C=0,M=new c(0,0),G=0;G<o.length;G++){G%u==0&&(C=0,y=E,G!=0&&(y+=i.DEFAULT_COMPONENT_SEPERATION),E=0);var O=o[G],R=A.findCenterOfTree(O);m.x=C,m.y=y,M=x.radialLayout(O,R,m),M.y>E&&(E=Math.floor(M.y)),C=Math.floor(M.x+i.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(p.WORLD_CENTER_X-M.x/2,p.WORLD_CENTER_Y-M.y/2))},x.radialLayout=function(o,m,u){var E=Math.max(this.maxDiagonalInTree(o),i.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,E);var y=Y.calculateBounds(o),C=new W;C.setDeviceOrgX(y.getMinX()),C.setDeviceOrgY(y.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var M=0;M<o.length;M++)o[M].transform(C);var G=new c(y.getMaxX(),y.getMaxY());return C.inverseTransformPoint(G)},x.branchRadialLayout=function(o,m,u,E,y,C){var M=(E-u+1)/2;M<0&&(M+=180);var G=(M+u)%360*S.TWO_PI/360,O=y*Math.cos(G),R=y*Math.sin(G);o.setCenter(O,R);var V=[];V=V.concat(o.getEdges());var B=V.length;m!=null&&B--;for(var rt=0,K=V.length,P,b=o.getEdgesBetween(m);b.length>1;){var X=b[0];b.splice(0,1);var Q=V.indexOf(X);Q>=0&&V.splice(Q,1),K--,B--}m!=null?P=(V.indexOf(b[0])+1)%K:P=0;for(var at=Math.abs(E-u)/B,J=P;rt!=B;J=++J%K){var k=V[J].getOtherEnd(o);if(k!=m){var Et=(u+rt*at)%360,ft=(Et+at)%360;x.branchRadialLayout(k,o,Et,ft,y+C,C),rt++}}},x.maxDiagonalInTree=function(o){for(var m=I.MIN_VALUE,u=0;u<o.length;u++){var E=o[u].getDiagonal();E>m&&(m=E)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var C=E[y],M=C.getParent();this.getNodeDegreeWithChildren(C)===0&&(M.id==null||!this.getToBeTiled(M))&&u.push(C)}for(var y=0;y<u.length;y++){var C=u[y],G=C.getParent().id;typeof m[G]>"u"&&(m[G]=[]),m[G]=m[G].concat(C)}Object.keys(m).forEach(function(O){if(m[O].length>1){var R="DummyCompound_"+O;o.memberGroups[R]=m[O];var V=m[O][0].getParent(),B=new d(o.graphManager);B.id=R,B.paddingLeft=V.paddingLeft||0,B.paddingRight=V.paddingRight||0,B.paddingBottom=V.paddingBottom||0,B.paddingTop=V.paddingTop||0,o.idToDummyNode[R]=B;var rt=o.getGraphManager().add(o.newGraph(),B),K=V.getChild();K.add(B);for(var P=0;P<m[O].length;P++){var b=m[O][P];K.remove(b),rt.add(b)}}})},x.prototype.clearCompounds=function(){var o={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],o[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(o,m)},x.prototype.clearZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var E=o.idToDummyNode[u];if(m[u]=o.tileNodes(o.memberGroups[u],E.paddingLeft+E.paddingRight),E.rect.width=m[u].width,E.rect.height=m[u].height,E.setCenter(m[u].centerX,m[u].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,C=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(C+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>C?(E.rect.y-=(E.labelHeight-C)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-C)/2):E.labelPosVertical=="bottom"&&E.setHeight(C+E.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],u=m.id,E=m.paddingLeft,y=m.paddingTop,C=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,E,y,C,M)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var E=o.idToDummyNode[u],y=E.paddingLeft,C=E.paddingTop,M=E.labelMarginLeft,G=E.labelMarginTop;o.adjustLocations(m[u],E.rect.x,E.rect.y,y,C,M,G)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=o.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var E=u.getNodes(),y=0;y<E.length;y++){var C=E[y];if(this.getNodeDegree(C)>0)return this.toBeTiled[m]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){o.id;for(var m=o.getEdges(),u=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(u=u+1)}return u},x.prototype.getNodeDegreeWithChildren=function(o){var m=this.getNodeDegree(o);if(o.getChild()==null)return m;for(var u=o.getChild().getNodes(),E=0;E<u.length;E++){var y=u[E];m+=this.getNodeDegreeWithChildren(y)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(o){for(var m=0;m<o.length;m++){var u=o[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(o,m,u,E,y,C,M){m+=E+C,u+=y+M;for(var G=m,O=0;O<o.rows.length;O++){var R=o.rows[O];m=G;for(var V=0,B=0;B<R.length;B++){var rt=R[B];rt.rect.x=m,rt.rect.y=u,m+=rt.rect.width+o.horizontalPadding,rt.rect.height>V&&(V=rt.rect.height)}u+=V+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var u=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(E){var y=m[E];if(u.tiledMemberPack[E]=u.tileNodes(o[E],y.paddingLeft+y.paddingRight),y.rect.width=u.tiledMemberPack[E].width,y.rect.height=u.tiledMemberPack[E].height,y.setCenter(u.tiledMemberPack[E].centerX,u.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,i.NODE_DIMENSIONS_INCLUDE_LABELS){var C=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(C+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>C?(y.rect.x-=(y.labelWidth-C)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-C)/2):y.labelPosHorizontal=="right"&&y.setWidth(C+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},x.prototype.tileNodes=function(o,m){var u=this.tileNodesByFavoringDim(o,m,!0),E=this.tileNodesByFavoringDim(o,m,!1),y=this.getOrgRatio(u),C=this.getOrgRatio(E),M;return C<y?M=E:M=u,M},x.prototype.getOrgRatio=function(o){var m=o.width/o.height;return m<1&&(m=1/m),m},x.prototype.calcIdealRowWidth=function(o,m){var u=i.TILING_PADDING_VERTICAL,E=i.TILING_PADDING_HORIZONTAL,y=o.length,C=0,M=0,G=0;o.forEach(function(P){C+=P.getWidth(),M+=P.getHeight(),P.getWidth()>G&&(G=P.getWidth())});var O=C/y,R=M/y,V=Math.pow(u-E,2)+4*(O+E)*(R+u)*y,B=(E-u+Math.sqrt(V))/(2*(O+E)),rt;m?(rt=Math.ceil(B),rt==B&&rt++):rt=Math.floor(B);var K=rt*(O+E)-E;return G>K&&(K=G),K+=E*2,K},x.prototype.tileNodesByFavoringDim=function(o,m,u){var E=i.TILING_PADDING_VERTICAL,y=i.TILING_PADDING_HORIZONTAL,C=i.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};C&&(M.idealRowWidth=this.calcIdealRowWidth(o,u));var G=function(b){return b.rect.width*b.rect.height},O=function(b,X){return G(X)-G(b)};o.sort(function(P,b){var X=O;return M.idealRowWidth?(X=C,X(P.id,b.id)):X(P,b)});for(var R=0,V=0,B=0;B<o.length;B++){var rt=o[B];R+=rt.getCenterX(),V+=rt.getCenterY()}M.centerX=R/o.length,M.centerY=V/o.length;for(var B=0;B<o.length;B++){var rt=o[B];if(M.rows.length==0)this.insertNodeToRow(M,rt,0,m);else if(this.canAddHorizontal(M,rt.rect.width,rt.rect.height)){var K=M.rows.length-1;M.idealRowWidth||(K=this.getShortestRowIndex(M)),this.insertNodeToRow(M,rt,K,m)}else this.insertNodeToRow(M,rt,M.rows.length,m);this.shiftToLastRow(M)}return M},x.prototype.insertNodeToRow=function(o,m,u,E){var y=E;u==o.rows.length&&(o.rows.push([]),o.rowWidth.push(y),o.rowHeight.push(0));var C=o.rowWidth[u]+m.rect.width;o.rows[u].length>0&&(C+=o.horizontalPadding),o.rowWidth[u]=C,o.width<C&&(o.width=C);var M=m.rect.height;u>0&&(M+=o.verticalPadding);var G=0;M>o.rowHeight[u]&&(G=o.rowHeight[u],o.rowHeight[u]=M,G=o.rowHeight[u]-G),o.height+=G,o.rows[u].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,u=Number.MAX_VALUE,E=0;E<o.rows.length;E++)o.rowWidth[E]<u&&(m=E,u=o.rowWidth[E]);return m},x.prototype.getLongestRowIndex=function(o){for(var m=-1,u=Number.MIN_VALUE,E=0;E<o.rows.length;E++)o.rowWidth[E]>u&&(m=E,u=o.rowWidth[E]);return m},x.prototype.canAddHorizontal=function(o,m,u){if(o.idealRowWidth){var E=o.rows.length-1;return o.rowWidth[E]+m+o.horizontalPadding<=o.idealRowWidth}var y=this.getShortestRowIndex(o);if(y<0)return!0;var C=o.rowWidth[y];if(C+o.horizontalPadding+m<=o.width)return!0;var M=0;o.rowHeight[y]<u&&y>0&&(M=u+o.verticalPadding-o.rowHeight[y]);var G;o.width-C>=m+o.horizontalPadding?G=(o.height+M)/(C+m+o.horizontalPadding):G=(o.height+M)/o.width,M=u+o.verticalPadding;var O;return o.width<m?O=(o.height+M)/m:O=(o.height+M)/o.width,O<1&&(O=1/O),G<1&&(G=1/G),G<O},x.prototype.shiftToLastRow=function(o){var m=this.getLongestRowIndex(o),u=o.rowWidth.length-1,E=o.rows[m],y=E[E.length-1],C=y.width+o.horizontalPadding;if(o.width-o.rowWidth[u]>C&&m!=u){E.splice(-1,1),o.rows[u].push(y),o.rowWidth[m]=o.rowWidth[m]-C,o.rowWidth[u]=o.rowWidth[u]+C,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var M=Number.MIN_VALUE,G=0;G<E.length;G++)E[G].height>M&&(M=E[G].height);m>0&&(M+=o.verticalPadding);var O=o.rowHeight[m]+o.rowHeight[u];o.rowHeight[m]=M,o.rowHeight[u]<y.height+o.verticalPadding&&(o.rowHeight[u]=y.height+o.verticalPadding);var R=o.rowHeight[m]+o.rowHeight[u];o.height+=R-O,this.shiftToLastRow(o)}},x.prototype.tilingPreLayout=function(){i.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){i.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var o=[],m=!0,u;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var C=0;C<E.length;C++)if(u=E[C],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(i.PURE_INCREMENTAL){var M=u.getEdges()[0].getOtherEnd(u),G=new T(u.getCenterX()-M.getCenterX(),u.getCenterY()-M.getCenterY());y.push([u,u.getEdges()[0],u.getOwner(),G])}else y.push([u,u.getEdges()[0],u.getOwner()]);m=!0}if(m==!0){for(var O=[],R=0;R<y.length;R++)y[R][0].getEdges().length==1&&(O.push(y[R]),y[R][0].getOwner().remove(y[R][0]));o.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=o},x.prototype.growTree=function(o){for(var m=o[o.length-1],u,E=0;E<m.length;E++)u=m[E],this.findPlaceforPrunedNode(u),u[2].add(u[0]),u[2].add(u[1],u[1].source,u[1].target);o.splice(o.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(o){var m,u,E=o[0];if(E==o[1].source?u=o[1].target:u=o[1].source,i.PURE_INCREMENTAL)E.setCenter(u.getCenterX()+o[3].getWidth(),u.getCenterY()+o[3].getHeight());else{var y=u.startX,C=u.finishX,M=u.startY,G=u.finishY,O=[0,0,0,0];if(M>0)for(var R=y;R<=C;R++)O[0]+=this.grid[R][M-1].length+this.grid[R][M].length-1;if(C<this.grid.length-1)for(var R=M;R<=G;R++)O[1]+=this.grid[C+1][R].length+this.grid[C][R].length-1;if(G<this.grid[0].length-1)for(var R=y;R<=C;R++)O[2]+=this.grid[R][G+1].length+this.grid[R][G].length-1;if(y>0)for(var R=M;R<=G;R++)O[3]+=this.grid[y-1][R].length+this.grid[y][R].length-1;for(var V=I.MAX_VALUE,B,rt,K=0;K<O.length;K++)O[K]<V?(V=O[K],B=1,rt=K):O[K]==V&&B++;if(B==3&&V==0)O[0]==0&&O[1]==0&&O[2]==0?m=1:O[0]==0&&O[1]==0&&O[3]==0?m=0:O[0]==0&&O[2]==0&&O[3]==0?m=3:O[1]==0&&O[2]==0&&O[3]==0&&(m=2);else if(B==2&&V==0){var P=Math.floor(Math.random()*2);O[0]==0&&O[1]==0?P==0?m=0:m=1:O[0]==0&&O[2]==0?P==0?m=0:m=2:O[0]==0&&O[3]==0?P==0?m=0:m=3:O[1]==0&&O[2]==0?P==0?m=1:m=2:O[1]==0&&O[3]==0?P==0?m=1:m=3:P==0?m=2:m=3}else if(B==4&&V==0){var P=Math.floor(Math.random()*4);m=P}else m=rt;m==0?E.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,u.getCenterY()):m==2?E.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,u.getCenterY())}},s.exports=x}),991:((s,n,t)=>{var a=t(551).FDLayoutNode,h=t(551).IMath;function e(r,i,f,l){a.call(this,r,i,f,l)}e.prototype=Object.create(a.prototype);for(var d in a)e[d]=a[d];e.prototype.calculateDisplacement=function(){var r=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementX=r.coolingFactor*r.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementY=r.coolingFactor*r.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},e.prototype.propogateDisplacementToChildren=function(r,i){for(var f=this.getChild().getNodes(),l,p=0;p<f.length;p++)l=f[p],l.getChild()==null?(l.displacementX+=r,l.displacementY+=i):l.propogateDisplacementToChildren(r,i)},e.prototype.move=function(){var r=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),r.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.setPred1=function(r){this.pred1=r},e.prototype.getPred1=function(){return pred1},e.prototype.getPred2=function(){return pred2},e.prototype.setNext=function(r){this.next=r},e.prototype.getNext=function(){return next},e.prototype.setProcessed=function(r){this.processed=r},e.prototype.isProcessed=function(){return processed},s.exports=e}),902:((s,n,t)=>{function a(f){if(Array.isArray(f)){for(var l=0,p=Array(f.length);l<f.length;l++)p[l]=f[l];return p}else return Array.from(f)}var h=t(806),e=t(551).LinkedList,d=t(551).Matrix,r=t(551).SVD;function i(){}i.handleConstraints=function(f){var l={};l.fixedNodeConstraint=f.constraints.fixedNodeConstraint,l.alignmentConstraint=f.constraints.alignmentConstraint,l.relativePlacementConstraint=f.constraints.relativePlacementConstraint;for(var p=new Map,g=new Map,c=[],T=[],A=f.getAllNodes(),I=0,S=0;S<A.length;S++){var Y=A[S];Y.getChild()==null&&(g.set(Y.id,I++),c.push(Y.getCenterX()),T.push(Y.getCenterY()),p.set(Y.id,Y))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(D){!D.gap&&D.gap!=0&&(D.left?D.gap=h.DEFAULT_EDGE_LENGTH+p.get(D.left).getWidth()/2+p.get(D.right).getWidth()/2:D.gap=h.DEFAULT_EDGE_LENGTH+p.get(D.top).getHeight()/2+p.get(D.bottom).getHeight()/2)});var W=function(H,$){return{x:H.x-$.x,y:H.y-$.y}},z=function(H){var $=0,j=0;return H.forEach(function(Z){$+=c[g.get(Z)],j+=T[g.get(Z)]}),{x:$/H.size,y:j/H.size}},x=function(H,$,j,Z,_){function pt(st,nt){var ht=new Set(st),yt=!0,ut=!1,Rt=void 0;try{for(var It=nt[Symbol.iterator](),bt;!(yt=(bt=It.next()).done);yt=!0){var Ot=bt.value;ht.add(Ot)}}catch(Tt){ut=!0,Rt=Tt}finally{try{!yt&&It.return&&It.return()}finally{if(ut)throw Rt}}return ht}var ct=new Map;H.forEach(function(st,nt){ct.set(nt,0)}),H.forEach(function(st,nt){st.forEach(function(ht){ct.set(ht.id,ct.get(ht.id)+1)})});var it=new Map,dt=new Map,Lt=new e;ct.forEach(function(st,nt){st==0?(Lt.push(nt),j||($=="horizontal"?it.set(nt,g.has(nt)?c[g.get(nt)]:Z.get(nt)):it.set(nt,g.has(nt)?T[g.get(nt)]:Z.get(nt)))):it.set(nt,Number.NEGATIVE_INFINITY),j&&dt.set(nt,new Set([nt]))}),j&&_.forEach(function(st){var nt=[];if(st.forEach(function(ut){j.has(ut)&&nt.push(ut)}),nt.length>0){var ht=0;nt.forEach(function(ut){$=="horizontal"?(it.set(ut,g.has(ut)?c[g.get(ut)]:Z.get(ut)),ht+=it.get(ut)):(it.set(ut,g.has(ut)?T[g.get(ut)]:Z.get(ut)),ht+=it.get(ut))}),ht=ht/nt.length,st.forEach(function(ut){j.has(ut)||it.set(ut,ht)})}else{var yt=0;st.forEach(function(ut){$=="horizontal"?yt+=g.has(ut)?c[g.get(ut)]:Z.get(ut):yt+=g.has(ut)?T[g.get(ut)]:Z.get(ut)}),yt=yt/st.length,st.forEach(function(ut){it.set(ut,yt)})}});for(var Mt=function(){var nt=Lt.shift();H.get(nt).forEach(function(ht){if(it.get(ht.id)<it.get(nt)+ht.gap)if(j&&j.has(ht.id)){var yt=void 0;if($=="horizontal"?yt=g.has(ht.id)?c[g.get(ht.id)]:Z.get(ht.id):yt=g.has(ht.id)?T[g.get(ht.id)]:Z.get(ht.id),it.set(ht.id,yt),yt<it.get(nt)+ht.gap){var ut=it.get(nt)+ht.gap-yt;dt.get(nt).forEach(function(Rt){it.set(Rt,it.get(Rt)-ut)})}}else it.set(ht.id,it.get(nt)+ht.gap);ct.set(ht.id,ct.get(ht.id)-1),ct.get(ht.id)==0&&Lt.push(ht.id),j&&dt.set(ht.id,pt(dt.get(nt),dt.get(ht.id)))})};Lt.length!=0;)Mt();if(j){var et=new Set;H.forEach(function(st,nt){st.length==0&&et.add(nt)});var Nt=[];dt.forEach(function(st,nt){if(et.has(nt)){var ht=!1,yt=!0,ut=!1,Rt=void 0;try{for(var It=st[Symbol.iterator](),bt;!(yt=(bt=It.next()).done);yt=!0){var Ot=bt.value;j.has(Ot)&&(ht=!0)}}catch(St){ut=!0,Rt=St}finally{try{!yt&&It.return&&It.return()}finally{if(ut)throw Rt}}if(!ht){var Tt=!1,Xt=void 0;Nt.forEach(function(St,Ut){St.has([].concat(a(st))[0])&&(Tt=!0,Xt=Ut)}),Tt?st.forEach(function(St){Nt[Xt].add(St)}):Nt.push(new Set(st))}}}),Nt.forEach(function(st,nt){var ht=Number.POSITIVE_INFINITY,yt=Number.POSITIVE_INFINITY,ut=Number.NEGATIVE_INFINITY,Rt=Number.NEGATIVE_INFINITY,It=!0,bt=!1,Ot=void 0;try{for(var Tt=st[Symbol.iterator](),Xt;!(It=(Xt=Tt.next()).done);It=!0){var St=Xt.value,Ut=void 0;$=="horizontal"?Ut=g.has(St)?c[g.get(St)]:Z.get(St):Ut=g.has(St)?T[g.get(St)]:Z.get(St);var Kt=it.get(St);Ut<ht&&(ht=Ut),Ut>ut&&(ut=Ut),Kt<yt&&(yt=Kt),Kt>Rt&&(Rt=Kt)}}catch(ee){bt=!0,Ot=ee}finally{try{!It&&Tt.return&&Tt.return()}finally{if(bt)throw Ot}}var le=(ht+ut)/2-(yt+Rt)/2,Jt=!0,_t=!1,jt=void 0;try{for(var Qt=st[Symbol.iterator](),oe;!(Jt=(oe=Qt.next()).done);Jt=!0){var te=oe.value;it.set(te,it.get(te)+le)}}catch(ee){_t=!0,jt=ee}finally{try{!Jt&&Qt.return&&Qt.return()}finally{if(_t)throw jt}}})}return it},tt=function(H){var $=0,j=0,Z=0,_=0;if(H.forEach(function(dt){dt.left?c[g.get(dt.left)]-c[g.get(dt.right)]>=0?$++:j++:T[g.get(dt.top)]-T[g.get(dt.bottom)]>=0?Z++:_++}),$>j&&Z>_)for(var pt=0;pt<g.size;pt++)c[pt]=-1*c[pt],T[pt]=-1*T[pt];else if($>j)for(var ct=0;ct<g.size;ct++)c[ct]=-1*c[ct];else if(Z>_)for(var it=0;it<g.size;it++)T[it]=-1*T[it]},o=function(H){var $=[],j=new e,Z=new Set,_=0;return H.forEach(function(pt,ct){if(!Z.has(ct)){$[_]=[];var it=ct;for(j.push(it),Z.add(it),$[_].push(it);j.length!=0;)it=j.shift(),H.get(it).forEach(function(dt){Z.has(dt.id)||(j.push(dt.id),Z.add(dt.id),$[_].push(dt.id))});_++}}),$},m=function(H){var $=new Map;return H.forEach(function(j,Z){$.set(Z,[])}),H.forEach(function(j,Z){j.forEach(function(_){$.get(Z).push(_),$.get(_.id).push({id:Z,gap:_.gap,direction:_.direction})})}),$},u=function(H){var $=new Map;return H.forEach(function(j,Z){$.set(Z,[])}),H.forEach(function(j,Z){j.forEach(function(_){$.get(_.id).push({id:Z,gap:_.gap,direction:_.direction})})}),$},E=[],y=[],C=!1,M=!1,G=new Set,O=new Map,R=new Map,V=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(D){G.add(D.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(D){D.left?(O.has(D.left)?O.get(D.left).push({id:D.right,gap:D.gap,direction:"horizontal"}):O.set(D.left,[{id:D.right,gap:D.gap,direction:"horizontal"}]),O.has(D.right)||O.set(D.right,[])):(O.has(D.top)?O.get(D.top).push({id:D.bottom,gap:D.gap,direction:"vertical"}):O.set(D.top,[{id:D.bottom,gap:D.gap,direction:"vertical"}]),O.has(D.bottom)||O.set(D.bottom,[]))}),R=m(O),V=o(R)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(D,H){E[H]=[D.position.x,D.position.y],y[H]=[c[g.get(D.nodeId)],T[g.get(D.nodeId)]]}),C=!0;else if(l.alignmentConstraint)(function(){var D=0;if(l.alignmentConstraint.vertical){for(var H=l.alignmentConstraint.vertical,$=function(it){var dt=new Set;H[it].forEach(function(et){dt.add(et)});var Lt=new Set([].concat(a(dt)).filter(function(et){return G.has(et)})),Mt=void 0;Lt.size>0?Mt=c[g.get(Lt.values().next().value)]:Mt=z(dt).x,H[it].forEach(function(et){E[D]=[Mt,T[g.get(et)]],y[D]=[c[g.get(et)],T[g.get(et)]],D++})},j=0;j<H.length;j++)$(j);C=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,_=function(it){var dt=new Set;Z[it].forEach(function(et){dt.add(et)});var Lt=new Set([].concat(a(dt)).filter(function(et){return G.has(et)})),Mt=void 0;Lt.size>0?Mt=c[g.get(Lt.values().next().value)]:Mt=z(dt).y,Z[it].forEach(function(et){E[D]=[c[g.get(et)],Mt],y[D]=[c[g.get(et)],T[g.get(et)]],D++})},pt=0;pt<Z.length;pt++)_(pt);C=!0}l.relativePlacementConstraint&&(M=!0)})();else if(l.relativePlacementConstraint){for(var B=0,rt=0,K=0;K<V.length;K++)V[K].length>B&&(B=V[K].length,rt=K);if(B<R.size/2)tt(l.relativePlacementConstraint),C=!1,M=!1;else{var P=new Map,b=new Map,X=[];V[rt].forEach(function(D){O.get(D).forEach(function(H){H.direction=="horizontal"?(P.has(D)?P.get(D).push(H):P.set(D,[H]),P.has(H.id)||P.set(H.id,[]),X.push({left:D,right:H.id})):(b.has(D)?b.get(D).push(H):b.set(D,[H]),b.has(H.id)||b.set(H.id,[]),X.push({top:D,bottom:H.id}))})}),tt(X),M=!1;var Q=x(P,"horizontal"),at=x(b,"vertical");V[rt].forEach(function(D,H){y[H]=[c[g.get(D)],T[g.get(D)]],E[H]=[],Q.has(D)?E[H][0]=Q.get(D):E[H][0]=c[g.get(D)],at.has(D)?E[H][1]=at.get(D):E[H][1]=T[g.get(D)]}),C=!0}}if(C){for(var J=void 0,k=d.transpose(E),Et=d.transpose(y),ft=0;ft<k.length;ft++)k[ft]=d.multGamma(k[ft]),Et[ft]=d.multGamma(Et[ft]);var q=d.multMat(k,d.transpose(Et)),mt=r.svd(q);J=d.multMat(mt.V,d.transpose(mt.U));for(var ot=0;ot<g.size;ot++){var wt=[c[ot],T[ot]],Vt=[J[0][0],J[1][0]],Dt=[J[0][1],J[1][1]];c[ot]=d.dotProduct(wt,Vt),T[ot]=d.dotProduct(wt,Dt)}M&&tt(l.relativePlacementConstraint)}}if(h.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var xt={x:0,y:0};l.fixedNodeConstraint.forEach(function(D,H){var $={x:c[g.get(D.nodeId)],y:T[g.get(D.nodeId)]},j=D.position,Z=W(j,$);xt.x+=Z.x,xt.y+=Z.y}),xt.x/=l.fixedNodeConstraint.length,xt.y/=l.fixedNodeConstraint.length,c.forEach(function(D,H){c[H]+=xt.x}),T.forEach(function(D,H){T[H]+=xt.y}),l.fixedNodeConstraint.forEach(function(D){c[g.get(D.nodeId)]=D.position.x,T[g.get(D.nodeId)]=D.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Gt=l.alignmentConstraint.vertical,zt=function(H){var $=new Set;Gt[H].forEach(function(_){$.add(_)});var j=new Set([].concat(a($)).filter(function(_){return G.has(_)})),Z=void 0;j.size>0?Z=c[g.get(j.values().next().value)]:Z=z($).x,$.forEach(function(_){G.has(_)||(c[g.get(_)]=Z)})},Ft=0;Ft<Gt.length;Ft++)zt(Ft);if(l.alignmentConstraint.horizontal)for(var Bt=l.alignmentConstraint.horizontal,Yt=function(H){var $=new Set;Bt[H].forEach(function(_){$.add(_)});var j=new Set([].concat(a($)).filter(function(_){return G.has(_)})),Z=void 0;j.size>0?Z=T[g.get(j.values().next().value)]:Z=z($).y,$.forEach(function(_){G.has(_)||(T[g.get(_)]=Z)})},kt=0;kt<Bt.length;kt++)Yt(kt)}l.relativePlacementConstraint&&(function(){var D=new Map,H=new Map,$=new Map,j=new Map,Z=new Map,_=new Map,pt=new Set,ct=new Set;if(G.forEach(function(Pt){pt.add(Pt),ct.add(Pt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var it=l.alignmentConstraint.vertical,dt=function(vt){$.set("dummy"+vt,[]),it[vt].forEach(function(At){D.set(At,"dummy"+vt),$.get("dummy"+vt).push(At),G.has(At)&&pt.add("dummy"+vt)}),Z.set("dummy"+vt,c[g.get(it[vt][0])])},Lt=0;Lt<it.length;Lt++)dt(Lt);if(l.alignmentConstraint.horizontal)for(var Mt=l.alignmentConstraint.horizontal,et=function(vt){j.set("dummy"+vt,[]),Mt[vt].forEach(function(At){H.set(At,"dummy"+vt),j.get("dummy"+vt).push(At),G.has(At)&&ct.add("dummy"+vt)}),_.set("dummy"+vt,T[g.get(Mt[vt][0])])},Nt=0;Nt<Mt.length;Nt++)et(Nt)}var st=new Map,nt=new Map,ht=function(vt){O.get(vt).forEach(function(At){var qt=void 0,$t=void 0;At.direction=="horizontal"?(qt=D.get(vt)?D.get(vt):vt,D.get(At.id)?$t={id:D.get(At.id),gap:At.gap,direction:At.direction}:$t=At,st.has(qt)?st.get(qt).push($t):st.set(qt,[$t]),st.has($t.id)||st.set($t.id,[])):(qt=H.get(vt)?H.get(vt):vt,H.get(At.id)?$t={id:H.get(At.id),gap:At.gap,direction:At.direction}:$t=At,nt.has(qt)?nt.get(qt).push($t):nt.set(qt,[$t]),nt.has($t.id)||nt.set($t.id,[]))})},yt=!0,ut=!1,Rt=void 0;try{for(var It=O.keys()[Symbol.iterator](),bt;!(yt=(bt=It.next()).done);yt=!0){var Ot=bt.value;ht(Ot)}}catch(Pt){ut=!0,Rt=Pt}finally{try{!yt&&It.return&&It.return()}finally{if(ut)throw Rt}}var Tt=m(st),Xt=m(nt),St=o(Tt),Ut=o(Xt),Kt=u(st),le=u(nt),Jt=[],_t=[];St.forEach(function(Pt,vt){Jt[vt]=[],Pt.forEach(function(At){Kt.get(At).length==0&&Jt[vt].push(At)})}),Ut.forEach(function(Pt,vt){_t[vt]=[],Pt.forEach(function(At){le.get(At).length==0&&_t[vt].push(At)})});var jt=x(st,"horizontal",pt,Z,Jt),Qt=x(nt,"vertical",ct,_,_t),oe=function(vt){$.get(vt)?$.get(vt).forEach(function(At){c[g.get(At)]=jt.get(vt)}):c[g.get(vt)]=jt.get(vt)},te=!0,ee=!1,Ee=void 0;try{for(var fe=jt.keys()[Symbol.iterator](),Te;!(te=(Te=fe.next()).done);te=!0){var ce=Te.value;oe(ce)}}catch(Pt){ee=!0,Ee=Pt}finally{try{!te&&fe.return&&fe.return()}finally{if(ee)throw Ee}}var We=function(vt){j.get(vt)?j.get(vt).forEach(function(At){T[g.get(At)]=Qt.get(vt)}):T[g.get(vt)]=Qt.get(vt)},ge=!0,Ne=!1,Le=void 0;try{for(var ue=Qt.keys()[Symbol.iterator](),we;!(ge=(we=ue.next()).done);ge=!0){var ce=we.value;We(ce)}}catch(Pt){Ne=!0,Le=Pt}finally{try{!ge&&ue.return&&ue.return()}finally{if(Ne)throw Le}}})()}for(var Ct=0;Ct<A.length;Ct++){var gt=A[Ct];gt.getChild()==null&>.setCenter(c[g.get(gt.id)],T[g.get(gt.id)])}},s.exports=i}),551:(s=>{s.exports=w})},N={};function v(s){var n=N[s];if(n!==void 0)return n.exports;var t=N[s]={exports:{}};return U[s](t,t.exports,v),t.exports}return v(45)})()})})),ke=he.__commonJSMin(((L,F)=>{(function(U,N){typeof L=="object"&&typeof F=="object"?F.exports=N(Ae()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof L=="object"?L.cytoscapeFcose=N(Ae()):U.cytoscapeFcose=N(U.coseBase)})(L,function(w){return(()=>{"use strict";var U={658:(s=>{s.exports=Object.assign!=null?Object.assign.bind(Object):function(n){for(var t=arguments.length,a=Array(t>1?t-1:0),h=1;h<t;h++)a[h-1]=arguments[h];return a.forEach(function(e){Object.keys(e).forEach(function(d){return n[d]=e[d]})}),n}}),548:((s,n,t)=>{var a=(function(){function d(r,i){var f=[],l=!0,p=!1,g=void 0;try{for(var c=r[Symbol.iterator](),T;!(l=(T=c.next()).done)&&(f.push(T.value),!(i&&f.length===i));l=!0);}catch(A){p=!0,g=A}finally{try{!l&&c.return&&c.return()}finally{if(p)throw g}}return f}return function(r,i){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return d(r,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=t(140).layoutBase.LinkedList,e={};e.getTopMostNodes=function(d){for(var r={},i=0;i<d.length;i++)r[d[i].id()]=!0;return d.filter(function(f,l){typeof f=="number"&&(f=l);for(var p=f.parent()[0];p!=null;){if(r[p.id()])return!1;p=p.parent()[0]}return!0})},e.connectComponents=function(d,r,i,f){var l=new h,p=new Set,g=[],c=void 0,T=void 0,A=void 0,I=!1,S=1,Y=[],W=[],z=function(){var tt=d.collection();W.push(tt);var o=i[0],m=d.collection();m.merge(o).merge(o.descendants().intersection(r)),g.push(o),m.forEach(function(y){l.push(y),p.add(y),tt.merge(y)});for(var u=function(){o=l.shift();var C=d.collection();o.neighborhood().nodes().forEach(function(O){r.intersection(o.edgesWith(O)).length>0&&C.merge(O)});for(var M=0;M<C.length;M++){var G=C[M];c=i.intersection(G.union(G.ancestors())),c!=null&&!p.has(c[0])&&c.union(c.descendants()).forEach(function(O){l.push(O),p.add(O),tt.merge(O),i.has(O)&&g.push(O)})}};l.length!=0;)u();if(tt.forEach(function(y){r.intersection(y.connectedEdges()).forEach(function(C){tt.has(C.source())&&tt.has(C.target())&&tt.merge(C)})}),g.length==i.length&&(I=!0),!I||I&&S>1){T=g[0],A=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<A&&(A=y.connectedEdges().length,T=y)}),Y.push(T.id());var E=d.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],i=i.difference(E),S++}};do z();while(!I);return f&&Y.length>0&&f.set("dummy"+(f.size+1),Y),W},e.relocateComponent=function(d,r,i){if(!i.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(i.quality=="draft"){var c=!0,T=!1,A=void 0;try{for(var I=r.nodeIndexes[Symbol.iterator](),S;!(c=(S=I.next()).done);c=!0){var Y=S.value,W=a(Y,2),z=W[0],x=W[1],tt=i.cy.getElementById(z);if(tt){var o=tt.boundingBox(),m=r.xCoords[x]-o.w/2,u=r.xCoords[x]+o.w/2,E=r.yCoords[x]-o.h/2,y=r.yCoords[x]+o.h/2;m<f&&(f=m),u>l&&(l=u),E<p&&(p=E),y>g&&(g=y)}}}catch(R){T=!0,A=R}finally{try{!c&&I.return&&I.return()}finally{if(T)throw A}}var C=d.x-(l+f)/2,M=d.y-(g+p)/2;r.xCoords=r.xCoords.map(function(R){return R+C}),r.yCoords=r.yCoords.map(function(R){return R+M})}else{Object.keys(r).forEach(function(R){var V=r[R],B=V.getRect().x,rt=V.getRect().x+V.getRect().width,K=V.getRect().y,P=V.getRect().y+V.getRect().height;B<f&&(f=B),rt>l&&(l=rt),K<p&&(p=K),P>g&&(g=P)});var G=d.x-(l+f)/2,O=d.y-(g+p)/2;Object.keys(r).forEach(function(R){var V=r[R];V.setCenter(V.getCenterX()+G,V.getCenterY()+O)})}}},e.calcBoundingBox=function(d,r,i,f){for(var l=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,T=void 0,A=void 0,I=void 0,S=void 0,Y=d.descendants().not(":parent"),W=Y.length,z=0;z<W;z++){var x=Y[z];T=r[f.get(x.id())]-x.width()/2,A=r[f.get(x.id())]+x.width()/2,I=i[f.get(x.id())]-x.height()/2,S=i[f.get(x.id())]+x.height()/2,l>T&&(l=T),p<A&&(p=A),g>I&&(g=I),c<S&&(c=S)}var tt={};return tt.topLeftX=l,tt.topLeftY=g,tt.width=p-l,tt.height=c-g,tt},e.calcParentsWithoutChildren=function(d,r){var i=d.collection();return r.nodes(":parent").forEach(function(f){var l=!1;f.children().forEach(function(p){p.css("display")!="none"&&(l=!0)}),l||i.merge(f)}),i},s.exports=e}),816:((s,n,t)=>{var a=t(548),h=t(140).CoSELayout,e=t(140).CoSENode,d=t(140).layoutBase.PointD,r=t(140).layoutBase.DimensionD,i=t(140).layoutBase.LayoutConstants,f=t(140).layoutBase.FDLayoutConstants,l=t(140).CoSEConstants;s.exports={coseLayout:function(g,c){var T=g.cy,A=g.eles,I=A.nodes(),S=A.edges(),Y=void 0,W=void 0,z=void 0,x={};g.randomize&&(Y=c.nodeIndexes,W=c.xCoords,z=c.yCoords);var tt=function(O){return typeof O=="function"},o=function(O,R){return tt(O)?O(R):O},m=a.calcParentsWithoutChildren(T,A),u=function G(O,R,V,B){for(var rt=R.length,K=0;K<rt;K++){var P=R[K],b=null;P.intersection(m).length==0&&(b=P.children());var X=void 0,Q=P.layoutDimensions({nodeDimensionsIncludeLabels:B.nodeDimensionsIncludeLabels});if(P.outerWidth()!=null&&P.outerHeight()!=null)if(B.randomize)if(!P.isParent())X=O.add(new e(V.graphManager,new d(W[Y.get(P.id())]-Q.w/2,z[Y.get(P.id())]-Q.h/2),new r(parseFloat(Q.w),parseFloat(Q.h))));else{var at=a.calcBoundingBox(P,W,z,Y);P.intersection(m).length==0?X=O.add(new e(V.graphManager,new d(at.topLeftX,at.topLeftY),new r(at.width,at.height))):X=O.add(new e(V.graphManager,new d(at.topLeftX,at.topLeftY),new r(parseFloat(Q.w),parseFloat(Q.h))))}else X=O.add(new e(V.graphManager,new d(P.position("x")-Q.w/2,P.position("y")-Q.h/2),new r(parseFloat(Q.w),parseFloat(Q.h))));else X=O.add(new e(this.graphManager));if(X.id=P.data("id"),X.nodeRepulsion=o(B.nodeRepulsion,P),X.paddingLeft=parseInt(P.css("padding")),X.paddingTop=parseInt(P.css("padding")),X.paddingRight=parseInt(P.css("padding")),X.paddingBottom=parseInt(P.css("padding")),B.nodeDimensionsIncludeLabels&&(X.labelWidth=P.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=P.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=P.css("text-valign"),X.labelPosHorizontal=P.css("text-halign")),x[P.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),b!=null&&b.length>0){var J=void 0;J=V.getGraphManager().add(V.newGraph(),X),G(J,b,V,B)}}},E=function(O,R,V){for(var B=0,rt=0,K=0;K<V.length;K++){var P=V[K],b=x[P.data("source")],X=x[P.data("target")];if(b&&X&&b!==X&&b.getEdgesBetween(X).length==0){var Q=R.add(O.newEdge(),b,X);Q.id=P.id(),Q.idealLength=o(g.idealEdgeLength,P),Q.edgeElasticity=o(g.edgeElasticity,P),B+=Q.idealLength,rt++}}g.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=B/rt:tt(g.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=g.idealEdgeLength,l.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)},y=function(O,R){R.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=R.fixedNodeConstraint),R.alignmentConstraint&&(O.constraints.alignmentConstraint=R.alignmentConstraint),R.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=R.relativePlacementConstraint)};g.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(l.MAX_ITERATIONS=f.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=g.tilingCompareBy),g.quality=="proof"?i.QUALITY=2:i.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!g.randomize,l.ANIMATE=f.ANIMATE=i.ANIMATE=g.animate,l.TILE=g.tile,l.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!g.randomize,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=g.uniformNodeDimensions,g.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),g.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),g.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),g.step=="all"&&(g.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var C=new h,M=C.newGraphManager();return u(M.addRoot(),a.getTopMostNodes(I),C,g),E(C,M,S),y(C,g),C.runLayout(),x}}}),212:((s,n,t)=>{var a=(function(){function l(p,g){for(var c=0;c<g.length;c++){var T=g[c];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(p,T.key,T)}}return function(p,g,c){return g&&l(p.prototype,g),c&&l(p,c),p}})();function h(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}var e=t(658),d=t(548),r=t(657).spectralLayout,i=t(816).coseLayout,f=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(p){return 4500},idealEdgeLength:function(p){return 50},edgeElasticity:function(p){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}});s.exports=(function(){function l(p){h(this,l),this.options=e({},f,p)}return a(l,[{key:"run",value:function(){var g=this,c=this.options,T=c.cy,A=c.eles,I=[],S=[],Y=void 0,W=[];c.fixedNodeConstraint&&(!Array.isArray(c.fixedNodeConstraint)||c.fixedNodeConstraint.length==0)&&(c.fixedNodeConstraint=void 0),c.alignmentConstraint&&(c.alignmentConstraint.vertical&&(!Array.isArray(c.alignmentConstraint.vertical)||c.alignmentConstraint.vertical.length==0)&&(c.alignmentConstraint.vertical=void 0),c.alignmentConstraint.horizontal&&(!Array.isArray(c.alignmentConstraint.horizontal)||c.alignmentConstraint.horizontal.length==0)&&(c.alignmentConstraint.horizontal=void 0)),c.relativePlacementConstraint&&(!Array.isArray(c.relativePlacementConstraint)||c.relativePlacementConstraint.length==0)&&(c.relativePlacementConstraint=void 0),(c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint)&&(c.tile=!1,c.packComponents=!1);var z=void 0,x=!1;if(T.layoutUtilities&&c.packComponents&&(z=T.layoutUtilities("get"),z||(z=T.layoutUtilities()),x=!0),A.nodes().length>0)if(x){var m=d.getTopMostNodes(c.eles.nodes());if(Y=d.connectComponents(T,c.eles,m),Y.forEach(function(J){var k=J.boundingBox();W.push({x:k.x1+k.w/2,y:k.y1+k.h/2})}),c.randomize&&Y.forEach(function(J){c.eles=J,I.push(r(c))}),c.quality=="default"||c.quality=="proof"){var u=T.collection();if(c.tile){var E=new Map,y=[],C=[],M=0,G={nodeIndexes:E,xCoords:y,yCoords:C},O=[];if(Y.forEach(function(J,k){J.edges().length==0&&(J.nodes().forEach(function(Et,ft){u.merge(J.nodes()[ft]),Et.isParent()||(G.nodeIndexes.set(J.nodes()[ft].id(),M++),G.xCoords.push(J.nodes()[0].position().x),G.yCoords.push(J.nodes()[0].position().y))}),O.push(k))}),u.length>1){var R=u.boundingBox();W.push({x:R.x1+R.w/2,y:R.y1+R.h/2}),Y.push(u),I.push(G);for(var V=O.length-1;V>=0;V--)Y.splice(O[V],1),I.splice(O[V],1),W.splice(O[V],1)}}Y.forEach(function(J,k){c.eles=J,S.push(i(c,I[k])),d.relocateComponent(W[k],S[k],c)})}else Y.forEach(function(J,k){d.relocateComponent(W[k],I[k],c)});var B=new Set;if(Y.length>1){var rt=[],K=A.filter(function(J){return J.css("display")=="none"});Y.forEach(function(J,k){var Et=void 0;if(c.quality=="draft"&&(Et=I[k].nodeIndexes),J.nodes().not(K).length>0){var ft={};ft.edges=[],ft.nodes=[];var q=void 0;J.nodes().not(K).forEach(function(mt){if(c.quality=="draft")if(!mt.isParent())q=Et.get(mt.id()),ft.nodes.push({x:I[k].xCoords[q]-mt.boundingbox().w/2,y:I[k].yCoords[q]-mt.boundingbox().h/2,width:mt.boundingbox().w,height:mt.boundingbox().h});else{var ot=d.calcBoundingBox(mt,I[k].xCoords,I[k].yCoords,Et);ft.nodes.push({x:ot.topLeftX,y:ot.topLeftY,width:ot.width,height:ot.height})}else S[k][mt.id()]&&ft.nodes.push({x:S[k][mt.id()].getLeft(),y:S[k][mt.id()].getTop(),width:S[k][mt.id()].getWidth(),height:S[k][mt.id()].getHeight()})}),J.edges().forEach(function(mt){var ot=mt.source(),wt=mt.target();if(ot.css("display")!="none"&&wt.css("display")!="none")if(c.quality=="draft"){var Vt=Et.get(ot.id()),Dt=Et.get(wt.id()),xt=[],Gt=[];if(ot.isParent()){var zt=d.calcBoundingBox(ot,I[k].xCoords,I[k].yCoords,Et);xt.push(zt.topLeftX+zt.width/2),xt.push(zt.topLeftY+zt.height/2)}else xt.push(I[k].xCoords[Vt]),xt.push(I[k].yCoords[Vt]);if(wt.isParent()){var Ft=d.calcBoundingBox(wt,I[k].xCoords,I[k].yCoords,Et);Gt.push(Ft.topLeftX+Ft.width/2),Gt.push(Ft.topLeftY+Ft.height/2)}else Gt.push(I[k].xCoords[Dt]),Gt.push(I[k].yCoords[Dt]);ft.edges.push({startX:xt[0],startY:xt[1],endX:Gt[0],endY:Gt[1]})}else S[k][ot.id()]&&S[k][wt.id()]&&ft.edges.push({startX:S[k][ot.id()].getCenterX(),startY:S[k][ot.id()].getCenterY(),endX:S[k][wt.id()].getCenterX(),endY:S[k][wt.id()].getCenterY()})}),ft.nodes.length>0&&(rt.push(ft),B.add(k))}});var P=z.packComponents(rt,c.randomize).shifts;if(c.quality=="draft")I.forEach(function(J,k){var Et=J.xCoords.map(function(q){return q+P[k].dx}),ft=J.yCoords.map(function(q){return q+P[k].dy});J.xCoords=Et,J.yCoords=ft});else{var b=0;B.forEach(function(J){Object.keys(S[J]).forEach(function(k){var Et=S[J][k];Et.setCenter(Et.getCenterX()+P[b].dx,Et.getCenterY()+P[b].dy)}),b++})}}}else{var tt=c.eles.boundingBox();if(W.push({x:tt.x1+tt.w/2,y:tt.y1+tt.h/2}),c.randomize){var o=r(c);I.push(o)}c.quality=="default"||c.quality=="proof"?(S.push(i(c,I[0])),d.relocateComponent(W[0],S[0],c)):d.relocateComponent(W[0],I[0],c)}var X=function(k,Et){if(c.quality=="default"||c.quality=="proof"){typeof k=="number"&&(k=Et);var ft=void 0,q=void 0,mt=k.data("id");return S.forEach(function(wt){mt in wt&&(ft={x:wt[mt].getRect().getCenterX(),y:wt[mt].getRect().getCenterY()},q=wt[mt])}),c.nodeDimensionsIncludeLabels&&(q.labelWidth&&(q.labelPosHorizontal=="left"?ft.x+=q.labelWidth/2:q.labelPosHorizontal=="right"&&(ft.x-=q.labelWidth/2)),q.labelHeight&&(q.labelPosVertical=="top"?ft.y+=q.labelHeight/2:q.labelPosVertical=="bottom"&&(ft.y-=q.labelHeight/2))),ft==null&&(ft={x:k.position("x"),y:k.position("y")}),{x:ft.x,y:ft.y}}else{var ot=void 0;return I.forEach(function(wt){var Vt=wt.nodeIndexes.get(k.id());Vt!=null&&(ot={x:wt.xCoords[Vt],y:wt.yCoords[Vt]})}),ot==null&&(ot={x:k.position("x"),y:k.position("y")}),{x:ot.x,y:ot.y}}};if(c.quality=="default"||c.quality=="proof"||c.randomize){var Q=d.calcParentsWithoutChildren(T,A),at=A.filter(function(J){return J.css("display")=="none"});c.eles=A.not(at),A.nodes().not(":parent").not(at).layoutPositions(g,c,X),Q.length>0&&Q.forEach(function(J){J.position(X(J))})}}}]),l})()}),657:((s,n,t)=>{var a=t(548),h=t(140).layoutBase.Matrix,e=t(140).layoutBase.SVD;s.exports={spectralLayout:function(r){var i=r.cy,f=r.eles,l=f.nodes(),p=f.nodes(":parent"),g=new Map,c=new Map,T=new Map,A=[],I=[],S=[],Y=[],W=[],z=[],x=[],tt=[],o=void 0,m=1e8,u=1e-9,E=r.piTol,y=r.samplingType,C=r.nodeSeparation,M=void 0,G=function(){for(var gt=0,D=0,H=!1;D<M;){gt=Math.floor(Math.random()*o),H=!1;for(var $=0;$<D;$++)if(Y[$]==gt){H=!0;break}if(!H)Y[D]=gt,D++;else continue}},O=function(gt,D,H){for(var $=[],j=0,Z=0,_=0,pt=void 0,ct=[],it=0,dt=1,Lt=0;Lt<o;Lt++)ct[Lt]=m;for($[Z]=gt,ct[gt]=0;Z>=j;){_=$[j++];for(var Mt=A[_],et=0;et<Mt.length;et++)pt=c.get(Mt[et]),ct[pt]==m&&(ct[pt]=ct[_]+1,$[++Z]=pt);z[_][D]=ct[_]*C}if(H){for(var Nt=0;Nt<o;Nt++)z[Nt][D]<W[Nt]&&(W[Nt]=z[Nt][D]);for(var st=0;st<o;st++)W[st]>it&&(it=W[st],dt=st)}return dt},R=function(gt){var D=void 0;if(gt){D=Math.floor(Math.random()*o);for(var $=0;$<o;$++)W[$]=m;for(var j=0;j<M;j++)Y[j]=D,D=O(D,j,gt)}else{G();for(var H=0;H<M;H++)O(Y[H],H,gt,!1)}for(var Z=0;Z<o;Z++)for(var _=0;_<M;_++)z[Z][_]*=z[Z][_];for(var pt=0;pt<M;pt++)x[pt]=[];for(var ct=0;ct<M;ct++)for(var it=0;it<M;it++)x[ct][it]=z[Y[it]][ct]},V=function(){for(var gt=e.svd(x),D=gt.S,H=gt.U,$=gt.V,j=D[0]*D[0]*D[0],Z=[],_=0;_<M;_++){Z[_]=[];for(var pt=0;pt<M;pt++)Z[_][pt]=0,_==pt&&(Z[_][pt]=D[_]/(D[_]*D[_]+j/(D[_]*D[_])))}tt=h.multMat(h.multMat($,Z),h.transpose(H))},B=function(){for(var gt=void 0,D=void 0,H=[],$=[],j=[],Z=[],_=0;_<o;_++)H[_]=Math.random(),$[_]=Math.random();H=h.normalize(H),$=h.normalize($);for(var pt=0,ct=u,it=u,dt=void 0;;){pt++;for(var Lt=0;Lt<o;Lt++)j[Lt]=H[Lt];if(H=h.multGamma(h.multL(h.multGamma(j),z,tt)),gt=h.dotProduct(j,H),H=h.normalize(H),ct=h.dotProduct(j,H),dt=Math.abs(ct/it),dt<=1+E&&dt>=1)break;it=ct}for(var Mt=0;Mt<o;Mt++)j[Mt]=H[Mt];for(pt=0,it=u;;){pt++;for(var et=0;et<o;et++)Z[et]=$[et];if(Z=h.minusOp(Z,h.multCons(j,h.dotProduct(j,Z))),$=h.multGamma(h.multL(h.multGamma(Z),z,tt)),D=h.dotProduct(Z,$),$=h.normalize($),ct=h.dotProduct(Z,$),dt=Math.abs(ct/it),dt<=1+E&&dt>=1)break;it=ct}for(var Nt=0;Nt<o;Nt++)Z[Nt]=$[Nt];I=h.multCons(j,Math.sqrt(Math.abs(gt))),S=h.multCons(Z,Math.sqrt(Math.abs(D)))};a.connectComponents(i,f,a.getTopMostNodes(l),g),p.forEach(function(Ct){a.connectComponents(i,f,a.getTopMostNodes(Ct.descendants().intersection(f)),g)});for(var rt=0,K=0;K<l.length;K++)l[K].isParent()||c.set(l[K].id(),rt++);var P=!0,b=!1,X=void 0;try{for(var Q=g.keys()[Symbol.iterator](),at;!(P=(at=Q.next()).done);P=!0){var J=at.value;c.set(J,rt++)}}catch(Ct){b=!0,X=Ct}finally{try{!P&&Q.return&&Q.return()}finally{if(b)throw X}}for(var k=0;k<c.size;k++)A[k]=[];p.forEach(function(Ct){for(var gt=Ct.children().intersection(f);gt.nodes(":childless").length==0;)gt=gt.nodes()[0].children().intersection(f);var D=0,H=gt.nodes(":childless")[0].connectedEdges().length;gt.nodes(":childless").forEach(function($,j){$.connectedEdges().length<H&&(H=$.connectedEdges().length,D=j)}),T.set(Ct.id(),gt.nodes(":childless")[D].id())}),l.forEach(function(Ct){var gt=void 0;Ct.isParent()?gt=c.get(T.get(Ct.id())):gt=c.get(Ct.id()),Ct.neighborhood().nodes().forEach(function(D){f.intersection(Ct.edgesWith(D)).length>0&&(D.isParent()?A[gt].push(T.get(D.id())):A[gt].push(D.id()))})});var Et=function(gt){var D=c.get(gt),H=void 0;g.get(gt).forEach(function($){i.getElementById($).isParent()?H=T.get($):H=$,A[D].push(H),A[c.get(H)].push(gt)})},ft=!0,q=!1,mt=void 0;try{for(var ot=g.keys()[Symbol.iterator](),wt;!(ft=(wt=ot.next()).done);ft=!0){var Vt=wt.value;Et(Vt)}}catch(Ct){q=!0,mt=Ct}finally{try{!ft&&ot.return&&ot.return()}finally{if(q)throw mt}}o=c.size;var Dt=void 0;if(o>2){M=o<r.sampleSize?o:r.sampleSize;for(var xt=0;xt<o;xt++)z[xt]=[];for(var Gt=0;Gt<M;Gt++)tt[Gt]=[];return r.quality=="draft"||r.step=="all"?(R(y),V(),B(),Dt={nodeIndexes:c,xCoords:I,yCoords:S}):(c.forEach(function(Ct,gt){I.push(i.getElementById(gt).position("x")),S.push(i.getElementById(gt).position("y"))}),Dt={nodeIndexes:c,xCoords:I,yCoords:S}),Dt}else{var zt=c.keys(),Ft=i.getElementById(zt.next().value),Bt=Ft.position(),Yt=Ft.outerWidth();if(I.push(Bt.x),S.push(Bt.y),o==2){var kt=i.getElementById(zt.next().value).outerWidth();I.push(Bt.x+Yt/2+kt/2+r.idealEdgeLength),S.push(Bt.y)}return Dt={nodeIndexes:c,xCoords:I,yCoords:S},Dt}}}}),579:((s,n,t)=>{var a=t(212),h=function(d){d&&d("layout","fcose",a)};typeof cytoscape<"u"&&h(cytoscape),s.exports=h}),140:(s=>{s.exports=w})},N={};function v(s){var n=N[s];if(n!==void 0)return n.exports;var t=N[s]={exports:{}};return U[s](t,t.exports,v),t.exports}return v(579)})()})})),qe=he.__toESM(ke(),1),Me={L:"left",R:"right",T:"top",B:"bottom"},Oe={L:lt.__name(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:lt.__name(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:lt.__name(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:lt.__name(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},se={L:lt.__name((L,F)=>L-F+2,"L"),R:lt.__name((L,F)=>L-2,"R"),T:lt.__name((L,F)=>L-F+2,"T"),B:lt.__name((L,F)=>L-2,"B")},Ze=lt.__name(function(L){return Ht(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),De=lt.__name(function(L){const F=L;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Ht=lt.__name(function(L){const F=L;return F==="L"||F==="R"},"isArchitectureDirectionX"),Zt=lt.__name(function(L){const F=L;return F==="T"||F==="B"},"isArchitectureDirectionY"),me=lt.__name(function(L,F){const w=Ht(L)&&Zt(F),U=Zt(L)&&Ht(F);return w||U},"isArchitectureDirectionXY"),Je=lt.__name(function(L){const F=L[0],w=L[1],U=Ht(F)&&Zt(w),N=Zt(F)&&Ht(w);return U||N},"isArchitecturePairXY"),Qe=lt.__name(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),ve=lt.__name(function(L,F){const w=`${L}${F}`;return Qe(w)?w:void 0},"getArchitectureDirectionPair"),Ke=lt.__name(function([L,F],w){const U=w[0],N=w[1];return Ht(U)?Zt(N)?[L+(U==="L"?-1:1),F+(N==="T"?1:-1)]:[L+(U==="L"?-1:1),F]:Ht(N)?[L+(N==="L"?1:-1),F+(U==="T"?1:-1)]:[L,F+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),_e=lt.__name(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),je=lt.__name(function(L,F){return me(L,F)?"bend":Ht(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),tr=lt.__name(function(L){return L.type==="service"},"isArchitectureService"),er=lt.__name(function(L){return L.type==="junction"},"isArchitectureJunction"),Re=lt.__name(L=>L.data(),"edgeData"),ie=lt.__name(L=>L.data(),"nodeData"),rr=Wt.defaultConfig_default.architecture,Se=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Wt.setAccTitle,this.getAccTitle=Wt.getAccTitle,this.setDiagramTitle=Wt.setDiagramTitle,this.getDiagramTitle=Wt.getDiagramTitle,this.getAccDescription=Wt.getAccDescription,this.setAccDescription=Wt.setAccDescription,this.clear()}static{lt.__name(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Wt.clear()}addService({id:L,icon:F,in:w,title:U,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(w!==void 0){if(L===w)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:F,iconText:N,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(tr)}addJunction({id:L,in:F}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(F!==void 0){if(L===F)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[F]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[F]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:F}}getJunctions(){return Object.values(this.nodes).filter(er)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:F,in:w,title:U}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(w!==void 0){if(L===w)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:F,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:F,lhsDir:w,rhsDir:U,lhsInto:N,rhsInto:v,lhsGroup:s,rhsGroup:n,title:t}){if(!De(w))throw new Error(`Invalid direction given for left hand side of edge ${L}--${F}. Expected (L,R,T,B) got ${String(w)}`);if(!De(U))throw new Error(`Invalid direction given for right hand side of edge ${L}--${F}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[F]===void 0&&this.groups[F]===void 0)throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,h=this.nodes[F].in;if(s&&a&&h&&a==h)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&a&&h&&a==h)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:w,lhsInto:N,lhsGroup:s,rhsId:F,rhsDir:U,rhsInto:v,rhsGroup:n,title:t};this.edges.push(e),this.nodes[L]&&this.nodes[F]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[F].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const F=new Set;L.members.forEach(w=>{if(this.registeredIds[w]!=="node")throw new Error(`align ${L.direction} references [${w}], which is not a service or junction`);if(F.has(w))throw new Error(`align ${L.direction} lists [${w}] more than once`);F.add(w)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},F=Object.entries(this.nodes).reduce((n,[t,a])=>(n[t]=a.edges.reduce((h,e)=>{const d=this.getNode(e.lhsId)?.in,r=this.getNode(e.rhsId)?.in;if(d&&r&&d!==r){const i=je(e.lhsDir,e.rhsDir);i!=="bend"&&(L[d]??={},L[d][r]=i,L[r]??={},L[r][d]=i)}if(e.lhsId===t){const i=ve(e.lhsDir,e.rhsDir);i&&(h[i]=e.rhsId)}else{const i=ve(e.rhsDir,e.lhsDir);i&&(h[i]=e.lhsId)}return h},{}),n),{}),w=Object.keys(F)[0],U={[w]:1},N=Object.keys(F).reduce((n,t)=>t===w?n:{...n,[t]:1},{}),v=lt.__name(n=>{const t={[n]:[0,0]},a=[n];for(;a.length>0;){const h=a.shift();if(h){U[h]=1,delete N[h];const e=F[h],[d,r]=t[h];Object.entries(e).forEach(([i,f])=>{U[f]||(t[f]=Ke([d,r],i),a.push(f))})}}return t},"BFS"),s=[v(w)];for(;Object.keys(N).length>0;)s.push(v(Object.keys(N)[0]));this.dataStructures={adjList:F,spatialMaps:s,groupAlignments:L}}return this.dataStructures}setElementForId(L,F){this.elements[L]=F}getElementById(L){return this.elements[L]}getConfig(){return xe.cleanAndMerge({...rr,...Wt.getConfig().architecture})}getConfigField(L){return this.getConfig()[L]}},ir=lt.__name((L,F)=>{$e.populateCommonDb(L,F),L.groups.map(w=>F.addGroup(w)),L.services.map(w=>F.addService({...w,type:"service"})),L.junctions.map(w=>F.addJunction({...w,type:"junction"})),L.edges.map(w=>F.addEdge(w)),L.alignments?.map(w=>F.addLayoutHint({direction:w.direction,members:[...w.members]}))},"populateDb"),Fe={parser:{yy:void 0},parse:lt.__name(async L=>{const F=await Be.parse("architecture",L);de.log.debug(F);const w=Fe.parser?.yy;if(!(w instanceof Se))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");ir(F,w)},"parse")},ar=lt.__name(L=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${L.archEdgeWidth};
|
|
4
4
|
stroke: ${L.archEdgeColor};
|
|
@@ -33,4 +33,4 @@ const he=require("./rolldown-runtime-CAnuVJ4g.cjs"),ze=require("./mermaid-parser
|
|
|
33
33
|
translate(${A}, ${I-u.height/2})
|
|
34
34
|
translate(${E*C.width/2}, ${y*C.height/2})
|
|
35
35
|
rotate(${-1*E*y*45}, 0, ${u.height/2})
|
|
36
|
-
`)}}}}}))},"drawEdges"),or=lt.__name(async function(L,F,w,U){const N=w.getConfigField("padding")*.75,v=w.getConfigField("fontSize"),s=w.getConfigField("iconSize")/2;await Promise.all(F.nodes().map(async n=>{const t=ie(n);if(t.type==="group"){const{h:a,w:h,x1:e,y1:d}=n.boundingBox(),r=L.append("rect");r.attr("id",`${U}-group-${t.id}`).attr("x",e+s).attr("y",d+s).attr("width",h).attr("height",a).attr("class","node-bkg");const i=L.append("g");let f=e,l=d;if(t.icon){const p=i.append("g");p.html(`<g>${await ae.getIconSVG(t.icon,{height:N,width:N,fallbackPrefix:ne.prefix})}</g>`),p.attr("transform","translate("+(f+s+1)+", "+(l+s+1)+")"),f+=N,l+=v/2-1-2}if(t.label){const p=i.append("g");await ye.createText(p,t.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},Wt.getConfig2()),p.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),p.attr("transform","translate("+(f+s+4)+", "+(l+s+2)+")")}w.setElementForId(t.id,r)}}))},"drawGroups"),sr=lt.__name(async function(L,F,w,U){const N=Wt.getConfig2();for(const v of w){const s=F.append("g"),n=L.getConfigField("iconSize");if(v.title){const e=s.append("g");await ye.createText(e,v.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},N),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+n/2+", "+n+")")}const t=s.append("g");if(v.icon)t.html(`<g>${await ae.getIconSVG(v.icon,{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);else if(v.iconText){t.html(`<g>${await ae.getIconSVG("blank",{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);const e=t.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(Wt.sanitizeText(v.iconText,N)),d=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;e.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/d)};`)}else t.append("path").attr("class","node-bkg").attr("id",`${U}-node-${v.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);s.attr("id",`${U}-service-${v.id}`).attr("class","architecture-service");const{width:a,height:h}=s.node().getBBox();v.width=a,v.height=h,L.setElementForId(v.id,s)}return 0},"drawServices"),hr=lt.__name(function(L,F,w,U){w.forEach(N=>{const v=F.append("g"),s=L.getConfigField("iconSize");v.append("g").append("rect").attr("id",`${U}-node-${N.id}`).attr("fill-opacity","0").attr("width",s).attr("height",s),v.attr("class","architecture-junction");const{width:n,height:t}=v._groups[0][0].getBBox();v.width=n,v.height=t,L.setElementForId(N.id,v)})},"drawJunctions");ae.registerIconPacks([{name:ne.prefix,icons:ne}]);Ie.cytoscape.use(qe.default);function be(L,F,w){L.forEach(U=>{F.add({group:"nodes",data:{type:"service",id:U.id,icon:U.icon,label:U.title,parent:U.in,width:w.getConfigField("iconSize"),height:w.getConfigField("iconSize")},classes:"node-service"})})}lt.__name(be,"addServices");function Ge(L,F,w){L.forEach(U=>{F.add({group:"nodes",data:{type:"junction",id:U.id,parent:U.in,width:w.getConfigField("iconSize"),height:w.getConfigField("iconSize")},classes:"node-junction"})})}lt.__name(Ge,"addJunctions");function Pe(L,F){F.nodes().map(w=>{const U=ie(w);U.type!=="group"&&(U.x=w.position().x,U.y=w.position().y,L.getElementById(U.id).attr("transform","translate("+(U.x||0)+","+(U.y||0)+")"))})}lt.__name(Pe,"positionNodes");function Ue(L,F){L.forEach(w=>{F.add({group:"nodes",data:{type:"group",id:w.id,icon:w.icon,label:w.title,parent:w.in},classes:"node-group"})})}lt.__name(Ue,"addGroups");function Ye(L,F){L.forEach(w=>{const{lhsId:U,rhsId:N,lhsInto:v,lhsGroup:s,rhsInto:n,lhsDir:t,rhsDir:a,rhsGroup:h,title:e}=w,d=me(w.lhsDir,w.rhsDir)?"segments":"straight",r={id:`${U}-${N}`,label:e,source:U,sourceDir:t,sourceArrow:v,sourceGroup:s,sourceEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%",target:N,targetDir:a,targetArrow:n,targetGroup:h,targetEndpoint:a==="L"?"0 50%":a==="R"?"100% 50%":a==="T"?"50% 0":"50% 100%"};F.add({group:"edges",data:r,classes:d})})}lt.__name(Ye,"addEdges");function Xe(L,F,w,U=[]){const N=lt.__name((e,d)=>Object.entries(e).reduce((r,[i,f])=>{let l=0;const p=Object.entries(f);if(p.length===1)return r[i]=p[0][1],r;for(let g=0;g<p.length-1;g++)for(let c=g+1;c<p.length;c++){const[T,A]=p[g],[I,S]=p[c];if(w[T]?.[I]===d)r[i]??=[],r[i]=[...r[i],...A,...S];else if(T==="default"||I==="default")r[i]??=[],r[i]=[...r[i],...A,...S];else{const Y=`${i}-${l++}`;r[Y]=A;const W=`${i}-${l++}`;r[W]=S}}return r},{}),"flattenAlignments"),[v,s]=F.map(e=>{const d={},r={};return Object.entries(e).forEach(([i,[f,l]])=>{const p=L.getNode(i)?.in??"default";d[l]??={},d[l][p]??=[],d[l][p].push(i),r[f]??={},r[f][p]??=[],r[f][p].push(i)}),{horiz:Object.values(N(d,"horizontal")).filter(i=>i.length>1),vert:Object.values(N(r,"vertical")).filter(i=>i.length>1)}}).reduce(([e,d],{horiz:r,vert:i})=>[[...e,...r],[...d,...i]],[[],[]]),n=new Set;U.forEach(e=>e.members.forEach(d=>n.add(d)));const t=lt.__name(e=>e.filter(d=>!d.some(r=>n.has(r))),"dropOverlapping"),a=t(v),h=t(s);return U.forEach(e=>{e.members.length<2||(e.direction==="row"?a.push([...e.members]):h.push([...e.members]))}),{horizontal:a,vertical:h}}lt.__name(Xe,"getAlignments");function He(L,F,w=[]){const U=[],N=F.getConfigField("iconSize"),v=F.getConfigField("idealEdgeLengthMultiplier"),s=v*N,n=new Set;w.forEach(h=>{for(let e=0;e<h.members.length-1;e++){const d=h.members[e],r=h.members[e+1];n.add(`${d}|${r}`),n.add(`${r}|${d}`),h.direction==="row"?U.push({left:d,right:r,gap:s}):U.push({top:d,bottom:r,gap:s})}});const t=lt.__name(h=>`${h[0]},${h[1]}`,"posToStr"),a=lt.__name(h=>h.split(",").map(e=>parseInt(e)),"strToPos");return L.forEach(h=>{const e=Object.fromEntries(Object.entries(h).map(([f,l])=>[t(l),f])),d=[t([0,0])],r={},i={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;d.length>0;){const f=d.shift();if(f){r[f]=1;const l=e[f];if(l){const p=a(f);Object.entries(i).forEach(([g,c])=>{const T=t([p[0]+c[0],p[1]+c[1]]),A=e[T];if(A&&!r[T]){if(d.push(T),n.has(`${l}|${A}`))return;U.push({[Me[g]]:A,[Me[Ze(g)]]:l,gap:v*N})}})}}}}),U}lt.__name(He,"getRelativeConstraints");function Ve(L,F,w,U,N,{spatialMaps:v,groupAlignments:s}){return new Promise(n=>{const t=de.select_default("body").append("div").attr("id","cy").attr("style","display:none"),a=Ie.cytoscape({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});t.remove(),Ue(w,a),be(L,a,N),Ge(F,a,N),Ye(U,a);const h=N.getLayoutHints(),e=Xe(N,v,s,h),d=He(v,N,h),r=N.getConfigField("iconSize"),i=N.getConfigField("idealEdgeLengthMultiplier")*r,f=.5*r,l=N.getConfigField("edgeElasticity"),p=N.getConfigField("seed"),g=a.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(c){const[T,A]=c.connectedNodes(),{parent:I}=ie(T),{parent:S}=ie(A);return I===S?i:f},edgeElasticity(c){const[T,A]=c.connectedNodes(),{parent:I}=ie(T),{parent:S}=ie(A);return I===S?l:.001},alignmentConstraint:e,relativePlacementConstraint:d});g.one("layoutstop",()=>{function c(T,A,I,S){let Y,W;const{x:z,y:x}=T,{x:tt,y:o}=A;W=(S-x+(z-I)*(x-o)/(z-tt))/Math.sqrt(1+Math.pow((x-o)/(z-tt),2)),Y=Math.sqrt(Math.pow(S-x,2)+Math.pow(I-z,2)-Math.pow(W,2));const m=Math.sqrt(Math.pow(tt-z,2)+Math.pow(o-x,2));Y=Y/m;let u=(tt-z)*(S-x)-(o-x)*(I-z);switch(!0){case u>=0:u=1;break;case u<0:u=-1;break}let E=(tt-z)*(I-z)+(o-x)*(S-x);switch(!0){case E>=0:E=1;break;case E<0:E=-1;break}return W=Math.abs(W)*u,Y=Y*E,{distances:W,weights:Y}}lt.__name(c,"getSegmentWeights"),a.startBatch();for(const T of Object.values(a.edges()))if(T.data?.()){const{x:A,y:I}=T.source().position(),{x:S,y:Y}=T.target().position();if(A!==S&&I!==Y){const W=T.sourceEndpoint(),z=T.targetEndpoint(),{sourceDir:x}=Re(T),[tt,o]=Zt(x)?[W.x,z.y]:[z.x,W.y],{weights:m,distances:u}=c(W,z,tt,o);T.style("segment-distances",u),T.style("segment-weights",m)}}a.endBatch(),pe(p,()=>g.run())});try{pe(p,()=>g.run())}catch(c){throw c instanceof RangeError&&c.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):c}a.ready(c=>{de.log.info("Ready",c),n(a)})})}lt.__name(Ve,"layoutArchitecture");var lr={parser:Fe,get db(){return new Se},renderer:{draw:lt.__name(async(L,F,w,U)=>{const N=U.db;N.setDiagramId(F);const v=N.getServices(),s=N.getJunctions(),n=N.getGroups(),t=N.getEdges(),a=N.getDataStructures(),h=$e.selectSvgElement(F),e=h.append("g");e.attr("class","architecture-edges");const d=h.append("g");d.attr("class","architecture-services");const r=h.append("g");r.attr("class","architecture-groups"),await sr(N,d,v,F),hr(N,d,s,F);const i=await Ve(v,s,n,t,N,a);await nr(e,i,N,F),await or(r,i,N,F),Pe(N,i),Wt.setupGraphViewbox(void 0,h,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw")},styles:ar};exports.diagram=lr;
|
|
36
|
+
`)}}}}}))},"drawEdges"),or=lt.__name(async function(L,F,w,U){const N=w.getConfigField("padding")*.75,v=w.getConfigField("fontSize"),s=w.getConfigField("iconSize")/2;await Promise.all(F.nodes().map(async n=>{const t=ie(n);if(t.type==="group"){const{h:a,w:h,x1:e,y1:d}=n.boundingBox(),r=L.append("rect");r.attr("id",`${U}-group-${t.id}`).attr("x",e+s).attr("y",d+s).attr("width",h).attr("height",a).attr("class","node-bkg");const i=L.append("g");let f=e,l=d;if(t.icon){const p=i.append("g");p.html(`<g>${await ae.getIconSVG(t.icon,{height:N,width:N,fallbackPrefix:ne.prefix})}</g>`),p.attr("transform","translate("+(f+s+1)+", "+(l+s+1)+")"),f+=N,l+=v/2-1-2}if(t.label){const p=i.append("g");await ye.createText(p,t.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},Wt.getConfig2()),p.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),p.attr("transform","translate("+(f+s+4)+", "+(l+s+2)+")")}w.setElementForId(t.id,r)}}))},"drawGroups"),sr=lt.__name(async function(L,F,w,U){const N=Wt.getConfig2();for(const v of w){const s=F.append("g"),n=L.getConfigField("iconSize");if(v.title){const e=s.append("g");await ye.createText(e,v.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},N),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+n/2+", "+n+")")}const t=s.append("g");if(v.icon)t.html(`<g>${await ae.getIconSVG(v.icon,{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);else if(v.iconText){t.html(`<g>${await ae.getIconSVG("blank",{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);const e=t.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(Wt.sanitizeText(v.iconText,N)),d=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;e.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/d)};`)}else t.append("path").attr("class","node-bkg").attr("id",`${U}-node-${v.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);s.attr("id",`${U}-service-${v.id}`).attr("class","architecture-service");const{width:a,height:h}=s.node().getBBox();v.width=a,v.height=h,L.setElementForId(v.id,s)}return 0},"drawServices"),hr=lt.__name(function(L,F,w,U){w.forEach(N=>{const v=F.append("g"),s=L.getConfigField("iconSize");v.append("g").append("rect").attr("id",`${U}-node-${N.id}`).attr("fill-opacity","0").attr("width",s).attr("height",s),v.attr("class","architecture-junction");const{width:n,height:t}=v._groups[0][0].getBBox();v.width=n,v.height=t,L.setElementForId(N.id,v)})},"drawJunctions");ae.registerIconPacks([{name:ne.prefix,icons:ne}]);Ie.cytoscape.use(qe.default);function be(L,F,w){L.forEach(U=>{F.add({group:"nodes",data:{type:"service",id:U.id,icon:U.icon,label:U.title,parent:U.in,width:w.getConfigField("iconSize"),height:w.getConfigField("iconSize")},classes:"node-service"})})}lt.__name(be,"addServices");function Ge(L,F,w){L.forEach(U=>{F.add({group:"nodes",data:{type:"junction",id:U.id,parent:U.in,width:w.getConfigField("iconSize"),height:w.getConfigField("iconSize")},classes:"node-junction"})})}lt.__name(Ge,"addJunctions");function Pe(L,F){F.nodes().map(w=>{const U=ie(w);U.type!=="group"&&(U.x=w.position().x,U.y=w.position().y,L.getElementById(U.id).attr("transform","translate("+(U.x||0)+","+(U.y||0)+")"))})}lt.__name(Pe,"positionNodes");function Ue(L,F){L.forEach(w=>{F.add({group:"nodes",data:{type:"group",id:w.id,icon:w.icon,label:w.title,parent:w.in},classes:"node-group"})})}lt.__name(Ue,"addGroups");function Ye(L,F){L.forEach(w=>{const{lhsId:U,rhsId:N,lhsInto:v,lhsGroup:s,rhsInto:n,lhsDir:t,rhsDir:a,rhsGroup:h,title:e}=w,d=me(w.lhsDir,w.rhsDir)?"segments":"straight",r={id:`${U}-${N}`,label:e,source:U,sourceDir:t,sourceArrow:v,sourceGroup:s,sourceEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%",target:N,targetDir:a,targetArrow:n,targetGroup:h,targetEndpoint:a==="L"?"0 50%":a==="R"?"100% 50%":a==="T"?"50% 0":"50% 100%"};F.add({group:"edges",data:r,classes:d})})}lt.__name(Ye,"addEdges");function Xe(L,F,w,U=[]){const N=lt.__name((e,d)=>Object.entries(e).reduce((r,[i,f])=>{let l=0;const p=Object.entries(f);if(p.length===1)return r[i]=p[0][1],r;for(let g=0;g<p.length-1;g++)for(let c=g+1;c<p.length;c++){const[T,A]=p[g],[I,S]=p[c];if(w[T]?.[I]===d)r[i]??=[],r[i]=[...r[i],...A,...S];else if(T==="default"||I==="default")r[i]??=[],r[i]=[...r[i],...A,...S];else{const Y=`${i}-${l++}`;r[Y]=A;const W=`${i}-${l++}`;r[W]=S}}return r},{}),"flattenAlignments"),[v,s]=F.map(e=>{const d={},r={};return Object.entries(e).forEach(([i,[f,l]])=>{const p=L.getNode(i)?.in??"default";d[l]??={},d[l][p]??=[],d[l][p].push(i),r[f]??={},r[f][p]??=[],r[f][p].push(i)}),{horiz:Object.values(N(d,"horizontal")).filter(i=>i.length>1),vert:Object.values(N(r,"vertical")).filter(i=>i.length>1)}}).reduce(([e,d],{horiz:r,vert:i})=>[[...e,...r],[...d,...i]],[[],[]]),n=new Set;U.forEach(e=>e.members.forEach(d=>n.add(d)));const t=lt.__name(e=>e.filter(d=>!d.some(r=>n.has(r))),"dropOverlapping"),a=t(v),h=t(s);return U.forEach(e=>{e.members.length<2||(e.direction==="row"?a.push([...e.members]):h.push([...e.members]))}),{horizontal:a,vertical:h}}lt.__name(Xe,"getAlignments");function He(L,F,w=[]){const U=[],N=F.getConfigField("iconSize"),v=F.getConfigField("idealEdgeLengthMultiplier"),s=v*N,n=new Set;w.forEach(h=>{for(let e=0;e<h.members.length-1;e++){const d=h.members[e],r=h.members[e+1];n.add(`${d}|${r}`),n.add(`${r}|${d}`),h.direction==="row"?U.push({left:d,right:r,gap:s}):U.push({top:d,bottom:r,gap:s})}});const t=lt.__name(h=>`${h[0]},${h[1]}`,"posToStr"),a=lt.__name(h=>h.split(",").map(e=>parseInt(e)),"strToPos");return L.forEach(h=>{const e=Object.fromEntries(Object.entries(h).map(([f,l])=>[t(l),f])),d=[t([0,0])],r={},i={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;d.length>0;){const f=d.shift();if(f){r[f]=1;const l=e[f];if(l){const p=a(f);Object.entries(i).forEach(([g,c])=>{const T=t([p[0]+c[0],p[1]+c[1]]),A=e[T];if(A&&!r[T]){if(d.push(T),n.has(`${l}|${A}`))return;U.push({[Me[g]]:A,[Me[Ze(g)]]:l,gap:v*N})}})}}}}),U}lt.__name(He,"getRelativeConstraints");function Ve(L,F,w,U,N,{spatialMaps:v,groupAlignments:s}){return new Promise(n=>{const t=de.select_default("body").append("div").attr("id","cy").attr("style","display:none"),a=Ie.cytoscape({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});t.remove(),Ue(w,a),be(L,a,N),Ge(F,a,N),Ye(U,a);const h=N.getLayoutHints(),e=Xe(N,v,s,h),d=He(v,N,h),r=N.getConfigField("iconSize"),i=N.getConfigField("idealEdgeLengthMultiplier")*r,f=.5*r,l=N.getConfigField("edgeElasticity"),p=N.getConfigField("seed"),g=a.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(c){const[T,A]=c.connectedNodes(),{parent:I}=ie(T),{parent:S}=ie(A);return I===S?i:f},edgeElasticity(c){const[T,A]=c.connectedNodes(),{parent:I}=ie(T),{parent:S}=ie(A);return I===S?l:.001},alignmentConstraint:e,relativePlacementConstraint:d});g.one("layoutstop",()=>{function c(T,A,I,S){let Y,W;const{x:z,y:x}=T,{x:tt,y:o}=A;W=(S-x+(z-I)*(x-o)/(z-tt))/Math.sqrt(1+Math.pow((x-o)/(z-tt),2)),Y=Math.sqrt(Math.pow(S-x,2)+Math.pow(I-z,2)-Math.pow(W,2));const m=Math.sqrt(Math.pow(tt-z,2)+Math.pow(o-x,2));Y=Y/m;let u=(tt-z)*(S-x)-(o-x)*(I-z);switch(!0){case u>=0:u=1;break;case u<0:u=-1;break}let E=(tt-z)*(I-z)+(o-x)*(S-x);switch(!0){case E>=0:E=1;break;case E<0:E=-1;break}return W=Math.abs(W)*u,Y=Y*E,{distances:W,weights:Y}}lt.__name(c,"getSegmentWeights"),a.startBatch();for(const T of Object.values(a.edges()))if(T.data?.()){const{x:A,y:I}=T.source().position(),{x:S,y:Y}=T.target().position();if(A!==S&&I!==Y){const W=T.sourceEndpoint(),z=T.targetEndpoint(),{sourceDir:x}=Re(T),[tt,o]=Zt(x)?[W.x,z.y]:[z.x,W.y],{weights:m,distances:u}=c(W,z,tt,o);T.style("segment-distances",u),T.style("segment-weights",m)}}a.endBatch(),pe(p,()=>g.run())});try{pe(p,()=>g.run())}catch(c){throw c instanceof RangeError&&c.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):c}a.ready(c=>{de.log.info("Ready",c),n(a)})})}lt.__name(Ve,"layoutArchitecture");var lr={parser:Fe,get db(){return new Se},renderer:{draw:lt.__name(async(L,F,w,U)=>{const N=U.db;N.setDiagramId(F);const v=N.getServices(),s=N.getJunctions(),n=N.getGroups(),t=N.getEdges(),a=N.getDataStructures(),h=ze.selectSvgElement(F),e=h.append("g");e.attr("class","architecture-edges");const d=h.append("g");d.attr("class","architecture-services");const r=h.append("g");r.attr("class","architecture-groups"),await sr(N,d,v,F),hr(N,d,s,F);const i=await Ve(v,s,n,t,N,a);await nr(e,i,N,F),await or(r,i,N,F),Pe(N,i),Wt.setupGraphViewbox(void 0,h,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw")},styles:ar};exports.diagram=lr;
|