@otto-code/server 0.7.2 → 0.7.3
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/server/server/agent/providers/claude/agent.js +48 -3
- package/dist/server/server/agent/providers/mock-load-test-agent.d.ts +10 -1
- package/dist/server/server/agent/providers/mock-load-test-agent.js +151 -5
- package/dist/server/server/agent/synthetic-conversation.d.ts +18 -0
- package/dist/server/server/agent/synthetic-conversation.js +567 -0
- package/dist/server/server/dotnet-process-registry.d.ts +111 -0
- package/dist/server/server/dotnet-process-registry.js +160 -0
- package/dist/server/server/lsp/connection.d.ts +4 -0
- package/dist/server/server/lsp/connection.js +39 -4
- package/dist/server/server/lsp/pool.js +1 -0
- package/dist/server/server/lsp/registry.d.ts +14 -1
- package/dist/server/server/lsp/registry.js +14 -2
- package/dist/server/server/lsp/service.d.ts +18 -2
- package/dist/server/server/lsp/service.js +14 -2
- package/dist/server/server/process-tree.d.ts +29 -0
- package/dist/server/server/process-tree.js +59 -0
- package/dist/server/server/session/files/workspace-files-session.js +11 -5
- package/dist/server/server/session.d.ts +11 -0
- package/dist/server/server/session.js +23 -0
- package/dist/server/server/solution-model/dotnet/probe.d.ts +2 -0
- package/dist/server/server/solution-model/dotnet/probe.js +33 -14
- package/dist/server/server/websocket-server.js +10 -0
- package/dist/server/server/workspace-git-service.d.ts +36 -0
- package/dist/server/server/workspace-git-service.js +110 -6
- package/dist/server/terminal/shell-integration/zsh/.zshenv +17 -17
- package/dist/server/terminal/shell-integration/zsh/otto-integration.zsh +32 -32
- package/dist/server/terminal/terminal.js +12 -2
- package/dist/server/web-ui/_expo/static/js/web/{__common-6d2299ed037bec2393245a7c0bf1c643.js → __common-8ab6f044d26f0be8899aaf3a990c8b65.js} +1855 -1855
- package/dist/server/web-ui/_expo/static/js/web/__common-8ab6f044d26f0be8899aaf3a990c8b65.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/__common-8ab6f044d26f0be8899aaf3a990c8b65.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{abnfDiagram-VRR7QNED-c3c2ca327b2d7ad9af3caa1cba884908.js → abnfDiagram-VRR7QNED-e33c74fb52c02570f5105b2e70194df6.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-e33c74fb52c02570f5105b2e70194df6.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-e33c74fb52c02570f5105b2e70194df6.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{architecture-TIHT7OUA-0cf23d3dc9775f216c01daae4aae250a.js → architecture-TIHT7OUA-cc3220b1ecee09a0e5c0b99fbf886b82.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{architecture-TIHT7OUA-0cf23d3dc9775f216c01daae4aae250a.js.br → architecture-TIHT7OUA-cc3220b1ecee09a0e5c0b99fbf886b82.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/architecture-TIHT7OUA-cc3220b1ecee09a0e5c0b99fbf886b82.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{architectureDiagram-ZJ3FMSHR-f3bce96124559dc19faa4d90aca4afd4.js → architectureDiagram-ZJ3FMSHR-551f5e17dd33a890195b5d060cd75ad2.js} +4 -4
- package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-551f5e17dd33a890195b5d060cd75ad2.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-551f5e17dd33a890195b5d060cd75ad2.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{blockDiagram-677ZJIJ3-839486928c0f151128a5e2836aa07080.js → blockDiagram-677ZJIJ3-901d7bbed0b0f6ae3439f6bff861b42f.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/blockDiagram-677ZJIJ3-901d7bbed0b0f6ae3439f6bff861b42f.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{blockDiagram-677ZJIJ3-839486928c0f151128a5e2836aa07080.js.gz → blockDiagram-677ZJIJ3-901d7bbed0b0f6ae3439f6bff861b42f.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{c4Diagram-LMCZKHZV-197212c21520a6b659a5649e683619d0.js → c4Diagram-LMCZKHZV-781ca106d0a19454ec9e559bcba3706c.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/c4Diagram-LMCZKHZV-781ca106d0a19454ec9e559bcba3706c.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{c4Diagram-LMCZKHZV-197212c21520a6b659a5649e683619d0.js.gz → c4Diagram-LMCZKHZV-781ca106d0a19454ec9e559bcba3706c.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{classDiagram-OUVF2IWQ-a0a0fbefc96d14b6619c84fc4f92a39a.js → classDiagram-OUVF2IWQ-1d00e0cc9165446f1bac84fed1e9bbed.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-1d00e0cc9165446f1bac84fed1e9bbed.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-1d00e0cc9165446f1bac84fed1e9bbed.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{classDiagram-v2-EOCWNBFH-e979239c6d160123d5b4847253a8a70e.js → classDiagram-v2-EOCWNBFH-52b658fff2b9f58ece5d8528cb381359.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-52b658fff2b9f58ece5d8528cb381359.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-52b658fff2b9f58ece5d8528cb381359.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{cose-bilkent-JH36ORCC-bbc39a6bb062ba85e433f91becc37a65.js → cose-bilkent-JH36ORCC-9256f0de343b59ecc5775210909c4f8b.js} +4 -4
- package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-9256f0de343b59ecc5775210909c4f8b.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-9256f0de343b59ecc5775210909c4f8b.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{cynefin-VYW2F7L2-ea0e514652627740f5a2ed32b027a164.js → cynefin-VYW2F7L2-feb2750e4e4322ac8e6c6049fcfd73cb.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-feb2750e4e4322ac8e6c6049fcfd73cb.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-feb2750e4e4322ac8e6c6049fcfd73cb.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{cynefinDiagram-TSTJHNR4-0446f9b57ba778e5883d93e24692ffce.js → cynefinDiagram-TSTJHNR4-b98dc254a5fa6581f997a0809a9e0fc0.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-b98dc254a5fa6581f997a0809a9e0fc0.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-b98dc254a5fa6581f997a0809a9e0fc0.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{dagre-VKFMJZFB-69f7aa52521b06a95874b1ac67508def.js → dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-bridge-0ae8aadd6e53625f59d62eceb1f06ede.js → desktop-attachment-bridge-d6e4f29a78dc1bb5b70d4ef2c440c6c0.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-bridge-0ae8aadd6e53625f59d62eceb1f06ede.js.br → desktop-attachment-bridge-d6e4f29a78dc1bb5b70d4ef2c440c6c0.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/desktop-attachment-bridge-d6e4f29a78dc1bb5b70d4ef2c440c6c0.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-store-ecd775c6aee79778f49274a5bffadc5a.js → desktop-attachment-store-e2e403c64de4bc638e1800c9b226ede3.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-store-ecd775c6aee79778f49274a5bffadc5a.js.br → desktop-attachment-store-e2e403c64de4bc638e1800c9b226ede3.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-store-ecd775c6aee79778f49274a5bffadc5a.js.gz → desktop-attachment-store-e2e403c64de4bc638e1800c9b226ede3.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{diagram-FQU43EPY-bd0940835ccad031627e285aaba6d5ec.js → diagram-FQU43EPY-c6317fa4c07b63f54be30797f25060c7.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/diagram-FQU43EPY-c6317fa4c07b63f54be30797f25060c7.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{diagram-FQU43EPY-bd0940835ccad031627e285aaba6d5ec.js.gz → diagram-FQU43EPY-c6317fa4c07b63f54be30797f25060c7.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{diagram-G47NLZAW-217e2cd3275924bc08fc6ebe79e95e48.js → diagram-G47NLZAW-70713a059ca65ca1241036cc96679bc5.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-70713a059ca65ca1241036cc96679bc5.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-70713a059ca65ca1241036cc96679bc5.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{diagram-NH7WQ7WH-fbd3aa35ca68df15ee378fb63241b333.js → diagram-NH7WQ7WH-1bebddae0fd6a49ff82d7ea2b738823d.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-1bebddae0fd6a49ff82d7ea2b738823d.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-1bebddae0fd6a49ff82d7ea2b738823d.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{diagram-OA4YK3LP-48ebb0ba6bcb34417649bd55070542ad.js → diagram-OA4YK3LP-bf33c3e1800c9f503dd88e41e97c5974.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-bf33c3e1800c9f503dd88e41e97c5974.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-bf33c3e1800c9f503dd88e41e97c5974.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{diagram-WEI45ONY-2be85db5396495fa970419f77587cf14.js → diagram-WEI45ONY-23d90af03030beb514d3a953920e6c9b.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-23d90af03030beb514d3a953920e6c9b.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-23d90af03030beb514d3a953920e6c9b.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{ebnfDiagram-CCIWWBDH-3c5c44cf8340b641d13076adab77967b.js → ebnfDiagram-CCIWWBDH-5119b538047d9c00ae05855ae1cf490f.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-5119b538047d9c00ae05855ae1cf490f.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-5119b538047d9c00ae05855ae1cf490f.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{erDiagram-Q63AITRT-81762a72bd33bf1042e4cad4f688abf2.js → erDiagram-Q63AITRT-6f7e9f420388e6291e5a8ae6da7ab3ad.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-6f7e9f420388e6291e5a8ae6da7ab3ad.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-6f7e9f420388e6291e5a8ae6da7ab3ad.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{eventmodeling-45OFAUF4-11d7615d746c5304c28d4931ec9ca5f7.js → eventmodeling-45OFAUF4-510d785624b4496077e120d2c12a6b88.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{eventmodeling-45OFAUF4-11d7615d746c5304c28d4931ec9ca5f7.js.br → eventmodeling-45OFAUF4-510d785624b4496077e120d2c12a6b88.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/eventmodeling-45OFAUF4-510d785624b4496077e120d2c12a6b88.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{flowDiagram-23GEKE2U-5a2af608a9500bb36da0595c3464a562.js → flowDiagram-23GEKE2U-7bf4721b6de004ef55a0787bbbc6b9ac.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-7bf4721b6de004ef55a0787bbbc6b9ac.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-7bf4721b6de004ef55a0787bbbc6b9ac.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{ganttDiagram-NO4QXBWP-379aae0f5fb2652d90827c7f8b2472d2.js → ganttDiagram-NO4QXBWP-53b4651e7e78eb3212ec05a0d72b8932.js} +5 -5
- package/dist/server/web-ui/_expo/static/js/web/ganttDiagram-NO4QXBWP-53b4651e7e78eb3212ec05a0d72b8932.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{ganttDiagram-NO4QXBWP-379aae0f5fb2652d90827c7f8b2472d2.js.gz → ganttDiagram-NO4QXBWP-53b4651e7e78eb3212ec05a0d72b8932.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{gitGraph-TEB2WS4Q-d978b8a2d1fd8fcc132b16ef8d57dd7c.js → gitGraph-TEB2WS4Q-03038b65af81bb0d4755a35c737decf0.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{gitGraph-TEB2WS4Q-d978b8a2d1fd8fcc132b16ef8d57dd7c.js.br → gitGraph-TEB2WS4Q-03038b65af81bb0d4755a35c737decf0.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/gitGraph-TEB2WS4Q-03038b65af81bb0d4755a35c737decf0.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{gitGraphDiagram-IHSO6WYX-6cb31a37312da231b8f10f86b0d4de52.js → gitGraphDiagram-IHSO6WYX-49a762c3f7ecc4315bcde2731f090410.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{gitGraphDiagram-IHSO6WYX-6cb31a37312da231b8f10f86b0d4de52.js.br → gitGraphDiagram-IHSO6WYX-49a762c3f7ecc4315bcde2731f090410.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{gitGraphDiagram-IHSO6WYX-6cb31a37312da231b8f10f86b0d4de52.js.gz → gitGraphDiagram-IHSO6WYX-49a762c3f7ecc4315bcde2731f090410.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-4c86d3c14df18b18b3b9a6329b896faf.js → index-6e99d24bcc09db447a2d8b0c747a5263.js} +74 -73
- package/dist/server/web-ui/_expo/static/js/web/index-6e99d24bcc09db447a2d8b0c747a5263.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-6e99d24bcc09db447a2d8b0c747a5263.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{indexeddb-attachment-store-5a90994af83f12740a986d9f1cb55cc9.js → indexeddb-attachment-store-ea6e57606ef25b42cf1e6665a3f5313e.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-ea6e57606ef25b42cf1e6665a3f5313e.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-ea6e57606ef25b42cf1e6665a3f5313e.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{info-DKCQHKI2-b59d0dbb9a30d361ddc796a5cfa7fc41.js → info-DKCQHKI2-61f5b3ca4e5cea885d6254ccef0626c4.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{info-DKCQHKI2-b59d0dbb9a30d361ddc796a5cfa7fc41.js.br → info-DKCQHKI2-61f5b3ca4e5cea885d6254ccef0626c4.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/info-DKCQHKI2-61f5b3ca4e5cea885d6254ccef0626c4.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{infoDiagram-FWYZ7A6U-0c4368de61a3bdbfbc73b143423981d9.js → infoDiagram-FWYZ7A6U-f47fe897045bf4e6949ea71abdae89fe.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-f47fe897045bf4e6949ea71abdae89fe.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-f47fe897045bf4e6949ea71abdae89fe.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{ishikawaDiagram-FXEZZL3T-1474e73532a16148b7944d3b0f896197.js → ishikawaDiagram-FXEZZL3T-bf6597ebf1b0773e1d39dea7fcf8800f.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/ishikawaDiagram-FXEZZL3T-bf6597ebf1b0773e1d39dea7fcf8800f.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{ishikawaDiagram-FXEZZL3T-1474e73532a16148b7944d3b0f896197.js.gz → ishikawaDiagram-FXEZZL3T-bf6597ebf1b0773e1d39dea7fcf8800f.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{journeyDiagram-5HDEW3XC-13df6cce9cb7f0e6ffbaa9a614feeee4.js → journeyDiagram-5HDEW3XC-7dc3a04c43574b6aac59a4520d111129.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/journeyDiagram-5HDEW3XC-7dc3a04c43574b6aac59a4520d111129.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{journeyDiagram-5HDEW3XC-13df6cce9cb7f0e6ffbaa9a614feeee4.js.gz → journeyDiagram-5HDEW3XC-7dc3a04c43574b6aac59a4520d111129.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{kanban-definition-HUTT4EX6-6b56c0da5302838e7e1c46bf7460ea35.js → kanban-definition-HUTT4EX6-7be647182b1c3291e9330de01d329adf.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/kanban-definition-HUTT4EX6-7be647182b1c3291e9330de01d329adf.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{kanban-definition-HUTT4EX6-6b56c0da5302838e7e1c46bf7460ea35.js.gz → kanban-definition-HUTT4EX6-7be647182b1c3291e9330de01d329adf.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{katex-7f6ac23f118e6e9264fdfa96e335134f.js → katex-c0aeb8f935f239b315771d04dc16b1e7.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/katex-c0aeb8f935f239b315771d04dc16b1e7.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{katex-7f6ac23f118e6e9264fdfa96e335134f.js.gz → katex-c0aeb8f935f239b315771d04dc16b1e7.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{mermaid-75931b049ce3e66af3cd8ddf01e1cd23.js → mermaid-f4cf4ad300756762c2eed3bd65fecb6c.js} +9 -9
- package/dist/server/web-ui/_expo/static/js/web/mermaid-f4cf4ad300756762c2eed3bd65fecb6c.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{mermaid-75931b049ce3e66af3cd8ddf01e1cd23.js.gz → mermaid-f4cf4ad300756762c2eed3bd65fecb6c.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{mindmap-definition-LN4V7U3C-fafde693a329ca39007debdd961134b4.js → mindmap-definition-LN4V7U3C-5a266041ac99a182f60e7d1ade3053a7.js} +21 -21
- package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-5a266041ac99a182f60e7d1ade3053a7.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-5a266041ac99a182f60e7d1ade3053a7.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{native-file-attachment-store-645b8ffe39c60c05c0a224e6efcb5a9c.js → native-file-attachment-store-78cca157541c8af3aff9a719f7b951be.js} +3 -3
- package/dist/server/web-ui/_expo/static/js/web/native-file-attachment-store-78cca157541c8af3aff9a719f7b951be.js.br +11 -0
- package/dist/server/web-ui/_expo/static/js/web/{native-file-attachment-store-645b8ffe39c60c05c0a224e6efcb5a9c.js.gz → native-file-attachment-store-78cca157541c8af3aff9a719f7b951be.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{orchestration-graph-panel-2d117a5764d11c411d707e37fba93a1b.js → orchestration-graph-panel-77d13bf34f0ff1ffed397666b8009b21.js} +5 -5
- package/dist/server/web-ui/_expo/static/js/web/orchestration-graph-panel-77d13bf34f0ff1ffed397666b8009b21.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{orchestration-graph-panel-2d117a5764d11c411d707e37fba93a1b.js.gz → orchestration-graph-panel-77d13bf34f0ff1ffed397666b8009b21.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{packet-7NZHBO7P-61a485e09ee448c823fffbdfc588826d.js → packet-7NZHBO7P-8f2693917ef293414f42718be4e1d738.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{packet-7NZHBO7P-61a485e09ee448c823fffbdfc588826d.js.br → packet-7NZHBO7P-8f2693917ef293414f42718be4e1d738.js.br} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/packet-7NZHBO7P-8f2693917ef293414f42718be4e1d738.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{pegDiagram-2B236MQR-035fe1b93f90f4775e99aea533552b42.js → pegDiagram-2B236MQR-58835705d6a13a27b59f4c85aeaf7012.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-58835705d6a13a27b59f4c85aeaf7012.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-58835705d6a13a27b59f4c85aeaf7012.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{pie-RZYD4A2V-f6208df18db61d490f4811b192b77dec.js → pie-RZYD4A2V-8b0f157b04de7752354fc779ddbf49a4.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-8b0f157b04de7752354fc779ddbf49a4.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-8b0f157b04de7752354fc779ddbf49a4.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{pieDiagram-ENE6RG2P-c78c82bf26f51acb7b7c44ae51eba9c6.js → pieDiagram-ENE6RG2P-a0061a200414abc917902506915ccabe.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/pieDiagram-ENE6RG2P-a0061a200414abc917902506915ccabe.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{pieDiagram-ENE6RG2P-c78c82bf26f51acb7b7c44ae51eba9c6.js.gz → pieDiagram-ENE6RG2P-a0061a200414abc917902506915ccabe.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{quadrantDiagram-ABIIQ3AL-efff1486187742fe8683a966651df92f.js → quadrantDiagram-ABIIQ3AL-ccae11df8eb112141ab52dc3b055366d.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/quadrantDiagram-ABIIQ3AL-ccae11df8eb112141ab52dc3b055366d.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{quadrantDiagram-ABIIQ3AL-efff1486187742fe8683a966651df92f.js.gz → quadrantDiagram-ABIIQ3AL-ccae11df8eb112141ab52dc3b055366d.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{radar-I7S5WNFK-0150ed7f0d337fc7ec70638a3656ea06.js → radar-I7S5WNFK-0768be5c16d166cd094d75a4c9fba55a.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{radar-I7S5WNFK-0150ed7f0d337fc7ec70638a3656ea06.js.br → radar-I7S5WNFK-0768be5c16d166cd094d75a4c9fba55a.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/radar-I7S5WNFK-0768be5c16d166cd094d75a4c9fba55a.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{railroad-3IZDKUUU-c6e94ec81a88c02cb339de59f29386f5.js → railroad-3IZDKUUU-55b81b14fbc2908aa06995bd62b57b43.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{railroad-3IZDKUUU-c6e94ec81a88c02cb339de59f29386f5.js.br → railroad-3IZDKUUU-55b81b14fbc2908aa06995bd62b57b43.js.br} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/railroad-3IZDKUUU-55b81b14fbc2908aa06995bd62b57b43.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{railroad-abnf-AHOZXSZD-627ed129da90b5e1d371bd2c3b9db457.js → railroad-abnf-AHOZXSZD-47462203d9c422ed3805bd31ed12d922.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{railroad-abnf-AHOZXSZD-627ed129da90b5e1d371bd2c3b9db457.js.br → railroad-abnf-AHOZXSZD-47462203d9c422ed3805bd31ed12d922.js.br} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/railroad-abnf-AHOZXSZD-47462203d9c422ed3805bd31ed12d922.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{railroad-ebnf-EBAXGLYW-1b7ec12d3b92be4e181971b21f01f3f8.js → railroad-ebnf-EBAXGLYW-708f5dcce4ca8693b288152f6aa217b1.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{railroad-ebnf-EBAXGLYW-1b7ec12d3b92be4e181971b21f01f3f8.js.br → railroad-ebnf-EBAXGLYW-708f5dcce4ca8693b288152f6aa217b1.js.br} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/railroad-ebnf-EBAXGLYW-708f5dcce4ca8693b288152f6aa217b1.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{railroad-peg-LSFZ7HO6-8a8e027f4141d16a12c15223da966d7d.js → railroad-peg-LSFZ7HO6-eb7ff4c6b43a9c593b0feac004d52d4e.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-eb7ff4c6b43a9c593b0feac004d52d4e.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-eb7ff4c6b43a9c593b0feac004d52d4e.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{railroadDiagram-RFXS5EU6-499f36fe78b07e5558063f963a47a474.js → railroadDiagram-RFXS5EU6-c1c534a0f6478078bca1fd806a1ee2ae.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-c1c534a0f6478078bca1fd806a1ee2ae.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-c1c534a0f6478078bca1fd806a1ee2ae.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{requirementDiagram-TGXJPOKE-9aaddb885fc59873a8f89cd7550c2c43.js → requirementDiagram-TGXJPOKE-5dd7440a5946dde0e06a5afa9e0295a1.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/requirementDiagram-TGXJPOKE-5dd7440a5946dde0e06a5afa9e0295a1.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{requirementDiagram-TGXJPOKE-9aaddb885fc59873a8f89cd7550c2c43.js.gz → requirementDiagram-TGXJPOKE-5dd7440a5946dde0e06a5afa9e0295a1.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{sankeyDiagram-HTMAVEWB-3fa66fe414adce7a50e31551c059f99c.js → sankeyDiagram-HTMAVEWB-76b963967a4f7c862f4f2f18492e7c56.js} +120 -120
- package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-76b963967a4f7c862f4f2f18492e7c56.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-76b963967a4f7c862f4f2f18492e7c56.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{sequenceDiagram-DBY2YBRQ-856a29fb0507a2dcb697a2aa29cd0b7a.js → sequenceDiagram-DBY2YBRQ-d40a3dbcd285c19aa010a697e12f5022.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/sequenceDiagram-DBY2YBRQ-d40a3dbcd285c19aa010a697e12f5022.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{sequenceDiagram-DBY2YBRQ-856a29fb0507a2dcb697a2aa29cd0b7a.js.gz → sequenceDiagram-DBY2YBRQ-d40a3dbcd285c19aa010a697e12f5022.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{sizeCapture-X5ZJPWSS-388b849b33073b8202dd9ca50038b1c7.js → sizeCapture-X5ZJPWSS-03ac818220d4ba98bdd2f4f454758263.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-03ac818220d4ba98bdd2f4f454758263.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-03ac818220d4ba98bdd2f4f454758263.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{stateDiagram-2N3HPSRC-9ca22d078d9922ddcb54ba7bb389c734.js → stateDiagram-2N3HPSRC-ba1e123bf8ce69ae781981f264e90564.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-ba1e123bf8ce69ae781981f264e90564.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-ba1e123bf8ce69ae781981f264e90564.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{stateDiagram-v2-6OUMAXLB-4357e7143c73859f6b4858ba72acb5aa.js → stateDiagram-v2-6OUMAXLB-5925b0db81d9a113005bd93c6adbab9d.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-5925b0db81d9a113005bd93c6adbab9d.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-5925b0db81d9a113005bd93c6adbab9d.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{swimlanes-5IMT3BWC-d737ca408a7a2b82f7419141456d28e4.js → swimlanes-5IMT3BWC-93c0bb8b5ee84ca6f11d561497ec0ef0.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/swimlanes-5IMT3BWC-93c0bb8b5ee84ca6f11d561497ec0ef0.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{swimlanes-5IMT3BWC-d737ca408a7a2b82f7419141456d28e4.js.gz → swimlanes-5IMT3BWC-93c0bb8b5ee84ca6f11d561497ec0ef0.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{swimlanesDiagram-G3AALYLV-0bf2ac58b338c2aeb33213ff1a57983a.js → swimlanesDiagram-G3AALYLV-5f3e335e1800b344e786080955bdb2c5.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-5f3e335e1800b344e786080955bdb2c5.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-5f3e335e1800b344e786080955bdb2c5.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{timeline-definition-FHXFAJF6-1130419ca563266603c98f1b2148a154.js → timeline-definition-FHXFAJF6-ebf6579c1264c7dd88b67d0ecc9313d7.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-ebf6579c1264c7dd88b67d0ecc9313d7.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-ebf6579c1264c7dd88b67d0ecc9313d7.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{treeView-QDETBFTQ-4f6ec9b592731c21dee99264fa638554.js → treeView-QDETBFTQ-682ed2be8efc51bd8196ff3320637705.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{treeView-QDETBFTQ-4f6ec9b592731c21dee99264fa638554.js.br → treeView-QDETBFTQ-682ed2be8efc51bd8196ff3320637705.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/treeView-QDETBFTQ-682ed2be8efc51bd8196ff3320637705.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{treemap-6X3UGDF4-39eb6ec2c19a5de9242fd28aa26dcf5b.js → treemap-6X3UGDF4-4fb89637583518868012429289715b50.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/{treemap-6X3UGDF4-39eb6ec2c19a5de9242fd28aa26dcf5b.js.br → treemap-6X3UGDF4-4fb89637583518868012429289715b50.js.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/treemap-6X3UGDF4-4fb89637583518868012429289715b50.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{vennDiagram-L72KCM5P-4c15b392e9de3fdc472b53cbdf8e7558.js → vennDiagram-L72KCM5P-4a09551e281dc72285c8c56bcd4b04a3.js} +2 -2
- package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4a09551e281dc72285c8c56bcd4b04a3.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4a09551e281dc72285c8c56bcd4b04a3.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{visualizer-bundle-b0af8f4f1ab8d4029f3f21236df43f7f.js → visualizer-bundle-fab344f71166d5645590bda1bab1e0a5.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/visualizer-bundle-fab344f71166d5645590bda1bab1e0a5.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{visualizer-bundle-b0af8f4f1ab8d4029f3f21236df43f7f.js.gz → visualizer-bundle-fab344f71166d5645590bda1bab1e0a5.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{visualizer-panel-3fbc1337bb844d7163cbdb418a4dfd53.js → visualizer-panel-bf8e9531071e12cefa8eda4766877aba.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/visualizer-panel-bf8e9531071e12cefa8eda4766877aba.js.br +6 -0
- package/dist/server/web-ui/_expo/static/js/web/{visualizer-panel-3fbc1337bb844d7163cbdb418a4dfd53.js.gz → visualizer-panel-bf8e9531071e12cefa8eda4766877aba.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{visualizer-pip-de03996e25ac5d8a11d723ea90b2f9a3.js → visualizer-pip-633730d52ecc119677ce9ecc287c7879.js} +2 -2
- package/dist/server/web-ui/_expo/static/js/web/visualizer-pip-633730d52ecc119677ce9ecc287c7879.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{visualizer-pip-de03996e25ac5d8a11d723ea90b2f9a3.js.gz → visualizer-pip-633730d52ecc119677ce9ecc287c7879.js.gz} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{wardley-OPB4EBWU-b075ee9680ce77acf211a0fb1e63cca8.js → wardley-OPB4EBWU-86a2856822d60f742050c338803f8533.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-86a2856822d60f742050c338803f8533.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-86a2856822d60f742050c338803f8533.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{wardleyDiagram-EHGQE667-a93bc6a6a1e80adcb9a740a2ea3d1676.js → wardleyDiagram-EHGQE667-cf65a2e4de30372a177e82834dba571c.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-cf65a2e4de30372a177e82834dba571c.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-cf65a2e4de30372a177e82834dba571c.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{xychartDiagram-FW5EYKEG-ec54fa07a12c5792d0bb7b65deaff05b.js → xychartDiagram-FW5EYKEG-d29f0b24141b00d07e99c98d99ac55d4.js} +1 -1
- package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-d29f0b24141b00d07e99c98d99ac55d4.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-d29f0b24141b00d07e99c98d99ac55d4.js.gz +0 -0
- package/dist/server/web-ui/index.html +1 -1
- package/dist/server/web-ui/index.html.br +0 -0
- package/dist/server/web-ui/index.html.gz +0 -0
- package/dist/src/terminal/shell-integration/zsh/.zshenv +17 -17
- package/dist/src/terminal/shell-integration/zsh/otto-integration.zsh +32 -32
- package/package.json +5 -5
- package/dist/server/web-ui/_expo/static/js/web/__common-6d2299ed037bec2393245a7c0bf1c643.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/__common-6d2299ed037bec2393245a7c0bf1c643.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-c3c2ca327b2d7ad9af3caa1cba884908.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-c3c2ca327b2d7ad9af3caa1cba884908.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/architecture-TIHT7OUA-0cf23d3dc9775f216c01daae4aae250a.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-f3bce96124559dc19faa4d90aca4afd4.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-f3bce96124559dc19faa4d90aca4afd4.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/blockDiagram-677ZJIJ3-839486928c0f151128a5e2836aa07080.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/c4Diagram-LMCZKHZV-197212c21520a6b659a5649e683619d0.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-a0a0fbefc96d14b6619c84fc4f92a39a.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-a0a0fbefc96d14b6619c84fc4f92a39a.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-e979239c6d160123d5b4847253a8a70e.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-e979239c6d160123d5b4847253a8a70e.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-bbc39a6bb062ba85e433f91becc37a65.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-bbc39a6bb062ba85e433f91becc37a65.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-ea0e514652627740f5a2ed32b027a164.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-ea0e514652627740f5a2ed32b027a164.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-0446f9b57ba778e5883d93e24692ffce.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-0446f9b57ba778e5883d93e24692ffce.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-69f7aa52521b06a95874b1ac67508def.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-69f7aa52521b06a95874b1ac67508def.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/desktop-attachment-bridge-0ae8aadd6e53625f59d62eceb1f06ede.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-FQU43EPY-bd0940835ccad031627e285aaba6d5ec.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-217e2cd3275924bc08fc6ebe79e95e48.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-217e2cd3275924bc08fc6ebe79e95e48.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-fbd3aa35ca68df15ee378fb63241b333.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-fbd3aa35ca68df15ee378fb63241b333.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-48ebb0ba6bcb34417649bd55070542ad.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-48ebb0ba6bcb34417649bd55070542ad.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-2be85db5396495fa970419f77587cf14.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-2be85db5396495fa970419f77587cf14.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-3c5c44cf8340b641d13076adab77967b.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-3c5c44cf8340b641d13076adab77967b.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-81762a72bd33bf1042e4cad4f688abf2.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-81762a72bd33bf1042e4cad4f688abf2.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/eventmodeling-45OFAUF4-11d7615d746c5304c28d4931ec9ca5f7.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-5a2af608a9500bb36da0595c3464a562.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-5a2af608a9500bb36da0595c3464a562.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/ganttDiagram-NO4QXBWP-379aae0f5fb2652d90827c7f8b2472d2.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/gitGraph-TEB2WS4Q-d978b8a2d1fd8fcc132b16ef8d57dd7c.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-4c86d3c14df18b18b3b9a6329b896faf.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-4c86d3c14df18b18b3b9a6329b896faf.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-5a90994af83f12740a986d9f1cb55cc9.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-5a90994af83f12740a986d9f1cb55cc9.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/info-DKCQHKI2-b59d0dbb9a30d361ddc796a5cfa7fc41.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-0c4368de61a3bdbfbc73b143423981d9.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-0c4368de61a3bdbfbc73b143423981d9.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/ishikawaDiagram-FXEZZL3T-1474e73532a16148b7944d3b0f896197.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/journeyDiagram-5HDEW3XC-13df6cce9cb7f0e6ffbaa9a614feeee4.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/kanban-definition-HUTT4EX6-6b56c0da5302838e7e1c46bf7460ea35.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/katex-7f6ac23f118e6e9264fdfa96e335134f.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/mermaid-75931b049ce3e66af3cd8ddf01e1cd23.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-fafde693a329ca39007debdd961134b4.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-fafde693a329ca39007debdd961134b4.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/native-file-attachment-store-645b8ffe39c60c05c0a224e6efcb5a9c.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/orchestration-graph-panel-2d117a5764d11c411d707e37fba93a1b.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/packet-7NZHBO7P-61a485e09ee448c823fffbdfc588826d.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-035fe1b93f90f4775e99aea533552b42.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-035fe1b93f90f4775e99aea533552b42.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-f6208df18db61d490f4811b192b77dec.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-f6208df18db61d490f4811b192b77dec.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/pieDiagram-ENE6RG2P-c78c82bf26f51acb7b7c44ae51eba9c6.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/quadrantDiagram-ABIIQ3AL-efff1486187742fe8683a966651df92f.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/radar-I7S5WNFK-0150ed7f0d337fc7ec70638a3656ea06.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroad-3IZDKUUU-c6e94ec81a88c02cb339de59f29386f5.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroad-abnf-AHOZXSZD-627ed129da90b5e1d371bd2c3b9db457.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroad-ebnf-EBAXGLYW-1b7ec12d3b92be4e181971b21f01f3f8.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-8a8e027f4141d16a12c15223da966d7d.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-8a8e027f4141d16a12c15223da966d7d.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-499f36fe78b07e5558063f963a47a474.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-499f36fe78b07e5558063f963a47a474.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/requirementDiagram-TGXJPOKE-9aaddb885fc59873a8f89cd7550c2c43.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-3fa66fe414adce7a50e31551c059f99c.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-3fa66fe414adce7a50e31551c059f99c.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sequenceDiagram-DBY2YBRQ-856a29fb0507a2dcb697a2aa29cd0b7a.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-388b849b33073b8202dd9ca50038b1c7.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-388b849b33073b8202dd9ca50038b1c7.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-9ca22d078d9922ddcb54ba7bb389c734.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-9ca22d078d9922ddcb54ba7bb389c734.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-4357e7143c73859f6b4858ba72acb5aa.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-4357e7143c73859f6b4858ba72acb5aa.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/swimlanes-5IMT3BWC-d737ca408a7a2b82f7419141456d28e4.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-0bf2ac58b338c2aeb33213ff1a57983a.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-0bf2ac58b338c2aeb33213ff1a57983a.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-1130419ca563266603c98f1b2148a154.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-1130419ca563266603c98f1b2148a154.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/treeView-QDETBFTQ-4f6ec9b592731c21dee99264fa638554.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/treemap-6X3UGDF4-39eb6ec2c19a5de9242fd28aa26dcf5b.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4c15b392e9de3fdc472b53cbdf8e7558.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4c15b392e9de3fdc472b53cbdf8e7558.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/visualizer-bundle-b0af8f4f1ab8d4029f3f21236df43f7f.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/visualizer-panel-3fbc1337bb844d7163cbdb418a4dfd53.js.br +0 -3
- package/dist/server/web-ui/_expo/static/js/web/visualizer-pip-de03996e25ac5d8a11d723ea90b2f9a3.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-b075ee9680ce77acf211a0fb1e63cca8.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-b075ee9680ce77acf211a0fb1e63cca8.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-a93bc6a6a1e80adcb9a740a2ea3d1676.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-a93bc6a6a1e80adcb9a740a2ea3d1676.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-ec54fa07a12c5792d0bb7b65deaff05b.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-ec54fa07a12c5792d0bb7b65deaff05b.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"render",{enumerable:!0,get:function(){return w}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),s=e(r(d[3])),c=r(d[4]);function u(e,t){e.forEach(e=>{const n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{["id","label","height","width","padding","x","y"].includes(t)||(n[t]=e[t])}),t.add({group:"nodes",data:n,position:{x:e.x??0,y:e.y??0}})})}function l(e,t){e.forEach(e=>{const n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{["id","start","end"].includes(t)||(n[t]=e[t])}),t.add({group:"edges",data:n})})}function y(e){return new Promise(n=>{const s=(0,c.select)("body").append("div").attr("id","cy").attr("style","display:none"),y=(0,o.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});s.remove(),u(e.nodes,y),l(e.edges,y),y.nodes().forEach(function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}});y.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),y.ready(e=>{t.log.info("Cytoscape ready",e),n(y)})})}function h(e){return e.nodes().map(e=>{const t=e.data(),n=e.position(),o={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{"id"!==e&&(o[e]=t[e])}),o})}function f(e){return e.edges().map(e=>{const t=e.data(),n=e._private.rscratch,o={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{["id","source","target"].includes(e)||(o[e]=t[e])}),o})}async function b(e,n){t.log.debug("Starting cose-bilkent layout algorithm");try{p(e);const n=await y(e),o=h(n),s=f(n);return t.log.debug(`Layout completed: ${o.length} nodes, ${s.length} edges`),{nodes:o,edges:s}}catch(e){throw t.log.error("Error in cose-bilkent layout algorithm:",e),e}}function p(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(e.edges))throw new Error("Edges array is required in layout data");return!0}o.default.use(s.default),(0,n.__name)(u,"addNodes"),(0,n.__name)(l,"addEdges"),(0,n.__name)(y,"createCytoscapeInstance"),(0,n.__name)(h,"extractPositionedNodes"),(0,n.__name)(f,"extractPositionedEdges"),(0,n.__name)(b,"executeCoseBilkentLayout"),(0,n.__name)(p,"validateLayoutData");var w=(0,n.__name)(async(e,t,{insertCluster:n,insertEdge:o,insertEdgeLabel:s,insertMarkers:c,insertNode:u,log:l,positionEdgeLabel:y},{algorithm:h})=>{const f={},p={},w=t.select("g");c(w,e.markers,e.type,e.diagramId);const E=w.insert("g").attr("class","subgraphs"),_=w.insert("g").attr("class","edgePaths"),x=w.insert("g").attr("class","edgeLabels"),O=w.insert("g").attr("class","nodes");l.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){const e=Object.assign({},t);p[t.id]=e,f[t.id]=e,await n(E,t)}else{const n=Object.assign({},t);f[t.id]=n;const o=await u(O,t,{config:e.config,dir:e.direction||"TB"}),s=o.node().getBBox();n.width=s.width,n.height=s.height,n.domId=o,l.debug(`Node ${t.id} dimensions: ${s.width}x${s.height}`)}})),l.debug("Running cose-bilkent layout algorithm");const j=Object.assign({},e,{nodes:e.nodes.map(e=>{const t=f[e.id];return Object.assign({},e,{width:t.width,height:t.height})})}),k=await b(j,e.config);l.debug("Positioning nodes based on layout results"),k.nodes.forEach(e=>{const t=f[e.id];t?.domId&&(t.domId.attr("transform",`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,l.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),k.edges.forEach(t=>{const n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),l.debug("Inserting and positioning edges"),await Promise.all(e.edges.map(async t=>{await s(x,t);const n=f[t.start??""],c=f[t.end??""];if(n&&c){const s=k.edges.find(e=>e.id===t.id);if(s){l.debug("APA01 positionedEdge",s);const u=Object.assign({},t),h=o(_,u,p,e.type,n,c,e.diagramId);y(u,h)}else{const s=Object.assign({},t,{points:[{x:n.x||0,y:n.y||0},{x:c.x||0,y:c.y||0}]}),u=o(_,s,p,e.type,n,c,e.diagramId);y(s,u)}}})),l.debug("Cose-bilkent rendering completed")},"render")},
|
|
2
|
-
__d(function(g,r,_i,a,m,e,d){var t,n;t=this,n=function(t){return(function(t){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=n,i.i=function(t){return t},i.d=function(t,n,o){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,'a',n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=1)})([function(n,i){n.exports=t},function(t,n,i){"use strict";var o=i(0).layoutBase.LayoutConstants,s=i(0).layoutBase.FDLayoutConstants,l=i(0).CoSEConstants,u=i(0).CoSELayout,p=i(0).CoSENode,c=i(0).layoutBase.PointD,E=i(0).layoutBase.DimensionD,y={ready:function(){},stop:function(){},quality:'default',nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:'end',animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function L(t,n){var i={};for(var o in t)i[o]=t[o];for(var o in n)i[o]=n[o];return i}function T(t){this.options=L(y,t),_(this.options)}var _=function(t){null!=t.nodeRepulsion&&(l.DEFAULT_REPULSION_STRENGTH=s.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(l.DEFAULT_EDGE_LENGTH=s.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(l.DEFAULT_SPRING_STRENGTH=s.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(l.DEFAULT_GRAVITY_STRENGTH=s.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(l.MAX_ITERATIONS=s.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=s.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=s.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),'draft'==t.quality?o.QUALITY=0:'proof'==t.quality?o.QUALITY=2:o.QUALITY=1,l.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!t.randomize,l.ANIMATE=s.ANIMATE=o.ANIMATE=t.animate,l.TILE=t.tile,l.TILING_PADDING_VERTICAL='function'==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL='function'==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};T.prototype.run=function(){var t,n,i=this.options,o=(this.idToLNode={},this.layout=new u),s=this;s.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:'layoutstart',layout:this});var l=o.newGraphManager();this.gm=l;var p=this.options.eles.nodes(),c=this.options.eles.edges();this.root=l.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(p),o);for(var E=0;E<c.length;E++){var y=c[E],L=this.idToLNode[y.data("source")],T=this.idToLNode[y.data("target")];L!==T&&0==L.getEdgesBetween(T).length&&(l.add(o.newEdge(),L,T).id=y.id())}var _=function(t,n){"number"==typeof t&&(t=n);var i=t.data('id'),o=s.idToLNode[i];return{x:o.getRect().getCenterX(),y:o.getRect().getCenterY()}},N=function l(){for(var u,p=function(){i.fit&&i.cy.fit(i.eles,i.padding),t||(t=!0,s.cy.one('layoutready',i.ready),s.cy.trigger({type:'layoutready',layout:s}))},c=s.options.refresh,E=0;E<c&&!u;E++)u=s.stopped||s.layout.tick();if(u)return o.checkLayoutSuccess()&&!o.isSubLayout&&o.doPostLayout(),o.tilingPostLayout&&o.tilingPostLayout(),o.isLayoutFinished=!0,s.options.eles.nodes().positions(_),p(),s.cy.one('layoutstop',s.options.stop),s.cy.trigger({type:'layoutstop',layout:s}),n&&cancelAnimationFrame(n),void(t=!1);var y=s.layout.getPositionsData();i.eles.nodes().positions(function(t,n){if("number"==typeof t&&(t=n),!t.isParent()){for(var i=t.id(),o=y[i],s=t;null==o&&(o=y[s.data('parent')]||y['DummyCompound_'+s.data('parent')],y[i]=o,null!=(s=s.parent()[0])););return null!=o?{x:o.x,y:o.y}:{x:t.position('x'),y:t.position('y')}}}),p(),n=requestAnimationFrame(l)};return o.addListener('layoutstarted',function(){'during'===s.options.animate&&(n=requestAnimationFrame(N))}),o.runLayout(),"during"!==this.options.animate&&(s.options.eles.nodes().not(":parent").layoutPositions(s,s.options,_),t=!1),this},T.prototype.getTopMostNodes=function(t){for(var n={},i=0;i<t.length;i++)n[t[i].id()]=!0;var o=t.filter(function(t,i){"number"==typeof t&&(t=i);for(var o=t.parent()[0];null!=o;){if(n[o.id()])return!1;o=o.parent()[0]}return!0});return o},T.prototype.processChildrenList=function(t,n,i){for(var o=n.length,s=0;s<o;s++){var l,u,y=n[s],L=y.children(),T=y.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((l=null!=y.outerWidth()&&null!=y.outerHeight()?t.add(new p(i.graphManager,new c(y.position('x')-T.w/2,y.position('y')-T.h/2),new E(parseFloat(T.w),parseFloat(T.h)))):t.add(new p(this.graphManager))).id=y.data("id"),l.paddingLeft=parseInt(y.css('padding')),l.paddingTop=parseInt(y.css('padding')),l.paddingRight=parseInt(y.css('padding')),l.paddingBottom=parseInt(y.css('padding')),this.options.nodeDimensionsIncludeLabels&&y.isParent()){var _=y.boundingBox({includeLabels:!0,includeNodes:!1}).w,N=y.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=y.css("text-halign");l.labelWidth=_,l.labelHeight=N,l.labelPos=f}this.idToLNode[y.data("id")]=l,isNaN(l.rect.x)&&(l.rect.x=0),isNaN(l.rect.y)&&(l.rect.y=0),null!=L&&L.length>0&&(u=i.getGraphManager().add(i.newGraph(),l),this.processChildrenList(u,L,i))}},T.prototype.stop=function(){return this.stopped=!0,this};var N=function(t){t('layout','cose-bilkent',T)};'undefined'!=typeof cytoscape&&N(cytoscape),t.exports=N}])},'object'==typeof e&&'object'==typeof m?m.exports=n(r(d[0])):'function'==typeof define&&define.amd?define(["cose-base"],n):'object'==typeof e?e.cytoscapeCoseBilkent=n(r(d[0])):t.cytoscapeCoseBilkent=n(t.coseBase)},
|
|
3
|
-
__d(function(g,_r,_i,a,m,e,d){var t,i;t=this,i=function(t){return(function(t){var i={};function r(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=i,r.i=function(t){return t},r.d=function(t,i,o){r.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},r.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(i,'a',i),i},r.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},r.p="",r(r.s=7)})([function(i,r){i.exports=t},function(t,i,r){"use strict";var o=r(0).FDLayoutConstants;function n(){}for(var s in o)n[s]=o[s];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=n},function(t,i,r){"use strict";var o=r(0).FDLayoutEdge;function n(t,i,r){o.call(this,t,i,r)}for(var s in n.prototype=Object.create(o.prototype),o)n[s]=o[s];t.exports=n},function(t,i,r){"use strict";var o=r(0).LGraph;function n(t,i,r){o.call(this,t,i,r)}for(var s in n.prototype=Object.create(o.prototype),o)n[s]=o[s];t.exports=n},function(t,i,r){"use strict";var o=r(0).LGraphManager;function n(t){o.call(this,t)}for(var s in n.prototype=Object.create(o.prototype),o)n[s]=o[s];t.exports=n},function(t,i,r){"use strict";var o=r(0).FDLayoutNode,n=r(0).IMath;function s(t,i,r,n){o.call(this,t,i,r,n)}for(var h in s.prototype=Object.create(o.prototype),o)s[h]=o[h];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.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},s.prototype.propogateDisplacementToChildren=function(t,i){for(var r,o=this.getChild().getNodes(),n=0;n<o.length;n++)null==(r=o[n]).getChild()?(r.moveBy(t,i),r.displacementX+=t,r.displacementY+=i):r.propogateDisplacementToChildren(t,i)},s.prototype.setPred1=function(t){this.pred1=t},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(t){this.next=t},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(t){this.processed=t},s.prototype.isProcessed=function(){return processed},t.exports=s},function(t,i,r){"use strict";var o=r(0).FDLayout,n=r(4),s=r(3),h=r(5),l=r(2),p=r(1),c=r(0).FDLayoutConstants,u=r(0).LayoutConstants,f=r(0).Point,T=r(0).PointD,v=r(0).Layout,E=r(0).Integer,y=r(0).IGeometry,N=r(0).LGraph,w=r(0).Transform;function A(){o.call(this),this.toBeTiled={}}for(var C in A.prototype=Object.create(o.prototype),o)A[C]=o[C];A.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},A.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},A.prototype.newNode=function(t){return new h(this.graphManager,t)},A.prototype.newEdge=function(t){return new l(null,null,t)},A.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=c.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=c.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=c.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},A.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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)p.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),i=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return i.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var i=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return i.has(t)});this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 t=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(i){return t.has(i)});this.graphManager.setAllNodesToApplyGravitation(i),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,o=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,o),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),i={},r=0;r<t.length;r++){var o=t[r].rect,n=t[r].id;i[n]={id:n,x:o.getCenterX(),y:o.getCenterY(),w:o.width,h:o.height}}return i},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if('during'===c.ANIMATE)this.emit('layoutstarted');else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},A.prototype.calculateNodesToApplyGravitationTo=function(){var t,i,r=[],o=this.graphManager.getGraphs(),n=o.length;for(i=0;i<n;i++)(t=o[i]).updateConnected(),t.isConnected||(r=r.concat(t.getNodes()));return r},A.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var i,r=new Set;for(i=0;i<t.length;i++){var o=t[i];if(!r.has(o)){var n=o.getSource(),s=o.getTarget();if(n==s)o.getBendpoints().push(new T),o.getBendpoints().push(new T),this.createDummyNodesForBendpoints(o),r.add(o);else{var h=[];if(h=(h=h.concat(n.getEdgeListToNode(s))).concat(s.getEdgeListToNode(n)),!r.has(h[0])){var l;if(h.length>1)for(l=0;l<h.length;l++){var p=h[l];p.getBendpoints().push(new T),this.createDummyNodesForBendpoints(p)}h.forEach(function(t){r.add(t)})}}}if(r.size==t.length)break}},A.prototype.positionNodesRadially=function(t){for(var i=new f(0,0),r=Math.ceil(Math.sqrt(t.length)),o=0,n=0,s=0,h=new T(0,0),l=0;l<t.length;l++){l%r==0&&(s=0,n=o,0!=l&&(n+=p.DEFAULT_COMPONENT_SEPERATION),o=0);var c=t[l],E=v.findCenterOfTree(c);i.x=s,i.y=n,(h=A.radialLayout(c,E,i)).y>o&&(o=Math.floor(h.y)),s=Math.floor(h.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(u.WORLD_CENTER_X-h.x/2,u.WORLD_CENTER_Y-h.y/2))},A.radialLayout=function(t,i,r){var o=Math.max(this.maxDiagonalInTree(t),p.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(i,null,0,359,0,o);var n=N.calculateBounds(t),s=new w;s.setDeviceOrgX(n.getMinX()),s.setDeviceOrgY(n.getMinY()),s.setWorldOrgX(r.x),s.setWorldOrgY(r.y);for(var h=0;h<t.length;h++)t[h].transform(s);var l=new T(n.getMaxX(),n.getMaxY());return s.inverseTransformPoint(l)},A.branchRadialLayout=function(t,i,r,o,n,s){var h=(o-r+1)/2;h<0&&(h+=180);var l=(h+r)%360*y.TWO_PI/360,p=(Math.cos(l),n*Math.cos(l)),c=n*Math.sin(l);t.setCenter(p,c);var u=[],f=(u=u.concat(t.getEdges())).length;null!=i&&f--;for(var T,v=0,E=u.length,N=t.getEdgesBetween(i);N.length>1;){var w=N[0];N.splice(0,1);var C=u.indexOf(w);C>=0&&u.splice(C,1),E--,f--}T=null!=i?(u.indexOf(N[0])+1)%E:0;for(var L=Math.abs(o-r)/f,D=T;v!=f;D=++D%E){var G=u[D].getOtherEnd(t);if(G!=i){var M=(r+v*L)%360,_=(M+L)%360;A.branchRadialLayout(G,t,M,_,n+s,s),v++}}},A.maxDiagonalInTree=function(t){for(var i=E.MIN_VALUE,r=0;r<t.length;r++){var o=t[r].getDiagonal();o>i&&(i=o)}return i},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var t=this,i={};this.memberGroups={},this.idToDummyNode={};for(var r=[],o=this.graphManager.getAllNodes(),n=0;n<o.length;n++){var s=(l=o[n]).getParent();0!==this.getNodeDegreeWithChildren(l)||null!=s.id&&this.getToBeTiled(s)||r.push(l)}for(n=0;n<r.length;n++){var l,p=(l=r[n]).getParent().id;void 0===i[p]&&(i[p]=[]),i[p]=i[p].concat(l)}Object.keys(i).forEach(function(r){if(i[r].length>1){var o="DummyCompound_"+r;t.memberGroups[o]=i[r];var n=i[r][0].getParent(),s=new h(t.graphManager);s.id=o,s.paddingLeft=n.paddingLeft||0,s.paddingRight=n.paddingRight||0,s.paddingBottom=n.paddingBottom||0,s.paddingTop=n.paddingTop||0,t.idToDummyNode[o]=s;var l=t.getGraphManager().add(t.newGraph(),s),p=n.getChild();p.add(s);for(var c=0;c<i[r].length;c++){var u=i[r][c];p.remove(u),l.add(u)}}})},A.prototype.clearCompounds=function(){var t={},i={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)i[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,i)},A.prototype.clearZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(r){var o=t.idToDummyNode[r];i[r]=t.tileNodes(t.memberGroups[r],o.paddingLeft+o.paddingRight),o.rect.width=i[r].width,o.rect.height=i[r].height})},A.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var i=this.compoundOrder[t],r=i.id,o=i.paddingLeft,n=i.paddingTop;this.adjustLocations(this.tiledMemberPack[r],i.rect.x,i.rect.y,o,n)}},A.prototype.repopulateZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(r){var o=t.idToDummyNode[r],n=o.paddingLeft,s=o.paddingTop;t.adjustLocations(i[r],o.rect.x,o.rect.y,n,s)})},A.prototype.getToBeTiled=function(t){var i=t.id;if(null!=this.toBeTiled[i])return this.toBeTiled[i];var r=t.getChild();if(null==r)return this.toBeTiled[i]=!1,!1;for(var o=r.getNodes(),n=0;n<o.length;n++){var s=o[n];if(this.getNodeDegree(s)>0)return this.toBeTiled[i]=!1,!1;if(null!=s.getChild()){if(!this.getToBeTiled(s))return this.toBeTiled[i]=!1,!1}else this.toBeTiled[s.id]=!1}return this.toBeTiled[i]=!0,!0},A.prototype.getNodeDegree=function(t){t.id;for(var i=t.getEdges(),r=0,o=0;o<i.length;o++){var n=i[o];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},A.prototype.getNodeDegreeWithChildren=function(t){var i=this.getNodeDegree(t);if(null==t.getChild())return i;for(var r=t.getChild().getNodes(),o=0;o<r.length;o++){var n=r[o];i+=this.getNodeDegreeWithChildren(n)}return i},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(t){for(var i=0;i<t.length;i++){var r=t[i];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},A.prototype.adjustLocations=function(t,i,r,o,n){r+=n;for(var s=i+=o,h=0;h<t.rows.length;h++){var l=t.rows[h];i=s;for(var p=0,c=0;c<l.length;c++){var u=l[c];u.rect.x=i,u.rect.y=r,i+=u.rect.width+t.horizontalPadding,u.rect.height>p&&(p=u.rect.height)}r+=p+t.verticalPadding}},A.prototype.tileCompoundMembers=function(t,i){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(o){var n=i[o];r.tiledMemberPack[o]=r.tileNodes(t[o],n.paddingLeft+n.paddingRight),n.rect.width=r.tiledMemberPack[o].width,n.rect.height=r.tiledMemberPack[o].height})},A.prototype.tileNodes=function(t,i){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:i,verticalPadding:p.TILING_PADDING_VERTICAL,horizontalPadding:p.TILING_PADDING_HORIZONTAL};t.sort(function(t,i){return t.rect.width*t.rect.height>i.rect.width*i.rect.height?-1:t.rect.width*t.rect.height<i.rect.width*i.rect.height?1:0});for(var o=0;o<t.length;o++){var n=t[o];0==r.rows.length?this.insertNodeToRow(r,n,0,i):this.canAddHorizontal(r,n.rect.width,n.rect.height)?this.insertNodeToRow(r,n,this.getShortestRowIndex(r),i):this.insertNodeToRow(r,n,r.rows.length,i),this.shiftToLastRow(r)}return r},A.prototype.insertNodeToRow=function(t,i,r,o){var n=o;r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var s=t.rowWidth[r]+i.rect.width;t.rows[r].length>0&&(s+=t.horizontalPadding),t.rowWidth[r]=s,t.width<s&&(t.width=s);var h=i.rect.height;r>0&&(h+=t.verticalPadding);var l=0;h>t.rowHeight[r]&&(l=t.rowHeight[r],t.rowHeight[r]=h,l=t.rowHeight[r]-l),t.height+=l,t.rows[r].push(i)},A.prototype.getShortestRowIndex=function(t){for(var i=-1,r=Number.MAX_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]<r&&(i=o,r=t.rowWidth[o]);return i},A.prototype.getLongestRowIndex=function(t){for(var i=-1,r=Number.MIN_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]>r&&(i=o,r=t.rowWidth[o]);return i},A.prototype.canAddHorizontal=function(t,i,r){var o=this.getShortestRowIndex(t);if(o<0)return!0;var n=t.rowWidth[o];if(n+t.horizontalPadding+i<=t.width)return!0;var s,h,l=0;return t.rowHeight[o]<r&&o>0&&(l=r+t.verticalPadding-t.rowHeight[o]),s=t.width-n>=i+t.horizontalPadding?(t.height+l)/(n+i+t.horizontalPadding):(t.height+l)/t.width,l=r+t.verticalPadding,(h=t.width<i?(t.height+l)/i:(t.height+l)/t.width)<1&&(h=1/h),s<1&&(s=1/s),s<h},A.prototype.shiftToLastRow=function(t){var i=this.getLongestRowIndex(t),r=t.rowWidth.length-1,o=t.rows[i],n=o[o.length-1],s=n.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>s&&i!=r){o.splice(-1,1),t.rows[r].push(n),t.rowWidth[i]=t.rowWidth[i]-s,t.rowWidth[r]=t.rowWidth[r]+s,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var h=Number.MIN_VALUE,l=0;l<o.length;l++)o[l].height>h&&(h=o[l].height);i>0&&(h+=t.verticalPadding);var p=t.rowHeight[i]+t.rowHeight[r];t.rowHeight[i]=h,t.rowHeight[r]<n.height+t.verticalPadding&&(t.rowHeight[r]=n.height+t.verticalPadding);var c=t.rowHeight[i]+t.rowHeight[r];t.height+=c-p,this.shiftToLastRow(t)}},A.prototype.tilingPreLayout=function(){p.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){p.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var t,i=[],r=!0;r;){var o=this.graphManager.getAllNodes(),n=[];r=!1;for(var s=0;s<o.length;s++)1!=(t=o[s]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(n.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var h=[],l=0;l<n.length;l++)1==n[l][0].getEdges().length&&(h.push(n[l]),n[l][0].getOwner().remove(n[l][0]));i.push(h),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=i},A.prototype.growTree=function(t){for(var i,r=t[t.length-1],o=0;o<r.length;o++)i=r[o],this.findPlaceforPrunedNode(i),i[2].add(i[0]),i[2].add(i[1],i[1].source,i[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(t){var i,r,o=t[0],n=(r=o==t[1].source?t[1].target:t[1].source).startX,s=r.finishX,h=r.startY,l=r.finishY,p=[0,0,0,0];if(h>0)for(var u=n;u<=s;u++)p[0]+=this.grid[u][h-1].length+this.grid[u][h].length-1;if(s<this.grid.length-1)for(u=h;u<=l;u++)p[1]+=this.grid[s+1][u].length+this.grid[s][u].length-1;if(l<this.grid[0].length-1)for(u=n;u<=s;u++)p[2]+=this.grid[u][l+1].length+this.grid[u][l].length-1;if(n>0)for(u=h;u<=l;u++)p[3]+=this.grid[n-1][u].length+this.grid[n][u].length-1;for(var f,T,v=E.MAX_VALUE,y=0;y<p.length;y++)p[y]<v?(v=p[y],f=1,T=y):p[y]==v&&f++;if(3==f&&0==v)0==p[0]&&0==p[1]&&0==p[2]?i=1:0==p[0]&&0==p[1]&&0==p[3]?i=0:0==p[0]&&0==p[2]&&0==p[3]?i=3:0==p[1]&&0==p[2]&&0==p[3]&&(i=2);else if(2==f&&0==v){var N=Math.floor(2*Math.random());i=0==p[0]&&0==p[1]?0==N?0:1:0==p[0]&&0==p[2]?0==N?0:2:0==p[0]&&0==p[3]?0==N?0:3:0==p[1]&&0==p[2]?0==N?1:2:0==p[1]&&0==p[3]?0==N?1:3:0==N?2:3}else i=4==f&&0==v?N=Math.floor(4*Math.random()):T;0==i?o.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-c.DEFAULT_EDGE_LENGTH-o.getHeight()/2):1==i?o.setCenter(r.getCenterX()+r.getWidth()/2+c.DEFAULT_EDGE_LENGTH+o.getWidth()/2,r.getCenterY()):2==i?o.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+c.DEFAULT_EDGE_LENGTH+o.getHeight()/2):o.setCenter(r.getCenterX()-r.getWidth()/2-c.DEFAULT_EDGE_LENGTH-o.getWidth()/2,r.getCenterY())},t.exports=A},function(t,i,r){"use strict";var o={};o.layoutBase=r(0),o.CoSEConstants=r(1),o.CoSEEdge=r(2),o.CoSEGraph=r(3),o.CoSEGraphManager=r(4),o.CoSELayout=r(6),o.CoSENode=r(5),t.exports=o}])},'object'==typeof e&&'object'==typeof m?m.exports=i(_r(d[0])):'function'==typeof define&&define.amd?define(["layout-base"],i):'object'==typeof e?e.coseBase=i(_r(d[0])):t.coseBase=i(t.layoutBase)},5335,[5336]);
|
|
4
|
-
__d(function(g,_r,_i3,_a,m,e,_d){var t,r;t=this,r=function(){return(function(t){var r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=r,n.i=function(t){return t},n.d=function(t,r,i){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,'a',r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=26)})([function(t,r,n){"use strict";function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,t.exports=i},function(t,r,n){"use strict";var i=n(2),o=n(8),s=n(9);function a(t,r,n){i.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=r}for(var h in a.prototype=Object.create(i.prototype),i)a[h]=i[h];a.prototype.getSource=function(){return this.source},a.prototype.getTarget=function(){return this.target},a.prototype.isInterGraph=function(){return this.isInterGraph},a.prototype.getLength=function(){return this.length},a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},a.prototype.getBendpoints=function(){return this.bendpoints},a.prototype.getLca=function(){return this.lca},a.prototype.getSourceInLca=function(){return this.sourceInLca},a.prototype.getTargetInLca=function(){return this.targetInLca},a.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(t,r){for(var n=this.getOtherEnd(t),i=r.getGraphManager().getRoot();;){if(n.getOwner()==r)return n;if(n.getOwner()==i)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},a.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=a},function(t,r,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,r,n){"use strict";var i=n(2),o=n(10),s=n(13),a=n(0),h=n(16),u=n(4);function l(t,r,n,a){null==n&&null==a&&(a=r),i.call(this,a),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=r?new s(r.x,r.y,n.width,n.height):new s}for(var c in l.prototype=Object.create(i.prototype),i)l[c]=i[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,r){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=r.width,this.rect.height=r.height},l.prototype.setCenter=function(t,r){this.rect.x=t-this.rect.width/2,this.rect.y=r-this.rect.height/2},l.prototype.setLocation=function(t,r){this.rect.x=t,this.rect.y=r},l.prototype.moveBy=function(t,r){this.rect.x+=t,this.rect.y+=r},l.prototype.getEdgeListToNode=function(t){var r=[],n=this;return n.edges.forEach(function(i){if(i.target==t){if(i.source!=n)throw"Incorrect edge source!";r.push(i)}}),r},l.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(i){if(i.source!=n&&i.target!=n)throw"Incorrect edge source and/or target";i.target!=t&&i.source!=t||r.push(i)}),r},l.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(n){if(n.source==r)t.add(n.target);else{if(n.target!=r)throw"Incorrect incidency!";t.add(n.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var r=this.child.getNodes(),n=0;n<r.length;n++)r[n].withChildren().forEach(function(r){t.add(r)});return t},l.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var r=this.child.getNodes(),n=0;n<r.length;n++)t+=r[n].getNoOfChildren();return 0==t&&(t=1),t},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return null==this.child?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)},l.prototype.scatter=function(){var t,r,n=-a.INITIAL_WORLD_BOUNDARY,i=a.INITIAL_WORLD_BOUNDARY;t=a.WORLD_CENTER_X+h.nextDouble()*(i-n)+n;var o=-a.INITIAL_WORLD_BOUNDARY,s=a.INITIAL_WORLD_BOUNDARY;r=a.WORLD_CENTER_Y+h.nextDouble()*(s-o)+o,this.rect.x=t,this.rect.y=r},l.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),a.NODE_DIMENSIONS_INCLUDE_LABELS){var r=t.getRight()-t.getLeft(),n=t.getBottom()-t.getTop();this.labelWidth>r&&(this.rect.x-=(this.labelWidth-r)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var r=this.rect.x;r>a.WORLD_BOUNDARY?r=a.WORLD_BOUNDARY:r<-a.WORLD_BOUNDARY&&(r=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var i=new u(r,n),o=t.inverseTransformPoint(i);this.setLocation(o.x,o.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,r,n){"use strict";function i(t,r){null==t&&null==r?(this.x=0,this.y=0):(this.x=t,this.y=r)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,r,n){"use strict";var i=n(2),o=n(10),s=n(0),a=n(6),h=n(3),u=n(1),l=n(13),c=n(12),p=n(11);function f(t,r,n){i.call(this,n),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=r&&r instanceof a?this.graphManager=r:null!=r&&r instanceof Layout&&(this.graphManager=r.graphManager)}for(var d in f.prototype=Object.create(i.prototype),i)f[d]=i[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(t,r,n){if(null==r&&null==n){var i=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(i)>-1)throw"Node already in graph!";return i.owner=this,this.getNodes().push(i),i}var o=t;if(!(this.getNodes().indexOf(r)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(r.owner!=n.owner||r.owner!=this)throw"Both owners must be this graph!";return r.owner!=n.owner?null:(o.source=r,o.target=n,o.isInterGraph=!1,this.getEdges().push(o),r.edges.push(o),n!=r&&n.edges.push(o),o)},f.prototype.remove=function(t){var r=t;if(t instanceof h){if(null==r)throw"Node is null!";if(null==r.owner||r.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=r.edges.slice(),i=n.length,o=0;o<i;o++)(s=n[o]).isInterGraph?this.graphManager.remove(s):s.source.owner.remove(s);if(-1==(a=this.nodes.indexOf(r)))throw"Node not in owner node list!";this.nodes.splice(a,1)}else if(t instanceof u){var s;if(null==(s=t))throw"Edge is null!";if(null==s.source||null==s.target)throw"Source and/or target is null!";if(null==s.source.owner||null==s.target.owner||s.source.owner!=this||s.target.owner!=this)throw"Source and/or target owner is invalid!";var a,l=s.source.edges.indexOf(s),c=s.target.edges.indexOf(s);if(!(l>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(s.source.edges.splice(l,1),s.target!=s.source&&s.target.edges.splice(c,1),-1==(a=s.source.owner.getEdges().indexOf(s)))throw"Not in owner's edge list!";s.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var t,r,n,i=o.MAX_VALUE,s=o.MAX_VALUE,a=this.getNodes(),h=a.length,u=0;u<h;u++){var l=a[u];i>(t=l.getTop())&&(i=t),s>(r=l.getLeft())&&(s=r)}return i==o.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=s-n,this.top=i-n,new c(this.left,this.top))},f.prototype.updateBounds=function(t){for(var r,n,i,s,a,h=o.MAX_VALUE,u=-o.MAX_VALUE,c=o.MAX_VALUE,p=-o.MAX_VALUE,f=this.nodes,d=f.length,y=0;y<d;y++){var E=f[y];t&&null!=E.child&&E.updateBounds(),h>(r=E.getLeft())&&(h=r),u<(n=E.getRight())&&(u=n),c>(i=E.getTop())&&(c=i),p<(s=E.getBottom())&&(p=s)}var v=new l(h,c,u-h,p-c);h==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(t){for(var r,n,i,s,a=o.MAX_VALUE,h=-o.MAX_VALUE,u=o.MAX_VALUE,c=-o.MAX_VALUE,p=t.length,f=0;f<p;f++){var d=t[f];a>(r=d.getLeft())&&(a=r),h<(n=d.getRight())&&(h=n),u>(i=d.getTop())&&(u=i),c<(s=d.getBottom())&&(c=s)}return new l(a,u,h-a,c-u)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var t=0,r=this.nodes,n=r.length,i=0;i<n;i++)t+=r[i].calcEstimatedSize();return this.estimatedSize=0==t?s.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},f.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var r,n,i=new p,o=new Set,s=this.nodes[0];for(s.withChildren().forEach(function(t){i.push(t),o.add(t)});0!==i.length;)for(var a=(r=(s=i.shift()).getEdges()).length,h=0;h<a;h++)null==(n=r[h].getOtherEndInGraph(s,this))||o.has(n)||n.withChildren().forEach(function(t){i.push(t),o.add(t)});if(this.isConnected=!1,o.size>=this.nodes.length){var u=0;o.forEach(function(r){r.owner==t&&u++}),u==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=f},function(t,r,n){"use strict";var i,o=n(1);function s(t){i=n(5),this.layout=t,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var t=this.layout.newGraph(),r=this.layout.newNode(null),n=this.add(t,r);return this.setRootGraph(n),this.rootGraph},s.prototype.add=function(t,r,n,i,o){if(null==n&&null==i&&null==o){if(null==t)throw"Graph is null!";if(null==r)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=r.child)throw"Already has a child!";return t.parent=r,r.child=t,t}o=n,n=t;var s=(i=r).getOwner(),a=o.getOwner();if(null==s||s.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(s==a)return n.isInterGraph=!1,s.add(n,i,o);if(n.isInterGraph=!0,n.source=i,n.target=o,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},s.prototype.remove=function(t){if(t instanceof i){var r=t;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(r!=this.rootGraph&&(null==r.parent||r.parent.graphManager!=this))throw"Invalid parent node!";for(var n,s=[],a=(s=s.concat(r.getEdges())).length,h=0;h<a;h++)n=s[h],r.remove(n);var u,l=[];for(a=(l=l.concat(r.getNodes())).length,h=0;h<a;h++)u=l[h],r.remove(u);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(t instanceof o){if(null==(n=t))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(c=n.source.edges.indexOf(n),n.source.edges.splice(c,1),c=n.target.edges.indexOf(n),n.target.edges.splice(c,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";c=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(c,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],r=this.getGraphs(),n=r.length,i=0;i<n;i++)t=t.concat(r[i].getNodes());this.allNodes=t}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],r=this.getGraphs(),n=(r.length,0);n<r.length;n++)t=t.concat(r[n].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(t,r){if(null==t||null==r)throw"assert failed";if(t==r)return!0;for(var n,i=t.getOwner();null!=(n=i.getParent());){if(n==r)return!0;if(null==(i=n.getOwner()))break}for(i=r.getOwner();null!=(n=i.getParent());){if(n==t)return!0;if(null==(i=n.getOwner()))break}return!1},s.prototype.calcLowestCommonAncestors=function(){for(var t,r,n,i,o,s=this.getAllEdges(),a=s.length,h=0;h<a;h++)if(r=(t=s[h]).source,n=t.target,t.lca=null,t.sourceInLca=r,t.targetInLca=n,r!=n){for(i=r.getOwner();null==t.lca;){for(t.targetInLca=n,o=n.getOwner();null==t.lca;){if(o==i){t.lca=o;break}if(o==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=o.getParent(),o=t.targetInLca.getOwner()}if(i==this.rootGraph)break;null==t.lca&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=r.getOwner()},s.prototype.calcLowestCommonAncestor=function(t,r){if(t==r)return t.getOwner();for(var n=t.getOwner();null!=n;){for(var i=r.getOwner();null!=i;){if(i==n)return i;i=i.getParent().getOwner()}n=n.getParent().getOwner()}return n},s.prototype.calcInclusionTreeDepths=function(t,r){var n;null==t&&null==r&&(t=this.rootGraph,r=1);for(var i=t.getNodes(),o=i.length,s=0;s<o;s++)(n=i[s]).inclusionTreeDepth=r,null!=n.child&&this.calcInclusionTreeDepths(n.child,r+1)},s.prototype.includesInvalidEdge=function(){for(var t,r=this.edges.length,n=0;n<r;n++)if(t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=s},function(t,r,n){"use strict";var i=n(0);function o(){}for(var s in i)o[s]=i[s];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=3*o.MAX_NODE_DISPLACEMENT_INCREMENTAL,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,t.exports=o},function(t,r,n){"use strict";var i=n(12);function o(){}o.calcSeparationAmount=function(t,r,n,i){if(!t.intersects(r))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(t,r,o),n[0]=Math.min(t.getRight(),r.getRight())-Math.max(t.x,r.x),n[1]=Math.min(t.getBottom(),r.getBottom())-Math.max(t.y,r.y),t.getX()<=r.getX()&&t.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-t.getX(),t.getRight()-r.getRight()):r.getX()<=t.getX()&&r.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-r.getX(),r.getRight()-t.getRight())),t.getY()<=r.getY()&&t.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-t.getY(),t.getBottom()-r.getBottom()):r.getY()<=t.getY()&&r.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-r.getY(),r.getBottom()-t.getBottom()));var s=Math.abs((r.getCenterY()-t.getCenterY())/(r.getCenterX()-t.getCenterX()));r.getCenterY()===t.getCenterY()&&r.getCenterX()===t.getCenterX()&&(s=1);var a=s*n[0],h=n[1]/s;n[0]<h?h=n[0]:a=n[1],n[0]=-1*o[0]*(h/2+i),n[1]=-1*o[1]*(a/2+i)},o.decideDirectionsForOverlappingNodes=function(t,r,n){t.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,t.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},o.getIntersection2=function(t,r,n){var i=t.getCenterX(),o=t.getCenterY(),s=r.getCenterX(),a=r.getCenterY();if(t.intersects(r))return n[0]=i,n[1]=o,n[2]=s,n[3]=a,!0;var h=t.getX(),u=t.getY(),l=t.getRight(),c=t.getX(),p=t.getBottom(),f=t.getRight(),d=t.getWidthHalf(),y=t.getHeightHalf(),E=r.getX(),v=r.getY(),A=r.getRight(),_=r.getX(),O=r.getBottom(),N=r.getRight(),L=r.getWidthHalf(),T=r.getHeightHalf(),I=!1,D=!1;if(i===s){if(o>a)return n[0]=i,n[1]=u,n[2]=s,n[3]=O,!1;if(o<a)return n[0]=i,n[1]=p,n[2]=s,n[3]=v,!1}else if(o===a){if(i>s)return n[0]=h,n[1]=o,n[2]=A,n[3]=a,!1;if(i<s)return n[0]=l,n[1]=o,n[2]=E,n[3]=a,!1}else{var w=t.height/t.width,R=r.height/r.width,M=(a-o)/(s-i),x=void 0,C=void 0,G=void 0,S=void 0,F=void 0,Y=void 0;if(-w===M?i>s?(n[0]=c,n[1]=p,I=!0):(n[0]=l,n[1]=u,I=!0):w===M&&(i>s?(n[0]=h,n[1]=u,I=!0):(n[0]=f,n[1]=p,I=!0)),-R===M?s>i?(n[2]=_,n[3]=O,D=!0):(n[2]=A,n[3]=v,D=!0):R===M&&(s>i?(n[2]=E,n[3]=v,D=!0):(n[2]=N,n[3]=O,D=!0)),I&&D)return!1;if(i>s?o>a?(x=this.getCardinalDirection(w,M,4),C=this.getCardinalDirection(R,M,2)):(x=this.getCardinalDirection(-w,M,3),C=this.getCardinalDirection(-R,M,1)):o>a?(x=this.getCardinalDirection(-w,M,1),C=this.getCardinalDirection(-R,M,3)):(x=this.getCardinalDirection(w,M,2),C=this.getCardinalDirection(R,M,4)),!I)switch(x){case 1:S=u,G=i+-y/M,n[0]=G,n[1]=S;break;case 2:G=f,S=o+d*M,n[0]=G,n[1]=S;break;case 3:S=p,G=i+y/M,n[0]=G,n[1]=S;break;case 4:G=c,S=o+-d*M,n[0]=G,n[1]=S}if(!D)switch(C){case 1:Y=v,F=s+-T/M,n[2]=F,n[3]=Y;break;case 2:F=N,Y=a+L*M,n[2]=F,n[3]=Y;break;case 3:Y=O,F=s+T/M,n[2]=F,n[3]=Y;break;case 4:F=_,Y=a+-L*M,n[2]=F,n[3]=Y}}return!1},o.getCardinalDirection=function(t,r,n){return t>r?n:1+n%4},o.getIntersection=function(t,r,n,o){if(null==o)return this.getIntersection2(t,r,n);var s,a,h,u,l,c,p,f=t.x,d=t.y,y=r.x,E=r.y,v=n.x,A=n.y,_=o.x,O=o.y;return 0===(p=(s=E-d)*(u=v-_)-(a=O-A)*(h=f-y))?null:new i((h*(c=_*A-v*O)-u*(l=y*d-f*E))/p,(a*l-s*c)/p)},o.angleOfVector=function(t,r,n,i){var o=void 0;return t!==n?(o=Math.atan((i-r)/(n-t)),n<t?o+=Math.PI:i<r&&(o+=this.TWO_PI)):o=i<r?this.ONE_AND_HALF_PI:this.HALF_PI,o},o.doIntersect=function(t,r,n,i){var o=t.x,s=t.y,a=r.x,h=r.y,u=n.x,l=n.y,c=i.x,p=i.y,f=(a-o)*(p-l)-(c-u)*(h-s);if(0===f)return!1;var d=((p-l)*(c-o)+(u-c)*(p-s))/f,y=((s-h)*(c-o)+(a-o)*(p-s))/f;return 0<d&&d<1&&0<y&&y<1},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,t.exports=o},function(t,r,n){"use strict";function i(){}i.sign=function(t){return t>0?1:t<0?-1:0},i.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},i.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=i},function(t,r,n){"use strict";function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,t.exports=i},function(t,r,n){"use strict";var i=(function(){function t(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(r,n,i){return n&&t(r.prototype,n),i&&t(r,i),r}})();function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var s=function(t){return{value:t,next:null,prev:null}},a=function(t,r,n,i){return null!==t?t.next=r:i.head=r,null!==n?n.prev=r:i.tail=r,r.prev=t,r.next=n,i.length++,r},h=function(t,r){var n=t.prev,i=t.next;return null!==n?n.next=i:r.head=i,null!==i?i.prev=n:r.tail=n,t.prev=t.next=null,r.length--,t},u=(function(){function t(r){var n=this;o(this,t),this.length=0,this.head=null,this.tail=null,null!=r&&r.forEach(function(t){return n.push(t)})}return i(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,r){return a(r.prev,s(t),r,this)}},{key:"insertAfter",value:function(t,r){return a(r,s(t),r.next,this)}},{key:"insertNodeBefore",value:function(t,r){return a(r.prev,t,r,this)}},{key:"insertNodeAfter",value:function(t,r){return a(r,t,r.next,this)}},{key:"push",value:function(t){return a(this.tail,s(t),null,this)}},{key:"unshift",value:function(t){return a(null,s(t),this.head,this)}},{key:"remove",value:function(t){return h(t,this)}},{key:"pop",value:function(){return h(this.tail,this).value}},{key:"popNode",value:function(){return h(this.tail,this)}},{key:"shift",value:function(){return h(this.head,this).value}},{key:"shiftNode",value:function(){return h(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;return n.value}}},{key:"set_object_at",value:function(t,r){if(t<=this.length()){for(var n=1,i=this.head;n<t;)i=i.next,n++;i.value=r}}}]),t})();t.exports=u},function(t,r,n){"use strict";function i(t,r,n){this.x=null,this.y=null,null==t&&null==r&&null==n?(this.x=0,this.y=0):'number'==typeof t&&'number'==typeof r&&null==n?(this.x=t,this.y=r):'Point'==t.constructor.name&&null==r&&null==n&&(n=t,this.x=n.x,this.y=n.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(t,r,n){'Point'==t.constructor.name&&null==r&&null==n?(n=t,this.setLocation(n.x,n.y)):'number'==typeof t&&'number'==typeof r&&null==n&&(parseInt(t)==t&&parseInt(r)==r?this.move(t,r):(this.x=Math.floor(t+.5),this.y=Math.floor(r+.5)))},i.prototype.move=function(t,r){this.x=t,this.y=r},i.prototype.translate=function(t,r){this.x+=t,this.y+=r},i.prototype.equals=function(t){if("Point"==t.constructor.name){var r=t;return this.x==r.x&&this.y==r.y}return this==t},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=i},function(t,r,n){"use strict";function i(t,r,n,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=r&&null!=n&&null!=i&&(this.x=t,this.y=r,this.width=n,this.height=i)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(t){this.x=t},i.prototype.getY=function(){return this.y},i.prototype.setY=function(t){this.y=t},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},t.exports=i},function(t,r,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(){}o.lastID=0,o.createID=function(t){return o.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=o.getString(),o.lastID++),t.uniqueID)},o.getString=function(t){return null==t&&(t=o.lastID),"Object#"+t},o.isPrimitive=function(t){var r=void 0===t?"undefined":i(t);return null==t||"object"!=r&&"function"!=r},t.exports=o},function(t,r,n){"use strict";function i(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}var o=n(0),s=n(6),a=n(3),h=n(1),u=n(5),l=n(4),c=n(17),p=n(27);function f(t){p.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 s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}f.RANDOM_SEED=1,f.prototype=Object.create(p.prototype),f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},f.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},f.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},f.prototype.newGraphManager=function(){var t=new s(this);return this.graphManager=t,t},f.prototype.newGraph=function(t){return new u(null,this.graphManager,t)},f.prototype.newNode=function(t){return new a(this.graphManager,t)},f.prototype.newEdge=function(t){return new h(null,null,t)},f.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},f.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),'during'!==o.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},f.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},f.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),r=0;r<t.length;r++)t[r];var n=this.graphManager.getRoot().getNodes();for(r=0;r<n.length;r++)n[r];this.update(this.graphManager.getRoot())}},f.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var r=t;if(null!=r.getChild())for(var n=r.getChild().getNodes(),i=0;i<n.length;i++)update(n[i]);null!=r.vGraphObject&&r.vGraphObject.update(r)}else if(t instanceof h){var o=t;null!=o.vGraphObject&&o.vGraphObject.update(o)}else if(t instanceof u){var s=t;null!=s.vGraphObject&&s.vGraphObject.update(s)}},f.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)},f.prototype.transform=function(t){if(null==t)this.transform(new l(0,0));else{var r=new c,n=this.graphManager.getRoot().updateLeftTop();if(null!=n){r.setWorldOrgX(t.x),r.setWorldOrgY(t.y),r.setDeviceOrgX(n.x),r.setDeviceOrgY(n.y);for(var i=this.getAllNodes(),o=0;o<i.length;o++)i[o].transform(r)}}},f.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var r,n,i=t.getNodes(),o=0;o<i.length;o++)null==(n=(r=i[o]).getChild())||0==n.getNodes().length?r.scatter():(this.positionNodesRandomly(n),r.updateBounds())},f.prototype.getFlatForest=function(){for(var t=[],r=!0,n=this.graphManager.getRoot().getNodes(),o=!0,s=0;s<n.length;s++)null!=n[s].getChild()&&(o=!1);if(!o)return t;var a=new Set,h=[],u=new Map,l=[];for(l=l.concat(n);l.length>0&&r;){for(h.push(l[0]);h.length>0&&r;){var c=h[0];h.splice(0,1),a.add(c);var p=c.getEdges();for(s=0;s<p.length;s++){var f=p[s].getOtherEnd(c);if(u.get(c)!=f){if(a.has(f)){r=!1;break}h.push(f),u.set(f,c)}}}if(r){var d=[].concat(i(a));for(t.push(d),s=0;s<d.length;s++){var y=d[s],E=l.indexOf(y);E>-1&&l.splice(E,1)}a=new Set,u=new Map}else t=[]}return t},f.prototype.createDummyNodesForBendpoints=function(t){for(var r=[],n=t.source,i=this.graphManager.calcLowestCommonAncestor(t.source,t.target),o=0;o<t.bendpoints.length;o++){var s=this.newNode(null);s.setRect(new Point(0,0),new Dimension(1,1)),i.add(s);var a=this.newEdge(null);this.graphManager.add(a,n,s),r.add(s),n=s}return a=this.newEdge(null),this.graphManager.add(a,n,t.target),this.edgeToDummyNodes.set(t,r),t.isInterGraph()?this.graphManager.remove(t):i.remove(t),r},f.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(i(this.edgeToDummyNodes.keys())).concat(t);for(var r=0;r<t.length;r++){var n=t[r];if(n.bendpoints.length>0){for(var o=this.edgeToDummyNodes.get(n),s=0;s<o.length;s++){var a=o[s],h=new l(a.getCenterX(),a.getCenterY()),u=n.bendpoints.get(s);u.x=h.x,u.y=h.y,a.getOwner().remove(a)}this.graphManager.add(n,n.source,n.target)}}},f.transform=function(t,r,n,i){if(null!=n&&null!=i){var o=r;return t<=50?o-=(r-r/n)/50*(50-t):o+=(r*i-r)/50*(t-50),o}var s,a;return t<=50?(s=9*r/500,a=r/10):(s=9*r/50,a=-8*r),s*t+a},f.findCenterOfTree=function(t){var r=[];r=r.concat(t);var n=[],i=new Map,o=!1,s=null;1!=r.length&&2!=r.length||(o=!0,s=r[0]);for(var a=0;a<r.length;a++){var h=(c=r[a]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==h&&n.push(c)}var u=[];for(u=u.concat(n);!o;){var l=[];for(l=l.concat(u),u=[],a=0;a<r.length;a++){var c=r[a],p=r.indexOf(c);p>=0&&r.splice(p,1),c.getNeighborsList().forEach(function(t){if(n.indexOf(t)<0){var r=i.get(t)-1;1==r&&u.push(t),i.set(t,r)}})}n=n.concat(u),1!=r.length&&2!=r.length||(o=!0,s=r[0])}return s},f.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=f},function(t,r,n){"use strict";function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=1e4*Math.sin(i.seed++),i.x-Math.floor(i.x)},t.exports=i},function(t,r,n){"use strict";var i=n(4);function o(t,r){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(t){this.lworldOrgX=t},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(t){this.lworldExtX=t},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(t){this.lworldExtY=t},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},o.prototype.transformX=function(t){var r=0,n=this.lworldExtX;return 0!=n&&(r=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),r},o.prototype.transformY=function(t){var r=0,n=this.lworldExtY;return 0!=n&&(r=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),r},o.prototype.inverseTransformX=function(t){var r=0,n=this.ldeviceExtX;return 0!=n&&(r=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),r},o.prototype.inverseTransformY=function(t){var r=0,n=this.ldeviceExtY;return 0!=n&&(r=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),r},o.prototype.inverseTransformPoint=function(t){return new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=o},function(t,r,n){"use strict";function i(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}var o=n(15),s=n(7),a=n(0),h=n(8),u=n(9);function l(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.springConstant=s.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=s.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}for(var c in l.prototype=Object.create(o.prototype),o)l[c]=o[c];l.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,r,n,i,o,h,u=this.getGraphManager().getAllEdges(),l=0;l<u.length;l++)(t=u[l]).idealLength=this.idealEdgeLength,t.isInterGraph&&(n=t.getSource(),i=t.getTarget(),o=t.getSourceInLca().getEstimatedSize(),h=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=o+h-2*a.SIMPLE_NODE_SIZE),r=t.getLca().getInclusionTreeDepth(),t.idealLength+=s.DEFAULT_EDGE_LENGTH*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+i.getInclusionTreeDepth()-2*r))},l.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(t-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,r=this.getAllEdges(),n=0;n<r.length;n++)t=r[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,r,n,i,o,a=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t<u.length;t++)n=u[t],this.calculateRepulsionForceOfANode(n,o,a,h),o.add(n);else for(t=0;t<u.length;t++)for(n=u[t],r=t+1;r<u.length;r++)i=u[r],n.getOwner()==i.getOwner()&&this.calcRepulsionForce(n,i)},l.prototype.calcGravitationalForces=function(){for(var t,r=this.getAllNodesToApplyGravitation(),n=0;n<r.length;n++)t=r[n],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),r=0;r<t.length;r++)t[r].move()},l.prototype.calcSpringForce=function(t,r){var n,i,o,s,a=t.getSource(),h=t.getTarget();if(this.uniformLeafNodeSizes&&null==a.getChild()&&null==h.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(n=t.getLength())&&(o=(i=this.springConstant*(n-r))*(t.lengthX/n),s=i*(t.lengthY/n),a.springForceX+=o,a.springForceY+=s,h.springForceX-=o,h.springForceY-=s)},l.prototype.calcRepulsionForce=function(t,r){var n,i,o,a,l,c,p,f=t.getRect(),d=r.getRect(),y=new Array(2),E=new Array(4);if(f.intersects(d)){h.calcSeparationAmount(f,d,y,s.DEFAULT_EDGE_LENGTH/2),c=2*y[0],p=2*y[1];var v=t.noOfChildren*r.noOfChildren/(t.noOfChildren+r.noOfChildren);t.repulsionForceX-=v*c,t.repulsionForceY-=v*p,r.repulsionForceX+=v*c,r.repulsionForceY+=v*p}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==r.getChild()?(n=d.getCenterX()-f.getCenterX(),i=d.getCenterY()-f.getCenterY()):(h.getIntersection(f,d,E),n=E[2]-E[0],i=E[3]-E[1]),Math.abs(n)<s.MIN_REPULSION_DIST&&(n=u.sign(n)*s.MIN_REPULSION_DIST),Math.abs(i)<s.MIN_REPULSION_DIST&&(i=u.sign(i)*s.MIN_REPULSION_DIST),o=n*n+i*i,a=Math.sqrt(o),c=(l=this.repulsionConstant*t.noOfChildren*r.noOfChildren/o)*n/a,p=l*i/a,t.repulsionForceX-=c,t.repulsionForceY-=p,r.repulsionForceX+=c,r.repulsionForceY+=p},l.prototype.calcGravitationalForce=function(t){var r,n,i,o,s,a,h,u;n=((r=t.getOwner()).getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,o=t.getCenterX()-n,s=t.getCenterY()-i,a=Math.abs(o)+t.getWidth()/2,h=Math.abs(s)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(a>(u=r.getEstimatedSize()*this.gravityRangeFactor)||h>u)&&(t.gravitationForceX=-this.gravityConstant*o,t.gravitationForceY=-this.gravityConstant*s):(a>(u=r.getEstimatedSize()*this.compoundGravityRangeFactor)||h>u)&&(t.gravitationForceX=-this.gravityConstant*o*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*s*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,r=!1;return this.totalIterations>this.maxIterations/3&&(r=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||r},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,r=this.graphManager.getAllNodes(),n=0;n<r.length;n++)(t=r[n]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){var r,n;r=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var i=new Array(r),o=0;o<r;o++)i[o]=new Array(n);for(o=0;o<r;o++)for(var s=0;s<n;s++)i[o][s]=new Array;return i},l.prototype.addNodeToGrid=function(t,r,n){var i,o,s,a;i=parseInt(Math.floor((t.getRect().x-r)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().width+t.getRect().x-r)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().y-n)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().height+t.getRect().y-n)/this.repulsionRange));for(var h=i;h<=o;h++)for(var u=s;u<=a;u++)this.grid[h][u].push(t),t.setGridCoordinates(i,o,s,a)},l.prototype.updateGrid=function(){var t,r,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<n.length;t++)r=n[t],this.addNodeToGrid(r,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,r,n,o){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&n||o){var a,h=new Set;t.surrounding=new Array;for(var u=this.grid,l=t.startX-1;l<t.finishX+2;l++)for(var c=t.startY-1;c<t.finishY+2;c++)if(!(l<0||c<0||l>=u.length||c>=u[0].length))for(var p=0;p<u[l][c].length;p++)if(a=u[l][c][p],t.getOwner()==a.getOwner()&&t!=a&&!r.has(a)&&!h.has(a)){var f=Math.abs(t.getCenterX()-a.getCenterX())-(t.getWidth()/2+a.getWidth()/2),d=Math.abs(t.getCenterY()-a.getCenterY())-(t.getHeight()/2+a.getHeight()/2);f<=this.repulsionRange&&d<=this.repulsionRange&&h.add(a)}t.surrounding=[].concat(i(h))}for(l=0;l<t.surrounding.length;l++)this.calcRepulsionForce(t,t.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,r,n){"use strict";var i=n(1),o=n(7);function s(t,r,n){i.call(this,t,r,n),this.idealLength=o.DEFAULT_EDGE_LENGTH}for(var a in s.prototype=Object.create(i.prototype),i)s[a]=i[a];t.exports=s},function(t,r,n){"use strict";var i=n(3);function o(t,r,n,o){i.call(this,t,r,n,o),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var s in o.prototype=Object.create(i.prototype),i)o[s]=i[s];o.prototype.setGridCoordinates=function(t,r,n,i){this.startX=t,this.finishX=r,this.startY=n,this.finishY=i},t.exports=o},function(t,r,n){"use strict";function i(t,r){this.width=0,this.height=0,null!==t&&null!==r&&(this.height=r,this.width=t)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},t.exports=i},function(t,r,n){"use strict";var i=n(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(t,r){var n=i.createID(t);this.contains(n)||(this.map[n]=r,this.keys.push(t))},o.prototype.contains=function(t){return i.createID(t),null!=this.map[t]},o.prototype.get=function(t){var r=i.createID(t);return this.map[r]},o.prototype.keySet=function(){return this.keys},t.exports=o},function(t,r,n){"use strict";var i=n(14);function o(){this.set={}}o.prototype.add=function(t){var r=i.createID(t);this.contains(r)||(this.set[r]=t)},o.prototype.remove=function(t){delete this.set[i.createID(t)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(t){return this.set[i.createID(t)]==t},o.prototype.isEmpty=function(){return 0===this.size()},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(t){for(var r=Object.keys(this.set),n=r.length,i=0;i<n;i++)t.push(this.set[r[i]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(t){for(var r=t.length,n=0;n<r;n++){var i=t[n];this.add(i)}},t.exports=o},function(t,r,n){"use strict";var i=(function(){function t(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(r,n,i){return n&&t(r.prototype,n),i&&t(r,i),r}})();function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var s=n(11),a=(function(){function t(r,n){o(this,t),null===n&&void 0===n||(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=r instanceof s?r.size():r.length,this._quicksort(r,0,i-1)}return i(t,[{key:'_quicksort',value:function(t,r,n){if(r<n){var i=this._partition(t,r,n);this._quicksort(t,r,i),this._quicksort(t,i+1,n)}}},{key:'_partition',value:function(t,r,n){for(var i=this._get(t,r),o=r,s=n;;){for(;this.compareFunction(i,this._get(t,s));)s--;for(;this.compareFunction(this._get(t,o),i);)o++;if(!(o<s))return s;this._swap(t,o,s),o++,s--}}},{key:'_get',value:function(t,r){return t instanceof s?t.get_object_at(r):t[r]}},{key:'_set',value:function(t,r,n){t instanceof s?t.set_object_at(r,n):t[r]=n}},{key:'_swap',value:function(t,r,n){var i=this._get(t,r);this._set(t,r,this._get(t,n)),this._set(t,n,i)}},{key:'_defaultCompareFunction',value:function(t,r){return r>t}}]),t})();t.exports=a},function(t,r,n){"use strict";var i=(function(){function t(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(r,n,i){return n&&t(r.prototype,n),i&&t(r,i),r}})();function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var s=(function(){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;o(this,t),this.sequence1=r,this.sequence2=n,this.match_score=i,this.mismatch_penalty=s,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var u=0;u<this.jMax;u++)this.grid[h][u]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[l][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var i=1;i<this.jMax;i++){var o=[this.sequence1[n-1]===this.sequence2[i-1]?this.grid[n-1][i-1]+this.match_score:this.grid[n-1][i-1]+this.mismatch_penalty,this.grid[n-1][i]+this.gap_penalty,this.grid[n][i-1]+this.gap_penalty],s=this.arrayAllMaxIndexes(o);this.grid[n][i]=o[s[0]],this.tracebackGrid[n][i]=[s.includes(0),s.includes(1),s.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var r=t[0],n=this.tracebackGrid[r.pos[0]][r.pos[1]];n[0]&&t.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),n[1]&&t.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:'-'+r.seq2}),n[2]&&t.push({pos:[r.pos[0],r.pos[1]-1],seq1:'-'+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),0===r.pos[0]&&0===r.pos[1]&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,r){for(var n=[],i=-1;-1!==(i=t.indexOf(r,i+1));)n.push(i);return n}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t})();t.exports=s},function(t,r,n){"use strict";var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(7),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(4),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(24),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(5),i.LEdge=n(1),i.LGraphManager=n(6),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(25),t.exports=i},function(t,r,n){"use strict";function i(){this.listeners=[]}var o=i.prototype;o.addListener=function(t,r){this.listeners.push({event:t,callback:r})},o.removeListener=function(t,r){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===t&&i.callback===r&&this.listeners.splice(n,1)}},o.emit=function(t,r){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];t===i.event&&i.callback(r)}},t.exports=i}])},'object'==typeof e&&'object'==typeof m?m.exports=r():'function'==typeof define&&define.amd?define([],r):'object'==typeof e?e.layoutBase=r():t.layoutBase=r()},5336,[]);
|
|
1
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"render",{enumerable:!0,get:function(){return w}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),s=e(r(d[3])),c=r(d[4]);function u(e,t){e.forEach(e=>{const n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{["id","label","height","width","padding","x","y"].includes(t)||(n[t]=e[t])}),t.add({group:"nodes",data:n,position:{x:e.x??0,y:e.y??0}})})}function l(e,t){e.forEach(e=>{const n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{["id","start","end"].includes(t)||(n[t]=e[t])}),t.add({group:"edges",data:n})})}function y(e){return new Promise(n=>{const s=(0,c.select)("body").append("div").attr("id","cy").attr("style","display:none"),y=(0,o.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});s.remove(),u(e.nodes,y),l(e.edges,y),y.nodes().forEach(function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}});y.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),y.ready(e=>{t.log.info("Cytoscape ready",e),n(y)})})}function h(e){return e.nodes().map(e=>{const t=e.data(),n=e.position(),o={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{"id"!==e&&(o[e]=t[e])}),o})}function f(e){return e.edges().map(e=>{const t=e.data(),n=e._private.rscratch,o={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{["id","source","target"].includes(e)||(o[e]=t[e])}),o})}async function b(e,n){t.log.debug("Starting cose-bilkent layout algorithm");try{p(e);const n=await y(e),o=h(n),s=f(n);return t.log.debug(`Layout completed: ${o.length} nodes, ${s.length} edges`),{nodes:o,edges:s}}catch(e){throw t.log.error("Error in cose-bilkent layout algorithm:",e),e}}function p(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(e.edges))throw new Error("Edges array is required in layout data");return!0}o.default.use(s.default),(0,n.__name)(u,"addNodes"),(0,n.__name)(l,"addEdges"),(0,n.__name)(y,"createCytoscapeInstance"),(0,n.__name)(h,"extractPositionedNodes"),(0,n.__name)(f,"extractPositionedEdges"),(0,n.__name)(b,"executeCoseBilkentLayout"),(0,n.__name)(p,"validateLayoutData");var w=(0,n.__name)(async(e,t,{insertCluster:n,insertEdge:o,insertEdgeLabel:s,insertMarkers:c,insertNode:u,log:l,positionEdgeLabel:y},{algorithm:h})=>{const f={},p={},w=t.select("g");c(w,e.markers,e.type,e.diagramId);const E=w.insert("g").attr("class","subgraphs"),_=w.insert("g").attr("class","edgePaths"),x=w.insert("g").attr("class","edgeLabels"),O=w.insert("g").attr("class","nodes");l.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){const e=Object.assign({},t);p[t.id]=e,f[t.id]=e,await n(E,t)}else{const n=Object.assign({},t);f[t.id]=n;const o=await u(O,t,{config:e.config,dir:e.direction||"TB"}),s=o.node().getBBox();n.width=s.width,n.height=s.height,n.domId=o,l.debug(`Node ${t.id} dimensions: ${s.width}x${s.height}`)}})),l.debug("Running cose-bilkent layout algorithm");const j=Object.assign({},e,{nodes:e.nodes.map(e=>{const t=f[e.id];return Object.assign({},e,{width:t.width,height:t.height})})}),k=await b(j,e.config);l.debug("Positioning nodes based on layout results"),k.nodes.forEach(e=>{const t=f[e.id];t?.domId&&(t.domId.attr("transform",`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,l.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),k.edges.forEach(t=>{const n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),l.debug("Inserting and positioning edges"),await Promise.all(e.edges.map(async t=>{await s(x,t);const n=f[t.start??""],c=f[t.end??""];if(n&&c){const s=k.edges.find(e=>e.id===t.id);if(s){l.debug("APA01 positionedEdge",s);const u=Object.assign({},t),h=o(_,u,p,e.type,n,c,e.diagramId);y(u,h)}else{const s=Object.assign({},t,{points:[{x:n.x||0,y:n.y||0},{x:c.x||0,y:c.y||0}]}),u=o(_,s,p,e.type,n,c,e.diagramId);y(s,u)}}})),l.debug("Cose-bilkent rendering completed")},"render")},5170,[3280,3281,5131,5335,3283]);
|
|
2
|
+
__d(function(g,r,_i,a,m,e,d){var t,n;t=this,n=function(t){return(function(t){var n={};function i(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=n,i.i=function(t){return t},i.d=function(t,n,o){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,'a',n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=1)})([function(n,i){n.exports=t},function(t,n,i){"use strict";var o=i(0).layoutBase.LayoutConstants,s=i(0).layoutBase.FDLayoutConstants,l=i(0).CoSEConstants,u=i(0).CoSELayout,p=i(0).CoSENode,c=i(0).layoutBase.PointD,E=i(0).layoutBase.DimensionD,y={ready:function(){},stop:function(){},quality:'default',nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:'end',animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function L(t,n){var i={};for(var o in t)i[o]=t[o];for(var o in n)i[o]=n[o];return i}function T(t){this.options=L(y,t),_(this.options)}var _=function(t){null!=t.nodeRepulsion&&(l.DEFAULT_REPULSION_STRENGTH=s.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(l.DEFAULT_EDGE_LENGTH=s.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(l.DEFAULT_SPRING_STRENGTH=s.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(l.DEFAULT_GRAVITY_STRENGTH=s.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(l.MAX_ITERATIONS=s.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=s.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=s.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),'draft'==t.quality?o.QUALITY=0:'proof'==t.quality?o.QUALITY=2:o.QUALITY=1,l.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!t.randomize,l.ANIMATE=s.ANIMATE=o.ANIMATE=t.animate,l.TILE=t.tile,l.TILING_PADDING_VERTICAL='function'==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL='function'==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};T.prototype.run=function(){var t,n,i=this.options,o=(this.idToLNode={},this.layout=new u),s=this;s.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:'layoutstart',layout:this});var l=o.newGraphManager();this.gm=l;var p=this.options.eles.nodes(),c=this.options.eles.edges();this.root=l.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(p),o);for(var E=0;E<c.length;E++){var y=c[E],L=this.idToLNode[y.data("source")],T=this.idToLNode[y.data("target")];L!==T&&0==L.getEdgesBetween(T).length&&(l.add(o.newEdge(),L,T).id=y.id())}var _=function(t,n){"number"==typeof t&&(t=n);var i=t.data('id'),o=s.idToLNode[i];return{x:o.getRect().getCenterX(),y:o.getRect().getCenterY()}},N=function l(){for(var u,p=function(){i.fit&&i.cy.fit(i.eles,i.padding),t||(t=!0,s.cy.one('layoutready',i.ready),s.cy.trigger({type:'layoutready',layout:s}))},c=s.options.refresh,E=0;E<c&&!u;E++)u=s.stopped||s.layout.tick();if(u)return o.checkLayoutSuccess()&&!o.isSubLayout&&o.doPostLayout(),o.tilingPostLayout&&o.tilingPostLayout(),o.isLayoutFinished=!0,s.options.eles.nodes().positions(_),p(),s.cy.one('layoutstop',s.options.stop),s.cy.trigger({type:'layoutstop',layout:s}),n&&cancelAnimationFrame(n),void(t=!1);var y=s.layout.getPositionsData();i.eles.nodes().positions(function(t,n){if("number"==typeof t&&(t=n),!t.isParent()){for(var i=t.id(),o=y[i],s=t;null==o&&(o=y[s.data('parent')]||y['DummyCompound_'+s.data('parent')],y[i]=o,null!=(s=s.parent()[0])););return null!=o?{x:o.x,y:o.y}:{x:t.position('x'),y:t.position('y')}}}),p(),n=requestAnimationFrame(l)};return o.addListener('layoutstarted',function(){'during'===s.options.animate&&(n=requestAnimationFrame(N))}),o.runLayout(),"during"!==this.options.animate&&(s.options.eles.nodes().not(":parent").layoutPositions(s,s.options,_),t=!1),this},T.prototype.getTopMostNodes=function(t){for(var n={},i=0;i<t.length;i++)n[t[i].id()]=!0;var o=t.filter(function(t,i){"number"==typeof t&&(t=i);for(var o=t.parent()[0];null!=o;){if(n[o.id()])return!1;o=o.parent()[0]}return!0});return o},T.prototype.processChildrenList=function(t,n,i){for(var o=n.length,s=0;s<o;s++){var l,u,y=n[s],L=y.children(),T=y.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((l=null!=y.outerWidth()&&null!=y.outerHeight()?t.add(new p(i.graphManager,new c(y.position('x')-T.w/2,y.position('y')-T.h/2),new E(parseFloat(T.w),parseFloat(T.h)))):t.add(new p(this.graphManager))).id=y.data("id"),l.paddingLeft=parseInt(y.css('padding')),l.paddingTop=parseInt(y.css('padding')),l.paddingRight=parseInt(y.css('padding')),l.paddingBottom=parseInt(y.css('padding')),this.options.nodeDimensionsIncludeLabels&&y.isParent()){var _=y.boundingBox({includeLabels:!0,includeNodes:!1}).w,N=y.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=y.css("text-halign");l.labelWidth=_,l.labelHeight=N,l.labelPos=f}this.idToLNode[y.data("id")]=l,isNaN(l.rect.x)&&(l.rect.x=0),isNaN(l.rect.y)&&(l.rect.y=0),null!=L&&L.length>0&&(u=i.getGraphManager().add(i.newGraph(),l),this.processChildrenList(u,L,i))}},T.prototype.stop=function(){return this.stopped=!0,this};var N=function(t){t('layout','cose-bilkent',T)};'undefined'!=typeof cytoscape&&N(cytoscape),t.exports=N}])},'object'==typeof e&&'object'==typeof m?m.exports=n(r(d[0])):'function'==typeof define&&define.amd?define(["cose-base"],n):'object'==typeof e?e.cytoscapeCoseBilkent=n(r(d[0])):t.cytoscapeCoseBilkent=n(t.coseBase)},5335,[5336]);
|
|
3
|
+
__d(function(g,_r,_i,a,m,e,d){var t,i;t=this,i=function(t){return(function(t){var i={};function r(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=i,r.i=function(t){return t},r.d=function(t,i,o){r.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},r.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(i,'a',i),i},r.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},r.p="",r(r.s=7)})([function(i,r){i.exports=t},function(t,i,r){"use strict";var o=r(0).FDLayoutConstants;function n(){}for(var s in o)n[s]=o[s];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=n},function(t,i,r){"use strict";var o=r(0).FDLayoutEdge;function n(t,i,r){o.call(this,t,i,r)}for(var s in n.prototype=Object.create(o.prototype),o)n[s]=o[s];t.exports=n},function(t,i,r){"use strict";var o=r(0).LGraph;function n(t,i,r){o.call(this,t,i,r)}for(var s in n.prototype=Object.create(o.prototype),o)n[s]=o[s];t.exports=n},function(t,i,r){"use strict";var o=r(0).LGraphManager;function n(t){o.call(this,t)}for(var s in n.prototype=Object.create(o.prototype),o)n[s]=o[s];t.exports=n},function(t,i,r){"use strict";var o=r(0).FDLayoutNode,n=r(0).IMath;function s(t,i,r,n){o.call(this,t,i,r,n)}for(var h in s.prototype=Object.create(o.prototype),o)s[h]=o[h];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.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},s.prototype.propogateDisplacementToChildren=function(t,i){for(var r,o=this.getChild().getNodes(),n=0;n<o.length;n++)null==(r=o[n]).getChild()?(r.moveBy(t,i),r.displacementX+=t,r.displacementY+=i):r.propogateDisplacementToChildren(t,i)},s.prototype.setPred1=function(t){this.pred1=t},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(t){this.next=t},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(t){this.processed=t},s.prototype.isProcessed=function(){return processed},t.exports=s},function(t,i,r){"use strict";var o=r(0).FDLayout,n=r(4),s=r(3),h=r(5),l=r(2),p=r(1),c=r(0).FDLayoutConstants,u=r(0).LayoutConstants,f=r(0).Point,T=r(0).PointD,v=r(0).Layout,E=r(0).Integer,y=r(0).IGeometry,N=r(0).LGraph,w=r(0).Transform;function A(){o.call(this),this.toBeTiled={}}for(var C in A.prototype=Object.create(o.prototype),o)A[C]=o[C];A.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},A.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},A.prototype.newNode=function(t){return new h(this.graphManager,t)},A.prototype.newEdge=function(t){return new l(null,null,t)},A.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=c.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=c.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=c.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},A.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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)p.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),i=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return i.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var i=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return i.has(t)});this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 t=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(i){return t.has(i)});this.graphManager.setAllNodesToApplyGravitation(i),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,o=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,o),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),i={},r=0;r<t.length;r++){var o=t[r].rect,n=t[r].id;i[n]={id:n,x:o.getCenterX(),y:o.getCenterY(),w:o.width,h:o.height}}return i},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if('during'===c.ANIMATE)this.emit('layoutstarted');else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},A.prototype.calculateNodesToApplyGravitationTo=function(){var t,i,r=[],o=this.graphManager.getGraphs(),n=o.length;for(i=0;i<n;i++)(t=o[i]).updateConnected(),t.isConnected||(r=r.concat(t.getNodes()));return r},A.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var i,r=new Set;for(i=0;i<t.length;i++){var o=t[i];if(!r.has(o)){var n=o.getSource(),s=o.getTarget();if(n==s)o.getBendpoints().push(new T),o.getBendpoints().push(new T),this.createDummyNodesForBendpoints(o),r.add(o);else{var h=[];if(h=(h=h.concat(n.getEdgeListToNode(s))).concat(s.getEdgeListToNode(n)),!r.has(h[0])){var l;if(h.length>1)for(l=0;l<h.length;l++){var p=h[l];p.getBendpoints().push(new T),this.createDummyNodesForBendpoints(p)}h.forEach(function(t){r.add(t)})}}}if(r.size==t.length)break}},A.prototype.positionNodesRadially=function(t){for(var i=new f(0,0),r=Math.ceil(Math.sqrt(t.length)),o=0,n=0,s=0,h=new T(0,0),l=0;l<t.length;l++){l%r==0&&(s=0,n=o,0!=l&&(n+=p.DEFAULT_COMPONENT_SEPERATION),o=0);var c=t[l],E=v.findCenterOfTree(c);i.x=s,i.y=n,(h=A.radialLayout(c,E,i)).y>o&&(o=Math.floor(h.y)),s=Math.floor(h.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(u.WORLD_CENTER_X-h.x/2,u.WORLD_CENTER_Y-h.y/2))},A.radialLayout=function(t,i,r){var o=Math.max(this.maxDiagonalInTree(t),p.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(i,null,0,359,0,o);var n=N.calculateBounds(t),s=new w;s.setDeviceOrgX(n.getMinX()),s.setDeviceOrgY(n.getMinY()),s.setWorldOrgX(r.x),s.setWorldOrgY(r.y);for(var h=0;h<t.length;h++)t[h].transform(s);var l=new T(n.getMaxX(),n.getMaxY());return s.inverseTransformPoint(l)},A.branchRadialLayout=function(t,i,r,o,n,s){var h=(o-r+1)/2;h<0&&(h+=180);var l=(h+r)%360*y.TWO_PI/360,p=(Math.cos(l),n*Math.cos(l)),c=n*Math.sin(l);t.setCenter(p,c);var u=[],f=(u=u.concat(t.getEdges())).length;null!=i&&f--;for(var T,v=0,E=u.length,N=t.getEdgesBetween(i);N.length>1;){var w=N[0];N.splice(0,1);var C=u.indexOf(w);C>=0&&u.splice(C,1),E--,f--}T=null!=i?(u.indexOf(N[0])+1)%E:0;for(var L=Math.abs(o-r)/f,D=T;v!=f;D=++D%E){var G=u[D].getOtherEnd(t);if(G!=i){var M=(r+v*L)%360,_=(M+L)%360;A.branchRadialLayout(G,t,M,_,n+s,s),v++}}},A.maxDiagonalInTree=function(t){for(var i=E.MIN_VALUE,r=0;r<t.length;r++){var o=t[r].getDiagonal();o>i&&(i=o)}return i},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var t=this,i={};this.memberGroups={},this.idToDummyNode={};for(var r=[],o=this.graphManager.getAllNodes(),n=0;n<o.length;n++){var s=(l=o[n]).getParent();0!==this.getNodeDegreeWithChildren(l)||null!=s.id&&this.getToBeTiled(s)||r.push(l)}for(n=0;n<r.length;n++){var l,p=(l=r[n]).getParent().id;void 0===i[p]&&(i[p]=[]),i[p]=i[p].concat(l)}Object.keys(i).forEach(function(r){if(i[r].length>1){var o="DummyCompound_"+r;t.memberGroups[o]=i[r];var n=i[r][0].getParent(),s=new h(t.graphManager);s.id=o,s.paddingLeft=n.paddingLeft||0,s.paddingRight=n.paddingRight||0,s.paddingBottom=n.paddingBottom||0,s.paddingTop=n.paddingTop||0,t.idToDummyNode[o]=s;var l=t.getGraphManager().add(t.newGraph(),s),p=n.getChild();p.add(s);for(var c=0;c<i[r].length;c++){var u=i[r][c];p.remove(u),l.add(u)}}})},A.prototype.clearCompounds=function(){var t={},i={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)i[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,i)},A.prototype.clearZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(r){var o=t.idToDummyNode[r];i[r]=t.tileNodes(t.memberGroups[r],o.paddingLeft+o.paddingRight),o.rect.width=i[r].width,o.rect.height=i[r].height})},A.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var i=this.compoundOrder[t],r=i.id,o=i.paddingLeft,n=i.paddingTop;this.adjustLocations(this.tiledMemberPack[r],i.rect.x,i.rect.y,o,n)}},A.prototype.repopulateZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(r){var o=t.idToDummyNode[r],n=o.paddingLeft,s=o.paddingTop;t.adjustLocations(i[r],o.rect.x,o.rect.y,n,s)})},A.prototype.getToBeTiled=function(t){var i=t.id;if(null!=this.toBeTiled[i])return this.toBeTiled[i];var r=t.getChild();if(null==r)return this.toBeTiled[i]=!1,!1;for(var o=r.getNodes(),n=0;n<o.length;n++){var s=o[n];if(this.getNodeDegree(s)>0)return this.toBeTiled[i]=!1,!1;if(null!=s.getChild()){if(!this.getToBeTiled(s))return this.toBeTiled[i]=!1,!1}else this.toBeTiled[s.id]=!1}return this.toBeTiled[i]=!0,!0},A.prototype.getNodeDegree=function(t){t.id;for(var i=t.getEdges(),r=0,o=0;o<i.length;o++){var n=i[o];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},A.prototype.getNodeDegreeWithChildren=function(t){var i=this.getNodeDegree(t);if(null==t.getChild())return i;for(var r=t.getChild().getNodes(),o=0;o<r.length;o++){var n=r[o];i+=this.getNodeDegreeWithChildren(n)}return i},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(t){for(var i=0;i<t.length;i++){var r=t[i];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},A.prototype.adjustLocations=function(t,i,r,o,n){r+=n;for(var s=i+=o,h=0;h<t.rows.length;h++){var l=t.rows[h];i=s;for(var p=0,c=0;c<l.length;c++){var u=l[c];u.rect.x=i,u.rect.y=r,i+=u.rect.width+t.horizontalPadding,u.rect.height>p&&(p=u.rect.height)}r+=p+t.verticalPadding}},A.prototype.tileCompoundMembers=function(t,i){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(o){var n=i[o];r.tiledMemberPack[o]=r.tileNodes(t[o],n.paddingLeft+n.paddingRight),n.rect.width=r.tiledMemberPack[o].width,n.rect.height=r.tiledMemberPack[o].height})},A.prototype.tileNodes=function(t,i){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:i,verticalPadding:p.TILING_PADDING_VERTICAL,horizontalPadding:p.TILING_PADDING_HORIZONTAL};t.sort(function(t,i){return t.rect.width*t.rect.height>i.rect.width*i.rect.height?-1:t.rect.width*t.rect.height<i.rect.width*i.rect.height?1:0});for(var o=0;o<t.length;o++){var n=t[o];0==r.rows.length?this.insertNodeToRow(r,n,0,i):this.canAddHorizontal(r,n.rect.width,n.rect.height)?this.insertNodeToRow(r,n,this.getShortestRowIndex(r),i):this.insertNodeToRow(r,n,r.rows.length,i),this.shiftToLastRow(r)}return r},A.prototype.insertNodeToRow=function(t,i,r,o){var n=o;r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var s=t.rowWidth[r]+i.rect.width;t.rows[r].length>0&&(s+=t.horizontalPadding),t.rowWidth[r]=s,t.width<s&&(t.width=s);var h=i.rect.height;r>0&&(h+=t.verticalPadding);var l=0;h>t.rowHeight[r]&&(l=t.rowHeight[r],t.rowHeight[r]=h,l=t.rowHeight[r]-l),t.height+=l,t.rows[r].push(i)},A.prototype.getShortestRowIndex=function(t){for(var i=-1,r=Number.MAX_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]<r&&(i=o,r=t.rowWidth[o]);return i},A.prototype.getLongestRowIndex=function(t){for(var i=-1,r=Number.MIN_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]>r&&(i=o,r=t.rowWidth[o]);return i},A.prototype.canAddHorizontal=function(t,i,r){var o=this.getShortestRowIndex(t);if(o<0)return!0;var n=t.rowWidth[o];if(n+t.horizontalPadding+i<=t.width)return!0;var s,h,l=0;return t.rowHeight[o]<r&&o>0&&(l=r+t.verticalPadding-t.rowHeight[o]),s=t.width-n>=i+t.horizontalPadding?(t.height+l)/(n+i+t.horizontalPadding):(t.height+l)/t.width,l=r+t.verticalPadding,(h=t.width<i?(t.height+l)/i:(t.height+l)/t.width)<1&&(h=1/h),s<1&&(s=1/s),s<h},A.prototype.shiftToLastRow=function(t){var i=this.getLongestRowIndex(t),r=t.rowWidth.length-1,o=t.rows[i],n=o[o.length-1],s=n.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>s&&i!=r){o.splice(-1,1),t.rows[r].push(n),t.rowWidth[i]=t.rowWidth[i]-s,t.rowWidth[r]=t.rowWidth[r]+s,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var h=Number.MIN_VALUE,l=0;l<o.length;l++)o[l].height>h&&(h=o[l].height);i>0&&(h+=t.verticalPadding);var p=t.rowHeight[i]+t.rowHeight[r];t.rowHeight[i]=h,t.rowHeight[r]<n.height+t.verticalPadding&&(t.rowHeight[r]=n.height+t.verticalPadding);var c=t.rowHeight[i]+t.rowHeight[r];t.height+=c-p,this.shiftToLastRow(t)}},A.prototype.tilingPreLayout=function(){p.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){p.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var t,i=[],r=!0;r;){var o=this.graphManager.getAllNodes(),n=[];r=!1;for(var s=0;s<o.length;s++)1!=(t=o[s]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(n.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var h=[],l=0;l<n.length;l++)1==n[l][0].getEdges().length&&(h.push(n[l]),n[l][0].getOwner().remove(n[l][0]));i.push(h),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=i},A.prototype.growTree=function(t){for(var i,r=t[t.length-1],o=0;o<r.length;o++)i=r[o],this.findPlaceforPrunedNode(i),i[2].add(i[0]),i[2].add(i[1],i[1].source,i[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(t){var i,r,o=t[0],n=(r=o==t[1].source?t[1].target:t[1].source).startX,s=r.finishX,h=r.startY,l=r.finishY,p=[0,0,0,0];if(h>0)for(var u=n;u<=s;u++)p[0]+=this.grid[u][h-1].length+this.grid[u][h].length-1;if(s<this.grid.length-1)for(u=h;u<=l;u++)p[1]+=this.grid[s+1][u].length+this.grid[s][u].length-1;if(l<this.grid[0].length-1)for(u=n;u<=s;u++)p[2]+=this.grid[u][l+1].length+this.grid[u][l].length-1;if(n>0)for(u=h;u<=l;u++)p[3]+=this.grid[n-1][u].length+this.grid[n][u].length-1;for(var f,T,v=E.MAX_VALUE,y=0;y<p.length;y++)p[y]<v?(v=p[y],f=1,T=y):p[y]==v&&f++;if(3==f&&0==v)0==p[0]&&0==p[1]&&0==p[2]?i=1:0==p[0]&&0==p[1]&&0==p[3]?i=0:0==p[0]&&0==p[2]&&0==p[3]?i=3:0==p[1]&&0==p[2]&&0==p[3]&&(i=2);else if(2==f&&0==v){var N=Math.floor(2*Math.random());i=0==p[0]&&0==p[1]?0==N?0:1:0==p[0]&&0==p[2]?0==N?0:2:0==p[0]&&0==p[3]?0==N?0:3:0==p[1]&&0==p[2]?0==N?1:2:0==p[1]&&0==p[3]?0==N?1:3:0==N?2:3}else i=4==f&&0==v?N=Math.floor(4*Math.random()):T;0==i?o.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-c.DEFAULT_EDGE_LENGTH-o.getHeight()/2):1==i?o.setCenter(r.getCenterX()+r.getWidth()/2+c.DEFAULT_EDGE_LENGTH+o.getWidth()/2,r.getCenterY()):2==i?o.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+c.DEFAULT_EDGE_LENGTH+o.getHeight()/2):o.setCenter(r.getCenterX()-r.getWidth()/2-c.DEFAULT_EDGE_LENGTH-o.getWidth()/2,r.getCenterY())},t.exports=A},function(t,i,r){"use strict";var o={};o.layoutBase=r(0),o.CoSEConstants=r(1),o.CoSEEdge=r(2),o.CoSEGraph=r(3),o.CoSEGraphManager=r(4),o.CoSELayout=r(6),o.CoSENode=r(5),t.exports=o}])},'object'==typeof e&&'object'==typeof m?m.exports=i(_r(d[0])):'function'==typeof define&&define.amd?define(["layout-base"],i):'object'==typeof e?e.coseBase=i(_r(d[0])):t.coseBase=i(t.layoutBase)},5336,[5337]);
|
|
4
|
+
__d(function(g,_r,_i3,_a,m,e,_d){var t,r;t=this,r=function(){return(function(t){var r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=r,n.i=function(t){return t},n.d=function(t,r,i){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,'a',r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=26)})([function(t,r,n){"use strict";function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,t.exports=i},function(t,r,n){"use strict";var i=n(2),o=n(8),s=n(9);function a(t,r,n){i.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=r}for(var h in a.prototype=Object.create(i.prototype),i)a[h]=i[h];a.prototype.getSource=function(){return this.source},a.prototype.getTarget=function(){return this.target},a.prototype.isInterGraph=function(){return this.isInterGraph},a.prototype.getLength=function(){return this.length},a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},a.prototype.getBendpoints=function(){return this.bendpoints},a.prototype.getLca=function(){return this.lca},a.prototype.getSourceInLca=function(){return this.sourceInLca},a.prototype.getTargetInLca=function(){return this.targetInLca},a.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(t,r){for(var n=this.getOtherEnd(t),i=r.getGraphManager().getRoot();;){if(n.getOwner()==r)return n;if(n.getOwner()==i)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},a.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=a},function(t,r,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,r,n){"use strict";var i=n(2),o=n(10),s=n(13),a=n(0),h=n(16),u=n(4);function l(t,r,n,a){null==n&&null==a&&(a=r),i.call(this,a),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=r?new s(r.x,r.y,n.width,n.height):new s}for(var c in l.prototype=Object.create(i.prototype),i)l[c]=i[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,r){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=r.width,this.rect.height=r.height},l.prototype.setCenter=function(t,r){this.rect.x=t-this.rect.width/2,this.rect.y=r-this.rect.height/2},l.prototype.setLocation=function(t,r){this.rect.x=t,this.rect.y=r},l.prototype.moveBy=function(t,r){this.rect.x+=t,this.rect.y+=r},l.prototype.getEdgeListToNode=function(t){var r=[],n=this;return n.edges.forEach(function(i){if(i.target==t){if(i.source!=n)throw"Incorrect edge source!";r.push(i)}}),r},l.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(i){if(i.source!=n&&i.target!=n)throw"Incorrect edge source and/or target";i.target!=t&&i.source!=t||r.push(i)}),r},l.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(n){if(n.source==r)t.add(n.target);else{if(n.target!=r)throw"Incorrect incidency!";t.add(n.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var r=this.child.getNodes(),n=0;n<r.length;n++)r[n].withChildren().forEach(function(r){t.add(r)});return t},l.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var r=this.child.getNodes(),n=0;n<r.length;n++)t+=r[n].getNoOfChildren();return 0==t&&(t=1),t},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return null==this.child?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)},l.prototype.scatter=function(){var t,r,n=-a.INITIAL_WORLD_BOUNDARY,i=a.INITIAL_WORLD_BOUNDARY;t=a.WORLD_CENTER_X+h.nextDouble()*(i-n)+n;var o=-a.INITIAL_WORLD_BOUNDARY,s=a.INITIAL_WORLD_BOUNDARY;r=a.WORLD_CENTER_Y+h.nextDouble()*(s-o)+o,this.rect.x=t,this.rect.y=r},l.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),a.NODE_DIMENSIONS_INCLUDE_LABELS){var r=t.getRight()-t.getLeft(),n=t.getBottom()-t.getTop();this.labelWidth>r&&(this.rect.x-=(this.labelWidth-r)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var r=this.rect.x;r>a.WORLD_BOUNDARY?r=a.WORLD_BOUNDARY:r<-a.WORLD_BOUNDARY&&(r=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var i=new u(r,n),o=t.inverseTransformPoint(i);this.setLocation(o.x,o.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,r,n){"use strict";function i(t,r){null==t&&null==r?(this.x=0,this.y=0):(this.x=t,this.y=r)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,r,n){"use strict";var i=n(2),o=n(10),s=n(0),a=n(6),h=n(3),u=n(1),l=n(13),c=n(12),p=n(11);function f(t,r,n){i.call(this,n),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=r&&r instanceof a?this.graphManager=r:null!=r&&r instanceof Layout&&(this.graphManager=r.graphManager)}for(var d in f.prototype=Object.create(i.prototype),i)f[d]=i[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(t,r,n){if(null==r&&null==n){var i=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(i)>-1)throw"Node already in graph!";return i.owner=this,this.getNodes().push(i),i}var o=t;if(!(this.getNodes().indexOf(r)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(r.owner!=n.owner||r.owner!=this)throw"Both owners must be this graph!";return r.owner!=n.owner?null:(o.source=r,o.target=n,o.isInterGraph=!1,this.getEdges().push(o),r.edges.push(o),n!=r&&n.edges.push(o),o)},f.prototype.remove=function(t){var r=t;if(t instanceof h){if(null==r)throw"Node is null!";if(null==r.owner||r.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=r.edges.slice(),i=n.length,o=0;o<i;o++)(s=n[o]).isInterGraph?this.graphManager.remove(s):s.source.owner.remove(s);if(-1==(a=this.nodes.indexOf(r)))throw"Node not in owner node list!";this.nodes.splice(a,1)}else if(t instanceof u){var s;if(null==(s=t))throw"Edge is null!";if(null==s.source||null==s.target)throw"Source and/or target is null!";if(null==s.source.owner||null==s.target.owner||s.source.owner!=this||s.target.owner!=this)throw"Source and/or target owner is invalid!";var a,l=s.source.edges.indexOf(s),c=s.target.edges.indexOf(s);if(!(l>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(s.source.edges.splice(l,1),s.target!=s.source&&s.target.edges.splice(c,1),-1==(a=s.source.owner.getEdges().indexOf(s)))throw"Not in owner's edge list!";s.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var t,r,n,i=o.MAX_VALUE,s=o.MAX_VALUE,a=this.getNodes(),h=a.length,u=0;u<h;u++){var l=a[u];i>(t=l.getTop())&&(i=t),s>(r=l.getLeft())&&(s=r)}return i==o.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=s-n,this.top=i-n,new c(this.left,this.top))},f.prototype.updateBounds=function(t){for(var r,n,i,s,a,h=o.MAX_VALUE,u=-o.MAX_VALUE,c=o.MAX_VALUE,p=-o.MAX_VALUE,f=this.nodes,d=f.length,y=0;y<d;y++){var E=f[y];t&&null!=E.child&&E.updateBounds(),h>(r=E.getLeft())&&(h=r),u<(n=E.getRight())&&(u=n),c>(i=E.getTop())&&(c=i),p<(s=E.getBottom())&&(p=s)}var v=new l(h,c,u-h,p-c);h==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(t){for(var r,n,i,s,a=o.MAX_VALUE,h=-o.MAX_VALUE,u=o.MAX_VALUE,c=-o.MAX_VALUE,p=t.length,f=0;f<p;f++){var d=t[f];a>(r=d.getLeft())&&(a=r),h<(n=d.getRight())&&(h=n),u>(i=d.getTop())&&(u=i),c<(s=d.getBottom())&&(c=s)}return new l(a,u,h-a,c-u)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var t=0,r=this.nodes,n=r.length,i=0;i<n;i++)t+=r[i].calcEstimatedSize();return this.estimatedSize=0==t?s.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},f.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var r,n,i=new p,o=new Set,s=this.nodes[0];for(s.withChildren().forEach(function(t){i.push(t),o.add(t)});0!==i.length;)for(var a=(r=(s=i.shift()).getEdges()).length,h=0;h<a;h++)null==(n=r[h].getOtherEndInGraph(s,this))||o.has(n)||n.withChildren().forEach(function(t){i.push(t),o.add(t)});if(this.isConnected=!1,o.size>=this.nodes.length){var u=0;o.forEach(function(r){r.owner==t&&u++}),u==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=f},function(t,r,n){"use strict";var i,o=n(1);function s(t){i=n(5),this.layout=t,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var t=this.layout.newGraph(),r=this.layout.newNode(null),n=this.add(t,r);return this.setRootGraph(n),this.rootGraph},s.prototype.add=function(t,r,n,i,o){if(null==n&&null==i&&null==o){if(null==t)throw"Graph is null!";if(null==r)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=r.child)throw"Already has a child!";return t.parent=r,r.child=t,t}o=n,n=t;var s=(i=r).getOwner(),a=o.getOwner();if(null==s||s.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(s==a)return n.isInterGraph=!1,s.add(n,i,o);if(n.isInterGraph=!0,n.source=i,n.target=o,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},s.prototype.remove=function(t){if(t instanceof i){var r=t;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(r!=this.rootGraph&&(null==r.parent||r.parent.graphManager!=this))throw"Invalid parent node!";for(var n,s=[],a=(s=s.concat(r.getEdges())).length,h=0;h<a;h++)n=s[h],r.remove(n);var u,l=[];for(a=(l=l.concat(r.getNodes())).length,h=0;h<a;h++)u=l[h],r.remove(u);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(t instanceof o){if(null==(n=t))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(c=n.source.edges.indexOf(n),n.source.edges.splice(c,1),c=n.target.edges.indexOf(n),n.target.edges.splice(c,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";c=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(c,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],r=this.getGraphs(),n=r.length,i=0;i<n;i++)t=t.concat(r[i].getNodes());this.allNodes=t}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],r=this.getGraphs(),n=(r.length,0);n<r.length;n++)t=t.concat(r[n].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(t,r){if(null==t||null==r)throw"assert failed";if(t==r)return!0;for(var n,i=t.getOwner();null!=(n=i.getParent());){if(n==r)return!0;if(null==(i=n.getOwner()))break}for(i=r.getOwner();null!=(n=i.getParent());){if(n==t)return!0;if(null==(i=n.getOwner()))break}return!1},s.prototype.calcLowestCommonAncestors=function(){for(var t,r,n,i,o,s=this.getAllEdges(),a=s.length,h=0;h<a;h++)if(r=(t=s[h]).source,n=t.target,t.lca=null,t.sourceInLca=r,t.targetInLca=n,r!=n){for(i=r.getOwner();null==t.lca;){for(t.targetInLca=n,o=n.getOwner();null==t.lca;){if(o==i){t.lca=o;break}if(o==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=o.getParent(),o=t.targetInLca.getOwner()}if(i==this.rootGraph)break;null==t.lca&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=r.getOwner()},s.prototype.calcLowestCommonAncestor=function(t,r){if(t==r)return t.getOwner();for(var n=t.getOwner();null!=n;){for(var i=r.getOwner();null!=i;){if(i==n)return i;i=i.getParent().getOwner()}n=n.getParent().getOwner()}return n},s.prototype.calcInclusionTreeDepths=function(t,r){var n;null==t&&null==r&&(t=this.rootGraph,r=1);for(var i=t.getNodes(),o=i.length,s=0;s<o;s++)(n=i[s]).inclusionTreeDepth=r,null!=n.child&&this.calcInclusionTreeDepths(n.child,r+1)},s.prototype.includesInvalidEdge=function(){for(var t,r=this.edges.length,n=0;n<r;n++)if(t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=s},function(t,r,n){"use strict";var i=n(0);function o(){}for(var s in i)o[s]=i[s];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=3*o.MAX_NODE_DISPLACEMENT_INCREMENTAL,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,t.exports=o},function(t,r,n){"use strict";var i=n(12);function o(){}o.calcSeparationAmount=function(t,r,n,i){if(!t.intersects(r))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(t,r,o),n[0]=Math.min(t.getRight(),r.getRight())-Math.max(t.x,r.x),n[1]=Math.min(t.getBottom(),r.getBottom())-Math.max(t.y,r.y),t.getX()<=r.getX()&&t.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-t.getX(),t.getRight()-r.getRight()):r.getX()<=t.getX()&&r.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-r.getX(),r.getRight()-t.getRight())),t.getY()<=r.getY()&&t.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-t.getY(),t.getBottom()-r.getBottom()):r.getY()<=t.getY()&&r.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-r.getY(),r.getBottom()-t.getBottom()));var s=Math.abs((r.getCenterY()-t.getCenterY())/(r.getCenterX()-t.getCenterX()));r.getCenterY()===t.getCenterY()&&r.getCenterX()===t.getCenterX()&&(s=1);var a=s*n[0],h=n[1]/s;n[0]<h?h=n[0]:a=n[1],n[0]=-1*o[0]*(h/2+i),n[1]=-1*o[1]*(a/2+i)},o.decideDirectionsForOverlappingNodes=function(t,r,n){t.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,t.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},o.getIntersection2=function(t,r,n){var i=t.getCenterX(),o=t.getCenterY(),s=r.getCenterX(),a=r.getCenterY();if(t.intersects(r))return n[0]=i,n[1]=o,n[2]=s,n[3]=a,!0;var h=t.getX(),u=t.getY(),l=t.getRight(),c=t.getX(),p=t.getBottom(),f=t.getRight(),d=t.getWidthHalf(),y=t.getHeightHalf(),E=r.getX(),v=r.getY(),A=r.getRight(),_=r.getX(),O=r.getBottom(),N=r.getRight(),L=r.getWidthHalf(),T=r.getHeightHalf(),I=!1,D=!1;if(i===s){if(o>a)return n[0]=i,n[1]=u,n[2]=s,n[3]=O,!1;if(o<a)return n[0]=i,n[1]=p,n[2]=s,n[3]=v,!1}else if(o===a){if(i>s)return n[0]=h,n[1]=o,n[2]=A,n[3]=a,!1;if(i<s)return n[0]=l,n[1]=o,n[2]=E,n[3]=a,!1}else{var w=t.height/t.width,R=r.height/r.width,M=(a-o)/(s-i),x=void 0,C=void 0,G=void 0,S=void 0,F=void 0,Y=void 0;if(-w===M?i>s?(n[0]=c,n[1]=p,I=!0):(n[0]=l,n[1]=u,I=!0):w===M&&(i>s?(n[0]=h,n[1]=u,I=!0):(n[0]=f,n[1]=p,I=!0)),-R===M?s>i?(n[2]=_,n[3]=O,D=!0):(n[2]=A,n[3]=v,D=!0):R===M&&(s>i?(n[2]=E,n[3]=v,D=!0):(n[2]=N,n[3]=O,D=!0)),I&&D)return!1;if(i>s?o>a?(x=this.getCardinalDirection(w,M,4),C=this.getCardinalDirection(R,M,2)):(x=this.getCardinalDirection(-w,M,3),C=this.getCardinalDirection(-R,M,1)):o>a?(x=this.getCardinalDirection(-w,M,1),C=this.getCardinalDirection(-R,M,3)):(x=this.getCardinalDirection(w,M,2),C=this.getCardinalDirection(R,M,4)),!I)switch(x){case 1:S=u,G=i+-y/M,n[0]=G,n[1]=S;break;case 2:G=f,S=o+d*M,n[0]=G,n[1]=S;break;case 3:S=p,G=i+y/M,n[0]=G,n[1]=S;break;case 4:G=c,S=o+-d*M,n[0]=G,n[1]=S}if(!D)switch(C){case 1:Y=v,F=s+-T/M,n[2]=F,n[3]=Y;break;case 2:F=N,Y=a+L*M,n[2]=F,n[3]=Y;break;case 3:Y=O,F=s+T/M,n[2]=F,n[3]=Y;break;case 4:F=_,Y=a+-L*M,n[2]=F,n[3]=Y}}return!1},o.getCardinalDirection=function(t,r,n){return t>r?n:1+n%4},o.getIntersection=function(t,r,n,o){if(null==o)return this.getIntersection2(t,r,n);var s,a,h,u,l,c,p,f=t.x,d=t.y,y=r.x,E=r.y,v=n.x,A=n.y,_=o.x,O=o.y;return 0===(p=(s=E-d)*(u=v-_)-(a=O-A)*(h=f-y))?null:new i((h*(c=_*A-v*O)-u*(l=y*d-f*E))/p,(a*l-s*c)/p)},o.angleOfVector=function(t,r,n,i){var o=void 0;return t!==n?(o=Math.atan((i-r)/(n-t)),n<t?o+=Math.PI:i<r&&(o+=this.TWO_PI)):o=i<r?this.ONE_AND_HALF_PI:this.HALF_PI,o},o.doIntersect=function(t,r,n,i){var o=t.x,s=t.y,a=r.x,h=r.y,u=n.x,l=n.y,c=i.x,p=i.y,f=(a-o)*(p-l)-(c-u)*(h-s);if(0===f)return!1;var d=((p-l)*(c-o)+(u-c)*(p-s))/f,y=((s-h)*(c-o)+(a-o)*(p-s))/f;return 0<d&&d<1&&0<y&&y<1},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,t.exports=o},function(t,r,n){"use strict";function i(){}i.sign=function(t){return t>0?1:t<0?-1:0},i.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},i.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=i},function(t,r,n){"use strict";function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,t.exports=i},function(t,r,n){"use strict";var i=(function(){function t(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(r,n,i){return n&&t(r.prototype,n),i&&t(r,i),r}})();function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var s=function(t){return{value:t,next:null,prev:null}},a=function(t,r,n,i){return null!==t?t.next=r:i.head=r,null!==n?n.prev=r:i.tail=r,r.prev=t,r.next=n,i.length++,r},h=function(t,r){var n=t.prev,i=t.next;return null!==n?n.next=i:r.head=i,null!==i?i.prev=n:r.tail=n,t.prev=t.next=null,r.length--,t},u=(function(){function t(r){var n=this;o(this,t),this.length=0,this.head=null,this.tail=null,null!=r&&r.forEach(function(t){return n.push(t)})}return i(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,r){return a(r.prev,s(t),r,this)}},{key:"insertAfter",value:function(t,r){return a(r,s(t),r.next,this)}},{key:"insertNodeBefore",value:function(t,r){return a(r.prev,t,r,this)}},{key:"insertNodeAfter",value:function(t,r){return a(r,t,r.next,this)}},{key:"push",value:function(t){return a(this.tail,s(t),null,this)}},{key:"unshift",value:function(t){return a(null,s(t),this.head,this)}},{key:"remove",value:function(t){return h(t,this)}},{key:"pop",value:function(){return h(this.tail,this).value}},{key:"popNode",value:function(){return h(this.tail,this)}},{key:"shift",value:function(){return h(this.head,this).value}},{key:"shiftNode",value:function(){return h(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;return n.value}}},{key:"set_object_at",value:function(t,r){if(t<=this.length()){for(var n=1,i=this.head;n<t;)i=i.next,n++;i.value=r}}}]),t})();t.exports=u},function(t,r,n){"use strict";function i(t,r,n){this.x=null,this.y=null,null==t&&null==r&&null==n?(this.x=0,this.y=0):'number'==typeof t&&'number'==typeof r&&null==n?(this.x=t,this.y=r):'Point'==t.constructor.name&&null==r&&null==n&&(n=t,this.x=n.x,this.y=n.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(t,r,n){'Point'==t.constructor.name&&null==r&&null==n?(n=t,this.setLocation(n.x,n.y)):'number'==typeof t&&'number'==typeof r&&null==n&&(parseInt(t)==t&&parseInt(r)==r?this.move(t,r):(this.x=Math.floor(t+.5),this.y=Math.floor(r+.5)))},i.prototype.move=function(t,r){this.x=t,this.y=r},i.prototype.translate=function(t,r){this.x+=t,this.y+=r},i.prototype.equals=function(t){if("Point"==t.constructor.name){var r=t;return this.x==r.x&&this.y==r.y}return this==t},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=i},function(t,r,n){"use strict";function i(t,r,n,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=r&&null!=n&&null!=i&&(this.x=t,this.y=r,this.width=n,this.height=i)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(t){this.x=t},i.prototype.getY=function(){return this.y},i.prototype.setY=function(t){this.y=t},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},t.exports=i},function(t,r,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(){}o.lastID=0,o.createID=function(t){return o.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=o.getString(),o.lastID++),t.uniqueID)},o.getString=function(t){return null==t&&(t=o.lastID),"Object#"+t},o.isPrimitive=function(t){var r=void 0===t?"undefined":i(t);return null==t||"object"!=r&&"function"!=r},t.exports=o},function(t,r,n){"use strict";function i(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}var o=n(0),s=n(6),a=n(3),h=n(1),u=n(5),l=n(4),c=n(17),p=n(27);function f(t){p.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 s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}f.RANDOM_SEED=1,f.prototype=Object.create(p.prototype),f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},f.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},f.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},f.prototype.newGraphManager=function(){var t=new s(this);return this.graphManager=t,t},f.prototype.newGraph=function(t){return new u(null,this.graphManager,t)},f.prototype.newNode=function(t){return new a(this.graphManager,t)},f.prototype.newEdge=function(t){return new h(null,null,t)},f.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},f.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),'during'!==o.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},f.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},f.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),r=0;r<t.length;r++)t[r];var n=this.graphManager.getRoot().getNodes();for(r=0;r<n.length;r++)n[r];this.update(this.graphManager.getRoot())}},f.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var r=t;if(null!=r.getChild())for(var n=r.getChild().getNodes(),i=0;i<n.length;i++)update(n[i]);null!=r.vGraphObject&&r.vGraphObject.update(r)}else if(t instanceof h){var o=t;null!=o.vGraphObject&&o.vGraphObject.update(o)}else if(t instanceof u){var s=t;null!=s.vGraphObject&&s.vGraphObject.update(s)}},f.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)},f.prototype.transform=function(t){if(null==t)this.transform(new l(0,0));else{var r=new c,n=this.graphManager.getRoot().updateLeftTop();if(null!=n){r.setWorldOrgX(t.x),r.setWorldOrgY(t.y),r.setDeviceOrgX(n.x),r.setDeviceOrgY(n.y);for(var i=this.getAllNodes(),o=0;o<i.length;o++)i[o].transform(r)}}},f.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var r,n,i=t.getNodes(),o=0;o<i.length;o++)null==(n=(r=i[o]).getChild())||0==n.getNodes().length?r.scatter():(this.positionNodesRandomly(n),r.updateBounds())},f.prototype.getFlatForest=function(){for(var t=[],r=!0,n=this.graphManager.getRoot().getNodes(),o=!0,s=0;s<n.length;s++)null!=n[s].getChild()&&(o=!1);if(!o)return t;var a=new Set,h=[],u=new Map,l=[];for(l=l.concat(n);l.length>0&&r;){for(h.push(l[0]);h.length>0&&r;){var c=h[0];h.splice(0,1),a.add(c);var p=c.getEdges();for(s=0;s<p.length;s++){var f=p[s].getOtherEnd(c);if(u.get(c)!=f){if(a.has(f)){r=!1;break}h.push(f),u.set(f,c)}}}if(r){var d=[].concat(i(a));for(t.push(d),s=0;s<d.length;s++){var y=d[s],E=l.indexOf(y);E>-1&&l.splice(E,1)}a=new Set,u=new Map}else t=[]}return t},f.prototype.createDummyNodesForBendpoints=function(t){for(var r=[],n=t.source,i=this.graphManager.calcLowestCommonAncestor(t.source,t.target),o=0;o<t.bendpoints.length;o++){var s=this.newNode(null);s.setRect(new Point(0,0),new Dimension(1,1)),i.add(s);var a=this.newEdge(null);this.graphManager.add(a,n,s),r.add(s),n=s}return a=this.newEdge(null),this.graphManager.add(a,n,t.target),this.edgeToDummyNodes.set(t,r),t.isInterGraph()?this.graphManager.remove(t):i.remove(t),r},f.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(i(this.edgeToDummyNodes.keys())).concat(t);for(var r=0;r<t.length;r++){var n=t[r];if(n.bendpoints.length>0){for(var o=this.edgeToDummyNodes.get(n),s=0;s<o.length;s++){var a=o[s],h=new l(a.getCenterX(),a.getCenterY()),u=n.bendpoints.get(s);u.x=h.x,u.y=h.y,a.getOwner().remove(a)}this.graphManager.add(n,n.source,n.target)}}},f.transform=function(t,r,n,i){if(null!=n&&null!=i){var o=r;return t<=50?o-=(r-r/n)/50*(50-t):o+=(r*i-r)/50*(t-50),o}var s,a;return t<=50?(s=9*r/500,a=r/10):(s=9*r/50,a=-8*r),s*t+a},f.findCenterOfTree=function(t){var r=[];r=r.concat(t);var n=[],i=new Map,o=!1,s=null;1!=r.length&&2!=r.length||(o=!0,s=r[0]);for(var a=0;a<r.length;a++){var h=(c=r[a]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==h&&n.push(c)}var u=[];for(u=u.concat(n);!o;){var l=[];for(l=l.concat(u),u=[],a=0;a<r.length;a++){var c=r[a],p=r.indexOf(c);p>=0&&r.splice(p,1),c.getNeighborsList().forEach(function(t){if(n.indexOf(t)<0){var r=i.get(t)-1;1==r&&u.push(t),i.set(t,r)}})}n=n.concat(u),1!=r.length&&2!=r.length||(o=!0,s=r[0])}return s},f.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=f},function(t,r,n){"use strict";function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=1e4*Math.sin(i.seed++),i.x-Math.floor(i.x)},t.exports=i},function(t,r,n){"use strict";var i=n(4);function o(t,r){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(t){this.lworldOrgX=t},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(t){this.lworldExtX=t},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(t){this.lworldExtY=t},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},o.prototype.transformX=function(t){var r=0,n=this.lworldExtX;return 0!=n&&(r=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),r},o.prototype.transformY=function(t){var r=0,n=this.lworldExtY;return 0!=n&&(r=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),r},o.prototype.inverseTransformX=function(t){var r=0,n=this.ldeviceExtX;return 0!=n&&(r=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),r},o.prototype.inverseTransformY=function(t){var r=0,n=this.ldeviceExtY;return 0!=n&&(r=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),r},o.prototype.inverseTransformPoint=function(t){return new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=o},function(t,r,n){"use strict";function i(t){if(Array.isArray(t)){for(var r=0,n=Array(t.length);r<t.length;r++)n[r]=t[r];return n}return Array.from(t)}var o=n(15),s=n(7),a=n(0),h=n(8),u=n(9);function l(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.springConstant=s.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=s.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}for(var c in l.prototype=Object.create(o.prototype),o)l[c]=o[c];l.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,r,n,i,o,h,u=this.getGraphManager().getAllEdges(),l=0;l<u.length;l++)(t=u[l]).idealLength=this.idealEdgeLength,t.isInterGraph&&(n=t.getSource(),i=t.getTarget(),o=t.getSourceInLca().getEstimatedSize(),h=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=o+h-2*a.SIMPLE_NODE_SIZE),r=t.getLca().getInclusionTreeDepth(),t.idealLength+=s.DEFAULT_EDGE_LENGTH*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+i.getInclusionTreeDepth()-2*r))},l.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(t-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,r=this.getAllEdges(),n=0;n<r.length;n++)t=r[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,r,n,i,o,a=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t<u.length;t++)n=u[t],this.calculateRepulsionForceOfANode(n,o,a,h),o.add(n);else for(t=0;t<u.length;t++)for(n=u[t],r=t+1;r<u.length;r++)i=u[r],n.getOwner()==i.getOwner()&&this.calcRepulsionForce(n,i)},l.prototype.calcGravitationalForces=function(){for(var t,r=this.getAllNodesToApplyGravitation(),n=0;n<r.length;n++)t=r[n],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),r=0;r<t.length;r++)t[r].move()},l.prototype.calcSpringForce=function(t,r){var n,i,o,s,a=t.getSource(),h=t.getTarget();if(this.uniformLeafNodeSizes&&null==a.getChild()&&null==h.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(n=t.getLength())&&(o=(i=this.springConstant*(n-r))*(t.lengthX/n),s=i*(t.lengthY/n),a.springForceX+=o,a.springForceY+=s,h.springForceX-=o,h.springForceY-=s)},l.prototype.calcRepulsionForce=function(t,r){var n,i,o,a,l,c,p,f=t.getRect(),d=r.getRect(),y=new Array(2),E=new Array(4);if(f.intersects(d)){h.calcSeparationAmount(f,d,y,s.DEFAULT_EDGE_LENGTH/2),c=2*y[0],p=2*y[1];var v=t.noOfChildren*r.noOfChildren/(t.noOfChildren+r.noOfChildren);t.repulsionForceX-=v*c,t.repulsionForceY-=v*p,r.repulsionForceX+=v*c,r.repulsionForceY+=v*p}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==r.getChild()?(n=d.getCenterX()-f.getCenterX(),i=d.getCenterY()-f.getCenterY()):(h.getIntersection(f,d,E),n=E[2]-E[0],i=E[3]-E[1]),Math.abs(n)<s.MIN_REPULSION_DIST&&(n=u.sign(n)*s.MIN_REPULSION_DIST),Math.abs(i)<s.MIN_REPULSION_DIST&&(i=u.sign(i)*s.MIN_REPULSION_DIST),o=n*n+i*i,a=Math.sqrt(o),c=(l=this.repulsionConstant*t.noOfChildren*r.noOfChildren/o)*n/a,p=l*i/a,t.repulsionForceX-=c,t.repulsionForceY-=p,r.repulsionForceX+=c,r.repulsionForceY+=p},l.prototype.calcGravitationalForce=function(t){var r,n,i,o,s,a,h,u;n=((r=t.getOwner()).getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,o=t.getCenterX()-n,s=t.getCenterY()-i,a=Math.abs(o)+t.getWidth()/2,h=Math.abs(s)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(a>(u=r.getEstimatedSize()*this.gravityRangeFactor)||h>u)&&(t.gravitationForceX=-this.gravityConstant*o,t.gravitationForceY=-this.gravityConstant*s):(a>(u=r.getEstimatedSize()*this.compoundGravityRangeFactor)||h>u)&&(t.gravitationForceX=-this.gravityConstant*o*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*s*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,r=!1;return this.totalIterations>this.maxIterations/3&&(r=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||r},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,r=this.graphManager.getAllNodes(),n=0;n<r.length;n++)(t=r[n]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){var r,n;r=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var i=new Array(r),o=0;o<r;o++)i[o]=new Array(n);for(o=0;o<r;o++)for(var s=0;s<n;s++)i[o][s]=new Array;return i},l.prototype.addNodeToGrid=function(t,r,n){var i,o,s,a;i=parseInt(Math.floor((t.getRect().x-r)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().width+t.getRect().x-r)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().y-n)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().height+t.getRect().y-n)/this.repulsionRange));for(var h=i;h<=o;h++)for(var u=s;u<=a;u++)this.grid[h][u].push(t),t.setGridCoordinates(i,o,s,a)},l.prototype.updateGrid=function(){var t,r,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<n.length;t++)r=n[t],this.addNodeToGrid(r,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,r,n,o){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&n||o){var a,h=new Set;t.surrounding=new Array;for(var u=this.grid,l=t.startX-1;l<t.finishX+2;l++)for(var c=t.startY-1;c<t.finishY+2;c++)if(!(l<0||c<0||l>=u.length||c>=u[0].length))for(var p=0;p<u[l][c].length;p++)if(a=u[l][c][p],t.getOwner()==a.getOwner()&&t!=a&&!r.has(a)&&!h.has(a)){var f=Math.abs(t.getCenterX()-a.getCenterX())-(t.getWidth()/2+a.getWidth()/2),d=Math.abs(t.getCenterY()-a.getCenterY())-(t.getHeight()/2+a.getHeight()/2);f<=this.repulsionRange&&d<=this.repulsionRange&&h.add(a)}t.surrounding=[].concat(i(h))}for(l=0;l<t.surrounding.length;l++)this.calcRepulsionForce(t,t.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,r,n){"use strict";var i=n(1),o=n(7);function s(t,r,n){i.call(this,t,r,n),this.idealLength=o.DEFAULT_EDGE_LENGTH}for(var a in s.prototype=Object.create(i.prototype),i)s[a]=i[a];t.exports=s},function(t,r,n){"use strict";var i=n(3);function o(t,r,n,o){i.call(this,t,r,n,o),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var s in o.prototype=Object.create(i.prototype),i)o[s]=i[s];o.prototype.setGridCoordinates=function(t,r,n,i){this.startX=t,this.finishX=r,this.startY=n,this.finishY=i},t.exports=o},function(t,r,n){"use strict";function i(t,r){this.width=0,this.height=0,null!==t&&null!==r&&(this.height=r,this.width=t)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},t.exports=i},function(t,r,n){"use strict";var i=n(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(t,r){var n=i.createID(t);this.contains(n)||(this.map[n]=r,this.keys.push(t))},o.prototype.contains=function(t){return i.createID(t),null!=this.map[t]},o.prototype.get=function(t){var r=i.createID(t);return this.map[r]},o.prototype.keySet=function(){return this.keys},t.exports=o},function(t,r,n){"use strict";var i=n(14);function o(){this.set={}}o.prototype.add=function(t){var r=i.createID(t);this.contains(r)||(this.set[r]=t)},o.prototype.remove=function(t){delete this.set[i.createID(t)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(t){return this.set[i.createID(t)]==t},o.prototype.isEmpty=function(){return 0===this.size()},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(t){for(var r=Object.keys(this.set),n=r.length,i=0;i<n;i++)t.push(this.set[r[i]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(t){for(var r=t.length,n=0;n<r;n++){var i=t[n];this.add(i)}},t.exports=o},function(t,r,n){"use strict";var i=(function(){function t(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(r,n,i){return n&&t(r.prototype,n),i&&t(r,i),r}})();function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var s=n(11),a=(function(){function t(r,n){o(this,t),null===n&&void 0===n||(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=r instanceof s?r.size():r.length,this._quicksort(r,0,i-1)}return i(t,[{key:'_quicksort',value:function(t,r,n){if(r<n){var i=this._partition(t,r,n);this._quicksort(t,r,i),this._quicksort(t,i+1,n)}}},{key:'_partition',value:function(t,r,n){for(var i=this._get(t,r),o=r,s=n;;){for(;this.compareFunction(i,this._get(t,s));)s--;for(;this.compareFunction(this._get(t,o),i);)o++;if(!(o<s))return s;this._swap(t,o,s),o++,s--}}},{key:'_get',value:function(t,r){return t instanceof s?t.get_object_at(r):t[r]}},{key:'_set',value:function(t,r,n){t instanceof s?t.set_object_at(r,n):t[r]=n}},{key:'_swap',value:function(t,r,n){var i=this._get(t,r);this._set(t,r,this._get(t,n)),this._set(t,n,i)}},{key:'_defaultCompareFunction',value:function(t,r){return r>t}}]),t})();t.exports=a},function(t,r,n){"use strict";var i=(function(){function t(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(r,n,i){return n&&t(r.prototype,n),i&&t(r,i),r}})();function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var s=(function(){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;o(this,t),this.sequence1=r,this.sequence2=n,this.match_score=i,this.mismatch_penalty=s,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var u=0;u<this.jMax;u++)this.grid[h][u]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[l][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var i=1;i<this.jMax;i++){var o=[this.sequence1[n-1]===this.sequence2[i-1]?this.grid[n-1][i-1]+this.match_score:this.grid[n-1][i-1]+this.mismatch_penalty,this.grid[n-1][i]+this.gap_penalty,this.grid[n][i-1]+this.gap_penalty],s=this.arrayAllMaxIndexes(o);this.grid[n][i]=o[s[0]],this.tracebackGrid[n][i]=[s.includes(0),s.includes(1),s.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var r=t[0],n=this.tracebackGrid[r.pos[0]][r.pos[1]];n[0]&&t.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),n[1]&&t.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:'-'+r.seq2}),n[2]&&t.push({pos:[r.pos[0],r.pos[1]-1],seq1:'-'+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),0===r.pos[0]&&0===r.pos[1]&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,r){for(var n=[],i=-1;-1!==(i=t.indexOf(r,i+1));)n.push(i);return n}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t})();t.exports=s},function(t,r,n){"use strict";var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(7),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(4),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(24),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(5),i.LEdge=n(1),i.LGraphManager=n(6),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(25),t.exports=i},function(t,r,n){"use strict";function i(){this.listeners=[]}var o=i.prototype;o.addListener=function(t,r){this.listeners.push({event:t,callback:r})},o.removeListener=function(t,r){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===t&&i.callback===r&&this.listeners.splice(n,1)}},o.emit=function(t,r){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];t===i.event&&i.callback(r)}},t.exports=i}])},'object'==typeof e&&'object'==typeof m?m.exports=r():'function'==typeof define&&define.amd?define([],r):'object'==typeof e?e.layoutBase=r():t.layoutBase=r()},5337,[]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CynefinModule",{enumerable:!0,get:function(){return n.CynefinModule}}),Object.defineProperty(e,"createCynefinServices",{enumerable:!0,get:function(){return n.createCynefinServices}});var n=r(d[0]);r(d[1])},
|
|
1
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CynefinModule",{enumerable:!0,get:function(){return n.CynefinModule}}),Object.defineProperty(e,"createCynefinServices",{enumerable:!0,get:function(){return n.createCynefinServices}});var n=r(d[0]);r(d[1])},5185,[5152,5137]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__d(function(_g,r,_i,a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"diagram",{enumerable:!0,get:function(){return B}});var t=r(_d[0]),n=r(_d[1]),o=r(_d[2]),i=r(_d[3]),c=r(_d[4]),s=r(_d[5]),l=r(_d[6]),d=(0,s.__name)(()=>({domains:new Map,transitions:[]}),"createDefaultData"),f=d(),p={getDomains:(0,s.__name)(()=>f.domains,"getDomains"),getTransitions:(0,s.__name)(()=>f.transitions,"getTransitions"),setDomains:(0,s.__name)(t=>{if(t)for(const n of t){const t=n.domain,o=(n.items??[]).map(t=>({label:t.label}));f.domains.set(t,{name:t,items:o})}},"setDomains"),setTransitions:(0,s.__name)(t=>{t&&(f.transitions=t.filter(t=>t.from!==t.to||(c.log.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1)).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),getConfig:(0,s.__name)(()=>(0,o.cleanAndMerge)(Object.assign({},i.defaultConfig_default.cynefin,(0,i.getConfig)().cynefin)),"getConfig"),clear:(0,s.__name)(()=>{(0,i.clear)(),f=d()},"clear"),setAccTitle:i.setAccTitle,getAccTitle:i.getAccTitle,setDiagramTitle:i.setDiagramTitle,getDiagramTitle:i.getDiagramTitle,getAccDescription:i.getAccDescription,setAccDescription:i.setAccDescription},y=(0,s.__name)(n=>{(0,t.populateCommonDb)(n,p),p.setDomains(n.domains),p.setTransitions(n.transitions)},"populate"),g={parse:(0,s.__name)(async t=>{const n=await(0,l.parse)("cynefin",t);c.log.debug(n),y(n)},"parse")};function x(t){let n=t+1831565813|0;return n=Math.imul(n^n>>>15,1|n),n^=n+Math.imul(n^n>>>7,61|n),((n^n>>>14)>>>0)/4294967296}function h(t){let n=0;for(let o=0;o<t.length;o++){n=(n<<5)-n+t.charCodeAt(o),n|=0}return n}function u(t,n){return"number"==typeof t&&Number.isFinite(t)&&0!==t?t:h(n)}function $(t,n,o,i){const c=t/2,s=i??.015*t,l=n/7,d=[];for(let t=0;t<=7;t++){const n=x(o+17*t)*s*2-s;d.push({x:c+n,y:t*l})}let f=`M${d[0].x},${d[0].y}`;for(let t=0;t<d.length-1;t++){const n=d[t],i=d[t+1],c=(n.y+i.y)/2,l=1.5*s*(t%2==0?1:-1)*x(o+31*t+7);f+=` C${n.x+l},${c} ${i.x-l},${c} ${i.x},${i.y}`}return f}function b(t,n,o,i){const c=n/2,s=i??.015*n,l=t/7,d=[];for(let t=0;t<=7;t++){const n=x(o+23*t)*s*2-s;d.push({x:t*l,y:c+n})}let f=`M${d[0].x},${d[0].y}`;for(let t=0;t<d.length-1;t++){const n=d[t],i=d[t+1],c=(n.x+i.x)/2,l=1.5*s*(t%2==0?1:-1)*x(o+37*t+11);f+=` C${c},${n.y+l} ${c},${i.y-l} ${i.x},${i.y}`}return f}function _(t,n){const o=t/2,i=.5*n,c=.03*t;return[`M${o},${i}`,`C${o+c},${i+.2*(n-i)}`,`${o-1.5*c},${i+.55*(n-i)}`,`${o+.5*c},${i+.75*(n-i)}`,`C${o-c},${i+.85*(n-i)}`,`${o+.3*c},${i+.95*(n-i)}`,`${o},${n}`].join(" ")}function w(t,n,o,i){return[`M${t-o},${n}`,`A${o},${i} 0 1,1 ${t+o},${n}`,`A${o},${i} 0 1,1 ${t-o},${n}`,"Z"].join(" ")}(0,s.__name)(x,"seededRandom"),(0,s.__name)(h,"hashString"),(0,s.__name)(u,"resolveSeed"),(0,s.__name)($,"generateFoldPath"),(0,s.__name)(b,"generateHorizontalBoundary"),(0,s.__name)(_,"generateCliffPath"),(0,s.__name)(w,"generateConfusionPath");var C={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},D=(0,s.__name)((t,n)=>{const o=t/2,i=n/2;return{complex:{cx:o/2,cy:i/2,x:0,y:0,w:o,h:i},complicated:{cx:o+o/2,cy:i/2,x:o,y:0,w:o,h:i},chaotic:{cx:o/2,cy:i+i/2,x:0,y:i,w:o,h:i},clear:{cx:o+o/2,cy:i+i/2,x:o,y:i,w:o,h:i},confusion:{cx:o,cy:i,x:.7*o,y:.7*i,w:.6*o,h:.6*i}}},"getDomainLayouts"),A=(0,s.__name)(()=>{const t=(0,i.getThemeVariables)(),n=(0,i.getConfig)();return(0,o.cleanAndMerge)(t,n.themeVariables).cynefin},"getCynefinDomainColors"),k={draw:(0,s.__name)((t,o,s,l)=>{const d=l.db,f=d.getDomains(),p=d.getTransitions(),y=d.getDiagramTitle(),g=d.getAccTitle(),x=d.getAccDescription(),h=d.getConfig(),k=A();c.log.debug("Rendering Cynefin diagram");const T=h.width,B=h.height,S=h.padding,M=h.showDomainDescriptions,v=h.boundaryAmplitude,z=T+2*S,L=B+2*S,P={complex:k.complexBg,complicated:k.complicatedBg,clear:k.clearBg,chaotic:k.chaoticBg,confusion:k.confusionBg},F=(0,n.selectSvgElement)(o);(0,i.configureSvgSize)(F,L,z,h.useMaxWidth??!0),F.attr("viewBox",`0 0 ${z} ${L}`),g&&F.append("title").text(g),x&&F.append("desc").text(x);const I=F.append("g").attr("transform",`translate(${S}, ${S})`),R=D(T,B),j=u(h.seed,o),O=I.append("g").attr("class","cynefin-backgrounds"),W=["complex","complicated","chaotic","clear"];for(const t of W){const n=R[t];O.append("rect").attr("class","cynefinDomain").attr("x",n.x).attr("y",n.y).attr("width",n.w).attr("height",n.h).attr("fill",P[t]).attr("fill-opacity",.4).attr("stroke","none")}const E=I.append("g").attr("class","cynefin-boundaries");E.append("path").attr("class","cynefinBoundary").attr("d",$(T,B,j,v)).attr("fill","none"),E.append("path").attr("class","cynefinBoundary").attr("d",b(T,B,j+100,v)).attr("fill","none"),E.append("path").attr("class","cynefinCliff").attr("d",_(T,B)).attr("fill","none");const H=.15*T,V=.15*B;I.append("path").attr("class","cynefinConfusion").attr("d",w(T/2,B/2,H,V)).attr("fill",P.confusion).attr("fill-opacity",.5);const N=I.append("g").attr("class","cynefin-labels");for(const t of W){const n=R[t];N.append("text").attr("class","cynefinDomainLabel").attr("x",n.cx).attr("y",M?n.cy-30:n.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(t.charAt(0).toUpperCase()+t.slice(1))}if(N.append("text").attr("class","cynefinDomainLabel").attr("x",T/2).attr("y",M?B/2-10:B/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),M){const t=I.append("g").attr("class","cynefin-subtitles");for(const n of W){const o=R[n],i=C[n];t.append("text").attr("class","cynefinSubtitle").attr("x",o.cx).attr("y",o.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i.model),t.append("text").attr("class","cynefinSubtitle").attr("x",o.cx).attr("y",o.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i.practice)}t.append("text").attr("class","cynefinSubtitle").attr("x",T/2).attr("y",B/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(C.confusion.practice)}const q=I.append("g").attr("class","cynefin-items"),G=["complex","complicated","chaotic","clear","confusion"];for(const t of G){const n=f.get(t);if(!n||0===n.items.length)continue;const o=R[t],i="confusion"===t;let c,s=n.items,l=0;if(i&&n.items.length>3&&(l=n.items.length-3,s=n.items.slice(0,3)),i){const t=M?22:14;c=o.cy+t}else c=o.cy+(M?25:15);if([...s].forEach((n,i)=>{const s=c+30*i,l=q.append("g"),d=l.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(n.label);let f=7*n.label.length;const p=d.node();if(p&&"function"==typeof p.getBBox){const t=p.getBBox();t.width>0&&(f=t.width)}const y=f+20,g=o.cx-y/2;l.attr("transform",`translate(${g}, ${s})`),l.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",y).attr("height",26).attr("rx",4).attr("ry",4).attr("fill",P[t]).attr("fill-opacity",.95),d.attr("x",y/2).attr("y",13)}),l>0){const n=c+30*s.length,i=`+${l} more`,d=q.append("g"),f=d.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(i);let p=7*i.length;const y=f.node();if(y&&"function"==typeof y.getBBox){const t=y.getBBox();t.width>0&&(p=t.width)}const g=p+20,x=o.cx-g/2;d.attr("transform",`translate(${x}, ${n})`),d.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",g).attr("height",26).attr("rx",4).attr("ry",4).attr("fill",P[t]).attr("fill-opacity",.6),f.attr("x",g/2).attr("y",13)}}if(p.length>0){const t=F.select("defs").empty()?F.append("defs"):F.select("defs"),n=`cynefin-arrow-${o}`;t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const i=I.append("g").attr("class","cynefin-arrows");p.forEach(t=>{const o=R[t.from],s=R[t.to];if(!o||!s)return;if(t.from===t.to)return void c.log.warn(`Cynefin renderer: skipping self-loop on domain "${t.from}"`);const l=o.cx,d=o.cy,f=s.cx,p=s.cy,y=(l+f)/2,g=(d+p)/2,x=f-l,h=p-d,u=Math.sqrt(x*x+h*h),$=.15*u,b=y+-h/u*$,_=g+x/u*$;i.append("path").attr("class","cynefinArrowLine").attr("d",`M${l},${d} Q${b},${_} ${f},${p}`).attr("fill","none").attr("marker-end",`url(#${n})`),t.label&&i.append("text").attr("class","cynefinArrowLabel").attr("x",b).attr("y",_-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(t.label)})}y&&I.append("text").attr("class","cynefinTitle").attr("x",T/2).attr("y",-S/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y)},"draw")},T=(0,s.__name)(()=>{const t=(0,i.getThemeVariables)(),n=(0,i.getConfig)();return(0,o.cleanAndMerge)(t,n.themeVariables).cynefin},"getCynefinTheme"),B={parser:g,db:p,renderer:k,styles:(0,s.__name)(()=>{const t=T();return`\n\t.cynefinDomain {\n\t\tstroke: none;\n\t}\n\t.cynefinDomainLabel {\n\t\tfont-size: ${t.domainFontSize}px;\n\t\tfont-weight: bold;\n\t\tfill: ${t.labelColor};\n\t}\n\t.cynefinSubtitle {\n\t\tfont-size: ${t.itemFontSize-1}px;\n\t\tfill: ${t.textColor};\n\t\tfont-style: italic;\n\t}\n\t.cynefinItem {\n\t\tfill-opacity: 0.95;\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1;\n\t}\n\t.cynefinItemText {\n\t\tfont-size: ${t.itemFontSize}px;\n\t\tfill: ${t.textColor};\n\t}\n\t.cynefinItemOverflow {\n\t\tfill-opacity: 0.6;\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1;\n\t\tstroke-dasharray: 3 2;\n\t}\n\t.cynefinBoundary {\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: ${t.boundaryWidth};\n\t\tstroke-dasharray: 6 3;\n\t}\n\t.cynefinCliff {\n\t\tstroke: ${t.cliffColor};\n\t\tstroke-width: ${t.cliffWidth};\n\t}\n\t.cynefinConfusion {\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1.5;\n\t\tstroke-dasharray: 4 2;\n\t}\n\t.cynefinArrowLine {\n\t\tstroke: ${t.arrowColor};\n\t\tstroke-width: ${t.arrowWidth};\n\t\tfill: none;\n\t}\n\t.cynefinArrowHead {\n\t\tfill: ${t.arrowColor};\n\t\tstroke: none;\n\t}\n\t.cynefinArrowLabel {\n\t\tfont-size: ${t.itemFontSize-1}px;\n\t\tfill: ${t.textColor};\n\t}\n\t.cynefinTitle {\n\t\tfont-size: ${t.domainFontSize+2}px;\n\t\tfont-weight: bold;\n\t\tfill: ${t.labelColor};\n\t}\n\t`},"styles")}},3316,[5153,3267,3277,3278,3279,3280,5152]);
|
|
1
|
+
__d(function(_g,r,_i,a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"diagram",{enumerable:!0,get:function(){return B}});var t=r(_d[0]),n=r(_d[1]),o=r(_d[2]),i=r(_d[3]),c=r(_d[4]),s=r(_d[5]),l=r(_d[6]),d=(0,s.__name)(()=>({domains:new Map,transitions:[]}),"createDefaultData"),f=d(),p={getDomains:(0,s.__name)(()=>f.domains,"getDomains"),getTransitions:(0,s.__name)(()=>f.transitions,"getTransitions"),setDomains:(0,s.__name)(t=>{if(t)for(const n of t){const t=n.domain,o=(n.items??[]).map(t=>({label:t.label}));f.domains.set(t,{name:t,items:o})}},"setDomains"),setTransitions:(0,s.__name)(t=>{t&&(f.transitions=t.filter(t=>t.from!==t.to||(c.log.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1)).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),getConfig:(0,s.__name)(()=>(0,o.cleanAndMerge)(Object.assign({},i.defaultConfig_default.cynefin,(0,i.getConfig)().cynefin)),"getConfig"),clear:(0,s.__name)(()=>{(0,i.clear)(),f=d()},"clear"),setAccTitle:i.setAccTitle,getAccTitle:i.getAccTitle,setDiagramTitle:i.setDiagramTitle,getDiagramTitle:i.getDiagramTitle,getAccDescription:i.getAccDescription,setAccDescription:i.setAccDescription},y=(0,s.__name)(n=>{(0,t.populateCommonDb)(n,p),p.setDomains(n.domains),p.setTransitions(n.transitions)},"populate"),g={parse:(0,s.__name)(async t=>{const n=await(0,l.parse)("cynefin",t);c.log.debug(n),y(n)},"parse")};function x(t){let n=t+1831565813|0;return n=Math.imul(n^n>>>15,1|n),n^=n+Math.imul(n^n>>>7,61|n),((n^n>>>14)>>>0)/4294967296}function h(t){let n=0;for(let o=0;o<t.length;o++){n=(n<<5)-n+t.charCodeAt(o),n|=0}return n}function u(t,n){return"number"==typeof t&&Number.isFinite(t)&&0!==t?t:h(n)}function $(t,n,o,i){const c=t/2,s=i??.015*t,l=n/7,d=[];for(let t=0;t<=7;t++){const n=x(o+17*t)*s*2-s;d.push({x:c+n,y:t*l})}let f=`M${d[0].x},${d[0].y}`;for(let t=0;t<d.length-1;t++){const n=d[t],i=d[t+1],c=(n.y+i.y)/2,l=1.5*s*(t%2==0?1:-1)*x(o+31*t+7);f+=` C${n.x+l},${c} ${i.x-l},${c} ${i.x},${i.y}`}return f}function b(t,n,o,i){const c=n/2,s=i??.015*n,l=t/7,d=[];for(let t=0;t<=7;t++){const n=x(o+23*t)*s*2-s;d.push({x:t*l,y:c+n})}let f=`M${d[0].x},${d[0].y}`;for(let t=0;t<d.length-1;t++){const n=d[t],i=d[t+1],c=(n.x+i.x)/2,l=1.5*s*(t%2==0?1:-1)*x(o+37*t+11);f+=` C${c},${n.y+l} ${c},${i.y-l} ${i.x},${i.y}`}return f}function _(t,n){const o=t/2,i=.5*n,c=.03*t;return[`M${o},${i}`,`C${o+c},${i+.2*(n-i)}`,`${o-1.5*c},${i+.55*(n-i)}`,`${o+.5*c},${i+.75*(n-i)}`,`C${o-c},${i+.85*(n-i)}`,`${o+.3*c},${i+.95*(n-i)}`,`${o},${n}`].join(" ")}function w(t,n,o,i){return[`M${t-o},${n}`,`A${o},${i} 0 1,1 ${t+o},${n}`,`A${o},${i} 0 1,1 ${t-o},${n}`,"Z"].join(" ")}(0,s.__name)(x,"seededRandom"),(0,s.__name)(h,"hashString"),(0,s.__name)(u,"resolveSeed"),(0,s.__name)($,"generateFoldPath"),(0,s.__name)(b,"generateHorizontalBoundary"),(0,s.__name)(_,"generateCliffPath"),(0,s.__name)(w,"generateConfusionPath");var C={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},D=(0,s.__name)((t,n)=>{const o=t/2,i=n/2;return{complex:{cx:o/2,cy:i/2,x:0,y:0,w:o,h:i},complicated:{cx:o+o/2,cy:i/2,x:o,y:0,w:o,h:i},chaotic:{cx:o/2,cy:i+i/2,x:0,y:i,w:o,h:i},clear:{cx:o+o/2,cy:i+i/2,x:o,y:i,w:o,h:i},confusion:{cx:o,cy:i,x:.7*o,y:.7*i,w:.6*o,h:.6*i}}},"getDomainLayouts"),A=(0,s.__name)(()=>{const t=(0,i.getThemeVariables)(),n=(0,i.getConfig)();return(0,o.cleanAndMerge)(t,n.themeVariables).cynefin},"getCynefinDomainColors"),k={draw:(0,s.__name)((t,o,s,l)=>{const d=l.db,f=d.getDomains(),p=d.getTransitions(),y=d.getDiagramTitle(),g=d.getAccTitle(),x=d.getAccDescription(),h=d.getConfig(),k=A();c.log.debug("Rendering Cynefin diagram");const T=h.width,B=h.height,S=h.padding,M=h.showDomainDescriptions,v=h.boundaryAmplitude,z=T+2*S,L=B+2*S,P={complex:k.complexBg,complicated:k.complicatedBg,clear:k.clearBg,chaotic:k.chaoticBg,confusion:k.confusionBg},F=(0,n.selectSvgElement)(o);(0,i.configureSvgSize)(F,L,z,h.useMaxWidth??!0),F.attr("viewBox",`0 0 ${z} ${L}`),g&&F.append("title").text(g),x&&F.append("desc").text(x);const I=F.append("g").attr("transform",`translate(${S}, ${S})`),R=D(T,B),j=u(h.seed,o),O=I.append("g").attr("class","cynefin-backgrounds"),W=["complex","complicated","chaotic","clear"];for(const t of W){const n=R[t];O.append("rect").attr("class","cynefinDomain").attr("x",n.x).attr("y",n.y).attr("width",n.w).attr("height",n.h).attr("fill",P[t]).attr("fill-opacity",.4).attr("stroke","none")}const E=I.append("g").attr("class","cynefin-boundaries");E.append("path").attr("class","cynefinBoundary").attr("d",$(T,B,j,v)).attr("fill","none"),E.append("path").attr("class","cynefinBoundary").attr("d",b(T,B,j+100,v)).attr("fill","none"),E.append("path").attr("class","cynefinCliff").attr("d",_(T,B)).attr("fill","none");const H=.15*T,V=.15*B;I.append("path").attr("class","cynefinConfusion").attr("d",w(T/2,B/2,H,V)).attr("fill",P.confusion).attr("fill-opacity",.5);const N=I.append("g").attr("class","cynefin-labels");for(const t of W){const n=R[t];N.append("text").attr("class","cynefinDomainLabel").attr("x",n.cx).attr("y",M?n.cy-30:n.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(t.charAt(0).toUpperCase()+t.slice(1))}if(N.append("text").attr("class","cynefinDomainLabel").attr("x",T/2).attr("y",M?B/2-10:B/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),M){const t=I.append("g").attr("class","cynefin-subtitles");for(const n of W){const o=R[n],i=C[n];t.append("text").attr("class","cynefinSubtitle").attr("x",o.cx).attr("y",o.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i.model),t.append("text").attr("class","cynefinSubtitle").attr("x",o.cx).attr("y",o.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i.practice)}t.append("text").attr("class","cynefinSubtitle").attr("x",T/2).attr("y",B/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(C.confusion.practice)}const q=I.append("g").attr("class","cynefin-items"),G=["complex","complicated","chaotic","clear","confusion"];for(const t of G){const n=f.get(t);if(!n||0===n.items.length)continue;const o=R[t],i="confusion"===t;let c,s=n.items,l=0;if(i&&n.items.length>3&&(l=n.items.length-3,s=n.items.slice(0,3)),i){const t=M?22:14;c=o.cy+t}else c=o.cy+(M?25:15);if([...s].forEach((n,i)=>{const s=c+30*i,l=q.append("g"),d=l.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(n.label);let f=7*n.label.length;const p=d.node();if(p&&"function"==typeof p.getBBox){const t=p.getBBox();t.width>0&&(f=t.width)}const y=f+20,g=o.cx-y/2;l.attr("transform",`translate(${g}, ${s})`),l.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",y).attr("height",26).attr("rx",4).attr("ry",4).attr("fill",P[t]).attr("fill-opacity",.95),d.attr("x",y/2).attr("y",13)}),l>0){const n=c+30*s.length,i=`+${l} more`,d=q.append("g"),f=d.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(i);let p=7*i.length;const y=f.node();if(y&&"function"==typeof y.getBBox){const t=y.getBBox();t.width>0&&(p=t.width)}const g=p+20,x=o.cx-g/2;d.attr("transform",`translate(${x}, ${n})`),d.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",g).attr("height",26).attr("rx",4).attr("ry",4).attr("fill",P[t]).attr("fill-opacity",.6),f.attr("x",g/2).attr("y",13)}}if(p.length>0){const t=F.select("defs").empty()?F.append("defs"):F.select("defs"),n=`cynefin-arrow-${o}`;t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const i=I.append("g").attr("class","cynefin-arrows");p.forEach(t=>{const o=R[t.from],s=R[t.to];if(!o||!s)return;if(t.from===t.to)return void c.log.warn(`Cynefin renderer: skipping self-loop on domain "${t.from}"`);const l=o.cx,d=o.cy,f=s.cx,p=s.cy,y=(l+f)/2,g=(d+p)/2,x=f-l,h=p-d,u=Math.sqrt(x*x+h*h),$=.15*u,b=y+-h/u*$,_=g+x/u*$;i.append("path").attr("class","cynefinArrowLine").attr("d",`M${l},${d} Q${b},${_} ${f},${p}`).attr("fill","none").attr("marker-end",`url(#${n})`),t.label&&i.append("text").attr("class","cynefinArrowLabel").attr("x",b).attr("y",_-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(t.label)})}y&&I.append("text").attr("class","cynefinTitle").attr("x",T/2).attr("y",-S/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y)},"draw")},T=(0,s.__name)(()=>{const t=(0,i.getThemeVariables)(),n=(0,i.getConfig)();return(0,o.cleanAndMerge)(t,n.themeVariables).cynefin},"getCynefinTheme"),B={parser:g,db:p,renderer:k,styles:(0,s.__name)(()=>{const t=T();return`\n\t.cynefinDomain {\n\t\tstroke: none;\n\t}\n\t.cynefinDomainLabel {\n\t\tfont-size: ${t.domainFontSize}px;\n\t\tfont-weight: bold;\n\t\tfill: ${t.labelColor};\n\t}\n\t.cynefinSubtitle {\n\t\tfont-size: ${t.itemFontSize-1}px;\n\t\tfill: ${t.textColor};\n\t\tfont-style: italic;\n\t}\n\t.cynefinItem {\n\t\tfill-opacity: 0.95;\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1;\n\t}\n\t.cynefinItemText {\n\t\tfont-size: ${t.itemFontSize}px;\n\t\tfill: ${t.textColor};\n\t}\n\t.cynefinItemOverflow {\n\t\tfill-opacity: 0.6;\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1;\n\t\tstroke-dasharray: 3 2;\n\t}\n\t.cynefinBoundary {\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: ${t.boundaryWidth};\n\t\tstroke-dasharray: 6 3;\n\t}\n\t.cynefinCliff {\n\t\tstroke: ${t.cliffColor};\n\t\tstroke-width: ${t.cliffWidth};\n\t}\n\t.cynefinConfusion {\n\t\tstroke: ${t.boundaryColor};\n\t\tstroke-width: 1.5;\n\t\tstroke-dasharray: 4 2;\n\t}\n\t.cynefinArrowLine {\n\t\tstroke: ${t.arrowColor};\n\t\tstroke-width: ${t.arrowWidth};\n\t\tfill: none;\n\t}\n\t.cynefinArrowHead {\n\t\tfill: ${t.arrowColor};\n\t\tstroke: none;\n\t}\n\t.cynefinArrowLabel {\n\t\tfont-size: ${t.itemFontSize-1}px;\n\t\tfill: ${t.textColor};\n\t}\n\t.cynefinTitle {\n\t\tfont-size: ${t.domainFontSize+2}px;\n\t\tfont-weight: bold;\n\t\tfill: ${t.labelColor};\n\t}\n\t`},"styles")}},3317,[5154,3268,3278,3279,3280,3281,5153]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__d(function(g,r,i,_a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"getEdgesToRender",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"render",{enumerable:!0,get:function(){return X}});var t=r(_d[0]),n=r(_d[1]),o=r(_d[2]);r(_d[3]),r(_d[4]);var a=r(_d[5]);r(_d[6]),r(_d[7]),r(_d[8]);var d=r(_d[9]),s=r(_d[10]),l=r(_d[11]),c=r(_d[12]),f=e(r(_d[13])),h=e(r(_d[14])),u=(0,l.__name)((e,t,n)=>Math.max(t,Math.min(n,e)),"clamp"),p=(0,l.__name)((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),y=(0,l.__name)(e=>"flowchart"===e||"flowchart-v2"===e||"stateDiagram"===e,"shouldMergeSelfLoopSegments"),w=(0,l.__name)((e,t,n,o,a)=>{const d=[],s=new Set;if(n.forEach(({start:e,end:t})=>{e!==o&&s.add(e),t!==o&&s.add(t)}),s.forEach(t=>{const n=e.node(t);"number"==typeof n?.x&&"number"==typeof n?.y&&d.push(n)}),0===d.length&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{"number"==typeof e?.x&&"number"==typeof e?.y&&d.push(e)})}),0===d.length)return p(a);const l=d.reduce((e,t)=>({x:e.x+t.x/d.length,y:e.y+t.y/d.length}),{x:0,y:0}),c=l.x-t.x,f=l.y-t.y;return Math.abs(c)>Math.abs(f)?c>0?"right":"left":Math.abs(f)>0?f>0?"bottom":"top":p(a)},"getSelfLoopSide"),b=(0,l.__name)((e,t="top",n=0,o=0)=>{const a=e.x,d=e.y-n,s=e.width/2,l=e.height/2,c=Math.max(36,Math.min(100,.8*e.width)),f=u(Math.max(o,.35*e.width),36,c),h=u(.45*Math.min(e.width,e.height),24,48);switch(t){case"bottom":{const e=d+l;return[{x:a-f/2,y:e},{x:a-f/2,y:e+h},{x:a+f/2,y:e+h},{x:a+f/2,y:e}]}case"right":{const e=a+s;return[{x:e,y:d-f/2},{x:e+h,y:d-f/2},{x:e+h,y:d+f/2},{x:e,y:d+f/2}]}case"left":{const e=a-s;return[{x:e,y:d-f/2},{x:e-h,y:d-f/2},{x:e-h,y:d+f/2},{x:e,y:d+f/2}]}default:{const e=d-l;return[{x:a-f/2,y:e},{x:a-f/2,y:e-h},{x:a+f/2,y:e-h},{x:a+f/2,y:e}]}}},"getSelfLoopPoints"),x=(0,l.__name)((e,t,n="top",o=0,a={})=>{const d=e.x,s=e.y-o,l=a.width??0,c=a.height??0;switch(n){case"bottom":return{x:d,y:Math.max(...t.map(e=>e.y))+c/2+4};case"right":return{x:Math.max(...t.map(e=>e.x))+l/2+4,y:s};case"left":return{x:Math.min(...t.map(e=>e.x))-l/2-4,y:s};default:return{x:d,y:Math.min(...t.map(e=>e.y))-c/2-4}}},"getSelfLoopLabelPosition"),E=(0,l.__name)((e,t=0,{mergeSelfLoops:n=!0}={})=>{const o=new Map,a=[],d=e.graph()?.rankdir;return e.edges().forEach(t=>{const d=e.edge(t);if(n&&d.selfLoop){const e=d.selfLoop.id;o.has(e)||o.set(e,[]),o.get(e).push({edge:d,start:t.v,end:t.w})}else a.push({edge:d,start:t.v,end:t.w})}),o.forEach(n=>{if(3!==n.length)return void n.forEach(e=>a.push(e));n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);const[o,s,l]=n,c=o.edge.originalEdge??s.edge.originalEdge??l.edge.originalEdge??s.edge,f=e.node(c.start);if(!f)return void n.forEach(e=>a.push(e));const h={width:s.edge.width,height:s.edge.height},u=w(e,f,n,c.start,d),p=b(f,u,t,h.width??0),y=x(f,p,u,t,h),E=Object.assign({},s.edge,c,{id:c.id,points:p,start:c.start,end:c.end,x:y.x,y:y.y,width:h.width,height:h.height,labelStyle:s.edge.labelStyle,fromCluster:o.edge.fromCluster??s.edge.fromCluster??l.edge.fromCluster,toCluster:o.edge.toCluster??s.edge.toCluster??l.edge.toCluster});delete E.selfLoop,delete E.originalEdge,a.push({edge:E,start:E.start,end:E.end})}),a},"getEdgesToRender"),L=(0,l.__name)(async(e,d,h,u,p,w)=>{s.log.warn("Graph in recursive render:XAX",f.write(d),p);const b=d.graph().rankdir;s.log.trace("Dir in recursive render - dir:",b);const x=e.insert("g").attr("class","root");d.nodes()?s.log.info("Recursive render XXX",d.nodes()):s.log.info("No nodes found for",d),d.edges().length>0&&s.log.info("Recursive edges",d.edge(d.edges()[0]));const X=x.insert("g").attr("class","clusters"),S=x.insert("g").attr("class","edgePaths"),N=x.insert("g").attr("class","edgeLabels"),v=x.insert("g").attr("class","nodes"),_=y(h);await Promise.all(d.nodes().map(async function(e){const n=d.node(e);if(void 0!==p){const t=JSON.parse(JSON.stringify(p.clusterData));s.log.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",p.height),d.setNode(p.id,t),d.parent(e)||(s.log.trace("Setting parent",e,p.id),d.setParent(e,p.id,t))}if(s.log.info("(Insert) Node XXX"+e+": "+JSON.stringify(d.node(e))),n?.clusterNode){s.log.info("Cluster identified XBX",e,n.width,d.node(e));const{ranksep:t,nodesep:a}=d.graph();n.graph.setGraph(Object.assign({},n.graph.graph(),{ranksep:t+25,nodesep:a}));const l=await L(v,n.graph,h,u,d.node(e),w),c=l.elem;(0,o.updateNodeBounds)(n,c),n.diff=l.diff||0,s.log.info("New compound node after recursive render XAX",e,"width",n.width,"height",n.height),(0,o.setNodeElem)(c,n)}else d.children(e).length>0?(s.log.trace("Cluster - the non recursive path XBX",e,n.id,n,n.width,"Graph:",d),s.log.trace((0,t.findNonClusterChild)(n.id,d)),t.clusterDb.set(n.id,{id:(0,t.findNonClusterChild)(n.id,d),node:n})):(s.log.trace("Node - the non recursive path XAX",e,v,d.node(e),b),await(0,o.insertNode)(v,d.node(e),{config:w,dir:b}))}));const C=(0,l.__name)(async()=>{const e=d.edges().map(async function(e){const o=d.edge(e.v,e.w,e.name);if(s.log.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),s.log.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(d.edge(e))),s.log.info("Fix",t.clusterDb,"ids:",e.v,e.w,"Translating: ",t.clusterDb.get(e.v),t.clusterDb.get(e.w)),_&&o.selfLoop){if(1!==o.selfLoop.order)return;const e=o.id;return o.id=o.selfLoop.id,await(0,n.insertEdgeLabel)(N,o),void(o.id=e)}await(0,n.insertEdgeLabel)(N,o)});await Promise.all(e)},"processEdges");await C(),s.log.info("Graph before layout:",JSON.stringify(f.write(d))),s.log.info("############################################# XXX"),s.log.info("### Layout ### XXX"),s.log.info("############################################# XXX"),(0,c.layout)(d),s.log.info("Graph after layout:",JSON.stringify(f.write(d)));let O=0,{subGraphTitleTotalMargin:M}=(0,a.getSubGraphTitleMargins)(w);await Promise.all((0,t.sortNodesByHierarchy)(d).map(async function(e){const n=d.node(e);if(s.log.info("Position XBX => "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=M,s.log.info("A tainted cluster node XBX1",e,n.id,n.width,n.height,n.x,n.y,d.parent(e)),t.clusterDb.get(n.id).node=n,(0,o.positionNode)(n);else if(d.children(e).length>0){s.log.info("A pure cluster node XBX1",e,n.id,n.x,n.y,n.width,n.height,d.parent(e)),n.height+=M,d.node(n.parentId);const a=n?.padding/2||0,l=n?.labelBBox?.height||0,c=l-a||0;s.log.debug("OffsetY",c,"labelHeight",l,"halfPadding",a),await(0,o.insertCluster)(X,n),t.clusterDb.get(n.id).node=n}else{const e=d.node(n.parentId);n.y+=M/2,s.log.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",e,e?.offsetY,n),(0,o.positionNode)(n)}}));const P=M/2;return E(d,P,{mergeSelfLoops:_}).forEach(function({edge:e,start:o,end:a}){s.log.info("Edge "+o+" -> "+a+": "+JSON.stringify(e),e),e.points.forEach(e=>e.y+=P);const l=d.node(o),c=d.node(a),f=(0,n.insertEdge)(S,e,t.clusterDb,h,l,c,u);(0,n.positionEdgeLabel)(e,f)}),d.nodes().forEach(function(e){const t=d.node(e);s.log.info(e,t.type,t.diff),t.isGroup&&(O=t.diff)}),s.log.warn("Returning from recursive render XAX",x,O),{elem:x,diff:O}},"recursiveRender"),X=(0,l.__name)(async(e,a)=>{const l=new h.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),c=a.select("g");(0,n.markers_default)(c,e.markers,e.type,e.diagramId),(0,o.clear2)(),(0,n.clear)(),(0,o.clear)(),(0,t.clear)(),e.nodes.forEach(e=>{l.setNode(e.id,Object.assign({},e)),e.parentId&&l.setParent(e.id,e.parentId)}),s.log.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){const t=e.start,n=t+"---"+t+"---1",o=t+"---"+t+"---2",a=l.node(t);l.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(n,a.parentId),l.setNode(o,{domId:o,id:o,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(o,a.parentId);const d=structuredClone(e),s=structuredClone(e),c=structuredClone(e),f=structuredClone(e);s.originalEdge=d,s.selfLoop={id:d.id,order:0},c.originalEdge=d,c.selfLoop={id:d.id,order:1},f.originalEdge=d,f.selfLoop={id:d.id,order:2},s.label="",s.arrowTypeEnd="none",s.endLabelLeft="",s.endLabelRight="",s.startLabelLeft="",s.id=t+"-cyclic-special-1",c.startLabelRight="",c.startLabelLeft="",c.endLabelLeft="",c.endLabelRight="",c.arrowTypeStart="none",c.arrowTypeEnd="none",c.id=t+"-cyclic-special-mid",f.label="",f.startLabelRight="",f.startLabelLeft="",f.arrowTypeStart="none",a.isGroup&&(s.fromCluster=t,f.toCluster=t),f.id=t+"-cyclic-special-2",f.arrowTypeStart="none",l.setEdge(t,n,s,t+"-cyclic-special-0"),l.setEdge(n,o,c,t+"-cyclic-special-1"),l.setEdge(o,t,f,t+"-cyclic-special-2")}else l.setEdge(e.start,e.end,Object.assign({},e),e.id)}),s.log.warn("Graph at first:",JSON.stringify(f.write(l))),(0,t.adjustClustersAndEdges)(l),s.log.warn("Graph after XAX:",JSON.stringify(f.write(l)));const u=(0,d.getConfig2)();await L(c,l,e.type,e.diagramId,void 0,u)},"render")},
|
|
1
|
+
__d(function(g,r,i,_a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"getEdgesToRender",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"render",{enumerable:!0,get:function(){return X}});var t=r(_d[0]),n=r(_d[1]),o=r(_d[2]);r(_d[3]),r(_d[4]);var a=r(_d[5]);r(_d[6]),r(_d[7]),r(_d[8]);var d=r(_d[9]),s=r(_d[10]),l=r(_d[11]),c=r(_d[12]),f=e(r(_d[13])),h=e(r(_d[14])),u=(0,l.__name)((e,t,n)=>Math.max(t,Math.min(n,e)),"clamp"),p=(0,l.__name)((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),y=(0,l.__name)(e=>"flowchart"===e||"flowchart-v2"===e||"stateDiagram"===e,"shouldMergeSelfLoopSegments"),w=(0,l.__name)((e,t,n,o,a)=>{const d=[],s=new Set;if(n.forEach(({start:e,end:t})=>{e!==o&&s.add(e),t!==o&&s.add(t)}),s.forEach(t=>{const n=e.node(t);"number"==typeof n?.x&&"number"==typeof n?.y&&d.push(n)}),0===d.length&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{"number"==typeof e?.x&&"number"==typeof e?.y&&d.push(e)})}),0===d.length)return p(a);const l=d.reduce((e,t)=>({x:e.x+t.x/d.length,y:e.y+t.y/d.length}),{x:0,y:0}),c=l.x-t.x,f=l.y-t.y;return Math.abs(c)>Math.abs(f)?c>0?"right":"left":Math.abs(f)>0?f>0?"bottom":"top":p(a)},"getSelfLoopSide"),b=(0,l.__name)((e,t="top",n=0,o=0)=>{const a=e.x,d=e.y-n,s=e.width/2,l=e.height/2,c=Math.max(36,Math.min(100,.8*e.width)),f=u(Math.max(o,.35*e.width),36,c),h=u(.45*Math.min(e.width,e.height),24,48);switch(t){case"bottom":{const e=d+l;return[{x:a-f/2,y:e},{x:a-f/2,y:e+h},{x:a+f/2,y:e+h},{x:a+f/2,y:e}]}case"right":{const e=a+s;return[{x:e,y:d-f/2},{x:e+h,y:d-f/2},{x:e+h,y:d+f/2},{x:e,y:d+f/2}]}case"left":{const e=a-s;return[{x:e,y:d-f/2},{x:e-h,y:d-f/2},{x:e-h,y:d+f/2},{x:e,y:d+f/2}]}default:{const e=d-l;return[{x:a-f/2,y:e},{x:a-f/2,y:e-h},{x:a+f/2,y:e-h},{x:a+f/2,y:e}]}}},"getSelfLoopPoints"),x=(0,l.__name)((e,t,n="top",o=0,a={})=>{const d=e.x,s=e.y-o,l=a.width??0,c=a.height??0;switch(n){case"bottom":return{x:d,y:Math.max(...t.map(e=>e.y))+c/2+4};case"right":return{x:Math.max(...t.map(e=>e.x))+l/2+4,y:s};case"left":return{x:Math.min(...t.map(e=>e.x))-l/2-4,y:s};default:return{x:d,y:Math.min(...t.map(e=>e.y))-c/2-4}}},"getSelfLoopLabelPosition"),E=(0,l.__name)((e,t=0,{mergeSelfLoops:n=!0}={})=>{const o=new Map,a=[],d=e.graph()?.rankdir;return e.edges().forEach(t=>{const d=e.edge(t);if(n&&d.selfLoop){const e=d.selfLoop.id;o.has(e)||o.set(e,[]),o.get(e).push({edge:d,start:t.v,end:t.w})}else a.push({edge:d,start:t.v,end:t.w})}),o.forEach(n=>{if(3!==n.length)return void n.forEach(e=>a.push(e));n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);const[o,s,l]=n,c=o.edge.originalEdge??s.edge.originalEdge??l.edge.originalEdge??s.edge,f=e.node(c.start);if(!f)return void n.forEach(e=>a.push(e));const h={width:s.edge.width,height:s.edge.height},u=w(e,f,n,c.start,d),p=b(f,u,t,h.width??0),y=x(f,p,u,t,h),E=Object.assign({},s.edge,c,{id:c.id,points:p,start:c.start,end:c.end,x:y.x,y:y.y,width:h.width,height:h.height,labelStyle:s.edge.labelStyle,fromCluster:o.edge.fromCluster??s.edge.fromCluster??l.edge.fromCluster,toCluster:o.edge.toCluster??s.edge.toCluster??l.edge.toCluster});delete E.selfLoop,delete E.originalEdge,a.push({edge:E,start:E.start,end:E.end})}),a},"getEdgesToRender"),L=(0,l.__name)(async(e,d,h,u,p,w)=>{s.log.warn("Graph in recursive render:XAX",f.write(d),p);const b=d.graph().rankdir;s.log.trace("Dir in recursive render - dir:",b);const x=e.insert("g").attr("class","root");d.nodes()?s.log.info("Recursive render XXX",d.nodes()):s.log.info("No nodes found for",d),d.edges().length>0&&s.log.info("Recursive edges",d.edge(d.edges()[0]));const X=x.insert("g").attr("class","clusters"),S=x.insert("g").attr("class","edgePaths"),N=x.insert("g").attr("class","edgeLabels"),v=x.insert("g").attr("class","nodes"),_=y(h);await Promise.all(d.nodes().map(async function(e){const n=d.node(e);if(void 0!==p){const t=JSON.parse(JSON.stringify(p.clusterData));s.log.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",p.height),d.setNode(p.id,t),d.parent(e)||(s.log.trace("Setting parent",e,p.id),d.setParent(e,p.id,t))}if(s.log.info("(Insert) Node XXX"+e+": "+JSON.stringify(d.node(e))),n?.clusterNode){s.log.info("Cluster identified XBX",e,n.width,d.node(e));const{ranksep:t,nodesep:a}=d.graph();n.graph.setGraph(Object.assign({},n.graph.graph(),{ranksep:t+25,nodesep:a}));const l=await L(v,n.graph,h,u,d.node(e),w),c=l.elem;(0,o.updateNodeBounds)(n,c),n.diff=l.diff||0,s.log.info("New compound node after recursive render XAX",e,"width",n.width,"height",n.height),(0,o.setNodeElem)(c,n)}else d.children(e).length>0?(s.log.trace("Cluster - the non recursive path XBX",e,n.id,n,n.width,"Graph:",d),s.log.trace((0,t.findNonClusterChild)(n.id,d)),t.clusterDb.set(n.id,{id:(0,t.findNonClusterChild)(n.id,d),node:n})):(s.log.trace("Node - the non recursive path XAX",e,v,d.node(e),b),await(0,o.insertNode)(v,d.node(e),{config:w,dir:b}))}));const C=(0,l.__name)(async()=>{const e=d.edges().map(async function(e){const o=d.edge(e.v,e.w,e.name);if(s.log.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),s.log.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(d.edge(e))),s.log.info("Fix",t.clusterDb,"ids:",e.v,e.w,"Translating: ",t.clusterDb.get(e.v),t.clusterDb.get(e.w)),_&&o.selfLoop){if(1!==o.selfLoop.order)return;const e=o.id;return o.id=o.selfLoop.id,await(0,n.insertEdgeLabel)(N,o),void(o.id=e)}await(0,n.insertEdgeLabel)(N,o)});await Promise.all(e)},"processEdges");await C(),s.log.info("Graph before layout:",JSON.stringify(f.write(d))),s.log.info("############################################# XXX"),s.log.info("### Layout ### XXX"),s.log.info("############################################# XXX"),(0,c.layout)(d),s.log.info("Graph after layout:",JSON.stringify(f.write(d)));let O=0,{subGraphTitleTotalMargin:M}=(0,a.getSubGraphTitleMargins)(w);await Promise.all((0,t.sortNodesByHierarchy)(d).map(async function(e){const n=d.node(e);if(s.log.info("Position XBX => "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=M,s.log.info("A tainted cluster node XBX1",e,n.id,n.width,n.height,n.x,n.y,d.parent(e)),t.clusterDb.get(n.id).node=n,(0,o.positionNode)(n);else if(d.children(e).length>0){s.log.info("A pure cluster node XBX1",e,n.id,n.x,n.y,n.width,n.height,d.parent(e)),n.height+=M,d.node(n.parentId);const a=n?.padding/2||0,l=n?.labelBBox?.height||0,c=l-a||0;s.log.debug("OffsetY",c,"labelHeight",l,"halfPadding",a),await(0,o.insertCluster)(X,n),t.clusterDb.get(n.id).node=n}else{const e=d.node(n.parentId);n.y+=M/2,s.log.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",e,e?.offsetY,n),(0,o.positionNode)(n)}}));const P=M/2;return E(d,P,{mergeSelfLoops:_}).forEach(function({edge:e,start:o,end:a}){s.log.info("Edge "+o+" -> "+a+": "+JSON.stringify(e),e),e.points.forEach(e=>e.y+=P);const l=d.node(o),c=d.node(a),f=(0,n.insertEdge)(S,e,t.clusterDb,h,l,c,u);(0,n.positionEdgeLabel)(e,f)}),d.nodes().forEach(function(e){const t=d.node(e);s.log.info(e,t.type,t.diff),t.isGroup&&(O=t.diff)}),s.log.warn("Returning from recursive render XAX",x,O),{elem:x,diff:O}},"recursiveRender"),X=(0,l.__name)(async(e,a)=>{const l=new h.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),c=a.select("g");(0,n.markers_default)(c,e.markers,e.type,e.diagramId),(0,o.clear2)(),(0,n.clear)(),(0,o.clear)(),(0,t.clear)(),e.nodes.forEach(e=>{l.setNode(e.id,Object.assign({},e)),e.parentId&&l.setParent(e.id,e.parentId)}),s.log.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){const t=e.start,n=t+"---"+t+"---1",o=t+"---"+t+"---2",a=l.node(t);l.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(n,a.parentId),l.setNode(o,{domId:o,id:o,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(o,a.parentId);const d=structuredClone(e),s=structuredClone(e),c=structuredClone(e),f=structuredClone(e);s.originalEdge=d,s.selfLoop={id:d.id,order:0},c.originalEdge=d,c.selfLoop={id:d.id,order:1},f.originalEdge=d,f.selfLoop={id:d.id,order:2},s.label="",s.arrowTypeEnd="none",s.endLabelLeft="",s.endLabelRight="",s.startLabelLeft="",s.id=t+"-cyclic-special-1",c.startLabelRight="",c.startLabelLeft="",c.endLabelLeft="",c.endLabelRight="",c.arrowTypeStart="none",c.arrowTypeEnd="none",c.id=t+"-cyclic-special-mid",f.label="",f.startLabelRight="",f.startLabelLeft="",f.arrowTypeStart="none",a.isGroup&&(s.fromCluster=t,f.toCluster=t),f.id=t+"-cyclic-special-2",f.arrowTypeStart="none",l.setEdge(t,n,s,t+"-cyclic-special-0"),l.setEdge(n,o,c,t+"-cyclic-special-1"),l.setEdge(o,t,f,t+"-cyclic-special-2")}else l.setEdge(e.start,e.end,Object.assign({},e),e.id)}),s.log.warn("Graph at first:",JSON.stringify(f.write(l))),(0,t.adjustClustersAndEdges)(l),s.log.warn("Graph after XAX:",JSON.stringify(f.write(l)));const u=(0,d.getConfig2)();await L(c,l,e.type,e.diagramId,void 0,u)},"render")},5168,[4447,3271,3272,3273,3274,3275,3276,3277,3278,3279,3280,3281,5091,5090,4448]);
|
package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js.br
ADDED
|
Binary file
|
package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js.gz
ADDED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createDesktopAttachmentBridge=function(){const l=(0,s.createDesktopPreviewUrlResolver)({reader:(0,s.createDesktopFileReader)(),objectUrls:(0,s.createBrowserObjectUrlMinter)()});return{copyFile:t.copyDesktopAttachmentFile,writeBase64:t.writeDesktopAttachmentBase64,writeBytes:t.writeDesktopAttachmentBytes,deleteFile:t.deleteDesktopAttachmentFile,garbageCollect:t.garbageCollectDesktopAttachmentFiles,usage:t.readDesktopAttachmentUsage,clearPreviews:t.clearDesktopPreviewAttachments,readFileBase64:s.readDesktopFileBase64,resolvePreviewUrl:t=>l.resolve(t),releasePreviewUrl:t=>l.release(t)}};var t=r(d[0]),s=r(d[1])},
|
|
1
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createDesktopAttachmentBridge=function(){const l=(0,s.createDesktopPreviewUrlResolver)({reader:(0,s.createDesktopFileReader)(),objectUrls:(0,s.createBrowserObjectUrlMinter)()});return{copyFile:t.copyDesktopAttachmentFile,writeBase64:t.writeDesktopAttachmentBase64,writeBytes:t.writeDesktopAttachmentBytes,deleteFile:t.deleteDesktopAttachmentFile,garbageCollect:t.garbageCollectDesktopAttachmentFiles,usage:t.readDesktopAttachmentUsage,clearPreviews:t.clearDesktopPreviewAttachments,readFileBase64:s.readDesktopFileBase64,resolvePreviewUrl:t=>l.resolve(t),releasePreviewUrl:t=>l.release(t)}};var t=r(d[0]),s=r(d[1])},3254,[2496,2497]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createDesktopAttachmentStore=function(n){return{storageType:"desktop-file",async save(s){const o=s.id??(0,t.generateAttachmentId)(),l=s.fileName??null;if("file_uri"===s.source.kind)return await c(n,{id:o,uri:s.source.uri,mimeType:s.mimeType,fileName:l});if("data_url"===s.source.kind){const c=(0,t.parseDataUrl)(s.source.dataUrl),p=(0,t.normalizeMimeType)(s.mimeType??c.mimeType);return await y(n,{id:o,base64:c.base64,mimeType:p,fileName:l})}if("bytes"===s.source.kind){const c=(0,t.normalizeMimeType)(s.mimeType);return await p(n,{id:o,bytes:s.source.bytes,mimeType:c,fileName:l})}const f=(0,t.normalizeMimeType)(s.mimeType??s.source.blob.type),u=await(0,t.blobToBase64)(s.source.blob);return await y(n,{id:o,base64:u,mimeType:f,fileName:l})},encodeBase64:async({attachment:t})=>(f(t),await n.readFileBase64(t.storageKey)),resolvePreviewUrl:async({attachment:t})=>(f(t),await n.resolvePreviewUrl(t)),async releasePreviewUrl({attachment:t,url:s}){f(t),await n.releasePreviewUrl({url:s})},async delete({attachment:t}){f(t),await n.deleteFile({path:t.storageKey})},async garbageCollect({referencedIds:t}){await n.garbageCollect({referencedIds:Array.from(t)})},usage:async()=>await n.usage(),clearPreviews:async()=>await n.clearPreviews()}};var t=r(d[0]);const n={"image/png":".png","image/jpeg":".jpg","image/jpg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/heic":".heic","image/heif":".heif","image/tiff":".tiff","image/bmp":".bmp","image/svg+xml":".svg"};function s(t){const n=t.replace(/\\/g,"/").split("/"),s=n[n.length-1];return s&&s.length>0?s:null}function o(s){const o=(0,t.getFileExtensionFromName)(s.fileName);if(o)return o;const l=(0,t.getFileExtensionFromName)(s.sourcePath);return l||(n[s.mimeType]??".img")}function l(t){return{id:t.id,mimeType:t.mimeType,storageType:"desktop-file",storageKey:t.storagePath,fileName:t.fileName??null,byteSize:t.byteSize,createdAt:Date.now()}}async function c(n,c){const y=(0,t.fileUriToPath)(c.uri),p=c.fileName??s(y),f=(0,t.normalizeMimeType)(c.mimeType),u=o({fileName:p,sourcePath:y,mimeType:f}),T=await n.copyFile({attachmentId:c.id,sourcePath:y,extension:u});return l({id:c.id,mimeType:f,storagePath:T.path,byteSize:T.byteSize,fileName:p})}async function y(t,n){const s=o({fileName:n.fileName,mimeType:n.mimeType}),c=await t.writeBase64({attachmentId:n.id,base64:n.base64,extension:s});return l({id:n.id,mimeType:n.mimeType,storagePath:c.path,byteSize:c.byteSize,fileName:n.fileName})}async function p(t,n){const s=o({fileName:n.fileName,mimeType:n.mimeType}),c=await t.writeBytes({attachmentId:n.id,bytes:n.bytes,extension:s});return l({id:n.id,mimeType:n.mimeType,storagePath:c.path,byteSize:c.byteSize,fileName:n.fileName})}function f(t){if("desktop-file"!==t.storageType)throw new Error(`Unsupported desktop attachment storage type '${t.storageType}'.`)}},
|
|
1
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createDesktopAttachmentStore=function(n){return{storageType:"desktop-file",async save(s){const o=s.id??(0,t.generateAttachmentId)(),l=s.fileName??null;if("file_uri"===s.source.kind)return await c(n,{id:o,uri:s.source.uri,mimeType:s.mimeType,fileName:l});if("data_url"===s.source.kind){const c=(0,t.parseDataUrl)(s.source.dataUrl),p=(0,t.normalizeMimeType)(s.mimeType??c.mimeType);return await y(n,{id:o,base64:c.base64,mimeType:p,fileName:l})}if("bytes"===s.source.kind){const c=(0,t.normalizeMimeType)(s.mimeType);return await p(n,{id:o,bytes:s.source.bytes,mimeType:c,fileName:l})}const f=(0,t.normalizeMimeType)(s.mimeType??s.source.blob.type),u=await(0,t.blobToBase64)(s.source.blob);return await y(n,{id:o,base64:u,mimeType:f,fileName:l})},encodeBase64:async({attachment:t})=>(f(t),await n.readFileBase64(t.storageKey)),resolvePreviewUrl:async({attachment:t})=>(f(t),await n.resolvePreviewUrl(t)),async releasePreviewUrl({attachment:t,url:s}){f(t),await n.releasePreviewUrl({url:s})},async delete({attachment:t}){f(t),await n.deleteFile({path:t.storageKey})},async garbageCollect({referencedIds:t}){await n.garbageCollect({referencedIds:Array.from(t)})},usage:async()=>await n.usage(),clearPreviews:async()=>await n.clearPreviews()}};var t=r(d[0]);const n={"image/png":".png","image/jpeg":".jpg","image/jpg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/heic":".heic","image/heif":".heif","image/tiff":".tiff","image/bmp":".bmp","image/svg+xml":".svg"};function s(t){const n=t.replace(/\\/g,"/").split("/"),s=n[n.length-1];return s&&s.length>0?s:null}function o(s){const o=(0,t.getFileExtensionFromName)(s.fileName);if(o)return o;const l=(0,t.getFileExtensionFromName)(s.sourcePath);return l||(n[s.mimeType]??".img")}function l(t){return{id:t.id,mimeType:t.mimeType,storageType:"desktop-file",storageKey:t.storagePath,fileName:t.fileName??null,byteSize:t.byteSize,createdAt:Date.now()}}async function c(n,c){const y=(0,t.fileUriToPath)(c.uri),p=c.fileName??s(y),f=(0,t.normalizeMimeType)(c.mimeType),u=o({fileName:p,sourcePath:y,mimeType:f}),T=await n.copyFile({attachmentId:c.id,sourcePath:y,extension:u});return l({id:c.id,mimeType:f,storagePath:T.path,byteSize:T.byteSize,fileName:p})}async function y(t,n){const s=o({fileName:n.fileName,mimeType:n.mimeType}),c=await t.writeBase64({attachmentId:n.id,base64:n.base64,extension:s});return l({id:n.id,mimeType:n.mimeType,storagePath:c.path,byteSize:c.byteSize,fileName:n.fileName})}async function p(t,n){const s=o({fileName:n.fileName,mimeType:n.mimeType}),c=await t.writeBytes({attachmentId:n.id,bytes:n.bytes,extension:s});return l({id:n.id,mimeType:n.mimeType,storagePath:c.path,byteSize:c.byteSize,fileName:n.fileName})}function f(t){if("desktop-file"!==t.storageType)throw new Error(`Unsupported desktop attachment storage type '${t.storageType}'.`)}},3253,[2345]);
|