hermes-web-ui 0.6.40 → 0.6.41
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/dist/client/assets/js/{AppSidebar-CaSVcbCW.js → AppSidebar-CNkSiv3l.js} +1 -1
- package/dist/client/assets/js/{ChannelsView-hdAXa1hf.js → ChannelsView-6rEo6RBl.js} +1 -1
- package/dist/client/assets/js/{ChatPanel-C6sX6idm.js → ChatPanel-ANAZWluc.js} +3 -3
- package/dist/client/assets/js/{ChatView-B68k_-D9.js → ChatView-DFcPsmRF.js} +1 -1
- package/dist/client/assets/js/{CodingAgentsView-CsIjwbXR.js → CodingAgentsView-CpIY0SHT.js} +1 -1
- package/dist/client/assets/js/{DefaultCredentialPrompt-BRhb4DOa.js → DefaultCredentialPrompt-DmNeotSW.js} +1 -1
- package/dist/client/assets/js/{DesktopBrowserPanel-BlBfS64w.js → DesktopBrowserPanel-CWjTU-3y.js} +1 -1
- package/dist/client/assets/js/{DesktopBrowserView-JukL0QuS.js → DesktopBrowserView-D9Qb3fIV.js} +1 -1
- package/dist/client/assets/js/{DesktopPetView-DWq4EiRU.js → DesktopPetView-B7REtC57.js} +1 -1
- package/dist/client/assets/js/{DesktopTitleBar-DphP4oa6.js → DesktopTitleBar-Dej_16hB.js} +1 -1
- package/dist/client/assets/js/{DevicesView-BFtrfqJs.js → DevicesView--d4HCkch.js} +1 -1
- package/dist/client/assets/js/{DocxFilePreview-CmVJ9Jxx.js → DocxFilePreview-BQz6WC7r.js} +2 -2
- package/dist/client/assets/js/{FileEditor-CdkNYp7b.js → FileEditor-BBegs-5i.js} +2 -2
- package/dist/client/assets/js/{FilePreview-CJrVRPRs.js → FilePreview-B7WqYvZs.js} +2 -2
- package/dist/client/assets/js/{FileRenameModal-mghyEXU4.js → FileRenameModal-82RkAZkd.js} +1 -1
- package/dist/client/assets/js/{FilesPanel-B9cKB5lX.js → FilesPanel-BHcg6CpC.js} +2 -2
- package/dist/client/assets/js/{FilesView-iKZu70E9.js → FilesView-Dl15WTar.js} +2 -2
- package/dist/client/assets/js/{GlobalAgentView-JZsss0gx.js → GlobalAgentView-dxEX611f.js} +1 -1
- package/dist/client/assets/js/{GlobalPendingActions-BRQIt5vl.js → GlobalPendingActions-CeK96C3G.js} +1 -1
- package/dist/client/assets/js/{GroupChatLinkView-CNrV8lnT.js → GroupChatLinkView-CJhI9DVE.js} +1 -1
- package/dist/client/assets/js/{GroupChatPanel-WK4zBasl.js → GroupChatPanel-CLa3s08V.js} +3 -3
- package/dist/client/assets/js/{GroupChatView-BlMUD1MW.js → GroupChatView-CUwvu-6F.js} +1 -1
- package/dist/client/assets/js/{HistoryMessageList-D8zoQ1Zs.js → HistoryMessageList-BdD8GJYM.js} +1 -1
- package/dist/client/assets/js/{HistoryView-Bpr8N2lC.js → HistoryView-Ro92tP5R.js} +1 -1
- package/dist/client/assets/js/{HtmlFilePreview-Bj3_-hMo.js → HtmlFilePreview-xYn7YtmC.js} +1 -1
- package/dist/client/assets/js/{JobsView-CZK26gTw.js → JobsView-BaNA1Yaa.js} +2 -2
- package/dist/client/assets/js/{JourneyView-BPUsLj4o.js → JourneyView-Bw-05mCF.js} +1 -1
- package/dist/client/assets/js/{KanbanView-B7d-2_z9.js → KanbanView-BYC32l2Q.js} +1 -1
- package/dist/client/assets/js/{LoginView-BpYyv831.js → LoginView-KrpCkwOr.js} +1 -1
- package/dist/client/assets/js/{LogsView-CabFHk0v.js → LogsView-Dgm4v5sN.js} +1 -1
- package/dist/client/assets/js/{MarkdownRenderer-CVtmHZwc.js → MarkdownRenderer-BIPowjr-.js} +3 -3
- package/dist/client/assets/js/{McpManagerView-C-ou8vf3.js → McpManagerView-DTtkUIvq.js} +1 -1
- package/dist/client/assets/js/{MemoryView-QGFW4iZo.js → MemoryView-BnL7xzux.js} +2 -2
- package/dist/client/assets/js/{MessageList-DZR-TFjD.js → MessageList-5tytzhb0.js} +3 -3
- package/dist/client/assets/js/{ModelsView-DiWdSWOW.js → ModelsView-ComCz0Ce.js} +1 -1
- package/dist/client/assets/js/{OutlinePanel-Dlr5svMY.js → OutlinePanel-CF_XPCRn.js} +1 -1
- package/dist/client/assets/js/{PageSidebarFooter-Bic1fUmG.js → PageSidebarFooter-dvLzcTIm.js} +1 -1
- package/dist/client/assets/js/{PdfFilePreview-Dkpan1ay.js → PdfFilePreview-COOAoJ4V.js} +2 -2
- package/dist/client/assets/js/{PerformanceView-LrZaED_Z.js → PerformanceView-D6dKifJh.js} +1 -1
- package/dist/client/assets/js/{PetdexView-Bv8RioGL.js → PetdexView-CmvzDYwf.js} +1 -1
- package/dist/client/assets/js/{PluginsView-CbtdIGlq.js → PluginsView-zJV9FE9c.js} +1 -1
- package/dist/client/assets/js/{PptxFilePreview-5if_GbU6.js → PptxFilePreview-dC4JxV6j.js} +2 -2
- package/dist/client/assets/js/{ProfileAvatar-DI9ciJxS.js → ProfileAvatar-C8xoALCI.js} +1 -1
- package/dist/client/assets/js/{ProfilesView-C-FSiKMU.js → ProfilesView-CxVxJRN_.js} +1 -1
- package/dist/client/assets/js/{ProviderConfigurationPrompt-BUoWC41Y.js → ProviderConfigurationPrompt-zwk1UwoP.js} +1 -1
- package/dist/client/assets/js/{SessionSearchModal-CEKvSihp.js → SessionSearchModal-DhwGsV-i.js} +1 -1
- package/dist/client/assets/js/{SettingRow-CSfiJmxx.js → SettingRow-DHqhLX3M.js} +1 -1
- package/dist/client/assets/js/{SettingsCircuitBadge-DHIEFyTR.js → SettingsCircuitBadge-CnWSfQZd.js} +1 -1
- package/dist/client/assets/js/{SettingsView-DbNJroV3.js → SettingsView-Cbroga25.js} +1 -1
- package/dist/client/assets/js/{SharedGroupChatView-CTYjqWcO.js → SharedGroupChatView-DXfqtQ33.js} +1 -1
- package/dist/client/assets/js/{SkillsUsageView-BqZ3GtfT.js → SkillsUsageView-C34i3lOQ.js} +1 -1
- package/dist/client/assets/js/{SkillsView-Bhla7821.js → SkillsView-DRG_1esx.js} +2 -2
- package/dist/client/assets/js/{SpreadsheetFilePreview-CGK8HDAx.js → SpreadsheetFilePreview-DRw4kIx5.js} +1 -1
- package/dist/client/assets/js/{TerminalPanel-CtBTLOwq.js → TerminalPanel-Da1nL9P8.js} +1 -1
- package/dist/client/assets/js/{TerminalView-BID7fupB.js → TerminalView-B6z-VaGq.js} +1 -1
- package/dist/client/assets/js/{ThemeView-Cx3ucIus.js → ThemeView-CAaJ9MH-.js} +1 -1
- package/dist/client/assets/js/{UsageView-ByGCsw7o.js → UsageView-B_hLsp0k.js} +1 -1
- package/dist/client/assets/js/{VersionPreviewView-DiAK1ind.js → VersionPreviewView-DKXL6anl.js} +1 -1
- package/dist/client/assets/js/{WebPet-CdIqrnp1.js → WebPet-BUvrfjpq.js} +1 -1
- package/dist/client/assets/js/{WorkflowView-DmBOhSuq.js → WorkflowView-r46Ap9FY.js} +1 -1
- package/dist/client/assets/js/{WorkspaceDiffPreview-dHIGp-9F.js → WorkspaceDiffPreview-EwZAE18F.js} +2 -2
- package/dist/client/assets/js/{abap-Dj8IFKiF.js → abap-C7gkFu-A.js} +1 -1
- package/dist/client/assets/js/{aiden0z-pptx-renderer.es-6vi5-jAN.js → aiden0z-pptx-renderer.es-DOpVaH_k.js} +1 -1
- package/dist/client/assets/js/{apex-C3INPUEt.js → apex-DZOtRowu.js} +1 -1
- package/dist/client/assets/js/{ar-Gk9y3ZfO.js → ar-8iThLSJQ.js} +1 -1
- package/dist/client/assets/js/architecture-7EHR7CIX-BrfhYGuP.js +1 -0
- package/dist/client/assets/js/{architectureDiagram-3BPJPVTR-DLZYeivB.js → architectureDiagram-3BPJPVTR-DEsTTzKd.js} +1 -1
- package/dist/client/assets/js/{auth-D1ZFqv22.js → auth-B52zm2Ir.js} +1 -1
- package/dist/client/assets/js/{azcli-UBzLhJq5.js → azcli-KxuicZQh.js} +1 -1
- package/dist/client/assets/js/{bat-P3O4jldt.js → bat-DfFP4HF-.js} +1 -1
- package/dist/client/assets/js/{bicep-DdQR9RxE.js → bicep-Co4bntVh.js} +1 -1
- package/dist/client/assets/js/{blockDiagram-GPEHLZMM-UWFo8sm5.js → blockDiagram-GPEHLZMM-NsxYeUKd.js} +1 -1
- package/dist/client/assets/js/{c4Diagram-AAUBKEIU-jgyj0wOb.js → c4Diagram-AAUBKEIU-D68asSzm.js} +1 -1
- package/dist/client/assets/js/{cameligo-Bb4ubW_C.js → cameligo-Xi0l_9Wr.js} +1 -1
- package/dist/client/assets/js/{chat-DdHii4Qz.js → chat-fUZW3YFa.js} +1 -1
- package/dist/client/assets/js/{chat-input-height-CSPwB9it.js → chat-input-height-lvFawuv9.js} +1 -1
- package/dist/client/assets/js/{chat-timestamp-DGQ8fmtT.js → chat-timestamp-4wWFcZWv.js} +1 -1
- package/dist/client/assets/js/{chunk-2J33WTMH-Br9OWF5a.js → chunk-2J33WTMH-CEU5sLIh.js} +1 -1
- package/dist/client/assets/js/{chunk-3OPIFGDE-Cb40LuI4.js → chunk-3OPIFGDE-DEhbKkCl.js} +1 -1
- package/dist/client/assets/js/{chunk-4BX2VUAB-jYtdiafd.js → chunk-4BX2VUAB-OIZUstuy.js} +1 -1
- package/dist/client/assets/js/{chunk-55IACEB6-CBtymeHY.js → chunk-55IACEB6-DQHKZCBG.js} +1 -1
- package/dist/client/assets/js/{chunk-5ZQYHXKU-yj9xqmex.js → chunk-5ZQYHXKU-BU3pQVVl.js} +1 -1
- package/dist/client/assets/js/{chunk-727SXJPM-er_5tB5X.js → chunk-727SXJPM-jj97gdnP.js} +1 -1
- package/dist/client/assets/js/{chunk-AQP2D5EJ-C4mDD6xK.js → chunk-AQP2D5EJ-jv-oWlkb.js} +1 -1
- package/dist/client/assets/js/{chunk-BSJP7CBP-QZesZe57.js → chunk-BSJP7CBP-DkKsepNF.js} +1 -1
- package/dist/client/assets/js/{chunk-CSCIHK7Q-5LH118bT.js → chunk-CSCIHK7Q-CLgoBoCF.js} +3 -3
- package/dist/client/assets/js/{chunk-FMBD7UC4-CQho6QZ5.js → chunk-FMBD7UC4-Bx1bCKUR.js} +1 -1
- package/dist/client/assets/js/{chunk-KSCS5N6A-DONM1Omv.js → chunk-KSCS5N6A-CZHZ6pBd.js} +1 -1
- package/dist/client/assets/js/{chunk-L5ZTLDWV-FN_zFWkp.js → chunk-L5ZTLDWV-dz9D3kOb.js} +1 -1
- package/dist/client/assets/js/{chunk-LZXEDZCA-CEEUVvpS.js → chunk-LZXEDZCA-CQiSQehC.js} +2 -2
- package/dist/client/assets/js/{chunk-ND2GUHAM-DWckpxQD.js → chunk-ND2GUHAM-mWODKb8v.js} +1 -1
- package/dist/client/assets/js/{chunk-NZK2D7GU-0mKZmkuV.js → chunk-NZK2D7GU-ivCkjCOR.js} +1 -1
- package/dist/client/assets/js/{chunk-O5CBEL6O-DIDAOkT_.js → chunk-O5CBEL6O-BRUisK47.js} +1 -1
- package/dist/client/assets/js/{chunk-QZHKN3VN-D3c-TMz-.js → chunk-QZHKN3VN-BHjgTrzY.js} +1 -1
- package/dist/client/assets/js/{chunk-WU5MYG2G-BZvSpwm4.js → chunk-WU5MYG2G-CNW1rcpL.js} +1 -1
- package/dist/client/assets/js/{chunk-XPW4576I-xdyJtk-s.js → chunk-XPW4576I-DP3dJbOu.js} +1 -1
- package/dist/client/assets/js/classDiagram-4FO5ZUOK-BVBBe3DQ.js +1 -0
- package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-DJUe3i9Y.js +1 -0
- package/dist/client/assets/js/{clipboard-DQ_A8ns-.js → clipboard-DHZFaAvO.js} +1 -1
- package/dist/client/assets/js/{clipboard-files-bDrcGKPe.js → clipboard-files-CBDy-02Y.js} +1 -1
- package/dist/client/assets/js/{clojure-ku7aCU1_.js → clojure-DuyGwS8X.js} +1 -1
- package/dist/client/assets/js/{coding-agents-DfHyBvky.js → coding-agents-BNTHD6kd.js} +1 -1
- package/dist/client/assets/js/{codingAgentProviders-BM18FAW9.js → codingAgentProviders-DM_ouxbL.js} +1 -1
- package/dist/client/assets/js/{coffee-DnRIdJlY.js → coffee-C5p7vzpa.js} +1 -1
- package/dist/client/assets/js/{completion-notification-XxjbntI8.js → completion-notification-CzdnhuX3.js} +1 -1
- package/dist/client/assets/js/{cose-bilkent-S5V4N54A-w891sIF1.js → cose-bilkent-S5V4N54A-De_ZdqY0.js} +1 -1
- package/dist/client/assets/js/{cpp-CN8i6ISX.js → cpp-II5hDbTe.js} +1 -1
- package/dist/client/assets/js/{csharp-B-fxig7O.js → csharp-D0POzSpv.js} +1 -1
- package/dist/client/assets/js/{csp-Bar9LGt4.js → csp-CwtuRkR3.js} +1 -1
- package/dist/client/assets/js/{css-DFtC5xZN.js → css-Dc2fJIqQ.js} +1 -1
- package/dist/client/assets/js/{cssMode-DH5XKKL2.js → cssMode-CC6jRvHF.js} +1 -1
- package/dist/client/assets/js/{cypher-BkJexWsv.js → cypher-DBcQoWDH.js} +1 -1
- package/dist/client/assets/js/{cytoscape.esm-BDsvr8Aq.js → cytoscape.esm-C9FMRqxM.js} +1 -1
- package/dist/client/assets/js/{dagre-BM42HDAG-BuT885pa.js → dagre-BM42HDAG-CvJIC410.js} +1 -1
- package/dist/client/assets/js/{dagre-BVUDh8Sh.js → dagre-BtgEsAtK.js} +1 -1
- package/dist/client/assets/js/{dart-B7W8hAtN.js → dart-Jf_Hmp2o.js} +1 -1
- package/dist/client/assets/js/{de-LDpd8WHJ.js → de-7hLSwCEx.js} +1 -1
- package/dist/client/assets/js/{defineProperty-DdPu4ZVv.js → defineProperty-DHkErCmG.js} +1 -1
- package/dist/client/assets/js/{desktop-browser-xrRFPNUg.js → desktop-browser-C6AhY0uu.js} +1 -1
- package/dist/client/assets/js/{diagram-2AECGRRQ-B1sSf-09.js → diagram-2AECGRRQ-CvPeU5Lm.js} +1 -1
- package/dist/client/assets/js/{diagram-5GNKFQAL-BffX22pf.js → diagram-5GNKFQAL-CBniYlkH.js} +1 -1
- package/dist/client/assets/js/{diagram-KO2AKTUF-D8QvpUpn.js → diagram-KO2AKTUF-C_yFaVRj.js} +1 -1
- package/dist/client/assets/js/{diagram-LMA3HP47-DkG7p3lQ.js → diagram-LMA3HP47-BzM1IxNe.js} +1 -1
- package/dist/client/assets/js/{diagram-OG6HWLK6-RjvNNvXM.js → diagram-OG6HWLK6-yvmf_3ax.js} +1 -1
- package/dist/client/assets/js/{dist-Bk0VKtV3.js → dist-BHzBn3v7.js} +1 -1
- package/dist/client/assets/js/{dockerfile-C4m7j8sy.js → dockerfile-J3d6ZPDJ.js} +1 -1
- package/dist/client/assets/js/{docx-preview-BpTW-GN7.js → docx-preview-Rqt8wMjQ.js} +1 -1
- package/dist/client/assets/js/{download-CX8EG48r.js → download-xhRMWMda.js} +1 -1
- package/dist/client/assets/js/{ecl-EHV358Ls.js → ecl-XnlT0p97.js} +1 -1
- package/dist/client/assets/js/{editor.api2-CnHBqh_d.js → editor.api2-ChO5nUQb.js} +1 -1
- package/dist/client/assets/js/{elixir-DLfp2Dwn.js → elixir-BEJbxH-B.js} +1 -1
- package/dist/client/assets/js/{en-D6VVFwFU.js → en-D2WSXgkM.js} +1 -1
- package/dist/client/assets/js/{erDiagram-TEJ5UH35-CLlLC6xx.js → erDiagram-TEJ5UH35-DZysD9r9.js} +1 -1
- package/dist/client/assets/js/{es-BIMLuyVP.js → es-B7Mq1P0U.js} +1 -1
- package/dist/client/assets/js/{esm-C8D4M0Yn.js → esm-DnZPPtmx.js} +1 -1
- package/dist/client/assets/js/eventmodeling-FCH6USID-vlE3-g2j.js +1 -0
- package/dist/client/assets/js/{file-preview-BvgwVZXh.js → file-preview-C417aixJ.js} +1 -1
- package/dist/client/assets/js/{files-CJkCqsUx.js → files-DjI-npgn.js} +1 -1
- package/dist/client/assets/js/{flow9-CtBaUnAi.js → flow9-j5XT_8TQ.js} +1 -1
- package/dist/client/assets/js/{flowDiagram-I6XJVG4X-VTRTPnqD.js → flowDiagram-I6XJVG4X-Dt5ZtyHz.js} +1 -1
- package/dist/client/assets/js/{fr-C2lf0cY2.js → fr-DvClrDOw.js} +1 -1
- package/dist/client/assets/js/{freemarker2-XLeMvhl_.js → freemarker2-BzCf_0SN.js} +1 -1
- package/dist/client/assets/js/{fsharp-Db0uaBQv.js → fsharp-ClU_Sdjr.js} +1 -1
- package/dist/client/assets/js/{ganttDiagram-6RSMTGT7-CdKcIZ8_.js → ganttDiagram-6RSMTGT7-Bca3rPWi.js} +1 -1
- package/dist/client/assets/js/gitGraph-WXDBUCRP-Cyd4P6XH.js +1 -0
- package/dist/client/assets/js/{gitGraphDiagram-PVQCEYII-Bcuyw6fo.js → gitGraphDiagram-PVQCEYII-Co29qnTg.js} +1 -1
- package/dist/client/assets/js/{go-DwaTlB-B.js → go-D3iUyCM0.js} +1 -1
- package/dist/client/assets/js/{graphlib-vAI4Pw7R.js → graphlib-Bln6qd-Z.js} +1 -1
- package/dist/client/assets/js/{graphql-Cf2XhNJR.js → graphql-z8koqyyL.js} +1 -1
- package/dist/client/assets/js/{group-agent-avatar-CPehpiK0.js → group-agent-avatar-CwqtaKGw.js} +1 -1
- package/dist/client/assets/js/{group-chat-CY62vc77.js → group-chat-Buz8HP-N.js} +1 -1
- package/dist/client/assets/js/{group-chat-xkdjC2Jt.js → group-chat-CgFAwCtr.js} +1 -1
- package/dist/client/assets/js/{group-chat-agent-link-DdSNKasF.js → group-chat-agent-link-N5IFeN_j.js} +1 -1
- package/dist/client/assets/js/{handlebars-CNEKu_p8.js → handlebars-C_JvhUYs.js} +1 -1
- package/dist/client/assets/js/{hcl-6UZbq6h2.js → hcl-X7TzviIX.js} +1 -1
- package/dist/client/assets/js/{highlight-DwtBT6t1.js → highlight-C4yUBxwQ.js} +1 -1
- package/dist/client/assets/js/{html-DfSIHhKA.js → html-B-rCQB0N.js} +1 -1
- package/dist/client/assets/js/{htmlMode-iGw9-O-W.js → htmlMode-CAeEf_yf.js} +1 -1
- package/dist/client/assets/js/{index-DnjQJzX4.js → index-DN4SafrP.js} +5 -5
- package/dist/client/assets/js/info-J43DQDTF-B9tkQ2Sb.js +1 -0
- package/dist/client/assets/js/{infoDiagram-5YYISTIA-85450Zam.js → infoDiagram-5YYISTIA-BWQGayms.js} +1 -1
- package/dist/client/assets/js/{ini-8em8V_Af.js → ini-LTHHN4J-.js} +1 -1
- package/dist/client/assets/js/{ishikawaDiagram-YF4QCWOH-BZ4az7UA.js → ishikawaDiagram-YF4QCWOH-Dhuplz_z.js} +1 -1
- package/dist/client/assets/js/{ja-C1bBXgr_.js → ja-D7BeX2_D.js} +1 -1
- package/dist/client/assets/js/{java-CP1MdIkO.js → java-BRFX-ya0.js} +1 -1
- package/dist/client/assets/js/{javascript-Cr8_LHYa.js → javascript-ZXiVmjXn.js} +1 -1
- package/dist/client/assets/js/{journeyDiagram-JHISSGLW-DGMB8Tgc.js → journeyDiagram-JHISSGLW-CJeatAU9.js} +1 -1
- package/dist/client/assets/js/{jsonMode-HCZ-1lFH.js → jsonMode-C6FcMe0o.js} +1 -1
- package/dist/client/assets/js/{jszip.min-BkR6b8DY.js → jszip.min-skZCUzWf.js} +1 -1
- package/dist/client/assets/js/{julia-DMTMxa5q.js → julia-Bph8N3CL.js} +1 -1
- package/dist/client/assets/js/{kanban-definition-UN3LZRKU-F5cH_RpB.js → kanban-definition-UN3LZRKU-tvWuOdSr.js} +1 -1
- package/dist/client/assets/js/{katex-CYbEJAbZ.js → katex-hSGJNERm.js} +1 -1
- package/dist/client/assets/js/{ko-qgOeHd8L.js → ko-BsVa-If_.js} +1 -1
- package/dist/client/assets/js/{kotlin-Blzus47W.js → kotlin-_c4-tPQp.js} +1 -1
- package/dist/client/assets/js/{less-DWCHpDyf.js → less-5oVo4jfQ.js} +1 -1
- package/dist/client/assets/js/{lexon-YXdlYGbJ.js → lexon-DE4YtGwF.js} +1 -1
- package/dist/client/assets/js/{liquid-DSQgvRwe.js → liquid-BGfieGMG.js} +1 -1
- package/dist/client/assets/js/{lspLanguageFeatures-0Hx2Vnc-.js → lspLanguageFeatures-DU_1H2uW.js} +1 -1
- package/dist/client/assets/js/{lua-Cyv3mTkg.js → lua-7WJSZJqD.js} +1 -1
- package/dist/client/assets/js/{m3-CPY3Ym7_.js → m3-gZlfoR19.js} +1 -1
- package/dist/client/assets/js/{markdown-DaPQ1nuG.js → markdown-BYF71orA.js} +1 -1
- package/dist/client/assets/js/{mdx-BqA6Xr9V.js → mdx-CunEIV3g.js} +1 -1
- package/dist/client/assets/js/{mermaid-parser.core-D4HRUOce.js → mermaid-parser.core-DU_SX15F.js} +3 -3
- package/dist/client/assets/js/{mermaid.core-w6kHmgOG.js → mermaid.core-8vsbhG5J.js} +3 -3
- package/dist/client/assets/js/{message-scroll-position-C5yRCyBU.js → message-scroll-position-C9_YO3pX.js} +2 -2
- package/dist/client/assets/js/{mindmap-definition-RKZ34NQL-CnzhnJ7Z.js → mindmap-definition-RKZ34NQL-HPtlKqL1.js} +1 -1
- package/dist/client/assets/js/{mips-BfqBfLvN.js → mips-DXkvw9aZ.js} +1 -1
- package/dist/client/assets/js/{models-wrytxWnf.js → models-BILDy2sV.js} +1 -1
- package/dist/client/assets/js/{monaco.contribution-Bc-DesyO.js → monaco.contribution-DDqeHGl3.js} +2 -2
- package/dist/client/assets/js/{msdax-DgMip49g.js → msdax-BbHEBDvP.js} +1 -1
- package/dist/client/assets/js/{mysql-DPUvF1g2.js → mysql-7I1rlwh7.js} +1 -1
- package/dist/client/assets/js/{objective-c-BQ3llrPW.js → objective-c-Dk03REAv.js} +1 -1
- package/dist/client/assets/js/packet-YPE3B663-DlTFK3Wo.js +1 -0
- package/dist/client/assets/js/{pascal-bFWHV7MZ.js → pascal-BCfNkzYY.js} +1 -1
- package/dist/client/assets/js/{pascaligo-C8Qza2pK.js → pascaligo-D-DslS98.js} +1 -1
- package/dist/client/assets/js/{pdf-Cb7x495t.js → pdf-B_OYWxSy.js} +1 -1
- package/dist/client/assets/js/{pdf.worker.min-DDUKJ6cJ.js → pdf.worker.min--q2RLEHa.js} +1 -1
- package/dist/client/assets/js/{perl-x25gw0_p.js → perl-MUnuTclx.js} +1 -1
- package/dist/client/assets/js/{pets-BfRsvl7D.js → pets-D74G2jqA.js} +1 -1
- package/dist/client/assets/js/{pgsql-DAUcGeRq.js → pgsql-BxCBktNe.js} +1 -1
- package/dist/client/assets/js/{php-nri1eqb2.js → php-zp9UgH03.js} +1 -1
- package/dist/client/assets/js/pie-LRSECV5Y-BtnBGhFZ.js +1 -0
- package/dist/client/assets/js/{pieDiagram-4H26LBE5-4LODdtT_.js → pieDiagram-4H26LBE5-CG8_pcHr.js} +1 -1
- package/dist/client/assets/js/{pla-CHi5LWNL.js → pla-DGCtmYZC.js} +1 -1
- package/dist/client/assets/js/{postiats-Bk7jD0AA.js → postiats-DHSW8gnY.js} +1 -1
- package/dist/client/assets/js/{powerquery-UTqJ0Vs7.js → powerquery-BGsPEmJe.js} +1 -1
- package/dist/client/assets/js/{powershell-CuPY3Rqk.js → powershell-BItlb0hE.js} +1 -1
- package/dist/client/assets/js/{profiles-D-vlI-Ec.js → profiles-BK5JKD7h.js} +1 -1
- package/dist/client/assets/js/{protobuf-Be4AIz9j.js → protobuf-BIhm6JYx.js} +1 -1
- package/dist/client/assets/js/{pt-D7_udWb3.js → pt-BSORCDMm.js} +1 -1
- package/dist/client/assets/js/{pug-CZFx15Ey.js → pug-BtnM7KZj.js} +1 -1
- package/dist/client/assets/js/{python-BgRg6Ez6.js → python-DxzTx1Q_.js} +1 -1
- package/dist/client/assets/js/{qsharp-BiBiLhRS.js → qsharp-B_8MSfaB.js} +1 -1
- package/dist/client/assets/js/{quadrantDiagram-W4KKPZXB-g_q9-dXx.js → quadrantDiagram-W4KKPZXB-CsbkMYuV.js} +1 -1
- package/dist/client/assets/js/{r-DM7NVSbZ.js → r-kvKC59jk.js} +1 -1
- package/dist/client/assets/js/radar-GUYGQ44K-BTKMKX4G.js +1 -0
- package/dist/client/assets/js/{razor-CiWy0jCW.js → razor-BwZ0MkaL.js} +1 -1
- package/dist/client/assets/js/{redis-BR2LPmFL.js → redis-5j1U_i85.js} +1 -1
- package/dist/client/assets/js/{redshift-B0sdAV16.js → redshift-CX1dFLA1.js} +1 -1
- package/dist/client/assets/js/{requirementDiagram-4Y6WPE33-EedCclad.js → requirementDiagram-4Y6WPE33-CKC7CQCX.js} +1 -1
- package/dist/client/assets/js/{restructuredtext-kQOBLN1M.js → restructuredtext-MV0-Naya.js} +1 -1
- package/dist/client/assets/js/{rough.esm-Dyx_2DON.js → rough.esm-CV1rL6PC.js} +1 -1
- package/dist/client/assets/js/{ru-CVQQmreT.js → ru-JsH6TKyg.js} +1 -1
- package/dist/client/assets/js/{ruby-CbdJXy6J.js → ruby-Bhyejf9X.js} +1 -1
- package/dist/client/assets/js/{rust-DZanYksk.js → rust-CR8d_FC1.js} +1 -1
- package/dist/client/assets/js/{sankeyDiagram-5OEKKPKP-DFC0nzsd.js → sankeyDiagram-5OEKKPKP-CKlqlvAe.js} +1 -1
- package/dist/client/assets/js/{sb-C5-WiqDZ.js → sb-hLW2EM2L.js} +1 -1
- package/dist/client/assets/js/{scala-Bk7i9nV-.js → scala-DVUhALEZ.js} +1 -1
- package/dist/client/assets/js/{scheme-CaZSWmJ2.js → scheme-BS6yNanr.js} +1 -1
- package/dist/client/assets/js/{scss-ByOYuc7K.js → scss-BfoRsElt.js} +1 -1
- package/dist/client/assets/js/{sequenceDiagram-3UESZ5HK-hWjPfqXt.js → sequenceDiagram-3UESZ5HK-CTimhD6H.js} +1 -1
- package/dist/client/assets/js/{session-browser-prefs-Br8OYA4_.js → session-browser-prefs-BT1woDux.js} +1 -1
- package/dist/client/assets/js/{sessions-iGK9S6zk.js → sessions-IkLKgnN6.js} +1 -1
- package/dist/client/assets/js/{settings-pbanANH0.js → settings-roYY6G3W.js} +1 -1
- package/dist/client/assets/js/{shell-Di0TEySc.js → shell-BO_Lyczz.js} +1 -1
- package/dist/client/assets/js/{skills-DC-UPcXj.js → skills-a5LPwmiT.js} +1 -1
- package/dist/client/assets/js/{solidity-BNTjAuuA.js → solidity-D3T2Ki4l.js} +1 -1
- package/dist/client/assets/js/{sophia-LY__8Yob.js → sophia-iJmIEvi8.js} +1 -1
- package/dist/client/assets/js/{sparql-CWnLfgGS.js → sparql-C2HCEExr.js} +1 -1
- package/dist/client/assets/js/{sql-B0ypQ9lR.js → sql-DM6_3GBc.js} +1 -1
- package/dist/client/assets/js/{src-BihFroE7.js → src-DD_TpJde.js} +1 -1
- package/dist/client/assets/js/{st-CqVFKTbZ.js → st-DSb39Fm5.js} +1 -1
- package/dist/client/assets/js/{stateDiagram-AJRCARHV-B7wEnYVe.js → stateDiagram-AJRCARHV-DwBGmBj6.js} +1 -1
- package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-5bNcwBne.js +1 -0
- package/dist/client/assets/js/{style-DDAg_jVj.js → style-B5xXhBlp.js} +1 -1
- package/dist/client/assets/js/{swift-B4ZZmDxc.js → swift-DrZYSZK3.js} +1 -1
- package/dist/client/assets/js/{systemverilog-zLt-O1mT.js → systemverilog-BAWNCaf6.js} +1 -1
- package/dist/client/assets/js/{tcl-DCSZmA-l.js → tcl-DY15ex6v.js} +1 -1
- package/dist/client/assets/js/{timeline-definition-PNZ67QCA-BN_LfleE.js → timeline-definition-PNZ67QCA-B8xuIu6g.js} +1 -1
- package/dist/client/assets/js/treeView-BLDUP644-DvZPUnGM.js +1 -0
- package/dist/client/assets/js/treemap-LRROVOQU-Bis1djYh.js +1 -0
- package/dist/client/assets/js/{tsMode-BjUcuHrq.js → tsMode-BE8JCSCE.js} +1 -1
- package/dist/client/assets/js/{ttsHelpers-BLunFYsq.js → ttsHelpers-BLNiQExI.js} +1 -1
- package/dist/client/assets/js/{twig-CuJlVpUG.js → twig-BpHF_18K.js} +1 -1
- package/dist/client/assets/js/{typescript-De40YVFt.js → typescript-FQ3z9hVG.js} +1 -1
- package/dist/client/assets/js/{typespec-8QcsIc3c.js → typespec-BKvcn6aE.js} +1 -1
- package/dist/client/assets/js/{useSttSettings-B1-KXN44.js → useSttSettings-DHX06G8A.js} +1 -1
- package/dist/client/assets/js/{vb-DEGTdhxf.js → vb-B74ucE43.js} +1 -1
- package/dist/client/assets/js/{vennDiagram-CIIHVFJN-hL8ax7wF.js → vennDiagram-CIIHVFJN-DtEu04QR.js} +1 -1
- package/dist/client/assets/js/wardley-L42UT6IY-CD4dIN63.js +1 -0
- package/dist/client/assets/js/{wardleyDiagram-YWT4CUSO-BIR-RA6Y.js → wardleyDiagram-YWT4CUSO-DdNKCPsp.js} +1 -1
- package/dist/client/assets/js/{wgsl-CmbiucmY.js → wgsl-DEf5Vdqv.js} +1 -1
- package/dist/client/assets/js/{workers-BgWBq4qY.js → workers-BbaiLVxx.js} +1 -1
- package/dist/client/assets/js/{workflow-socket-DZ9Ceffc.js → workflow-socket-DH402vxO.js} +1 -1
- package/dist/client/assets/js/{xml-SZLdwDmk.js → xml-zjE51I7v.js} +1 -1
- package/dist/client/assets/js/{xterm-D6CotCNH.js → xterm-Djy4rCx0.js} +1 -1
- package/dist/client/assets/js/{xychartDiagram-2RQKCTM6-DHa486uP.js → xychartDiagram-2RQKCTM6-CKqN7g7r.js} +1 -1
- package/dist/client/assets/js/{yaml-CgQpCgM5.js → yaml-DabeGoTc.js} +1 -1
- package/dist/client/assets/js/{zh-BDlMioZr.js → zh-CI4-L3JY.js} +1 -1
- package/dist/client/assets/js/{zh-TW-DTbLWR1A.js → zh-TW-wYlj-uOZ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/openapi.json +1 -1
- package/package.json +9 -1
- package/dist/client/assets/js/architecture-7EHR7CIX-Cl4Qi40R.js +0 -1
- package/dist/client/assets/js/classDiagram-4FO5ZUOK-DC0BcY8x.js +0 -1
- package/dist/client/assets/js/classDiagram-v2-Q7XG4LA2-BfDDH_fm.js +0 -1
- package/dist/client/assets/js/eventmodeling-FCH6USID-Bgzwnvkn.js +0 -1
- package/dist/client/assets/js/gitGraph-WXDBUCRP-CwFrpI3e.js +0 -1
- package/dist/client/assets/js/info-J43DQDTF-wMwkmIWM.js +0 -1
- package/dist/client/assets/js/packet-YPE3B663-DYmKXJOE.js +0 -1
- package/dist/client/assets/js/pie-LRSECV5Y-Dx0hbcjV.js +0 -1
- package/dist/client/assets/js/radar-GUYGQ44K-D-t-QJhi.js +0 -1
- package/dist/client/assets/js/stateDiagram-v2-BHNVJYJU-CoMhBVvo.js +0 -1
- package/dist/client/assets/js/treeView-BLDUP644-CMJGhbWk.js +0 -1
- package/dist/client/assets/js/treemap-LRROVOQU-_j4KoVDh.js +0 -1
- package/dist/client/assets/js/wardley-L42UT6IY-BeOvmJoM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ca as Ce,Oa as ar,wa as nr}from"./index-DnjQJzX4.js";import{n as or,t as sr}from"./mermaid-parser.core-D4HRUOce.js";import{Bt as ct,Ht as Qe,Vt as hr,jt as lr,t as fr}from"./src-BihFroE7.js";import{B as cr,U as gr,W as ur,Y as dr,a as vr,b as pr,f as yr,j as Er,q as mr,v as Tr,w as Nr,x as ue,y as Lr}from"./chunk-CSCIHK7Q-5LH118bT.js";import{n as Cr,t as Ar}from"./chunk-WU5MYG2G-BZvSpwm4.js";import{c as Mr,d as wr,i as Or}from"./chunk-5ZQYHXKU-yj9xqmex.js";import{a as Dr,i as xr,n as de,o as Ir,r as ve}from"./chunk-O5CBEL6O-DIDAOkT_.js";import{n as Rr,t as Sr}from"./chunk-4BX2VUAB-jYtdiafd.js";import{n as Fr,t as qe}from"./cytoscape.esm-BDsvr8Aq.js";var xe=Ce(((L,U)=>{(function(X,N){typeof L=="object"&&typeof U=="object"?U.exports=N():typeof define=="function"&&define.amd?define([],N):typeof L=="object"?L.layoutBase=N():X.layoutBase=N()})(L,function(){return(function(A){var X={};function N(d){if(X[d])return X[d].exports;var o=X[d]={i:d,l:!1,exports:{}};return A[d].call(o.exports,o,o.exports,N),o.l=!0,o.exports}return N.m=A,N.c=X,N.i=function(d){return d},N.d=function(d,o,a){N.o(d,o)||Object.defineProperty(d,o,{configurable:!1,enumerable:!0,get:a})},N.n=function(d){var o=d&&d.__esModule?function(){return d.default}:function(){return d};return N.d(o,"a",o),o},N.o=function(d,o){return Object.prototype.hasOwnProperty.call(d,o)},N.p="",N(N.s=28)})([(function(A,X,N){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,A.exports=d}),(function(A,X,N){"use strict";var d=N(2),o=N(8),a=N(9);function t(h,i,v){d.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=h,this.target=i}t.prototype=Object.create(d.prototype);for(var e in d)t[e]=d[e];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,i){for(var v=this.getOtherEnd(h),n=i.getGraphManager().getRoot();;){if(v.getOwner()==i)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},t.prototype.updateLength=function(){var h=new Array(4);this.isOverlapingSourceAndTarget=o.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=t}),(function(A,X,N){"use strict";function d(o){this.vGraphObject=o}A.exports=d}),(function(A,X,N){"use strict";var d=N(2),o=N(10),a=N(13),t=N(0),e=N(16),h=N(5);function i(n,r,f,l){f==null&&l==null&&(l=r),d.call(this,l),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=n,f!=null&&r!=null?this.rect=new a(r.x,r.y,f.width,f.height):this.rect=new a}i.prototype=Object.create(d.prototype);for(var v in d)i[v]=d[v];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(n){this.rect.width=n},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(n){this.rect.height=n},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(n,r){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=r.width,this.rect.height=r.height},i.prototype.setCenter=function(n,r){this.rect.x=n-this.rect.width/2,this.rect.y=r-this.rect.height/2},i.prototype.setLocation=function(n,r){this.rect.x=n,this.rect.y=r},i.prototype.moveBy=function(n,r){this.rect.x+=n,this.rect.y+=r},i.prototype.getEdgeListToNode=function(n){var r=[],f=this;return f.edges.forEach(function(l){if(l.target==n){if(l.source!=f)throw"Incorrect edge source!";r.push(l)}}),r},i.prototype.getEdgesBetween=function(n){var r=[],f=this;return f.edges.forEach(function(l){if(!(l.source==f||l.target==f))throw"Incorrect edge source and/or target";(l.target==n||l.source==n)&&r.push(l)}),r},i.prototype.getNeighborsList=function(){var n=new Set,r=this;return r.edges.forEach(function(f){if(f.source==r)n.add(f.target);else{if(f.target!=r)throw"Incorrect incidency!";n.add(f.source)}}),n},i.prototype.withChildren=function(){var n=new Set,r,f;if(n.add(this),this.child!=null)for(var l=this.child.getNodes(),p=0;p<l.length;p++)r=l[p],f=r.withChildren(),f.forEach(function(g){n.add(g)});return n},i.prototype.getNoOfChildren=function(){var n=0,r;if(this.child==null)n=1;else for(var f=this.child.getNodes(),l=0;l<f.length;l++)r=f[l],n+=r.getNoOfChildren();return n==0&&(n=1),n},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var n,r,f=-t.INITIAL_WORLD_BOUNDARY,l=t.INITIAL_WORLD_BOUNDARY;n=t.WORLD_CENTER_X+e.nextDouble()*(l-f)+f;var p=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_Y+e.nextDouble()*(g-p)+p,this.rect.x=n,this.rect.y=r},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var n=this.getChild();if(n.updateBounds(!0),this.rect.x=n.getLeft(),this.rect.y=n.getTop(),this.setWidth(n.getRight()-n.getLeft()),this.setHeight(n.getBottom()-n.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var r=n.getRight()-n.getLeft(),f=n.getBottom()-n.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(r+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>r?(this.rect.x-=(this.labelWidth-r)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(r+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))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(n){var r=this.rect.x;r>t.WORLD_BOUNDARY?r=t.WORLD_BOUNDARY:r<-t.WORLD_BOUNDARY&&(r=-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(r,f),p=n.inverseTransformPoint(l);this.setLocation(p.x,p.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i}),(function(A,X,N){"use strict";var d=N(0);function o(){}for(var a in d)o[a]=d[a];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=o}),(function(A,X,N){"use strict";function d(o,a){o==null&&a==null?(this.x=0,this.y=0):(this.x=o,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(o){this.x=o},d.prototype.setY=function(o){this.y=o},d.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},A.exports=d}),(function(A,X,N){"use strict";var d=N(2),o=N(10),a=N(0),t=N(7),e=N(3),h=N(1),i=N(13),v=N(12),n=N(11);function r(l,p,g){d.call(this,g),this.estimatedSize=o.MIN_VALUE,this.margin=a.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)}r.prototype=Object.create(d.prototype);for(var f in d)r[f]=d[f];r.prototype.getNodes=function(){return this.nodes},r.prototype.getEdges=function(){return this.edges},r.prototype.getGraphManager=function(){return this.graphManager},r.prototype.getParent=function(){return this.parent},r.prototype.getLeft=function(){return this.left},r.prototype.getRight=function(){return this.right},r.prototype.getTop=function(){return this.top},r.prototype.getBottom=function(){return this.bottom},r.prototype.isConnected=function(){return this.isConnected},r.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)}},r.prototype.remove=function(l){var p=l;if(l instanceof e){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,w=0;w<T;w++)c=g[w],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var R=this.nodes.indexOf(p);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,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),P=c.target.edges.indexOf(c);if(!(S>-1&&P>-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(P,1);var R=c.source.owner.getEdges().indexOf(c);if(R==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(R,1)}},r.prototype.updateLeftTop=function(){for(var l=o.MAX_VALUE,p=o.MAX_VALUE,g,c,T,w=this.getNodes(),R=w.length,S=0;S<R;S++){var P=w[S];g=P.getTop(),c=P.getLeft(),l>g&&(l=g),p>c&&(p=c)}return l==o.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?T=w[0].getParent().paddingLeft:T=this.margin,this.left=p-T,this.top=l-T,new v(this.left,this.top))},r.prototype.updateBounds=function(l){for(var p=o.MAX_VALUE,g=-o.MAX_VALUE,c=o.MAX_VALUE,T=-o.MAX_VALUE,w,R,S,P,W,B=this.nodes,x=B.length,it=0;it<x;it++){var s=B[it];l&&s.child!=null&&s.updateBounds(),w=s.getLeft(),R=s.getRight(),S=s.getTop(),P=s.getBottom(),p>w&&(p=w),g<R&&(g=R),c>S&&(c=S),T<P&&(T=P)}var E=new i(p,c,g-p,T-c);p==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),B[0].getParent().paddingLeft!=null?W=B[0].getParent().paddingLeft:W=this.margin,this.left=E.x-W,this.right=E.x+E.width+W,this.top=E.y-W,this.bottom=E.y+E.height+W},r.calculateBounds=function(l){for(var p=o.MAX_VALUE,g=-o.MAX_VALUE,c=o.MAX_VALUE,T=-o.MAX_VALUE,w,R,S,P,W=l.length,B=0;B<W;B++){var x=l[B];w=x.getLeft(),R=x.getRight(),S=x.getTop(),P=x.getBottom(),p>w&&(p=w),g<R&&(g=R),c>S&&(c=S),T<P&&(T=P)}return new i(p,c,g-p,T-c)},r.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=l/Math.sqrt(this.nodes.length),this.estimatedSize},r.prototype.updateConnected=function(){var l=this;if(this.nodes.length==0){this.isConnected=!0;return}var p=new n,g=new Set,c=this.nodes[0],T,w;for(c.withChildren().forEach(function(W){p.push(W),g.add(W)});p.length!==0;){c=p.shift(),T=c.getEdges();for(var R=T.length,S=0;S<R;S++)w=T[S].getOtherEndInGraph(c,this),w!=null&&!g.has(w)&&w.withChildren().forEach(function(W){p.push(W),g.add(W)})}if(this.isConnected=!1,g.size>=this.nodes.length){var P=0;g.forEach(function(W){W.owner==l&&P++}),P==this.nodes.length&&(this.isConnected=!0)}},A.exports=r}),(function(A,X,N){"use strict";var d,o=N(1);function a(t){d=N(6),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),h=this.add(t,e);return this.setRootGraph(h),this.rootGraph},a.prototype.add=function(t,e,h,i,v){if(h==null&&i==null&&v==null){if(t==null)throw"Graph is null!";if(e==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(e.child!=null)throw"Already has a child!";return t.parent=e,e.child=t,t}else{v=h,i=e,h=t;var n=i.getOwner(),r=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(r!=null&&r.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==r)return h.isInterGraph=!1,n.add(h,i,v);if(h.isInterGraph=!0,h.source=i,h.target=v,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}},a.prototype.remove=function(t){if(t instanceof d){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(e.getEdges());for(var i,v=h.length,n=0;n<v;n++)i=h[n],e.remove(i);var r=[];r=r.concat(e.getNodes());var f;v=r.length;for(var n=0;n<v;n++)f=r[n],e.remove(f);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof o){if(i=t,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var l=i.source.edges.indexOf(i);if(i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var l=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(l,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],e=this.getGraphs(),h=e.length,i=0;i<h;i++)t=t.concat(e[i].getNodes());this.allNodes=t}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],e=this.getGraphs();e.length;for(var h=0;h<e.length;h++)t=t.concat(e[h].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},a.prototype.getRoot=function(){return this.rootGraph},a.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"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(t,e){if(!(t!=null&&e!=null))throw"assert failed";if(t==e)return!0;var h=t.getOwner(),i;do{if(i=h.getParent(),i==null)break;if(i==e)return!0;if(h=i.getOwner(),h==null)break}while(!0);h=e.getOwner();do{if(i=h.getParent(),i==null)break;if(i==t)return!0;if(h=i.getOwner(),h==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var t,e,h,i,v,n=this.getAllEdges(),r=n.length,f=0;f<r;f++){if(t=n[f],e=t.source,h=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=h,e==h){t.lca=e.getOwner();continue}for(i=e.getOwner();t.lca==null;){for(t.targetInLca=h,v=h.getOwner();t.lca==null;){if(v==i){t.lca=v;break}if(v==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=v.getParent(),v=t.targetInLca.getOwner()}if(i==this.rootGraph)break;t.lca==null&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();var h=t.getOwner();do{if(h==null)break;var i=e.getOwner();do{if(i==null)break;if(i==h)return i;i=i.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},a.prototype.calcInclusionTreeDepths=function(t,e){t==null&&e==null&&(t=this.rootGraph,e=1);for(var h,i=t.getNodes(),v=i.length,n=0;n<v;n++)h=i[n],h.inclusionTreeDepth=e,h.child!=null&&this.calcInclusionTreeDepths(h.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var t,e=[],h=this.edges.length,i=0;i<h;i++)t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(var i=0;i<e.length;i++)this.remove(e[i]);return!1},A.exports=a}),(function(A,X,N){"use strict";var d=N(12);function o(){}o.calcSeparationAmount=function(a,t,e,h){if(!a.intersects(t))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,t,i),e[0]=Math.min(a.getRight(),t.getRight())-Math.max(a.x,t.x),e[1]=Math.min(a.getBottom(),t.getBottom())-Math.max(a.y,t.y),a.getX()<=t.getX()&&a.getRight()>=t.getRight()?e[0]+=Math.min(t.getX()-a.getX(),a.getRight()-t.getRight()):t.getX()<=a.getX()&&t.getRight()>=a.getRight()&&(e[0]+=Math.min(a.getX()-t.getX(),t.getRight()-a.getRight())),a.getY()<=t.getY()&&a.getBottom()>=t.getBottom()?e[1]+=Math.min(t.getY()-a.getY(),a.getBottom()-t.getBottom()):t.getY()<=a.getY()&&t.getBottom()>=a.getBottom()&&(e[1]+=Math.min(a.getY()-t.getY(),t.getBottom()-a.getBottom()));var v=Math.abs((t.getCenterY()-a.getCenterY())/(t.getCenterX()-a.getCenterX()));t.getCenterY()===a.getCenterY()&&t.getCenterX()===a.getCenterX()&&(v=1);var n=v*e[0],r=e[1]/v;e[0]<r?r=e[0]:n=e[1],e[0]=-1*i[0]*(r/2+h),e[1]=-1*i[1]*(n/2+h)},o.decideDirectionsForOverlappingNodes=function(a,t,e){a.getCenterX()<t.getCenterX()?e[0]=-1:e[0]=1,a.getCenterY()<t.getCenterY()?e[1]=-1:e[1]=1},o.getIntersection2=function(a,t,e){var h=a.getCenterX(),i=a.getCenterY(),v=t.getCenterX(),n=t.getCenterY();if(a.intersects(t))return e[0]=h,e[1]=i,e[2]=v,e[3]=n,!0;var r=a.getX(),f=a.getY(),l=a.getRight(),p=a.getX(),g=a.getBottom(),c=a.getRight(),T=a.getWidthHalf(),w=a.getHeightHalf(),R=t.getX(),S=t.getY(),P=t.getRight(),W=t.getX(),B=t.getBottom(),x=t.getRight(),it=t.getWidthHalf(),s=t.getHeightHalf(),E=!1,u=!1;if(h===v){if(i>n)return e[0]=h,e[1]=f,e[2]=v,e[3]=B,!1;if(i<n)return e[0]=h,e[1]=g,e[2]=v,e[3]=S,!1}else if(i===n){if(h>v)return e[0]=r,e[1]=i,e[2]=P,e[3]=n,!1;if(h<v)return e[0]=l,e[1]=i,e[2]=R,e[3]=n,!1}else{var m=a.height/a.width,y=t.height/t.width,C=(n-i)/(v-h),M=void 0,b=void 0,O=void 0,I=void 0,V=void 0,$=void 0;if(-m===C?h>v?(e[0]=p,e[1]=g,E=!0):(e[0]=l,e[1]=f,E=!0):m===C&&(h>v?(e[0]=r,e[1]=f,E=!0):(e[0]=c,e[1]=g,E=!0)),-y===C?v>h?(e[2]=W,e[3]=B,u=!0):(e[2]=P,e[3]=S,u=!0):y===C&&(v>h?(e[2]=R,e[3]=S,u=!0):(e[2]=x,e[3]=B,u=!0)),E&&u)return!1;if(h>v?i>n?(M=this.getCardinalDirection(m,C,4),b=this.getCardinalDirection(y,C,2)):(M=this.getCardinalDirection(-m,C,3),b=this.getCardinalDirection(-y,C,1)):i>n?(M=this.getCardinalDirection(-m,C,1),b=this.getCardinalDirection(-y,C,3)):(M=this.getCardinalDirection(m,C,2),b=this.getCardinalDirection(y,C,4)),!E)switch(M){case 1:I=f,O=h+-w/C,e[0]=O,e[1]=I;break;case 2:O=c,I=i+T*C,e[0]=O,e[1]=I;break;case 3:I=g,O=h+w/C,e[0]=O,e[1]=I;break;case 4:O=p,I=i+-T*C,e[0]=O,e[1]=I;break}if(!u)switch(b){case 1:$=S,V=v+-s/C,e[2]=V,e[3]=$;break;case 2:V=x,$=n+it*C,e[2]=V,e[3]=$;break;case 3:$=B,V=v+s/C,e[2]=V,e[3]=$;break;case 4:V=W,$=n+-it*C,e[2]=V,e[3]=$;break}}return!1},o.getCardinalDirection=function(a,t,e){return a>t?e:1+e%4},o.getIntersection=function(a,t,e,h){if(h==null)return this.getIntersection2(a,t,e);var i=a.x,v=a.y,n=t.x,r=t.y,f=e.x,l=e.y,p=h.x,g=h.y,c=void 0,T=void 0,w=void 0,R=void 0,S=void 0,P=void 0,W=void 0,B=void 0,x=void 0;return w=r-v,S=i-n,W=n*v-i*r,R=g-l,P=f-p,B=p*l-f*g,x=w*P-R*S,x===0?null:(c=(S*B-P*W)/x,T=(R*W-w*B)/x,new d(c,T))},o.angleOfVector=function(a,t,e,h){var i=void 0;return a!==e?(i=Math.atan((h-t)/(e-a)),e<a?i+=Math.PI:h<t&&(i+=this.TWO_PI)):h<t?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},o.doIntersect=function(a,t,e,h){var i=a.x,v=a.y,n=t.x,r=t.y,f=e.x,l=e.y,p=h.x,g=h.y,c=(n-i)*(g-l)-(p-f)*(r-v);if(c===0)return!1;var T=((g-l)*(p-i)+(f-p)*(g-v))/c,w=((v-r)*(p-i)+(n-i)*(g-v))/c;return 0<T&&T<1&&0<w&&w<1},o.findCircleLineIntersections=function(a,t,e,h,i,v,n){var r=(e-a)*(e-a)+(h-t)*(h-t),f=2*((a-i)*(e-a)+(t-v)*(h-t)),l=(a-i)*(a-i)+(t-v)*(t-v)-n*n;if(f*f-4*r*l>=0){var p=(-f+Math.sqrt(f*f-4*r*l))/(2*r),g=(-f-Math.sqrt(f*f-4*r*l))/(2*r),c=null;return p>=0&&p<=1?[p]:g>=0&&g<=1?[g]:c}else return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,A.exports=o}),(function(A,X,N){"use strict";function d(){}d.sign=function(o){return o>0?1:o<0?-1:0},d.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},d.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},A.exports=d}),(function(A,X,N){"use strict";function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,A.exports=d}),(function(A,X,N){"use strict";var d=(function(){function h(i,v){for(var n=0;n<v.length;n++){var r=v[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}return function(i,v,n){return v&&h(i.prototype,v),n&&h(i,n),i}})();function o(h,i){if(!(h instanceof i))throw new TypeError("Cannot call a class as a function")}var a=function(i){return{value:i,next:null,prev:null}},t=function(i,v,n,r){return i!==null?i.next=v:r.head=v,n!==null?n.prev=v:r.tail=v,v.prev=i,v.next=n,r.length++,v},e=function(i,v){var n=i.prev,r=i.next;return n!==null?n.next=r:v.head=r,r!==null?r.prev=n:v.tail=n,i.prev=i.next=null,v.length--,i};A.exports=(function(){function h(i){var v=this;o(this,h),this.length=0,this.head=null,this.tail=null,i?.forEach(function(n){return v.push(n)})}return d(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(v,n){return t(n.prev,a(v),n,this)}},{key:"insertAfter",value:function(v,n){return t(n,a(v),n.next,this)}},{key:"insertNodeBefore",value:function(v,n){return t(n.prev,v,n,this)}},{key:"insertNodeAfter",value:function(v,n){return t(n,v,n.next,this)}},{key:"push",value:function(v){return t(this.tail,a(v),null,this)}},{key:"unshift",value:function(v){return t(null,a(v),this.head,this)}},{key:"remove",value:function(v){return e(v,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(v){if(v<=this.length()){for(var n=1,r=this.head;n<v;)r=r.next,n++;return r.value}}},{key:"set_object_at",value:function(v,n){if(v<=this.length()){for(var r=1,f=this.head;r<v;)f=f.next,r++;f.value=n}}}]),h})()}),(function(A,X,N){"use strict";function d(o,a,t){this.x=null,this.y=null,o==null&&a==null&&t==null?(this.x=0,this.y=0):typeof o=="number"&&typeof a=="number"&&t==null?(this.x=o,this.y=a):o.constructor.name=="Point"&&a==null&&t==null&&(t=o,this.x=t.x,this.y=t.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(o,a,t){o.constructor.name=="Point"&&a==null&&t==null?(t=o,this.setLocation(t.x,t.y)):typeof o=="number"&&typeof a=="number"&&t==null&&(parseInt(o)==o&&parseInt(a)==a?this.move(o,a):(this.x=Math.floor(o+.5),this.y=Math.floor(a+.5)))},d.prototype.move=function(o,a){this.x=o,this.y=a},d.prototype.translate=function(o,a){this.x+=o,this.y+=a},d.prototype.equals=function(o){if(o.constructor.name=="Point"){var a=o;return this.x==a.x&&this.y==a.y}return this==o},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=d}),(function(A,X,N){"use strict";function d(o,a,t,e){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&a!=null&&t!=null&&e!=null&&(this.x=o,this.y=a,this.width=t,this.height=e)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(o){this.x=o},d.prototype.getY=function(){return this.y},d.prototype.setY=function(o){this.y=o},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(o){this.width=o},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(o){this.height=o},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},A.exports=d}),(function(A,X,N){"use strict";var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function o(){}o.lastID=0,o.createID=function(a){return o.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=o.getString(),o.lastID++),a.uniqueID)},o.getString=function(a){return a==null&&(a=o.lastID),"Object#"+a},o.isPrimitive=function(a){var t=typeof a>"u"?"undefined":d(a);return a==null||t!="object"&&t!="function"},A.exports=o}),(function(A,X,N){"use strict";function d(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 o=N(0),a=N(7),t=N(3),e=N(1),h=N(6),i=N(5),v=N(17),n=N(29);function r(f){n.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,f!=null&&(this.isRemoteUse=f)}r.RANDOM_SEED=1,r.prototype=Object.create(n.prototype),r.prototype.getGraphManager=function(){return this.graphManager},r.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},r.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},r.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},r.prototype.newGraphManager=function(){var f=new a(this);return this.graphManager=f,f},r.prototype.newGraph=function(f){return new h(null,this.graphManager,f)},r.prototype.newNode=function(f){return new t(this.graphManager,f)},r.prototype.newEdge=function(f){return new e(null,null,f)},r.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},r.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var f;return this.checkLayoutSuccess()?f=!1:f=this.layout(),o.ANIMATE==="during"?!1:(f&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,f)},r.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},r.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())}},r.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 e){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)}},r.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},r.prototype.transform=function(f){if(f==null)this.transform(new i(0,0));else{var l=new v,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)}}},r.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())},r.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,w=[],R=new Map,S=[];for(S=S.concat(p);S.length>0&&l;){for(w.push(S[0]);w.length>0&&l;){var P=w[0];w.splice(0,1),T.add(P);for(var W=P.getEdges(),c=0;c<W.length;c++){var B=W[c].getOtherEnd(P);if(R.get(P)!=B)if(!T.has(B))w.push(B),R.set(B,P);else{l=!1;break}}}if(!l)f=[];else{var x=[].concat(d(T));f.push(x);for(var c=0;c<x.length;c++){var it=x[c],s=S.indexOf(it);s>-1&&S.splice(s,1)}T=new Set,R=new Map}}return f},r.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 w=this.newEdge(null);this.graphManager.add(w,p,T),l.add(T),p=T}var w=this.newEdge(null);return this.graphManager.add(w,p,f.target),this.edgeToDummyNodes.set(f,l),f.isInterGraph()?this.graphManager.remove(f):g.remove(f),l},r.prototype.createBendpointsFromDummyNodes=function(){var f=[];f=f.concat(this.graphManager.getAllEdges()),f=[].concat(d(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],w=new i(T.getCenterX(),T.getCenterY()),R=p.bendpoints.get(c);R.x=w.x,R.y=w.y,T.getOwner().remove(T)}this.graphManager.add(p,p.source,p.target)}}},r.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 w=l*g;c+=(w-l)/50*(f-50)}return c}else{var R,S;return f<=50?(R=9*l/500,S=l/10):(R=9*l/50,S=-8*l),R*f+S}},r.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 w=0;w<l.length;w++){var R=l[w],S=R.getNeighborsList().size;g.set(R,R.getNeighborsList().size),S==1&&p.push(R)}var P=[];for(P=P.concat(p);!c;){var W=[];W=W.concat(P),P=[];for(var w=0;w<l.length;w++){var R=l[w],B=l.indexOf(R);B>=0&&l.splice(B,1),R.getNeighborsList().forEach(function(s){if(p.indexOf(s)<0){var E=g.get(s)-1;E==1&&P.push(s),g.set(s,E)}})}p=p.concat(P),(l.length==1||l.length==2)&&(c=!0,T=l[0])}return T},r.prototype.setGraphManager=function(f){this.graphManager=f},A.exports=r}),(function(A,X,N){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},A.exports=d}),(function(A,X,N){"use strict";var d=N(5);function o(a,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}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(a){this.lworldExtX=a},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(a){this.lworldExtY=a},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},o.prototype.transformX=function(a){var t=0,e=this.lworldExtX;return e!=0&&(t=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/e),t},o.prototype.transformY=function(a){var t=0,e=this.lworldExtY;return e!=0&&(t=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/e),t},o.prototype.inverseTransformX=function(a){var t=0,e=this.ldeviceExtX;return e!=0&&(t=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/e),t},o.prototype.inverseTransformY=function(a){var t=0,e=this.ldeviceExtY;return e!=0&&(t=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/e),t},o.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},A.exports=o}),(function(A,X,N){"use strict";function d(n){if(Array.isArray(n)){for(var r=0,f=Array(n.length);r<n.length;r++)f[r]=n[r];return f}else return Array.from(n)}var o=N(15),a=N(4),t=N(0),e=N(8),h=N(9);function i(){o.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}i.prototype=Object.create(o.prototype);for(var v in o)i[v]=o[v];i.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var n,r,f,l,p,g,c,T=this.getGraphManager().getAllEdges(),w=0;w<T.length;w++)n=T[w],r=n.idealLength,n.isInterGraph&&(l=n.getSource(),p=n.getTarget(),g=n.getSourceInLca().getEstimatedSize(),c=n.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(n.idealLength+=g+c-2*t.SIMPLE_NODE_SIZE),f=n.getLca().getInclusionTreeDepth(),n.idealLength+=r*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*f))},i.prototype.initSpringEmbedder=function(){var n=this.getAllNodes().length;this.incremental?(n>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(n-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),r,f=0;f<n.length;f++)r=n[f],this.calcSpringForce(r,r.idealLength)},i.prototype.calcRepulsionForces=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f,l,p,g,c=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),T=new Set,f=0;f<c.length;f++)p=c[f],this.calculateRepulsionForceOfANode(p,T,n,r),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)},i.prototype.calcGravitationalForces=function(){for(var n,r=this.getAllNodesToApplyGravitation(),f=0;f<r.length;f++)n=r[f],this.calcGravitationalForce(n)},i.prototype.moveNodes=function(){for(var n=this.getAllNodes(),r,f=0;f<n.length;f++)r=n[f],r.move()},i.prototype.calcSpringForce=function(n,r){var f=n.getSource(),l=n.getTarget(),p,g,c,T;if(this.uniformLeafNodeSizes&&f.getChild()==null&&l.getChild()==null)n.updateLengthSimple();else if(n.updateLength(),n.isOverlapingSourceAndTarget)return;p=n.getLength(),p!=0&&(g=n.edgeElasticity*(p-r),c=g*(n.lengthX/p),T=g*(n.lengthY/p),f.springForceX+=c,f.springForceY+=T,l.springForceX-=c,l.springForceY-=T)},i.prototype.calcRepulsionForce=function(n,r){var f=n.getRect(),l=r.getRect(),p=new Array(2),g=new Array(4),c,T,w,R,S,P,W;if(f.intersects(l)){e.calcSeparationAmount(f,l,p,a.DEFAULT_EDGE_LENGTH/2),P=2*p[0],W=2*p[1];var B=n.noOfChildren*r.noOfChildren/(n.noOfChildren+r.noOfChildren);n.repulsionForceX-=B*P,n.repulsionForceY-=B*W,r.repulsionForceX+=B*P,r.repulsionForceY+=B*W}else this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null?(c=l.getCenterX()-f.getCenterX(),T=l.getCenterY()-f.getCenterY()):(e.getIntersection(f,l,g),c=g[2]-g[0],T=g[3]-g[1]),Math.abs(c)<a.MIN_REPULSION_DIST&&(c=h.sign(c)*a.MIN_REPULSION_DIST),Math.abs(T)<a.MIN_REPULSION_DIST&&(T=h.sign(T)*a.MIN_REPULSION_DIST),w=c*c+T*T,R=Math.sqrt(w),S=(n.nodeRepulsion/2+r.nodeRepulsion/2)*n.noOfChildren*r.noOfChildren/w,P=S*c/R,W=S*T/R,n.repulsionForceX-=P,n.repulsionForceY-=W,r.repulsionForceX+=P,r.repulsionForceY+=W},i.prototype.calcGravitationalForce=function(n){var r,f,l,p,g,c,T,w;r=n.getOwner(),f=(r.getRight()+r.getLeft())/2,l=(r.getTop()+r.getBottom())/2,p=n.getCenterX()-f,g=n.getCenterY()-l,c=Math.abs(p)+n.getWidth()/2,T=Math.abs(g)+n.getHeight()/2,n.getOwner()==this.graphManager.getRoot()?(w=r.getEstimatedSize()*this.gravityRangeFactor,(c>w||T>w)&&(n.gravitationForceX=-this.gravityConstant*p,n.gravitationForceY=-this.gravityConstant*g)):(w=r.getEstimatedSize()*this.compoundGravityRangeFactor,(c>w||T>w)&&(n.gravitationForceX=-this.gravityConstant*p*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},i.prototype.isConverged=function(){var n,r=!1;return this.totalIterations>this.maxIterations/3&&(r=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,n||r},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var n,r=this.graphManager.getAllNodes(),f=0;f<r.length;f++)n=r[f],n.noOfChildren=n.getNoOfChildren()},i.prototype.calcGrid=function(n){var r=0,f=0;r=parseInt(Math.ceil((n.getRight()-n.getLeft())/this.repulsionRange)),f=parseInt(Math.ceil((n.getBottom()-n.getTop())/this.repulsionRange));for(var l=new Array(r),p=0;p<r;p++)l[p]=new Array(f);for(var p=0;p<r;p++)for(var g=0;g<f;g++)l[p][g]=new Array;return l},i.prototype.addNodeToGrid=function(n,r,f){var l=0,p=0,g=0,c=0;l=parseInt(Math.floor((n.getRect().x-r)/this.repulsionRange)),p=parseInt(Math.floor((n.getRect().width+n.getRect().x-r)/this.repulsionRange)),g=parseInt(Math.floor((n.getRect().y-f)/this.repulsionRange)),c=parseInt(Math.floor((n.getRect().height+n.getRect().y-f)/this.repulsionRange));for(var T=l;T<=p;T++)for(var w=g;w<=c;w++)this.grid[T][w].push(n),n.setGridCoordinates(l,p,g,c)},i.prototype.updateGrid=function(){var n,r,f=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),n=0;n<f.length;n++)r=f[n],this.addNodeToGrid(r,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(n,r,f,l){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f||l){var p=new Set;n.surrounding=new Array;for(var g,c=this.grid,T=n.startX-1;T<n.finishX+2;T++)for(var w=n.startY-1;w<n.finishY+2;w++)if(!(T<0||w<0||T>=c.length||w>=c[0].length)){for(var R=0;R<c[T][w].length;R++)if(g=c[T][w][R],!(n.getOwner()!=g.getOwner()||n==g)&&!r.has(g)&&!p.has(g)){var S=Math.abs(n.getCenterX()-g.getCenterX())-(n.getWidth()/2+g.getWidth()/2),P=Math.abs(n.getCenterY()-g.getCenterY())-(n.getHeight()/2+g.getHeight()/2);S<=this.repulsionRange&&P<=this.repulsionRange&&p.add(g)}}n.surrounding=[].concat(d(p))}for(T=0;T<n.surrounding.length;T++)this.calcRepulsionForce(n,n.surrounding[T])},i.prototype.calcRepulsionRange=function(){return 0},A.exports=i}),(function(A,X,N){"use strict";var d=N(1),o=N(4);function a(e,h,i){d.call(this,e,h,i),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(d.prototype);for(var t in d)a[t]=d[t];A.exports=a}),(function(A,X,N){"use strict";var d=N(3),o=N(4);function a(e,h,i,v){d.call(this,e,h,i,v),this.nodeRepulsion=o.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=[]}a.prototype=Object.create(d.prototype);for(var t in d)a[t]=d[t];a.prototype.setGridCoordinates=function(e,h,i,v){this.startX=e,this.finishX=h,this.startY=i,this.finishY=v},A.exports=a}),(function(A,X,N){"use strict";function d(o,a){this.width=0,this.height=0,o!==null&&a!==null&&(this.height=a,this.width=o)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(o){this.width=o},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(o){this.height=o},A.exports=d}),(function(A,X,N){"use strict";var d=N(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(a,t){var e=d.createID(a);this.contains(e)||(this.map[e]=t,this.keys.push(a))},o.prototype.contains=function(a){return d.createID(a),this.map[a]!=null},o.prototype.get=function(a){var t=d.createID(a);return this.map[t]},o.prototype.keySet=function(){return this.keys},A.exports=o}),(function(A,X,N){"use strict";var d=N(14);function o(){this.set={}}o.prototype.add=function(a){var t=d.createID(a);this.contains(t)||(this.set[t]=a)},o.prototype.remove=function(a){delete this.set[d.createID(a)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(a){return this.set[d.createID(a)]==a},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(a){for(var t=Object.keys(this.set),e=t.length,h=0;h<e;h++)a.push(this.set[t[h]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(a){for(var t=a.length,e=0;e<t;e++){var h=a[e];this.add(h)}},A.exports=o}),(function(A,X,N){"use strict";function d(){}d.multMat=function(o,a){for(var t=[],e=0;e<o.length;e++){t[e]=[];for(var h=0;h<a[0].length;h++){t[e][h]=0;for(var i=0;i<o[0].length;i++)t[e][h]+=o[e][i]*a[i][h]}}return t},d.transpose=function(o){for(var a=[],t=0;t<o[0].length;t++){a[t]=[];for(var e=0;e<o.length;e++)a[t][e]=o[e][t]}return a},d.multCons=function(o,a){for(var t=[],e=0;e<o.length;e++)t[e]=o[e]*a;return t},d.minusOp=function(o,a){for(var t=[],e=0;e<o.length;e++)t[e]=o[e]-a[e];return t},d.dotProduct=function(o,a){for(var t=0,e=0;e<o.length;e++)t+=o[e]*a[e];return t},d.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},d.normalize=function(o){for(var a=[],t=this.mag(o),e=0;e<o.length;e++)a[e]=o[e]/t;return a},d.multGamma=function(o){for(var a=[],t=0,e=0;e<o.length;e++)t+=o[e];t*=-1/o.length;for(var h=0;h<o.length;h++)a[h]=t+o[h];return a},d.multL=function(o,a,t){for(var e=[],h=[],i=[],v=0;v<a[0].length;v++){for(var n=0,r=0;r<a.length;r++)n+=-.5*a[r][v]*o[r];h[v]=n}for(var f=0;f<t.length;f++){for(var l=0,p=0;p<t.length;p++)l+=t[f][p]*h[p];i[f]=l}for(var g=0;g<a.length;g++){for(var c=0,T=0;T<a[0].length;T++)c+=a[g][T]*i[T];e[g]=c}return e},A.exports=d}),(function(A,X,N){"use strict";var d=(function(){function t(e,h){for(var i=0;i<h.length;i++){var v=h[i];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}return function(e,h,i){return h&&t(e.prototype,h),i&&t(e,i),e}})();function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=N(11);A.exports=(function(){function t(e,h){o(this,t),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var i=void 0;e instanceof a?i=e.size():i=e.length,this._quicksort(e,0,i-1)}return d(t,[{key:"_quicksort",value:function(h,i,v){if(i<v){var n=this._partition(h,i,v);this._quicksort(h,i,n),this._quicksort(h,n+1,v)}}},{key:"_partition",value:function(h,i,v){for(var n=this._get(h,i),r=i,f=v;;){for(;this.compareFunction(n,this._get(h,f));)f--;for(;this.compareFunction(this._get(h,r),n);)r++;if(r<f)this._swap(h,r,f),r++,f--;else return f}}},{key:"_get",value:function(h,i){return h instanceof a?h.get_object_at(i):h[i]}},{key:"_set",value:function(h,i,v){h instanceof a?h.set_object_at(i,v):h[i]=v}},{key:"_swap",value:function(h,i,v){var n=this._get(h,i);this._set(h,i,this._get(h,v)),this._set(h,v,n)}},{key:"_defaultCompareFunction",value:function(h,i){return i>h}}]),t})()}),(function(A,X,N){"use strict";function d(){}d.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var a=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(Ht){if(Ht.length==0)return 0;for(var St=[],Ut=0;Ut<Ht[0];Ut++)St.push(Tt(Ht.slice(1)));return St})(Ot)})([this.m,a]),this.V=(function(Ot){return(function Tt(Ht){if(Ht.length==0)return 0;for(var St=[],Ut=0;Ut<Ht[0];Ut++)St.push(Tt(Ht.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),e=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(this.m),h=!0,i=!0,v=Math.min(this.m-1,this.n),n=Math.max(0,Math.min(this.n-2,this.m)),r=0;r<Math.max(v,n);r++){if(r<v){this.s[r]=0;for(var f=r;f<this.m;f++)this.s[r]=d.hypot(this.s[r],o[f][r]);if(this.s[r]!==0){o[r][r]<0&&(this.s[r]=-this.s[r]);for(var l=r;l<this.m;l++)o[l][r]/=this.s[r];o[r][r]+=1}this.s[r]=-this.s[r]}for(var p=r+1;p<this.n;p++){if((function(Ot,Tt){return Ot&&Tt})(r<v,this.s[r]!==0)){for(var g=0,c=r;c<this.m;c++)g+=o[c][r]*o[c][p];g=-g/o[r][r];for(var T=r;T<this.m;T++)o[T][p]+=g*o[T][r]}t[p]=o[r][p]}if((function(Ot,Tt){return Ot&&Tt})(h,r<v))for(var w=r;w<this.m;w++)this.U[w][r]=o[w][r];if(r<n){t[r]=0;for(var R=r+1;R<this.n;R++)t[r]=d.hypot(t[r],t[R]);if(t[r]!==0){t[r+1]<0&&(t[r]=-t[r]);for(var S=r+1;S<this.n;S++)t[S]/=t[r];t[r+1]+=1}if(t[r]=-t[r],(function(Ot,Tt){return Ot&&Tt})(r+1<this.m,t[r]!==0)){for(var P=r+1;P<this.m;P++)e[P]=0;for(var W=r+1;W<this.n;W++)for(var B=r+1;B<this.m;B++)e[B]+=t[W]*o[B][W];for(var x=r+1;x<this.n;x++)for(var it=-t[x]/t[r+1],s=r+1;s<this.m;s++)o[s][x]+=it*e[s]}if(i)for(var E=r+1;E<this.n;E++)this.V[E][r]=t[E]}}var u=Math.min(this.n,this.m+1);if(v<this.n&&(this.s[v]=o[v][v]),this.m<u&&(this.s[u-1]=0),n+1<u&&(t[n]=o[n][u-1]),t[u-1]=0,h){for(var m=v;m<a;m++){for(var y=0;y<this.m;y++)this.U[y][m]=0;this.U[m][m]=1}for(var C=v-1;C>=0;C--)if(this.s[C]!==0){for(var M=C+1;M<a;M++){for(var b=0,O=C;O<this.m;O++)b+=this.U[O][C]*this.U[O][M];b=-b/this.U[C][C];for(var I=C;I<this.m;I++)this.U[I][M]+=b*this.U[I][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 $=0;$<C-1;$++)this.U[$][C]=0}else{for(var et=0;et<this.m;et++)this.U[et][C]=0;this.U[C][C]=1}}if(i)for(var K=this.n-1;K>=0;K--){if((function(Ot,Tt){return Ot&&Tt})(K<n,t[K]!==0))for(var G=K+1;G<a;G++){for(var F=0,Y=K+1;Y<this.n;Y++)F+=this.V[Y][K]*this.V[Y][G];F=-F/this.V[K+1][K];for(var J=K+1;J<this.n;J++)this.V[J][G]+=F*this.V[J][K]}for(var at=0;at<this.n;at++)this.V[at][K]=0;this.V[K][K]=1}for(var q=u-1,Z=0,mt=Math.pow(2,-52),lt=Math.pow(2,-966);u>0;){var k=void 0,Et=void 0;for(k=u-2;k>=-1&&k!==-1;k--)if(Math.abs(t[k])<=lt+mt*(Math.abs(this.s[k])+Math.abs(this.s[k+1]))){t[k]=0;break}if(k===u-2)Et=4;else{var ot=void 0;for(ot=u-1;ot>=k&&ot!==k;ot--){var Ct=(ot!==u?Math.abs(t[ot]):0)+(ot!==k+1?Math.abs(t[ot-1]):0);if(Math.abs(this.s[ot])<=lt+mt*Ct){this.s[ot]=0;break}}ot===k?Et=3:ot===u-1?Et=1:(Et=2,k=ot)}switch(k++,Et){case 1:var Vt=t[u-2];t[u-2]=0;for(var Dt=u-2;Dt>=k;Dt--){var xt=d.hypot(this.s[Dt],Vt),Gt=this.s[Dt]/xt,Wt=Vt/xt;if(this.s[Dt]=xt,Dt!==k&&(Vt=-Wt*t[Dt-1],t[Dt-1]=Gt*t[Dt-1]),i)for(var Ft=0;Ft<this.n;Ft++)xt=Gt*this.V[Ft][Dt]+Wt*this.V[Ft][u-1],this.V[Ft][u-1]=-Wt*this.V[Ft][Dt]+Gt*this.V[Ft][u-1],this.V[Ft][Dt]=xt}break;case 2:var $t=t[k-1];t[k-1]=0;for(var Xt=k;Xt<u;Xt++){var Bt=d.hypot(this.s[Xt],$t),At=this.s[Xt]/Bt,gt=$t/Bt;if(this.s[Xt]=Bt,$t=-gt*t[Xt],t[Xt]=At*t[Xt],h)for(var D=0;D<this.m;D++)Bt=At*this.U[D][Xt]+gt*this.U[D][k-1],this.U[D][k-1]=-gt*this.U[D][Xt]+At*this.U[D][k-1],this.U[D][Xt]=Bt}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[k])),Math.abs(t[k])),z=this.s[u-1]/H,_=this.s[u-2]/H,Q=t[u-2]/H,j=this.s[k]/H,pt=t[k]/H,ft=((_+z)*(_-z)+Q*Q)/2,rt=z*Q*(z*Q),dt=0;(function(Ot,Tt){return Ot||Tt})(ft!==0,rt!==0)&&(dt=Math.sqrt(ft*ft+rt),ft<0&&(dt=-dt),dt=rt/(ft+dt));for(var Lt=(j+z)*(j-z)+dt,wt=j*pt,tt=k;tt<u-1;tt++){var Nt=d.hypot(Lt,wt),st=Lt/Nt,nt=wt/Nt;if(tt!==k&&(t[tt-1]=Nt),Lt=st*this.s[tt]+nt*t[tt],t[tt]=st*t[tt]-nt*this.s[tt],wt=nt*this.s[tt+1],this.s[tt+1]=st*this.s[tt+1],i)for(var ht=0;ht<this.n;ht++)Nt=st*this.V[ht][tt]+nt*this.V[ht][tt+1],this.V[ht][tt+1]=-nt*this.V[ht][tt]+st*this.V[ht][tt+1],this.V[ht][tt]=Nt;if(Nt=d.hypot(Lt,wt),st=Lt/Nt,nt=wt/Nt,this.s[tt]=Nt,Lt=st*t[tt]+nt*this.s[tt+1],this.s[tt+1]=-nt*t[tt]+st*this.s[tt+1],wt=nt*t[tt+1],t[tt+1]=st*t[tt+1],h&&tt<this.m-1)for(var yt=0;yt<this.m;yt++)Nt=st*this.U[yt][tt]+nt*this.U[yt][tt+1],this.U[yt][tt+1]=-nt*this.U[yt][tt]+st*this.U[yt][tt+1],this.U[yt][tt]=Nt}t[u-2]=Lt,Z=Z+1;break;case 4:if(this.s[k]<=0&&(this.s[k]=this.s[k]<0?-this.s[k]:0,i))for(var ut=0;ut<=q;ut++)this.V[ut][k]=-this.V[ut][k];for(;k<q&&!(this.s[k]>=this.s[k+1]);){var Rt=this.s[k];if(this.s[k]=this.s[k+1],this.s[k+1]=Rt,i&&k<this.n-1)for(var It=0;It<this.n;It++)Rt=this.V[It][k+1],this.V[It][k+1]=this.V[It][k],this.V[It][k]=Rt;if(h&&k<this.m-1)for(var bt=0;bt<this.m;bt++)Rt=this.U[bt][k+1],this.U[bt][k+1]=this.U[bt][k],this.U[bt][k]=Rt;k++}Z=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(o,a){var t=void 0;return Math.abs(o)>Math.abs(a)?(t=a/o,t=Math.abs(o)*Math.sqrt(1+t*t)):a!=0?(t=o/a,t=Math.abs(a)*Math.sqrt(1+t*t)):t=0,t},A.exports=d}),(function(A,X,N){"use strict";var d=(function(){function a(t,e){for(var h=0;h<e.length;h++){var i=e[h];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,h){return e&&a(t.prototype,e),h&&a(t,h),t}})();function o(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}A.exports=(function(){function a(t,e){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,a),this.sequence1=t,this.sequence2=e,this.match_score=h,this.mismatch_penalty=i,this.gap_penalty=v,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=new Array(this.iMax);for(var n=0;n<this.iMax;n++){this.grid[n]=new Array(this.jMax);for(var r=0;r<this.jMax;r++)this.grid[n][r]=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 d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var 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 i=1;i<this.iMax;i++)for(var v=1;v<this.jMax;v++){var n=void 0;this.sequence1[i-1]===this.sequence2[v-1]?n=this.grid[i-1][v-1]+this.match_score:n=this.grid[i-1][v-1]+this.mismatch_penalty;var r=this.grid[i-1][v]+this.gap_penalty,f=this.grid[i][v-1]+this.gap_penalty,l=[n,r,f],p=this.arrayAllMaxIndexes(l);this.grid[i][v]=l[p[0]],this.tracebackGrid[i][v]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var h=e[0],i=this.tracebackGrid[h.pos[0]][h.pos[1]];i[0]&&e.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}),i[1]&&e.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),i[2]&&e.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}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,h){for(var i=[],v=-1;(v=e.indexOf(h,v+1))!==-1;)i.push(v);return i}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),a})()}),(function(A,X,N){"use strict";var d=function(){};d.FDLayout=N(18),d.FDLayoutConstants=N(4),d.FDLayoutEdge=N(19),d.FDLayoutNode=N(20),d.DimensionD=N(21),d.HashMap=N(22),d.HashSet=N(23),d.IGeometry=N(8),d.IMath=N(9),d.Integer=N(10),d.Point=N(12),d.PointD=N(5),d.RandomSeed=N(16),d.RectangleD=N(13),d.Transform=N(17),d.UniqueIDGeneretor=N(14),d.Quicksort=N(25),d.LinkedList=N(11),d.LGraphObject=N(2),d.LGraph=N(6),d.LEdge=N(1),d.LGraphManager=N(7),d.LNode=N(3),d.Layout=N(15),d.LayoutConstants=N(0),d.NeedlemanWunsch=N(27),d.Matrix=N(24),d.SVD=N(26),A.exports=d}),(function(A,X,N){"use strict";function d(){this.listeners=[]}var o=d.prototype;o.addListener=function(a,t){this.listeners.push({event:a,callback:t})},o.removeListener=function(a,t){for(var e=this.listeners.length;e>=0;e--){var h=this.listeners[e];h.event===a&&h.callback===t&&this.listeners.splice(e,1)}},o.emit=function(a,t){for(var e=0;e<this.listeners.length;e++){var h=this.listeners[e];a===h.event&&h.callback(t)}},A.exports=d})])})})),Ie=Ce(((L,U)=>{(function(X,N){typeof L=="object"&&typeof U=="object"?U.exports=N(xe()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof L=="object"?L.coseBase=N(xe()):X.coseBase=N(X.layoutBase)})(L,function(A){return(()=>{"use strict";var X={45:((o,a,t)=>{var e={};e.layoutBase=t(551),e.CoSEConstants=t(806),e.CoSEEdge=t(767),e.CoSEGraph=t(880),e.CoSEGraphManager=t(578),e.CoSELayout=t(765),e.CoSENode=t(991),e.ConstraintHandler=t(902),o.exports=e}),806:((o,a,t)=>{var e=t(551).FDLayoutConstants;function h(){}for(var i in e)h[i]=e[i];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=e.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,o.exports=h}),767:((o,a,t)=>{var e=t(551).FDLayoutEdge;function h(v,n,r){e.call(this,v,n,r)}h.prototype=Object.create(e.prototype);for(var i in e)h[i]=e[i];o.exports=h}),880:((o,a,t)=>{var e=t(551).LGraph;function h(v,n,r){e.call(this,v,n,r)}h.prototype=Object.create(e.prototype);for(var i in e)h[i]=e[i];o.exports=h}),578:((o,a,t)=>{var e=t(551).LGraphManager;function h(v){e.call(this,v)}h.prototype=Object.create(e.prototype);for(var i in e)h[i]=e[i];o.exports=h}),765:((o,a,t)=>{var e=t(551).FDLayout,h=t(578),i=t(880),v=t(991),n=t(767),r=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,w=t(551).Layout,R=t(551).Integer,S=t(551).IGeometry,P=t(551).LGraph,W=t(551).Transform,B=t(551).LinkedList;function x(){e.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(e.prototype);for(var it in e)x[it]=e[it];x.prototype.newGraphManager=function(){var s=new h(this);return this.graphManager=s,s},x.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},x.prototype.newNode=function(s){return new v(this.graphManager,s)},x.prototype.newEdge=function(s){return new n(null,null,s)},x.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(r.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=r.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(){e.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(r.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(C){return E.has(C)});this.graphManager.setAllNodesToApplyGravitation(u)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),r.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 s=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return s.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),r.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()),r.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,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),E={},u=0;u<s.length;u++){var m=s[u].rect,y=s[u].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var s=this.getAllNodes(),E,u=0;u<s.length;u++)E=s[u],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<s.length;u++)E=s[u],E.move()},x.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),u=0;u<E.length;u++){var m=E[u];this.idToNodeMap.set(m.id,m)}var y=function F(Y){for(var J=Y.getChild().getNodes(),at,q=0,Z=0;Z<J.length;Z++)at=J[Z],at.getChild()==null?s.fixedNodeSet.has(at.id)&&(q+=100):q+=F(at);return q};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(J){s.fixedNodeSet.add(J.nodeId)});for(var E=this.graphManager.getAllNodes(),m,u=0;u<E.length;u++)if(m=E[u],m.getChild()!=null){var C=y(m);C>0&&(m.fixedNodeWeight=C)}}if(this.constraints.relativePlacementConstraint){var M=new Map,b=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(F){s.fixedNodesOnHorizontal.add(F),s.fixedNodesOnVertical.add(F)}),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(Y){M.set(Y,"dummy"+u),s.dummyToNodeForVerticalAlignment.get("dummy"+u).push(Y),s.fixedNodeSet.has(Y)&&s.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var I=this.constraints.alignmentConstraint.horizontal,u=0;u<I.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),I[u].forEach(function(Y){b.set(Y,"dummy"+u),s.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(Y),s.fixedNodeSet.has(Y)&&s.fixedNodesOnVertical.add("dummy"+u)})}if(r.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(F){var Y,J,at;for(at=F.length-1;at>=2*F.length/3;at--)Y=Math.floor(Math.random()*(at+1)),J=F[at],F[at]=F[Y],F[Y]=J;return F},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(F){if(F.left){var Y=M.has(F.left)?M.get(F.left):F.left,J=M.has(F.right)?M.get(F.right):F.right;s.nodesInRelativeHorizontal.includes(Y)||(s.nodesInRelativeHorizontal.push(Y),s.nodeToRelativeConstraintMapHorizontal.set(Y,[]),s.dummyToNodeForVerticalAlignment.has(Y)?s.nodeToTempPositionMapHorizontal.set(Y,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(Y,s.idToNodeMap.get(Y).getCenterX())),s.nodesInRelativeHorizontal.includes(J)||(s.nodesInRelativeHorizontal.push(J),s.nodeToRelativeConstraintMapHorizontal.set(J,[]),s.dummyToNodeForVerticalAlignment.has(J)?s.nodeToTempPositionMapHorizontal.set(J,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(J,s.idToNodeMap.get(J).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:J,gap:F.gap}),s.nodeToRelativeConstraintMapHorizontal.get(J).push({left:Y,gap:F.gap})}else{var at=b.has(F.top)?b.get(F.top):F.top,q=b.has(F.bottom)?b.get(F.bottom):F.bottom;s.nodesInRelativeVertical.includes(at)||(s.nodesInRelativeVertical.push(at),s.nodeToRelativeConstraintMapVertical.set(at,[]),s.dummyToNodeForHorizontalAlignment.has(at)?s.nodeToTempPositionMapVertical.set(at,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(at)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(at,s.idToNodeMap.get(at).getCenterY())),s.nodesInRelativeVertical.includes(q)||(s.nodesInRelativeVertical.push(q),s.nodeToRelativeConstraintMapVertical.set(q,[]),s.dummyToNodeForHorizontalAlignment.has(q)?s.nodeToTempPositionMapVertical.set(q,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(q)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(q,s.idToNodeMap.get(q).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(at).push({bottom:q,gap:F.gap}),s.nodeToRelativeConstraintMapVertical.get(q).push({top:at,gap:F.gap})}});else{var V=new Map,$=new Map;this.constraints.relativePlacementConstraint.forEach(function(F){if(F.left){var Y=M.has(F.left)?M.get(F.left):F.left,J=M.has(F.right)?M.get(F.right):F.right;V.has(Y)?V.get(Y).push(J):V.set(Y,[J]),V.has(J)?V.get(J).push(Y):V.set(J,[Y])}else{var at=b.has(F.top)?b.get(F.top):F.top,q=b.has(F.bottom)?b.get(F.bottom):F.bottom;$.has(at)?$.get(at).push(q):$.set(at,[q]),$.has(q)?$.get(q).push(at):$.set(q,[at])}});var et=function(Y,J){var at=[],q=[],Z=new B,mt=new Set,lt=0;return Y.forEach(function(k,Et){if(!mt.has(Et)){at[lt]=[],q[lt]=!1;var ot=Et;for(Z.push(ot),mt.add(ot),at[lt].push(ot);Z.length!=0;)ot=Z.shift(),J.has(ot)&&(q[lt]=!0),Y.get(ot).forEach(function(Ct){mt.has(Ct)||(Z.push(Ct),mt.add(Ct),at[lt].push(Ct))});lt++}}),{components:at,isFixed:q}},K=et(V,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var G=et($,s.fixedNodesOnVertical);this.componentsOnVertical=G.components,this.fixedComponentsOnVertical=G.isFixed}}},x.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(G){var F=s.idToNodeMap.get(G.nodeId);F.displacementX=0,F.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,u=0;u<E.length;u++){for(var m=0,y=0;y<E[u].length;y++){if(this.fixedNodeSet.has(E[u][y])){m=0;break}m+=this.idToNodeMap.get(E[u][y]).displacementX}for(var C=m/E[u].length,y=0;y<E[u].length;y++)this.idToNodeMap.get(E[u][y]).displacementX=C}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,u=0;u<M.length;u++){for(var b=0,y=0;y<M[u].length;y++){if(this.fixedNodeSet.has(M[u][y])){b=0;break}b+=this.idToNodeMap.get(M[u][y]).displacementY}for(var O=b/M[u].length,y=0;y<M[u].length;y++)this.idToNodeMap.get(M[u][y]).displacementY=O}}if(this.constraints.relativePlacementConstraint)if(r.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(G){if(!s.fixedNodesOnHorizontal.has(G)){var F=0;s.dummyToNodeForVerticalAlignment.has(G)?F=s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(G)[0]).displacementX:F=s.idToNodeMap.get(G).displacementX,s.nodeToRelativeConstraintMapHorizontal.get(G).forEach(function(Y){if(Y.right){var J=s.nodeToTempPositionMapHorizontal.get(Y.right)-s.nodeToTempPositionMapHorizontal.get(G)-F;J<Y.gap&&(F-=Y.gap-J)}else{var J=s.nodeToTempPositionMapHorizontal.get(G)-s.nodeToTempPositionMapHorizontal.get(Y.left)+F;J<Y.gap&&(F+=Y.gap-J)}}),s.nodeToTempPositionMapHorizontal.set(G,s.nodeToTempPositionMapHorizontal.get(G)+F),s.dummyToNodeForVerticalAlignment.has(G)?s.dummyToNodeForVerticalAlignment.get(G).forEach(function(Y){s.idToNodeMap.get(Y).displacementX=F}):s.idToNodeMap.get(G).displacementX=F}}),this.nodesInRelativeVertical.forEach(function(G){if(!s.fixedNodesOnHorizontal.has(G)){var F=0;s.dummyToNodeForHorizontalAlignment.has(G)?F=s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(G)[0]).displacementY:F=s.idToNodeMap.get(G).displacementY,s.nodeToRelativeConstraintMapVertical.get(G).forEach(function(Y){if(Y.bottom){var J=s.nodeToTempPositionMapVertical.get(Y.bottom)-s.nodeToTempPositionMapVertical.get(G)-F;J<Y.gap&&(F-=Y.gap-J)}else{var J=s.nodeToTempPositionMapVertical.get(G)-s.nodeToTempPositionMapVertical.get(Y.top)+F;J<Y.gap&&(F+=Y.gap-J)}}),s.nodeToTempPositionMapVertical.set(G,s.nodeToTempPositionMapVertical.get(G)+F),s.dummyToNodeForHorizontalAlignment.has(G)?s.dummyToNodeForHorizontalAlignment.get(G).forEach(function(Y){s.idToNodeMap.get(Y).displacementY=F}):s.idToNodeMap.get(G).displacementY=F}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var I=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(Y){s.idToNodeMap.get(Y).displacementX=0}):this.idToNodeMap.get(I[y]).displacementX=0;else{for(var V=0,$=0,y=0;y<I.length;y++)if(this.dummyToNodeForVerticalAlignment.has(I[y])){var et=this.dummyToNodeForVerticalAlignment.get(I[y]);V+=et.length*this.idToNodeMap.get(et[0]).displacementX,$+=et.length}else V+=this.idToNodeMap.get(I[y]).displacementX,$++;for(var K=V/$,y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(Y){s.idToNodeMap.get(Y).displacementX=K}):this.idToNodeMap.get(I[y]).displacementX=K}}for(var u=0;u<this.componentsOnVertical.length;u++){var I=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(J){s.idToNodeMap.get(J).displacementY=0}):this.idToNodeMap.get(I[y]).displacementY=0;else{for(var V=0,$=0,y=0;y<I.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(I[y])){var et=this.dummyToNodeForHorizontalAlignment.get(I[y]);V+=et.length*this.idToNodeMap.get(et[0]).displacementY,$+=et.length}else V+=this.idToNodeMap.get(I[y]).displacementY,$++;for(var K=V/$,y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(Z){s.idToNodeMap.get(Z).displacementY=K}):this.idToNodeMap.get(I[y]).displacementY=K}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],E,u=this.graphManager.getGraphs(),m=u.length,y;for(y=0;y<m;y++)E=u[y],E.updateConnected(),E.isConnected||(s=s.concat(E.getNodes()));return s},x.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var E=new Set,u;for(u=0;u<s.length;u++){var m=s[u];if(!E.has(m)){var y=m.getSource(),C=m.getTarget();if(y==C)m.getBendpoints().push(new c),m.getBendpoints().push(new c),this.createDummyNodesForBendpoints(m),E.add(m);else{var M=[];if(M=M.concat(y.getEdgeListToNode(C)),M=M.concat(C.getEdgeListToNode(y)),!E.has(M[0])){if(M.length>1){var b;for(b=0;b<M.length;b++){var O=M[b];O.getBendpoints().push(new c),this.createDummyNodesForBendpoints(O)}}M.forEach(function(I){E.add(I)})}}}if(E.size==s.length)break}},x.prototype.positionNodesRadially=function(s){for(var E=new g(0,0),u=Math.ceil(Math.sqrt(s.length)),m=0,y=0,C=0,M=new c(0,0),b=0;b<s.length;b++){b%u==0&&(C=0,y=m,b!=0&&(y+=r.DEFAULT_COMPONENT_SEPERATION),m=0);var O=s[b],I=w.findCenterOfTree(O);E.x=C,E.y=y,M=x.radialLayout(O,I,E),M.y>m&&(m=Math.floor(M.y)),C=Math.floor(M.x+r.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(p.WORLD_CENTER_X-M.x/2,p.WORLD_CENTER_Y-M.y/2))},x.radialLayout=function(s,E,u){var m=Math.max(this.maxDiagonalInTree(s),r.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(E,null,0,359,0,m);var y=P.calculateBounds(s),C=new W;C.setDeviceOrgX(y.getMinX()),C.setDeviceOrgY(y.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var M=0;M<s.length;M++)s[M].transform(C);var b=new c(y.getMaxX(),y.getMaxY());return C.inverseTransformPoint(b)},x.branchRadialLayout=function(s,E,u,m,y,C){var M=(m-u+1)/2;M<0&&(M+=180);var b=(M+u)%360*S.TWO_PI/360,O=y*Math.cos(b),I=y*Math.sin(b);s.setCenter(O,I);var V=[];V=V.concat(s.getEdges());var $=V.length;E!=null&&$--;for(var et=0,K=V.length,G,F=s.getEdgesBetween(E);F.length>1;){var Y=F[0];F.splice(0,1);var J=V.indexOf(Y);J>=0&&V.splice(J,1),K--,$--}E!=null?G=(V.indexOf(F[0])+1)%K:G=0;for(var at=Math.abs(m-u)/$,q=G;et!=$;q=++q%K){var Z=V[q].getOtherEnd(s);if(Z!=E){var mt=(u+et*at)%360,lt=(mt+at)%360;x.branchRadialLayout(Z,s,mt,lt,y+C,C),et++}}},x.maxDiagonalInTree=function(s){for(var E=R.MIN_VALUE,u=0;u<s.length;u++){var m=s[u].getDiagonal();m>E&&(E=m)}return E},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var s=this,E={};this.memberGroups={},this.idToDummyNode={};for(var u=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var C=m[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],b=C.getParent().id;typeof E[b]>"u"&&(E[b]=[]),E[b]=E[b].concat(C)}Object.keys(E).forEach(function(O){if(E[O].length>1){var I="DummyCompound_"+O;s.memberGroups[I]=E[O];var V=E[O][0].getParent(),$=new v(s.graphManager);$.id=I,$.paddingLeft=V.paddingLeft||0,$.paddingRight=V.paddingRight||0,$.paddingBottom=V.paddingBottom||0,$.paddingTop=V.paddingTop||0,s.idToDummyNode[I]=$;var et=s.getGraphManager().add(s.newGraph(),$),K=V.getChild();K.add($);for(var G=0;G<E[O].length;G++){var F=E[O][G];K.remove(F),et.add(F)}}})},x.prototype.clearCompounds=function(){var s={},E={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)E[this.compoundOrder[u].id]=this.compoundOrder[u],s[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(s,E)},x.prototype.clearZeroDegreeMembers=function(){var s=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var m=s.idToDummyNode[u];if(E[u]=s.tileNodes(s.memberGroups[u],m.paddingLeft+m.paddingRight),m.rect.width=E[u].width,m.rect.height=E[u].height,m.setCenter(E[u].centerX,E[u].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,r.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,C=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(C+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>C?(m.rect.y-=(m.labelHeight-C)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-C)/2):m.labelPosVertical=="bottom"&&m.setHeight(C+m.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var E=this.compoundOrder[s],u=E.id,m=E.paddingLeft,y=E.paddingTop,C=E.labelMarginLeft,M=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],E.rect.x,E.rect.y,m,y,C,M)}},x.prototype.repopulateZeroDegreeMembers=function(){var s=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(u){var m=s.idToDummyNode[u],y=m.paddingLeft,C=m.paddingTop,M=m.labelMarginLeft,b=m.labelMarginTop;s.adjustLocations(E[u],m.rect.x,m.rect.y,y,C,M,b)})},x.prototype.getToBeTiled=function(s){var E=s.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var u=s.getChild();if(u==null)return this.toBeTiled[E]=!1,!1;for(var m=u.getNodes(),y=0;y<m.length;y++){var C=m[y];if(this.getNodeDegree(C)>0)return this.toBeTiled[E]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},x.prototype.getNodeDegree=function(s){s.id;for(var E=s.getEdges(),u=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(u=u+1)}return u},x.prototype.getNodeDegreeWithChildren=function(s){var E=this.getNodeDegree(s);if(s.getChild()==null)return E;for(var u=s.getChild().getNodes(),m=0;m<u.length;m++){var y=u[m];E+=this.getNodeDegreeWithChildren(y)}return E},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(s){for(var E=0;E<s.length;E++){var u=s[E];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(s,E,u,m,y,C,M){E+=m+C,u+=y+M;for(var b=E,O=0;O<s.rows.length;O++){var I=s.rows[O];E=b;for(var V=0,$=0;$<I.length;$++){var et=I[$];et.rect.x=E,et.rect.y=u,E+=et.rect.width+s.horizontalPadding,et.rect.height>V&&(V=et.rect.height)}u+=V+s.verticalPadding}},x.prototype.tileCompoundMembers=function(s,E){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(m){var y=E[m];if(u.tiledMemberPack[m]=u.tileNodes(s[m],y.paddingLeft+y.paddingRight),y.rect.width=u.tiledMemberPack[m].width,y.rect.height=u.tiledMemberPack[m].height,y.setCenter(u.tiledMemberPack[m].centerX,u.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,r.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(s,E){var u=this.tileNodesByFavoringDim(s,E,!0),m=this.tileNodesByFavoringDim(s,E,!1),y=this.getOrgRatio(u),C=this.getOrgRatio(m),M;return C<y?M=m:M=u,M},x.prototype.getOrgRatio=function(s){var E=s.width/s.height;return E<1&&(E=1/E),E},x.prototype.calcIdealRowWidth=function(s,E){var u=r.TILING_PADDING_VERTICAL,m=r.TILING_PADDING_HORIZONTAL,y=s.length,C=0,M=0,b=0;s.forEach(function(G){C+=G.getWidth(),M+=G.getHeight(),G.getWidth()>b&&(b=G.getWidth())});var O=C/y,I=M/y,V=Math.pow(u-m,2)+4*(O+m)*(I+u)*y,$=(m-u+Math.sqrt(V))/(2*(O+m)),et;E?(et=Math.ceil($),et==$&&et++):et=Math.floor($);var K=et*(O+m)-m;return b>K&&(K=b),K+=m*2,K},x.prototype.tileNodesByFavoringDim=function(s,E,u){var m=r.TILING_PADDING_VERTICAL,y=r.TILING_PADDING_HORIZONTAL,C=r.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};C&&(M.idealRowWidth=this.calcIdealRowWidth(s,u));var b=function(F){return F.rect.width*F.rect.height},O=function(F,Y){return b(Y)-b(F)};s.sort(function(G,F){var Y=O;return M.idealRowWidth?(Y=C,Y(G.id,F.id)):Y(G,F)});for(var I=0,V=0,$=0;$<s.length;$++){var et=s[$];I+=et.getCenterX(),V+=et.getCenterY()}M.centerX=I/s.length,M.centerY=V/s.length;for(var $=0;$<s.length;$++){var et=s[$];if(M.rows.length==0)this.insertNodeToRow(M,et,0,E);else if(this.canAddHorizontal(M,et.rect.width,et.rect.height)){var K=M.rows.length-1;M.idealRowWidth||(K=this.getShortestRowIndex(M)),this.insertNodeToRow(M,et,K,E)}else this.insertNodeToRow(M,et,M.rows.length,E);this.shiftToLastRow(M)}return M},x.prototype.insertNodeToRow=function(s,E,u,m){var y=m;u==s.rows.length&&(s.rows.push([]),s.rowWidth.push(y),s.rowHeight.push(0));var C=s.rowWidth[u]+E.rect.width;s.rows[u].length>0&&(C+=s.horizontalPadding),s.rowWidth[u]=C,s.width<C&&(s.width=C);var M=E.rect.height;u>0&&(M+=s.verticalPadding);var b=0;M>s.rowHeight[u]&&(b=s.rowHeight[u],s.rowHeight[u]=M,b=s.rowHeight[u]-b),s.height+=b,s.rows[u].push(E)},x.prototype.getShortestRowIndex=function(s){for(var E=-1,u=Number.MAX_VALUE,m=0;m<s.rows.length;m++)s.rowWidth[m]<u&&(E=m,u=s.rowWidth[m]);return E},x.prototype.getLongestRowIndex=function(s){for(var E=-1,u=Number.MIN_VALUE,m=0;m<s.rows.length;m++)s.rowWidth[m]>u&&(E=m,u=s.rowWidth[m]);return E},x.prototype.canAddHorizontal=function(s,E,u){if(s.idealRowWidth){var m=s.rows.length-1;return s.rowWidth[m]+E+s.horizontalPadding<=s.idealRowWidth}var y=this.getShortestRowIndex(s);if(y<0)return!0;var C=s.rowWidth[y];if(C+s.horizontalPadding+E<=s.width)return!0;var M=0;s.rowHeight[y]<u&&y>0&&(M=u+s.verticalPadding-s.rowHeight[y]);var b;s.width-C>=E+s.horizontalPadding?b=(s.height+M)/(C+E+s.horizontalPadding):b=(s.height+M)/s.width,M=u+s.verticalPadding;var O;return s.width<E?O=(s.height+M)/E:O=(s.height+M)/s.width,O<1&&(O=1/O),b<1&&(b=1/b),b<O},x.prototype.shiftToLastRow=function(s){var E=this.getLongestRowIndex(s),u=s.rowWidth.length-1,m=s.rows[E],y=m[m.length-1],C=y.width+s.horizontalPadding;if(s.width-s.rowWidth[u]>C&&E!=u){m.splice(-1,1),s.rows[u].push(y),s.rowWidth[E]=s.rowWidth[E]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var M=Number.MIN_VALUE,b=0;b<m.length;b++)m[b].height>M&&(M=m[b].height);E>0&&(M+=s.verticalPadding);var O=s.rowHeight[E]+s.rowHeight[u];s.rowHeight[E]=M,s.rowHeight[u]<y.height+s.verticalPadding&&(s.rowHeight[u]=y.height+s.verticalPadding);var I=s.rowHeight[E]+s.rowHeight[u];s.height+=I-O,this.shiftToLastRow(s)}},x.prototype.tilingPreLayout=function(){r.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){r.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var s=[],E=!0,u;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var C=0;C<m.length;C++)if(u=m[C],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(r.PURE_INCREMENTAL){var M=u.getEdges()[0].getOtherEnd(u),b=new T(u.getCenterX()-M.getCenterX(),u.getCenterY()-M.getCenterY());y.push([u,u.getEdges()[0],u.getOwner(),b])}else y.push([u,u.getEdges()[0],u.getOwner()]);E=!0}if(E==!0){for(var O=[],I=0;I<y.length;I++)y[I][0].getEdges().length==1&&(O.push(y[I]),y[I][0].getOwner().remove(y[I][0]));s.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},x.prototype.growTree=function(s){for(var E=s[s.length-1],u,m=0;m<E.length;m++)u=E[m],this.findPlaceforPrunedNode(u),u[2].add(u[0]),u[2].add(u[1],u[1].source,u[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(s){var E,u,m=s[0];if(m==s[1].source?u=s[1].target:u=s[1].source,r.PURE_INCREMENTAL)m.setCenter(u.getCenterX()+s[3].getWidth(),u.getCenterY()+s[3].getHeight());else{var y=u.startX,C=u.finishX,M=u.startY,b=u.finishY,O=[0,0,0,0];if(M>0)for(var I=y;I<=C;I++)O[0]+=this.grid[I][M-1].length+this.grid[I][M].length-1;if(C<this.grid.length-1)for(var I=M;I<=b;I++)O[1]+=this.grid[C+1][I].length+this.grid[C][I].length-1;if(b<this.grid[0].length-1)for(var I=y;I<=C;I++)O[2]+=this.grid[I][b+1].length+this.grid[I][b].length-1;if(y>0)for(var I=M;I<=b;I++)O[3]+=this.grid[y-1][I].length+this.grid[y][I].length-1;for(var V=R.MAX_VALUE,$,et,K=0;K<O.length;K++)O[K]<V?(V=O[K],$=1,et=K):O[K]==V&&$++;if($==3&&V==0)O[0]==0&&O[1]==0&&O[2]==0?E=1:O[0]==0&&O[1]==0&&O[3]==0?E=0:O[0]==0&&O[2]==0&&O[3]==0?E=3:O[1]==0&&O[2]==0&&O[3]==0&&(E=2);else if($==2&&V==0){var G=Math.floor(Math.random()*2);O[0]==0&&O[1]==0?G==0?E=0:E=1:O[0]==0&&O[2]==0?G==0?E=0:E=2:O[0]==0&&O[3]==0?G==0?E=0:E=3:O[1]==0&&O[2]==0?G==0?E=1:E=2:O[1]==0&&O[3]==0?G==0?E=1:E=3:G==0?E=2:E=3}else if($==4&&V==0){var G=Math.floor(Math.random()*4);E=G}else E=et;E==0?m.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,u.getCenterY()):E==2?m.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,u.getCenterY())}},o.exports=x}),991:((o,a,t)=>{var e=t(551).FDLayoutNode,h=t(551).IMath;function i(n,r,f,l){e.call(this,n,r,f,l)}i.prototype=Object.create(e.prototype);for(var v in e)i[v]=e[v];i.prototype.calculateDisplacement=function(){var n=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=n.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=n.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=n.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=n.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>n.coolingFactor*n.maxNodeDisplacement&&(this.displacementX=n.coolingFactor*n.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>n.coolingFactor*n.maxNodeDisplacement&&(this.displacementY=n.coolingFactor*n.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(n,r){for(var f=this.getChild().getNodes(),l,p=0;p<f.length;p++)l=f[p],l.getChild()==null?(l.displacementX+=n,l.displacementY+=r):l.propogateDisplacementToChildren(n,r)},i.prototype.move=function(){var n=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),n.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},i.prototype.setPred1=function(n){this.pred1=n},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(n){this.next=n},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(n){this.processed=n},i.prototype.isProcessed=function(){return processed},o.exports=i}),902:((o,a,t)=>{function e(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),i=t(551).LinkedList,v=t(551).Matrix,n=t(551).SVD;function r(){}r.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=[],w=f.getAllNodes(),R=0,S=0;S<w.length;S++){var P=w[S];P.getChild()==null&&(g.set(P.id,R++),c.push(P.getCenterX()),T.push(P.getCenterY()),p.set(P.id,P))}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,z){return{x:H.x-z.x,y:H.y-z.y}},B=function(H){var z=0,_=0;return H.forEach(function(Q){z+=c[g.get(Q)],_+=T[g.get(Q)]}),{x:z/H.size,y:_/H.size}},x=function(H,z,_,Q,j){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 ft=new Map;H.forEach(function(st,nt){ft.set(nt,0)}),H.forEach(function(st,nt){st.forEach(function(ht){ft.set(ht.id,ft.get(ht.id)+1)})});var rt=new Map,dt=new Map,Lt=new i;ft.forEach(function(st,nt){st==0?(Lt.push(nt),_||(z=="horizontal"?rt.set(nt,g.has(nt)?c[g.get(nt)]:Q.get(nt)):rt.set(nt,g.has(nt)?T[g.get(nt)]:Q.get(nt)))):rt.set(nt,Number.NEGATIVE_INFINITY),_&&dt.set(nt,new Set([nt]))}),_&&j.forEach(function(st){var nt=[];if(st.forEach(function(ut){_.has(ut)&&nt.push(ut)}),nt.length>0){var ht=0;nt.forEach(function(ut){z=="horizontal"?(rt.set(ut,g.has(ut)?c[g.get(ut)]:Q.get(ut)),ht+=rt.get(ut)):(rt.set(ut,g.has(ut)?T[g.get(ut)]:Q.get(ut)),ht+=rt.get(ut))}),ht=ht/nt.length,st.forEach(function(ut){_.has(ut)||rt.set(ut,ht)})}else{var yt=0;st.forEach(function(ut){z=="horizontal"?yt+=g.has(ut)?c[g.get(ut)]:Q.get(ut):yt+=g.has(ut)?T[g.get(ut)]:Q.get(ut)}),yt=yt/st.length,st.forEach(function(ut){rt.set(ut,yt)})}});for(var wt=function(){var nt=Lt.shift();H.get(nt).forEach(function(ht){if(rt.get(ht.id)<rt.get(nt)+ht.gap)if(_&&_.has(ht.id)){var yt=void 0;if(z=="horizontal"?yt=g.has(ht.id)?c[g.get(ht.id)]:Q.get(ht.id):yt=g.has(ht.id)?T[g.get(ht.id)]:Q.get(ht.id),rt.set(ht.id,yt),yt<rt.get(nt)+ht.gap){var ut=rt.get(nt)+ht.gap-yt;dt.get(nt).forEach(function(Rt){rt.set(Rt,rt.get(Rt)-ut)})}}else rt.set(ht.id,rt.get(nt)+ht.gap);ft.set(ht.id,ft.get(ht.id)-1),ft.get(ht.id)==0&&Lt.push(ht.id),_&&dt.set(ht.id,pt(dt.get(nt),dt.get(ht.id)))})};Lt.length!=0;)wt();if(_){var tt=new Set;H.forEach(function(st,nt){st.length==0&&tt.add(nt)});var Nt=[];dt.forEach(function(st,nt){if(tt.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;_.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,Ht=void 0;Nt.forEach(function(St,Ut){St.has([].concat(e(st))[0])&&(Tt=!0,Ht=Ut)}),Tt?st.forEach(function(St){Nt[Ht].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](),Ht;!(It=(Ht=Tt.next()).done);It=!0){var St=Ht.value,Ut=void 0;z=="horizontal"?Ut=g.has(St)?c[g.get(St)]:Q.get(St):Ut=g.has(St)?T[g.get(St)]:Q.get(St);var jt=rt.get(St);Ut<ht&&(ht=Ut),Ut>ut&&(ut=Ut),jt<yt&&(yt=jt),jt>Rt&&(Rt=jt)}}catch(re){bt=!0,Ot=re}finally{try{!It&&Tt.return&&Tt.return()}finally{if(bt)throw Ot}}var he=(ht+ut)/2-(yt+Rt)/2,Qt=!0,_t=!1,te=void 0;try{for(var qt=st[Symbol.iterator](),ne;!(Qt=(ne=qt.next()).done);Qt=!0){var ee=ne.value;rt.set(ee,rt.get(ee)+he)}}catch(re){_t=!0,te=re}finally{try{!Qt&&qt.return&&qt.return()}finally{if(_t)throw te}}})}return rt},it=function(H){var z=0,_=0,Q=0,j=0;if(H.forEach(function(dt){dt.left?c[g.get(dt.left)]-c[g.get(dt.right)]>=0?z++:_++:T[g.get(dt.top)]-T[g.get(dt.bottom)]>=0?Q++:j++}),z>_&&Q>j)for(var pt=0;pt<g.size;pt++)c[pt]=-1*c[pt],T[pt]=-1*T[pt];else if(z>_)for(var ft=0;ft<g.size;ft++)c[ft]=-1*c[ft];else if(Q>j)for(var rt=0;rt<g.size;rt++)T[rt]=-1*T[rt]},s=function(H){var z=[],_=new i,Q=new Set,j=0;return H.forEach(function(pt,ft){if(!Q.has(ft)){z[j]=[];var rt=ft;for(_.push(rt),Q.add(rt),z[j].push(rt);_.length!=0;)rt=_.shift(),H.get(rt).forEach(function(dt){Q.has(dt.id)||(_.push(dt.id),Q.add(dt.id),z[j].push(dt.id))});j++}}),z},E=function(H){var z=new Map;return H.forEach(function(_,Q){z.set(Q,[])}),H.forEach(function(_,Q){_.forEach(function(j){z.get(Q).push(j),z.get(j.id).push({id:Q,gap:j.gap,direction:j.direction})})}),z},u=function(H){var z=new Map;return H.forEach(function(_,Q){z.set(Q,[])}),H.forEach(function(_,Q){_.forEach(function(j){z.get(j.id).push({id:Q,gap:j.gap,direction:j.direction})})}),z},m=[],y=[],C=!1,M=!1,b=new Set,O=new Map,I=new Map,V=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(D){b.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,[]))}),I=E(O),V=s(I)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(D,H){m[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,z=function(rt){var dt=new Set;H[rt].forEach(function(tt){dt.add(tt)});var Lt=new Set([].concat(e(dt)).filter(function(tt){return b.has(tt)})),wt=void 0;Lt.size>0?wt=c[g.get(Lt.values().next().value)]:wt=B(dt).x,H[rt].forEach(function(tt){m[D]=[wt,T[g.get(tt)]],y[D]=[c[g.get(tt)],T[g.get(tt)]],D++})},_=0;_<H.length;_++)z(_);C=!0}if(l.alignmentConstraint.horizontal){for(var Q=l.alignmentConstraint.horizontal,j=function(rt){var dt=new Set;Q[rt].forEach(function(tt){dt.add(tt)});var Lt=new Set([].concat(e(dt)).filter(function(tt){return b.has(tt)})),wt=void 0;Lt.size>0?wt=c[g.get(Lt.values().next().value)]:wt=B(dt).y,Q[rt].forEach(function(tt){m[D]=[c[g.get(tt)],wt],y[D]=[c[g.get(tt)],T[g.get(tt)]],D++})},pt=0;pt<Q.length;pt++)j(pt);C=!0}l.relativePlacementConstraint&&(M=!0)})();else if(l.relativePlacementConstraint){for(var $=0,et=0,K=0;K<V.length;K++)V[K].length>$&&($=V[K].length,et=K);if($<I.size/2)it(l.relativePlacementConstraint),C=!1,M=!1;else{var G=new Map,F=new Map,Y=[];V[et].forEach(function(D){O.get(D).forEach(function(H){H.direction=="horizontal"?(G.has(D)?G.get(D).push(H):G.set(D,[H]),G.has(H.id)||G.set(H.id,[]),Y.push({left:D,right:H.id})):(F.has(D)?F.get(D).push(H):F.set(D,[H]),F.has(H.id)||F.set(H.id,[]),Y.push({top:D,bottom:H.id}))})}),it(Y),M=!1;var J=x(G,"horizontal"),at=x(F,"vertical");V[et].forEach(function(D,H){y[H]=[c[g.get(D)],T[g.get(D)]],m[H]=[],J.has(D)?m[H][0]=J.get(D):m[H][0]=c[g.get(D)],at.has(D)?m[H][1]=at.get(D):m[H][1]=T[g.get(D)]}),C=!0}}if(C){for(var q=void 0,Z=v.transpose(m),mt=v.transpose(y),lt=0;lt<Z.length;lt++)Z[lt]=v.multGamma(Z[lt]),mt[lt]=v.multGamma(mt[lt]);var k=v.multMat(Z,v.transpose(mt)),Et=n.svd(k);q=v.multMat(Et.V,v.transpose(Et.U));for(var ot=0;ot<g.size;ot++){var Ct=[c[ot],T[ot]],Vt=[q[0][0],q[1][0]],Dt=[q[0][1],q[1][1]];c[ot]=v.dotProduct(Ct,Vt),T[ot]=v.dotProduct(Ct,Dt)}M&&it(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 z={x:c[g.get(D.nodeId)],y:T[g.get(D.nodeId)]},_=D.position,Q=W(_,z);xt.x+=Q.x,xt.y+=Q.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,Wt=function(H){var z=new Set;Gt[H].forEach(function(j){z.add(j)});var _=new Set([].concat(e(z)).filter(function(j){return b.has(j)})),Q=void 0;_.size>0?Q=c[g.get(_.values().next().value)]:Q=B(z).x,z.forEach(function(j){b.has(j)||(c[g.get(j)]=Q)})},Ft=0;Ft<Gt.length;Ft++)Wt(Ft);if(l.alignmentConstraint.horizontal)for(var $t=l.alignmentConstraint.horizontal,Xt=function(H){var z=new Set;$t[H].forEach(function(j){z.add(j)});var _=new Set([].concat(e(z)).filter(function(j){return b.has(j)})),Q=void 0;_.size>0?Q=T[g.get(_.values().next().value)]:Q=B(z).y,z.forEach(function(j){b.has(j)||(T[g.get(j)]=Q)})},Bt=0;Bt<$t.length;Bt++)Xt(Bt)}l.relativePlacementConstraint&&(function(){var D=new Map,H=new Map,z=new Map,_=new Map,Q=new Map,j=new Map,pt=new Set,ft=new Set;if(b.forEach(function(Pt){pt.add(Pt),ft.add(Pt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var rt=l.alignmentConstraint.vertical,dt=function(vt){z.set("dummy"+vt,[]),rt[vt].forEach(function(Mt){D.set(Mt,"dummy"+vt),z.get("dummy"+vt).push(Mt),b.has(Mt)&&pt.add("dummy"+vt)}),Q.set("dummy"+vt,c[g.get(rt[vt][0])])},Lt=0;Lt<rt.length;Lt++)dt(Lt);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,tt=function(vt){_.set("dummy"+vt,[]),wt[vt].forEach(function(Mt){H.set(Mt,"dummy"+vt),_.get("dummy"+vt).push(Mt),b.has(Mt)&&ft.add("dummy"+vt)}),j.set("dummy"+vt,T[g.get(wt[vt][0])])},Nt=0;Nt<wt.length;Nt++)tt(Nt)}var st=new Map,nt=new Map,ht=function(vt){O.get(vt).forEach(function(Mt){var kt=void 0,zt=void 0;Mt.direction=="horizontal"?(kt=D.get(vt)?D.get(vt):vt,D.get(Mt.id)?zt={id:D.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:zt=Mt,st.has(kt)?st.get(kt).push(zt):st.set(kt,[zt]),st.has(zt.id)||st.set(zt.id,[])):(kt=H.get(vt)?H.get(vt):vt,H.get(Mt.id)?zt={id:H.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:zt=Mt,nt.has(kt)?nt.get(kt).push(zt):nt.set(kt,[zt]),nt.has(zt.id)||nt.set(zt.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=E(st),Ht=E(nt),St=s(Tt),Ut=s(Ht),jt=u(st),he=u(nt),Qt=[],_t=[];St.forEach(function(Pt,vt){Qt[vt]=[],Pt.forEach(function(Mt){jt.get(Mt).length==0&&Qt[vt].push(Mt)})}),Ut.forEach(function(Pt,vt){_t[vt]=[],Pt.forEach(function(Mt){he.get(Mt).length==0&&_t[vt].push(Mt)})});var te=x(st,"horizontal",pt,Q,Qt),qt=x(nt,"vertical",ft,j,_t),ne=function(vt){z.get(vt)?z.get(vt).forEach(function(Mt){c[g.get(Mt)]=te.get(vt)}):c[g.get(vt)]=te.get(vt)},ee=!0,re=!1,Ae=void 0;try{for(var le=te.keys()[Symbol.iterator](),Me;!(ee=(Me=le.next()).done);ee=!0){var fe=Me.value;ne(fe)}}catch(Pt){re=!0,Ae=Pt}finally{try{!ee&&le.return&&le.return()}finally{if(re)throw Ae}}var ir=function(vt){_.get(vt)?_.get(vt).forEach(function(Mt){T[g.get(Mt)]=qt.get(vt)}):T[g.get(vt)]=qt.get(vt)},ce=!0,we=!1,Oe=void 0;try{for(var ge=qt.keys()[Symbol.iterator](),De;!(ce=(De=ge.next()).done);ce=!0){var fe=De.value;ir(fe)}}catch(Pt){we=!0,Oe=Pt}finally{try{!ce&&ge.return&&ge.return()}finally{if(we)throw Oe}}})()}for(var At=0;At<w.length;At++){var gt=w[At];gt.getChild()==null&>.setCenter(c[g.get(gt.id)],T[g.get(gt.id)])}},o.exports=r}),551:(o=>{o.exports=A})},N={};function d(o){var a=N[o];if(a!==void 0)return a.exports;var t=N[o]={exports:{}};return X[o](t,t.exports,d),t.exports}return d(45)})()})})),br=Ce(((L,U)=>{(function(X,N){typeof L=="object"&&typeof U=="object"?U.exports=N(Ie()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof L=="object"?L.cytoscapeFcose=N(Ie()):X.cytoscapeFcose=N(X.coseBase)})(L,function(A){return(()=>{"use strict";var X={658:(o=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(a){for(var t=arguments.length,e=Array(t>1?t-1:0),h=1;h<t;h++)e[h-1]=arguments[h];return e.forEach(function(i){Object.keys(i).forEach(function(v){return a[v]=i[v]})}),a}}),548:((o,a,t)=>{var e=(function(){function v(n,r){var f=[],l=!0,p=!1,g=void 0;try{for(var c=n[Symbol.iterator](),T;!(l=(T=c.next()).done)&&(f.push(T.value),!(r&&f.length===r));l=!0);}catch(w){p=!0,g=w}finally{try{!l&&c.return&&c.return()}finally{if(p)throw g}}return f}return function(n,r){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return v(n,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=t(140).layoutBase.LinkedList,i={};i.getTopMostNodes=function(v){for(var n={},r=0;r<v.length;r++)n[v[r].id()]=!0;return v.filter(function(f,l){typeof f=="number"&&(f=l);for(var p=f.parent()[0];p!=null;){if(n[p.id()])return!1;p=p.parent()[0]}return!0})},i.connectComponents=function(v,n,r,f){var l=new h,p=new Set,g=[],c=void 0,T=void 0,w=void 0,R=!1,S=1,P=[],W=[],B=function(){var it=v.collection();W.push(it);var s=r[0],E=v.collection();E.merge(s).merge(s.descendants().intersection(n)),g.push(s),E.forEach(function(y){l.push(y),p.add(y),it.merge(y)});for(var u=function(){s=l.shift();var C=v.collection();s.neighborhood().nodes().forEach(function(O){n.intersection(s.edgesWith(O)).length>0&&C.merge(O)});for(var M=0;M<C.length;M++){var b=C[M];c=r.intersection(b.union(b.ancestors())),c!=null&&!p.has(c[0])&&c.union(c.descendants()).forEach(function(O){l.push(O),p.add(O),it.merge(O),r.has(O)&&g.push(O)})}};l.length!=0;)u();if(it.forEach(function(y){n.intersection(y.connectedEdges()).forEach(function(C){it.has(C.source())&&it.has(C.target())&&it.merge(C)})}),g.length==r.length&&(R=!0),!R||R&&S>1){T=g[0],w=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<w&&(w=y.connectedEdges().length,T=y)}),P.push(T.id());var m=v.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],r=r.difference(m),S++}};do B();while(!R);return f&&P.length>0&&f.set("dummy"+(f.size+1),P),W},i.relocateComponent=function(v,n,r){if(!r.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(r.quality=="draft"){var c=!0,T=!1,w=void 0;try{for(var R=n.nodeIndexes[Symbol.iterator](),S;!(c=(S=R.next()).done);c=!0){var P=S.value,W=e(P,2),B=W[0],x=W[1],it=r.cy.getElementById(B);if(it){var s=it.boundingBox(),E=n.xCoords[x]-s.w/2,u=n.xCoords[x]+s.w/2,m=n.yCoords[x]-s.h/2,y=n.yCoords[x]+s.h/2;E<f&&(f=E),u>l&&(l=u),m<p&&(p=m),y>g&&(g=y)}}}catch(I){T=!0,w=I}finally{try{!c&&R.return&&R.return()}finally{if(T)throw w}}var C=v.x-(l+f)/2,M=v.y-(g+p)/2;n.xCoords=n.xCoords.map(function(I){return I+C}),n.yCoords=n.yCoords.map(function(I){return I+M})}else{Object.keys(n).forEach(function(I){var V=n[I],$=V.getRect().x,et=V.getRect().x+V.getRect().width,K=V.getRect().y,G=V.getRect().y+V.getRect().height;$<f&&(f=$),et>l&&(l=et),K<p&&(p=K),G>g&&(g=G)});var b=v.x-(l+f)/2,O=v.y-(g+p)/2;Object.keys(n).forEach(function(I){var V=n[I];V.setCenter(V.getCenterX()+b,V.getCenterY()+O)})}}},i.calcBoundingBox=function(v,n,r,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,w=void 0,R=void 0,S=void 0,P=v.descendants().not(":parent"),W=P.length,B=0;B<W;B++){var x=P[B];T=n[f.get(x.id())]-x.width()/2,w=n[f.get(x.id())]+x.width()/2,R=r[f.get(x.id())]-x.height()/2,S=r[f.get(x.id())]+x.height()/2,l>T&&(l=T),p<w&&(p=w),g>R&&(g=R),c<S&&(c=S)}var it={};return it.topLeftX=l,it.topLeftY=g,it.width=p-l,it.height=c-g,it},i.calcParentsWithoutChildren=function(v,n){var r=v.collection();return n.nodes(":parent").forEach(function(f){var l=!1;f.children().forEach(function(p){p.css("display")!="none"&&(l=!0)}),l||r.merge(f)}),r},o.exports=i}),816:((o,a,t)=>{var e=t(548),h=t(140).CoSELayout,i=t(140).CoSENode,v=t(140).layoutBase.PointD,n=t(140).layoutBase.DimensionD,r=t(140).layoutBase.LayoutConstants,f=t(140).layoutBase.FDLayoutConstants,l=t(140).CoSEConstants;o.exports={coseLayout:function(g,c){var T=g.cy,w=g.eles,R=w.nodes(),S=w.edges(),P=void 0,W=void 0,B=void 0,x={};g.randomize&&(P=c.nodeIndexes,W=c.xCoords,B=c.yCoords);var it=function(O){return typeof O=="function"},s=function(O,I){return it(O)?O(I):O},E=e.calcParentsWithoutChildren(T,w),u=function b(O,I,V,$){for(var et=I.length,K=0;K<et;K++){var G=I[K],F=null;G.intersection(E).length==0&&(F=G.children());var Y=void 0,J=G.layoutDimensions({nodeDimensionsIncludeLabels:$.nodeDimensionsIncludeLabels});if(G.outerWidth()!=null&&G.outerHeight()!=null)if($.randomize)if(!G.isParent())Y=O.add(new i(V.graphManager,new v(W[P.get(G.id())]-J.w/2,B[P.get(G.id())]-J.h/2),new n(parseFloat(J.w),parseFloat(J.h))));else{var at=e.calcBoundingBox(G,W,B,P);G.intersection(E).length==0?Y=O.add(new i(V.graphManager,new v(at.topLeftX,at.topLeftY),new n(at.width,at.height))):Y=O.add(new i(V.graphManager,new v(at.topLeftX,at.topLeftY),new n(parseFloat(J.w),parseFloat(J.h))))}else Y=O.add(new i(V.graphManager,new v(G.position("x")-J.w/2,G.position("y")-J.h/2),new n(parseFloat(J.w),parseFloat(J.h))));else Y=O.add(new i(this.graphManager));if(Y.id=G.data("id"),Y.nodeRepulsion=s($.nodeRepulsion,G),Y.paddingLeft=parseInt(G.css("padding")),Y.paddingTop=parseInt(G.css("padding")),Y.paddingRight=parseInt(G.css("padding")),Y.paddingBottom=parseInt(G.css("padding")),$.nodeDimensionsIncludeLabels&&(Y.labelWidth=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,Y.labelHeight=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,Y.labelPosVertical=G.css("text-valign"),Y.labelPosHorizontal=G.css("text-halign")),x[G.data("id")]=Y,isNaN(Y.rect.x)&&(Y.rect.x=0),isNaN(Y.rect.y)&&(Y.rect.y=0),F!=null&&F.length>0){var q=void 0;q=V.getGraphManager().add(V.newGraph(),Y),b(q,F,V,$)}}},m=function(O,I,V){for(var $=0,et=0,K=0;K<V.length;K++){var G=V[K],F=x[G.data("source")],Y=x[G.data("target")];if(F&&Y&&F!==Y&&F.getEdgesBetween(Y).length==0){var J=I.add(O.newEdge(),F,Y);J.id=G.id(),J.idealLength=s(g.idealEdgeLength,G),J.edgeElasticity=s(g.edgeElasticity,G),$+=J.idealLength,et++}}g.idealEdgeLength!=null&&(et>0?l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=$/et:it(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,I){I.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=I.fixedNodeConstraint),I.alignmentConstraint&&(O.constraints.alignmentConstraint=I.alignmentConstraint),I.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=I.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"?r.QUALITY=2:r.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!g.randomize,l.ANIMATE=f.ANIMATE=r.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=r.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!g.randomize,r.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(),e.getTopMostNodes(R),C,g),m(C,M,S),y(C,g),C.runLayout(),x}}}),212:((o,a,t)=>{var e=(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 i=t(658),v=t(548),n=t(657).spectralLayout,r=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(){}});o.exports=(function(){function l(p){h(this,l),this.options=i({},f,p)}return e(l,[{key:"run",value:function(){var g=this,c=this.options,T=c.cy,w=c.eles,R=[],S=[],P=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 B=void 0,x=!1;if(T.layoutUtilities&&c.packComponents&&(B=T.layoutUtilities("get"),B||(B=T.layoutUtilities()),x=!0),w.nodes().length>0)if(x){var E=v.getTopMostNodes(c.eles.nodes());if(P=v.connectComponents(T,c.eles,E),P.forEach(function(q){var Z=q.boundingBox();W.push({x:Z.x1+Z.w/2,y:Z.y1+Z.h/2})}),c.randomize&&P.forEach(function(q){c.eles=q,R.push(n(c))}),c.quality=="default"||c.quality=="proof"){var u=T.collection();if(c.tile){var m=new Map,y=[],C=[],M=0,b={nodeIndexes:m,xCoords:y,yCoords:C},O=[];if(P.forEach(function(q,Z){q.edges().length==0&&(q.nodes().forEach(function(mt,lt){u.merge(q.nodes()[lt]),mt.isParent()||(b.nodeIndexes.set(q.nodes()[lt].id(),M++),b.xCoords.push(q.nodes()[0].position().x),b.yCoords.push(q.nodes()[0].position().y))}),O.push(Z))}),u.length>1){var I=u.boundingBox();W.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),P.push(u),R.push(b);for(var V=O.length-1;V>=0;V--)P.splice(O[V],1),R.splice(O[V],1),W.splice(O[V],1)}}P.forEach(function(q,Z){c.eles=q,S.push(r(c,R[Z])),v.relocateComponent(W[Z],S[Z],c)})}else P.forEach(function(q,Z){v.relocateComponent(W[Z],R[Z],c)});var $=new Set;if(P.length>1){var et=[],K=w.filter(function(q){return q.css("display")=="none"});P.forEach(function(q,Z){var mt=void 0;if(c.quality=="draft"&&(mt=R[Z].nodeIndexes),q.nodes().not(K).length>0){var lt={};lt.edges=[],lt.nodes=[];var k=void 0;q.nodes().not(K).forEach(function(Et){if(c.quality=="draft")if(!Et.isParent())k=mt.get(Et.id()),lt.nodes.push({x:R[Z].xCoords[k]-Et.boundingbox().w/2,y:R[Z].yCoords[k]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var ot=v.calcBoundingBox(Et,R[Z].xCoords,R[Z].yCoords,mt);lt.nodes.push({x:ot.topLeftX,y:ot.topLeftY,width:ot.width,height:ot.height})}else S[Z][Et.id()]&<.nodes.push({x:S[Z][Et.id()].getLeft(),y:S[Z][Et.id()].getTop(),width:S[Z][Et.id()].getWidth(),height:S[Z][Et.id()].getHeight()})}),q.edges().forEach(function(Et){var ot=Et.source(),Ct=Et.target();if(ot.css("display")!="none"&&Ct.css("display")!="none")if(c.quality=="draft"){var Vt=mt.get(ot.id()),Dt=mt.get(Ct.id()),xt=[],Gt=[];if(ot.isParent()){var Wt=v.calcBoundingBox(ot,R[Z].xCoords,R[Z].yCoords,mt);xt.push(Wt.topLeftX+Wt.width/2),xt.push(Wt.topLeftY+Wt.height/2)}else xt.push(R[Z].xCoords[Vt]),xt.push(R[Z].yCoords[Vt]);if(Ct.isParent()){var Ft=v.calcBoundingBox(Ct,R[Z].xCoords,R[Z].yCoords,mt);Gt.push(Ft.topLeftX+Ft.width/2),Gt.push(Ft.topLeftY+Ft.height/2)}else Gt.push(R[Z].xCoords[Dt]),Gt.push(R[Z].yCoords[Dt]);lt.edges.push({startX:xt[0],startY:xt[1],endX:Gt[0],endY:Gt[1]})}else S[Z][ot.id()]&&S[Z][Ct.id()]&<.edges.push({startX:S[Z][ot.id()].getCenterX(),startY:S[Z][ot.id()].getCenterY(),endX:S[Z][Ct.id()].getCenterX(),endY:S[Z][Ct.id()].getCenterY()})}),lt.nodes.length>0&&(et.push(lt),$.add(Z))}});var G=B.packComponents(et,c.randomize).shifts;if(c.quality=="draft")R.forEach(function(q,Z){var mt=q.xCoords.map(function(k){return k+G[Z].dx}),lt=q.yCoords.map(function(k){return k+G[Z].dy});q.xCoords=mt,q.yCoords=lt});else{var F=0;$.forEach(function(q){Object.keys(S[q]).forEach(function(Z){var mt=S[q][Z];mt.setCenter(mt.getCenterX()+G[F].dx,mt.getCenterY()+G[F].dy)}),F++})}}}else{var it=c.eles.boundingBox();if(W.push({x:it.x1+it.w/2,y:it.y1+it.h/2}),c.randomize){var s=n(c);R.push(s)}c.quality=="default"||c.quality=="proof"?(S.push(r(c,R[0])),v.relocateComponent(W[0],S[0],c)):v.relocateComponent(W[0],R[0],c)}var Y=function(Z,mt){if(c.quality=="default"||c.quality=="proof"){typeof Z=="number"&&(Z=mt);var lt=void 0,k=void 0,Et=Z.data("id");return S.forEach(function(Ct){Et in Ct&&(lt={x:Ct[Et].getRect().getCenterX(),y:Ct[Et].getRect().getCenterY()},k=Ct[Et])}),c.nodeDimensionsIncludeLabels&&(k.labelWidth&&(k.labelPosHorizontal=="left"?lt.x+=k.labelWidth/2:k.labelPosHorizontal=="right"&&(lt.x-=k.labelWidth/2)),k.labelHeight&&(k.labelPosVertical=="top"?lt.y+=k.labelHeight/2:k.labelPosVertical=="bottom"&&(lt.y-=k.labelHeight/2))),lt==null&&(lt={x:Z.position("x"),y:Z.position("y")}),{x:lt.x,y:lt.y}}else{var ot=void 0;return R.forEach(function(Ct){var Vt=Ct.nodeIndexes.get(Z.id());Vt!=null&&(ot={x:Ct.xCoords[Vt],y:Ct.yCoords[Vt]})}),ot==null&&(ot={x:Z.position("x"),y:Z.position("y")}),{x:ot.x,y:ot.y}}};if(c.quality=="default"||c.quality=="proof"||c.randomize){var J=v.calcParentsWithoutChildren(T,w),at=w.filter(function(q){return q.css("display")=="none"});c.eles=w.not(at),w.nodes().not(":parent").not(at).layoutPositions(g,c,Y),J.length>0&&J.forEach(function(q){q.position(Y(q))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),l})()}),657:((o,a,t)=>{var e=t(548),h=t(140).layoutBase.Matrix,i=t(140).layoutBase.SVD;o.exports={spectralLayout:function(n){var r=n.cy,f=n.eles,l=f.nodes(),p=f.nodes(":parent"),g=new Map,c=new Map,T=new Map,w=[],R=[],S=[],P=[],W=[],B=[],x=[],it=[],s=void 0,E=1e8,u=1e-9,m=n.piTol,y=n.samplingType,C=n.nodeSeparation,M=void 0,b=function(){for(var gt=0,D=0,H=!1;D<M;){gt=Math.floor(Math.random()*s),H=!1;for(var z=0;z<D;z++)if(P[z]==gt){H=!0;break}if(!H)P[D]=gt,D++;else continue}},O=function(gt,D,H){for(var z=[],_=0,Q=0,j=0,pt=void 0,ft=[],rt=0,dt=1,Lt=0;Lt<s;Lt++)ft[Lt]=E;for(z[Q]=gt,ft[gt]=0;Q>=_;){j=z[_++];for(var wt=w[j],tt=0;tt<wt.length;tt++)pt=c.get(wt[tt]),ft[pt]==E&&(ft[pt]=ft[j]+1,z[++Q]=pt);B[j][D]=ft[j]*C}if(H){for(var Nt=0;Nt<s;Nt++)B[Nt][D]<W[Nt]&&(W[Nt]=B[Nt][D]);for(var st=0;st<s;st++)W[st]>rt&&(rt=W[st],dt=st)}return dt},I=function(gt){var D=void 0;if(gt){D=Math.floor(Math.random()*s);for(var z=0;z<s;z++)W[z]=E;for(var _=0;_<M;_++)P[_]=D,D=O(D,_,gt)}else{b();for(var H=0;H<M;H++)O(P[H],H,gt,!1)}for(var Q=0;Q<s;Q++)for(var j=0;j<M;j++)B[Q][j]*=B[Q][j];for(var pt=0;pt<M;pt++)x[pt]=[];for(var ft=0;ft<M;ft++)for(var rt=0;rt<M;rt++)x[ft][rt]=B[P[rt]][ft]},V=function(){for(var gt=i.svd(x),D=gt.S,H=gt.U,z=gt.V,_=D[0]*D[0]*D[0],Q=[],j=0;j<M;j++){Q[j]=[];for(var pt=0;pt<M;pt++)Q[j][pt]=0,j==pt&&(Q[j][pt]=D[j]/(D[j]*D[j]+_/(D[j]*D[j])))}it=h.multMat(h.multMat(z,Q),h.transpose(H))},$=function(){for(var gt=void 0,D=void 0,H=[],z=[],_=[],Q=[],j=0;j<s;j++)H[j]=Math.random(),z[j]=Math.random();H=h.normalize(H),z=h.normalize(z);for(var pt=0,ft=u,rt=u,dt=void 0;;){pt++;for(var Lt=0;Lt<s;Lt++)_[Lt]=H[Lt];if(H=h.multGamma(h.multL(h.multGamma(_),B,it)),gt=h.dotProduct(_,H),H=h.normalize(H),ft=h.dotProduct(_,H),dt=Math.abs(ft/rt),dt<=1+m&&dt>=1)break;rt=ft}for(var wt=0;wt<s;wt++)_[wt]=H[wt];for(pt=0,rt=u;;){pt++;for(var tt=0;tt<s;tt++)Q[tt]=z[tt];if(Q=h.minusOp(Q,h.multCons(_,h.dotProduct(_,Q))),z=h.multGamma(h.multL(h.multGamma(Q),B,it)),D=h.dotProduct(Q,z),z=h.normalize(z),ft=h.dotProduct(Q,z),dt=Math.abs(ft/rt),dt<=1+m&&dt>=1)break;rt=ft}for(var Nt=0;Nt<s;Nt++)Q[Nt]=z[Nt];R=h.multCons(_,Math.sqrt(Math.abs(gt))),S=h.multCons(Q,Math.sqrt(Math.abs(D)))};e.connectComponents(r,f,e.getTopMostNodes(l),g),p.forEach(function(At){e.connectComponents(r,f,e.getTopMostNodes(At.descendants().intersection(f)),g)});for(var et=0,K=0;K<l.length;K++)l[K].isParent()||c.set(l[K].id(),et++);var G=!0,F=!1,Y=void 0;try{for(var J=g.keys()[Symbol.iterator](),at;!(G=(at=J.next()).done);G=!0){var q=at.value;c.set(q,et++)}}catch(At){F=!0,Y=At}finally{try{!G&&J.return&&J.return()}finally{if(F)throw Y}}for(var Z=0;Z<c.size;Z++)w[Z]=[];p.forEach(function(At){for(var gt=At.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(z,_){z.connectedEdges().length<H&&(H=z.connectedEdges().length,D=_)}),T.set(At.id(),gt.nodes(":childless")[D].id())}),l.forEach(function(At){var gt=void 0;At.isParent()?gt=c.get(T.get(At.id())):gt=c.get(At.id()),At.neighborhood().nodes().forEach(function(D){f.intersection(At.edgesWith(D)).length>0&&(D.isParent()?w[gt].push(T.get(D.id())):w[gt].push(D.id()))})});var mt=function(gt){var D=c.get(gt),H=void 0;g.get(gt).forEach(function(z){r.getElementById(z).isParent()?H=T.get(z):H=z,w[D].push(H),w[c.get(H)].push(gt)})},lt=!0,k=!1,Et=void 0;try{for(var ot=g.keys()[Symbol.iterator](),Ct;!(lt=(Ct=ot.next()).done);lt=!0){var Vt=Ct.value;mt(Vt)}}catch(At){k=!0,Et=At}finally{try{!lt&&ot.return&&ot.return()}finally{if(k)throw Et}}s=c.size;var Dt=void 0;if(s>2){M=s<n.sampleSize?s:n.sampleSize;for(var xt=0;xt<s;xt++)B[xt]=[];for(var Gt=0;Gt<M;Gt++)it[Gt]=[];return n.quality=="draft"||n.step=="all"?(I(y),V(),$(),Dt={nodeIndexes:c,xCoords:R,yCoords:S}):(c.forEach(function(At,gt){R.push(r.getElementById(gt).position("x")),S.push(r.getElementById(gt).position("y"))}),Dt={nodeIndexes:c,xCoords:R,yCoords:S}),Dt}else{var Wt=c.keys(),Ft=r.getElementById(Wt.next().value),$t=Ft.position(),Xt=Ft.outerWidth();if(R.push($t.x),S.push($t.y),s==2){var Bt=r.getElementById(Wt.next().value).outerWidth();R.push($t.x+Xt/2+Bt/2+n.idealEdgeLength),S.push($t.y)}return Dt={nodeIndexes:c,xCoords:R,yCoords:S},Dt}}}}),579:((o,a,t)=>{var e=t(212),h=function(v){v&&v("layout","fcose",e)};typeof cytoscape<"u"&&h(cytoscape),o.exports=h}),140:(o=>{o.exports=A})},N={};function d(o){var a=N[o];if(a!==void 0)return a.exports;var t=N[o]={exports:{}};return X[o](t,t.exports,d),t.exports}return d(579)})()})}));function Je(L,U,A){L.forEach(X=>{U.add({group:"nodes",data:{type:"service",id:X.id,icon:X.icon,label:X.title,parent:X.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-service"})})}function Ke(L,U,A){L.forEach(X=>{U.add({group:"nodes",data:{type:"junction",id:X.id,parent:X.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-junction"})})}function Re(L,U){U.nodes().map(A=>{const X=Kt(A);X.type!=="group"&&(X.x=A.position().x,X.y=A.position().y,L.getElementById(X.id).attr("transform","translate("+(X.x||0)+","+(X.y||0)+")"))})}function je(L,U){L.forEach(A=>{U.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}function _e(L,U){L.forEach(A=>{const{lhsId:X,rhsId:N,lhsInto:d,lhsGroup:o,rhsInto:a,lhsDir:t,rhsDir:e,rhsGroup:h,title:i}=A,v=se(A.lhsDir,A.rhsDir)?"segments":"straight",n={id:`${X}-${N}`,label:i,source:X,sourceDir:t,sourceArrow:d,sourceGroup:o,sourceEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:a,targetGroup:h,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};U.add({group:"edges",data:n,classes:v})})}function tr(L,U,A){const X=ct((o,a)=>Object.entries(o).reduce((t,[e,h])=>{let i=0;const v=Object.entries(h);if(v.length===1)return t[e]=v[0][1],t;for(let n=0;n<v.length-1;n++)for(let r=n+1;r<v.length;r++){const[f,l]=v[n],[p,g]=v[r];if(A[f]?.[p]===a)t[e]??(t[e]=[]),t[e]=[...t[e],...l,...g];else if(f==="default"||p==="default")t[e]??(t[e]=[]),t[e]=[...t[e],...l,...g];else{const c=`${e}-${i++}`;t[c]=l;const T=`${e}-${i++}`;t[T]=g}}return t},{}),"flattenAlignments"),[N,d]=U.map(o=>{const a={},t={};return Object.entries(o).forEach(([e,[h,i]])=>{var v,n;const r=L.getNode(e)?.in??"default";a[i]??(a[i]={}),(v=a[i])[r]??(v[r]=[]),a[i][r].push(e),t[h]??(t[h]={}),(n=t[h])[r]??(n[r]=[]),t[h][r].push(e)}),{horiz:Object.values(X(a,"horizontal")).filter(e=>e.length>1),vert:Object.values(X(t,"vertical")).filter(e=>e.length>1)}}).reduce(([o,a],{horiz:t,vert:e})=>[[...o,...t],[...a,...e]],[[],[]]);return{horizontal:N,vertical:d}}function er(L,U){const A=[],X=ct(d=>`${d[0]},${d[1]}`,"posToStr"),N=ct(d=>d.split(",").map(o=>parseInt(o)),"strToPos");return L.forEach(d=>{const o=Object.fromEntries(Object.entries(d).map(([h,i])=>[X(i),h])),a=[X([0,0])],t={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const h=a.shift();if(h){t[h]=1;const i=o[h];if(i){const v=N(h);Object.entries(e).forEach(([n,r])=>{const f=X([v[0]+r[0],v[1]+r[1]]),l=o[f];l&&!t[f]&&(a.push(f),A.push({[Ne[n]]:l,[Ne[rr(n)]]:i,gap:1.5*U.getConfigField("iconSize")}))})}}}}),A}function Se(L,U,A,X,N,{spatialMaps:d,groupAlignments:o}){return new Promise(a=>{const t=lr("body").append("div").attr("id","cy").attr("style","display:none"),e=qe({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(),je(A,e),Je(L,e,N),Ke(U,e,N),_e(X,e);const h=tr(N,d,o),i=er(d,N),v=N.getConfigField("iconSize"),n=N.getConfigField("idealEdgeLengthMultiplier")*v,r=.5*v,f=N.getConfigField("edgeElasticity"),l=e.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){const[g,c]=p.connectedNodes(),{parent:T}=Kt(g),{parent:w}=Kt(c);return T===w?n:r},edgeElasticity(p){const[g,c]=p.connectedNodes(),{parent:T}=Kt(g),{parent:w}=Kt(c);return T===w?f:.001},alignmentConstraint:h,relativePlacementConstraint:i});l.one("layoutstop",()=>{function p(g,c,T,w){let R,S;const{x:P,y:W}=g,{x:B,y:x}=c;S=(w-W+(P-T)*(W-x)/(P-B))/Math.sqrt(1+Math.pow((W-x)/(P-B),2)),R=Math.sqrt(Math.pow(w-W,2)+Math.pow(T-P,2)-Math.pow(S,2));const it=Math.sqrt(Math.pow(B-P,2)+Math.pow(x-W,2));R=R/it;let s=(B-P)*(w-W)-(x-W)*(T-P);switch(!0){case s>=0:s=1;break;case s<0:s=-1;break}let E=(B-P)*(T-P)+(x-W)*(w-W);switch(!0){case E>=0:E=1;break;case E<0:E=-1;break}return S=Math.abs(S)*s,R=R*E,{distances:S,weights:R}}ct(p,"getSegmentWeights"),e.startBatch();for(const g of Object.values(e.edges()))if(g.data?.()){const{x:c,y:T}=g.source().position(),{x:w,y:R}=g.target().position();if(c!==w&&T!==R){const S=g.sourceEndpoint(),P=g.targetEndpoint(),{sourceDir:W}=Le(g),[B,x]=Zt(W)?[S.x,P.y]:[P.x,S.y],{weights:it,distances:s}=p(S,P,B,x);g.style("segment-distances",s),g.style("segment-weights",it)}}e.endBatch(),l.run()}),l.run(),e.ready(p=>{Qe.info("Ready",p),a(e)})})}var Fe,pe,Ne,ye,ae,rr,Ee,Yt,Zt,se,be,Ge,oe,Pe,Ue,Ye,Xe,He,Le,Kt,Ve,me,We,Te,ze,Jt,ie,$e,Be,Ze,ke,Gr,Pr=nr((()=>{Ar(),xr(),Sr(),wr(),Er(),hr(),sr(),Fr(),Fe=ar(br(),1),fr(),Ne={L:"left",R:"right",T:"top",B:"bottom"},ye={L:ct(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:ct(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:ct(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:ct(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},ae={L:ct((L,U)=>L-U+2,"L"),R:ct((L,U)=>L-2,"R"),T:ct((L,U)=>L-U+2,"T"),B:ct((L,U)=>L-2,"B")},rr=ct(function(L){return Yt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ee=ct(function(L){const U=L;return U==="L"||U==="R"||U==="T"||U==="B"},"isArchitectureDirection"),Yt=ct(function(L){const U=L;return U==="L"||U==="R"},"isArchitectureDirectionX"),Zt=ct(function(L){const U=L;return U==="T"||U==="B"},"isArchitectureDirectionY"),se=ct(function(L,U){const A=Yt(L)&&Zt(U),X=Zt(L)&&Yt(U);return A||X},"isArchitectureDirectionXY"),be=ct(function(L){const U=L[0],A=L[1],X=Yt(U)&&Zt(A),N=Zt(U)&&Yt(A);return X||N},"isArchitecturePairXY"),Ge=ct(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),oe=ct(function(L,U){const A=`${L}${U}`;return Ge(A)?A:void 0},"getArchitectureDirectionPair"),Pe=ct(function([L,U],A){const X=A[0],N=A[1];return Yt(X)?Zt(N)?[L+(X==="L"?-1:1),U+(N==="T"?1:-1)]:[L+(X==="L"?-1:1),U]:Yt(N)?[L+(N==="L"?1:-1),U+(X==="T"?1:-1)]:[L,U+(X==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ue=ct(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ye=ct(function(L,U){return se(L,U)?"bend":Yt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Xe=ct(function(L){return L.type==="service"},"isArchitectureService"),He=ct(function(L){return L.type==="junction"},"isArchitectureJunction"),Le=ct(L=>L.data(),"edgeData"),Kt=ct(L=>L.data(),"nodeData"),Ve=yr.architecture,me=(pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=ur,this.getAccTitle=Lr,this.setDiagramTitle=mr,this.getDiagramTitle=Nr,this.getAccDescription=Tr,this.setAccDescription=gr,this.clear()}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",vr()}addService({id:L,icon:U,in:A,title:X,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(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===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[A]==="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:U,iconText:N,title:X,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Xe)}addJunction({id:L,in:U}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(U!==void 0){if(L===U)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[U]===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[U]==="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:U}}getJunctions(){return Object.values(this.nodes).filter(He)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:U,in:A,title:X}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===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?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:U,title:X,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:U,lhsDir:A,rhsDir:X,lhsInto:N,rhsInto:d,lhsGroup:o,rhsGroup:a,title:t}){if(!Ee(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${U}. Expected (L,R,T,B) got ${String(A)}`);if(!Ee(X))throw new Error(`Invalid direction given for right hand side of edge ${L}--${U}. Expected (L,R,T,B) got ${String(X)}`);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[U]===void 0&&this.groups[U]===void 0)throw new Error(`The right-hand id [${U}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=this.nodes[L].in,h=this.nodes[U].in;if(o&&e&&h&&e==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(a&&e&&h&&e==h)throw new Error(`The right-hand id [${U}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:o,rhsId:U,rhsDir:X,rhsInto:d,rhsGroup:a,title:t};this.edges.push(i),this.nodes[L]&&this.nodes[U]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[U].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const L={},U=Object.entries(this.nodes).reduce((a,[t,e])=>(a[t]=e.edges.reduce((h,i)=>{const v=this.getNode(i.lhsId)?.in,n=this.getNode(i.rhsId)?.in;if(v&&n&&v!==n){const r=Ye(i.lhsDir,i.rhsDir);r!=="bend"&&(L[v]??(L[v]={}),L[v][n]=r,L[n]??(L[n]={}),L[n][v]=r)}if(i.lhsId===t){const r=oe(i.lhsDir,i.rhsDir);r&&(h[r]=i.rhsId)}else{const r=oe(i.rhsDir,i.lhsDir);r&&(h[r]=i.lhsId)}return h},{}),a),{}),A=Object.keys(U)[0],X={[A]:1},N=Object.keys(U).reduce((a,t)=>t===A?a:{...a,[t]:1},{}),d=ct(a=>{const t={[a]:[0,0]},e=[a];for(;e.length>0;){const h=e.shift();if(h){X[h]=1,delete N[h];const i=U[h],[v,n]=t[h];Object.entries(i).forEach(([r,f])=>{X[f]||(t[f]=Pe([v,n],r),e.push(f))})}}return t},"BFS"),o=[d(A)];for(;Object.keys(N).length>0;)o.push(d(Object.keys(N)[0]));this.dataStructures={adjList:U,spatialMaps:o,groupAlignments:L}}return this.dataStructures}setElementForId(L,U){this.elements[L]=U}getElementById(L){return this.elements[L]}getConfig(){return Or({...Ve,...pr().architecture})}getConfigField(L){return this.getConfig()[L]}},ct(pe,"ArchitectureDB"),pe),We=ct((L,U)=>{Rr(L,U),L.groups.map(A=>U.addGroup(A)),L.services.map(A=>U.addService({...A,type:"service"})),L.junctions.map(A=>U.addJunction({...A,type:"junction"})),L.edges.map(A=>U.addEdge(A))},"populateDb"),Te={parser:{yy:void 0},parse:ct(async L=>{const U=await or("architecture",L);Qe.debug(U);const A=Te.parser?.yy;if(!(A instanceof me))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.");We(U,A)},"parse")},ze=ct(L=>`
|
|
1
|
+
import{Ca as Ce,Oa as ar,wa as nr}from"./index-DN4SafrP.js";import{n as or,t as sr}from"./mermaid-parser.core-DU_SX15F.js";import{Bt as ct,Ht as Qe,Vt as hr,jt as lr,t as fr}from"./src-DD_TpJde.js";import{B as cr,U as gr,W as ur,Y as dr,a as vr,b as pr,f as yr,j as Er,q as mr,v as Tr,w as Nr,x as ue,y as Lr}from"./chunk-CSCIHK7Q-CLgoBoCF.js";import{n as Cr,t as Ar}from"./chunk-WU5MYG2G-CNW1rcpL.js";import{c as Mr,d as wr,i as Or}from"./chunk-5ZQYHXKU-BU3pQVVl.js";import{a as Dr,i as xr,n as de,o as Ir,r as ve}from"./chunk-O5CBEL6O-BRUisK47.js";import{n as Rr,t as Sr}from"./chunk-4BX2VUAB-OIZUstuy.js";import{n as Fr,t as qe}from"./cytoscape.esm-C9FMRqxM.js";var xe=Ce(((L,U)=>{(function(X,N){typeof L=="object"&&typeof U=="object"?U.exports=N():typeof define=="function"&&define.amd?define([],N):typeof L=="object"?L.layoutBase=N():X.layoutBase=N()})(L,function(){return(function(A){var X={};function N(d){if(X[d])return X[d].exports;var o=X[d]={i:d,l:!1,exports:{}};return A[d].call(o.exports,o,o.exports,N),o.l=!0,o.exports}return N.m=A,N.c=X,N.i=function(d){return d},N.d=function(d,o,a){N.o(d,o)||Object.defineProperty(d,o,{configurable:!1,enumerable:!0,get:a})},N.n=function(d){var o=d&&d.__esModule?function(){return d.default}:function(){return d};return N.d(o,"a",o),o},N.o=function(d,o){return Object.prototype.hasOwnProperty.call(d,o)},N.p="",N(N.s=28)})([(function(A,X,N){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,A.exports=d}),(function(A,X,N){"use strict";var d=N(2),o=N(8),a=N(9);function t(h,i,v){d.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=h,this.target=i}t.prototype=Object.create(d.prototype);for(var e in d)t[e]=d[e];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,i){for(var v=this.getOtherEnd(h),n=i.getGraphManager().getRoot();;){if(v.getOwner()==i)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},t.prototype.updateLength=function(){var h=new Array(4);this.isOverlapingSourceAndTarget=o.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=t}),(function(A,X,N){"use strict";function d(o){this.vGraphObject=o}A.exports=d}),(function(A,X,N){"use strict";var d=N(2),o=N(10),a=N(13),t=N(0),e=N(16),h=N(5);function i(n,r,f,l){f==null&&l==null&&(l=r),d.call(this,l),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=n,f!=null&&r!=null?this.rect=new a(r.x,r.y,f.width,f.height):this.rect=new a}i.prototype=Object.create(d.prototype);for(var v in d)i[v]=d[v];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(n){this.rect.width=n},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(n){this.rect.height=n},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(n,r){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=r.width,this.rect.height=r.height},i.prototype.setCenter=function(n,r){this.rect.x=n-this.rect.width/2,this.rect.y=r-this.rect.height/2},i.prototype.setLocation=function(n,r){this.rect.x=n,this.rect.y=r},i.prototype.moveBy=function(n,r){this.rect.x+=n,this.rect.y+=r},i.prototype.getEdgeListToNode=function(n){var r=[],f=this;return f.edges.forEach(function(l){if(l.target==n){if(l.source!=f)throw"Incorrect edge source!";r.push(l)}}),r},i.prototype.getEdgesBetween=function(n){var r=[],f=this;return f.edges.forEach(function(l){if(!(l.source==f||l.target==f))throw"Incorrect edge source and/or target";(l.target==n||l.source==n)&&r.push(l)}),r},i.prototype.getNeighborsList=function(){var n=new Set,r=this;return r.edges.forEach(function(f){if(f.source==r)n.add(f.target);else{if(f.target!=r)throw"Incorrect incidency!";n.add(f.source)}}),n},i.prototype.withChildren=function(){var n=new Set,r,f;if(n.add(this),this.child!=null)for(var l=this.child.getNodes(),p=0;p<l.length;p++)r=l[p],f=r.withChildren(),f.forEach(function(g){n.add(g)});return n},i.prototype.getNoOfChildren=function(){var n=0,r;if(this.child==null)n=1;else for(var f=this.child.getNodes(),l=0;l<f.length;l++)r=f[l],n+=r.getNoOfChildren();return n==0&&(n=1),n},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var n,r,f=-t.INITIAL_WORLD_BOUNDARY,l=t.INITIAL_WORLD_BOUNDARY;n=t.WORLD_CENTER_X+e.nextDouble()*(l-f)+f;var p=-t.INITIAL_WORLD_BOUNDARY,g=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_Y+e.nextDouble()*(g-p)+p,this.rect.x=n,this.rect.y=r},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var n=this.getChild();if(n.updateBounds(!0),this.rect.x=n.getLeft(),this.rect.y=n.getTop(),this.setWidth(n.getRight()-n.getLeft()),this.setHeight(n.getBottom()-n.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var r=n.getRight()-n.getLeft(),f=n.getBottom()-n.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(r+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>r?(this.rect.x-=(this.labelWidth-r)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(r+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))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(n){var r=this.rect.x;r>t.WORLD_BOUNDARY?r=t.WORLD_BOUNDARY:r<-t.WORLD_BOUNDARY&&(r=-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(r,f),p=n.inverseTransformPoint(l);this.setLocation(p.x,p.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i}),(function(A,X,N){"use strict";var d=N(0);function o(){}for(var a in d)o[a]=d[a];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=o.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=o}),(function(A,X,N){"use strict";function d(o,a){o==null&&a==null?(this.x=0,this.y=0):(this.x=o,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(o){this.x=o},d.prototype.setY=function(o){this.y=o},d.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},A.exports=d}),(function(A,X,N){"use strict";var d=N(2),o=N(10),a=N(0),t=N(7),e=N(3),h=N(1),i=N(13),v=N(12),n=N(11);function r(l,p,g){d.call(this,g),this.estimatedSize=o.MIN_VALUE,this.margin=a.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)}r.prototype=Object.create(d.prototype);for(var f in d)r[f]=d[f];r.prototype.getNodes=function(){return this.nodes},r.prototype.getEdges=function(){return this.edges},r.prototype.getGraphManager=function(){return this.graphManager},r.prototype.getParent=function(){return this.parent},r.prototype.getLeft=function(){return this.left},r.prototype.getRight=function(){return this.right},r.prototype.getTop=function(){return this.top},r.prototype.getBottom=function(){return this.bottom},r.prototype.isConnected=function(){return this.isConnected},r.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)}},r.prototype.remove=function(l){var p=l;if(l instanceof e){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,w=0;w<T;w++)c=g[w],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var R=this.nodes.indexOf(p);if(R==-1)throw"Node not in owner node list!";this.nodes.splice(R,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),P=c.target.edges.indexOf(c);if(!(S>-1&&P>-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(P,1);var R=c.source.owner.getEdges().indexOf(c);if(R==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(R,1)}},r.prototype.updateLeftTop=function(){for(var l=o.MAX_VALUE,p=o.MAX_VALUE,g,c,T,w=this.getNodes(),R=w.length,S=0;S<R;S++){var P=w[S];g=P.getTop(),c=P.getLeft(),l>g&&(l=g),p>c&&(p=c)}return l==o.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?T=w[0].getParent().paddingLeft:T=this.margin,this.left=p-T,this.top=l-T,new v(this.left,this.top))},r.prototype.updateBounds=function(l){for(var p=o.MAX_VALUE,g=-o.MAX_VALUE,c=o.MAX_VALUE,T=-o.MAX_VALUE,w,R,S,P,W,B=this.nodes,x=B.length,it=0;it<x;it++){var s=B[it];l&&s.child!=null&&s.updateBounds(),w=s.getLeft(),R=s.getRight(),S=s.getTop(),P=s.getBottom(),p>w&&(p=w),g<R&&(g=R),c>S&&(c=S),T<P&&(T=P)}var E=new i(p,c,g-p,T-c);p==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),B[0].getParent().paddingLeft!=null?W=B[0].getParent().paddingLeft:W=this.margin,this.left=E.x-W,this.right=E.x+E.width+W,this.top=E.y-W,this.bottom=E.y+E.height+W},r.calculateBounds=function(l){for(var p=o.MAX_VALUE,g=-o.MAX_VALUE,c=o.MAX_VALUE,T=-o.MAX_VALUE,w,R,S,P,W=l.length,B=0;B<W;B++){var x=l[B];w=x.getLeft(),R=x.getRight(),S=x.getTop(),P=x.getBottom(),p>w&&(p=w),g<R&&(g=R),c>S&&(c=S),T<P&&(T=P)}return new i(p,c,g-p,T-c)},r.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=l/Math.sqrt(this.nodes.length),this.estimatedSize},r.prototype.updateConnected=function(){var l=this;if(this.nodes.length==0){this.isConnected=!0;return}var p=new n,g=new Set,c=this.nodes[0],T,w;for(c.withChildren().forEach(function(W){p.push(W),g.add(W)});p.length!==0;){c=p.shift(),T=c.getEdges();for(var R=T.length,S=0;S<R;S++)w=T[S].getOtherEndInGraph(c,this),w!=null&&!g.has(w)&&w.withChildren().forEach(function(W){p.push(W),g.add(W)})}if(this.isConnected=!1,g.size>=this.nodes.length){var P=0;g.forEach(function(W){W.owner==l&&P++}),P==this.nodes.length&&(this.isConnected=!0)}},A.exports=r}),(function(A,X,N){"use strict";var d,o=N(1);function a(t){d=N(6),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),h=this.add(t,e);return this.setRootGraph(h),this.rootGraph},a.prototype.add=function(t,e,h,i,v){if(h==null&&i==null&&v==null){if(t==null)throw"Graph is null!";if(e==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(e.child!=null)throw"Already has a child!";return t.parent=e,e.child=t,t}else{v=h,i=e,h=t;var n=i.getOwner(),r=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(r!=null&&r.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==r)return h.isInterGraph=!1,n.add(h,i,v);if(h.isInterGraph=!0,h.source=i,h.target=v,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}},a.prototype.remove=function(t){if(t instanceof d){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(e.getEdges());for(var i,v=h.length,n=0;n<v;n++)i=h[n],e.remove(i);var r=[];r=r.concat(e.getNodes());var f;v=r.length;for(var n=0;n<v;n++)f=r[n],e.remove(f);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof o){if(i=t,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var l=i.source.edges.indexOf(i);if(i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var l=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(l,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var t=[],e=this.getGraphs(),h=e.length,i=0;i<h;i++)t=t.concat(e[i].getNodes());this.allNodes=t}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var t=[],e=this.getGraphs();e.length;for(var h=0;h<e.length;h++)t=t.concat(e[h].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(t){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=t},a.prototype.getRoot=function(){return this.rootGraph},a.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"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(t,e){if(!(t!=null&&e!=null))throw"assert failed";if(t==e)return!0;var h=t.getOwner(),i;do{if(i=h.getParent(),i==null)break;if(i==e)return!0;if(h=i.getOwner(),h==null)break}while(!0);h=e.getOwner();do{if(i=h.getParent(),i==null)break;if(i==t)return!0;if(h=i.getOwner(),h==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var t,e,h,i,v,n=this.getAllEdges(),r=n.length,f=0;f<r;f++){if(t=n[f],e=t.source,h=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=h,e==h){t.lca=e.getOwner();continue}for(i=e.getOwner();t.lca==null;){for(t.targetInLca=h,v=h.getOwner();t.lca==null;){if(v==i){t.lca=v;break}if(v==this.rootGraph)break;if(t.lca!=null)throw"assert failed";t.targetInLca=v.getParent(),v=t.targetInLca.getOwner()}if(i==this.rootGraph)break;t.lca==null&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(t.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();var h=t.getOwner();do{if(h==null)break;var i=e.getOwner();do{if(i==null)break;if(i==h)return i;i=i.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},a.prototype.calcInclusionTreeDepths=function(t,e){t==null&&e==null&&(t=this.rootGraph,e=1);for(var h,i=t.getNodes(),v=i.length,n=0;n<v;n++)h=i[n],h.inclusionTreeDepth=e,h.child!=null&&this.calcInclusionTreeDepths(h.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var t,e=[],h=this.edges.length,i=0;i<h;i++)t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(var i=0;i<e.length;i++)this.remove(e[i]);return!1},A.exports=a}),(function(A,X,N){"use strict";var d=N(12);function o(){}o.calcSeparationAmount=function(a,t,e,h){if(!a.intersects(t))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,t,i),e[0]=Math.min(a.getRight(),t.getRight())-Math.max(a.x,t.x),e[1]=Math.min(a.getBottom(),t.getBottom())-Math.max(a.y,t.y),a.getX()<=t.getX()&&a.getRight()>=t.getRight()?e[0]+=Math.min(t.getX()-a.getX(),a.getRight()-t.getRight()):t.getX()<=a.getX()&&t.getRight()>=a.getRight()&&(e[0]+=Math.min(a.getX()-t.getX(),t.getRight()-a.getRight())),a.getY()<=t.getY()&&a.getBottom()>=t.getBottom()?e[1]+=Math.min(t.getY()-a.getY(),a.getBottom()-t.getBottom()):t.getY()<=a.getY()&&t.getBottom()>=a.getBottom()&&(e[1]+=Math.min(a.getY()-t.getY(),t.getBottom()-a.getBottom()));var v=Math.abs((t.getCenterY()-a.getCenterY())/(t.getCenterX()-a.getCenterX()));t.getCenterY()===a.getCenterY()&&t.getCenterX()===a.getCenterX()&&(v=1);var n=v*e[0],r=e[1]/v;e[0]<r?r=e[0]:n=e[1],e[0]=-1*i[0]*(r/2+h),e[1]=-1*i[1]*(n/2+h)},o.decideDirectionsForOverlappingNodes=function(a,t,e){a.getCenterX()<t.getCenterX()?e[0]=-1:e[0]=1,a.getCenterY()<t.getCenterY()?e[1]=-1:e[1]=1},o.getIntersection2=function(a,t,e){var h=a.getCenterX(),i=a.getCenterY(),v=t.getCenterX(),n=t.getCenterY();if(a.intersects(t))return e[0]=h,e[1]=i,e[2]=v,e[3]=n,!0;var r=a.getX(),f=a.getY(),l=a.getRight(),p=a.getX(),g=a.getBottom(),c=a.getRight(),T=a.getWidthHalf(),w=a.getHeightHalf(),R=t.getX(),S=t.getY(),P=t.getRight(),W=t.getX(),B=t.getBottom(),x=t.getRight(),it=t.getWidthHalf(),s=t.getHeightHalf(),E=!1,u=!1;if(h===v){if(i>n)return e[0]=h,e[1]=f,e[2]=v,e[3]=B,!1;if(i<n)return e[0]=h,e[1]=g,e[2]=v,e[3]=S,!1}else if(i===n){if(h>v)return e[0]=r,e[1]=i,e[2]=P,e[3]=n,!1;if(h<v)return e[0]=l,e[1]=i,e[2]=R,e[3]=n,!1}else{var m=a.height/a.width,y=t.height/t.width,C=(n-i)/(v-h),M=void 0,b=void 0,O=void 0,I=void 0,V=void 0,$=void 0;if(-m===C?h>v?(e[0]=p,e[1]=g,E=!0):(e[0]=l,e[1]=f,E=!0):m===C&&(h>v?(e[0]=r,e[1]=f,E=!0):(e[0]=c,e[1]=g,E=!0)),-y===C?v>h?(e[2]=W,e[3]=B,u=!0):(e[2]=P,e[3]=S,u=!0):y===C&&(v>h?(e[2]=R,e[3]=S,u=!0):(e[2]=x,e[3]=B,u=!0)),E&&u)return!1;if(h>v?i>n?(M=this.getCardinalDirection(m,C,4),b=this.getCardinalDirection(y,C,2)):(M=this.getCardinalDirection(-m,C,3),b=this.getCardinalDirection(-y,C,1)):i>n?(M=this.getCardinalDirection(-m,C,1),b=this.getCardinalDirection(-y,C,3)):(M=this.getCardinalDirection(m,C,2),b=this.getCardinalDirection(y,C,4)),!E)switch(M){case 1:I=f,O=h+-w/C,e[0]=O,e[1]=I;break;case 2:O=c,I=i+T*C,e[0]=O,e[1]=I;break;case 3:I=g,O=h+w/C,e[0]=O,e[1]=I;break;case 4:O=p,I=i+-T*C,e[0]=O,e[1]=I;break}if(!u)switch(b){case 1:$=S,V=v+-s/C,e[2]=V,e[3]=$;break;case 2:V=x,$=n+it*C,e[2]=V,e[3]=$;break;case 3:$=B,V=v+s/C,e[2]=V,e[3]=$;break;case 4:V=W,$=n+-it*C,e[2]=V,e[3]=$;break}}return!1},o.getCardinalDirection=function(a,t,e){return a>t?e:1+e%4},o.getIntersection=function(a,t,e,h){if(h==null)return this.getIntersection2(a,t,e);var i=a.x,v=a.y,n=t.x,r=t.y,f=e.x,l=e.y,p=h.x,g=h.y,c=void 0,T=void 0,w=void 0,R=void 0,S=void 0,P=void 0,W=void 0,B=void 0,x=void 0;return w=r-v,S=i-n,W=n*v-i*r,R=g-l,P=f-p,B=p*l-f*g,x=w*P-R*S,x===0?null:(c=(S*B-P*W)/x,T=(R*W-w*B)/x,new d(c,T))},o.angleOfVector=function(a,t,e,h){var i=void 0;return a!==e?(i=Math.atan((h-t)/(e-a)),e<a?i+=Math.PI:h<t&&(i+=this.TWO_PI)):h<t?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},o.doIntersect=function(a,t,e,h){var i=a.x,v=a.y,n=t.x,r=t.y,f=e.x,l=e.y,p=h.x,g=h.y,c=(n-i)*(g-l)-(p-f)*(r-v);if(c===0)return!1;var T=((g-l)*(p-i)+(f-p)*(g-v))/c,w=((v-r)*(p-i)+(n-i)*(g-v))/c;return 0<T&&T<1&&0<w&&w<1},o.findCircleLineIntersections=function(a,t,e,h,i,v,n){var r=(e-a)*(e-a)+(h-t)*(h-t),f=2*((a-i)*(e-a)+(t-v)*(h-t)),l=(a-i)*(a-i)+(t-v)*(t-v)-n*n;if(f*f-4*r*l>=0){var p=(-f+Math.sqrt(f*f-4*r*l))/(2*r),g=(-f-Math.sqrt(f*f-4*r*l))/(2*r),c=null;return p>=0&&p<=1?[p]:g>=0&&g<=1?[g]:c}else return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,A.exports=o}),(function(A,X,N){"use strict";function d(){}d.sign=function(o){return o>0?1:o<0?-1:0},d.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},d.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},A.exports=d}),(function(A,X,N){"use strict";function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,A.exports=d}),(function(A,X,N){"use strict";var d=(function(){function h(i,v){for(var n=0;n<v.length;n++){var r=v[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}return function(i,v,n){return v&&h(i.prototype,v),n&&h(i,n),i}})();function o(h,i){if(!(h instanceof i))throw new TypeError("Cannot call a class as a function")}var a=function(i){return{value:i,next:null,prev:null}},t=function(i,v,n,r){return i!==null?i.next=v:r.head=v,n!==null?n.prev=v:r.tail=v,v.prev=i,v.next=n,r.length++,v},e=function(i,v){var n=i.prev,r=i.next;return n!==null?n.next=r:v.head=r,r!==null?r.prev=n:v.tail=n,i.prev=i.next=null,v.length--,i};A.exports=(function(){function h(i){var v=this;o(this,h),this.length=0,this.head=null,this.tail=null,i?.forEach(function(n){return v.push(n)})}return d(h,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(v,n){return t(n.prev,a(v),n,this)}},{key:"insertAfter",value:function(v,n){return t(n,a(v),n.next,this)}},{key:"insertNodeBefore",value:function(v,n){return t(n.prev,v,n,this)}},{key:"insertNodeAfter",value:function(v,n){return t(n,v,n.next,this)}},{key:"push",value:function(v){return t(this.tail,a(v),null,this)}},{key:"unshift",value:function(v){return t(null,a(v),this.head,this)}},{key:"remove",value:function(v){return e(v,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(v){if(v<=this.length()){for(var n=1,r=this.head;n<v;)r=r.next,n++;return r.value}}},{key:"set_object_at",value:function(v,n){if(v<=this.length()){for(var r=1,f=this.head;r<v;)f=f.next,r++;f.value=n}}}]),h})()}),(function(A,X,N){"use strict";function d(o,a,t){this.x=null,this.y=null,o==null&&a==null&&t==null?(this.x=0,this.y=0):typeof o=="number"&&typeof a=="number"&&t==null?(this.x=o,this.y=a):o.constructor.name=="Point"&&a==null&&t==null&&(t=o,this.x=t.x,this.y=t.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(o,a,t){o.constructor.name=="Point"&&a==null&&t==null?(t=o,this.setLocation(t.x,t.y)):typeof o=="number"&&typeof a=="number"&&t==null&&(parseInt(o)==o&&parseInt(a)==a?this.move(o,a):(this.x=Math.floor(o+.5),this.y=Math.floor(a+.5)))},d.prototype.move=function(o,a){this.x=o,this.y=a},d.prototype.translate=function(o,a){this.x+=o,this.y+=a},d.prototype.equals=function(o){if(o.constructor.name=="Point"){var a=o;return this.x==a.x&&this.y==a.y}return this==o},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=d}),(function(A,X,N){"use strict";function d(o,a,t,e){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&a!=null&&t!=null&&e!=null&&(this.x=o,this.y=a,this.width=t,this.height=e)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(o){this.x=o},d.prototype.getY=function(){return this.y},d.prototype.setY=function(o){this.y=o},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(o){this.width=o},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(o){this.height=o},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},A.exports=d}),(function(A,X,N){"use strict";var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function o(){}o.lastID=0,o.createID=function(a){return o.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=o.getString(),o.lastID++),a.uniqueID)},o.getString=function(a){return a==null&&(a=o.lastID),"Object#"+a},o.isPrimitive=function(a){var t=typeof a>"u"?"undefined":d(a);return a==null||t!="object"&&t!="function"},A.exports=o}),(function(A,X,N){"use strict";function d(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 o=N(0),a=N(7),t=N(3),e=N(1),h=N(6),i=N(5),v=N(17),n=N(29);function r(f){n.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,f!=null&&(this.isRemoteUse=f)}r.RANDOM_SEED=1,r.prototype=Object.create(n.prototype),r.prototype.getGraphManager=function(){return this.graphManager},r.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},r.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},r.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},r.prototype.newGraphManager=function(){var f=new a(this);return this.graphManager=f,f},r.prototype.newGraph=function(f){return new h(null,this.graphManager,f)},r.prototype.newNode=function(f){return new t(this.graphManager,f)},r.prototype.newEdge=function(f){return new e(null,null,f)},r.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},r.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var f;return this.checkLayoutSuccess()?f=!1:f=this.layout(),o.ANIMATE==="during"?!1:(f&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,f)},r.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},r.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())}},r.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 e){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)}},r.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},r.prototype.transform=function(f){if(f==null)this.transform(new i(0,0));else{var l=new v,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)}}},r.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())},r.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,w=[],R=new Map,S=[];for(S=S.concat(p);S.length>0&&l;){for(w.push(S[0]);w.length>0&&l;){var P=w[0];w.splice(0,1),T.add(P);for(var W=P.getEdges(),c=0;c<W.length;c++){var B=W[c].getOtherEnd(P);if(R.get(P)!=B)if(!T.has(B))w.push(B),R.set(B,P);else{l=!1;break}}}if(!l)f=[];else{var x=[].concat(d(T));f.push(x);for(var c=0;c<x.length;c++){var it=x[c],s=S.indexOf(it);s>-1&&S.splice(s,1)}T=new Set,R=new Map}}return f},r.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 w=this.newEdge(null);this.graphManager.add(w,p,T),l.add(T),p=T}var w=this.newEdge(null);return this.graphManager.add(w,p,f.target),this.edgeToDummyNodes.set(f,l),f.isInterGraph()?this.graphManager.remove(f):g.remove(f),l},r.prototype.createBendpointsFromDummyNodes=function(){var f=[];f=f.concat(this.graphManager.getAllEdges()),f=[].concat(d(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],w=new i(T.getCenterX(),T.getCenterY()),R=p.bendpoints.get(c);R.x=w.x,R.y=w.y,T.getOwner().remove(T)}this.graphManager.add(p,p.source,p.target)}}},r.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 w=l*g;c+=(w-l)/50*(f-50)}return c}else{var R,S;return f<=50?(R=9*l/500,S=l/10):(R=9*l/50,S=-8*l),R*f+S}},r.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 w=0;w<l.length;w++){var R=l[w],S=R.getNeighborsList().size;g.set(R,R.getNeighborsList().size),S==1&&p.push(R)}var P=[];for(P=P.concat(p);!c;){var W=[];W=W.concat(P),P=[];for(var w=0;w<l.length;w++){var R=l[w],B=l.indexOf(R);B>=0&&l.splice(B,1),R.getNeighborsList().forEach(function(s){if(p.indexOf(s)<0){var E=g.get(s)-1;E==1&&P.push(s),g.set(s,E)}})}p=p.concat(P),(l.length==1||l.length==2)&&(c=!0,T=l[0])}return T},r.prototype.setGraphManager=function(f){this.graphManager=f},A.exports=r}),(function(A,X,N){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},A.exports=d}),(function(A,X,N){"use strict";var d=N(5);function o(a,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}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(a){this.lworldExtX=a},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(a){this.lworldExtY=a},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},o.prototype.transformX=function(a){var t=0,e=this.lworldExtX;return e!=0&&(t=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/e),t},o.prototype.transformY=function(a){var t=0,e=this.lworldExtY;return e!=0&&(t=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/e),t},o.prototype.inverseTransformX=function(a){var t=0,e=this.ldeviceExtX;return e!=0&&(t=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/e),t},o.prototype.inverseTransformY=function(a){var t=0,e=this.ldeviceExtY;return e!=0&&(t=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/e),t},o.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},A.exports=o}),(function(A,X,N){"use strict";function d(n){if(Array.isArray(n)){for(var r=0,f=Array(n.length);r<n.length;r++)f[r]=n[r];return f}else return Array.from(n)}var o=N(15),a=N(4),t=N(0),e=N(8),h=N(9);function i(){o.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}i.prototype=Object.create(o.prototype);for(var v in o)i[v]=o[v];i.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var n,r,f,l,p,g,c,T=this.getGraphManager().getAllEdges(),w=0;w<T.length;w++)n=T[w],r=n.idealLength,n.isInterGraph&&(l=n.getSource(),p=n.getTarget(),g=n.getSourceInLca().getEstimatedSize(),c=n.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(n.idealLength+=g+c-2*t.SIMPLE_NODE_SIZE),f=n.getLca().getInclusionTreeDepth(),n.idealLength+=r*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*f))},i.prototype.initSpringEmbedder=function(){var n=this.getAllNodes().length;this.incremental?(n>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(n-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),r,f=0;f<n.length;f++)r=n[f],this.calcSpringForce(r,r.idealLength)},i.prototype.calcRepulsionForces=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f,l,p,g,c=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),T=new Set,f=0;f<c.length;f++)p=c[f],this.calculateRepulsionForceOfANode(p,T,n,r),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)},i.prototype.calcGravitationalForces=function(){for(var n,r=this.getAllNodesToApplyGravitation(),f=0;f<r.length;f++)n=r[f],this.calcGravitationalForce(n)},i.prototype.moveNodes=function(){for(var n=this.getAllNodes(),r,f=0;f<n.length;f++)r=n[f],r.move()},i.prototype.calcSpringForce=function(n,r){var f=n.getSource(),l=n.getTarget(),p,g,c,T;if(this.uniformLeafNodeSizes&&f.getChild()==null&&l.getChild()==null)n.updateLengthSimple();else if(n.updateLength(),n.isOverlapingSourceAndTarget)return;p=n.getLength(),p!=0&&(g=n.edgeElasticity*(p-r),c=g*(n.lengthX/p),T=g*(n.lengthY/p),f.springForceX+=c,f.springForceY+=T,l.springForceX-=c,l.springForceY-=T)},i.prototype.calcRepulsionForce=function(n,r){var f=n.getRect(),l=r.getRect(),p=new Array(2),g=new Array(4),c,T,w,R,S,P,W;if(f.intersects(l)){e.calcSeparationAmount(f,l,p,a.DEFAULT_EDGE_LENGTH/2),P=2*p[0],W=2*p[1];var B=n.noOfChildren*r.noOfChildren/(n.noOfChildren+r.noOfChildren);n.repulsionForceX-=B*P,n.repulsionForceY-=B*W,r.repulsionForceX+=B*P,r.repulsionForceY+=B*W}else this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null?(c=l.getCenterX()-f.getCenterX(),T=l.getCenterY()-f.getCenterY()):(e.getIntersection(f,l,g),c=g[2]-g[0],T=g[3]-g[1]),Math.abs(c)<a.MIN_REPULSION_DIST&&(c=h.sign(c)*a.MIN_REPULSION_DIST),Math.abs(T)<a.MIN_REPULSION_DIST&&(T=h.sign(T)*a.MIN_REPULSION_DIST),w=c*c+T*T,R=Math.sqrt(w),S=(n.nodeRepulsion/2+r.nodeRepulsion/2)*n.noOfChildren*r.noOfChildren/w,P=S*c/R,W=S*T/R,n.repulsionForceX-=P,n.repulsionForceY-=W,r.repulsionForceX+=P,r.repulsionForceY+=W},i.prototype.calcGravitationalForce=function(n){var r,f,l,p,g,c,T,w;r=n.getOwner(),f=(r.getRight()+r.getLeft())/2,l=(r.getTop()+r.getBottom())/2,p=n.getCenterX()-f,g=n.getCenterY()-l,c=Math.abs(p)+n.getWidth()/2,T=Math.abs(g)+n.getHeight()/2,n.getOwner()==this.graphManager.getRoot()?(w=r.getEstimatedSize()*this.gravityRangeFactor,(c>w||T>w)&&(n.gravitationForceX=-this.gravityConstant*p,n.gravitationForceY=-this.gravityConstant*g)):(w=r.getEstimatedSize()*this.compoundGravityRangeFactor,(c>w||T>w)&&(n.gravitationForceX=-this.gravityConstant*p*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*g*this.compoundGravityConstant))},i.prototype.isConverged=function(){var n,r=!1;return this.totalIterations>this.maxIterations/3&&(r=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,n||r},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var n,r=this.graphManager.getAllNodes(),f=0;f<r.length;f++)n=r[f],n.noOfChildren=n.getNoOfChildren()},i.prototype.calcGrid=function(n){var r=0,f=0;r=parseInt(Math.ceil((n.getRight()-n.getLeft())/this.repulsionRange)),f=parseInt(Math.ceil((n.getBottom()-n.getTop())/this.repulsionRange));for(var l=new Array(r),p=0;p<r;p++)l[p]=new Array(f);for(var p=0;p<r;p++)for(var g=0;g<f;g++)l[p][g]=new Array;return l},i.prototype.addNodeToGrid=function(n,r,f){var l=0,p=0,g=0,c=0;l=parseInt(Math.floor((n.getRect().x-r)/this.repulsionRange)),p=parseInt(Math.floor((n.getRect().width+n.getRect().x-r)/this.repulsionRange)),g=parseInt(Math.floor((n.getRect().y-f)/this.repulsionRange)),c=parseInt(Math.floor((n.getRect().height+n.getRect().y-f)/this.repulsionRange));for(var T=l;T<=p;T++)for(var w=g;w<=c;w++)this.grid[T][w].push(n),n.setGridCoordinates(l,p,g,c)},i.prototype.updateGrid=function(){var n,r,f=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),n=0;n<f.length;n++)r=f[n],this.addNodeToGrid(r,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(n,r,f,l){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f||l){var p=new Set;n.surrounding=new Array;for(var g,c=this.grid,T=n.startX-1;T<n.finishX+2;T++)for(var w=n.startY-1;w<n.finishY+2;w++)if(!(T<0||w<0||T>=c.length||w>=c[0].length)){for(var R=0;R<c[T][w].length;R++)if(g=c[T][w][R],!(n.getOwner()!=g.getOwner()||n==g)&&!r.has(g)&&!p.has(g)){var S=Math.abs(n.getCenterX()-g.getCenterX())-(n.getWidth()/2+g.getWidth()/2),P=Math.abs(n.getCenterY()-g.getCenterY())-(n.getHeight()/2+g.getHeight()/2);S<=this.repulsionRange&&P<=this.repulsionRange&&p.add(g)}}n.surrounding=[].concat(d(p))}for(T=0;T<n.surrounding.length;T++)this.calcRepulsionForce(n,n.surrounding[T])},i.prototype.calcRepulsionRange=function(){return 0},A.exports=i}),(function(A,X,N){"use strict";var d=N(1),o=N(4);function a(e,h,i){d.call(this,e,h,i),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(d.prototype);for(var t in d)a[t]=d[t];A.exports=a}),(function(A,X,N){"use strict";var d=N(3),o=N(4);function a(e,h,i,v){d.call(this,e,h,i,v),this.nodeRepulsion=o.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=[]}a.prototype=Object.create(d.prototype);for(var t in d)a[t]=d[t];a.prototype.setGridCoordinates=function(e,h,i,v){this.startX=e,this.finishX=h,this.startY=i,this.finishY=v},A.exports=a}),(function(A,X,N){"use strict";function d(o,a){this.width=0,this.height=0,o!==null&&a!==null&&(this.height=a,this.width=o)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(o){this.width=o},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(o){this.height=o},A.exports=d}),(function(A,X,N){"use strict";var d=N(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(a,t){var e=d.createID(a);this.contains(e)||(this.map[e]=t,this.keys.push(a))},o.prototype.contains=function(a){return d.createID(a),this.map[a]!=null},o.prototype.get=function(a){var t=d.createID(a);return this.map[t]},o.prototype.keySet=function(){return this.keys},A.exports=o}),(function(A,X,N){"use strict";var d=N(14);function o(){this.set={}}o.prototype.add=function(a){var t=d.createID(a);this.contains(t)||(this.set[t]=a)},o.prototype.remove=function(a){delete this.set[d.createID(a)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(a){return this.set[d.createID(a)]==a},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(a){for(var t=Object.keys(this.set),e=t.length,h=0;h<e;h++)a.push(this.set[t[h]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(a){for(var t=a.length,e=0;e<t;e++){var h=a[e];this.add(h)}},A.exports=o}),(function(A,X,N){"use strict";function d(){}d.multMat=function(o,a){for(var t=[],e=0;e<o.length;e++){t[e]=[];for(var h=0;h<a[0].length;h++){t[e][h]=0;for(var i=0;i<o[0].length;i++)t[e][h]+=o[e][i]*a[i][h]}}return t},d.transpose=function(o){for(var a=[],t=0;t<o[0].length;t++){a[t]=[];for(var e=0;e<o.length;e++)a[t][e]=o[e][t]}return a},d.multCons=function(o,a){for(var t=[],e=0;e<o.length;e++)t[e]=o[e]*a;return t},d.minusOp=function(o,a){for(var t=[],e=0;e<o.length;e++)t[e]=o[e]-a[e];return t},d.dotProduct=function(o,a){for(var t=0,e=0;e<o.length;e++)t+=o[e]*a[e];return t},d.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},d.normalize=function(o){for(var a=[],t=this.mag(o),e=0;e<o.length;e++)a[e]=o[e]/t;return a},d.multGamma=function(o){for(var a=[],t=0,e=0;e<o.length;e++)t+=o[e];t*=-1/o.length;for(var h=0;h<o.length;h++)a[h]=t+o[h];return a},d.multL=function(o,a,t){for(var e=[],h=[],i=[],v=0;v<a[0].length;v++){for(var n=0,r=0;r<a.length;r++)n+=-.5*a[r][v]*o[r];h[v]=n}for(var f=0;f<t.length;f++){for(var l=0,p=0;p<t.length;p++)l+=t[f][p]*h[p];i[f]=l}for(var g=0;g<a.length;g++){for(var c=0,T=0;T<a[0].length;T++)c+=a[g][T]*i[T];e[g]=c}return e},A.exports=d}),(function(A,X,N){"use strict";var d=(function(){function t(e,h){for(var i=0;i<h.length;i++){var v=h[i];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}return function(e,h,i){return h&&t(e.prototype,h),i&&t(e,i),e}})();function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=N(11);A.exports=(function(){function t(e,h){o(this,t),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var i=void 0;e instanceof a?i=e.size():i=e.length,this._quicksort(e,0,i-1)}return d(t,[{key:"_quicksort",value:function(h,i,v){if(i<v){var n=this._partition(h,i,v);this._quicksort(h,i,n),this._quicksort(h,n+1,v)}}},{key:"_partition",value:function(h,i,v){for(var n=this._get(h,i),r=i,f=v;;){for(;this.compareFunction(n,this._get(h,f));)f--;for(;this.compareFunction(this._get(h,r),n);)r++;if(r<f)this._swap(h,r,f),r++,f--;else return f}}},{key:"_get",value:function(h,i){return h instanceof a?h.get_object_at(i):h[i]}},{key:"_set",value:function(h,i,v){h instanceof a?h.set_object_at(i,v):h[i]=v}},{key:"_swap",value:function(h,i,v){var n=this._get(h,i);this._set(h,i,this._get(h,v)),this._set(h,v,n)}},{key:"_defaultCompareFunction",value:function(h,i){return i>h}}]),t})()}),(function(A,X,N){"use strict";function d(){}d.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var a=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(Ht){if(Ht.length==0)return 0;for(var St=[],Ut=0;Ut<Ht[0];Ut++)St.push(Tt(Ht.slice(1)));return St})(Ot)})([this.m,a]),this.V=(function(Ot){return(function Tt(Ht){if(Ht.length==0)return 0;for(var St=[],Ut=0;Ut<Ht[0];Ut++)St.push(Tt(Ht.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),e=(function(Ot){for(var Tt=[];Ot-- >0;)Tt.push(0);return Tt})(this.m),h=!0,i=!0,v=Math.min(this.m-1,this.n),n=Math.max(0,Math.min(this.n-2,this.m)),r=0;r<Math.max(v,n);r++){if(r<v){this.s[r]=0;for(var f=r;f<this.m;f++)this.s[r]=d.hypot(this.s[r],o[f][r]);if(this.s[r]!==0){o[r][r]<0&&(this.s[r]=-this.s[r]);for(var l=r;l<this.m;l++)o[l][r]/=this.s[r];o[r][r]+=1}this.s[r]=-this.s[r]}for(var p=r+1;p<this.n;p++){if((function(Ot,Tt){return Ot&&Tt})(r<v,this.s[r]!==0)){for(var g=0,c=r;c<this.m;c++)g+=o[c][r]*o[c][p];g=-g/o[r][r];for(var T=r;T<this.m;T++)o[T][p]+=g*o[T][r]}t[p]=o[r][p]}if((function(Ot,Tt){return Ot&&Tt})(h,r<v))for(var w=r;w<this.m;w++)this.U[w][r]=o[w][r];if(r<n){t[r]=0;for(var R=r+1;R<this.n;R++)t[r]=d.hypot(t[r],t[R]);if(t[r]!==0){t[r+1]<0&&(t[r]=-t[r]);for(var S=r+1;S<this.n;S++)t[S]/=t[r];t[r+1]+=1}if(t[r]=-t[r],(function(Ot,Tt){return Ot&&Tt})(r+1<this.m,t[r]!==0)){for(var P=r+1;P<this.m;P++)e[P]=0;for(var W=r+1;W<this.n;W++)for(var B=r+1;B<this.m;B++)e[B]+=t[W]*o[B][W];for(var x=r+1;x<this.n;x++)for(var it=-t[x]/t[r+1],s=r+1;s<this.m;s++)o[s][x]+=it*e[s]}if(i)for(var E=r+1;E<this.n;E++)this.V[E][r]=t[E]}}var u=Math.min(this.n,this.m+1);if(v<this.n&&(this.s[v]=o[v][v]),this.m<u&&(this.s[u-1]=0),n+1<u&&(t[n]=o[n][u-1]),t[u-1]=0,h){for(var m=v;m<a;m++){for(var y=0;y<this.m;y++)this.U[y][m]=0;this.U[m][m]=1}for(var C=v-1;C>=0;C--)if(this.s[C]!==0){for(var M=C+1;M<a;M++){for(var b=0,O=C;O<this.m;O++)b+=this.U[O][C]*this.U[O][M];b=-b/this.U[C][C];for(var I=C;I<this.m;I++)this.U[I][M]+=b*this.U[I][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 $=0;$<C-1;$++)this.U[$][C]=0}else{for(var et=0;et<this.m;et++)this.U[et][C]=0;this.U[C][C]=1}}if(i)for(var K=this.n-1;K>=0;K--){if((function(Ot,Tt){return Ot&&Tt})(K<n,t[K]!==0))for(var G=K+1;G<a;G++){for(var F=0,Y=K+1;Y<this.n;Y++)F+=this.V[Y][K]*this.V[Y][G];F=-F/this.V[K+1][K];for(var J=K+1;J<this.n;J++)this.V[J][G]+=F*this.V[J][K]}for(var at=0;at<this.n;at++)this.V[at][K]=0;this.V[K][K]=1}for(var q=u-1,Z=0,mt=Math.pow(2,-52),lt=Math.pow(2,-966);u>0;){var k=void 0,Et=void 0;for(k=u-2;k>=-1&&k!==-1;k--)if(Math.abs(t[k])<=lt+mt*(Math.abs(this.s[k])+Math.abs(this.s[k+1]))){t[k]=0;break}if(k===u-2)Et=4;else{var ot=void 0;for(ot=u-1;ot>=k&&ot!==k;ot--){var Ct=(ot!==u?Math.abs(t[ot]):0)+(ot!==k+1?Math.abs(t[ot-1]):0);if(Math.abs(this.s[ot])<=lt+mt*Ct){this.s[ot]=0;break}}ot===k?Et=3:ot===u-1?Et=1:(Et=2,k=ot)}switch(k++,Et){case 1:var Vt=t[u-2];t[u-2]=0;for(var Dt=u-2;Dt>=k;Dt--){var xt=d.hypot(this.s[Dt],Vt),Gt=this.s[Dt]/xt,Wt=Vt/xt;if(this.s[Dt]=xt,Dt!==k&&(Vt=-Wt*t[Dt-1],t[Dt-1]=Gt*t[Dt-1]),i)for(var Ft=0;Ft<this.n;Ft++)xt=Gt*this.V[Ft][Dt]+Wt*this.V[Ft][u-1],this.V[Ft][u-1]=-Wt*this.V[Ft][Dt]+Gt*this.V[Ft][u-1],this.V[Ft][Dt]=xt}break;case 2:var $t=t[k-1];t[k-1]=0;for(var Xt=k;Xt<u;Xt++){var Bt=d.hypot(this.s[Xt],$t),At=this.s[Xt]/Bt,gt=$t/Bt;if(this.s[Xt]=Bt,$t=-gt*t[Xt],t[Xt]=At*t[Xt],h)for(var D=0;D<this.m;D++)Bt=At*this.U[D][Xt]+gt*this.U[D][k-1],this.U[D][k-1]=-gt*this.U[D][Xt]+At*this.U[D][k-1],this.U[D][Xt]=Bt}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[k])),Math.abs(t[k])),z=this.s[u-1]/H,_=this.s[u-2]/H,Q=t[u-2]/H,j=this.s[k]/H,pt=t[k]/H,ft=((_+z)*(_-z)+Q*Q)/2,rt=z*Q*(z*Q),dt=0;(function(Ot,Tt){return Ot||Tt})(ft!==0,rt!==0)&&(dt=Math.sqrt(ft*ft+rt),ft<0&&(dt=-dt),dt=rt/(ft+dt));for(var Lt=(j+z)*(j-z)+dt,wt=j*pt,tt=k;tt<u-1;tt++){var Nt=d.hypot(Lt,wt),st=Lt/Nt,nt=wt/Nt;if(tt!==k&&(t[tt-1]=Nt),Lt=st*this.s[tt]+nt*t[tt],t[tt]=st*t[tt]-nt*this.s[tt],wt=nt*this.s[tt+1],this.s[tt+1]=st*this.s[tt+1],i)for(var ht=0;ht<this.n;ht++)Nt=st*this.V[ht][tt]+nt*this.V[ht][tt+1],this.V[ht][tt+1]=-nt*this.V[ht][tt]+st*this.V[ht][tt+1],this.V[ht][tt]=Nt;if(Nt=d.hypot(Lt,wt),st=Lt/Nt,nt=wt/Nt,this.s[tt]=Nt,Lt=st*t[tt]+nt*this.s[tt+1],this.s[tt+1]=-nt*t[tt]+st*this.s[tt+1],wt=nt*t[tt+1],t[tt+1]=st*t[tt+1],h&&tt<this.m-1)for(var yt=0;yt<this.m;yt++)Nt=st*this.U[yt][tt]+nt*this.U[yt][tt+1],this.U[yt][tt+1]=-nt*this.U[yt][tt]+st*this.U[yt][tt+1],this.U[yt][tt]=Nt}t[u-2]=Lt,Z=Z+1;break;case 4:if(this.s[k]<=0&&(this.s[k]=this.s[k]<0?-this.s[k]:0,i))for(var ut=0;ut<=q;ut++)this.V[ut][k]=-this.V[ut][k];for(;k<q&&!(this.s[k]>=this.s[k+1]);){var Rt=this.s[k];if(this.s[k]=this.s[k+1],this.s[k+1]=Rt,i&&k<this.n-1)for(var It=0;It<this.n;It++)Rt=this.V[It][k+1],this.V[It][k+1]=this.V[It][k],this.V[It][k]=Rt;if(h&&k<this.m-1)for(var bt=0;bt<this.m;bt++)Rt=this.U[bt][k+1],this.U[bt][k+1]=this.U[bt][k],this.U[bt][k]=Rt;k++}Z=0,u--;break}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(o,a){var t=void 0;return Math.abs(o)>Math.abs(a)?(t=a/o,t=Math.abs(o)*Math.sqrt(1+t*t)):a!=0?(t=o/a,t=Math.abs(a)*Math.sqrt(1+t*t)):t=0,t},A.exports=d}),(function(A,X,N){"use strict";var d=(function(){function a(t,e){for(var h=0;h<e.length;h++){var i=e[h];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,h){return e&&a(t.prototype,e),h&&a(t,h),t}})();function o(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}A.exports=(function(){function a(t,e){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,a),this.sequence1=t,this.sequence2=e,this.match_score=h,this.mismatch_penalty=i,this.gap_penalty=v,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=new Array(this.iMax);for(var n=0;n<this.iMax;n++){this.grid[n]=new Array(this.jMax);for(var r=0;r<this.jMax;r++)this.grid[n][r]=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 d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var 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 i=1;i<this.iMax;i++)for(var v=1;v<this.jMax;v++){var n=void 0;this.sequence1[i-1]===this.sequence2[v-1]?n=this.grid[i-1][v-1]+this.match_score:n=this.grid[i-1][v-1]+this.mismatch_penalty;var r=this.grid[i-1][v]+this.gap_penalty,f=this.grid[i][v-1]+this.gap_penalty,l=[n,r,f],p=this.arrayAllMaxIndexes(l);this.grid[i][v]=l[p[0]],this.tracebackGrid[i][v]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var h=e[0],i=this.tracebackGrid[h.pos[0]][h.pos[1]];i[0]&&e.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}),i[1]&&e.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),i[2]&&e.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}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,h){for(var i=[],v=-1;(v=e.indexOf(h,v+1))!==-1;)i.push(v);return i}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),a})()}),(function(A,X,N){"use strict";var d=function(){};d.FDLayout=N(18),d.FDLayoutConstants=N(4),d.FDLayoutEdge=N(19),d.FDLayoutNode=N(20),d.DimensionD=N(21),d.HashMap=N(22),d.HashSet=N(23),d.IGeometry=N(8),d.IMath=N(9),d.Integer=N(10),d.Point=N(12),d.PointD=N(5),d.RandomSeed=N(16),d.RectangleD=N(13),d.Transform=N(17),d.UniqueIDGeneretor=N(14),d.Quicksort=N(25),d.LinkedList=N(11),d.LGraphObject=N(2),d.LGraph=N(6),d.LEdge=N(1),d.LGraphManager=N(7),d.LNode=N(3),d.Layout=N(15),d.LayoutConstants=N(0),d.NeedlemanWunsch=N(27),d.Matrix=N(24),d.SVD=N(26),A.exports=d}),(function(A,X,N){"use strict";function d(){this.listeners=[]}var o=d.prototype;o.addListener=function(a,t){this.listeners.push({event:a,callback:t})},o.removeListener=function(a,t){for(var e=this.listeners.length;e>=0;e--){var h=this.listeners[e];h.event===a&&h.callback===t&&this.listeners.splice(e,1)}},o.emit=function(a,t){for(var e=0;e<this.listeners.length;e++){var h=this.listeners[e];a===h.event&&h.callback(t)}},A.exports=d})])})})),Ie=Ce(((L,U)=>{(function(X,N){typeof L=="object"&&typeof U=="object"?U.exports=N(xe()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof L=="object"?L.coseBase=N(xe()):X.coseBase=N(X.layoutBase)})(L,function(A){return(()=>{"use strict";var X={45:((o,a,t)=>{var e={};e.layoutBase=t(551),e.CoSEConstants=t(806),e.CoSEEdge=t(767),e.CoSEGraph=t(880),e.CoSEGraphManager=t(578),e.CoSELayout=t(765),e.CoSENode=t(991),e.ConstraintHandler=t(902),o.exports=e}),806:((o,a,t)=>{var e=t(551).FDLayoutConstants;function h(){}for(var i in e)h[i]=e[i];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=e.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,o.exports=h}),767:((o,a,t)=>{var e=t(551).FDLayoutEdge;function h(v,n,r){e.call(this,v,n,r)}h.prototype=Object.create(e.prototype);for(var i in e)h[i]=e[i];o.exports=h}),880:((o,a,t)=>{var e=t(551).LGraph;function h(v,n,r){e.call(this,v,n,r)}h.prototype=Object.create(e.prototype);for(var i in e)h[i]=e[i];o.exports=h}),578:((o,a,t)=>{var e=t(551).LGraphManager;function h(v){e.call(this,v)}h.prototype=Object.create(e.prototype);for(var i in e)h[i]=e[i];o.exports=h}),765:((o,a,t)=>{var e=t(551).FDLayout,h=t(578),i=t(880),v=t(991),n=t(767),r=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,w=t(551).Layout,R=t(551).Integer,S=t(551).IGeometry,P=t(551).LGraph,W=t(551).Transform,B=t(551).LinkedList;function x(){e.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(e.prototype);for(var it in e)x[it]=e[it];x.prototype.newGraphManager=function(){var s=new h(this);return this.graphManager=s,s},x.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},x.prototype.newNode=function(s){return new v(this.graphManager,s)},x.prototype.newEdge=function(s){return new n(null,null,s)},x.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(r.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=r.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(){e.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(r.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(C){return E.has(C)});this.graphManager.setAllNodesToApplyGravitation(u)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),r.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 s=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return s.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),r.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()),r.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,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),E={},u=0;u<s.length;u++){var m=s[u].rect,y=s[u].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var s=this.getAllNodes(),E,u=0;u<s.length;u++)E=s[u],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var u=0;u<s.length;u++)E=s[u],E.move()},x.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),u=0;u<E.length;u++){var m=E[u];this.idToNodeMap.set(m.id,m)}var y=function F(Y){for(var J=Y.getChild().getNodes(),at,q=0,Z=0;Z<J.length;Z++)at=J[Z],at.getChild()==null?s.fixedNodeSet.has(at.id)&&(q+=100):q+=F(at);return q};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(J){s.fixedNodeSet.add(J.nodeId)});for(var E=this.graphManager.getAllNodes(),m,u=0;u<E.length;u++)if(m=E[u],m.getChild()!=null){var C=y(m);C>0&&(m.fixedNodeWeight=C)}}if(this.constraints.relativePlacementConstraint){var M=new Map,b=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(F){s.fixedNodesOnHorizontal.add(F),s.fixedNodesOnVertical.add(F)}),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(Y){M.set(Y,"dummy"+u),s.dummyToNodeForVerticalAlignment.get("dummy"+u).push(Y),s.fixedNodeSet.has(Y)&&s.fixedNodesOnHorizontal.add("dummy"+u)});if(this.constraints.alignmentConstraint.horizontal)for(var I=this.constraints.alignmentConstraint.horizontal,u=0;u<I.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),I[u].forEach(function(Y){b.set(Y,"dummy"+u),s.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(Y),s.fixedNodeSet.has(Y)&&s.fixedNodesOnVertical.add("dummy"+u)})}if(r.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(F){var Y,J,at;for(at=F.length-1;at>=2*F.length/3;at--)Y=Math.floor(Math.random()*(at+1)),J=F[at],F[at]=F[Y],F[Y]=J;return F},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(F){if(F.left){var Y=M.has(F.left)?M.get(F.left):F.left,J=M.has(F.right)?M.get(F.right):F.right;s.nodesInRelativeHorizontal.includes(Y)||(s.nodesInRelativeHorizontal.push(Y),s.nodeToRelativeConstraintMapHorizontal.set(Y,[]),s.dummyToNodeForVerticalAlignment.has(Y)?s.nodeToTempPositionMapHorizontal.set(Y,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(Y,s.idToNodeMap.get(Y).getCenterX())),s.nodesInRelativeHorizontal.includes(J)||(s.nodesInRelativeHorizontal.push(J),s.nodeToRelativeConstraintMapHorizontal.set(J,[]),s.dummyToNodeForVerticalAlignment.has(J)?s.nodeToTempPositionMapHorizontal.set(J,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(J,s.idToNodeMap.get(J).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:J,gap:F.gap}),s.nodeToRelativeConstraintMapHorizontal.get(J).push({left:Y,gap:F.gap})}else{var at=b.has(F.top)?b.get(F.top):F.top,q=b.has(F.bottom)?b.get(F.bottom):F.bottom;s.nodesInRelativeVertical.includes(at)||(s.nodesInRelativeVertical.push(at),s.nodeToRelativeConstraintMapVertical.set(at,[]),s.dummyToNodeForHorizontalAlignment.has(at)?s.nodeToTempPositionMapVertical.set(at,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(at)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(at,s.idToNodeMap.get(at).getCenterY())),s.nodesInRelativeVertical.includes(q)||(s.nodesInRelativeVertical.push(q),s.nodeToRelativeConstraintMapVertical.set(q,[]),s.dummyToNodeForHorizontalAlignment.has(q)?s.nodeToTempPositionMapVertical.set(q,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(q)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(q,s.idToNodeMap.get(q).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(at).push({bottom:q,gap:F.gap}),s.nodeToRelativeConstraintMapVertical.get(q).push({top:at,gap:F.gap})}});else{var V=new Map,$=new Map;this.constraints.relativePlacementConstraint.forEach(function(F){if(F.left){var Y=M.has(F.left)?M.get(F.left):F.left,J=M.has(F.right)?M.get(F.right):F.right;V.has(Y)?V.get(Y).push(J):V.set(Y,[J]),V.has(J)?V.get(J).push(Y):V.set(J,[Y])}else{var at=b.has(F.top)?b.get(F.top):F.top,q=b.has(F.bottom)?b.get(F.bottom):F.bottom;$.has(at)?$.get(at).push(q):$.set(at,[q]),$.has(q)?$.get(q).push(at):$.set(q,[at])}});var et=function(Y,J){var at=[],q=[],Z=new B,mt=new Set,lt=0;return Y.forEach(function(k,Et){if(!mt.has(Et)){at[lt]=[],q[lt]=!1;var ot=Et;for(Z.push(ot),mt.add(ot),at[lt].push(ot);Z.length!=0;)ot=Z.shift(),J.has(ot)&&(q[lt]=!0),Y.get(ot).forEach(function(Ct){mt.has(Ct)||(Z.push(Ct),mt.add(Ct),at[lt].push(Ct))});lt++}}),{components:at,isFixed:q}},K=et(V,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var G=et($,s.fixedNodesOnVertical);this.componentsOnVertical=G.components,this.fixedComponentsOnVertical=G.isFixed}}},x.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(G){var F=s.idToNodeMap.get(G.nodeId);F.displacementX=0,F.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,u=0;u<E.length;u++){for(var m=0,y=0;y<E[u].length;y++){if(this.fixedNodeSet.has(E[u][y])){m=0;break}m+=this.idToNodeMap.get(E[u][y]).displacementX}for(var C=m/E[u].length,y=0;y<E[u].length;y++)this.idToNodeMap.get(E[u][y]).displacementX=C}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,u=0;u<M.length;u++){for(var b=0,y=0;y<M[u].length;y++){if(this.fixedNodeSet.has(M[u][y])){b=0;break}b+=this.idToNodeMap.get(M[u][y]).displacementY}for(var O=b/M[u].length,y=0;y<M[u].length;y++)this.idToNodeMap.get(M[u][y]).displacementY=O}}if(this.constraints.relativePlacementConstraint)if(r.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(G){if(!s.fixedNodesOnHorizontal.has(G)){var F=0;s.dummyToNodeForVerticalAlignment.has(G)?F=s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(G)[0]).displacementX:F=s.idToNodeMap.get(G).displacementX,s.nodeToRelativeConstraintMapHorizontal.get(G).forEach(function(Y){if(Y.right){var J=s.nodeToTempPositionMapHorizontal.get(Y.right)-s.nodeToTempPositionMapHorizontal.get(G)-F;J<Y.gap&&(F-=Y.gap-J)}else{var J=s.nodeToTempPositionMapHorizontal.get(G)-s.nodeToTempPositionMapHorizontal.get(Y.left)+F;J<Y.gap&&(F+=Y.gap-J)}}),s.nodeToTempPositionMapHorizontal.set(G,s.nodeToTempPositionMapHorizontal.get(G)+F),s.dummyToNodeForVerticalAlignment.has(G)?s.dummyToNodeForVerticalAlignment.get(G).forEach(function(Y){s.idToNodeMap.get(Y).displacementX=F}):s.idToNodeMap.get(G).displacementX=F}}),this.nodesInRelativeVertical.forEach(function(G){if(!s.fixedNodesOnHorizontal.has(G)){var F=0;s.dummyToNodeForHorizontalAlignment.has(G)?F=s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(G)[0]).displacementY:F=s.idToNodeMap.get(G).displacementY,s.nodeToRelativeConstraintMapVertical.get(G).forEach(function(Y){if(Y.bottom){var J=s.nodeToTempPositionMapVertical.get(Y.bottom)-s.nodeToTempPositionMapVertical.get(G)-F;J<Y.gap&&(F-=Y.gap-J)}else{var J=s.nodeToTempPositionMapVertical.get(G)-s.nodeToTempPositionMapVertical.get(Y.top)+F;J<Y.gap&&(F+=Y.gap-J)}}),s.nodeToTempPositionMapVertical.set(G,s.nodeToTempPositionMapVertical.get(G)+F),s.dummyToNodeForHorizontalAlignment.has(G)?s.dummyToNodeForHorizontalAlignment.get(G).forEach(function(Y){s.idToNodeMap.get(Y).displacementY=F}):s.idToNodeMap.get(G).displacementY=F}});else{for(var u=0;u<this.componentsOnHorizontal.length;u++){var I=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(var y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(Y){s.idToNodeMap.get(Y).displacementX=0}):this.idToNodeMap.get(I[y]).displacementX=0;else{for(var V=0,$=0,y=0;y<I.length;y++)if(this.dummyToNodeForVerticalAlignment.has(I[y])){var et=this.dummyToNodeForVerticalAlignment.get(I[y]);V+=et.length*this.idToNodeMap.get(et[0]).displacementX,$+=et.length}else V+=this.idToNodeMap.get(I[y]).displacementX,$++;for(var K=V/$,y=0;y<I.length;y++)this.dummyToNodeForVerticalAlignment.has(I[y])?this.dummyToNodeForVerticalAlignment.get(I[y]).forEach(function(Y){s.idToNodeMap.get(Y).displacementX=K}):this.idToNodeMap.get(I[y]).displacementX=K}}for(var u=0;u<this.componentsOnVertical.length;u++){var I=this.componentsOnVertical[u];if(this.fixedComponentsOnVertical[u])for(var y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(J){s.idToNodeMap.get(J).displacementY=0}):this.idToNodeMap.get(I[y]).displacementY=0;else{for(var V=0,$=0,y=0;y<I.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(I[y])){var et=this.dummyToNodeForHorizontalAlignment.get(I[y]);V+=et.length*this.idToNodeMap.get(et[0]).displacementY,$+=et.length}else V+=this.idToNodeMap.get(I[y]).displacementY,$++;for(var K=V/$,y=0;y<I.length;y++)this.dummyToNodeForHorizontalAlignment.has(I[y])?this.dummyToNodeForHorizontalAlignment.get(I[y]).forEach(function(Z){s.idToNodeMap.get(Z).displacementY=K}):this.idToNodeMap.get(I[y]).displacementY=K}}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],E,u=this.graphManager.getGraphs(),m=u.length,y;for(y=0;y<m;y++)E=u[y],E.updateConnected(),E.isConnected||(s=s.concat(E.getNodes()));return s},x.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var E=new Set,u;for(u=0;u<s.length;u++){var m=s[u];if(!E.has(m)){var y=m.getSource(),C=m.getTarget();if(y==C)m.getBendpoints().push(new c),m.getBendpoints().push(new c),this.createDummyNodesForBendpoints(m),E.add(m);else{var M=[];if(M=M.concat(y.getEdgeListToNode(C)),M=M.concat(C.getEdgeListToNode(y)),!E.has(M[0])){if(M.length>1){var b;for(b=0;b<M.length;b++){var O=M[b];O.getBendpoints().push(new c),this.createDummyNodesForBendpoints(O)}}M.forEach(function(I){E.add(I)})}}}if(E.size==s.length)break}},x.prototype.positionNodesRadially=function(s){for(var E=new g(0,0),u=Math.ceil(Math.sqrt(s.length)),m=0,y=0,C=0,M=new c(0,0),b=0;b<s.length;b++){b%u==0&&(C=0,y=m,b!=0&&(y+=r.DEFAULT_COMPONENT_SEPERATION),m=0);var O=s[b],I=w.findCenterOfTree(O);E.x=C,E.y=y,M=x.radialLayout(O,I,E),M.y>m&&(m=Math.floor(M.y)),C=Math.floor(M.x+r.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(p.WORLD_CENTER_X-M.x/2,p.WORLD_CENTER_Y-M.y/2))},x.radialLayout=function(s,E,u){var m=Math.max(this.maxDiagonalInTree(s),r.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(E,null,0,359,0,m);var y=P.calculateBounds(s),C=new W;C.setDeviceOrgX(y.getMinX()),C.setDeviceOrgY(y.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var M=0;M<s.length;M++)s[M].transform(C);var b=new c(y.getMaxX(),y.getMaxY());return C.inverseTransformPoint(b)},x.branchRadialLayout=function(s,E,u,m,y,C){var M=(m-u+1)/2;M<0&&(M+=180);var b=(M+u)%360*S.TWO_PI/360,O=y*Math.cos(b),I=y*Math.sin(b);s.setCenter(O,I);var V=[];V=V.concat(s.getEdges());var $=V.length;E!=null&&$--;for(var et=0,K=V.length,G,F=s.getEdgesBetween(E);F.length>1;){var Y=F[0];F.splice(0,1);var J=V.indexOf(Y);J>=0&&V.splice(J,1),K--,$--}E!=null?G=(V.indexOf(F[0])+1)%K:G=0;for(var at=Math.abs(m-u)/$,q=G;et!=$;q=++q%K){var Z=V[q].getOtherEnd(s);if(Z!=E){var mt=(u+et*at)%360,lt=(mt+at)%360;x.branchRadialLayout(Z,s,mt,lt,y+C,C),et++}}},x.maxDiagonalInTree=function(s){for(var E=R.MIN_VALUE,u=0;u<s.length;u++){var m=s[u].getDiagonal();m>E&&(E=m)}return E},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var s=this,E={};this.memberGroups={},this.idToDummyNode={};for(var u=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var C=m[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],b=C.getParent().id;typeof E[b]>"u"&&(E[b]=[]),E[b]=E[b].concat(C)}Object.keys(E).forEach(function(O){if(E[O].length>1){var I="DummyCompound_"+O;s.memberGroups[I]=E[O];var V=E[O][0].getParent(),$=new v(s.graphManager);$.id=I,$.paddingLeft=V.paddingLeft||0,$.paddingRight=V.paddingRight||0,$.paddingBottom=V.paddingBottom||0,$.paddingTop=V.paddingTop||0,s.idToDummyNode[I]=$;var et=s.getGraphManager().add(s.newGraph(),$),K=V.getChild();K.add($);for(var G=0;G<E[O].length;G++){var F=E[O][G];K.remove(F),et.add(F)}}})},x.prototype.clearCompounds=function(){var s={},E={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)E[this.compoundOrder[u].id]=this.compoundOrder[u],s[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(s,E)},x.prototype.clearZeroDegreeMembers=function(){var s=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var m=s.idToDummyNode[u];if(E[u]=s.tileNodes(s.memberGroups[u],m.paddingLeft+m.paddingRight),m.rect.width=E[u].width,m.rect.height=E[u].height,m.setCenter(E[u].centerX,E[u].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,r.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,C=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(C+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>C?(m.rect.y-=(m.labelHeight-C)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-C)/2):m.labelPosVertical=="bottom"&&m.setHeight(C+m.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var E=this.compoundOrder[s],u=E.id,m=E.paddingLeft,y=E.paddingTop,C=E.labelMarginLeft,M=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],E.rect.x,E.rect.y,m,y,C,M)}},x.prototype.repopulateZeroDegreeMembers=function(){var s=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(u){var m=s.idToDummyNode[u],y=m.paddingLeft,C=m.paddingTop,M=m.labelMarginLeft,b=m.labelMarginTop;s.adjustLocations(E[u],m.rect.x,m.rect.y,y,C,M,b)})},x.prototype.getToBeTiled=function(s){var E=s.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var u=s.getChild();if(u==null)return this.toBeTiled[E]=!1,!1;for(var m=u.getNodes(),y=0;y<m.length;y++){var C=m[y];if(this.getNodeDegree(C)>0)return this.toBeTiled[E]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},x.prototype.getNodeDegree=function(s){s.id;for(var E=s.getEdges(),u=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(u=u+1)}return u},x.prototype.getNodeDegreeWithChildren=function(s){var E=this.getNodeDegree(s);if(s.getChild()==null)return E;for(var u=s.getChild().getNodes(),m=0;m<u.length;m++){var y=u[m];E+=this.getNodeDegreeWithChildren(y)}return E},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(s){for(var E=0;E<s.length;E++){var u=s[E];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(s,E,u,m,y,C,M){E+=m+C,u+=y+M;for(var b=E,O=0;O<s.rows.length;O++){var I=s.rows[O];E=b;for(var V=0,$=0;$<I.length;$++){var et=I[$];et.rect.x=E,et.rect.y=u,E+=et.rect.width+s.horizontalPadding,et.rect.height>V&&(V=et.rect.height)}u+=V+s.verticalPadding}},x.prototype.tileCompoundMembers=function(s,E){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(m){var y=E[m];if(u.tiledMemberPack[m]=u.tileNodes(s[m],y.paddingLeft+y.paddingRight),y.rect.width=u.tiledMemberPack[m].width,y.rect.height=u.tiledMemberPack[m].height,y.setCenter(u.tiledMemberPack[m].centerX,u.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,r.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(s,E){var u=this.tileNodesByFavoringDim(s,E,!0),m=this.tileNodesByFavoringDim(s,E,!1),y=this.getOrgRatio(u),C=this.getOrgRatio(m),M;return C<y?M=m:M=u,M},x.prototype.getOrgRatio=function(s){var E=s.width/s.height;return E<1&&(E=1/E),E},x.prototype.calcIdealRowWidth=function(s,E){var u=r.TILING_PADDING_VERTICAL,m=r.TILING_PADDING_HORIZONTAL,y=s.length,C=0,M=0,b=0;s.forEach(function(G){C+=G.getWidth(),M+=G.getHeight(),G.getWidth()>b&&(b=G.getWidth())});var O=C/y,I=M/y,V=Math.pow(u-m,2)+4*(O+m)*(I+u)*y,$=(m-u+Math.sqrt(V))/(2*(O+m)),et;E?(et=Math.ceil($),et==$&&et++):et=Math.floor($);var K=et*(O+m)-m;return b>K&&(K=b),K+=m*2,K},x.prototype.tileNodesByFavoringDim=function(s,E,u){var m=r.TILING_PADDING_VERTICAL,y=r.TILING_PADDING_HORIZONTAL,C=r.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};C&&(M.idealRowWidth=this.calcIdealRowWidth(s,u));var b=function(F){return F.rect.width*F.rect.height},O=function(F,Y){return b(Y)-b(F)};s.sort(function(G,F){var Y=O;return M.idealRowWidth?(Y=C,Y(G.id,F.id)):Y(G,F)});for(var I=0,V=0,$=0;$<s.length;$++){var et=s[$];I+=et.getCenterX(),V+=et.getCenterY()}M.centerX=I/s.length,M.centerY=V/s.length;for(var $=0;$<s.length;$++){var et=s[$];if(M.rows.length==0)this.insertNodeToRow(M,et,0,E);else if(this.canAddHorizontal(M,et.rect.width,et.rect.height)){var K=M.rows.length-1;M.idealRowWidth||(K=this.getShortestRowIndex(M)),this.insertNodeToRow(M,et,K,E)}else this.insertNodeToRow(M,et,M.rows.length,E);this.shiftToLastRow(M)}return M},x.prototype.insertNodeToRow=function(s,E,u,m){var y=m;u==s.rows.length&&(s.rows.push([]),s.rowWidth.push(y),s.rowHeight.push(0));var C=s.rowWidth[u]+E.rect.width;s.rows[u].length>0&&(C+=s.horizontalPadding),s.rowWidth[u]=C,s.width<C&&(s.width=C);var M=E.rect.height;u>0&&(M+=s.verticalPadding);var b=0;M>s.rowHeight[u]&&(b=s.rowHeight[u],s.rowHeight[u]=M,b=s.rowHeight[u]-b),s.height+=b,s.rows[u].push(E)},x.prototype.getShortestRowIndex=function(s){for(var E=-1,u=Number.MAX_VALUE,m=0;m<s.rows.length;m++)s.rowWidth[m]<u&&(E=m,u=s.rowWidth[m]);return E},x.prototype.getLongestRowIndex=function(s){for(var E=-1,u=Number.MIN_VALUE,m=0;m<s.rows.length;m++)s.rowWidth[m]>u&&(E=m,u=s.rowWidth[m]);return E},x.prototype.canAddHorizontal=function(s,E,u){if(s.idealRowWidth){var m=s.rows.length-1;return s.rowWidth[m]+E+s.horizontalPadding<=s.idealRowWidth}var y=this.getShortestRowIndex(s);if(y<0)return!0;var C=s.rowWidth[y];if(C+s.horizontalPadding+E<=s.width)return!0;var M=0;s.rowHeight[y]<u&&y>0&&(M=u+s.verticalPadding-s.rowHeight[y]);var b;s.width-C>=E+s.horizontalPadding?b=(s.height+M)/(C+E+s.horizontalPadding):b=(s.height+M)/s.width,M=u+s.verticalPadding;var O;return s.width<E?O=(s.height+M)/E:O=(s.height+M)/s.width,O<1&&(O=1/O),b<1&&(b=1/b),b<O},x.prototype.shiftToLastRow=function(s){var E=this.getLongestRowIndex(s),u=s.rowWidth.length-1,m=s.rows[E],y=m[m.length-1],C=y.width+s.horizontalPadding;if(s.width-s.rowWidth[u]>C&&E!=u){m.splice(-1,1),s.rows[u].push(y),s.rowWidth[E]=s.rowWidth[E]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var M=Number.MIN_VALUE,b=0;b<m.length;b++)m[b].height>M&&(M=m[b].height);E>0&&(M+=s.verticalPadding);var O=s.rowHeight[E]+s.rowHeight[u];s.rowHeight[E]=M,s.rowHeight[u]<y.height+s.verticalPadding&&(s.rowHeight[u]=y.height+s.verticalPadding);var I=s.rowHeight[E]+s.rowHeight[u];s.height+=I-O,this.shiftToLastRow(s)}},x.prototype.tilingPreLayout=function(){r.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){r.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var s=[],E=!0,u;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var C=0;C<m.length;C++)if(u=m[C],u.getEdges().length==1&&!u.getEdges()[0].isInterGraph&&u.getChild()==null){if(r.PURE_INCREMENTAL){var M=u.getEdges()[0].getOtherEnd(u),b=new T(u.getCenterX()-M.getCenterX(),u.getCenterY()-M.getCenterY());y.push([u,u.getEdges()[0],u.getOwner(),b])}else y.push([u,u.getEdges()[0],u.getOwner()]);E=!0}if(E==!0){for(var O=[],I=0;I<y.length;I++)y[I][0].getEdges().length==1&&(O.push(y[I]),y[I][0].getOwner().remove(y[I][0]));s.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},x.prototype.growTree=function(s){for(var E=s[s.length-1],u,m=0;m<E.length;m++)u=E[m],this.findPlaceforPrunedNode(u),u[2].add(u[0]),u[2].add(u[1],u[1].source,u[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(s){var E,u,m=s[0];if(m==s[1].source?u=s[1].target:u=s[1].source,r.PURE_INCREMENTAL)m.setCenter(u.getCenterX()+s[3].getWidth(),u.getCenterY()+s[3].getHeight());else{var y=u.startX,C=u.finishX,M=u.startY,b=u.finishY,O=[0,0,0,0];if(M>0)for(var I=y;I<=C;I++)O[0]+=this.grid[I][M-1].length+this.grid[I][M].length-1;if(C<this.grid.length-1)for(var I=M;I<=b;I++)O[1]+=this.grid[C+1][I].length+this.grid[C][I].length-1;if(b<this.grid[0].length-1)for(var I=y;I<=C;I++)O[2]+=this.grid[I][b+1].length+this.grid[I][b].length-1;if(y>0)for(var I=M;I<=b;I++)O[3]+=this.grid[y-1][I].length+this.grid[y][I].length-1;for(var V=R.MAX_VALUE,$,et,K=0;K<O.length;K++)O[K]<V?(V=O[K],$=1,et=K):O[K]==V&&$++;if($==3&&V==0)O[0]==0&&O[1]==0&&O[2]==0?E=1:O[0]==0&&O[1]==0&&O[3]==0?E=0:O[0]==0&&O[2]==0&&O[3]==0?E=3:O[1]==0&&O[2]==0&&O[3]==0&&(E=2);else if($==2&&V==0){var G=Math.floor(Math.random()*2);O[0]==0&&O[1]==0?G==0?E=0:E=1:O[0]==0&&O[2]==0?G==0?E=0:E=2:O[0]==0&&O[3]==0?G==0?E=0:E=3:O[1]==0&&O[2]==0?G==0?E=1:E=2:O[1]==0&&O[3]==0?G==0?E=1:E=3:G==0?E=2:E=3}else if($==4&&V==0){var G=Math.floor(Math.random()*4);E=G}else E=et;E==0?m.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,u.getCenterY()):E==2?m.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,u.getCenterY())}},o.exports=x}),991:((o,a,t)=>{var e=t(551).FDLayoutNode,h=t(551).IMath;function i(n,r,f,l){e.call(this,n,r,f,l)}i.prototype=Object.create(e.prototype);for(var v in e)i[v]=e[v];i.prototype.calculateDisplacement=function(){var n=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=n.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=n.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=n.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=n.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>n.coolingFactor*n.maxNodeDisplacement&&(this.displacementX=n.coolingFactor*n.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>n.coolingFactor*n.maxNodeDisplacement&&(this.displacementY=n.coolingFactor*n.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(n,r){for(var f=this.getChild().getNodes(),l,p=0;p<f.length;p++)l=f[p],l.getChild()==null?(l.displacementX+=n,l.displacementY+=r):l.propogateDisplacementToChildren(n,r)},i.prototype.move=function(){var n=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),n.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},i.prototype.setPred1=function(n){this.pred1=n},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(n){this.next=n},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(n){this.processed=n},i.prototype.isProcessed=function(){return processed},o.exports=i}),902:((o,a,t)=>{function e(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),i=t(551).LinkedList,v=t(551).Matrix,n=t(551).SVD;function r(){}r.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=[],w=f.getAllNodes(),R=0,S=0;S<w.length;S++){var P=w[S];P.getChild()==null&&(g.set(P.id,R++),c.push(P.getCenterX()),T.push(P.getCenterY()),p.set(P.id,P))}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,z){return{x:H.x-z.x,y:H.y-z.y}},B=function(H){var z=0,_=0;return H.forEach(function(Q){z+=c[g.get(Q)],_+=T[g.get(Q)]}),{x:z/H.size,y:_/H.size}},x=function(H,z,_,Q,j){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 ft=new Map;H.forEach(function(st,nt){ft.set(nt,0)}),H.forEach(function(st,nt){st.forEach(function(ht){ft.set(ht.id,ft.get(ht.id)+1)})});var rt=new Map,dt=new Map,Lt=new i;ft.forEach(function(st,nt){st==0?(Lt.push(nt),_||(z=="horizontal"?rt.set(nt,g.has(nt)?c[g.get(nt)]:Q.get(nt)):rt.set(nt,g.has(nt)?T[g.get(nt)]:Q.get(nt)))):rt.set(nt,Number.NEGATIVE_INFINITY),_&&dt.set(nt,new Set([nt]))}),_&&j.forEach(function(st){var nt=[];if(st.forEach(function(ut){_.has(ut)&&nt.push(ut)}),nt.length>0){var ht=0;nt.forEach(function(ut){z=="horizontal"?(rt.set(ut,g.has(ut)?c[g.get(ut)]:Q.get(ut)),ht+=rt.get(ut)):(rt.set(ut,g.has(ut)?T[g.get(ut)]:Q.get(ut)),ht+=rt.get(ut))}),ht=ht/nt.length,st.forEach(function(ut){_.has(ut)||rt.set(ut,ht)})}else{var yt=0;st.forEach(function(ut){z=="horizontal"?yt+=g.has(ut)?c[g.get(ut)]:Q.get(ut):yt+=g.has(ut)?T[g.get(ut)]:Q.get(ut)}),yt=yt/st.length,st.forEach(function(ut){rt.set(ut,yt)})}});for(var wt=function(){var nt=Lt.shift();H.get(nt).forEach(function(ht){if(rt.get(ht.id)<rt.get(nt)+ht.gap)if(_&&_.has(ht.id)){var yt=void 0;if(z=="horizontal"?yt=g.has(ht.id)?c[g.get(ht.id)]:Q.get(ht.id):yt=g.has(ht.id)?T[g.get(ht.id)]:Q.get(ht.id),rt.set(ht.id,yt),yt<rt.get(nt)+ht.gap){var ut=rt.get(nt)+ht.gap-yt;dt.get(nt).forEach(function(Rt){rt.set(Rt,rt.get(Rt)-ut)})}}else rt.set(ht.id,rt.get(nt)+ht.gap);ft.set(ht.id,ft.get(ht.id)-1),ft.get(ht.id)==0&&Lt.push(ht.id),_&&dt.set(ht.id,pt(dt.get(nt),dt.get(ht.id)))})};Lt.length!=0;)wt();if(_){var tt=new Set;H.forEach(function(st,nt){st.length==0&&tt.add(nt)});var Nt=[];dt.forEach(function(st,nt){if(tt.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;_.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,Ht=void 0;Nt.forEach(function(St,Ut){St.has([].concat(e(st))[0])&&(Tt=!0,Ht=Ut)}),Tt?st.forEach(function(St){Nt[Ht].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](),Ht;!(It=(Ht=Tt.next()).done);It=!0){var St=Ht.value,Ut=void 0;z=="horizontal"?Ut=g.has(St)?c[g.get(St)]:Q.get(St):Ut=g.has(St)?T[g.get(St)]:Q.get(St);var jt=rt.get(St);Ut<ht&&(ht=Ut),Ut>ut&&(ut=Ut),jt<yt&&(yt=jt),jt>Rt&&(Rt=jt)}}catch(re){bt=!0,Ot=re}finally{try{!It&&Tt.return&&Tt.return()}finally{if(bt)throw Ot}}var he=(ht+ut)/2-(yt+Rt)/2,Qt=!0,_t=!1,te=void 0;try{for(var qt=st[Symbol.iterator](),ne;!(Qt=(ne=qt.next()).done);Qt=!0){var ee=ne.value;rt.set(ee,rt.get(ee)+he)}}catch(re){_t=!0,te=re}finally{try{!Qt&&qt.return&&qt.return()}finally{if(_t)throw te}}})}return rt},it=function(H){var z=0,_=0,Q=0,j=0;if(H.forEach(function(dt){dt.left?c[g.get(dt.left)]-c[g.get(dt.right)]>=0?z++:_++:T[g.get(dt.top)]-T[g.get(dt.bottom)]>=0?Q++:j++}),z>_&&Q>j)for(var pt=0;pt<g.size;pt++)c[pt]=-1*c[pt],T[pt]=-1*T[pt];else if(z>_)for(var ft=0;ft<g.size;ft++)c[ft]=-1*c[ft];else if(Q>j)for(var rt=0;rt<g.size;rt++)T[rt]=-1*T[rt]},s=function(H){var z=[],_=new i,Q=new Set,j=0;return H.forEach(function(pt,ft){if(!Q.has(ft)){z[j]=[];var rt=ft;for(_.push(rt),Q.add(rt),z[j].push(rt);_.length!=0;)rt=_.shift(),H.get(rt).forEach(function(dt){Q.has(dt.id)||(_.push(dt.id),Q.add(dt.id),z[j].push(dt.id))});j++}}),z},E=function(H){var z=new Map;return H.forEach(function(_,Q){z.set(Q,[])}),H.forEach(function(_,Q){_.forEach(function(j){z.get(Q).push(j),z.get(j.id).push({id:Q,gap:j.gap,direction:j.direction})})}),z},u=function(H){var z=new Map;return H.forEach(function(_,Q){z.set(Q,[])}),H.forEach(function(_,Q){_.forEach(function(j){z.get(j.id).push({id:Q,gap:j.gap,direction:j.direction})})}),z},m=[],y=[],C=!1,M=!1,b=new Set,O=new Map,I=new Map,V=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(D){b.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,[]))}),I=E(O),V=s(I)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(D,H){m[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,z=function(rt){var dt=new Set;H[rt].forEach(function(tt){dt.add(tt)});var Lt=new Set([].concat(e(dt)).filter(function(tt){return b.has(tt)})),wt=void 0;Lt.size>0?wt=c[g.get(Lt.values().next().value)]:wt=B(dt).x,H[rt].forEach(function(tt){m[D]=[wt,T[g.get(tt)]],y[D]=[c[g.get(tt)],T[g.get(tt)]],D++})},_=0;_<H.length;_++)z(_);C=!0}if(l.alignmentConstraint.horizontal){for(var Q=l.alignmentConstraint.horizontal,j=function(rt){var dt=new Set;Q[rt].forEach(function(tt){dt.add(tt)});var Lt=new Set([].concat(e(dt)).filter(function(tt){return b.has(tt)})),wt=void 0;Lt.size>0?wt=c[g.get(Lt.values().next().value)]:wt=B(dt).y,Q[rt].forEach(function(tt){m[D]=[c[g.get(tt)],wt],y[D]=[c[g.get(tt)],T[g.get(tt)]],D++})},pt=0;pt<Q.length;pt++)j(pt);C=!0}l.relativePlacementConstraint&&(M=!0)})();else if(l.relativePlacementConstraint){for(var $=0,et=0,K=0;K<V.length;K++)V[K].length>$&&($=V[K].length,et=K);if($<I.size/2)it(l.relativePlacementConstraint),C=!1,M=!1;else{var G=new Map,F=new Map,Y=[];V[et].forEach(function(D){O.get(D).forEach(function(H){H.direction=="horizontal"?(G.has(D)?G.get(D).push(H):G.set(D,[H]),G.has(H.id)||G.set(H.id,[]),Y.push({left:D,right:H.id})):(F.has(D)?F.get(D).push(H):F.set(D,[H]),F.has(H.id)||F.set(H.id,[]),Y.push({top:D,bottom:H.id}))})}),it(Y),M=!1;var J=x(G,"horizontal"),at=x(F,"vertical");V[et].forEach(function(D,H){y[H]=[c[g.get(D)],T[g.get(D)]],m[H]=[],J.has(D)?m[H][0]=J.get(D):m[H][0]=c[g.get(D)],at.has(D)?m[H][1]=at.get(D):m[H][1]=T[g.get(D)]}),C=!0}}if(C){for(var q=void 0,Z=v.transpose(m),mt=v.transpose(y),lt=0;lt<Z.length;lt++)Z[lt]=v.multGamma(Z[lt]),mt[lt]=v.multGamma(mt[lt]);var k=v.multMat(Z,v.transpose(mt)),Et=n.svd(k);q=v.multMat(Et.V,v.transpose(Et.U));for(var ot=0;ot<g.size;ot++){var Ct=[c[ot],T[ot]],Vt=[q[0][0],q[1][0]],Dt=[q[0][1],q[1][1]];c[ot]=v.dotProduct(Ct,Vt),T[ot]=v.dotProduct(Ct,Dt)}M&&it(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 z={x:c[g.get(D.nodeId)],y:T[g.get(D.nodeId)]},_=D.position,Q=W(_,z);xt.x+=Q.x,xt.y+=Q.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,Wt=function(H){var z=new Set;Gt[H].forEach(function(j){z.add(j)});var _=new Set([].concat(e(z)).filter(function(j){return b.has(j)})),Q=void 0;_.size>0?Q=c[g.get(_.values().next().value)]:Q=B(z).x,z.forEach(function(j){b.has(j)||(c[g.get(j)]=Q)})},Ft=0;Ft<Gt.length;Ft++)Wt(Ft);if(l.alignmentConstraint.horizontal)for(var $t=l.alignmentConstraint.horizontal,Xt=function(H){var z=new Set;$t[H].forEach(function(j){z.add(j)});var _=new Set([].concat(e(z)).filter(function(j){return b.has(j)})),Q=void 0;_.size>0?Q=T[g.get(_.values().next().value)]:Q=B(z).y,z.forEach(function(j){b.has(j)||(T[g.get(j)]=Q)})},Bt=0;Bt<$t.length;Bt++)Xt(Bt)}l.relativePlacementConstraint&&(function(){var D=new Map,H=new Map,z=new Map,_=new Map,Q=new Map,j=new Map,pt=new Set,ft=new Set;if(b.forEach(function(Pt){pt.add(Pt),ft.add(Pt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var rt=l.alignmentConstraint.vertical,dt=function(vt){z.set("dummy"+vt,[]),rt[vt].forEach(function(Mt){D.set(Mt,"dummy"+vt),z.get("dummy"+vt).push(Mt),b.has(Mt)&&pt.add("dummy"+vt)}),Q.set("dummy"+vt,c[g.get(rt[vt][0])])},Lt=0;Lt<rt.length;Lt++)dt(Lt);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,tt=function(vt){_.set("dummy"+vt,[]),wt[vt].forEach(function(Mt){H.set(Mt,"dummy"+vt),_.get("dummy"+vt).push(Mt),b.has(Mt)&&ft.add("dummy"+vt)}),j.set("dummy"+vt,T[g.get(wt[vt][0])])},Nt=0;Nt<wt.length;Nt++)tt(Nt)}var st=new Map,nt=new Map,ht=function(vt){O.get(vt).forEach(function(Mt){var kt=void 0,zt=void 0;Mt.direction=="horizontal"?(kt=D.get(vt)?D.get(vt):vt,D.get(Mt.id)?zt={id:D.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:zt=Mt,st.has(kt)?st.get(kt).push(zt):st.set(kt,[zt]),st.has(zt.id)||st.set(zt.id,[])):(kt=H.get(vt)?H.get(vt):vt,H.get(Mt.id)?zt={id:H.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:zt=Mt,nt.has(kt)?nt.get(kt).push(zt):nt.set(kt,[zt]),nt.has(zt.id)||nt.set(zt.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=E(st),Ht=E(nt),St=s(Tt),Ut=s(Ht),jt=u(st),he=u(nt),Qt=[],_t=[];St.forEach(function(Pt,vt){Qt[vt]=[],Pt.forEach(function(Mt){jt.get(Mt).length==0&&Qt[vt].push(Mt)})}),Ut.forEach(function(Pt,vt){_t[vt]=[],Pt.forEach(function(Mt){he.get(Mt).length==0&&_t[vt].push(Mt)})});var te=x(st,"horizontal",pt,Q,Qt),qt=x(nt,"vertical",ft,j,_t),ne=function(vt){z.get(vt)?z.get(vt).forEach(function(Mt){c[g.get(Mt)]=te.get(vt)}):c[g.get(vt)]=te.get(vt)},ee=!0,re=!1,Ae=void 0;try{for(var le=te.keys()[Symbol.iterator](),Me;!(ee=(Me=le.next()).done);ee=!0){var fe=Me.value;ne(fe)}}catch(Pt){re=!0,Ae=Pt}finally{try{!ee&&le.return&&le.return()}finally{if(re)throw Ae}}var ir=function(vt){_.get(vt)?_.get(vt).forEach(function(Mt){T[g.get(Mt)]=qt.get(vt)}):T[g.get(vt)]=qt.get(vt)},ce=!0,we=!1,Oe=void 0;try{for(var ge=qt.keys()[Symbol.iterator](),De;!(ce=(De=ge.next()).done);ce=!0){var fe=De.value;ir(fe)}}catch(Pt){we=!0,Oe=Pt}finally{try{!ce&&ge.return&&ge.return()}finally{if(we)throw Oe}}})()}for(var At=0;At<w.length;At++){var gt=w[At];gt.getChild()==null&>.setCenter(c[g.get(gt.id)],T[g.get(gt.id)])}},o.exports=r}),551:(o=>{o.exports=A})},N={};function d(o){var a=N[o];if(a!==void 0)return a.exports;var t=N[o]={exports:{}};return X[o](t,t.exports,d),t.exports}return d(45)})()})})),br=Ce(((L,U)=>{(function(X,N){typeof L=="object"&&typeof U=="object"?U.exports=N(Ie()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof L=="object"?L.cytoscapeFcose=N(Ie()):X.cytoscapeFcose=N(X.coseBase)})(L,function(A){return(()=>{"use strict";var X={658:(o=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(a){for(var t=arguments.length,e=Array(t>1?t-1:0),h=1;h<t;h++)e[h-1]=arguments[h];return e.forEach(function(i){Object.keys(i).forEach(function(v){return a[v]=i[v]})}),a}}),548:((o,a,t)=>{var e=(function(){function v(n,r){var f=[],l=!0,p=!1,g=void 0;try{for(var c=n[Symbol.iterator](),T;!(l=(T=c.next()).done)&&(f.push(T.value),!(r&&f.length===r));l=!0);}catch(w){p=!0,g=w}finally{try{!l&&c.return&&c.return()}finally{if(p)throw g}}return f}return function(n,r){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return v(n,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=t(140).layoutBase.LinkedList,i={};i.getTopMostNodes=function(v){for(var n={},r=0;r<v.length;r++)n[v[r].id()]=!0;return v.filter(function(f,l){typeof f=="number"&&(f=l);for(var p=f.parent()[0];p!=null;){if(n[p.id()])return!1;p=p.parent()[0]}return!0})},i.connectComponents=function(v,n,r,f){var l=new h,p=new Set,g=[],c=void 0,T=void 0,w=void 0,R=!1,S=1,P=[],W=[],B=function(){var it=v.collection();W.push(it);var s=r[0],E=v.collection();E.merge(s).merge(s.descendants().intersection(n)),g.push(s),E.forEach(function(y){l.push(y),p.add(y),it.merge(y)});for(var u=function(){s=l.shift();var C=v.collection();s.neighborhood().nodes().forEach(function(O){n.intersection(s.edgesWith(O)).length>0&&C.merge(O)});for(var M=0;M<C.length;M++){var b=C[M];c=r.intersection(b.union(b.ancestors())),c!=null&&!p.has(c[0])&&c.union(c.descendants()).forEach(function(O){l.push(O),p.add(O),it.merge(O),r.has(O)&&g.push(O)})}};l.length!=0;)u();if(it.forEach(function(y){n.intersection(y.connectedEdges()).forEach(function(C){it.has(C.source())&&it.has(C.target())&&it.merge(C)})}),g.length==r.length&&(R=!0),!R||R&&S>1){T=g[0],w=T.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<w&&(w=y.connectedEdges().length,T=y)}),P.push(T.id());var m=v.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],r=r.difference(m),S++}};do B();while(!R);return f&&P.length>0&&f.set("dummy"+(f.size+1),P),W},i.relocateComponent=function(v,n,r){if(!r.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(r.quality=="draft"){var c=!0,T=!1,w=void 0;try{for(var R=n.nodeIndexes[Symbol.iterator](),S;!(c=(S=R.next()).done);c=!0){var P=S.value,W=e(P,2),B=W[0],x=W[1],it=r.cy.getElementById(B);if(it){var s=it.boundingBox(),E=n.xCoords[x]-s.w/2,u=n.xCoords[x]+s.w/2,m=n.yCoords[x]-s.h/2,y=n.yCoords[x]+s.h/2;E<f&&(f=E),u>l&&(l=u),m<p&&(p=m),y>g&&(g=y)}}}catch(I){T=!0,w=I}finally{try{!c&&R.return&&R.return()}finally{if(T)throw w}}var C=v.x-(l+f)/2,M=v.y-(g+p)/2;n.xCoords=n.xCoords.map(function(I){return I+C}),n.yCoords=n.yCoords.map(function(I){return I+M})}else{Object.keys(n).forEach(function(I){var V=n[I],$=V.getRect().x,et=V.getRect().x+V.getRect().width,K=V.getRect().y,G=V.getRect().y+V.getRect().height;$<f&&(f=$),et>l&&(l=et),K<p&&(p=K),G>g&&(g=G)});var b=v.x-(l+f)/2,O=v.y-(g+p)/2;Object.keys(n).forEach(function(I){var V=n[I];V.setCenter(V.getCenterX()+b,V.getCenterY()+O)})}}},i.calcBoundingBox=function(v,n,r,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,w=void 0,R=void 0,S=void 0,P=v.descendants().not(":parent"),W=P.length,B=0;B<W;B++){var x=P[B];T=n[f.get(x.id())]-x.width()/2,w=n[f.get(x.id())]+x.width()/2,R=r[f.get(x.id())]-x.height()/2,S=r[f.get(x.id())]+x.height()/2,l>T&&(l=T),p<w&&(p=w),g>R&&(g=R),c<S&&(c=S)}var it={};return it.topLeftX=l,it.topLeftY=g,it.width=p-l,it.height=c-g,it},i.calcParentsWithoutChildren=function(v,n){var r=v.collection();return n.nodes(":parent").forEach(function(f){var l=!1;f.children().forEach(function(p){p.css("display")!="none"&&(l=!0)}),l||r.merge(f)}),r},o.exports=i}),816:((o,a,t)=>{var e=t(548),h=t(140).CoSELayout,i=t(140).CoSENode,v=t(140).layoutBase.PointD,n=t(140).layoutBase.DimensionD,r=t(140).layoutBase.LayoutConstants,f=t(140).layoutBase.FDLayoutConstants,l=t(140).CoSEConstants;o.exports={coseLayout:function(g,c){var T=g.cy,w=g.eles,R=w.nodes(),S=w.edges(),P=void 0,W=void 0,B=void 0,x={};g.randomize&&(P=c.nodeIndexes,W=c.xCoords,B=c.yCoords);var it=function(O){return typeof O=="function"},s=function(O,I){return it(O)?O(I):O},E=e.calcParentsWithoutChildren(T,w),u=function b(O,I,V,$){for(var et=I.length,K=0;K<et;K++){var G=I[K],F=null;G.intersection(E).length==0&&(F=G.children());var Y=void 0,J=G.layoutDimensions({nodeDimensionsIncludeLabels:$.nodeDimensionsIncludeLabels});if(G.outerWidth()!=null&&G.outerHeight()!=null)if($.randomize)if(!G.isParent())Y=O.add(new i(V.graphManager,new v(W[P.get(G.id())]-J.w/2,B[P.get(G.id())]-J.h/2),new n(parseFloat(J.w),parseFloat(J.h))));else{var at=e.calcBoundingBox(G,W,B,P);G.intersection(E).length==0?Y=O.add(new i(V.graphManager,new v(at.topLeftX,at.topLeftY),new n(at.width,at.height))):Y=O.add(new i(V.graphManager,new v(at.topLeftX,at.topLeftY),new n(parseFloat(J.w),parseFloat(J.h))))}else Y=O.add(new i(V.graphManager,new v(G.position("x")-J.w/2,G.position("y")-J.h/2),new n(parseFloat(J.w),parseFloat(J.h))));else Y=O.add(new i(this.graphManager));if(Y.id=G.data("id"),Y.nodeRepulsion=s($.nodeRepulsion,G),Y.paddingLeft=parseInt(G.css("padding")),Y.paddingTop=parseInt(G.css("padding")),Y.paddingRight=parseInt(G.css("padding")),Y.paddingBottom=parseInt(G.css("padding")),$.nodeDimensionsIncludeLabels&&(Y.labelWidth=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,Y.labelHeight=G.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,Y.labelPosVertical=G.css("text-valign"),Y.labelPosHorizontal=G.css("text-halign")),x[G.data("id")]=Y,isNaN(Y.rect.x)&&(Y.rect.x=0),isNaN(Y.rect.y)&&(Y.rect.y=0),F!=null&&F.length>0){var q=void 0;q=V.getGraphManager().add(V.newGraph(),Y),b(q,F,V,$)}}},m=function(O,I,V){for(var $=0,et=0,K=0;K<V.length;K++){var G=V[K],F=x[G.data("source")],Y=x[G.data("target")];if(F&&Y&&F!==Y&&F.getEdgesBetween(Y).length==0){var J=I.add(O.newEdge(),F,Y);J.id=G.id(),J.idealLength=s(g.idealEdgeLength,G),J.edgeElasticity=s(g.edgeElasticity,G),$+=J.idealLength,et++}}g.idealEdgeLength!=null&&(et>0?l.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=$/et:it(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,I){I.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=I.fixedNodeConstraint),I.alignmentConstraint&&(O.constraints.alignmentConstraint=I.alignmentConstraint),I.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=I.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"?r.QUALITY=2:r.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!g.randomize,l.ANIMATE=f.ANIMATE=r.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=r.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!g.randomize,r.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(),e.getTopMostNodes(R),C,g),m(C,M,S),y(C,g),C.runLayout(),x}}}),212:((o,a,t)=>{var e=(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 i=t(658),v=t(548),n=t(657).spectralLayout,r=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(){}});o.exports=(function(){function l(p){h(this,l),this.options=i({},f,p)}return e(l,[{key:"run",value:function(){var g=this,c=this.options,T=c.cy,w=c.eles,R=[],S=[],P=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 B=void 0,x=!1;if(T.layoutUtilities&&c.packComponents&&(B=T.layoutUtilities("get"),B||(B=T.layoutUtilities()),x=!0),w.nodes().length>0)if(x){var E=v.getTopMostNodes(c.eles.nodes());if(P=v.connectComponents(T,c.eles,E),P.forEach(function(q){var Z=q.boundingBox();W.push({x:Z.x1+Z.w/2,y:Z.y1+Z.h/2})}),c.randomize&&P.forEach(function(q){c.eles=q,R.push(n(c))}),c.quality=="default"||c.quality=="proof"){var u=T.collection();if(c.tile){var m=new Map,y=[],C=[],M=0,b={nodeIndexes:m,xCoords:y,yCoords:C},O=[];if(P.forEach(function(q,Z){q.edges().length==0&&(q.nodes().forEach(function(mt,lt){u.merge(q.nodes()[lt]),mt.isParent()||(b.nodeIndexes.set(q.nodes()[lt].id(),M++),b.xCoords.push(q.nodes()[0].position().x),b.yCoords.push(q.nodes()[0].position().y))}),O.push(Z))}),u.length>1){var I=u.boundingBox();W.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),P.push(u),R.push(b);for(var V=O.length-1;V>=0;V--)P.splice(O[V],1),R.splice(O[V],1),W.splice(O[V],1)}}P.forEach(function(q,Z){c.eles=q,S.push(r(c,R[Z])),v.relocateComponent(W[Z],S[Z],c)})}else P.forEach(function(q,Z){v.relocateComponent(W[Z],R[Z],c)});var $=new Set;if(P.length>1){var et=[],K=w.filter(function(q){return q.css("display")=="none"});P.forEach(function(q,Z){var mt=void 0;if(c.quality=="draft"&&(mt=R[Z].nodeIndexes),q.nodes().not(K).length>0){var lt={};lt.edges=[],lt.nodes=[];var k=void 0;q.nodes().not(K).forEach(function(Et){if(c.quality=="draft")if(!Et.isParent())k=mt.get(Et.id()),lt.nodes.push({x:R[Z].xCoords[k]-Et.boundingbox().w/2,y:R[Z].yCoords[k]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var ot=v.calcBoundingBox(Et,R[Z].xCoords,R[Z].yCoords,mt);lt.nodes.push({x:ot.topLeftX,y:ot.topLeftY,width:ot.width,height:ot.height})}else S[Z][Et.id()]&<.nodes.push({x:S[Z][Et.id()].getLeft(),y:S[Z][Et.id()].getTop(),width:S[Z][Et.id()].getWidth(),height:S[Z][Et.id()].getHeight()})}),q.edges().forEach(function(Et){var ot=Et.source(),Ct=Et.target();if(ot.css("display")!="none"&&Ct.css("display")!="none")if(c.quality=="draft"){var Vt=mt.get(ot.id()),Dt=mt.get(Ct.id()),xt=[],Gt=[];if(ot.isParent()){var Wt=v.calcBoundingBox(ot,R[Z].xCoords,R[Z].yCoords,mt);xt.push(Wt.topLeftX+Wt.width/2),xt.push(Wt.topLeftY+Wt.height/2)}else xt.push(R[Z].xCoords[Vt]),xt.push(R[Z].yCoords[Vt]);if(Ct.isParent()){var Ft=v.calcBoundingBox(Ct,R[Z].xCoords,R[Z].yCoords,mt);Gt.push(Ft.topLeftX+Ft.width/2),Gt.push(Ft.topLeftY+Ft.height/2)}else Gt.push(R[Z].xCoords[Dt]),Gt.push(R[Z].yCoords[Dt]);lt.edges.push({startX:xt[0],startY:xt[1],endX:Gt[0],endY:Gt[1]})}else S[Z][ot.id()]&&S[Z][Ct.id()]&<.edges.push({startX:S[Z][ot.id()].getCenterX(),startY:S[Z][ot.id()].getCenterY(),endX:S[Z][Ct.id()].getCenterX(),endY:S[Z][Ct.id()].getCenterY()})}),lt.nodes.length>0&&(et.push(lt),$.add(Z))}});var G=B.packComponents(et,c.randomize).shifts;if(c.quality=="draft")R.forEach(function(q,Z){var mt=q.xCoords.map(function(k){return k+G[Z].dx}),lt=q.yCoords.map(function(k){return k+G[Z].dy});q.xCoords=mt,q.yCoords=lt});else{var F=0;$.forEach(function(q){Object.keys(S[q]).forEach(function(Z){var mt=S[q][Z];mt.setCenter(mt.getCenterX()+G[F].dx,mt.getCenterY()+G[F].dy)}),F++})}}}else{var it=c.eles.boundingBox();if(W.push({x:it.x1+it.w/2,y:it.y1+it.h/2}),c.randomize){var s=n(c);R.push(s)}c.quality=="default"||c.quality=="proof"?(S.push(r(c,R[0])),v.relocateComponent(W[0],S[0],c)):v.relocateComponent(W[0],R[0],c)}var Y=function(Z,mt){if(c.quality=="default"||c.quality=="proof"){typeof Z=="number"&&(Z=mt);var lt=void 0,k=void 0,Et=Z.data("id");return S.forEach(function(Ct){Et in Ct&&(lt={x:Ct[Et].getRect().getCenterX(),y:Ct[Et].getRect().getCenterY()},k=Ct[Et])}),c.nodeDimensionsIncludeLabels&&(k.labelWidth&&(k.labelPosHorizontal=="left"?lt.x+=k.labelWidth/2:k.labelPosHorizontal=="right"&&(lt.x-=k.labelWidth/2)),k.labelHeight&&(k.labelPosVertical=="top"?lt.y+=k.labelHeight/2:k.labelPosVertical=="bottom"&&(lt.y-=k.labelHeight/2))),lt==null&&(lt={x:Z.position("x"),y:Z.position("y")}),{x:lt.x,y:lt.y}}else{var ot=void 0;return R.forEach(function(Ct){var Vt=Ct.nodeIndexes.get(Z.id());Vt!=null&&(ot={x:Ct.xCoords[Vt],y:Ct.yCoords[Vt]})}),ot==null&&(ot={x:Z.position("x"),y:Z.position("y")}),{x:ot.x,y:ot.y}}};if(c.quality=="default"||c.quality=="proof"||c.randomize){var J=v.calcParentsWithoutChildren(T,w),at=w.filter(function(q){return q.css("display")=="none"});c.eles=w.not(at),w.nodes().not(":parent").not(at).layoutPositions(g,c,Y),J.length>0&&J.forEach(function(q){q.position(Y(q))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),l})()}),657:((o,a,t)=>{var e=t(548),h=t(140).layoutBase.Matrix,i=t(140).layoutBase.SVD;o.exports={spectralLayout:function(n){var r=n.cy,f=n.eles,l=f.nodes(),p=f.nodes(":parent"),g=new Map,c=new Map,T=new Map,w=[],R=[],S=[],P=[],W=[],B=[],x=[],it=[],s=void 0,E=1e8,u=1e-9,m=n.piTol,y=n.samplingType,C=n.nodeSeparation,M=void 0,b=function(){for(var gt=0,D=0,H=!1;D<M;){gt=Math.floor(Math.random()*s),H=!1;for(var z=0;z<D;z++)if(P[z]==gt){H=!0;break}if(!H)P[D]=gt,D++;else continue}},O=function(gt,D,H){for(var z=[],_=0,Q=0,j=0,pt=void 0,ft=[],rt=0,dt=1,Lt=0;Lt<s;Lt++)ft[Lt]=E;for(z[Q]=gt,ft[gt]=0;Q>=_;){j=z[_++];for(var wt=w[j],tt=0;tt<wt.length;tt++)pt=c.get(wt[tt]),ft[pt]==E&&(ft[pt]=ft[j]+1,z[++Q]=pt);B[j][D]=ft[j]*C}if(H){for(var Nt=0;Nt<s;Nt++)B[Nt][D]<W[Nt]&&(W[Nt]=B[Nt][D]);for(var st=0;st<s;st++)W[st]>rt&&(rt=W[st],dt=st)}return dt},I=function(gt){var D=void 0;if(gt){D=Math.floor(Math.random()*s);for(var z=0;z<s;z++)W[z]=E;for(var _=0;_<M;_++)P[_]=D,D=O(D,_,gt)}else{b();for(var H=0;H<M;H++)O(P[H],H,gt,!1)}for(var Q=0;Q<s;Q++)for(var j=0;j<M;j++)B[Q][j]*=B[Q][j];for(var pt=0;pt<M;pt++)x[pt]=[];for(var ft=0;ft<M;ft++)for(var rt=0;rt<M;rt++)x[ft][rt]=B[P[rt]][ft]},V=function(){for(var gt=i.svd(x),D=gt.S,H=gt.U,z=gt.V,_=D[0]*D[0]*D[0],Q=[],j=0;j<M;j++){Q[j]=[];for(var pt=0;pt<M;pt++)Q[j][pt]=0,j==pt&&(Q[j][pt]=D[j]/(D[j]*D[j]+_/(D[j]*D[j])))}it=h.multMat(h.multMat(z,Q),h.transpose(H))},$=function(){for(var gt=void 0,D=void 0,H=[],z=[],_=[],Q=[],j=0;j<s;j++)H[j]=Math.random(),z[j]=Math.random();H=h.normalize(H),z=h.normalize(z);for(var pt=0,ft=u,rt=u,dt=void 0;;){pt++;for(var Lt=0;Lt<s;Lt++)_[Lt]=H[Lt];if(H=h.multGamma(h.multL(h.multGamma(_),B,it)),gt=h.dotProduct(_,H),H=h.normalize(H),ft=h.dotProduct(_,H),dt=Math.abs(ft/rt),dt<=1+m&&dt>=1)break;rt=ft}for(var wt=0;wt<s;wt++)_[wt]=H[wt];for(pt=0,rt=u;;){pt++;for(var tt=0;tt<s;tt++)Q[tt]=z[tt];if(Q=h.minusOp(Q,h.multCons(_,h.dotProduct(_,Q))),z=h.multGamma(h.multL(h.multGamma(Q),B,it)),D=h.dotProduct(Q,z),z=h.normalize(z),ft=h.dotProduct(Q,z),dt=Math.abs(ft/rt),dt<=1+m&&dt>=1)break;rt=ft}for(var Nt=0;Nt<s;Nt++)Q[Nt]=z[Nt];R=h.multCons(_,Math.sqrt(Math.abs(gt))),S=h.multCons(Q,Math.sqrt(Math.abs(D)))};e.connectComponents(r,f,e.getTopMostNodes(l),g),p.forEach(function(At){e.connectComponents(r,f,e.getTopMostNodes(At.descendants().intersection(f)),g)});for(var et=0,K=0;K<l.length;K++)l[K].isParent()||c.set(l[K].id(),et++);var G=!0,F=!1,Y=void 0;try{for(var J=g.keys()[Symbol.iterator](),at;!(G=(at=J.next()).done);G=!0){var q=at.value;c.set(q,et++)}}catch(At){F=!0,Y=At}finally{try{!G&&J.return&&J.return()}finally{if(F)throw Y}}for(var Z=0;Z<c.size;Z++)w[Z]=[];p.forEach(function(At){for(var gt=At.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(z,_){z.connectedEdges().length<H&&(H=z.connectedEdges().length,D=_)}),T.set(At.id(),gt.nodes(":childless")[D].id())}),l.forEach(function(At){var gt=void 0;At.isParent()?gt=c.get(T.get(At.id())):gt=c.get(At.id()),At.neighborhood().nodes().forEach(function(D){f.intersection(At.edgesWith(D)).length>0&&(D.isParent()?w[gt].push(T.get(D.id())):w[gt].push(D.id()))})});var mt=function(gt){var D=c.get(gt),H=void 0;g.get(gt).forEach(function(z){r.getElementById(z).isParent()?H=T.get(z):H=z,w[D].push(H),w[c.get(H)].push(gt)})},lt=!0,k=!1,Et=void 0;try{for(var ot=g.keys()[Symbol.iterator](),Ct;!(lt=(Ct=ot.next()).done);lt=!0){var Vt=Ct.value;mt(Vt)}}catch(At){k=!0,Et=At}finally{try{!lt&&ot.return&&ot.return()}finally{if(k)throw Et}}s=c.size;var Dt=void 0;if(s>2){M=s<n.sampleSize?s:n.sampleSize;for(var xt=0;xt<s;xt++)B[xt]=[];for(var Gt=0;Gt<M;Gt++)it[Gt]=[];return n.quality=="draft"||n.step=="all"?(I(y),V(),$(),Dt={nodeIndexes:c,xCoords:R,yCoords:S}):(c.forEach(function(At,gt){R.push(r.getElementById(gt).position("x")),S.push(r.getElementById(gt).position("y"))}),Dt={nodeIndexes:c,xCoords:R,yCoords:S}),Dt}else{var Wt=c.keys(),Ft=r.getElementById(Wt.next().value),$t=Ft.position(),Xt=Ft.outerWidth();if(R.push($t.x),S.push($t.y),s==2){var Bt=r.getElementById(Wt.next().value).outerWidth();R.push($t.x+Xt/2+Bt/2+n.idealEdgeLength),S.push($t.y)}return Dt={nodeIndexes:c,xCoords:R,yCoords:S},Dt}}}}),579:((o,a,t)=>{var e=t(212),h=function(v){v&&v("layout","fcose",e)};typeof cytoscape<"u"&&h(cytoscape),o.exports=h}),140:(o=>{o.exports=A})},N={};function d(o){var a=N[o];if(a!==void 0)return a.exports;var t=N[o]={exports:{}};return X[o](t,t.exports,d),t.exports}return d(579)})()})}));function Je(L,U,A){L.forEach(X=>{U.add({group:"nodes",data:{type:"service",id:X.id,icon:X.icon,label:X.title,parent:X.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-service"})})}function Ke(L,U,A){L.forEach(X=>{U.add({group:"nodes",data:{type:"junction",id:X.id,parent:X.in,width:A.getConfigField("iconSize"),height:A.getConfigField("iconSize")},classes:"node-junction"})})}function Re(L,U){U.nodes().map(A=>{const X=Kt(A);X.type!=="group"&&(X.x=A.position().x,X.y=A.position().y,L.getElementById(X.id).attr("transform","translate("+(X.x||0)+","+(X.y||0)+")"))})}function je(L,U){L.forEach(A=>{U.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}function _e(L,U){L.forEach(A=>{const{lhsId:X,rhsId:N,lhsInto:d,lhsGroup:o,rhsInto:a,lhsDir:t,rhsDir:e,rhsGroup:h,title:i}=A,v=se(A.lhsDir,A.rhsDir)?"segments":"straight",n={id:`${X}-${N}`,label:i,source:X,sourceDir:t,sourceArrow:d,sourceGroup:o,sourceEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:a,targetGroup:h,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};U.add({group:"edges",data:n,classes:v})})}function tr(L,U,A){const X=ct((o,a)=>Object.entries(o).reduce((t,[e,h])=>{let i=0;const v=Object.entries(h);if(v.length===1)return t[e]=v[0][1],t;for(let n=0;n<v.length-1;n++)for(let r=n+1;r<v.length;r++){const[f,l]=v[n],[p,g]=v[r];if(A[f]?.[p]===a)t[e]??(t[e]=[]),t[e]=[...t[e],...l,...g];else if(f==="default"||p==="default")t[e]??(t[e]=[]),t[e]=[...t[e],...l,...g];else{const c=`${e}-${i++}`;t[c]=l;const T=`${e}-${i++}`;t[T]=g}}return t},{}),"flattenAlignments"),[N,d]=U.map(o=>{const a={},t={};return Object.entries(o).forEach(([e,[h,i]])=>{var v,n;const r=L.getNode(e)?.in??"default";a[i]??(a[i]={}),(v=a[i])[r]??(v[r]=[]),a[i][r].push(e),t[h]??(t[h]={}),(n=t[h])[r]??(n[r]=[]),t[h][r].push(e)}),{horiz:Object.values(X(a,"horizontal")).filter(e=>e.length>1),vert:Object.values(X(t,"vertical")).filter(e=>e.length>1)}}).reduce(([o,a],{horiz:t,vert:e})=>[[...o,...t],[...a,...e]],[[],[]]);return{horizontal:N,vertical:d}}function er(L,U){const A=[],X=ct(d=>`${d[0]},${d[1]}`,"posToStr"),N=ct(d=>d.split(",").map(o=>parseInt(o)),"strToPos");return L.forEach(d=>{const o=Object.fromEntries(Object.entries(d).map(([h,i])=>[X(i),h])),a=[X([0,0])],t={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const h=a.shift();if(h){t[h]=1;const i=o[h];if(i){const v=N(h);Object.entries(e).forEach(([n,r])=>{const f=X([v[0]+r[0],v[1]+r[1]]),l=o[f];l&&!t[f]&&(a.push(f),A.push({[Ne[n]]:l,[Ne[rr(n)]]:i,gap:1.5*U.getConfigField("iconSize")}))})}}}}),A}function Se(L,U,A,X,N,{spatialMaps:d,groupAlignments:o}){return new Promise(a=>{const t=lr("body").append("div").attr("id","cy").attr("style","display:none"),e=qe({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(),je(A,e),Je(L,e,N),Ke(U,e,N),_e(X,e);const h=tr(N,d,o),i=er(d,N),v=N.getConfigField("iconSize"),n=N.getConfigField("idealEdgeLengthMultiplier")*v,r=.5*v,f=N.getConfigField("edgeElasticity"),l=e.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){const[g,c]=p.connectedNodes(),{parent:T}=Kt(g),{parent:w}=Kt(c);return T===w?n:r},edgeElasticity(p){const[g,c]=p.connectedNodes(),{parent:T}=Kt(g),{parent:w}=Kt(c);return T===w?f:.001},alignmentConstraint:h,relativePlacementConstraint:i});l.one("layoutstop",()=>{function p(g,c,T,w){let R,S;const{x:P,y:W}=g,{x:B,y:x}=c;S=(w-W+(P-T)*(W-x)/(P-B))/Math.sqrt(1+Math.pow((W-x)/(P-B),2)),R=Math.sqrt(Math.pow(w-W,2)+Math.pow(T-P,2)-Math.pow(S,2));const it=Math.sqrt(Math.pow(B-P,2)+Math.pow(x-W,2));R=R/it;let s=(B-P)*(w-W)-(x-W)*(T-P);switch(!0){case s>=0:s=1;break;case s<0:s=-1;break}let E=(B-P)*(T-P)+(x-W)*(w-W);switch(!0){case E>=0:E=1;break;case E<0:E=-1;break}return S=Math.abs(S)*s,R=R*E,{distances:S,weights:R}}ct(p,"getSegmentWeights"),e.startBatch();for(const g of Object.values(e.edges()))if(g.data?.()){const{x:c,y:T}=g.source().position(),{x:w,y:R}=g.target().position();if(c!==w&&T!==R){const S=g.sourceEndpoint(),P=g.targetEndpoint(),{sourceDir:W}=Le(g),[B,x]=Zt(W)?[S.x,P.y]:[P.x,S.y],{weights:it,distances:s}=p(S,P,B,x);g.style("segment-distances",s),g.style("segment-weights",it)}}e.endBatch(),l.run()}),l.run(),e.ready(p=>{Qe.info("Ready",p),a(e)})})}var Fe,pe,Ne,ye,ae,rr,Ee,Yt,Zt,se,be,Ge,oe,Pe,Ue,Ye,Xe,He,Le,Kt,Ve,me,We,Te,ze,Jt,ie,$e,Be,Ze,ke,Gr,Pr=nr((()=>{Ar(),xr(),Sr(),wr(),Er(),hr(),sr(),Fr(),Fe=ar(br(),1),fr(),Ne={L:"left",R:"right",T:"top",B:"bottom"},ye={L:ct(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:ct(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:ct(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:ct(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},ae={L:ct((L,U)=>L-U+2,"L"),R:ct((L,U)=>L-2,"R"),T:ct((L,U)=>L-U+2,"T"),B:ct((L,U)=>L-2,"B")},rr=ct(function(L){return Yt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ee=ct(function(L){const U=L;return U==="L"||U==="R"||U==="T"||U==="B"},"isArchitectureDirection"),Yt=ct(function(L){const U=L;return U==="L"||U==="R"},"isArchitectureDirectionX"),Zt=ct(function(L){const U=L;return U==="T"||U==="B"},"isArchitectureDirectionY"),se=ct(function(L,U){const A=Yt(L)&&Zt(U),X=Zt(L)&&Yt(U);return A||X},"isArchitectureDirectionXY"),be=ct(function(L){const U=L[0],A=L[1],X=Yt(U)&&Zt(A),N=Zt(U)&&Yt(A);return X||N},"isArchitecturePairXY"),Ge=ct(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),oe=ct(function(L,U){const A=`${L}${U}`;return Ge(A)?A:void 0},"getArchitectureDirectionPair"),Pe=ct(function([L,U],A){const X=A[0],N=A[1];return Yt(X)?Zt(N)?[L+(X==="L"?-1:1),U+(N==="T"?1:-1)]:[L+(X==="L"?-1:1),U]:Yt(N)?[L+(N==="L"?1:-1),U+(X==="T"?1:-1)]:[L,U+(X==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ue=ct(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ye=ct(function(L,U){return se(L,U)?"bend":Yt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Xe=ct(function(L){return L.type==="service"},"isArchitectureService"),He=ct(function(L){return L.type==="junction"},"isArchitectureJunction"),Le=ct(L=>L.data(),"edgeData"),Kt=ct(L=>L.data(),"nodeData"),Ve=yr.architecture,me=(pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=ur,this.getAccTitle=Lr,this.setDiagramTitle=mr,this.getDiagramTitle=Nr,this.getAccDescription=Tr,this.setAccDescription=gr,this.clear()}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",vr()}addService({id:L,icon:U,in:A,title:X,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(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===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[A]==="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:U,iconText:N,title:X,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Xe)}addJunction({id:L,in:U}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(U!==void 0){if(L===U)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[U]===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[U]==="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:U}}getJunctions(){return Object.values(this.nodes).filter(He)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:U,in:A,title:X}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===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?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:U,title:X,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:U,lhsDir:A,rhsDir:X,lhsInto:N,rhsInto:d,lhsGroup:o,rhsGroup:a,title:t}){if(!Ee(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${U}. Expected (L,R,T,B) got ${String(A)}`);if(!Ee(X))throw new Error(`Invalid direction given for right hand side of edge ${L}--${U}. Expected (L,R,T,B) got ${String(X)}`);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[U]===void 0&&this.groups[U]===void 0)throw new Error(`The right-hand id [${U}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=this.nodes[L].in,h=this.nodes[U].in;if(o&&e&&h&&e==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(a&&e&&h&&e==h)throw new Error(`The right-hand id [${U}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:o,rhsId:U,rhsDir:X,rhsInto:d,rhsGroup:a,title:t};this.edges.push(i),this.nodes[L]&&this.nodes[U]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[U].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const L={},U=Object.entries(this.nodes).reduce((a,[t,e])=>(a[t]=e.edges.reduce((h,i)=>{const v=this.getNode(i.lhsId)?.in,n=this.getNode(i.rhsId)?.in;if(v&&n&&v!==n){const r=Ye(i.lhsDir,i.rhsDir);r!=="bend"&&(L[v]??(L[v]={}),L[v][n]=r,L[n]??(L[n]={}),L[n][v]=r)}if(i.lhsId===t){const r=oe(i.lhsDir,i.rhsDir);r&&(h[r]=i.rhsId)}else{const r=oe(i.rhsDir,i.lhsDir);r&&(h[r]=i.lhsId)}return h},{}),a),{}),A=Object.keys(U)[0],X={[A]:1},N=Object.keys(U).reduce((a,t)=>t===A?a:{...a,[t]:1},{}),d=ct(a=>{const t={[a]:[0,0]},e=[a];for(;e.length>0;){const h=e.shift();if(h){X[h]=1,delete N[h];const i=U[h],[v,n]=t[h];Object.entries(i).forEach(([r,f])=>{X[f]||(t[f]=Pe([v,n],r),e.push(f))})}}return t},"BFS"),o=[d(A)];for(;Object.keys(N).length>0;)o.push(d(Object.keys(N)[0]));this.dataStructures={adjList:U,spatialMaps:o,groupAlignments:L}}return this.dataStructures}setElementForId(L,U){this.elements[L]=U}getElementById(L){return this.elements[L]}getConfig(){return Or({...Ve,...pr().architecture})}getConfigField(L){return this.getConfig()[L]}},ct(pe,"ArchitectureDB"),pe),We=ct((L,U)=>{Rr(L,U),L.groups.map(A=>U.addGroup(A)),L.services.map(A=>U.addService({...A,type:"service"})),L.junctions.map(A=>U.addJunction({...A,type:"junction"})),L.edges.map(A=>U.addEdge(A))},"populateDb"),Te={parser:{yy:void 0},parse:ct(async L=>{const U=await or("architecture",L);Qe.debug(U);const A=Te.parser?.yy;if(!(A instanceof me))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.");We(U,A)},"parse")},ze=ct(L=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${L.archEdgeWidth};
|
|
4
4
|
stroke: ${L.archEdgeColor};
|