@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.
Files changed (333) hide show
  1. package/dist/server/server/agent/providers/claude/agent.js +48 -3
  2. package/dist/server/server/agent/providers/mock-load-test-agent.d.ts +10 -1
  3. package/dist/server/server/agent/providers/mock-load-test-agent.js +151 -5
  4. package/dist/server/server/agent/synthetic-conversation.d.ts +18 -0
  5. package/dist/server/server/agent/synthetic-conversation.js +567 -0
  6. package/dist/server/server/dotnet-process-registry.d.ts +111 -0
  7. package/dist/server/server/dotnet-process-registry.js +160 -0
  8. package/dist/server/server/lsp/connection.d.ts +4 -0
  9. package/dist/server/server/lsp/connection.js +39 -4
  10. package/dist/server/server/lsp/pool.js +1 -0
  11. package/dist/server/server/lsp/registry.d.ts +14 -1
  12. package/dist/server/server/lsp/registry.js +14 -2
  13. package/dist/server/server/lsp/service.d.ts +18 -2
  14. package/dist/server/server/lsp/service.js +14 -2
  15. package/dist/server/server/process-tree.d.ts +29 -0
  16. package/dist/server/server/process-tree.js +59 -0
  17. package/dist/server/server/session/files/workspace-files-session.js +11 -5
  18. package/dist/server/server/session.d.ts +11 -0
  19. package/dist/server/server/session.js +23 -0
  20. package/dist/server/server/solution-model/dotnet/probe.d.ts +2 -0
  21. package/dist/server/server/solution-model/dotnet/probe.js +33 -14
  22. package/dist/server/server/websocket-server.js +10 -0
  23. package/dist/server/server/workspace-git-service.d.ts +36 -0
  24. package/dist/server/server/workspace-git-service.js +110 -6
  25. package/dist/server/terminal/shell-integration/zsh/.zshenv +17 -17
  26. package/dist/server/terminal/shell-integration/zsh/otto-integration.zsh +32 -32
  27. package/dist/server/terminal/terminal.js +12 -2
  28. package/dist/server/web-ui/_expo/static/js/web/{__common-6d2299ed037bec2393245a7c0bf1c643.js → __common-8ab6f044d26f0be8899aaf3a990c8b65.js} +1855 -1855
  29. package/dist/server/web-ui/_expo/static/js/web/__common-8ab6f044d26f0be8899aaf3a990c8b65.js.br +0 -0
  30. package/dist/server/web-ui/_expo/static/js/web/__common-8ab6f044d26f0be8899aaf3a990c8b65.js.gz +0 -0
  31. package/dist/server/web-ui/_expo/static/js/web/{abnfDiagram-VRR7QNED-c3c2ca327b2d7ad9af3caa1cba884908.js → abnfDiagram-VRR7QNED-e33c74fb52c02570f5105b2e70194df6.js} +1 -1
  32. package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-e33c74fb52c02570f5105b2e70194df6.js.br +0 -0
  33. package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-e33c74fb52c02570f5105b2e70194df6.js.gz +0 -0
  34. package/dist/server/web-ui/_expo/static/js/web/{architecture-TIHT7OUA-0cf23d3dc9775f216c01daae4aae250a.js → architecture-TIHT7OUA-cc3220b1ecee09a0e5c0b99fbf886b82.js} +1 -1
  35. package/dist/server/web-ui/_expo/static/js/web/{architecture-TIHT7OUA-0cf23d3dc9775f216c01daae4aae250a.js.br → architecture-TIHT7OUA-cc3220b1ecee09a0e5c0b99fbf886b82.js.br} +0 -0
  36. package/dist/server/web-ui/_expo/static/js/web/architecture-TIHT7OUA-cc3220b1ecee09a0e5c0b99fbf886b82.js.gz +0 -0
  37. package/dist/server/web-ui/_expo/static/js/web/{architectureDiagram-ZJ3FMSHR-f3bce96124559dc19faa4d90aca4afd4.js → architectureDiagram-ZJ3FMSHR-551f5e17dd33a890195b5d060cd75ad2.js} +4 -4
  38. package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-551f5e17dd33a890195b5d060cd75ad2.js.br +0 -0
  39. package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-551f5e17dd33a890195b5d060cd75ad2.js.gz +0 -0
  40. package/dist/server/web-ui/_expo/static/js/web/{blockDiagram-677ZJIJ3-839486928c0f151128a5e2836aa07080.js → blockDiagram-677ZJIJ3-901d7bbed0b0f6ae3439f6bff861b42f.js} +1 -1
  41. package/dist/server/web-ui/_expo/static/js/web/blockDiagram-677ZJIJ3-901d7bbed0b0f6ae3439f6bff861b42f.js.br +0 -0
  42. package/dist/server/web-ui/_expo/static/js/web/{blockDiagram-677ZJIJ3-839486928c0f151128a5e2836aa07080.js.gz → blockDiagram-677ZJIJ3-901d7bbed0b0f6ae3439f6bff861b42f.js.gz} +0 -0
  43. package/dist/server/web-ui/_expo/static/js/web/{c4Diagram-LMCZKHZV-197212c21520a6b659a5649e683619d0.js → c4Diagram-LMCZKHZV-781ca106d0a19454ec9e559bcba3706c.js} +1 -1
  44. package/dist/server/web-ui/_expo/static/js/web/c4Diagram-LMCZKHZV-781ca106d0a19454ec9e559bcba3706c.js.br +0 -0
  45. package/dist/server/web-ui/_expo/static/js/web/{c4Diagram-LMCZKHZV-197212c21520a6b659a5649e683619d0.js.gz → c4Diagram-LMCZKHZV-781ca106d0a19454ec9e559bcba3706c.js.gz} +0 -0
  46. package/dist/server/web-ui/_expo/static/js/web/{classDiagram-OUVF2IWQ-a0a0fbefc96d14b6619c84fc4f92a39a.js → classDiagram-OUVF2IWQ-1d00e0cc9165446f1bac84fed1e9bbed.js} +1 -1
  47. package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-1d00e0cc9165446f1bac84fed1e9bbed.js.br +0 -0
  48. package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-1d00e0cc9165446f1bac84fed1e9bbed.js.gz +0 -0
  49. package/dist/server/web-ui/_expo/static/js/web/{classDiagram-v2-EOCWNBFH-e979239c6d160123d5b4847253a8a70e.js → classDiagram-v2-EOCWNBFH-52b658fff2b9f58ece5d8528cb381359.js} +1 -1
  50. package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-52b658fff2b9f58ece5d8528cb381359.js.br +0 -0
  51. package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-52b658fff2b9f58ece5d8528cb381359.js.gz +0 -0
  52. package/dist/server/web-ui/_expo/static/js/web/{cose-bilkent-JH36ORCC-bbc39a6bb062ba85e433f91becc37a65.js → cose-bilkent-JH36ORCC-9256f0de343b59ecc5775210909c4f8b.js} +4 -4
  53. package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-9256f0de343b59ecc5775210909c4f8b.js.br +0 -0
  54. package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-9256f0de343b59ecc5775210909c4f8b.js.gz +0 -0
  55. package/dist/server/web-ui/_expo/static/js/web/{cynefin-VYW2F7L2-ea0e514652627740f5a2ed32b027a164.js → cynefin-VYW2F7L2-feb2750e4e4322ac8e6c6049fcfd73cb.js} +1 -1
  56. package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-feb2750e4e4322ac8e6c6049fcfd73cb.js.br +0 -0
  57. package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-feb2750e4e4322ac8e6c6049fcfd73cb.js.gz +0 -0
  58. package/dist/server/web-ui/_expo/static/js/web/{cynefinDiagram-TSTJHNR4-0446f9b57ba778e5883d93e24692ffce.js → cynefinDiagram-TSTJHNR4-b98dc254a5fa6581f997a0809a9e0fc0.js} +1 -1
  59. package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-b98dc254a5fa6581f997a0809a9e0fc0.js.br +0 -0
  60. package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-b98dc254a5fa6581f997a0809a9e0fc0.js.gz +0 -0
  61. package/dist/server/web-ui/_expo/static/js/web/{dagre-VKFMJZFB-69f7aa52521b06a95874b1ac67508def.js → dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js} +1 -1
  62. package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js.br +0 -0
  63. package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-ef67573fa401136e68fc41adf07ef447.js.gz +0 -0
  64. package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-bridge-0ae8aadd6e53625f59d62eceb1f06ede.js → desktop-attachment-bridge-d6e4f29a78dc1bb5b70d4ef2c440c6c0.js} +1 -1
  65. package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-bridge-0ae8aadd6e53625f59d62eceb1f06ede.js.br → desktop-attachment-bridge-d6e4f29a78dc1bb5b70d4ef2c440c6c0.js.br} +0 -0
  66. package/dist/server/web-ui/_expo/static/js/web/desktop-attachment-bridge-d6e4f29a78dc1bb5b70d4ef2c440c6c0.js.gz +0 -0
  67. package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-store-ecd775c6aee79778f49274a5bffadc5a.js → desktop-attachment-store-e2e403c64de4bc638e1800c9b226ede3.js} +1 -1
  68. package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-store-ecd775c6aee79778f49274a5bffadc5a.js.br → desktop-attachment-store-e2e403c64de4bc638e1800c9b226ede3.js.br} +0 -0
  69. package/dist/server/web-ui/_expo/static/js/web/{desktop-attachment-store-ecd775c6aee79778f49274a5bffadc5a.js.gz → desktop-attachment-store-e2e403c64de4bc638e1800c9b226ede3.js.gz} +0 -0
  70. package/dist/server/web-ui/_expo/static/js/web/{diagram-FQU43EPY-bd0940835ccad031627e285aaba6d5ec.js → diagram-FQU43EPY-c6317fa4c07b63f54be30797f25060c7.js} +1 -1
  71. package/dist/server/web-ui/_expo/static/js/web/diagram-FQU43EPY-c6317fa4c07b63f54be30797f25060c7.js.br +0 -0
  72. package/dist/server/web-ui/_expo/static/js/web/{diagram-FQU43EPY-bd0940835ccad031627e285aaba6d5ec.js.gz → diagram-FQU43EPY-c6317fa4c07b63f54be30797f25060c7.js.gz} +0 -0
  73. package/dist/server/web-ui/_expo/static/js/web/{diagram-G47NLZAW-217e2cd3275924bc08fc6ebe79e95e48.js → diagram-G47NLZAW-70713a059ca65ca1241036cc96679bc5.js} +1 -1
  74. package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-70713a059ca65ca1241036cc96679bc5.js.br +0 -0
  75. package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-70713a059ca65ca1241036cc96679bc5.js.gz +0 -0
  76. package/dist/server/web-ui/_expo/static/js/web/{diagram-NH7WQ7WH-fbd3aa35ca68df15ee378fb63241b333.js → diagram-NH7WQ7WH-1bebddae0fd6a49ff82d7ea2b738823d.js} +1 -1
  77. package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-1bebddae0fd6a49ff82d7ea2b738823d.js.br +0 -0
  78. package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-1bebddae0fd6a49ff82d7ea2b738823d.js.gz +0 -0
  79. package/dist/server/web-ui/_expo/static/js/web/{diagram-OA4YK3LP-48ebb0ba6bcb34417649bd55070542ad.js → diagram-OA4YK3LP-bf33c3e1800c9f503dd88e41e97c5974.js} +1 -1
  80. package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-bf33c3e1800c9f503dd88e41e97c5974.js.br +0 -0
  81. package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-bf33c3e1800c9f503dd88e41e97c5974.js.gz +0 -0
  82. package/dist/server/web-ui/_expo/static/js/web/{diagram-WEI45ONY-2be85db5396495fa970419f77587cf14.js → diagram-WEI45ONY-23d90af03030beb514d3a953920e6c9b.js} +1 -1
  83. package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-23d90af03030beb514d3a953920e6c9b.js.br +0 -0
  84. package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-23d90af03030beb514d3a953920e6c9b.js.gz +0 -0
  85. package/dist/server/web-ui/_expo/static/js/web/{ebnfDiagram-CCIWWBDH-3c5c44cf8340b641d13076adab77967b.js → ebnfDiagram-CCIWWBDH-5119b538047d9c00ae05855ae1cf490f.js} +1 -1
  86. package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-5119b538047d9c00ae05855ae1cf490f.js.br +0 -0
  87. package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-5119b538047d9c00ae05855ae1cf490f.js.gz +0 -0
  88. package/dist/server/web-ui/_expo/static/js/web/{erDiagram-Q63AITRT-81762a72bd33bf1042e4cad4f688abf2.js → erDiagram-Q63AITRT-6f7e9f420388e6291e5a8ae6da7ab3ad.js} +1 -1
  89. package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-6f7e9f420388e6291e5a8ae6da7ab3ad.js.br +0 -0
  90. package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-6f7e9f420388e6291e5a8ae6da7ab3ad.js.gz +0 -0
  91. package/dist/server/web-ui/_expo/static/js/web/{eventmodeling-45OFAUF4-11d7615d746c5304c28d4931ec9ca5f7.js → eventmodeling-45OFAUF4-510d785624b4496077e120d2c12a6b88.js} +1 -1
  92. package/dist/server/web-ui/_expo/static/js/web/{eventmodeling-45OFAUF4-11d7615d746c5304c28d4931ec9ca5f7.js.br → eventmodeling-45OFAUF4-510d785624b4496077e120d2c12a6b88.js.br} +0 -0
  93. package/dist/server/web-ui/_expo/static/js/web/eventmodeling-45OFAUF4-510d785624b4496077e120d2c12a6b88.js.gz +0 -0
  94. package/dist/server/web-ui/_expo/static/js/web/{flowDiagram-23GEKE2U-5a2af608a9500bb36da0595c3464a562.js → flowDiagram-23GEKE2U-7bf4721b6de004ef55a0787bbbc6b9ac.js} +1 -1
  95. package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-7bf4721b6de004ef55a0787bbbc6b9ac.js.br +0 -0
  96. package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-7bf4721b6de004ef55a0787bbbc6b9ac.js.gz +0 -0
  97. package/dist/server/web-ui/_expo/static/js/web/{ganttDiagram-NO4QXBWP-379aae0f5fb2652d90827c7f8b2472d2.js → ganttDiagram-NO4QXBWP-53b4651e7e78eb3212ec05a0d72b8932.js} +5 -5
  98. package/dist/server/web-ui/_expo/static/js/web/ganttDiagram-NO4QXBWP-53b4651e7e78eb3212ec05a0d72b8932.js.br +0 -0
  99. package/dist/server/web-ui/_expo/static/js/web/{ganttDiagram-NO4QXBWP-379aae0f5fb2652d90827c7f8b2472d2.js.gz → ganttDiagram-NO4QXBWP-53b4651e7e78eb3212ec05a0d72b8932.js.gz} +0 -0
  100. package/dist/server/web-ui/_expo/static/js/web/{gitGraph-TEB2WS4Q-d978b8a2d1fd8fcc132b16ef8d57dd7c.js → gitGraph-TEB2WS4Q-03038b65af81bb0d4755a35c737decf0.js} +1 -1
  101. package/dist/server/web-ui/_expo/static/js/web/{gitGraph-TEB2WS4Q-d978b8a2d1fd8fcc132b16ef8d57dd7c.js.br → gitGraph-TEB2WS4Q-03038b65af81bb0d4755a35c737decf0.js.br} +0 -0
  102. package/dist/server/web-ui/_expo/static/js/web/gitGraph-TEB2WS4Q-03038b65af81bb0d4755a35c737decf0.js.gz +0 -0
  103. package/dist/server/web-ui/_expo/static/js/web/{gitGraphDiagram-IHSO6WYX-6cb31a37312da231b8f10f86b0d4de52.js → gitGraphDiagram-IHSO6WYX-49a762c3f7ecc4315bcde2731f090410.js} +1 -1
  104. package/dist/server/web-ui/_expo/static/js/web/{gitGraphDiagram-IHSO6WYX-6cb31a37312da231b8f10f86b0d4de52.js.br → gitGraphDiagram-IHSO6WYX-49a762c3f7ecc4315bcde2731f090410.js.br} +0 -0
  105. package/dist/server/web-ui/_expo/static/js/web/{gitGraphDiagram-IHSO6WYX-6cb31a37312da231b8f10f86b0d4de52.js.gz → gitGraphDiagram-IHSO6WYX-49a762c3f7ecc4315bcde2731f090410.js.gz} +0 -0
  106. package/dist/server/web-ui/_expo/static/js/web/{index-4c86d3c14df18b18b3b9a6329b896faf.js → index-6e99d24bcc09db447a2d8b0c747a5263.js} +74 -73
  107. package/dist/server/web-ui/_expo/static/js/web/index-6e99d24bcc09db447a2d8b0c747a5263.js.br +0 -0
  108. package/dist/server/web-ui/_expo/static/js/web/index-6e99d24bcc09db447a2d8b0c747a5263.js.gz +0 -0
  109. package/dist/server/web-ui/_expo/static/js/web/{indexeddb-attachment-store-5a90994af83f12740a986d9f1cb55cc9.js → indexeddb-attachment-store-ea6e57606ef25b42cf1e6665a3f5313e.js} +1 -1
  110. package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-ea6e57606ef25b42cf1e6665a3f5313e.js.br +0 -0
  111. package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-ea6e57606ef25b42cf1e6665a3f5313e.js.gz +0 -0
  112. package/dist/server/web-ui/_expo/static/js/web/{info-DKCQHKI2-b59d0dbb9a30d361ddc796a5cfa7fc41.js → info-DKCQHKI2-61f5b3ca4e5cea885d6254ccef0626c4.js} +1 -1
  113. package/dist/server/web-ui/_expo/static/js/web/{info-DKCQHKI2-b59d0dbb9a30d361ddc796a5cfa7fc41.js.br → info-DKCQHKI2-61f5b3ca4e5cea885d6254ccef0626c4.js.br} +0 -0
  114. package/dist/server/web-ui/_expo/static/js/web/info-DKCQHKI2-61f5b3ca4e5cea885d6254ccef0626c4.js.gz +0 -0
  115. package/dist/server/web-ui/_expo/static/js/web/{infoDiagram-FWYZ7A6U-0c4368de61a3bdbfbc73b143423981d9.js → infoDiagram-FWYZ7A6U-f47fe897045bf4e6949ea71abdae89fe.js} +1 -1
  116. package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-f47fe897045bf4e6949ea71abdae89fe.js.br +0 -0
  117. package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-f47fe897045bf4e6949ea71abdae89fe.js.gz +0 -0
  118. package/dist/server/web-ui/_expo/static/js/web/{ishikawaDiagram-FXEZZL3T-1474e73532a16148b7944d3b0f896197.js → ishikawaDiagram-FXEZZL3T-bf6597ebf1b0773e1d39dea7fcf8800f.js} +1 -1
  119. package/dist/server/web-ui/_expo/static/js/web/ishikawaDiagram-FXEZZL3T-bf6597ebf1b0773e1d39dea7fcf8800f.js.br +0 -0
  120. package/dist/server/web-ui/_expo/static/js/web/{ishikawaDiagram-FXEZZL3T-1474e73532a16148b7944d3b0f896197.js.gz → ishikawaDiagram-FXEZZL3T-bf6597ebf1b0773e1d39dea7fcf8800f.js.gz} +0 -0
  121. package/dist/server/web-ui/_expo/static/js/web/{journeyDiagram-5HDEW3XC-13df6cce9cb7f0e6ffbaa9a614feeee4.js → journeyDiagram-5HDEW3XC-7dc3a04c43574b6aac59a4520d111129.js} +1 -1
  122. package/dist/server/web-ui/_expo/static/js/web/journeyDiagram-5HDEW3XC-7dc3a04c43574b6aac59a4520d111129.js.br +0 -0
  123. package/dist/server/web-ui/_expo/static/js/web/{journeyDiagram-5HDEW3XC-13df6cce9cb7f0e6ffbaa9a614feeee4.js.gz → journeyDiagram-5HDEW3XC-7dc3a04c43574b6aac59a4520d111129.js.gz} +0 -0
  124. package/dist/server/web-ui/_expo/static/js/web/{kanban-definition-HUTT4EX6-6b56c0da5302838e7e1c46bf7460ea35.js → kanban-definition-HUTT4EX6-7be647182b1c3291e9330de01d329adf.js} +1 -1
  125. package/dist/server/web-ui/_expo/static/js/web/kanban-definition-HUTT4EX6-7be647182b1c3291e9330de01d329adf.js.br +0 -0
  126. package/dist/server/web-ui/_expo/static/js/web/{kanban-definition-HUTT4EX6-6b56c0da5302838e7e1c46bf7460ea35.js.gz → kanban-definition-HUTT4EX6-7be647182b1c3291e9330de01d329adf.js.gz} +0 -0
  127. package/dist/server/web-ui/_expo/static/js/web/{katex-7f6ac23f118e6e9264fdfa96e335134f.js → katex-c0aeb8f935f239b315771d04dc16b1e7.js} +1 -1
  128. package/dist/server/web-ui/_expo/static/js/web/katex-c0aeb8f935f239b315771d04dc16b1e7.js.br +0 -0
  129. package/dist/server/web-ui/_expo/static/js/web/{katex-7f6ac23f118e6e9264fdfa96e335134f.js.gz → katex-c0aeb8f935f239b315771d04dc16b1e7.js.gz} +0 -0
  130. package/dist/server/web-ui/_expo/static/js/web/{mermaid-75931b049ce3e66af3cd8ddf01e1cd23.js → mermaid-f4cf4ad300756762c2eed3bd65fecb6c.js} +9 -9
  131. package/dist/server/web-ui/_expo/static/js/web/mermaid-f4cf4ad300756762c2eed3bd65fecb6c.js.br +0 -0
  132. package/dist/server/web-ui/_expo/static/js/web/{mermaid-75931b049ce3e66af3cd8ddf01e1cd23.js.gz → mermaid-f4cf4ad300756762c2eed3bd65fecb6c.js.gz} +0 -0
  133. package/dist/server/web-ui/_expo/static/js/web/{mindmap-definition-LN4V7U3C-fafde693a329ca39007debdd961134b4.js → mindmap-definition-LN4V7U3C-5a266041ac99a182f60e7d1ade3053a7.js} +21 -21
  134. package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-5a266041ac99a182f60e7d1ade3053a7.js.br +0 -0
  135. package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-5a266041ac99a182f60e7d1ade3053a7.js.gz +0 -0
  136. package/dist/server/web-ui/_expo/static/js/web/{native-file-attachment-store-645b8ffe39c60c05c0a224e6efcb5a9c.js → native-file-attachment-store-78cca157541c8af3aff9a719f7b951be.js} +3 -3
  137. package/dist/server/web-ui/_expo/static/js/web/native-file-attachment-store-78cca157541c8af3aff9a719f7b951be.js.br +11 -0
  138. 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
  139. package/dist/server/web-ui/_expo/static/js/web/{orchestration-graph-panel-2d117a5764d11c411d707e37fba93a1b.js → orchestration-graph-panel-77d13bf34f0ff1ffed397666b8009b21.js} +5 -5
  140. package/dist/server/web-ui/_expo/static/js/web/orchestration-graph-panel-77d13bf34f0ff1ffed397666b8009b21.js.br +0 -0
  141. package/dist/server/web-ui/_expo/static/js/web/{orchestration-graph-panel-2d117a5764d11c411d707e37fba93a1b.js.gz → orchestration-graph-panel-77d13bf34f0ff1ffed397666b8009b21.js.gz} +0 -0
  142. package/dist/server/web-ui/_expo/static/js/web/{packet-7NZHBO7P-61a485e09ee448c823fffbdfc588826d.js → packet-7NZHBO7P-8f2693917ef293414f42718be4e1d738.js} +1 -1
  143. package/dist/server/web-ui/_expo/static/js/web/{packet-7NZHBO7P-61a485e09ee448c823fffbdfc588826d.js.br → packet-7NZHBO7P-8f2693917ef293414f42718be4e1d738.js.br} +1 -1
  144. package/dist/server/web-ui/_expo/static/js/web/packet-7NZHBO7P-8f2693917ef293414f42718be4e1d738.js.gz +0 -0
  145. package/dist/server/web-ui/_expo/static/js/web/{pegDiagram-2B236MQR-035fe1b93f90f4775e99aea533552b42.js → pegDiagram-2B236MQR-58835705d6a13a27b59f4c85aeaf7012.js} +1 -1
  146. package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-58835705d6a13a27b59f4c85aeaf7012.js.br +0 -0
  147. package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-58835705d6a13a27b59f4c85aeaf7012.js.gz +0 -0
  148. package/dist/server/web-ui/_expo/static/js/web/{pie-RZYD4A2V-f6208df18db61d490f4811b192b77dec.js → pie-RZYD4A2V-8b0f157b04de7752354fc779ddbf49a4.js} +1 -1
  149. package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-8b0f157b04de7752354fc779ddbf49a4.js.br +0 -0
  150. package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-8b0f157b04de7752354fc779ddbf49a4.js.gz +0 -0
  151. package/dist/server/web-ui/_expo/static/js/web/{pieDiagram-ENE6RG2P-c78c82bf26f51acb7b7c44ae51eba9c6.js → pieDiagram-ENE6RG2P-a0061a200414abc917902506915ccabe.js} +1 -1
  152. package/dist/server/web-ui/_expo/static/js/web/pieDiagram-ENE6RG2P-a0061a200414abc917902506915ccabe.js.br +0 -0
  153. package/dist/server/web-ui/_expo/static/js/web/{pieDiagram-ENE6RG2P-c78c82bf26f51acb7b7c44ae51eba9c6.js.gz → pieDiagram-ENE6RG2P-a0061a200414abc917902506915ccabe.js.gz} +0 -0
  154. package/dist/server/web-ui/_expo/static/js/web/{quadrantDiagram-ABIIQ3AL-efff1486187742fe8683a966651df92f.js → quadrantDiagram-ABIIQ3AL-ccae11df8eb112141ab52dc3b055366d.js} +1 -1
  155. package/dist/server/web-ui/_expo/static/js/web/quadrantDiagram-ABIIQ3AL-ccae11df8eb112141ab52dc3b055366d.js.br +0 -0
  156. package/dist/server/web-ui/_expo/static/js/web/{quadrantDiagram-ABIIQ3AL-efff1486187742fe8683a966651df92f.js.gz → quadrantDiagram-ABIIQ3AL-ccae11df8eb112141ab52dc3b055366d.js.gz} +0 -0
  157. package/dist/server/web-ui/_expo/static/js/web/{radar-I7S5WNFK-0150ed7f0d337fc7ec70638a3656ea06.js → radar-I7S5WNFK-0768be5c16d166cd094d75a4c9fba55a.js} +1 -1
  158. package/dist/server/web-ui/_expo/static/js/web/{radar-I7S5WNFK-0150ed7f0d337fc7ec70638a3656ea06.js.br → radar-I7S5WNFK-0768be5c16d166cd094d75a4c9fba55a.js.br} +0 -0
  159. package/dist/server/web-ui/_expo/static/js/web/radar-I7S5WNFK-0768be5c16d166cd094d75a4c9fba55a.js.gz +0 -0
  160. package/dist/server/web-ui/_expo/static/js/web/{railroad-3IZDKUUU-c6e94ec81a88c02cb339de59f29386f5.js → railroad-3IZDKUUU-55b81b14fbc2908aa06995bd62b57b43.js} +1 -1
  161. package/dist/server/web-ui/_expo/static/js/web/{railroad-3IZDKUUU-c6e94ec81a88c02cb339de59f29386f5.js.br → railroad-3IZDKUUU-55b81b14fbc2908aa06995bd62b57b43.js.br} +1 -1
  162. package/dist/server/web-ui/_expo/static/js/web/railroad-3IZDKUUU-55b81b14fbc2908aa06995bd62b57b43.js.gz +0 -0
  163. package/dist/server/web-ui/_expo/static/js/web/{railroad-abnf-AHOZXSZD-627ed129da90b5e1d371bd2c3b9db457.js → railroad-abnf-AHOZXSZD-47462203d9c422ed3805bd31ed12d922.js} +1 -1
  164. package/dist/server/web-ui/_expo/static/js/web/{railroad-abnf-AHOZXSZD-627ed129da90b5e1d371bd2c3b9db457.js.br → railroad-abnf-AHOZXSZD-47462203d9c422ed3805bd31ed12d922.js.br} +1 -1
  165. package/dist/server/web-ui/_expo/static/js/web/railroad-abnf-AHOZXSZD-47462203d9c422ed3805bd31ed12d922.js.gz +0 -0
  166. package/dist/server/web-ui/_expo/static/js/web/{railroad-ebnf-EBAXGLYW-1b7ec12d3b92be4e181971b21f01f3f8.js → railroad-ebnf-EBAXGLYW-708f5dcce4ca8693b288152f6aa217b1.js} +1 -1
  167. package/dist/server/web-ui/_expo/static/js/web/{railroad-ebnf-EBAXGLYW-1b7ec12d3b92be4e181971b21f01f3f8.js.br → railroad-ebnf-EBAXGLYW-708f5dcce4ca8693b288152f6aa217b1.js.br} +1 -1
  168. package/dist/server/web-ui/_expo/static/js/web/railroad-ebnf-EBAXGLYW-708f5dcce4ca8693b288152f6aa217b1.js.gz +0 -0
  169. package/dist/server/web-ui/_expo/static/js/web/{railroad-peg-LSFZ7HO6-8a8e027f4141d16a12c15223da966d7d.js → railroad-peg-LSFZ7HO6-eb7ff4c6b43a9c593b0feac004d52d4e.js} +1 -1
  170. package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-eb7ff4c6b43a9c593b0feac004d52d4e.js.br +0 -0
  171. package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-eb7ff4c6b43a9c593b0feac004d52d4e.js.gz +0 -0
  172. package/dist/server/web-ui/_expo/static/js/web/{railroadDiagram-RFXS5EU6-499f36fe78b07e5558063f963a47a474.js → railroadDiagram-RFXS5EU6-c1c534a0f6478078bca1fd806a1ee2ae.js} +1 -1
  173. package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-c1c534a0f6478078bca1fd806a1ee2ae.js.br +0 -0
  174. package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-c1c534a0f6478078bca1fd806a1ee2ae.js.gz +0 -0
  175. package/dist/server/web-ui/_expo/static/js/web/{requirementDiagram-TGXJPOKE-9aaddb885fc59873a8f89cd7550c2c43.js → requirementDiagram-TGXJPOKE-5dd7440a5946dde0e06a5afa9e0295a1.js} +1 -1
  176. package/dist/server/web-ui/_expo/static/js/web/requirementDiagram-TGXJPOKE-5dd7440a5946dde0e06a5afa9e0295a1.js.br +0 -0
  177. package/dist/server/web-ui/_expo/static/js/web/{requirementDiagram-TGXJPOKE-9aaddb885fc59873a8f89cd7550c2c43.js.gz → requirementDiagram-TGXJPOKE-5dd7440a5946dde0e06a5afa9e0295a1.js.gz} +0 -0
  178. package/dist/server/web-ui/_expo/static/js/web/{sankeyDiagram-HTMAVEWB-3fa66fe414adce7a50e31551c059f99c.js → sankeyDiagram-HTMAVEWB-76b963967a4f7c862f4f2f18492e7c56.js} +120 -120
  179. package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-76b963967a4f7c862f4f2f18492e7c56.js.br +0 -0
  180. package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-76b963967a4f7c862f4f2f18492e7c56.js.gz +0 -0
  181. package/dist/server/web-ui/_expo/static/js/web/{sequenceDiagram-DBY2YBRQ-856a29fb0507a2dcb697a2aa29cd0b7a.js → sequenceDiagram-DBY2YBRQ-d40a3dbcd285c19aa010a697e12f5022.js} +1 -1
  182. package/dist/server/web-ui/_expo/static/js/web/sequenceDiagram-DBY2YBRQ-d40a3dbcd285c19aa010a697e12f5022.js.br +0 -0
  183. package/dist/server/web-ui/_expo/static/js/web/{sequenceDiagram-DBY2YBRQ-856a29fb0507a2dcb697a2aa29cd0b7a.js.gz → sequenceDiagram-DBY2YBRQ-d40a3dbcd285c19aa010a697e12f5022.js.gz} +0 -0
  184. package/dist/server/web-ui/_expo/static/js/web/{sizeCapture-X5ZJPWSS-388b849b33073b8202dd9ca50038b1c7.js → sizeCapture-X5ZJPWSS-03ac818220d4ba98bdd2f4f454758263.js} +1 -1
  185. package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-03ac818220d4ba98bdd2f4f454758263.js.br +0 -0
  186. package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-03ac818220d4ba98bdd2f4f454758263.js.gz +0 -0
  187. package/dist/server/web-ui/_expo/static/js/web/{stateDiagram-2N3HPSRC-9ca22d078d9922ddcb54ba7bb389c734.js → stateDiagram-2N3HPSRC-ba1e123bf8ce69ae781981f264e90564.js} +1 -1
  188. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-ba1e123bf8ce69ae781981f264e90564.js.br +0 -0
  189. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-ba1e123bf8ce69ae781981f264e90564.js.gz +0 -0
  190. package/dist/server/web-ui/_expo/static/js/web/{stateDiagram-v2-6OUMAXLB-4357e7143c73859f6b4858ba72acb5aa.js → stateDiagram-v2-6OUMAXLB-5925b0db81d9a113005bd93c6adbab9d.js} +1 -1
  191. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-5925b0db81d9a113005bd93c6adbab9d.js.br +0 -0
  192. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-5925b0db81d9a113005bd93c6adbab9d.js.gz +0 -0
  193. package/dist/server/web-ui/_expo/static/js/web/{swimlanes-5IMT3BWC-d737ca408a7a2b82f7419141456d28e4.js → swimlanes-5IMT3BWC-93c0bb8b5ee84ca6f11d561497ec0ef0.js} +1 -1
  194. package/dist/server/web-ui/_expo/static/js/web/swimlanes-5IMT3BWC-93c0bb8b5ee84ca6f11d561497ec0ef0.js.br +0 -0
  195. package/dist/server/web-ui/_expo/static/js/web/{swimlanes-5IMT3BWC-d737ca408a7a2b82f7419141456d28e4.js.gz → swimlanes-5IMT3BWC-93c0bb8b5ee84ca6f11d561497ec0ef0.js.gz} +0 -0
  196. package/dist/server/web-ui/_expo/static/js/web/{swimlanesDiagram-G3AALYLV-0bf2ac58b338c2aeb33213ff1a57983a.js → swimlanesDiagram-G3AALYLV-5f3e335e1800b344e786080955bdb2c5.js} +1 -1
  197. package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-5f3e335e1800b344e786080955bdb2c5.js.br +0 -0
  198. package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-5f3e335e1800b344e786080955bdb2c5.js.gz +0 -0
  199. package/dist/server/web-ui/_expo/static/js/web/{timeline-definition-FHXFAJF6-1130419ca563266603c98f1b2148a154.js → timeline-definition-FHXFAJF6-ebf6579c1264c7dd88b67d0ecc9313d7.js} +1 -1
  200. package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-ebf6579c1264c7dd88b67d0ecc9313d7.js.br +0 -0
  201. package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-ebf6579c1264c7dd88b67d0ecc9313d7.js.gz +0 -0
  202. package/dist/server/web-ui/_expo/static/js/web/{treeView-QDETBFTQ-4f6ec9b592731c21dee99264fa638554.js → treeView-QDETBFTQ-682ed2be8efc51bd8196ff3320637705.js} +1 -1
  203. package/dist/server/web-ui/_expo/static/js/web/{treeView-QDETBFTQ-4f6ec9b592731c21dee99264fa638554.js.br → treeView-QDETBFTQ-682ed2be8efc51bd8196ff3320637705.js.br} +0 -0
  204. package/dist/server/web-ui/_expo/static/js/web/treeView-QDETBFTQ-682ed2be8efc51bd8196ff3320637705.js.gz +0 -0
  205. package/dist/server/web-ui/_expo/static/js/web/{treemap-6X3UGDF4-39eb6ec2c19a5de9242fd28aa26dcf5b.js → treemap-6X3UGDF4-4fb89637583518868012429289715b50.js} +1 -1
  206. package/dist/server/web-ui/_expo/static/js/web/{treemap-6X3UGDF4-39eb6ec2c19a5de9242fd28aa26dcf5b.js.br → treemap-6X3UGDF4-4fb89637583518868012429289715b50.js.br} +0 -0
  207. package/dist/server/web-ui/_expo/static/js/web/treemap-6X3UGDF4-4fb89637583518868012429289715b50.js.gz +0 -0
  208. package/dist/server/web-ui/_expo/static/js/web/{vennDiagram-L72KCM5P-4c15b392e9de3fdc472b53cbdf8e7558.js → vennDiagram-L72KCM5P-4a09551e281dc72285c8c56bcd4b04a3.js} +2 -2
  209. package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4a09551e281dc72285c8c56bcd4b04a3.js.br +0 -0
  210. package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4a09551e281dc72285c8c56bcd4b04a3.js.gz +0 -0
  211. package/dist/server/web-ui/_expo/static/js/web/{visualizer-bundle-b0af8f4f1ab8d4029f3f21236df43f7f.js → visualizer-bundle-fab344f71166d5645590bda1bab1e0a5.js} +1 -1
  212. package/dist/server/web-ui/_expo/static/js/web/visualizer-bundle-fab344f71166d5645590bda1bab1e0a5.js.br +0 -0
  213. package/dist/server/web-ui/_expo/static/js/web/{visualizer-bundle-b0af8f4f1ab8d4029f3f21236df43f7f.js.gz → visualizer-bundle-fab344f71166d5645590bda1bab1e0a5.js.gz} +0 -0
  214. package/dist/server/web-ui/_expo/static/js/web/{visualizer-panel-3fbc1337bb844d7163cbdb418a4dfd53.js → visualizer-panel-bf8e9531071e12cefa8eda4766877aba.js} +1 -1
  215. package/dist/server/web-ui/_expo/static/js/web/visualizer-panel-bf8e9531071e12cefa8eda4766877aba.js.br +6 -0
  216. package/dist/server/web-ui/_expo/static/js/web/{visualizer-panel-3fbc1337bb844d7163cbdb418a4dfd53.js.gz → visualizer-panel-bf8e9531071e12cefa8eda4766877aba.js.gz} +0 -0
  217. package/dist/server/web-ui/_expo/static/js/web/{visualizer-pip-de03996e25ac5d8a11d723ea90b2f9a3.js → visualizer-pip-633730d52ecc119677ce9ecc287c7879.js} +2 -2
  218. package/dist/server/web-ui/_expo/static/js/web/visualizer-pip-633730d52ecc119677ce9ecc287c7879.js.br +0 -0
  219. package/dist/server/web-ui/_expo/static/js/web/{visualizer-pip-de03996e25ac5d8a11d723ea90b2f9a3.js.gz → visualizer-pip-633730d52ecc119677ce9ecc287c7879.js.gz} +0 -0
  220. package/dist/server/web-ui/_expo/static/js/web/{wardley-OPB4EBWU-b075ee9680ce77acf211a0fb1e63cca8.js → wardley-OPB4EBWU-86a2856822d60f742050c338803f8533.js} +1 -1
  221. package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-86a2856822d60f742050c338803f8533.js.br +0 -0
  222. package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-86a2856822d60f742050c338803f8533.js.gz +0 -0
  223. package/dist/server/web-ui/_expo/static/js/web/{wardleyDiagram-EHGQE667-a93bc6a6a1e80adcb9a740a2ea3d1676.js → wardleyDiagram-EHGQE667-cf65a2e4de30372a177e82834dba571c.js} +1 -1
  224. package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-cf65a2e4de30372a177e82834dba571c.js.br +0 -0
  225. package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-cf65a2e4de30372a177e82834dba571c.js.gz +0 -0
  226. package/dist/server/web-ui/_expo/static/js/web/{xychartDiagram-FW5EYKEG-ec54fa07a12c5792d0bb7b65deaff05b.js → xychartDiagram-FW5EYKEG-d29f0b24141b00d07e99c98d99ac55d4.js} +1 -1
  227. package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-d29f0b24141b00d07e99c98d99ac55d4.js.br +0 -0
  228. package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-d29f0b24141b00d07e99c98d99ac55d4.js.gz +0 -0
  229. package/dist/server/web-ui/index.html +1 -1
  230. package/dist/server/web-ui/index.html.br +0 -0
  231. package/dist/server/web-ui/index.html.gz +0 -0
  232. package/dist/src/terminal/shell-integration/zsh/.zshenv +17 -17
  233. package/dist/src/terminal/shell-integration/zsh/otto-integration.zsh +32 -32
  234. package/package.json +5 -5
  235. package/dist/server/web-ui/_expo/static/js/web/__common-6d2299ed037bec2393245a7c0bf1c643.js.br +0 -0
  236. package/dist/server/web-ui/_expo/static/js/web/__common-6d2299ed037bec2393245a7c0bf1c643.js.gz +0 -0
  237. package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-c3c2ca327b2d7ad9af3caa1cba884908.js.br +0 -0
  238. package/dist/server/web-ui/_expo/static/js/web/abnfDiagram-VRR7QNED-c3c2ca327b2d7ad9af3caa1cba884908.js.gz +0 -0
  239. package/dist/server/web-ui/_expo/static/js/web/architecture-TIHT7OUA-0cf23d3dc9775f216c01daae4aae250a.js.gz +0 -0
  240. package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-f3bce96124559dc19faa4d90aca4afd4.js.br +0 -0
  241. package/dist/server/web-ui/_expo/static/js/web/architectureDiagram-ZJ3FMSHR-f3bce96124559dc19faa4d90aca4afd4.js.gz +0 -0
  242. package/dist/server/web-ui/_expo/static/js/web/blockDiagram-677ZJIJ3-839486928c0f151128a5e2836aa07080.js.br +0 -0
  243. package/dist/server/web-ui/_expo/static/js/web/c4Diagram-LMCZKHZV-197212c21520a6b659a5649e683619d0.js.br +0 -0
  244. package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-a0a0fbefc96d14b6619c84fc4f92a39a.js.br +0 -0
  245. package/dist/server/web-ui/_expo/static/js/web/classDiagram-OUVF2IWQ-a0a0fbefc96d14b6619c84fc4f92a39a.js.gz +0 -0
  246. package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-e979239c6d160123d5b4847253a8a70e.js.br +0 -0
  247. package/dist/server/web-ui/_expo/static/js/web/classDiagram-v2-EOCWNBFH-e979239c6d160123d5b4847253a8a70e.js.gz +0 -0
  248. package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-bbc39a6bb062ba85e433f91becc37a65.js.br +0 -0
  249. package/dist/server/web-ui/_expo/static/js/web/cose-bilkent-JH36ORCC-bbc39a6bb062ba85e433f91becc37a65.js.gz +0 -0
  250. package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-ea0e514652627740f5a2ed32b027a164.js.br +0 -0
  251. package/dist/server/web-ui/_expo/static/js/web/cynefin-VYW2F7L2-ea0e514652627740f5a2ed32b027a164.js.gz +0 -0
  252. package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-0446f9b57ba778e5883d93e24692ffce.js.br +0 -0
  253. package/dist/server/web-ui/_expo/static/js/web/cynefinDiagram-TSTJHNR4-0446f9b57ba778e5883d93e24692ffce.js.gz +0 -0
  254. package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-69f7aa52521b06a95874b1ac67508def.js.br +0 -0
  255. package/dist/server/web-ui/_expo/static/js/web/dagre-VKFMJZFB-69f7aa52521b06a95874b1ac67508def.js.gz +0 -0
  256. package/dist/server/web-ui/_expo/static/js/web/desktop-attachment-bridge-0ae8aadd6e53625f59d62eceb1f06ede.js.gz +0 -0
  257. package/dist/server/web-ui/_expo/static/js/web/diagram-FQU43EPY-bd0940835ccad031627e285aaba6d5ec.js.br +0 -0
  258. package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-217e2cd3275924bc08fc6ebe79e95e48.js.br +0 -0
  259. package/dist/server/web-ui/_expo/static/js/web/diagram-G47NLZAW-217e2cd3275924bc08fc6ebe79e95e48.js.gz +0 -0
  260. package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-fbd3aa35ca68df15ee378fb63241b333.js.br +0 -0
  261. package/dist/server/web-ui/_expo/static/js/web/diagram-NH7WQ7WH-fbd3aa35ca68df15ee378fb63241b333.js.gz +0 -0
  262. package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-48ebb0ba6bcb34417649bd55070542ad.js.br +0 -0
  263. package/dist/server/web-ui/_expo/static/js/web/diagram-OA4YK3LP-48ebb0ba6bcb34417649bd55070542ad.js.gz +0 -0
  264. package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-2be85db5396495fa970419f77587cf14.js.br +0 -0
  265. package/dist/server/web-ui/_expo/static/js/web/diagram-WEI45ONY-2be85db5396495fa970419f77587cf14.js.gz +0 -0
  266. package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-3c5c44cf8340b641d13076adab77967b.js.br +0 -0
  267. package/dist/server/web-ui/_expo/static/js/web/ebnfDiagram-CCIWWBDH-3c5c44cf8340b641d13076adab77967b.js.gz +0 -0
  268. package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-81762a72bd33bf1042e4cad4f688abf2.js.br +0 -0
  269. package/dist/server/web-ui/_expo/static/js/web/erDiagram-Q63AITRT-81762a72bd33bf1042e4cad4f688abf2.js.gz +0 -0
  270. package/dist/server/web-ui/_expo/static/js/web/eventmodeling-45OFAUF4-11d7615d746c5304c28d4931ec9ca5f7.js.gz +0 -0
  271. package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-5a2af608a9500bb36da0595c3464a562.js.br +0 -0
  272. package/dist/server/web-ui/_expo/static/js/web/flowDiagram-23GEKE2U-5a2af608a9500bb36da0595c3464a562.js.gz +0 -0
  273. package/dist/server/web-ui/_expo/static/js/web/ganttDiagram-NO4QXBWP-379aae0f5fb2652d90827c7f8b2472d2.js.br +0 -0
  274. package/dist/server/web-ui/_expo/static/js/web/gitGraph-TEB2WS4Q-d978b8a2d1fd8fcc132b16ef8d57dd7c.js.gz +0 -0
  275. package/dist/server/web-ui/_expo/static/js/web/index-4c86d3c14df18b18b3b9a6329b896faf.js.br +0 -0
  276. package/dist/server/web-ui/_expo/static/js/web/index-4c86d3c14df18b18b3b9a6329b896faf.js.gz +0 -0
  277. package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-5a90994af83f12740a986d9f1cb55cc9.js.br +0 -0
  278. package/dist/server/web-ui/_expo/static/js/web/indexeddb-attachment-store-5a90994af83f12740a986d9f1cb55cc9.js.gz +0 -0
  279. package/dist/server/web-ui/_expo/static/js/web/info-DKCQHKI2-b59d0dbb9a30d361ddc796a5cfa7fc41.js.gz +0 -0
  280. package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-0c4368de61a3bdbfbc73b143423981d9.js.br +0 -0
  281. package/dist/server/web-ui/_expo/static/js/web/infoDiagram-FWYZ7A6U-0c4368de61a3bdbfbc73b143423981d9.js.gz +0 -0
  282. package/dist/server/web-ui/_expo/static/js/web/ishikawaDiagram-FXEZZL3T-1474e73532a16148b7944d3b0f896197.js.br +0 -0
  283. package/dist/server/web-ui/_expo/static/js/web/journeyDiagram-5HDEW3XC-13df6cce9cb7f0e6ffbaa9a614feeee4.js.br +0 -0
  284. package/dist/server/web-ui/_expo/static/js/web/kanban-definition-HUTT4EX6-6b56c0da5302838e7e1c46bf7460ea35.js.br +0 -0
  285. package/dist/server/web-ui/_expo/static/js/web/katex-7f6ac23f118e6e9264fdfa96e335134f.js.br +0 -0
  286. package/dist/server/web-ui/_expo/static/js/web/mermaid-75931b049ce3e66af3cd8ddf01e1cd23.js.br +0 -0
  287. package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-fafde693a329ca39007debdd961134b4.js.br +0 -0
  288. package/dist/server/web-ui/_expo/static/js/web/mindmap-definition-LN4V7U3C-fafde693a329ca39007debdd961134b4.js.gz +0 -0
  289. package/dist/server/web-ui/_expo/static/js/web/native-file-attachment-store-645b8ffe39c60c05c0a224e6efcb5a9c.js.br +0 -0
  290. package/dist/server/web-ui/_expo/static/js/web/orchestration-graph-panel-2d117a5764d11c411d707e37fba93a1b.js.br +0 -0
  291. package/dist/server/web-ui/_expo/static/js/web/packet-7NZHBO7P-61a485e09ee448c823fffbdfc588826d.js.gz +0 -0
  292. package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-035fe1b93f90f4775e99aea533552b42.js.br +0 -0
  293. package/dist/server/web-ui/_expo/static/js/web/pegDiagram-2B236MQR-035fe1b93f90f4775e99aea533552b42.js.gz +0 -0
  294. package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-f6208df18db61d490f4811b192b77dec.js.br +0 -0
  295. package/dist/server/web-ui/_expo/static/js/web/pie-RZYD4A2V-f6208df18db61d490f4811b192b77dec.js.gz +0 -0
  296. package/dist/server/web-ui/_expo/static/js/web/pieDiagram-ENE6RG2P-c78c82bf26f51acb7b7c44ae51eba9c6.js.br +0 -0
  297. package/dist/server/web-ui/_expo/static/js/web/quadrantDiagram-ABIIQ3AL-efff1486187742fe8683a966651df92f.js.br +0 -0
  298. package/dist/server/web-ui/_expo/static/js/web/radar-I7S5WNFK-0150ed7f0d337fc7ec70638a3656ea06.js.gz +0 -0
  299. package/dist/server/web-ui/_expo/static/js/web/railroad-3IZDKUUU-c6e94ec81a88c02cb339de59f29386f5.js.gz +0 -0
  300. package/dist/server/web-ui/_expo/static/js/web/railroad-abnf-AHOZXSZD-627ed129da90b5e1d371bd2c3b9db457.js.gz +0 -0
  301. package/dist/server/web-ui/_expo/static/js/web/railroad-ebnf-EBAXGLYW-1b7ec12d3b92be4e181971b21f01f3f8.js.gz +0 -0
  302. package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-8a8e027f4141d16a12c15223da966d7d.js.br +0 -0
  303. package/dist/server/web-ui/_expo/static/js/web/railroad-peg-LSFZ7HO6-8a8e027f4141d16a12c15223da966d7d.js.gz +0 -0
  304. package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-499f36fe78b07e5558063f963a47a474.js.br +0 -0
  305. package/dist/server/web-ui/_expo/static/js/web/railroadDiagram-RFXS5EU6-499f36fe78b07e5558063f963a47a474.js.gz +0 -0
  306. package/dist/server/web-ui/_expo/static/js/web/requirementDiagram-TGXJPOKE-9aaddb885fc59873a8f89cd7550c2c43.js.br +0 -0
  307. package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-3fa66fe414adce7a50e31551c059f99c.js.br +0 -0
  308. package/dist/server/web-ui/_expo/static/js/web/sankeyDiagram-HTMAVEWB-3fa66fe414adce7a50e31551c059f99c.js.gz +0 -0
  309. package/dist/server/web-ui/_expo/static/js/web/sequenceDiagram-DBY2YBRQ-856a29fb0507a2dcb697a2aa29cd0b7a.js.br +0 -0
  310. package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-388b849b33073b8202dd9ca50038b1c7.js.br +0 -0
  311. package/dist/server/web-ui/_expo/static/js/web/sizeCapture-X5ZJPWSS-388b849b33073b8202dd9ca50038b1c7.js.gz +0 -0
  312. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-9ca22d078d9922ddcb54ba7bb389c734.js.br +0 -0
  313. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-2N3HPSRC-9ca22d078d9922ddcb54ba7bb389c734.js.gz +0 -0
  314. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-4357e7143c73859f6b4858ba72acb5aa.js.br +0 -0
  315. package/dist/server/web-ui/_expo/static/js/web/stateDiagram-v2-6OUMAXLB-4357e7143c73859f6b4858ba72acb5aa.js.gz +0 -0
  316. package/dist/server/web-ui/_expo/static/js/web/swimlanes-5IMT3BWC-d737ca408a7a2b82f7419141456d28e4.js.br +0 -0
  317. package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-0bf2ac58b338c2aeb33213ff1a57983a.js.br +0 -0
  318. package/dist/server/web-ui/_expo/static/js/web/swimlanesDiagram-G3AALYLV-0bf2ac58b338c2aeb33213ff1a57983a.js.gz +0 -0
  319. package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-1130419ca563266603c98f1b2148a154.js.br +0 -0
  320. package/dist/server/web-ui/_expo/static/js/web/timeline-definition-FHXFAJF6-1130419ca563266603c98f1b2148a154.js.gz +0 -0
  321. package/dist/server/web-ui/_expo/static/js/web/treeView-QDETBFTQ-4f6ec9b592731c21dee99264fa638554.js.gz +0 -0
  322. package/dist/server/web-ui/_expo/static/js/web/treemap-6X3UGDF4-39eb6ec2c19a5de9242fd28aa26dcf5b.js.gz +0 -0
  323. package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4c15b392e9de3fdc472b53cbdf8e7558.js.br +0 -0
  324. package/dist/server/web-ui/_expo/static/js/web/vennDiagram-L72KCM5P-4c15b392e9de3fdc472b53cbdf8e7558.js.gz +0 -0
  325. package/dist/server/web-ui/_expo/static/js/web/visualizer-bundle-b0af8f4f1ab8d4029f3f21236df43f7f.js.br +0 -0
  326. package/dist/server/web-ui/_expo/static/js/web/visualizer-panel-3fbc1337bb844d7163cbdb418a4dfd53.js.br +0 -3
  327. package/dist/server/web-ui/_expo/static/js/web/visualizer-pip-de03996e25ac5d8a11d723ea90b2f9a3.js.br +0 -0
  328. package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-b075ee9680ce77acf211a0fb1e63cca8.js.br +0 -0
  329. package/dist/server/web-ui/_expo/static/js/web/wardley-OPB4EBWU-b075ee9680ce77acf211a0fb1e63cca8.js.gz +0 -0
  330. package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-a93bc6a6a1e80adcb9a740a2ea3d1676.js.br +0 -0
  331. package/dist/server/web-ui/_expo/static/js/web/wardleyDiagram-EHGQE667-a93bc6a6a1e80adcb9a740a2ea3d1676.js.gz +0 -0
  332. package/dist/server/web-ui/_expo/static/js/web/xychartDiagram-FW5EYKEG-ec54fa07a12c5792d0bb7b65deaff05b.js.br +0 -0
  333. 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";var e;function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"diagram",{enumerable:!0,get:function(){return te}});var i=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),a=r(d[4]),l=r(d[5]),c=r(d[6]),h=r(d[7]),f=r(d[8]),g=t(r(d[9])),u=t(r(d[10])),p=r(d[11]),m={L:"left",R:"right",T:"top",B:"bottom"},y={L:(0,h.__name)(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:(0,h.__name)(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:(0,h.__name)(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:(0,h.__name)(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},w={L:(0,h.__name)((e,t)=>e-t+2,"L"),R:(0,h.__name)((e,t)=>e-2,"R"),T:(0,h.__name)((e,t)=>e-t+2,"T"),B:(0,h.__name)((e,t)=>e-2,"B")},x=(0,h.__name)(function(e){return b(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),k=(0,h.__name)(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),b=(0,h.__name)(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),$=(0,h.__name)(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),_=(0,h.__name)(function(e,t){const i=b(e)&&$(t),n=$(e)&&b(t);return i||n},"isArchitectureDirectionXY"),v=(0,h.__name)(function(e){const t=e[0],i=e[1],n=b(t)&&$(i),s=$(t)&&b(i);return n||s},"isArchitecturePairXY"),E=(0,h.__name)(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),I=(0,h.__name)(function(e,t){const i=`${e}${t}`;return E(i)?i:void 0},"getArchitectureDirectionPair"),T=(0,h.__name)(function([e,t],i){const n=i[0],s=i[1];return b(n)?$(s)?[e+("L"===n?-1:1),t+("T"===s?1:-1)]:[e+("L"===n?-1:1),t]:b(s)?[e+("L"===s?1:-1),t+("T"===n?1:-1)]:[e,t+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),D=(0,h.__name)(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),j=(0,h.__name)(function(e,t){return _(e,t)?"bend":b(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),C=(0,h.__name)(function(e){return"service"===e.type},"isArchitectureService"),L=(0,h.__name)(function(e){return"junction"===e.type},"isArchitectureJunction"),S=(0,h.__name)(e=>e.data(),"edgeData"),A=(0,h.__name)(e=>e.data(),"nodeData"),B=l.defaultConfig_default.architecture,F=(e=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=l.setAccTitle,this.getAccTitle=l.getAccTitle,this.setDiagramTitle=l.setDiagramTitle,this.getDiagramTitle=l.getDiagramTitle,this.getAccDescription=l.getAccDescription,this.setAccDescription=l.setAccDescription,this.clear()}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,l.clear)()}addService({id:e,icon:t,in:i,title:n,iconText:s}){if(void 0!==this.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(void 0!==i){if(e===i)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:s,title:n,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(C)}addJunction({id:e,in:t}){if(void 0!==this.registeredIds[e])throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);if(void 0!==t){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(L)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:i,title:n}){if(void 0!==this.registeredIds?.[e])throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(void 0!==i){if(e===i)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===this.registeredIds?.[i])throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[i])throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:n,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:i,rhsDir:n,lhsInto:s,rhsInto:o,lhsGroup:a,rhsGroup:l,title:c}){if(!k(i))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(i)}`);if(!k(n))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const h=this.nodes[e].in,f=this.nodes[t].in;if(a&&h&&f&&h==f)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&h&&f&&h==f)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:e,lhsDir:i,lhsInto:s,lhsGroup:a,rhsId:t,rhsDir:n,rhsInto:o,rhsGroup:l,title:c};this.edges.push(g),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(i=>{if("node"!==this.registeredIds[i])throw new Error(`align ${e.direction} references [${i}], which is not a service or junction`);if(t.has(i))throw new Error(`align ${e.direction} lists [${i}] more than once`);t.add(i)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(void 0===this.dataStructures){const e={},t=Object.entries(this.nodes).reduce((t,[i,n])=>(t[i]=n.edges.reduce((t,n)=>{const s=this.getNode(n.lhsId)?.in,o=this.getNode(n.rhsId)?.in;if(s&&o&&s!==o){const t=j(n.lhsDir,n.rhsDir);"bend"!==t&&(e[s]??={},e[s][o]=t,e[o]??={},e[o][s]=t)}if(n.lhsId===i){const e=I(n.lhsDir,n.rhsDir);e&&(t[e]=n.rhsId)}else{const e=I(n.rhsDir,n.lhsDir);e&&(t[e]=n.lhsId)}return t},{}),t),{}),i=Object.keys(t)[0],n={[i]:1},s=Object.keys(t).reduce((e,t)=>t===i?e:Object.assign({},e,{[t]:1}),{}),o=(0,h.__name)(e=>{const i={[e]:[0,0]},o=[e];for(;o.length>0;){const e=o.shift();if(e){n[e]=1,delete s[e];const a=t[e],[l,c]=i[e];Object.entries(a).forEach(([e,t])=>{n[t]||(i[t]=T([l,c],e),o.push(t))})}}return i},"BFS"),a=[o(i)];for(;Object.keys(s).length>0;)a.push(o(Object.keys(s)[0]));this.dataStructures={adjList:t,spatialMaps:a,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return(0,a.cleanAndMerge)(Object.assign({},B,(0,l.getConfig)().architecture))}getConfigField(e){return this.getConfig()[e]}},(0,h.__name)(e,"ArchitectureDB"),e),M=(0,h.__name)((e,t)=>{(0,i.populateCommonDb)(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService(Object.assign({},e,{type:"service"}))),e.junctions.map(e=>t.addJunction(Object.assign({},e,{type:"junction"}))),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},"populateDb"),O={parser:{yy:void 0},parse:(0,h.__name)(async e=>{const t=await(0,f.parse)("architecture",e);c.log.debug(t);const i=O.parser?.yy;if(!(i instanceof F))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");M(t,i)},"parse")},z=(0,h.__name)(e=>`\n .edge {\n stroke-width: ${e.archEdgeWidth};\n stroke: ${e.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${e.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${e.archGroupBorderColor};\n stroke-width: ${e.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles");function R(e,t){if(0===e)return t();const i=Math.random;let n=e>>>0;Math.random=function(){n=n+1831565813>>>0;let e=n;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=i}}(0,h.__name)(R,"withSeededRandom");var G=(0,h.__name)(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),P={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:G('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:G('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:G('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:G('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:G('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:o.unknownIcon,blank:{body:G("")}}},H=(0,h.__name)(async function(e,t,i,n){const o=i.getConfigField("padding"),c=i.getConfigField("iconSize"),h=c/2,f=c/6,g=f/2;await Promise.all(t.edges().map(async t=>{const{source:c,sourceDir:u,sourceArrow:p,sourceGroup:m,target:x,targetDir:k,targetArrow:E,targetGroup:T,label:j}=S(t);let{x:C,y:L}=t[0].sourceEndpoint();const{x:A,y:B}=t[0].midpoint();let{x:F,y:M}=t[0].targetEndpoint();const O=o+4;if(m&&(b(u)?C+="L"===u?-O:O:L+="T"===u?-O:O+18),T&&(b(k)?F+="L"===k?-O:O:M+="T"===k?-O:O+18),m||"junction"!==i.getNode(c)?.type||(b(u)?C+="L"===u?h:-h:L+="T"===u?h:-h),T||"junction"!==i.getNode(x)?.type||(b(k)?F+="L"===k?h:-h:M+="T"===k?h:-h),t[0]._private.rscratch){const t=e.insert("g");if(t.insert("path").attr("d",`M ${C},${L} L ${A},${B} L${F},${M} `).attr("class","edge").attr("id",`${n}-${(0,a.getEdgeId)(c,x,{prefix:"L"})}`),p){const e=b(u)?w[u](C,f):C-g,i=$(u)?w[u](L,f):L-g;t.insert("polygon").attr("points",y[u](f)).attr("transform",`translate(${e},${i})`).attr("class","arrow")}if(E){const e=b(k)?w[k](F,f):F-g,i=$(k)?w[k](M,f):M-g;t.insert("polygon").attr("points",y[k](f)).attr("transform",`translate(${e},${i})`).attr("class","arrow")}if(j){const e=_(u,k)?"XY":b(u)?"X":"Y";let i=0;i="X"===e?Math.abs(C-F):"Y"===e?Math.abs(L-M)/1.5:Math.abs(C-F)/2;const n=t.append("g");if(await(0,s.createText)(n,j,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,l.getConfig2)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===e)n.attr("transform","translate("+A+", "+B+")");else if("Y"===e)n.attr("transform","translate("+A+", "+B+") rotate(-90)");else if("XY"===e){const e=I(u,k);if(e&&v(e)){const t=n.node().getBoundingClientRect(),[i,s]=D(e);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*s*45})`);const o=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${A}, ${B-t.height/2})\n translate(${i*o.width/2}, ${s*o.height/2})\n rotate(${-1*i*s*45}, 0, ${t.height/2})\n `)}}}}}))},"drawEdges"),N=(0,h.__name)(async function(e,t,i,n){const a=.75*i.getConfigField("padding"),c=i.getConfigField("fontSize"),h=i.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async t=>{const f=A(t);if("group"===f.type){const{h:g,w:u,x1:p,y1:m}=t.boundingBox(),y=e.append("rect");y.attr("id",`${n}-group-${f.id}`).attr("x",p+h).attr("y",m+h).attr("width",u).attr("height",g).attr("class","node-bkg");const w=e.append("g");let x=p,k=m;if(f.icon){const e=w.append("g");e.html(`<g>${await(0,o.getIconSVG)(f.icon,{height:a,width:a,fallbackPrefix:P.prefix})}</g>`),e.attr("transform","translate("+(x+h+1)+", "+(k+h+1)+")"),x+=a,k+=c/2-1-2}if(f.label){const e=w.append("g");await(0,s.createText)(e,f.label,{useHtmlLabels:!1,width:u,classes:"architecture-service-label"},(0,l.getConfig2)()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),e.attr("transform","translate("+(x+h+4)+", "+(k+h+2)+")")}i.setElementForId(f.id,y)}}))},"drawGroups"),X=(0,h.__name)(async function(e,t,i,n){const a=(0,l.getConfig2)();for(const c of i){const i=t.append("g"),h=e.getConfigField("iconSize");if(c.title){const e=i.append("g");await(0,s.createText)(e,c.title,{useHtmlLabels:!1,width:1.5*h,classes:"architecture-service-label"},a),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+h/2+", "+h+")")}const f=i.append("g");if(c.icon)f.html(`<g>${await(0,o.getIconSVG)(c.icon,{height:h,width:h,fallbackPrefix:P.prefix})}</g>`);else if(c.iconText){f.html(`<g>${await(0,o.getIconSVG)("blank",{height:h,width:h,fallbackPrefix:P.prefix})}</g>`);const e=f.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html((0,l.sanitizeText)(c.iconText,a)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;e.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/t)};`)}else f.append("path").attr("class","node-bkg").attr("id",`${n}-node-${c.id}`).attr("d",`M0,${h} V5 Q0,0 5,0 H${h-5} Q${h},0 ${h},5 V${h} Z`);i.attr("id",`${n}-service-${c.id}`).attr("class","architecture-service");const{width:g,height:u}=i.node().getBBox();c.width=g,c.height=u,e.setElementForId(c.id,i)}return 0},"drawServices"),Y=(0,h.__name)(function(e,t,i,n){i.forEach(i=>{const s=t.append("g"),o=e.getConfigField("iconSize");s.append("g").append("rect").attr("id",`${n}-node-${i.id}`).attr("fill-opacity","0").attr("width",o).attr("height",o),s.attr("class","architecture-junction");const{width:a,height:l}=s._groups[0][0].getBBox();s.width=a,s.height=l,e.setElementForId(i.id,s)})},"drawJunctions");function Z(e,t,i){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-service"})})}function V(e,t,i){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-junction"})})}function J(e,t){t.nodes().map(t=>{const i=A(t);if("group"===i.type)return;i.x=t.position().x,i.y=t.position().y;e.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")})}function q(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function W(e,t){e.forEach(e=>{const{lhsId:i,rhsId:n,lhsInto:s,lhsGroup:o,rhsInto:a,lhsDir:l,rhsDir:c,rhsGroup:h,title:f}=e,g=_(e.lhsDir,e.rhsDir)?"segments":"straight",u={id:`${i}-${n}`,label:f,source:i,sourceDir:l,sourceArrow:s,sourceGroup:o,sourceEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%",target:n,targetDir:c,targetArrow:a,targetGroup:h,targetEndpoint:"L"===c?"0 50%":"R"===c?"100% 50%":"T"===c?"50% 0":"50% 100%"};t.add({group:"edges",data:u,classes:g})})}function Q(e,t,i,n=[]){const s=(0,h.__name)((e,t)=>Object.entries(e).reduce((e,[n,s])=>{let o=0;const a=Object.entries(s);if(1===a.length)return e[n]=a[0][1],e;for(let s=0;s<a.length-1;s++)for(let l=s+1;l<a.length;l++){const[c,h]=a[s],[f,g]=a[l],u=i[c]?.[f];if(u===t)e[n]??=[],e[n]=[...e[n],...h,...g];else if("default"===c||"default"===f)e[n]??=[],e[n]=[...e[n],...h,...g];else{e[`${n}-${o++}`]=h;e[`${n}-${o++}`]=g}}return e},{}),"flattenAlignments"),o=t.map(t=>{const i={},n={};return Object.entries(t).forEach(([t,[s,o]])=>{const a=e.getNode(t)?.in??"default";i[o]??={},i[o][a]??=[],i[o][a].push(t),n[s]??={},n[s][a]??=[],n[s][a].push(t)}),{horiz:Object.values(s(i,"horizontal")).filter(e=>e.length>1),vert:Object.values(s(n,"vertical")).filter(e=>e.length>1)}}),[a,l]=o.reduce(([e,t],{horiz:i,vert:n})=>[[...e,...i],[...t,...n]],[[],[]]),c=new Set;n.forEach(e=>e.members.forEach(e=>c.add(e)));const f=(0,h.__name)(e=>e.filter(e=>!e.some(e=>c.has(e))),"dropOverlapping"),g=f(a),u=f(l);return n.forEach(e=>{e.members.length<2||("row"===e.direction?g.push([...e.members]):u.push([...e.members]))}),{horizontal:g,vertical:u}}function K(e,t,i=[]){const n=[],s=t.getConfigField("iconSize"),o=t.getConfigField("idealEdgeLengthMultiplier"),a=o*s,l=new Set;i.forEach(e=>{for(let t=0;t<e.members.length-1;t++){const i=e.members[t],s=e.members[t+1];l.add(`${i}|${s}`),l.add(`${s}|${i}`),"row"===e.direction?n.push({left:i,right:s,gap:a}):n.push({top:i,bottom:s,gap:a})}});const c=(0,h.__name)(e=>`${e[0]},${e[1]}`,"posToStr"),f=(0,h.__name)(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{const t=Object.fromEntries(Object.entries(e).map(([e,t])=>[c(t),e])),i=[c([0,0])],a={},h={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;i.length>0;){const e=i.shift();if(e){a[e]=1;const g=t[e];if(g){const u=f(e);Object.entries(h).forEach(([e,h])=>{const f=c([u[0]+h[0],u[1]+h[1]]),p=t[f];if(p&&!a[f]){if(i.push(f),l.has(`${g}|${p}`))return;n.push({[m[e]]:p,[m[x(e)]]:g,gap:o*s})}})}}}}),n}function U(e,t,i,n,s,{spatialMaps:o,groupAlignments:a}){return new Promise(l=>{const f=(0,p.select)("body").append("div").attr("id","cy").attr("style","display:none"),u=(0,g.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${s.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${s.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),q(i,u),Z(e,u,s),V(t,u,s),W(n,u);const m=s.getLayoutHints(),y=Q(s,o,a,m),w=K(o,s,m),x=s.getConfigField("iconSize"),k=s.getConfigField("idealEdgeLengthMultiplier")*x,b=.5*x,_=s.getConfigField("edgeElasticity"),v=s.getConfigField("seed"),E=u.layout({name:"fcose",quality:"proof",randomize:s.getConfigField("randomize"),nodeSeparation:s.getConfigField("nodeSeparation"),numIter:s.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){const[t,i]=e.connectedNodes(),{parent:n}=A(t),{parent:s}=A(i);return n===s?k:b},edgeElasticity(e){const[t,i]=e.connectedNodes(),{parent:n}=A(t),{parent:s}=A(i);return n===s?_:.001},alignmentConstraint:y,relativePlacementConstraint:w});E.one("layoutstop",()=>{function e(e,t,i,n){let s,o;const{x:a,y:l}=e,{x:c,y:h}=t;o=(n-l+(a-i)*(l-h)/(a-c))/Math.sqrt(1+Math.pow((l-h)/(a-c),2)),s=Math.sqrt(Math.pow(n-l,2)+Math.pow(i-a,2)-Math.pow(o,2));s/=Math.sqrt(Math.pow(c-a,2)+Math.pow(h-l,2));let f=(c-a)*(n-l)-(h-l)*(i-a);switch(!0){case f>=0:f=1;break;case f<0:f=-1}let g=(c-a)*(i-a)+(h-l)*(n-l);switch(!0){case g>=0:g=1;break;case g<0:g=-1}return o=Math.abs(o)*f,s*=g,{distances:o,weights:s}}(0,h.__name)(e,"getSegmentWeights"),u.startBatch();for(const t of Object.values(u.edges()))if(t.data?.()){const{x:i,y:n}=t.source().position(),{x:s,y:o}=t.target().position();if(i!==s&&n!==o){const i=t.sourceEndpoint(),n=t.targetEndpoint(),{sourceDir:s}=S(t),[o,a]=$(s)?[i.x,n.y]:[n.x,i.y],{weights:l,distances:c}=e(i,n,o,a);t.style("segment-distances",c),t.style("segment-weights",l)}}u.endBatch(),R(v,()=>E.run())});try{R(v,()=>E.run())}catch(e){if(e instanceof RangeError&&e.message.includes("Invalid array length"))throw new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw e}u.ready(e=>{c.log.info("Ready",e),l(u)})})}(0,o.registerIconPacks)([{name:P.prefix,icons:P}]),g.default.use(u.default),(0,h.__name)(Z,"addServices"),(0,h.__name)(V,"addJunctions"),(0,h.__name)(J,"positionNodes"),(0,h.__name)(q,"addGroups"),(0,h.__name)(W,"addEdges"),(0,h.__name)(Q,"getAlignments"),(0,h.__name)(K,"getRelativeConstraints"),(0,h.__name)(U,"layoutArchitecture");var ee={draw:(0,h.__name)(async(e,t,i,s)=>{const o=s.db;o.setDiagramId(t);const a=o.getServices(),c=o.getJunctions(),h=o.getGroups(),f=o.getEdges(),g=o.getDataStructures(),u=(0,n.selectSvgElement)(t),p=u.append("g");p.attr("class","architecture-edges");const m=u.append("g");m.attr("class","architecture-services");const y=u.append("g");y.attr("class","architecture-groups"),await X(o,m,a,t),Y(o,m,c,t);const w=await U(a,c,h,f,o,g);await H(p,w,o,t),await N(y,w,o,t),J(o,w),(0,l.setupGraphViewbox)(void 0,u,o.getConfigField("padding"),o.getConfigField("useMaxWidth"))},"draw")},te={parser:O,get db(){return new F},renderer:ee,styles:z}},3310,[5153,3267,3275,3276,3277,3278,3279,3280,5152,5130,5329,3282]);
2
- __d(function(g,r,_i0,a,m,_e2,d){var e,n;e=this,n=function(e){return(()=>{"use strict";var n={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];return t.forEach(function(n){Object.keys(n).forEach(function(t){return e[t]=n[t]})}),e}},548:(e,n,t)=>{var o=(function(){function e(e,n){var t=[],o=!0,i=!1,s=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done)&&(t.push(l.value),!n||t.length!==n);o=!0);}catch(e){i=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=t(140).layoutBase.LinkedList,s={getTopMostNodes:function(e){for(var n={},t=0;t<e.length;t++)n[e[t].id()]=!0;var o=e.filter(function(e,t){"number"==typeof e&&(e=t);for(var o=e.parent()[0];null!=o;){if(n[o.id()])return!1;o=o.parent()[0]}return!0});return o},connectComponents:function(e,n,t,o){var s=new i,l=new Set,c=[],u=void 0,f=void 0,h=void 0,E=!1,p=1,v=[],y=[],N=function(){var o=e.collection();y.push(o);var i=t[0],N=e.collection();N.merge(i).merge(i.descendants().intersection(n)),c.push(i),N.forEach(function(e){s.push(e),l.add(e),o.merge(e)});for(var C=function(){i=s.shift();var f=e.collection();i.neighborhood().nodes().forEach(function(e){n.intersection(i.edgesWith(e)).length>0&&f.merge(e)});for(var h=0;h<f.length;h++){var E=f[h];null==(u=t.intersection(E.union(E.ancestors())))||l.has(u[0])||u.union(u.descendants()).forEach(function(e){s.push(e),l.add(e),o.merge(e),t.has(e)&&c.push(e)})}};0!=s.length;)C();if(o.forEach(function(e){n.intersection(e.connectedEdges()).forEach(function(e){o.has(e.source())&&o.has(e.target())&&o.merge(e)})}),c.length==t.length&&(E=!0),!E||E&&p>1){f=c[0],h=f.connectedEdges().length,c.forEach(function(e){e.connectedEdges().length<h&&(h=e.connectedEdges().length,f=e)}),v.push(f.id());var T=e.collection();T.merge(c[0]),c.forEach(function(e){T.merge(e)}),c=[],t=t.difference(T),p++}};do{N()}while(!E);return o&&v.length>0&&o.set('dummy'+(o.size+1),v),y},relocateComponent:function(e,n,t){if(!t.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if("draft"==t.quality){var u=!0,f=!1,h=void 0;try{for(var E,p=n.nodeIndexes[Symbol.iterator]();!(u=(E=p.next()).done);u=!0){var v=E.value,y=o(v,2),N=y[0],C=y[1],T=t.cy.getElementById(N);if(T){var I=T.boundingBox(),_=n.xCoords[C]-I.w/2,L=n.xCoords[C]+I.w/2,A=n.yCoords[C]-I.h/2,x=n.yCoords[C]+I.h/2;_<i&&(i=_),L>s&&(s=L),A<l&&(l=A),x>c&&(c=x)}}}catch(e){f=!0,h=e}finally{try{!u&&p.return&&p.return()}finally{if(f)throw h}}var R=e.x-(s+i)/2,O=e.y-(c+l)/2;n.xCoords=n.xCoords.map(function(e){return e+R}),n.yCoords=n.yCoords.map(function(e){return e+O})}else{Object.keys(n).forEach(function(e){var t=n[e],o=t.getRect().x,u=t.getRect().x+t.getRect().width,f=t.getRect().y,h=t.getRect().y+t.getRect().height;o<i&&(i=o),u>s&&(s=u),f<l&&(l=f),h>c&&(c=h)});var b=e.x-(s+i)/2,D=e.y-(c+l)/2;Object.keys(n).forEach(function(e){var t=n[e];t.setCenter(t.getCenterX()+b,t.getCenterY()+D)})}}},calcBoundingBox:function(e,n,t,o){for(var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=void 0,f=void 0,h=void 0,E=void 0,p=e.descendants().not(":parent"),v=p.length,y=0;y<v;y++){var N=p[y];i>(u=n[o.get(N.id())]-N.width()/2)&&(i=u),s<(f=n[o.get(N.id())]+N.width()/2)&&(s=f),l>(h=t[o.get(N.id())]-N.height()/2)&&(l=h),c<(E=t[o.get(N.id())]+N.height()/2)&&(c=E)}var C={};return C.topLeftX=i,C.topLeftY=l,C.width=s-i,C.height=c-l,C},calcParentsWithoutChildren:function(e,n){var t=e.collection();return n.nodes(':parent').forEach(function(e){var n=!1;e.children().forEach(function(e){'none'!=e.css('display')&&(n=!0)}),n||t.merge(e)}),t}};e.exports=s},816:(e,n,t)=>{var o=t(548),i=t(140).CoSELayout,s=t(140).CoSENode,l=t(140).layoutBase.PointD,c=t(140).layoutBase.DimensionD,u=t(140).layoutBase.LayoutConstants,f=t(140).layoutBase.FDLayoutConstants,h=t(140).CoSEConstants;e.exports={coseLayout:function(e,n){var t=e.cy,E=e.eles,p=E.nodes(),v=E.edges(),y=void 0,N=void 0,C=void 0,T={};e.randomize&&(y=n.nodeIndexes,N=n.xCoords,C=n.yCoords);var I=function(e){return'function'==typeof e},_=function(e,n){return I(e)?e(n):e},L=o.calcParentsWithoutChildren(t,E);null!=e.nestingFactor&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(h.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(h.MAX_ITERATIONS=f.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),null!=e.tilingCompareBy&&(h.TILING_COMPARE_BY=e.tilingCompareBy),'proof'==e.quality?u.QUALITY=2:u.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!e.randomize,h.ANIMATE=f.ANIMATE=u.ANIMATE=e.animate,h.TILE=e.tile,h.TILING_PADDING_VERTICAL='function'==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL='function'==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!e.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,"transformed"==e.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),"enforced"==e.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),"cose"==e.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),"all"==e.step&&(e.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var A=new i,x=A.newGraphManager();return(function e(n,t,i,u){for(var f=t.length,h=0;h<f;h++){var E=t[h],p=null;0==E.intersection(L).length&&(p=E.children());var v=void 0,I=E.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(null!=E.outerWidth()&&null!=E.outerHeight())if(u.randomize)if(E.isParent()){var A=o.calcBoundingBox(E,N,C,y);v=0==E.intersection(L).length?n.add(new s(i.graphManager,new l(A.topLeftX,A.topLeftY),new c(A.width,A.height))):n.add(new s(i.graphManager,new l(A.topLeftX,A.topLeftY),new c(parseFloat(I.w),parseFloat(I.h))))}else v=n.add(new s(i.graphManager,new l(N[y.get(E.id())]-I.w/2,C[y.get(E.id())]-I.h/2),new c(parseFloat(I.w),parseFloat(I.h))));else v=n.add(new s(i.graphManager,new l(E.position('x')-I.w/2,E.position('y')-I.h/2),new c(parseFloat(I.w),parseFloat(I.h))));else v=n.add(new s(this.graphManager));v.id=E.data("id"),v.nodeRepulsion=_(u.nodeRepulsion,E),v.paddingLeft=parseInt(E.css('padding')),v.paddingTop=parseInt(E.css('padding')),v.paddingRight=parseInt(E.css('padding')),v.paddingBottom=parseInt(E.css('padding')),u.nodeDimensionsIncludeLabels&&(v.labelWidth=E.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,v.labelHeight=E.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,v.labelPosVertical=E.css("text-valign"),v.labelPosHorizontal=E.css("text-halign")),T[E.data("id")]=v,isNaN(v.rect.x)&&(v.rect.x=0),isNaN(v.rect.y)&&(v.rect.y=0),null!=p&&p.length>0&&e(i.getGraphManager().add(i.newGraph(),v),p,i,u)}})(x.addRoot(),o.getTopMostNodes(p),A,e),(function(n,t,o){for(var i=0,s=0,l=0;l<o.length;l++){var c=o[l],u=T[c.data("source")],E=T[c.data("target")];if(u&&E&&u!==E&&0==u.getEdgesBetween(E).length){var p=t.add(n.newEdge(),u,E);p.id=c.id(),p.idealLength=_(e.idealEdgeLength,c),p.edgeElasticity=_(e.edgeElasticity,c),i+=p.idealLength,s++}}null!=e.idealEdgeLength&&(s>0?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=i/s:I(e.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,h.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)})(A,x,v),(function(e,n){n.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=n.fixedNodeConstraint),n.alignmentConstraint&&(e.constraints.alignmentConstraint=n.alignmentConstraint),n.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=n.relativePlacementConstraint)})(A,e),A.runLayout(),T}}},212:(e,n,t)=>{var o=(function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}})();function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var s=t(658),l=t(548),c=t(657).spectralLayout,u=t(816).coseLayout,f=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(e){return 4500},idealEdgeLength:function(e){return 50},edgeElasticity:function(e){return.45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),h=(function(){function e(n){i(this,e),this.options=s({},f,n)}return o(e,[{key:'run',value:function(){var e=this.options,n=e.cy,t=e.eles,o=[],i=[],s=void 0,f=[];!e.fixedNodeConstraint||Array.isArray(e.fixedNodeConstraint)&&0!=e.fixedNodeConstraint.length||(e.fixedNodeConstraint=void 0),e.alignmentConstraint&&(!e.alignmentConstraint.vertical||Array.isArray(e.alignmentConstraint.vertical)&&0!=e.alignmentConstraint.vertical.length||(e.alignmentConstraint.vertical=void 0),!e.alignmentConstraint.horizontal||Array.isArray(e.alignmentConstraint.horizontal)&&0!=e.alignmentConstraint.horizontal.length||(e.alignmentConstraint.horizontal=void 0)),!e.relativePlacementConstraint||Array.isArray(e.relativePlacementConstraint)&&0!=e.relativePlacementConstraint.length||(e.relativePlacementConstraint=void 0),(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint)&&(e.tile=!1,e.packComponents=!1);var h=void 0,E=!1;if(n.layoutUtilities&&e.packComponents&&((h=n.layoutUtilities("get"))||(h=n.layoutUtilities()),E=!0),t.nodes().length>0)if(E){var p=l.getTopMostNodes(e.eles.nodes());if((s=l.connectComponents(n,e.eles,p)).forEach(function(e){var n=e.boundingBox();f.push({x:n.x1+n.w/2,y:n.y1+n.h/2})}),e.randomize&&s.forEach(function(n){e.eles=n,o.push(c(e))}),"default"==e.quality||"proof"==e.quality){var v=n.collection();if(e.tile){var y=new Map,N=0,C={nodeIndexes:y,xCoords:[],yCoords:[]},T=[];if(s.forEach(function(e,n){0==e.edges().length&&(e.nodes().forEach(function(n,t){v.merge(e.nodes()[t]),n.isParent()||(C.nodeIndexes.set(e.nodes()[t].id(),N++),C.xCoords.push(e.nodes()[0].position().x),C.yCoords.push(e.nodes()[0].position().y))}),T.push(n))}),v.length>1){var I=v.boundingBox();f.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),s.push(v),o.push(C);for(var _=T.length-1;_>=0;_--)s.splice(T[_],1),o.splice(T[_],1),f.splice(T[_],1)}}s.forEach(function(n,t){e.eles=n,i.push(u(e,o[t])),l.relocateComponent(f[t],i[t],e)})}else s.forEach(function(n,t){l.relocateComponent(f[t],o[t],e)});var L=new Set;if(s.length>1){var A=[],x=t.filter(function(e){return'none'==e.css('display')});s.forEach(function(n,t){var s=void 0;if("draft"==e.quality&&(s=o[t].nodeIndexes),n.nodes().not(x).length>0){var c={edges:[],nodes:[]},u=void 0;n.nodes().not(x).forEach(function(n){if("draft"==e.quality)if(n.isParent()){var f=l.calcBoundingBox(n,o[t].xCoords,o[t].yCoords,s);c.nodes.push({x:f.topLeftX,y:f.topLeftY,width:f.width,height:f.height})}else u=s.get(n.id()),c.nodes.push({x:o[t].xCoords[u]-n.boundingbox().w/2,y:o[t].yCoords[u]-n.boundingbox().h/2,width:n.boundingbox().w,height:n.boundingbox().h});else i[t][n.id()]&&c.nodes.push({x:i[t][n.id()].getLeft(),y:i[t][n.id()].getTop(),width:i[t][n.id()].getWidth(),height:i[t][n.id()].getHeight()})}),n.edges().forEach(function(n){var u=n.source(),f=n.target();if("none"!=u.css("display")&&"none"!=f.css("display"))if("draft"==e.quality){var h=s.get(u.id()),E=s.get(f.id()),p=[],v=[];if(u.isParent()){var y=l.calcBoundingBox(u,o[t].xCoords,o[t].yCoords,s);p.push(y.topLeftX+y.width/2),p.push(y.topLeftY+y.height/2)}else p.push(o[t].xCoords[h]),p.push(o[t].yCoords[h]);if(f.isParent()){var N=l.calcBoundingBox(f,o[t].xCoords,o[t].yCoords,s);v.push(N.topLeftX+N.width/2),v.push(N.topLeftY+N.height/2)}else v.push(o[t].xCoords[E]),v.push(o[t].yCoords[E]);c.edges.push({startX:p[0],startY:p[1],endX:v[0],endY:v[1]})}else i[t][u.id()]&&i[t][f.id()]&&c.edges.push({startX:i[t][u.id()].getCenterX(),startY:i[t][u.id()].getCenterY(),endX:i[t][f.id()].getCenterX(),endY:i[t][f.id()].getCenterY()})}),c.nodes.length>0&&(A.push(c),L.add(t))}});var R=h.packComponents(A,e.randomize).shifts;if("draft"==e.quality)o.forEach(function(e,n){var t=e.xCoords.map(function(e){return e+R[n].dx}),o=e.yCoords.map(function(e){return e+R[n].dy});e.xCoords=t,e.yCoords=o});else{var O=0;L.forEach(function(e){Object.keys(i[e]).forEach(function(n){var t=i[e][n];t.setCenter(t.getCenterX()+R[O].dx,t.getCenterY()+R[O].dy)}),O++})}}}else{var b=e.eles.boundingBox();if(f.push({x:b.x1+b.w/2,y:b.y1+b.h/2}),e.randomize){var D=c(e);o.push(D)}"default"==e.quality||"proof"==e.quality?(i.push(u(e,o[0])),l.relocateComponent(f[0],i[0],e)):l.relocateComponent(f[0],o[0],e)}var M=function(n,t){if("default"==e.quality||"proof"==e.quality){"number"==typeof n&&(n=t);var s=void 0,l=void 0,c=n.data('id');return i.forEach(function(e){c in e&&(s={x:e[c].getRect().getCenterX(),y:e[c].getRect().getCenterY()},l=e[c])}),e.nodeDimensionsIncludeLabels&&(l.labelWidth&&("left"==l.labelPosHorizontal?s.x+=l.labelWidth/2:"right"==l.labelPosHorizontal&&(s.x-=l.labelWidth/2)),l.labelHeight&&("top"==l.labelPosVertical?s.y+=l.labelHeight/2:"bottom"==l.labelPosVertical&&(s.y-=l.labelHeight/2))),null==s&&(s={x:n.position("x"),y:n.position("y")}),{x:s.x,y:s.y}}var u=void 0;return o.forEach(function(e){var t=e.nodeIndexes.get(n.id());null!=t&&(u={x:e.xCoords[t],y:e.yCoords[t]})}),null==u&&(u={x:n.position("x"),y:n.position("y")}),{x:u.x,y:u.y}};if("default"==e.quality||"proof"==e.quality||e.randomize){var P=l.calcParentsWithoutChildren(n,t),F=t.filter(function(e){return'none'==e.css('display')});e.eles=t.not(F),t.nodes().not(":parent").not(F).layoutPositions(this,e,M),P.length>0&&P.forEach(function(e){e.position(M(e))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),e})();e.exports=h},657:(e,n,t)=>{var o=t(548),i=t(140).layoutBase.Matrix,s=t(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var n=e.cy,t=e.eles,l=t.nodes(),c=t.nodes(":parent"),u=new Map,f=new Map,h=new Map,E=[],p=[],v=[],y=[],N=[],C=[],T=[],I=[],_=void 0,L=1e8,A=1e-9,x=e.piTol,R=e.samplingType,O=e.nodeSeparation,b=void 0,D=function(){for(var e=0,n=0,t=!1;n<b;){e=Math.floor(Math.random()*_),t=!1;for(var o=0;o<n;o++)if(y[o]==e){t=!0;break}t||(y[n]=e,n++)}},M=function(e,n,t){for(var o=[],i=0,s=0,l=0,c=void 0,u=[],h=0,p=1,v=0;v<_;v++)u[v]=L;for(o[s]=e,u[e]=0;s>=i;){l=o[i++];for(var y=E[l],T=0;T<y.length;T++)u[c=f.get(y[T])]==L&&(u[c]=u[l]+1,o[++s]=c);C[l][n]=u[l]*O}if(t){for(var I=0;I<_;I++)C[I][n]<N[I]&&(N[I]=C[I][n]);for(var A=0;A<_;A++)N[A]>h&&(h=N[A],p=A)}return p};o.connectComponents(n,t,o.getTopMostNodes(l),u),c.forEach(function(e){o.connectComponents(n,t,o.getTopMostNodes(e.descendants().intersection(t)),u)});for(var P=0,F=0;F<l.length;F++)l[F].isParent()||f.set(l[F].id(),P++);var S=!0,G=!1,w=void 0;try{for(var U,B=u.keys()[Symbol.iterator]();!(S=(U=B.next()).done);S=!0){var Y=U.value;f.set(Y,P++)}}catch(e){G=!0,w=e}finally{try{!S&&B.return&&B.return()}finally{if(G)throw w}}for(var z=0;z<f.size;z++)E[z]=[];c.forEach(function(e){for(var n=e.children().intersection(t);0==n.nodes(":childless").length;)n=n.nodes()[0].children().intersection(t);var o=0,i=n.nodes(":childless")[0].connectedEdges().length;n.nodes(":childless").forEach(function(e,n){e.connectedEdges().length<i&&(i=e.connectedEdges().length,o=n)}),h.set(e.id(),n.nodes(":childless")[o].id())}),l.forEach(function(e){var n=void 0;n=e.isParent()?f.get(h.get(e.id())):f.get(e.id()),e.neighborhood().nodes().forEach(function(o){t.intersection(e.edgesWith(o)).length>0&&(o.isParent()?E[n].push(h.get(o.id())):E[n].push(o.id()))})});var H=function(e){var t=f.get(e),o=void 0;u.get(e).forEach(function(i){o=n.getElementById(i).isParent()?h.get(i):i,E[t].push(o),E[f.get(o)].push(e)})},V=!0,q=!1,X=void 0;try{for(var k,j=u.keys()[Symbol.iterator]();!(V=(k=j.next()).done);V=!0)H(k.value)}catch(e){q=!0,X=e}finally{try{!V&&j.return&&j.return()}finally{if(q)throw X}}var W=void 0;if((_=f.size)>2){b=_<e.sampleSize?_:e.sampleSize;for(var Q=0;Q<_;Q++)C[Q]=[];for(var Z=0;Z<b;Z++)I[Z]=[];return"draft"==e.quality||"all"==e.step?((function(e){var n=void 0;if(e){n=Math.floor(Math.random()*_);for(var t=0;t<_;t++)N[t]=L;for(var o=0;o<b;o++)y[o]=n,n=M(n,o,e)}else{D();for(var i=0;i<b;i++)M(y[i],i,e)}for(var s=0;s<_;s++)for(var l=0;l<b;l++)C[s][l]*=C[s][l];for(var c=0;c<b;c++)T[c]=[];for(var u=0;u<b;u++)for(var f=0;f<b;f++)T[u][f]=C[y[f]][u]})(R),(function(){for(var e=s.svd(T),n=e.S,t=e.U,o=e.V,l=n[0]*n[0]*n[0],c=[],u=0;u<b;u++){c[u]=[];for(var f=0;f<b;f++)c[u][f]=0,u==f&&(c[u][f]=n[u]/(n[u]*n[u]+l/(n[u]*n[u])))}I=i.multMat(i.multMat(o,c),i.transpose(t))})(),(function(){for(var e=void 0,n=void 0,t=[],o=[],s=[],l=[],c=0;c<_;c++)t[c]=Math.random(),o[c]=Math.random();t=i.normalize(t),o=i.normalize(o);for(var u=A,f=A,h=void 0;;){for(var E=0;E<_;E++)s[E]=t[E];if(t=i.multGamma(i.multL(i.multGamma(s),C,I)),e=i.dotProduct(s,t),t=i.normalize(t),u=i.dotProduct(s,t),(h=Math.abs(u/f))<=1+x&&h>=1)break;f=u}for(var y=0;y<_;y++)s[y]=t[y];for(f=A;;){for(var N=0;N<_;N++)l[N]=o[N];if(l=i.minusOp(l,i.multCons(s,i.dotProduct(s,l))),o=i.multGamma(i.multL(i.multGamma(l),C,I)),n=i.dotProduct(l,o),o=i.normalize(o),u=i.dotProduct(l,o),(h=Math.abs(u/f))<=1+x&&h>=1)break;f=u}for(var T=0;T<_;T++)l[T]=o[T];p=i.multCons(s,Math.sqrt(Math.abs(e))),v=i.multCons(l,Math.sqrt(Math.abs(n)))})(),W={nodeIndexes:f,xCoords:p,yCoords:v}):(f.forEach(function(e,t){p.push(n.getElementById(t).position("x")),v.push(n.getElementById(t).position("y"))}),W={nodeIndexes:f,xCoords:p,yCoords:v}),W}var J=f.keys(),K=n.getElementById(J.next().value),$=K.position(),ee=K.outerWidth();if(p.push($.x),v.push($.y),2==_){var ne=n.getElementById(J.next().value).outerWidth();p.push($.x+ee/2+ne/2+e.idealEdgeLength),v.push($.y)}return W={nodeIndexes:f,xCoords:p,yCoords:v}}}},579:(e,n,t)=>{var o=t(212),i=function(e){e&&e('layout','fcose',o)};'undefined'!=typeof cytoscape&&i(cytoscape),e.exports=i},140:n=>{n.exports=e}},t={},o=(function e(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return n[o](s,s.exports,e),s.exports})(579);return o})()},'object'==typeof _e2&&'object'==typeof m?m.exports=n(r(d[0])):'function'==typeof define&&define.amd?define(["cose-base"],n):'object'==typeof _e2?_e2.cytoscapeFcose=n(r(d[0])):e.cytoscapeFcose=n(e.coseBase)},5329,[5330]);
3
- __d(function(g,_r,_i0,a,m,e,d){var t,i;t=this,i=function(t){return(()=>{"use strict";var i={45:(t,i,o)=>{var n={};n.layoutBase=o(551),n.CoSEConstants=o(806),n.CoSEEdge=o(767),n.CoSEGraph=o(880),n.CoSEGraphManager=o(578),n.CoSELayout=o(765),n.CoSENode=o(991),n.ConstraintHandler=o(902),t.exports=n},806:(t,i,o)=>{var n=o(551).FDLayoutConstants;function r(){}for(var s in n)r[s]=n[s];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,t.exports=r},767:(t,i,o)=>{var n=o(551).FDLayoutEdge;function r(t,i,o){n.call(this,t,i,o)}for(var s in r.prototype=Object.create(n.prototype),n)r[s]=n[s];t.exports=r},880:(t,i,o)=>{var n=o(551).LGraph;function r(t,i,o){n.call(this,t,i,o)}for(var s in r.prototype=Object.create(n.prototype),n)r[s]=n[s];t.exports=r},578:(t,i,o)=>{var n=o(551).LGraphManager;function r(t){n.call(this,t)}for(var s in r.prototype=Object.create(n.prototype),n)r[s]=n[s];t.exports=r},765:(t,i,o)=>{var n=o(551).FDLayout,r=o(578),s=o(880),h=o(991),l=o(767),c=o(806),p=o(902),f=o(551).FDLayoutConstants,u=o(551).LayoutConstants,v=o(551).Point,T=o(551).PointD,N=o(551).DimensionD,E=o(551).Layout,y=o(551).Integer,C=o(551).IGeometry,M=o(551).LGraph,w=o(551).Transform,A=o(551).LinkedList;function I(){n.call(this),this.toBeTiled={},this.constraints={}}for(var L in I.prototype=Object.create(n.prototype),n)I[L]=n[L];I.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},I.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},I.prototype.newNode=function(t){return new h(this.graphManager,t)},I.prototype.newEdge=function(t){return new l(null,null,t)},I.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},I.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},I.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},I.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)c.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),i=new Set(this.getAllNodes()),o=this.nodesWithGravity.filter(function(t){return i.has(t)}),this.graphManager.setAllNodesToApplyGravitation(o));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var i=new Set(this.getAllNodes()),o=this.nodesWithGravity.filter(function(t){return i.has(t)});this.graphManager.setAllNodesToApplyGravitation(o),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(p.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},I.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%f.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(),c.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=f.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()),c.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var o=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(o,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},I.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),i={},o=0;o<t.length;o++){var n=t[o].rect,r=t[o].id;i[r]={id:r,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return i},I.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if('during'===f.ANIMATE)this.emit('layoutstarted');else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},I.prototype.moveNodes=function(){for(var t=this.getAllNodes(),i=0;i<t.length;i++)t[i].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),i=0;i<t.length;i++)t[i].move()},I.prototype.initConstraintVariables=function(){var t=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var i=this.graphManager.getAllNodes(),o=0;o<i.length;o++){var n=i[o];this.idToNodeMap.set(n.id,n)}var r=function i(o){for(var n,r=o.getChild().getNodes(),s=0,h=0;h<r.length;h++)null==(n=r[h]).getChild()?t.fixedNodeSet.has(n.id)&&(s+=100):s+=i(n);return s};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach(function(i){t.fixedNodeSet.add(i.nodeId)}),i=this.graphManager.getAllNodes(),o=0;o<i.length;o++)if(null!=(n=i[o]).getChild()){var s=r(n);s>0&&(n.fixedNodeWeight=s)}if(this.constraints.relativePlacementConstraint){var h=new Map,l=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(i){t.fixedNodesOnHorizontal.add(i),t.fixedNodesOnVertical.add(i)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var p=this.constraints.alignmentConstraint.vertical;for(o=0;o<p.length;o++)this.dummyToNodeForVerticalAlignment.set("dummy"+o,[]),p[o].forEach(function(i){h.set(i,"dummy"+o),t.dummyToNodeForVerticalAlignment.get("dummy"+o).push(i),t.fixedNodeSet.has(i)&&t.fixedNodesOnHorizontal.add("dummy"+o)})}if(this.constraints.alignmentConstraint.horizontal){var f=this.constraints.alignmentConstraint.horizontal;for(o=0;o<f.length;o++)this.dummyToNodeForHorizontalAlignment.set("dummy"+o,[]),f[o].forEach(function(i){l.set(i,"dummy"+o),t.dummyToNodeForHorizontalAlignment.get("dummy"+o).push(i),t.fixedNodeSet.has(i)&&t.fixedNodesOnVertical.add("dummy"+o)})}}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(t){var i,o,n;for(n=t.length-1;n>=2*t.length/3;n--)i=Math.floor(Math.random()*(n+1)),o=t[n],t[n]=t[i],t[i]=o;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(i){if(i.left){var o=h.has(i.left)?h.get(i.left):i.left,n=h.has(i.right)?h.get(i.right):i.right;t.nodesInRelativeHorizontal.includes(o)||(t.nodesInRelativeHorizontal.push(o),t.nodeToRelativeConstraintMapHorizontal.set(o,[]),t.dummyToNodeForVerticalAlignment.has(o)?t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(o)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(o).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(o).push({right:n,gap:i.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:o,gap:i.gap})}else{var r=l.has(i.top)?l.get(i.top):i.top,s=l.has(i.bottom)?l.get(i.bottom):i.bottom;t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodesInRelativeVertical.includes(s)||(t.nodesInRelativeVertical.push(s),t.nodeToRelativeConstraintMapVertical.set(s,[]),t.dummyToNodeForHorizontalAlignment.has(s)?t.nodeToTempPositionMapVertical.set(s,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(s)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(s,t.idToNodeMap.get(s).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(r).push({bottom:s,gap:i.gap}),t.nodeToRelativeConstraintMapVertical.get(s).push({top:r,gap:i.gap})}});else{var u=new Map,v=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var i=h.has(t.left)?h.get(t.left):t.left,o=h.has(t.right)?h.get(t.right):t.right;u.has(i)?u.get(i).push(o):u.set(i,[o]),u.has(o)?u.get(o).push(i):u.set(o,[i])}else{var n=l.has(t.top)?l.get(t.top):t.top,r=l.has(t.bottom)?l.get(t.bottom):t.bottom;v.has(n)?v.get(n).push(r):v.set(n,[r]),v.has(r)?v.get(r).push(n):v.set(r,[n])}});var T=function(t,i){var o=[],n=[],r=new A,s=new Set,h=0;return t.forEach(function(l,c){if(!s.has(c)){o[h]=[],n[h]=!1;var p=c;for(r.push(p),s.add(p),o[h].push(p);0!=r.length;)p=r.shift(),i.has(p)&&(n[h]=!0),t.get(p).forEach(function(t){s.has(t)||(r.push(t),s.add(t),o[h].push(t))});h++}}),{components:o,isFixed:n}},N=T(u,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=N.components,this.fixedComponentsOnHorizontal=N.isFixed;var E=T(v,t.fixedNodesOnVertical);this.componentsOnVertical=E.components,this.fixedComponentsOnVertical=E.isFixed}}},I.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(i){var o=t.idToNodeMap.get(i.nodeId);o.displacementX=0,o.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var i=this.constraints.alignmentConstraint.vertical,o=0;o<i.length;o++){for(var n=0,r=0;r<i[o].length;r++){if(this.fixedNodeSet.has(i[o][r])){n=0;break}n+=this.idToNodeMap.get(i[o][r]).displacementX}var s=n/i[o].length;for(r=0;r<i[o].length;r++)this.idToNodeMap.get(i[o][r]).displacementX=s}if(this.constraints.alignmentConstraint.horizontal){var h=this.constraints.alignmentConstraint.horizontal;for(o=0;o<h.length;o++){var l=0;for(r=0;r<h[o].length;r++){if(this.fixedNodeSet.has(h[o][r])){l=0;break}l+=this.idToNodeMap.get(h[o][r]).displacementY}var p=l/h[o].length;for(r=0;r<h[o].length;r++)this.idToNodeMap.get(h[o][r]).displacementY=p}}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(i){if(!t.fixedNodesOnHorizontal.has(i)){var o=0;o=t.dummyToNodeForVerticalAlignment.has(i)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).displacementX:t.idToNodeMap.get(i).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(i).forEach(function(n){var r;n.right?(r=t.nodeToTempPositionMapHorizontal.get(n.right)-t.nodeToTempPositionMapHorizontal.get(i)-o)<n.gap&&(o-=n.gap-r):(r=t.nodeToTempPositionMapHorizontal.get(i)-t.nodeToTempPositionMapHorizontal.get(n.left)+o)<n.gap&&(o+=n.gap-r)}),t.nodeToTempPositionMapHorizontal.set(i,t.nodeToTempPositionMapHorizontal.get(i)+o),t.dummyToNodeForVerticalAlignment.has(i)?t.dummyToNodeForVerticalAlignment.get(i).forEach(function(i){t.idToNodeMap.get(i).displacementX=o}):t.idToNodeMap.get(i).displacementX=o}}),this.nodesInRelativeVertical.forEach(function(i){if(!t.fixedNodesOnHorizontal.has(i)){var o=0;o=t.dummyToNodeForHorizontalAlignment.has(i)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).displacementY:t.idToNodeMap.get(i).displacementY,t.nodeToRelativeConstraintMapVertical.get(i).forEach(function(n){var r;n.bottom?(r=t.nodeToTempPositionMapVertical.get(n.bottom)-t.nodeToTempPositionMapVertical.get(i)-o)<n.gap&&(o-=n.gap-r):(r=t.nodeToTempPositionMapVertical.get(i)-t.nodeToTempPositionMapVertical.get(n.top)+o)<n.gap&&(o+=n.gap-r)}),t.nodeToTempPositionMapVertical.set(i,t.nodeToTempPositionMapVertical.get(i)+o),t.dummyToNodeForHorizontalAlignment.has(i)?t.dummyToNodeForHorizontalAlignment.get(i).forEach(function(i){t.idToNodeMap.get(i).displacementY=o}):t.idToNodeMap.get(i).displacementY=o}});else{for(o=0;o<this.componentsOnHorizontal.length;o++){var f=this.componentsOnHorizontal[o];if(this.fixedComponentsOnHorizontal[o])for(r=0;r<f.length;r++)this.dummyToNodeForVerticalAlignment.has(f[r])?this.dummyToNodeForVerticalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementX=0}):this.idToNodeMap.get(f[r]).displacementX=0;else{var u=0,v=0;for(r=0;r<f.length;r++)this.dummyToNodeForVerticalAlignment.has(f[r])?(u+=(N=this.dummyToNodeForVerticalAlignment.get(f[r])).length*this.idToNodeMap.get(N[0]).displacementX,v+=N.length):(u+=this.idToNodeMap.get(f[r]).displacementX,v++);var T=u/v;for(r=0;r<f.length;r++)this.dummyToNodeForVerticalAlignment.has(f[r])?this.dummyToNodeForVerticalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementX=T}):this.idToNodeMap.get(f[r]).displacementX=T}}for(o=0;o<this.componentsOnVertical.length;o++)if(f=this.componentsOnVertical[o],this.fixedComponentsOnVertical[o])for(r=0;r<f.length;r++)this.dummyToNodeForHorizontalAlignment.has(f[r])?this.dummyToNodeForHorizontalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementY=0}):this.idToNodeMap.get(f[r]).displacementY=0;else{for(u=0,v=0,r=0;r<f.length;r++){var N;this.dummyToNodeForHorizontalAlignment.has(f[r])?(u+=(N=this.dummyToNodeForHorizontalAlignment.get(f[r])).length*this.idToNodeMap.get(N[0]).displacementY,v+=N.length):(u+=this.idToNodeMap.get(f[r]).displacementY,v++)}for(T=u/v,r=0;r<f.length;r++)this.dummyToNodeForHorizontalAlignment.has(f[r])?this.dummyToNodeForHorizontalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementY=T}):this.idToNodeMap.get(f[r]).displacementY=T}}},I.prototype.calculateNodesToApplyGravitationTo=function(){var t,i,o=[],n=this.graphManager.getGraphs(),r=n.length;for(i=0;i<r;i++)(t=n[i]).updateConnected(),t.isConnected||(o=o.concat(t.getNodes()));return o},I.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var i,o=new Set;for(i=0;i<t.length;i++){var n=t[i];if(!o.has(n)){var r=n.getSource(),s=n.getTarget();if(r==s)n.getBendpoints().push(new T),n.getBendpoints().push(new T),this.createDummyNodesForBendpoints(n),o.add(n);else{var h=[];if(h=(h=h.concat(r.getEdgeListToNode(s))).concat(s.getEdgeListToNode(r)),!o.has(h[0])){var l;if(h.length>1)for(l=0;l<h.length;l++){var c=h[l];c.getBendpoints().push(new T),this.createDummyNodesForBendpoints(c)}h.forEach(function(t){o.add(t)})}}}if(o.size==t.length)break}},I.prototype.positionNodesRadially=function(t){for(var i=new v(0,0),o=Math.ceil(Math.sqrt(t.length)),n=0,r=0,s=0,h=new T(0,0),l=0;l<t.length;l++){l%o==0&&(s=0,r=n,0!=l&&(r+=c.DEFAULT_COMPONENT_SEPERATION),n=0);var p=t[l],f=E.findCenterOfTree(p);i.x=s,i.y=r,(h=I.radialLayout(p,f,i)).y>n&&(n=Math.floor(h.y)),s=Math.floor(h.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(u.WORLD_CENTER_X-h.x/2,u.WORLD_CENTER_Y-h.y/2))},I.radialLayout=function(t,i,o){var n=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);I.branchRadialLayout(i,null,0,359,0,n);var r=M.calculateBounds(t),s=new w;s.setDeviceOrgX(r.getMinX()),s.setDeviceOrgY(r.getMinY()),s.setWorldOrgX(o.x),s.setWorldOrgY(o.y);for(var h=0;h<t.length;h++)t[h].transform(s);var l=new T(r.getMaxX(),r.getMaxY());return s.inverseTransformPoint(l)},I.branchRadialLayout=function(t,i,o,n,r,s){var h=(n-o+1)/2;h<0&&(h+=180);var l=(h+o)%360*C.TWO_PI/360,c=(Math.cos(l),r*Math.cos(l)),p=r*Math.sin(l);t.setCenter(c,p);var f=[],u=(f=f.concat(t.getEdges())).length;null!=i&&u--;for(var v,T=0,N=f.length,E=t.getEdgesBetween(i);E.length>1;){var y=E[0];E.splice(0,1);var M=f.indexOf(y);M>=0&&f.splice(M,1),N--,u--}v=null!=i?(f.indexOf(E[0])+1)%N:0;for(var w=Math.abs(n-o)/u,A=v;T!=u;A=++A%N){var L=f[A].getOtherEnd(t);if(L!=i){var b=(o+T*w)%360,F=(b+w)%360;I.branchRadialLayout(L,t,b,F,r+s,s),T++}}},I.maxDiagonalInTree=function(t){for(var i=y.MIN_VALUE,o=0;o<t.length;o++){var n=t[o].getDiagonal();n>i&&(i=n)}return i},I.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},I.prototype.groupZeroDegreeMembers=function(){var t=this,i={};this.memberGroups={},this.idToDummyNode={};for(var o=[],n=this.graphManager.getAllNodes(),r=0;r<n.length;r++){var s=(l=n[r]).getParent();0!==this.getNodeDegreeWithChildren(l)||null!=s.id&&this.getToBeTiled(s)||o.push(l)}for(r=0;r<o.length;r++){var l,c=(l=o[r]).getParent().id;void 0===i[c]&&(i[c]=[]),i[c]=i[c].concat(l)}Object.keys(i).forEach(function(o){if(i[o].length>1){var n="DummyCompound_"+o;t.memberGroups[n]=i[o];var r=i[o][0].getParent(),s=new h(t.graphManager);s.id=n,s.paddingLeft=r.paddingLeft||0,s.paddingRight=r.paddingRight||0,s.paddingBottom=r.paddingBottom||0,s.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=s;var l=t.getGraphManager().add(t.newGraph(),s),c=r.getChild();c.add(s);for(var p=0;p<i[o].length;p++){var f=i[o][p];c.remove(f),l.add(f)}}})},I.prototype.clearCompounds=function(){var t={},i={};this.performDFSOnCompounds();for(var o=0;o<this.compoundOrder.length;o++)i[this.compoundOrder[o].id]=this.compoundOrder[o],t[this.compoundOrder[o].id]=[].concat(this.compoundOrder[o].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[o].getChild()),this.compoundOrder[o].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,i)},I.prototype.clearZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(o){var n=t.idToDummyNode[o];if(i[o]=t.tileNodes(t.memberGroups[o],n.paddingLeft+n.paddingRight),n.rect.width=i[o].width,n.rect.height=i[o].height,n.setCenter(i[o].centerX,i[o].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var r=n.rect.width,s=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(r+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>r?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(s+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>s?(n.rect.y-=(n.labelHeight-s)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-s)/2):"bottom"==n.labelPosVertical&&n.setHeight(s+n.labelHeight))}})},I.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var i=this.compoundOrder[t],o=i.id,n=i.paddingLeft,r=i.paddingTop,s=i.labelMarginLeft,h=i.labelMarginTop;this.adjustLocations(this.tiledMemberPack[o],i.rect.x,i.rect.y,n,r,s,h)}},I.prototype.repopulateZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(o){var n=t.idToDummyNode[o],r=n.paddingLeft,s=n.paddingTop,h=n.labelMarginLeft,l=n.labelMarginTop;t.adjustLocations(i[o],n.rect.x,n.rect.y,r,s,h,l)})},I.prototype.getToBeTiled=function(t){var i=t.id;if(null!=this.toBeTiled[i])return this.toBeTiled[i];var o=t.getChild();if(null==o)return this.toBeTiled[i]=!1,!1;for(var n=o.getNodes(),r=0;r<n.length;r++){var s=n[r];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},I.prototype.getNodeDegree=function(t){t.id;for(var i=t.getEdges(),o=0,n=0;n<i.length;n++){var r=i[n];r.getSource().id!==r.getTarget().id&&(o+=1)}return o},I.prototype.getNodeDegreeWithChildren=function(t){var i=this.getNodeDegree(t);if(null==t.getChild())return i;for(var o=t.getChild().getNodes(),n=0;n<o.length;n++){var r=o[n];i+=this.getNodeDegreeWithChildren(r)}return i},I.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},I.prototype.fillCompexOrderByDFS=function(t){for(var i=0;i<t.length;i++){var o=t[i];null!=o.getChild()&&this.fillCompexOrderByDFS(o.getChild().getNodes()),this.getToBeTiled(o)&&this.compoundOrder.push(o)}},I.prototype.adjustLocations=function(t,i,o,n,r,s,h){o+=r+h;for(var l=i+=n+s,c=0;c<t.rows.length;c++){var p=t.rows[c];i=l;for(var f=0,u=0;u<p.length;u++){var v=p[u];v.rect.x=i,v.rect.y=o,i+=v.rect.width+t.horizontalPadding,v.rect.height>f&&(f=v.rect.height)}o+=f+t.verticalPadding}},I.prototype.tileCompoundMembers=function(t,i){var o=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var r=i[n];if(o.tiledMemberPack[n]=o.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=o.tiledMemberPack[n].width,r.rect.height=o.tiledMemberPack[n].height,r.setCenter(o.tiledMemberPack[n].centerX,o.tiledMemberPack[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var s=r.rect.width,h=r.rect.height;r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(s+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>s?(r.rect.x-=(r.labelWidth-s)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-s)/2):"right"==r.labelPosHorizontal&&r.setWidth(s+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(h+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>h?(r.rect.y-=(r.labelHeight-h)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-h)/2):"bottom"==r.labelPosVertical&&r.setHeight(h+r.labelHeight))}})},I.prototype.tileNodes=function(t,i){var o=this.tileNodesByFavoringDim(t,i,!0),n=this.tileNodesByFavoringDim(t,i,!1),r=this.getOrgRatio(o);return this.getOrgRatio(n)<r?n:o},I.prototype.getOrgRatio=function(t){var i=t.width/t.height;return i<1&&(i=1/i),i},I.prototype.calcIdealRowWidth=function(t,i){var o=c.TILING_PADDING_VERTICAL,n=c.TILING_PADDING_HORIZONTAL,r=t.length,s=0,h=0,l=0;t.forEach(function(t){s+=t.getWidth(),h+=t.getHeight(),t.getWidth()>l&&(l=t.getWidth())});var p,f=s/r,u=h/r,v=Math.pow(o-n,2)+4*(f+n)*(u+o)*r,T=(n-o+Math.sqrt(v))/(2*(f+n));i?(p=Math.ceil(T))==T&&p++:p=Math.floor(T);var N=p*(f+n)-n;return l>N&&(N=l),N+=2*n},I.prototype.tileNodesByFavoringDim=function(t,i,o){var n=c.TILING_PADDING_VERTICAL,r=c.TILING_PADDING_HORIZONTAL,s=c.TILING_COMPARE_BY,h={rows:[],rowWidth:[],rowHeight:[],width:0,height:i,verticalPadding:n,horizontalPadding:r,centerX:0,centerY:0};s&&(h.idealRowWidth=this.calcIdealRowWidth(t,o));var l=function(t){return t.rect.width*t.rect.height},p=function(t,i){return l(i)-l(t)};t.sort(function(t,i){var o=p;return h.idealRowWidth?(o=s)(t.id,i.id):o(t,i)});for(var f=0,u=0,v=0;v<t.length;v++)f+=(T=t[v]).getCenterX(),u+=T.getCenterY();for(h.centerX=f/t.length,h.centerY=u/t.length,v=0;v<t.length;v++){var T=t[v];if(0==h.rows.length)this.insertNodeToRow(h,T,0,i);else if(this.canAddHorizontal(h,T.rect.width,T.rect.height)){var N=h.rows.length-1;h.idealRowWidth||(N=this.getShortestRowIndex(h)),this.insertNodeToRow(h,T,N,i)}else this.insertNodeToRow(h,T,h.rows.length,i);this.shiftToLastRow(h)}return h},I.prototype.insertNodeToRow=function(t,i,o,n){var r=n;o==t.rows.length&&(t.rows.push([]),t.rowWidth.push(r),t.rowHeight.push(0));var s=t.rowWidth[o]+i.rect.width;t.rows[o].length>0&&(s+=t.horizontalPadding),t.rowWidth[o]=s,t.width<s&&(t.width=s);var h=i.rect.height;o>0&&(h+=t.verticalPadding);var l=0;h>t.rowHeight[o]&&(l=t.rowHeight[o],t.rowHeight[o]=h,l=t.rowHeight[o]-l),t.height+=l,t.rows[o].push(i)},I.prototype.getShortestRowIndex=function(t){for(var i=-1,o=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<o&&(i=n,o=t.rowWidth[n]);return i},I.prototype.getLongestRowIndex=function(t){for(var i=-1,o=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>o&&(i=n,o=t.rowWidth[n]);return i},I.prototype.canAddHorizontal=function(t,i,o){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+i+t.horizontalPadding<=t.idealRowWidth}var r=this.getShortestRowIndex(t);if(r<0)return!0;var s=t.rowWidth[r];if(s+t.horizontalPadding+i<=t.width)return!0;var h,l,c=0;return t.rowHeight[r]<o&&r>0&&(c=o+t.verticalPadding-t.rowHeight[r]),h=t.width-s>=i+t.horizontalPadding?(t.height+c)/(s+i+t.horizontalPadding):(t.height+c)/t.width,c=o+t.verticalPadding,(l=t.width<i?(t.height+c)/i:(t.height+c)/t.width)<1&&(l=1/l),h<1&&(h=1/h),h<l},I.prototype.shiftToLastRow=function(t){var i=this.getLongestRowIndex(t),o=t.rowWidth.length-1,n=t.rows[i],r=n[n.length-1],s=r.width+t.horizontalPadding;if(t.width-t.rowWidth[o]>s&&i!=o){n.splice(-1,1),t.rows[o].push(r),t.rowWidth[i]=t.rowWidth[i]-s,t.rowWidth[o]=t.rowWidth[o]+s,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var h=Number.MIN_VALUE,l=0;l<n.length;l++)n[l].height>h&&(h=n[l].height);i>0&&(h+=t.verticalPadding);var c=t.rowHeight[i]+t.rowHeight[o];t.rowHeight[i]=h,t.rowHeight[o]<r.height+t.verticalPadding&&(t.rowHeight[o]=r.height+t.verticalPadding);var p=t.rowHeight[i]+t.rowHeight[o];t.height+=p-c,this.shiftToLastRow(t)}},I.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},I.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},I.prototype.reduceTrees=function(){for(var t,i=[],o=!0;o;){var n=this.graphManager.getAllNodes(),r=[];o=!1;for(var s=0;s<n.length;s++)if(1==(t=n[s]).getEdges().length&&!t.getEdges()[0].isInterGraph&&null==t.getChild()){if(c.PURE_INCREMENTAL){var h=t.getEdges()[0].getOtherEnd(t),l=new N(t.getCenterX()-h.getCenterX(),t.getCenterY()-h.getCenterY());r.push([t,t.getEdges()[0],t.getOwner(),l])}else r.push([t,t.getEdges()[0],t.getOwner()]);o=!0}if(1==o){for(var p=[],f=0;f<r.length;f++)1==r[f][0].getEdges().length&&(p.push(r[f]),r[f][0].getOwner().remove(r[f][0]));i.push(p),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=i},I.prototype.growTree=function(t){for(var i,o=t[t.length-1],n=0;n<o.length;n++)i=o[n],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()},I.prototype.findPlaceforPrunedNode=function(t){var i,o,n=t[0];if(o=n==t[1].source?t[1].target:t[1].source,c.PURE_INCREMENTAL)n.setCenter(o.getCenterX()+t[3].getWidth(),o.getCenterY()+t[3].getHeight());else{var r=o.startX,s=o.finishX,h=o.startY,l=o.finishY,p=[0,0,0,0];if(h>0)for(var u=r;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=r;u<=s;u++)p[2]+=this.grid[u][l+1].length+this.grid[u][l].length-1;if(r>0)for(u=h;u<=l;u++)p[3]+=this.grid[r-1][u].length+this.grid[r][u].length-1;for(var v,T,N=y.MAX_VALUE,E=0;E<p.length;E++)p[E]<N?(N=p[E],v=1,T=E):p[E]==N&&v++;if(3==v&&0==N)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==v&&0==N){var C=Math.floor(2*Math.random());i=0==p[0]&&0==p[1]?0==C?0:1:0==p[0]&&0==p[2]?0==C?0:2:0==p[0]&&0==p[3]?0==C?0:3:0==p[1]&&0==p[2]?0==C?1:2:0==p[1]&&0==p[3]?0==C?1:3:0==C?2:3}else i=4==v&&0==N?C=Math.floor(4*Math.random()):T;0==i?n.setCenter(o.getCenterX(),o.getCenterY()-o.getHeight()/2-f.DEFAULT_EDGE_LENGTH-n.getHeight()/2):1==i?n.setCenter(o.getCenterX()+o.getWidth()/2+f.DEFAULT_EDGE_LENGTH+n.getWidth()/2,o.getCenterY()):2==i?n.setCenter(o.getCenterX(),o.getCenterY()+o.getHeight()/2+f.DEFAULT_EDGE_LENGTH+n.getHeight()/2):n.setCenter(o.getCenterX()-o.getWidth()/2-f.DEFAULT_EDGE_LENGTH-n.getWidth()/2,o.getCenterY())}},t.exports=I},991:(t,i,o)=>{var n=o(551).FDLayoutNode,r=o(551).IMath;function s(t,i,o,r){n.call(this,t,i,o,r)}for(var h in s.prototype=Object.create(n.prototype),n)s[h]=n[h];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(t,i){for(var o,n=this.getChild().getNodes(),r=0;r<n.length;r++)null==(o=n[r]).getChild()?(o.displacementX+=t,o.displacementY+=i):o.propogateDisplacementToChildren(t,i)},s.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(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.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},902:(t,i,o)=>{function n(t){if(Array.isArray(t)){for(var i=0,o=Array(t.length);i<t.length;i++)o[i]=t[i];return o}return Array.from(t)}var r=o(806),s=o(551).LinkedList,h=o(551).Matrix,l=o(551).SVD;function c(){}c.handleConstraints=function(t){var i={};i.fixedNodeConstraint=t.constraints.fixedNodeConstraint,i.alignmentConstraint=t.constraints.alignmentConstraint,i.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var o=new Map,c=new Map,p=[],f=[],u=t.getAllNodes(),v=0,T=0;T<u.length;T++){var N=u[T];null==N.getChild()&&(c.set(N.id,v++),p.push(N.getCenterX()),f.push(N.getCenterY()),o.set(N.id,N))}i.relativePlacementConstraint&&i.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=r.DEFAULT_EDGE_LENGTH+o.get(t.left).getWidth()/2+o.get(t.right).getWidth()/2:t.gap=r.DEFAULT_EDGE_LENGTH+o.get(t.top).getHeight()/2+o.get(t.bottom).getHeight()/2)});var E=function(t){var i=0,o=0;return t.forEach(function(t){i+=p[c.get(t)],o+=f[c.get(t)]}),{x:i/t.size,y:o/t.size}},y=function(t,i,o,r,h){function l(t,i){var o=new Set(t),n=!0,r=!1,s=void 0;try{for(var h,l=i[Symbol.iterator]();!(n=(h=l.next()).done);n=!0){var c=h.value;o.add(c)}}catch(t){r=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(r)throw s}}return o}var u=new Map;t.forEach(function(t,i){u.set(i,0)}),t.forEach(function(t,i){t.forEach(function(t){u.set(t.id,u.get(t.id)+1)})});var v=new Map,T=new Map,N=new s;u.forEach(function(t,n){0==t?(N.push(n),o||("horizontal"==i?v.set(n,c.has(n)?p[c.get(n)]:r.get(n)):v.set(n,c.has(n)?f[c.get(n)]:r.get(n)))):v.set(n,Number.NEGATIVE_INFINITY),o&&T.set(n,new Set([n]))}),o&&h.forEach(function(t){var n=[];if(t.forEach(function(t){o.has(t)&&n.push(t)}),n.length>0){var s=0;n.forEach(function(t){"horizontal"==i?(v.set(t,c.has(t)?p[c.get(t)]:r.get(t)),s+=v.get(t)):(v.set(t,c.has(t)?f[c.get(t)]:r.get(t)),s+=v.get(t))}),s/=n.length,t.forEach(function(t){o.has(t)||v.set(t,s)})}else{var h=0;t.forEach(function(t){h+="horizontal"==i?c.has(t)?p[c.get(t)]:r.get(t):c.has(t)?f[c.get(t)]:r.get(t)}),h/=t.length,t.forEach(function(t){v.set(t,h)})}});for(var E=function(){var n=N.shift();t.get(n).forEach(function(t){if(v.get(t.id)<v.get(n)+t.gap)if(o&&o.has(t.id)){var s=void 0;if(s="horizontal"==i?c.has(t.id)?p[c.get(t.id)]:r.get(t.id):c.has(t.id)?f[c.get(t.id)]:r.get(t.id),v.set(t.id,s),s<v.get(n)+t.gap){var h=v.get(n)+t.gap-s;T.get(n).forEach(function(t){v.set(t,v.get(t)-h)})}}else v.set(t.id,v.get(n)+t.gap);u.set(t.id,u.get(t.id)-1),0==u.get(t.id)&&N.push(t.id),o&&T.set(t.id,l(T.get(n),T.get(t.id)))})};0!=N.length;)E();if(o){var y=new Set;t.forEach(function(t,i){0==t.length&&y.add(i)});var C=[];T.forEach(function(t,i){if(y.has(i)){var r=!1,s=!0,h=!1,l=void 0;try{for(var c,p=t[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var f=c.value;o.has(f)&&(r=!0)}}catch(t){h=!0,l=t}finally{try{!s&&p.return&&p.return()}finally{if(h)throw l}}if(!r){var u=!1,v=void 0;C.forEach(function(i,o){i.has([].concat(n(t))[0])&&(u=!0,v=o)}),u?t.forEach(function(t){C[v].add(t)}):C.push(new Set(t))}}}),C.forEach(function(t,o){var n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=!0,T=!1,N=void 0;try{for(var E,y=t[Symbol.iterator]();!(u=(E=y.next()).done);u=!0){var C=E.value,M=void 0;M="horizontal"==i?c.has(C)?p[c.get(C)]:r.get(C):c.has(C)?f[c.get(C)]:r.get(C);var w=v.get(C);M<n&&(n=M),M>h&&(h=M),w<s&&(s=w),w>l&&(l=w)}}catch(t){T=!0,N=t}finally{try{!u&&y.return&&y.return()}finally{if(T)throw N}}var A=(n+h)/2-(s+l)/2,I=!0,L=!1,b=void 0;try{for(var F,R=t[Symbol.iterator]();!(I=(F=R.next()).done);I=!0){var O=F.value;v.set(O,v.get(O)+A)}}catch(t){L=!0,b=t}finally{try{!I&&R.return&&R.return()}finally{if(L)throw b}}})}return v},C=function(t){var i=0,o=0,n=0,r=0;if(t.forEach(function(t){t.left?p[c.get(t.left)]-p[c.get(t.right)]>=0?i++:o++:f[c.get(t.top)]-f[c.get(t.bottom)]>=0?n++:r++}),i>o&&n>r)for(var s=0;s<c.size;s++)p[s]=-1*p[s],f[s]=-1*f[s];else if(i>o)for(var h=0;h<c.size;h++)p[h]=-1*p[h];else if(n>r)for(var l=0;l<c.size;l++)f[l]=-1*f[l]},M=function(t){var i=[],o=new s,n=new Set,r=0;return t.forEach(function(s,h){if(!n.has(h)){i[r]=[];var l=h;for(o.push(l),n.add(l),i[r].push(l);0!=o.length;)l=o.shift(),t.get(l).forEach(function(t){n.has(t.id)||(o.push(t.id),n.add(t.id),i[r].push(t.id))});r++}}),i},w=function(t){var i=new Map;return t.forEach(function(t,o){i.set(o,[])}),t.forEach(function(t,o){t.forEach(function(t){i.get(o).push(t),i.get(t.id).push({id:o,gap:t.gap,direction:t.direction})})}),i},A=function(t){var i=new Map;return t.forEach(function(t,o){i.set(o,[])}),t.forEach(function(t,o){t.forEach(function(t){i.get(t.id).push({id:o,gap:t.gap,direction:t.direction})})}),i},I=[],L=[],b=!1,F=!1,R=new Set,O=new Map,_=new Map,P=[];if(i.fixedNodeConstraint&&i.fixedNodeConstraint.forEach(function(t){R.add(t.nodeId)}),i.relativePlacementConstraint&&(i.relativePlacementConstraint.forEach(function(t){t.left?(O.has(t.left)?O.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):O.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),O.has(t.right)||O.set(t.right,[])):(O.has(t.top)?O.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):O.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),O.has(t.bottom)||O.set(t.bottom,[]))}),_=w(O),P=M(_)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(i.fixedNodeConstraint&&i.fixedNodeConstraint.length>1)i.fixedNodeConstraint.forEach(function(t,i){I[i]=[t.position.x,t.position.y],L[i]=[p[c.get(t.nodeId)],f[c.get(t.nodeId)]]}),b=!0;else if(i.alignmentConstraint)!(function(){var t=0;if(i.alignmentConstraint.vertical){for(var o=i.alignmentConstraint.vertical,r=function(i){var r=new Set;o[i].forEach(function(t){r.add(t)});var s=new Set([].concat(n(r)).filter(function(t){return R.has(t)})),h=void 0;h=s.size>0?p[c.get(s.values().next().value)]:E(r).x,o[i].forEach(function(i){I[t]=[h,f[c.get(i)]],L[t]=[p[c.get(i)],f[c.get(i)]],t++})},s=0;s<o.length;s++)r(s);b=!0}if(i.alignmentConstraint.horizontal){for(var h=i.alignmentConstraint.horizontal,l=function(i){var o=new Set;h[i].forEach(function(t){o.add(t)});var r=new Set([].concat(n(o)).filter(function(t){return R.has(t)})),s=void 0;s=r.size>0?p[c.get(r.values().next().value)]:E(o).y,h[i].forEach(function(i){I[t]=[p[c.get(i)],s],L[t]=[p[c.get(i)],f[c.get(i)]],t++})},u=0;u<h.length;u++)l(u);b=!0}i.relativePlacementConstraint&&(F=!0)})();else if(i.relativePlacementConstraint){for(var D=0,x=0,H=0;H<P.length;H++)P[H].length>D&&(D=P[H].length,x=H);if(D<_.size/2)C(i.relativePlacementConstraint),b=!1,F=!1;else{var G=new Map,z=new Map,S=[];P[x].forEach(function(t){O.get(t).forEach(function(i){"horizontal"==i.direction?(G.has(t)?G.get(t).push(i):G.set(t,[i]),G.has(i.id)||G.set(i.id,[]),S.push({left:t,right:i.id})):(z.has(t)?z.get(t).push(i):z.set(t,[i]),z.has(i.id)||z.set(i.id,[]),S.push({top:t,bottom:i.id}))})}),C(S),F=!1;var V=y(G,"horizontal"),W=y(z,"vertical");P[x].forEach(function(t,i){L[i]=[p[c.get(t)],f[c.get(t)]],I[i]=[],V.has(t)?I[i][0]=V.get(t):I[i][0]=p[c.get(t)],W.has(t)?I[i][1]=W.get(t):I[i][1]=f[c.get(t)]}),b=!0}}if(b){for(var Y,X=h.transpose(I),U=h.transpose(L),B=0;B<X.length;B++)X[B]=h.multGamma(X[B]),U[B]=h.multGamma(U[B]);var k=h.multMat(X,h.transpose(U)),j=l.svd(k);Y=h.multMat(j.V,h.transpose(j.U));for(var Z=0;Z<c.size;Z++){var q=[p[Z],f[Z]],K=[Y[0][0],Y[1][0]],Q=[Y[0][1],Y[1][1]];p[Z]=h.dotProduct(q,K),f[Z]=h.dotProduct(q,Q)}F&&C(i.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(i.fixedNodeConstraint&&i.fixedNodeConstraint.length>0){var J={x:0,y:0};i.fixedNodeConstraint.forEach(function(t,i){var o,n,r={x:p[c.get(t.nodeId)],y:f[c.get(t.nodeId)]},s=t.position,h=(n=r,{x:(o=s).x-n.x,y:o.y-n.y});J.x+=h.x,J.y+=h.y}),J.x/=i.fixedNodeConstraint.length,J.y/=i.fixedNodeConstraint.length,p.forEach(function(t,i){p[i]+=J.x}),f.forEach(function(t,i){f[i]+=J.y}),i.fixedNodeConstraint.forEach(function(t){p[c.get(t.nodeId)]=t.position.x,f[c.get(t.nodeId)]=t.position.y})}if(i.alignmentConstraint){if(i.alignmentConstraint.vertical)for(var $=i.alignmentConstraint.vertical,tt=function(t){var i=new Set;$[t].forEach(function(t){i.add(t)});var o=new Set([].concat(n(i)).filter(function(t){return R.has(t)})),r=void 0;r=o.size>0?p[c.get(o.values().next().value)]:E(i).x,i.forEach(function(t){R.has(t)||(p[c.get(t)]=r)})},et=0;et<$.length;et++)tt(et);if(i.alignmentConstraint.horizontal)for(var it=i.alignmentConstraint.horizontal,ot=function(t){var i=new Set;it[t].forEach(function(t){i.add(t)});var o=new Set([].concat(n(i)).filter(function(t){return R.has(t)})),r=void 0;r=o.size>0?f[c.get(o.values().next().value)]:E(i).y,i.forEach(function(t){R.has(t)||(f[c.get(t)]=r)})},nt=0;nt<it.length;nt++)ot(nt)}i.relativePlacementConstraint&&(function(){var t=new Map,o=new Map,n=new Map,r=new Map,s=new Map,h=new Map,l=new Set,u=new Set;if(R.forEach(function(t){l.add(t),u.add(t)}),i.alignmentConstraint){if(i.alignmentConstraint.vertical)for(var v=i.alignmentConstraint.vertical,T=function(i){n.set("dummy"+i,[]),v[i].forEach(function(o){t.set(o,"dummy"+i),n.get("dummy"+i).push(o),R.has(o)&&l.add("dummy"+i)}),s.set("dummy"+i,p[c.get(v[i][0])])},N=0;N<v.length;N++)T(N);if(i.alignmentConstraint.horizontal)for(var E=i.alignmentConstraint.horizontal,C=function(t){r.set("dummy"+t,[]),E[t].forEach(function(i){o.set(i,"dummy"+t),r.get("dummy"+t).push(i),R.has(i)&&u.add("dummy"+t)}),h.set("dummy"+t,f[c.get(E[t][0])])},I=0;I<E.length;I++)C(I)}var L=new Map,b=new Map,F=function(i){O.get(i).forEach(function(n){var r=void 0,s=void 0;"horizontal"==n.direction?(r=t.get(i)?t.get(i):i,s=t.get(n.id)?{id:t.get(n.id),gap:n.gap,direction:n.direction}:n,L.has(r)?L.get(r).push(s):L.set(r,[s]),L.has(s.id)||L.set(s.id,[])):(r=o.get(i)?o.get(i):i,s=o.get(n.id)?{id:o.get(n.id),gap:n.gap,direction:n.direction}:n,b.has(r)?b.get(r).push(s):b.set(r,[s]),b.has(s.id)||b.set(s.id,[]))})},_=!0,P=!1,D=void 0;try{for(var x,H=O.keys()[Symbol.iterator]();!(_=(x=H.next()).done);_=!0)F(x.value)}catch(t){P=!0,D=t}finally{try{!_&&H.return&&H.return()}finally{if(P)throw D}}var G=w(L),z=w(b),S=M(G),V=M(z),W=A(L),Y=A(b),X=[],U=[];S.forEach(function(t,i){X[i]=[],t.forEach(function(t){0==W.get(t).length&&X[i].push(t)})}),V.forEach(function(t,i){U[i]=[],t.forEach(function(t){0==Y.get(t).length&&U[i].push(t)})});var B=y(L,"horizontal",l,s,X),k=y(b,"vertical",u,h,U),j=function(t){n.get(t)?n.get(t).forEach(function(i){p[c.get(i)]=B.get(t)}):p[c.get(t)]=B.get(t)},Z=!0,q=!1,K=void 0;try{for(var Q,J=B.keys()[Symbol.iterator]();!(Z=(Q=J.next()).done);Z=!0)j(Q.value)}catch(t){q=!0,K=t}finally{try{!Z&&J.return&&J.return()}finally{if(q)throw K}}var $=function(t){r.get(t)?r.get(t).forEach(function(i){f[c.get(i)]=k.get(t)}):f[c.get(t)]=k.get(t)},tt=!0,et=!1,it=void 0;try{for(var ot,nt=k.keys()[Symbol.iterator]();!(tt=(ot=nt.next()).done);tt=!0)$(ot.value)}catch(t){et=!0,it=t}finally{try{!tt&&nt.return&&nt.return()}finally{if(et)throw it}}})()}for(var rt=0;rt<u.length;rt++){var at=u[rt];null==at.getChild()&&at.setCenter(p[c.get(at.id)],f[c.get(at.id)])}},t.exports=c},551:i=>{i.exports=t}},o={},n=(function t(n){var r=o[n];if(void 0!==r)return r.exports;var s=o[n]={exports:{}};return i[n](s,s.exports,t),s.exports})(45);return n})()},'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)},5330,[5331]);
4
- __d(function(_g,_r,_i0,_a,m,_e,_d){var t,e;t=this,e=function(){return(function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,'a',e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)})([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var h in s.prototype=Object.create(r.prototype),r)s[h]=r[h];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.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"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),h=i(16),a=i(5);function u(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(t){this.rect.width=t},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(t){this.rect.height=t},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new a(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},u.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},u.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},u.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},u.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},u.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},u.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},u.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;i<e.length;i++)e[i].withChildren().forEach(function(e){t.add(e)});return t},u.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),i=0;i<e.length;i++)t+=e[i].getNoOfChildren();return 0==t&&(t=1),t},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.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)},u.prototype.scatter=function(){var t,e,i=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+h.nextDouble()*(r-i)+i;var n=-s.INITIAL_WORLD_BOUNDARY,o=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+h.nextDouble()*(o-n)+n,this.rect.x=t,this.rect.y=e},u.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()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),i=t.getBottom()-t.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new a(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=u},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(7),h=i(3),a=i(1),u=i(13),l=i(12),g=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in c.prototype=Object.create(r.prototype),r)c[p]=r[p];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},c.prototype.remove=function(t){var e=t;if(t instanceof h){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n<r;n++)(o=i[n]).isInterGraph?this.graphManager.remove(o):o.source.owner.remove(o);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof a){var o;if(null==(o=t))throw"Edge is null!";if(null==o.source||null==o.target)throw"Source and/or target is null!";if(null==o.source.owner||null==o.target.owner||o.source.owner!=this||o.target.owner!=this)throw"Source and/or target owner is invalid!";var s,u=o.source.edges.indexOf(o),l=o.target.edges.indexOf(o);if(!(u>-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),h=s.length,a=0;a<h;a++){var u=s[a];r>(t=u.getTop())&&(r=t),o>(e=u.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new l(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,h=n.MAX_VALUE,a=-n.MAX_VALUE,l=n.MAX_VALUE,g=-n.MAX_VALUE,c=this.nodes,p=c.length,f=0;f<p;f++){var d=c[f];t&&null!=d.child&&d.updateBounds(),h>(e=d.getLeft())&&(h=e),a<(i=d.getRight())&&(a=i),l>(r=d.getTop())&&(l=r),g<(o=d.getBottom())&&(g=o)}var y=new u(h,l,a-h,g-l);h==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,h=-n.MAX_VALUE,a=n.MAX_VALUE,l=-n.MAX_VALUE,g=t.length,c=0;c<g;c++){var p=t[c];s>(e=p.getLeft())&&(s=e),h<(i=p.getRight())&&(h=i),a>(r=p.getTop())&&(a=r),l<(o=p.getBottom())&&(l=o)}return new u(s,a,h-s,l-a)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r<i;r++)t+=e[r].calcEstimatedSize();return this.estimatedSize=0==t?o.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},c.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,i,r=new g,n=new Set,o=this.nodes[0];for(o.withChildren().forEach(function(t){r.push(t),n.add(t)});0!==r.length;)for(var s=(e=(o=r.shift()).getEdges()).length,h=0;h<s;h++)null==(i=e[h].getOtherEndInGraph(o,this))||n.has(i)||i.withChildren().forEach(function(t){r.push(t),n.add(t)});if(this.isConnected=!1,n.size>=this.nodes.length){var a=0;n.forEach(function(e){e.owner==t&&a++}),a==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)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!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,h=0;h<s;h++)i=o[h],e.remove(i);var a,u=[];for(s=(u=u.concat(e.getNodes())).length,h=0;h<s;h++)a=u[h],e.remove(a);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof n){if(null==(i=t))throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(null==i.source||null==i.target)throw"Source and/or target is null!";if(-1==i.source.edges.indexOf(i)||-1==i.target.edges.indexOf(i))throw"Source and/or target doesn't know this edge!";if(l=i.source.edges.indexOf(i),i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,1),null==i.source.owner||null==i.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==i.source.owner.getGraphManager().edges.indexOf(i))throw"Not in owner graph manager's edge list!";l=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(l,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),i=e.length,r=0;r<i;r++)t=t.concat(e[r].getNodes());this.allNodes=t}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),i=(e.length,0);i<e.length;i++)t=t.concat(e[i].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},o.prototype.getRoot=function(){return this.rootGraph},o.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"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var i,r=t.getOwner();null!=(i=r.getParent());){if(i==e)return!0;if(null==(r=i.getOwner()))break}for(r=e.getOwner();null!=(i=r.getParent());){if(i==t)return!0;if(null==(r=i.getOwner()))break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var t,e,i,r,n,o=this.getAllEdges(),s=o.length,h=0;h<s;h++)if(e=(t=o[h]).source,i=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=i,e!=i){for(r=e.getOwner();null==t.lca;){for(t.targetInLca=i,n=i.getOwner();null==t.lca;){if(n==r){t.lca=n;break}if(n==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=n.getParent(),n=t.targetInLca.getOwner()}if(r==this.rootGraph)break;null==t.lca&&(t.sourceInLca=r.getParent(),r=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},o.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var i=t.getOwner();null!=i;){for(var r=e.getOwner();null!=r;){if(r==i)return r;r=r.getParent().getOwner()}i=i.getParent().getOwner()}return i},o.prototype.calcInclusionTreeDepths=function(t,e){var i;null==t&&null==e&&(t=this.rootGraph,e=1);for(var r=t.getNodes(),n=r.length,o=0;o<n;o++)(i=r[o]).inclusionTreeDepth=e,null!=i.child&&this.calcInclusionTreeDepths(i.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var t,e=[],i=this.edges.length,r=0;r<i;r++)t=this.edges[r],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(r=0;r<e.length;r++)this.remove(e[r]);return!1},t.exports=o},function(t,e,i){"use strict";var r=i(12);function n(){}n.calcSeparationAmount=function(t,e,i,r){if(!t.intersects(e))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,n),i[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),i[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],h=i[1]/o;i[0]<h?h=i[0]:s=i[1],i[0]=-1*n[0]*(h/2+r),i[1]=-1*n[1]*(s/2+r)},n.decideDirectionsForOverlappingNodes=function(t,e,i){t.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,t.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},n.getIntersection2=function(t,e,i){var r=t.getCenterX(),n=t.getCenterY(),o=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return i[0]=r,i[1]=n,i[2]=o,i[3]=s,!0;var h=t.getX(),a=t.getY(),u=t.getRight(),l=t.getX(),g=t.getBottom(),c=t.getRight(),p=t.getWidthHalf(),f=t.getHeightHalf(),d=e.getX(),y=e.getY(),v=e.getRight(),E=e.getX(),A=e.getBottom(),_=e.getRight(),O=e.getWidthHalf(),N=e.getHeightHalf(),L=!1,I=!1;if(r===o){if(n>s)return i[0]=r,i[1]=a,i[2]=o,i[3]=A,!1;if(n<s)return i[0]=r,i[1]=g,i[2]=o,i[3]=y,!1}else if(n===s){if(r>o)return i[0]=h,i[1]=n,i[2]=v,i[3]=s,!1;if(r<o)return i[0]=u,i[1]=n,i[2]=d,i[3]=s,!1}else{var T=t.height/t.width,D=e.height/e.width,M=(s-n)/(o-r),w=void 0,R=void 0,x=void 0,C=void 0,G=void 0,U=void 0;if(-T===M?r>o?(i[0]=l,i[1]=g,L=!0):(i[0]=u,i[1]=a,L=!0):T===M&&(r>o?(i[0]=h,i[1]=a,L=!0):(i[0]=c,i[1]=g,L=!0)),-D===M?o>r?(i[2]=E,i[3]=A,I=!0):(i[2]=v,i[3]=y,I=!0):D===M&&(o>r?(i[2]=d,i[3]=y,I=!0):(i[2]=_,i[3]=A,I=!0)),L&&I)return!1;if(r>o?n>s?(w=this.getCardinalDirection(T,M,4),R=this.getCardinalDirection(D,M,2)):(w=this.getCardinalDirection(-T,M,3),R=this.getCardinalDirection(-D,M,1)):n>s?(w=this.getCardinalDirection(-T,M,1),R=this.getCardinalDirection(-D,M,3)):(w=this.getCardinalDirection(T,M,2),R=this.getCardinalDirection(D,M,4)),!L)switch(w){case 1:C=a,x=r+-f/M,i[0]=x,i[1]=C;break;case 2:x=c,C=n+p*M,i[0]=x,i[1]=C;break;case 3:C=g,x=r+f/M,i[0]=x,i[1]=C;break;case 4:x=l,C=n+-p*M,i[0]=x,i[1]=C}if(!I)switch(R){case 1:U=y,G=o+-N/M,i[2]=G,i[3]=U;break;case 2:G=_,U=s+O*M,i[2]=G,i[3]=U;break;case 3:U=A,G=o+N/M,i[2]=G,i[3]=U;break;case 4:G=E,U=s+-O*M,i[2]=G,i[3]=U}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,h,a,u,l,g,c=t.x,p=t.y,f=e.x,d=e.y,y=i.x,v=i.y,E=n.x,A=n.y;return 0===(g=(o=d-p)*(a=y-E)-(s=A-v)*(h=c-f))?null:new r((h*(l=E*v-y*A)-a*(u=f*p-c*d))/g,(s*u-o*l)/g)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i<t?n+=Math.PI:r<e&&(n+=this.TWO_PI)):n=r<e?this.ONE_AND_HALF_PI:this.HALF_PI,n},n.doIntersect=function(t,e,i,r){var n=t.x,o=t.y,s=e.x,h=e.y,a=i.x,u=i.y,l=r.x,g=r.y,c=(s-n)*(g-u)-(l-a)*(h-o);if(0===c)return!1;var p=((g-u)*(l-n)+(a-l)*(g-o))/c,f=((o-h)*(l-n)+(s-n)*(g-o))/c;return 0<p&&p<1&&0<f&&f<1},n.findCircleLineIntersections=function(t,e,i,r,n,o,s){var h=(i-t)*(i-t)+(r-e)*(r-e),a=2*((t-n)*(i-t)+(e-o)*(r-e)),u=(t-n)*(t-n)+(e-o)*(e-o)-s*s;if(a*a-4*h*u>=0){var l=(-a+Math.sqrt(a*a-4*h*u))/(2*h),g=(-a-Math.sqrt(a*a-4*h*u))/(2*h);return l>=0&&l<=1?[l]:g>=0&&g<=1?[g]:null}return null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=(function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}})();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return{value:t,next:null,prev:null}},s=function(t,e,i,r){return null!==t?t.next=e:r.head=e,null!==i?i.prev=e:r.tail=e,e.prev=t,e.next=i,r.length++,e},h=function(t,e){var i=t.prev,r=t.next;return null!==i?i.next=r:e.head=r,null!==r?r.prev=i:e.tail=i,t.prev=t.next=null,e.length--,t},a=(function(){function t(e){var i=this;n(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return i.push(t)})}return r(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return s(e.prev,o(t),e,this)}},{key:"insertAfter",value:function(t,e){return s(e,o(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return s(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return s(e,t,e.next,this)}},{key:"push",value:function(t){return s(this.tail,o(t),null,this)}},{key:"unshift",value:function(t){return s(null,o(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 e=1,i=this.head;e<t;)i=i.next,e++;return i.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var i=1,r=this.head;i<t;)r=r.next,i++;r.value=e}}}]),t})();t.exports=a},function(t,e,i){"use strict";function r(t,e,i){this.x=null,this.y=null,null==t&&null==e&&null==i?(this.x=0,this.y=0):'number'==typeof t&&'number'==typeof e&&null==i?(this.x=t,this.y=e):'Point'==t.constructor.name&&null==e&&null==i&&(i=t,this.x=i.x,this.y=i.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(t,e,i){'Point'==t.constructor.name&&null==e&&null==i?(i=t,this.setLocation(i.x,i.y)):'number'==typeof t&&'number'==typeof e&&null==i&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},r.prototype.move=function(t,e){this.x=t,this.y=e},r.prototype.translate=function(t,e){this.x+=t,this.y+=e},r.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},r.prototype.toString=function(){return(new r).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=r},function(t,e,i){"use strict";function r(t,e,i,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=i&&null!=r&&(this.x=t,this.y=e,this.width=i,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(t){this.x=t},r.prototype.getY=function(){return this.y},r.prototype.setY=function(t){this.y=t},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},t.exports=r},function(t,e,i){"use strict";var r="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 n(){}n.lastID=0,n.createID=function(t){return n.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=n.getString(),n.lastID++),t.uniqueID)},n.getString=function(t){return null==t&&(t=n.lastID),"Object#"+t},n.isPrimitive=function(t){var e=void 0===t?"undefined":r(t);return null==t||"object"!=e&&"function"!=e},t.exports=n},function(t,e,i){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var n=i(0),o=i(7),s=i(3),h=i(1),a=i(6),u=i(5),l=i(17),g=i(29);function c(t){g.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}c.RANDOM_SEED=1,c.prototype=Object.create(g.prototype),c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},c.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},c.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},c.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},c.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},c.prototype.newNode=function(t){return new s(this.graphManager,t)},c.prototype.newEdge=function(t){return new h(null,null,t)},c.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},c.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),'during'!==n.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},c.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},c.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var i=this.graphManager.getRoot().getNodes();for(e=0;e<i.length;e++)i[e];this.update(this.graphManager.getRoot())}},c.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){var e=t;if(null!=e.getChild())for(var i=e.getChild().getNodes(),r=0;r<i.length;r++)update(i[r]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof h){var n=t;null!=n.vGraphObject&&n.vGraphObject.update(n)}else if(t instanceof a){var o=t;null!=o.vGraphObject&&o.vGraphObject.update(o)}},c.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},c.prototype.transform=function(t){if(null==t)this.transform(new u(0,0));else{var e=new l,i=this.graphManager.getRoot().updateLeftTop();if(null!=i){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(i.x),e.setDeviceOrgY(i.y);for(var r=this.getAllNodes(),n=0;n<r.length;n++)r[n].transform(e)}}},c.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,i,r=t.getNodes(),n=0;n<r.length;n++)null==(i=(e=r[n]).getChild())||0==i.getNodes().length?e.scatter():(this.positionNodesRandomly(i),e.updateBounds())},c.prototype.getFlatForest=function(){for(var t=[],e=!0,i=this.graphManager.getRoot().getNodes(),n=!0,o=0;o<i.length;o++)null!=i[o].getChild()&&(n=!1);if(!n)return t;var s=new Set,h=[],a=new Map,u=[];for(u=u.concat(i);u.length>0&&e;){for(h.push(u[0]);h.length>0&&e;){var l=h[0];h.splice(0,1),s.add(l);var g=l.getEdges();for(o=0;o<g.length;o++){var c=g[o].getOtherEnd(l);if(a.get(l)!=c){if(s.has(c)){e=!1;break}h.push(c),a.set(c,l)}}}if(e){var p=[].concat(r(s));for(t.push(p),o=0;o<p.length;o++){var f=p[o],d=u.indexOf(f);d>-1&&u.splice(d,1)}s=new Set,a=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n<t.bendpoints.length;n++){var o=this.newNode(null);o.setRect(new Point(0,0),new Dimension(1,1)),r.add(o);var s=this.newEdge(null);this.graphManager.add(s,i,o),e.add(o),i=o}return s=this.newEdge(null),this.graphManager.add(s,i,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):r.remove(t),e},c.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(r(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var i=t[e];if(i.bendpoints.length>0){for(var n=this.edgeToDummyNodes.get(i),o=0;o<n.length;o++){var s=n[o],h=new u(s.getCenterX(),s.getCenterY()),a=i.bendpoints.get(o);a.x=h.x,a.y=h.y,s.getOwner().remove(s)}this.graphManager.add(i,i.source,i.target)}}},c.transform=function(t,e,i,r){if(null!=i&&null!=r){var n=e;return t<=50?n-=(e-e/i)/50*(50-t):n+=(e*r-e)/50*(t-50),n}var o,s;return t<=50?(o=9*e/500,s=e/10):(o=9*e/50,s=-8*e),o*t+s},c.findCenterOfTree=function(t){var e=[];e=e.concat(t);var i=[],r=new Map,n=!1,o=null;1!=e.length&&2!=e.length||(n=!0,o=e[0]);for(var s=0;s<e.length;s++){var h=(l=e[s]).getNeighborsList().size;r.set(l,l.getNeighborsList().size),1==h&&i.push(l)}var a=[];for(a=a.concat(i);!n;){var u=[];for(u=u.concat(a),a=[],s=0;s<e.length;s++){var l=e[s],g=e.indexOf(l);g>=0&&e.splice(g,1),l.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&a.push(t),r.set(t,e)}})}i=i.concat(a),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(5);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var n=i(15),o=i(4),s=i(0),h=i(8),a=i(9);function u(){n.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var l in u.prototype=Object.create(n.prototype),n)u[l]=n[l];u.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,n,h,a,u=this.getGraphManager().getAllEdges(),l=0;l<u.length;l++)e=(t=u[l]).idealLength,t.isInterGraph&&(r=t.getSource(),n=t.getTarget(),h=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=h+a-2*s.SIMPLE_NODE_SIZE),i=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.getInclusionTreeDepth()-2*i))},u.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i<e.length;i++)t=e[i],this.calcSpringForce(t,t.idealLength)},u.prototype.calcRepulsionForces=function(){var t,e,i,r,n,s=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),n=new Set,t=0;t<a.length;t++)i=a[t],this.calculateRepulsionForceOfANode(i,n,s,h),n.add(i);else for(t=0;t<a.length;t++)for(i=a[t],e=t+1;e<a.length;e++)r=a[e],i.getOwner()==r.getOwner()&&this.calcRepulsionForce(i,r)},u.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),i=0;i<e.length;i++)t=e[i],this.calcGravitationalForce(t)},u.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},u.prototype.calcSpringForce=function(t,e){var i,r,n,o,s=t.getSource(),h=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==h.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(i=t.getLength())&&(n=(r=t.edgeElasticity*(i-e))*(t.lengthX/i),o=r*(t.lengthY/i),s.springForceX+=n,s.springForceY+=o,h.springForceX-=n,h.springForceY-=o)},u.prototype.calcRepulsionForce=function(t,e){var i,r,n,s,u,l,g,c=t.getRect(),p=e.getRect(),f=new Array(2),d=new Array(4);if(c.intersects(p)){h.calcSeparationAmount(c,p,f,o.DEFAULT_EDGE_LENGTH/2),l=2*f[0],g=2*f[1];var y=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=y*l,t.repulsionForceY-=y*g,e.repulsionForceX+=y*l,e.repulsionForceY+=y*g}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(i=p.getCenterX()-c.getCenterX(),r=p.getCenterY()-c.getCenterY()):(h.getIntersection(c,p,d),i=d[2]-d[0],r=d[3]-d[1]),Math.abs(i)<o.MIN_REPULSION_DIST&&(i=a.sign(i)*o.MIN_REPULSION_DIST),Math.abs(r)<o.MIN_REPULSION_DIST&&(r=a.sign(r)*o.MIN_REPULSION_DIST),n=i*i+r*r,s=Math.sqrt(n),l=(u=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/n)*i/s,g=u*r/s,t.repulsionForceX-=l,t.repulsionForceY-=g,e.repulsionForceX+=l,e.repulsionForceY+=g},u.prototype.calcGravitationalForce=function(t){var e,i,r,n,o,s,h,a;i=((e=t.getOwner()).getRight()+e.getLeft())/2,r=(e.getTop()+e.getBottom())/2,n=t.getCenterX()-i,o=t.getCenterY()-r,s=Math.abs(n)+t.getWidth()/2,h=Math.abs(o)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(a=e.getEstimatedSize()*this.gravityRangeFactor)||h>a)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(a=e.getEstimatedSize()*this.compoundGravityRangeFactor)||h>a)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},u.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)(t=e[i]).noOfChildren=t.getNoOfChildren()},u.prototype.calcGrid=function(t){var e,i;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),i=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(i);for(n=0;n<e;n++)for(var o=0;o<i;o++)r[n][o]=new Array;return r},u.prototype.addNodeToGrid=function(t,e,i){var r,n,o,s;r=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),n=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().y-i)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-i)/this.repulsionRange));for(var h=r;h<=n;h++)for(var a=o;a<=s;a++)this.grid[h][a].push(t),t.setGridCoordinates(r,n,o,s)},u.prototype.updateGrid=function(){var t,e,i=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<i.length;t++)e=i[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(t,e,i,n){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i||n){var s,h=new Set;t.surrounding=new Array;for(var a=this.grid,u=t.startX-1;u<t.finishX+2;u++)for(var l=t.startY-1;l<t.finishY+2;l++)if(!(u<0||l<0||u>=a.length||l>=a[0].length))for(var g=0;g<a[u][l].length;g++)if(s=a[u][l][g],t.getOwner()==s.getOwner()&&t!=s&&!e.has(s)&&!h.has(s)){var c=Math.abs(t.getCenterX()-s.getCenterX())-(t.getWidth()/2+s.getWidth()/2),p=Math.abs(t.getCenterY()-s.getCenterY())-(t.getHeight()/2+s.getHeight()/2);c<=this.repulsionRange&&p<=this.repulsionRange&&h.add(s)}t.surrounding=[].concat(r(h))}for(u=0;u<t.surrounding.length;u++)this.calcRepulsionForce(t,t.surrounding[u])},u.prototype.calcRepulsionRange=function(){return 0},t.exports=u},function(t,e,i){"use strict";var r=i(1),n=i(4);function o(t,e,i){r.call(this,t,e,i),this.idealLength=n.DEFAULT_EDGE_LENGTH,this.edgeElasticity=n.DEFAULT_SPRING_STRENGTH}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];t.exports=o},function(t,e,i){"use strict";var r=i(3),n=i(4);function o(t,e,i,o){r.call(this,t,e,i,o),this.nodeRepulsion=n.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.setGridCoordinates=function(t,e,i,r){this.startX=t,this.finishX=e,this.startY=i,this.finishY=r},t.exports=o},function(t,e,i){"use strict";function r(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},t.exports=r},function(t,e,i){"use strict";var r=i(14);function n(){this.map={},this.keys=[]}n.prototype.put=function(t,e){var i=r.createID(t);this.contains(i)||(this.map[i]=e,this.keys.push(t))},n.prototype.contains=function(t){return r.createID(t),null!=this.map[t]},n.prototype.get=function(t){var e=r.createID(t);return this.map[e]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,i){"use strict";var r=i(14);function n(){this.set={}}n.prototype.add=function(t){var e=r.createID(t);this.contains(e)||(this.set[e]=t)},n.prototype.remove=function(t){delete this.set[r.createID(t)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(t){return this.set[r.createID(t)]==t},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),i=e.length,r=0;r<i;r++)t.push(this.set[e[r]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(t){for(var e=t.length,i=0;i<e;i++){var r=t[i];this.add(r)}},t.exports=n},function(t,e,i){"use strict";function r(){}r.multMat=function(t,e){for(var i=[],r=0;r<t.length;r++){i[r]=[];for(var n=0;n<e[0].length;n++){i[r][n]=0;for(var o=0;o<t[0].length;o++)i[r][n]+=t[r][o]*e[o][n]}}return i},r.transpose=function(t){for(var e=[],i=0;i<t[0].length;i++){e[i]=[];for(var r=0;r<t.length;r++)e[i][r]=t[r][i]}return e},r.multCons=function(t,e){for(var i=[],r=0;r<t.length;r++)i[r]=t[r]*e;return i},r.minusOp=function(t,e){for(var i=[],r=0;r<t.length;r++)i[r]=t[r]-e[r];return i},r.dotProduct=function(t,e){for(var i=0,r=0;r<t.length;r++)i+=t[r]*e[r];return i},r.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},r.normalize=function(t){for(var e=[],i=this.mag(t),r=0;r<t.length;r++)e[r]=t[r]/i;return e},r.multGamma=function(t){for(var e=[],i=0,r=0;r<t.length;r++)i+=t[r];i*=-1/t.length;for(var n=0;n<t.length;n++)e[n]=i+t[n];return e},r.multL=function(t,e,i){for(var r=[],n=[],o=[],s=0;s<e[0].length;s++){for(var h=0,a=0;a<e.length;a++)h+=-.5*e[a][s]*t[a];n[s]=h}for(var u=0;u<i.length;u++){for(var l=0,g=0;g<i.length;g++)l+=i[u][g]*n[g];o[u]=l}for(var c=0;c<e.length;c++){for(var p=0,f=0;f<e[0].length;f++)p+=e[c][f]*o[f];r[c]=p}return r},t.exports=r},function(t,e,i){"use strict";var r=(function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}})();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=i(11),s=(function(){function t(e,i){n(this,t),null===i&&void 0===i||(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=e instanceof o?e.size():e.length,this._quicksort(e,0,r-1)}return r(t,[{key:'_quicksort',value:function(t,e,i){if(e<i){var r=this._partition(t,e,i);this._quicksort(t,e,r),this._quicksort(t,r+1,i)}}},{key:'_partition',value:function(t,e,i){for(var r=this._get(t,e),n=e,o=i;;){for(;this.compareFunction(r,this._get(t,o));)o--;for(;this.compareFunction(this._get(t,n),r);)n++;if(!(n<o))return o;this._swap(t,n,o),n++,o--}}},{key:'_get',value:function(t,e){return t instanceof o?t.get_object_at(e):t[e]}},{key:'_set',value:function(t,e,i){t instanceof o?t.set_object_at(e,i):t[e]=i}},{key:'_swap',value:function(t,e,i){var r=this._get(t,e);this._set(t,e,this._get(t,i)),this._set(t,i,r)}},{key:'_defaultCompareFunction',value:function(t,e){return e>t}}]),t})();t.exports=s},function(t,e,i){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=(function(t){for(var e=[];t-- >0;)e.push(0);return e})(Math.min(this.m+1,this.n)),this.U=(function t(e){if(0==e.length)return 0;for(var i=[],r=0;r<e[0];r++)i.push(t(e.slice(1)));return i})([this.m,e]),this.V=(function(t){return(function t(e){if(0==e.length)return 0;for(var i=[],r=0;r<e[0];r++)i.push(t(e.slice(1)));return i})(t)})([this.n,this.n]);for(var i=(function(t){for(var e=[];t-- >0;)e.push(0);return e})(this.n),n=(function(t){for(var e=[];t-- >0;)e.push(0);return e})(this.m),o=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),h=0;h<Math.max(o,s);h++){if(h<o){this.s[h]=0;for(var a=h;a<this.m;a++)this.s[h]=r.hypot(this.s[h],t[a][h]);if(0!==this.s[h]){t[h][h]<0&&(this.s[h]=-this.s[h]);for(var u=h;u<this.m;u++)t[u][h]/=this.s[h];t[h][h]+=1}this.s[h]=-this.s[h]}for(var l=h+1;l<this.n;l++){if((function(t,e){return t&&e})(h<o,0!==this.s[h])){for(var g=0,c=h;c<this.m;c++)g+=t[c][h]*t[c][l];g=-g/t[h][h];for(var p=h;p<this.m;p++)t[p][l]+=g*t[p][h]}i[l]=t[h][l]}if((function(t,e){return e})(0,h<o))for(var f=h;f<this.m;f++)this.U[f][h]=t[f][h];if(h<s){i[h]=0;for(var d=h+1;d<this.n;d++)i[h]=r.hypot(i[h],i[d]);if(0!==i[h]){i[h+1]<0&&(i[h]=-i[h]);for(var y=h+1;y<this.n;y++)i[y]/=i[h];i[h+1]+=1}if(i[h]=-i[h],(function(t,e){return t&&e})(h+1<this.m,0!==i[h])){for(var v=h+1;v<this.m;v++)n[v]=0;for(var E=h+1;E<this.n;E++)for(var A=h+1;A<this.m;A++)n[A]+=i[E]*t[A][E];for(var _=h+1;_<this.n;_++)for(var O=-i[_]/i[h+1],N=h+1;N<this.m;N++)t[N][_]+=O*n[N]}for(var L=h+1;L<this.n;L++)this.V[L][h]=i[L]}}var I=Math.min(this.n,this.m+1);o<this.n&&(this.s[o]=t[o][o]),this.m<I&&(this.s[I-1]=0),s+1<I&&(i[s]=t[s][I-1]),i[I-1]=0;for(var T=o;T<e;T++){for(var D=0;D<this.m;D++)this.U[D][T]=0;this.U[T][T]=1}for(var M=o-1;M>=0;M--)if(0!==this.s[M]){for(var w=M+1;w<e;w++){for(var R=0,x=M;x<this.m;x++)R+=this.U[x][M]*this.U[x][w];R=-R/this.U[M][M];for(var C=M;C<this.m;C++)this.U[C][w]+=R*this.U[C][M]}for(var G=M;G<this.m;G++)this.U[G][M]=-this.U[G][M];this.U[M][M]=1+this.U[M][M];for(var U=0;U<M-1;U++)this.U[U][M]=0}else{for(var b=0;b<this.m;b++)this.U[b][M]=0;this.U[M][M]=1}for(var S=this.n-1;S>=0;S--){if((function(t,e){return t&&e})(S<s,0!==i[S]))for(var F=S+1;F<e;F++){for(var Y=0,X=S+1;X<this.n;X++)Y+=this.V[X][S]*this.V[X][F];Y=-Y/this.V[S+1][S];for(var P=S+1;P<this.n;P++)this.V[P][F]+=Y*this.V[P][S]}for(var k=0;k<this.n;k++)this.V[k][S]=0;this.V[S][S]=1}for(var V=I-1,B=Math.pow(2,-52),H=Math.pow(2,-966);I>0;){var W=void 0,q=void 0;for(W=I-2;W>=-1&&-1!==W;W--)if(Math.abs(i[W])<=H+B*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){i[W]=0;break}if(W===I-2)q=4;else{var j=void 0;for(j=I-1;j>=W&&j!==W;j--){var z=(j!==I?Math.abs(i[j]):0)+(j!==W+1?Math.abs(i[j-1]):0);if(Math.abs(this.s[j])<=H+B*z){this.s[j]=0;break}}j===W?q=3:j===I-1?q=1:(q=2,W=j)}switch(W++,q){case 1:var Z=i[I-2];i[I-2]=0;for(var Q=I-2;Q>=W;Q--){var K=r.hypot(this.s[Q],Z),J=this.s[Q]/K,$=Z/K;this.s[Q]=K,Q!==W&&(Z=-$*i[Q-1],i[Q-1]=J*i[Q-1]);for(var tt=0;tt<this.n;tt++)K=J*this.V[tt][Q]+$*this.V[tt][I-1],this.V[tt][I-1]=-$*this.V[tt][Q]+J*this.V[tt][I-1],this.V[tt][Q]=K}break;case 2:var et=i[W-1];i[W-1]=0;for(var it=W;it<I;it++){var rt=r.hypot(this.s[it],et),nt=this.s[it]/rt,ot=et/rt;this.s[it]=rt,et=-ot*i[it],i[it]=nt*i[it];for(var st=0;st<this.m;st++)rt=nt*this.U[st][it]+ot*this.U[st][W-1],this.U[st][W-1]=-ot*this.U[st][it]+nt*this.U[st][W-1],this.U[st][it]=rt}break;case 3:var ht=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[I-1]),Math.abs(this.s[I-2])),Math.abs(i[I-2])),Math.abs(this.s[W])),Math.abs(i[W])),at=this.s[I-1]/ht,ut=this.s[I-2]/ht,lt=i[I-2]/ht,gt=this.s[W]/ht,ct=i[W]/ht,pt=((ut+at)*(ut-at)+lt*lt)/2,ft=at*lt*(at*lt),dt=0;(function(t,e){return t||e})(0!==pt,0!==ft)&&(dt=Math.sqrt(pt*pt+ft),pt<0&&(dt=-dt),dt=ft/(pt+dt));for(var yt=(gt+at)*(gt-at)+dt,vt=gt*ct,Et=W;Et<I-1;Et++){var At=r.hypot(yt,vt),_t=yt/At,Ot=vt/At;Et!==W&&(i[Et-1]=At),yt=_t*this.s[Et]+Ot*i[Et],i[Et]=_t*i[Et]-Ot*this.s[Et],vt=Ot*this.s[Et+1],this.s[Et+1]=_t*this.s[Et+1];for(var Nt=0;Nt<this.n;Nt++)At=_t*this.V[Nt][Et]+Ot*this.V[Nt][Et+1],this.V[Nt][Et+1]=-Ot*this.V[Nt][Et]+_t*this.V[Nt][Et+1],this.V[Nt][Et]=At;if(_t=yt/(At=r.hypot(yt,vt)),Ot=vt/At,this.s[Et]=At,yt=_t*i[Et]+Ot*this.s[Et+1],this.s[Et+1]=-Ot*i[Et]+_t*this.s[Et+1],vt=Ot*i[Et+1],i[Et+1]=_t*i[Et+1],Et<this.m-1)for(var mt=0;mt<this.m;mt++)At=_t*this.U[mt][Et]+Ot*this.U[mt][Et+1],this.U[mt][Et+1]=-Ot*this.U[mt][Et]+_t*this.U[mt][Et+1],this.U[mt][Et]=At}i[I-2]=yt;break;case 4:if(this.s[W]<=0){this.s[W]=this.s[W]<0?-this.s[W]:0;for(var Lt=0;Lt<=V;Lt++)this.V[Lt][W]=-this.V[Lt][W]}for(;W<V&&!(this.s[W]>=this.s[W+1]);){var It=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=It,W<this.n-1)for(var Tt=0;Tt<this.n;Tt++)It=this.V[Tt][W+1],this.V[Tt][W+1]=this.V[Tt][W],this.V[Tt][W]=It;if(W<this.m-1)for(var Dt=0;Dt<this.m;Dt++)It=this.U[Dt][W+1],this.U[Dt][W+1]=this.U[Dt][W],this.U[Dt][W]=It;W++}I--}}return{U:this.U,V:this.V,S:this.s}},r.hypot=function(t,e){var i=void 0;return Math.abs(t)>Math.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=r},function(t,e,i){"use strict";var r=(function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}})();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=(function(){function t(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;n(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=s,this.iMax=e.length+1,this.jMax=i.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 a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[u][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(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 e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var r=1;r<this.jMax;r++){var n=[this.sequence1[i-1]===this.sequence2[r-1]?this.grid[i-1][r-1]+this.match_score:this.grid[i-1][r-1]+this.mismatch_penalty,this.grid[i-1][r]+this.gap_penalty,this.grid[i][r-1]+this.gap_penalty],o=this.arrayAllMaxIndexes(n);this.grid[i][r]=n[o[0]],this.tracebackGrid[i][r]=[o.includes(0),o.includes(1),o.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 e=t[0],i=this.tracebackGrid[e.pos[0]][e.pos[1]];i[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),i[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:'-'+e.seq2}),i[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:'-'+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var i=[],r=-1;-1!==(r=t.indexOf(e,r+1));)i.push(r);return i}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t})();t.exports=o},function(t,e,i){"use strict";var r=function(){};r.FDLayout=i(18),r.FDLayoutConstants=i(4),r.FDLayoutEdge=i(19),r.FDLayoutNode=i(20),r.DimensionD=i(21),r.HashMap=i(22),r.HashSet=i(23),r.IGeometry=i(8),r.IMath=i(9),r.Integer=i(10),r.Point=i(12),r.PointD=i(5),r.RandomSeed=i(16),r.RectangleD=i(13),r.Transform=i(17),r.UniqueIDGeneretor=i(14),r.Quicksort=i(25),r.LinkedList=i(11),r.LGraphObject=i(2),r.LGraph=i(6),r.LEdge=i(1),r.LGraphManager=i(7),r.LNode=i(3),r.Layout=i(15),r.LayoutConstants=i(0),r.NeedlemanWunsch=i(27),r.Matrix=i(24),r.SVD=i(26),t.exports=r},function(t,e,i){"use strict";function r(){this.listeners=[]}var n=r.prototype;n.addListener=function(t,e){this.listeners.push({event:t,callback:e})},n.removeListener=function(t,e){for(var i=this.listeners.length;i>=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i<this.listeners.length;i++){var r=this.listeners[i];t===r.event&&r.callback(e)}},t.exports=r}])},'object'==typeof _e&&'object'==typeof m?m.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof _e?_e.layoutBase=e():t.layoutBase=e()},5331,[]);
1
+ __d(function(_g,r,_i,_a,_m,_e,d){"use strict";var e;function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"diagram",{enumerable:!0,get:function(){return te}});var i=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),a=r(d[4]),l=r(d[5]),c=r(d[6]),h=r(d[7]),f=r(d[8]),g=t(r(d[9])),u=t(r(d[10])),p=r(d[11]),m={L:"left",R:"right",T:"top",B:"bottom"},y={L:(0,h.__name)(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:(0,h.__name)(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:(0,h.__name)(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:(0,h.__name)(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},w={L:(0,h.__name)((e,t)=>e-t+2,"L"),R:(0,h.__name)((e,t)=>e-2,"R"),T:(0,h.__name)((e,t)=>e-t+2,"T"),B:(0,h.__name)((e,t)=>e-2,"B")},x=(0,h.__name)(function(e){return b(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),k=(0,h.__name)(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),b=(0,h.__name)(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),$=(0,h.__name)(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),_=(0,h.__name)(function(e,t){const i=b(e)&&$(t),n=$(e)&&b(t);return i||n},"isArchitectureDirectionXY"),v=(0,h.__name)(function(e){const t=e[0],i=e[1],n=b(t)&&$(i),s=$(t)&&b(i);return n||s},"isArchitecturePairXY"),E=(0,h.__name)(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),I=(0,h.__name)(function(e,t){const i=`${e}${t}`;return E(i)?i:void 0},"getArchitectureDirectionPair"),T=(0,h.__name)(function([e,t],i){const n=i[0],s=i[1];return b(n)?$(s)?[e+("L"===n?-1:1),t+("T"===s?1:-1)]:[e+("L"===n?-1:1),t]:b(s)?[e+("L"===s?1:-1),t+("T"===n?1:-1)]:[e,t+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),D=(0,h.__name)(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),j=(0,h.__name)(function(e,t){return _(e,t)?"bend":b(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),C=(0,h.__name)(function(e){return"service"===e.type},"isArchitectureService"),L=(0,h.__name)(function(e){return"junction"===e.type},"isArchitectureJunction"),S=(0,h.__name)(e=>e.data(),"edgeData"),A=(0,h.__name)(e=>e.data(),"nodeData"),B=l.defaultConfig_default.architecture,F=(e=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=l.setAccTitle,this.getAccTitle=l.getAccTitle,this.setDiagramTitle=l.setDiagramTitle,this.getDiagramTitle=l.getDiagramTitle,this.getAccDescription=l.getAccDescription,this.setAccDescription=l.setAccDescription,this.clear()}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,l.clear)()}addService({id:e,icon:t,in:i,title:n,iconText:s}){if(void 0!==this.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(void 0!==i){if(e===i)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:s,title:n,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(C)}addJunction({id:e,in:t}){if(void 0!==this.registeredIds[e])throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);if(void 0!==t){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(L)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:i,title:n}){if(void 0!==this.registeredIds?.[e])throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(void 0!==i){if(e===i)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===this.registeredIds?.[i])throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[i])throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:n,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:i,rhsDir:n,lhsInto:s,rhsInto:o,lhsGroup:a,rhsGroup:l,title:c}){if(!k(i))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(i)}`);if(!k(n))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const h=this.nodes[e].in,f=this.nodes[t].in;if(a&&h&&f&&h==f)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&h&&f&&h==f)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:e,lhsDir:i,lhsInto:s,lhsGroup:a,rhsId:t,rhsDir:n,rhsInto:o,rhsGroup:l,title:c};this.edges.push(g),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(i=>{if("node"!==this.registeredIds[i])throw new Error(`align ${e.direction} references [${i}], which is not a service or junction`);if(t.has(i))throw new Error(`align ${e.direction} lists [${i}] more than once`);t.add(i)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(void 0===this.dataStructures){const e={},t=Object.entries(this.nodes).reduce((t,[i,n])=>(t[i]=n.edges.reduce((t,n)=>{const s=this.getNode(n.lhsId)?.in,o=this.getNode(n.rhsId)?.in;if(s&&o&&s!==o){const t=j(n.lhsDir,n.rhsDir);"bend"!==t&&(e[s]??={},e[s][o]=t,e[o]??={},e[o][s]=t)}if(n.lhsId===i){const e=I(n.lhsDir,n.rhsDir);e&&(t[e]=n.rhsId)}else{const e=I(n.rhsDir,n.lhsDir);e&&(t[e]=n.lhsId)}return t},{}),t),{}),i=Object.keys(t)[0],n={[i]:1},s=Object.keys(t).reduce((e,t)=>t===i?e:Object.assign({},e,{[t]:1}),{}),o=(0,h.__name)(e=>{const i={[e]:[0,0]},o=[e];for(;o.length>0;){const e=o.shift();if(e){n[e]=1,delete s[e];const a=t[e],[l,c]=i[e];Object.entries(a).forEach(([e,t])=>{n[t]||(i[t]=T([l,c],e),o.push(t))})}}return i},"BFS"),a=[o(i)];for(;Object.keys(s).length>0;)a.push(o(Object.keys(s)[0]));this.dataStructures={adjList:t,spatialMaps:a,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return(0,a.cleanAndMerge)(Object.assign({},B,(0,l.getConfig)().architecture))}getConfigField(e){return this.getConfig()[e]}},(0,h.__name)(e,"ArchitectureDB"),e),M=(0,h.__name)((e,t)=>{(0,i.populateCommonDb)(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService(Object.assign({},e,{type:"service"}))),e.junctions.map(e=>t.addJunction(Object.assign({},e,{type:"junction"}))),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},"populateDb"),O={parser:{yy:void 0},parse:(0,h.__name)(async e=>{const t=await(0,f.parse)("architecture",e);c.log.debug(t);const i=O.parser?.yy;if(!(i instanceof F))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");M(t,i)},"parse")},z=(0,h.__name)(e=>`\n .edge {\n stroke-width: ${e.archEdgeWidth};\n stroke: ${e.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${e.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${e.archGroupBorderColor};\n stroke-width: ${e.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles");function R(e,t){if(0===e)return t();const i=Math.random;let n=e>>>0;Math.random=function(){n=n+1831565813>>>0;let e=n;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=i}}(0,h.__name)(R,"withSeededRandom");var G=(0,h.__name)(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),P={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:G('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:G('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:G('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:G('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:G('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:o.unknownIcon,blank:{body:G("")}}},H=(0,h.__name)(async function(e,t,i,n){const o=i.getConfigField("padding"),c=i.getConfigField("iconSize"),h=c/2,f=c/6,g=f/2;await Promise.all(t.edges().map(async t=>{const{source:c,sourceDir:u,sourceArrow:p,sourceGroup:m,target:x,targetDir:k,targetArrow:E,targetGroup:T,label:j}=S(t);let{x:C,y:L}=t[0].sourceEndpoint();const{x:A,y:B}=t[0].midpoint();let{x:F,y:M}=t[0].targetEndpoint();const O=o+4;if(m&&(b(u)?C+="L"===u?-O:O:L+="T"===u?-O:O+18),T&&(b(k)?F+="L"===k?-O:O:M+="T"===k?-O:O+18),m||"junction"!==i.getNode(c)?.type||(b(u)?C+="L"===u?h:-h:L+="T"===u?h:-h),T||"junction"!==i.getNode(x)?.type||(b(k)?F+="L"===k?h:-h:M+="T"===k?h:-h),t[0]._private.rscratch){const t=e.insert("g");if(t.insert("path").attr("d",`M ${C},${L} L ${A},${B} L${F},${M} `).attr("class","edge").attr("id",`${n}-${(0,a.getEdgeId)(c,x,{prefix:"L"})}`),p){const e=b(u)?w[u](C,f):C-g,i=$(u)?w[u](L,f):L-g;t.insert("polygon").attr("points",y[u](f)).attr("transform",`translate(${e},${i})`).attr("class","arrow")}if(E){const e=b(k)?w[k](F,f):F-g,i=$(k)?w[k](M,f):M-g;t.insert("polygon").attr("points",y[k](f)).attr("transform",`translate(${e},${i})`).attr("class","arrow")}if(j){const e=_(u,k)?"XY":b(u)?"X":"Y";let i=0;i="X"===e?Math.abs(C-F):"Y"===e?Math.abs(L-M)/1.5:Math.abs(C-F)/2;const n=t.append("g");if(await(0,s.createText)(n,j,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,l.getConfig2)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===e)n.attr("transform","translate("+A+", "+B+")");else if("Y"===e)n.attr("transform","translate("+A+", "+B+") rotate(-90)");else if("XY"===e){const e=I(u,k);if(e&&v(e)){const t=n.node().getBoundingClientRect(),[i,s]=D(e);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*s*45})`);const o=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${A}, ${B-t.height/2})\n translate(${i*o.width/2}, ${s*o.height/2})\n rotate(${-1*i*s*45}, 0, ${t.height/2})\n `)}}}}}))},"drawEdges"),N=(0,h.__name)(async function(e,t,i,n){const a=.75*i.getConfigField("padding"),c=i.getConfigField("fontSize"),h=i.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async t=>{const f=A(t);if("group"===f.type){const{h:g,w:u,x1:p,y1:m}=t.boundingBox(),y=e.append("rect");y.attr("id",`${n}-group-${f.id}`).attr("x",p+h).attr("y",m+h).attr("width",u).attr("height",g).attr("class","node-bkg");const w=e.append("g");let x=p,k=m;if(f.icon){const e=w.append("g");e.html(`<g>${await(0,o.getIconSVG)(f.icon,{height:a,width:a,fallbackPrefix:P.prefix})}</g>`),e.attr("transform","translate("+(x+h+1)+", "+(k+h+1)+")"),x+=a,k+=c/2-1-2}if(f.label){const e=w.append("g");await(0,s.createText)(e,f.label,{useHtmlLabels:!1,width:u,classes:"architecture-service-label"},(0,l.getConfig2)()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),e.attr("transform","translate("+(x+h+4)+", "+(k+h+2)+")")}i.setElementForId(f.id,y)}}))},"drawGroups"),X=(0,h.__name)(async function(e,t,i,n){const a=(0,l.getConfig2)();for(const c of i){const i=t.append("g"),h=e.getConfigField("iconSize");if(c.title){const e=i.append("g");await(0,s.createText)(e,c.title,{useHtmlLabels:!1,width:1.5*h,classes:"architecture-service-label"},a),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+h/2+", "+h+")")}const f=i.append("g");if(c.icon)f.html(`<g>${await(0,o.getIconSVG)(c.icon,{height:h,width:h,fallbackPrefix:P.prefix})}</g>`);else if(c.iconText){f.html(`<g>${await(0,o.getIconSVG)("blank",{height:h,width:h,fallbackPrefix:P.prefix})}</g>`);const e=f.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html((0,l.sanitizeText)(c.iconText,a)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;e.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/t)};`)}else f.append("path").attr("class","node-bkg").attr("id",`${n}-node-${c.id}`).attr("d",`M0,${h} V5 Q0,0 5,0 H${h-5} Q${h},0 ${h},5 V${h} Z`);i.attr("id",`${n}-service-${c.id}`).attr("class","architecture-service");const{width:g,height:u}=i.node().getBBox();c.width=g,c.height=u,e.setElementForId(c.id,i)}return 0},"drawServices"),Y=(0,h.__name)(function(e,t,i,n){i.forEach(i=>{const s=t.append("g"),o=e.getConfigField("iconSize");s.append("g").append("rect").attr("id",`${n}-node-${i.id}`).attr("fill-opacity","0").attr("width",o).attr("height",o),s.attr("class","architecture-junction");const{width:a,height:l}=s._groups[0][0].getBBox();s.width=a,s.height=l,e.setElementForId(i.id,s)})},"drawJunctions");function Z(e,t,i){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-service"})})}function V(e,t,i){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-junction"})})}function J(e,t){t.nodes().map(t=>{const i=A(t);if("group"===i.type)return;i.x=t.position().x,i.y=t.position().y;e.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")})}function q(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function W(e,t){e.forEach(e=>{const{lhsId:i,rhsId:n,lhsInto:s,lhsGroup:o,rhsInto:a,lhsDir:l,rhsDir:c,rhsGroup:h,title:f}=e,g=_(e.lhsDir,e.rhsDir)?"segments":"straight",u={id:`${i}-${n}`,label:f,source:i,sourceDir:l,sourceArrow:s,sourceGroup:o,sourceEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%",target:n,targetDir:c,targetArrow:a,targetGroup:h,targetEndpoint:"L"===c?"0 50%":"R"===c?"100% 50%":"T"===c?"50% 0":"50% 100%"};t.add({group:"edges",data:u,classes:g})})}function Q(e,t,i,n=[]){const s=(0,h.__name)((e,t)=>Object.entries(e).reduce((e,[n,s])=>{let o=0;const a=Object.entries(s);if(1===a.length)return e[n]=a[0][1],e;for(let s=0;s<a.length-1;s++)for(let l=s+1;l<a.length;l++){const[c,h]=a[s],[f,g]=a[l],u=i[c]?.[f];if(u===t)e[n]??=[],e[n]=[...e[n],...h,...g];else if("default"===c||"default"===f)e[n]??=[],e[n]=[...e[n],...h,...g];else{e[`${n}-${o++}`]=h;e[`${n}-${o++}`]=g}}return e},{}),"flattenAlignments"),o=t.map(t=>{const i={},n={};return Object.entries(t).forEach(([t,[s,o]])=>{const a=e.getNode(t)?.in??"default";i[o]??={},i[o][a]??=[],i[o][a].push(t),n[s]??={},n[s][a]??=[],n[s][a].push(t)}),{horiz:Object.values(s(i,"horizontal")).filter(e=>e.length>1),vert:Object.values(s(n,"vertical")).filter(e=>e.length>1)}}),[a,l]=o.reduce(([e,t],{horiz:i,vert:n})=>[[...e,...i],[...t,...n]],[[],[]]),c=new Set;n.forEach(e=>e.members.forEach(e=>c.add(e)));const f=(0,h.__name)(e=>e.filter(e=>!e.some(e=>c.has(e))),"dropOverlapping"),g=f(a),u=f(l);return n.forEach(e=>{e.members.length<2||("row"===e.direction?g.push([...e.members]):u.push([...e.members]))}),{horizontal:g,vertical:u}}function K(e,t,i=[]){const n=[],s=t.getConfigField("iconSize"),o=t.getConfigField("idealEdgeLengthMultiplier"),a=o*s,l=new Set;i.forEach(e=>{for(let t=0;t<e.members.length-1;t++){const i=e.members[t],s=e.members[t+1];l.add(`${i}|${s}`),l.add(`${s}|${i}`),"row"===e.direction?n.push({left:i,right:s,gap:a}):n.push({top:i,bottom:s,gap:a})}});const c=(0,h.__name)(e=>`${e[0]},${e[1]}`,"posToStr"),f=(0,h.__name)(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{const t=Object.fromEntries(Object.entries(e).map(([e,t])=>[c(t),e])),i=[c([0,0])],a={},h={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;i.length>0;){const e=i.shift();if(e){a[e]=1;const g=t[e];if(g){const u=f(e);Object.entries(h).forEach(([e,h])=>{const f=c([u[0]+h[0],u[1]+h[1]]),p=t[f];if(p&&!a[f]){if(i.push(f),l.has(`${g}|${p}`))return;n.push({[m[e]]:p,[m[x(e)]]:g,gap:o*s})}})}}}}),n}function U(e,t,i,n,s,{spatialMaps:o,groupAlignments:a}){return new Promise(l=>{const f=(0,p.select)("body").append("div").attr("id","cy").attr("style","display:none"),u=(0,g.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${s.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${s.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),q(i,u),Z(e,u,s),V(t,u,s),W(n,u);const m=s.getLayoutHints(),y=Q(s,o,a,m),w=K(o,s,m),x=s.getConfigField("iconSize"),k=s.getConfigField("idealEdgeLengthMultiplier")*x,b=.5*x,_=s.getConfigField("edgeElasticity"),v=s.getConfigField("seed"),E=u.layout({name:"fcose",quality:"proof",randomize:s.getConfigField("randomize"),nodeSeparation:s.getConfigField("nodeSeparation"),numIter:s.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){const[t,i]=e.connectedNodes(),{parent:n}=A(t),{parent:s}=A(i);return n===s?k:b},edgeElasticity(e){const[t,i]=e.connectedNodes(),{parent:n}=A(t),{parent:s}=A(i);return n===s?_:.001},alignmentConstraint:y,relativePlacementConstraint:w});E.one("layoutstop",()=>{function e(e,t,i,n){let s,o;const{x:a,y:l}=e,{x:c,y:h}=t;o=(n-l+(a-i)*(l-h)/(a-c))/Math.sqrt(1+Math.pow((l-h)/(a-c),2)),s=Math.sqrt(Math.pow(n-l,2)+Math.pow(i-a,2)-Math.pow(o,2));s/=Math.sqrt(Math.pow(c-a,2)+Math.pow(h-l,2));let f=(c-a)*(n-l)-(h-l)*(i-a);switch(!0){case f>=0:f=1;break;case f<0:f=-1}let g=(c-a)*(i-a)+(h-l)*(n-l);switch(!0){case g>=0:g=1;break;case g<0:g=-1}return o=Math.abs(o)*f,s*=g,{distances:o,weights:s}}(0,h.__name)(e,"getSegmentWeights"),u.startBatch();for(const t of Object.values(u.edges()))if(t.data?.()){const{x:i,y:n}=t.source().position(),{x:s,y:o}=t.target().position();if(i!==s&&n!==o){const i=t.sourceEndpoint(),n=t.targetEndpoint(),{sourceDir:s}=S(t),[o,a]=$(s)?[i.x,n.y]:[n.x,i.y],{weights:l,distances:c}=e(i,n,o,a);t.style("segment-distances",c),t.style("segment-weights",l)}}u.endBatch(),R(v,()=>E.run())});try{R(v,()=>E.run())}catch(e){if(e instanceof RangeError&&e.message.includes("Invalid array length"))throw new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw e}u.ready(e=>{c.log.info("Ready",e),l(u)})})}(0,o.registerIconPacks)([{name:P.prefix,icons:P}]),g.default.use(u.default),(0,h.__name)(Z,"addServices"),(0,h.__name)(V,"addJunctions"),(0,h.__name)(J,"positionNodes"),(0,h.__name)(q,"addGroups"),(0,h.__name)(W,"addEdges"),(0,h.__name)(Q,"getAlignments"),(0,h.__name)(K,"getRelativeConstraints"),(0,h.__name)(U,"layoutArchitecture");var ee={draw:(0,h.__name)(async(e,t,i,s)=>{const o=s.db;o.setDiagramId(t);const a=o.getServices(),c=o.getJunctions(),h=o.getGroups(),f=o.getEdges(),g=o.getDataStructures(),u=(0,n.selectSvgElement)(t),p=u.append("g");p.attr("class","architecture-edges");const m=u.append("g");m.attr("class","architecture-services");const y=u.append("g");y.attr("class","architecture-groups"),await X(o,m,a,t),Y(o,m,c,t);const w=await U(a,c,h,f,o,g);await H(p,w,o,t),await N(y,w,o,t),J(o,w),(0,l.setupGraphViewbox)(void 0,u,o.getConfigField("padding"),o.getConfigField("useMaxWidth"))},"draw")},te={parser:O,get db(){return new F},renderer:ee,styles:z}},3311,[5154,3268,3276,3277,3278,3279,3280,3281,5153,5131,5330,3283]);
2
+ __d(function(g,r,_i0,a,m,_e2,d){var e,n;e=this,n=function(e){return(()=>{"use strict";var n={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];return t.forEach(function(n){Object.keys(n).forEach(function(t){return e[t]=n[t]})}),e}},548:(e,n,t)=>{var o=(function(){function e(e,n){var t=[],o=!0,i=!1,s=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done)&&(t.push(l.value),!n||t.length!==n);o=!0);}catch(e){i=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=t(140).layoutBase.LinkedList,s={getTopMostNodes:function(e){for(var n={},t=0;t<e.length;t++)n[e[t].id()]=!0;var o=e.filter(function(e,t){"number"==typeof e&&(e=t);for(var o=e.parent()[0];null!=o;){if(n[o.id()])return!1;o=o.parent()[0]}return!0});return o},connectComponents:function(e,n,t,o){var s=new i,l=new Set,c=[],u=void 0,f=void 0,h=void 0,E=!1,p=1,v=[],y=[],N=function(){var o=e.collection();y.push(o);var i=t[0],N=e.collection();N.merge(i).merge(i.descendants().intersection(n)),c.push(i),N.forEach(function(e){s.push(e),l.add(e),o.merge(e)});for(var C=function(){i=s.shift();var f=e.collection();i.neighborhood().nodes().forEach(function(e){n.intersection(i.edgesWith(e)).length>0&&f.merge(e)});for(var h=0;h<f.length;h++){var E=f[h];null==(u=t.intersection(E.union(E.ancestors())))||l.has(u[0])||u.union(u.descendants()).forEach(function(e){s.push(e),l.add(e),o.merge(e),t.has(e)&&c.push(e)})}};0!=s.length;)C();if(o.forEach(function(e){n.intersection(e.connectedEdges()).forEach(function(e){o.has(e.source())&&o.has(e.target())&&o.merge(e)})}),c.length==t.length&&(E=!0),!E||E&&p>1){f=c[0],h=f.connectedEdges().length,c.forEach(function(e){e.connectedEdges().length<h&&(h=e.connectedEdges().length,f=e)}),v.push(f.id());var T=e.collection();T.merge(c[0]),c.forEach(function(e){T.merge(e)}),c=[],t=t.difference(T),p++}};do{N()}while(!E);return o&&v.length>0&&o.set('dummy'+(o.size+1),v),y},relocateComponent:function(e,n,t){if(!t.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if("draft"==t.quality){var u=!0,f=!1,h=void 0;try{for(var E,p=n.nodeIndexes[Symbol.iterator]();!(u=(E=p.next()).done);u=!0){var v=E.value,y=o(v,2),N=y[0],C=y[1],T=t.cy.getElementById(N);if(T){var I=T.boundingBox(),_=n.xCoords[C]-I.w/2,L=n.xCoords[C]+I.w/2,A=n.yCoords[C]-I.h/2,x=n.yCoords[C]+I.h/2;_<i&&(i=_),L>s&&(s=L),A<l&&(l=A),x>c&&(c=x)}}}catch(e){f=!0,h=e}finally{try{!u&&p.return&&p.return()}finally{if(f)throw h}}var R=e.x-(s+i)/2,O=e.y-(c+l)/2;n.xCoords=n.xCoords.map(function(e){return e+R}),n.yCoords=n.yCoords.map(function(e){return e+O})}else{Object.keys(n).forEach(function(e){var t=n[e],o=t.getRect().x,u=t.getRect().x+t.getRect().width,f=t.getRect().y,h=t.getRect().y+t.getRect().height;o<i&&(i=o),u>s&&(s=u),f<l&&(l=f),h>c&&(c=h)});var b=e.x-(s+i)/2,D=e.y-(c+l)/2;Object.keys(n).forEach(function(e){var t=n[e];t.setCenter(t.getCenterX()+b,t.getCenterY()+D)})}}},calcBoundingBox:function(e,n,t,o){for(var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=void 0,f=void 0,h=void 0,E=void 0,p=e.descendants().not(":parent"),v=p.length,y=0;y<v;y++){var N=p[y];i>(u=n[o.get(N.id())]-N.width()/2)&&(i=u),s<(f=n[o.get(N.id())]+N.width()/2)&&(s=f),l>(h=t[o.get(N.id())]-N.height()/2)&&(l=h),c<(E=t[o.get(N.id())]+N.height()/2)&&(c=E)}var C={};return C.topLeftX=i,C.topLeftY=l,C.width=s-i,C.height=c-l,C},calcParentsWithoutChildren:function(e,n){var t=e.collection();return n.nodes(':parent').forEach(function(e){var n=!1;e.children().forEach(function(e){'none'!=e.css('display')&&(n=!0)}),n||t.merge(e)}),t}};e.exports=s},816:(e,n,t)=>{var o=t(548),i=t(140).CoSELayout,s=t(140).CoSENode,l=t(140).layoutBase.PointD,c=t(140).layoutBase.DimensionD,u=t(140).layoutBase.LayoutConstants,f=t(140).layoutBase.FDLayoutConstants,h=t(140).CoSEConstants;e.exports={coseLayout:function(e,n){var t=e.cy,E=e.eles,p=E.nodes(),v=E.edges(),y=void 0,N=void 0,C=void 0,T={};e.randomize&&(y=n.nodeIndexes,N=n.xCoords,C=n.yCoords);var I=function(e){return'function'==typeof e},_=function(e,n){return I(e)?e(n):e},L=o.calcParentsWithoutChildren(t,E);null!=e.nestingFactor&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(h.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(h.MAX_ITERATIONS=f.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),null!=e.tilingCompareBy&&(h.TILING_COMPARE_BY=e.tilingCompareBy),'proof'==e.quality?u.QUALITY=2:u.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!e.randomize,h.ANIMATE=f.ANIMATE=u.ANIMATE=e.animate,h.TILE=e.tile,h.TILING_PADDING_VERTICAL='function'==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL='function'==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!e.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,"transformed"==e.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),"enforced"==e.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),"cose"==e.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),"all"==e.step&&(e.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var A=new i,x=A.newGraphManager();return(function e(n,t,i,u){for(var f=t.length,h=0;h<f;h++){var E=t[h],p=null;0==E.intersection(L).length&&(p=E.children());var v=void 0,I=E.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(null!=E.outerWidth()&&null!=E.outerHeight())if(u.randomize)if(E.isParent()){var A=o.calcBoundingBox(E,N,C,y);v=0==E.intersection(L).length?n.add(new s(i.graphManager,new l(A.topLeftX,A.topLeftY),new c(A.width,A.height))):n.add(new s(i.graphManager,new l(A.topLeftX,A.topLeftY),new c(parseFloat(I.w),parseFloat(I.h))))}else v=n.add(new s(i.graphManager,new l(N[y.get(E.id())]-I.w/2,C[y.get(E.id())]-I.h/2),new c(parseFloat(I.w),parseFloat(I.h))));else v=n.add(new s(i.graphManager,new l(E.position('x')-I.w/2,E.position('y')-I.h/2),new c(parseFloat(I.w),parseFloat(I.h))));else v=n.add(new s(this.graphManager));v.id=E.data("id"),v.nodeRepulsion=_(u.nodeRepulsion,E),v.paddingLeft=parseInt(E.css('padding')),v.paddingTop=parseInt(E.css('padding')),v.paddingRight=parseInt(E.css('padding')),v.paddingBottom=parseInt(E.css('padding')),u.nodeDimensionsIncludeLabels&&(v.labelWidth=E.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,v.labelHeight=E.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,v.labelPosVertical=E.css("text-valign"),v.labelPosHorizontal=E.css("text-halign")),T[E.data("id")]=v,isNaN(v.rect.x)&&(v.rect.x=0),isNaN(v.rect.y)&&(v.rect.y=0),null!=p&&p.length>0&&e(i.getGraphManager().add(i.newGraph(),v),p,i,u)}})(x.addRoot(),o.getTopMostNodes(p),A,e),(function(n,t,o){for(var i=0,s=0,l=0;l<o.length;l++){var c=o[l],u=T[c.data("source")],E=T[c.data("target")];if(u&&E&&u!==E&&0==u.getEdgesBetween(E).length){var p=t.add(n.newEdge(),u,E);p.id=c.id(),p.idealLength=_(e.idealEdgeLength,c),p.edgeElasticity=_(e.edgeElasticity,c),i+=p.idealLength,s++}}null!=e.idealEdgeLength&&(s>0?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=i/s:I(e.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,h.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)})(A,x,v),(function(e,n){n.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=n.fixedNodeConstraint),n.alignmentConstraint&&(e.constraints.alignmentConstraint=n.alignmentConstraint),n.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=n.relativePlacementConstraint)})(A,e),A.runLayout(),T}}},212:(e,n,t)=>{var o=(function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}})();function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var s=t(658),l=t(548),c=t(657).spectralLayout,u=t(816).coseLayout,f=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(e){return 4500},idealEdgeLength:function(e){return 50},edgeElasticity:function(e){return.45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),h=(function(){function e(n){i(this,e),this.options=s({},f,n)}return o(e,[{key:'run',value:function(){var e=this.options,n=e.cy,t=e.eles,o=[],i=[],s=void 0,f=[];!e.fixedNodeConstraint||Array.isArray(e.fixedNodeConstraint)&&0!=e.fixedNodeConstraint.length||(e.fixedNodeConstraint=void 0),e.alignmentConstraint&&(!e.alignmentConstraint.vertical||Array.isArray(e.alignmentConstraint.vertical)&&0!=e.alignmentConstraint.vertical.length||(e.alignmentConstraint.vertical=void 0),!e.alignmentConstraint.horizontal||Array.isArray(e.alignmentConstraint.horizontal)&&0!=e.alignmentConstraint.horizontal.length||(e.alignmentConstraint.horizontal=void 0)),!e.relativePlacementConstraint||Array.isArray(e.relativePlacementConstraint)&&0!=e.relativePlacementConstraint.length||(e.relativePlacementConstraint=void 0),(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint)&&(e.tile=!1,e.packComponents=!1);var h=void 0,E=!1;if(n.layoutUtilities&&e.packComponents&&((h=n.layoutUtilities("get"))||(h=n.layoutUtilities()),E=!0),t.nodes().length>0)if(E){var p=l.getTopMostNodes(e.eles.nodes());if((s=l.connectComponents(n,e.eles,p)).forEach(function(e){var n=e.boundingBox();f.push({x:n.x1+n.w/2,y:n.y1+n.h/2})}),e.randomize&&s.forEach(function(n){e.eles=n,o.push(c(e))}),"default"==e.quality||"proof"==e.quality){var v=n.collection();if(e.tile){var y=new Map,N=0,C={nodeIndexes:y,xCoords:[],yCoords:[]},T=[];if(s.forEach(function(e,n){0==e.edges().length&&(e.nodes().forEach(function(n,t){v.merge(e.nodes()[t]),n.isParent()||(C.nodeIndexes.set(e.nodes()[t].id(),N++),C.xCoords.push(e.nodes()[0].position().x),C.yCoords.push(e.nodes()[0].position().y))}),T.push(n))}),v.length>1){var I=v.boundingBox();f.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),s.push(v),o.push(C);for(var _=T.length-1;_>=0;_--)s.splice(T[_],1),o.splice(T[_],1),f.splice(T[_],1)}}s.forEach(function(n,t){e.eles=n,i.push(u(e,o[t])),l.relocateComponent(f[t],i[t],e)})}else s.forEach(function(n,t){l.relocateComponent(f[t],o[t],e)});var L=new Set;if(s.length>1){var A=[],x=t.filter(function(e){return'none'==e.css('display')});s.forEach(function(n,t){var s=void 0;if("draft"==e.quality&&(s=o[t].nodeIndexes),n.nodes().not(x).length>0){var c={edges:[],nodes:[]},u=void 0;n.nodes().not(x).forEach(function(n){if("draft"==e.quality)if(n.isParent()){var f=l.calcBoundingBox(n,o[t].xCoords,o[t].yCoords,s);c.nodes.push({x:f.topLeftX,y:f.topLeftY,width:f.width,height:f.height})}else u=s.get(n.id()),c.nodes.push({x:o[t].xCoords[u]-n.boundingbox().w/2,y:o[t].yCoords[u]-n.boundingbox().h/2,width:n.boundingbox().w,height:n.boundingbox().h});else i[t][n.id()]&&c.nodes.push({x:i[t][n.id()].getLeft(),y:i[t][n.id()].getTop(),width:i[t][n.id()].getWidth(),height:i[t][n.id()].getHeight()})}),n.edges().forEach(function(n){var u=n.source(),f=n.target();if("none"!=u.css("display")&&"none"!=f.css("display"))if("draft"==e.quality){var h=s.get(u.id()),E=s.get(f.id()),p=[],v=[];if(u.isParent()){var y=l.calcBoundingBox(u,o[t].xCoords,o[t].yCoords,s);p.push(y.topLeftX+y.width/2),p.push(y.topLeftY+y.height/2)}else p.push(o[t].xCoords[h]),p.push(o[t].yCoords[h]);if(f.isParent()){var N=l.calcBoundingBox(f,o[t].xCoords,o[t].yCoords,s);v.push(N.topLeftX+N.width/2),v.push(N.topLeftY+N.height/2)}else v.push(o[t].xCoords[E]),v.push(o[t].yCoords[E]);c.edges.push({startX:p[0],startY:p[1],endX:v[0],endY:v[1]})}else i[t][u.id()]&&i[t][f.id()]&&c.edges.push({startX:i[t][u.id()].getCenterX(),startY:i[t][u.id()].getCenterY(),endX:i[t][f.id()].getCenterX(),endY:i[t][f.id()].getCenterY()})}),c.nodes.length>0&&(A.push(c),L.add(t))}});var R=h.packComponents(A,e.randomize).shifts;if("draft"==e.quality)o.forEach(function(e,n){var t=e.xCoords.map(function(e){return e+R[n].dx}),o=e.yCoords.map(function(e){return e+R[n].dy});e.xCoords=t,e.yCoords=o});else{var O=0;L.forEach(function(e){Object.keys(i[e]).forEach(function(n){var t=i[e][n];t.setCenter(t.getCenterX()+R[O].dx,t.getCenterY()+R[O].dy)}),O++})}}}else{var b=e.eles.boundingBox();if(f.push({x:b.x1+b.w/2,y:b.y1+b.h/2}),e.randomize){var D=c(e);o.push(D)}"default"==e.quality||"proof"==e.quality?(i.push(u(e,o[0])),l.relocateComponent(f[0],i[0],e)):l.relocateComponent(f[0],o[0],e)}var M=function(n,t){if("default"==e.quality||"proof"==e.quality){"number"==typeof n&&(n=t);var s=void 0,l=void 0,c=n.data('id');return i.forEach(function(e){c in e&&(s={x:e[c].getRect().getCenterX(),y:e[c].getRect().getCenterY()},l=e[c])}),e.nodeDimensionsIncludeLabels&&(l.labelWidth&&("left"==l.labelPosHorizontal?s.x+=l.labelWidth/2:"right"==l.labelPosHorizontal&&(s.x-=l.labelWidth/2)),l.labelHeight&&("top"==l.labelPosVertical?s.y+=l.labelHeight/2:"bottom"==l.labelPosVertical&&(s.y-=l.labelHeight/2))),null==s&&(s={x:n.position("x"),y:n.position("y")}),{x:s.x,y:s.y}}var u=void 0;return o.forEach(function(e){var t=e.nodeIndexes.get(n.id());null!=t&&(u={x:e.xCoords[t],y:e.yCoords[t]})}),null==u&&(u={x:n.position("x"),y:n.position("y")}),{x:u.x,y:u.y}};if("default"==e.quality||"proof"==e.quality||e.randomize){var P=l.calcParentsWithoutChildren(n,t),F=t.filter(function(e){return'none'==e.css('display')});e.eles=t.not(F),t.nodes().not(":parent").not(F).layoutPositions(this,e,M),P.length>0&&P.forEach(function(e){e.position(M(e))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),e})();e.exports=h},657:(e,n,t)=>{var o=t(548),i=t(140).layoutBase.Matrix,s=t(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var n=e.cy,t=e.eles,l=t.nodes(),c=t.nodes(":parent"),u=new Map,f=new Map,h=new Map,E=[],p=[],v=[],y=[],N=[],C=[],T=[],I=[],_=void 0,L=1e8,A=1e-9,x=e.piTol,R=e.samplingType,O=e.nodeSeparation,b=void 0,D=function(){for(var e=0,n=0,t=!1;n<b;){e=Math.floor(Math.random()*_),t=!1;for(var o=0;o<n;o++)if(y[o]==e){t=!0;break}t||(y[n]=e,n++)}},M=function(e,n,t){for(var o=[],i=0,s=0,l=0,c=void 0,u=[],h=0,p=1,v=0;v<_;v++)u[v]=L;for(o[s]=e,u[e]=0;s>=i;){l=o[i++];for(var y=E[l],T=0;T<y.length;T++)u[c=f.get(y[T])]==L&&(u[c]=u[l]+1,o[++s]=c);C[l][n]=u[l]*O}if(t){for(var I=0;I<_;I++)C[I][n]<N[I]&&(N[I]=C[I][n]);for(var A=0;A<_;A++)N[A]>h&&(h=N[A],p=A)}return p};o.connectComponents(n,t,o.getTopMostNodes(l),u),c.forEach(function(e){o.connectComponents(n,t,o.getTopMostNodes(e.descendants().intersection(t)),u)});for(var P=0,F=0;F<l.length;F++)l[F].isParent()||f.set(l[F].id(),P++);var S=!0,G=!1,w=void 0;try{for(var U,B=u.keys()[Symbol.iterator]();!(S=(U=B.next()).done);S=!0){var Y=U.value;f.set(Y,P++)}}catch(e){G=!0,w=e}finally{try{!S&&B.return&&B.return()}finally{if(G)throw w}}for(var z=0;z<f.size;z++)E[z]=[];c.forEach(function(e){for(var n=e.children().intersection(t);0==n.nodes(":childless").length;)n=n.nodes()[0].children().intersection(t);var o=0,i=n.nodes(":childless")[0].connectedEdges().length;n.nodes(":childless").forEach(function(e,n){e.connectedEdges().length<i&&(i=e.connectedEdges().length,o=n)}),h.set(e.id(),n.nodes(":childless")[o].id())}),l.forEach(function(e){var n=void 0;n=e.isParent()?f.get(h.get(e.id())):f.get(e.id()),e.neighborhood().nodes().forEach(function(o){t.intersection(e.edgesWith(o)).length>0&&(o.isParent()?E[n].push(h.get(o.id())):E[n].push(o.id()))})});var H=function(e){var t=f.get(e),o=void 0;u.get(e).forEach(function(i){o=n.getElementById(i).isParent()?h.get(i):i,E[t].push(o),E[f.get(o)].push(e)})},V=!0,q=!1,X=void 0;try{for(var k,j=u.keys()[Symbol.iterator]();!(V=(k=j.next()).done);V=!0)H(k.value)}catch(e){q=!0,X=e}finally{try{!V&&j.return&&j.return()}finally{if(q)throw X}}var W=void 0;if((_=f.size)>2){b=_<e.sampleSize?_:e.sampleSize;for(var Q=0;Q<_;Q++)C[Q]=[];for(var Z=0;Z<b;Z++)I[Z]=[];return"draft"==e.quality||"all"==e.step?((function(e){var n=void 0;if(e){n=Math.floor(Math.random()*_);for(var t=0;t<_;t++)N[t]=L;for(var o=0;o<b;o++)y[o]=n,n=M(n,o,e)}else{D();for(var i=0;i<b;i++)M(y[i],i,e)}for(var s=0;s<_;s++)for(var l=0;l<b;l++)C[s][l]*=C[s][l];for(var c=0;c<b;c++)T[c]=[];for(var u=0;u<b;u++)for(var f=0;f<b;f++)T[u][f]=C[y[f]][u]})(R),(function(){for(var e=s.svd(T),n=e.S,t=e.U,o=e.V,l=n[0]*n[0]*n[0],c=[],u=0;u<b;u++){c[u]=[];for(var f=0;f<b;f++)c[u][f]=0,u==f&&(c[u][f]=n[u]/(n[u]*n[u]+l/(n[u]*n[u])))}I=i.multMat(i.multMat(o,c),i.transpose(t))})(),(function(){for(var e=void 0,n=void 0,t=[],o=[],s=[],l=[],c=0;c<_;c++)t[c]=Math.random(),o[c]=Math.random();t=i.normalize(t),o=i.normalize(o);for(var u=A,f=A,h=void 0;;){for(var E=0;E<_;E++)s[E]=t[E];if(t=i.multGamma(i.multL(i.multGamma(s),C,I)),e=i.dotProduct(s,t),t=i.normalize(t),u=i.dotProduct(s,t),(h=Math.abs(u/f))<=1+x&&h>=1)break;f=u}for(var y=0;y<_;y++)s[y]=t[y];for(f=A;;){for(var N=0;N<_;N++)l[N]=o[N];if(l=i.minusOp(l,i.multCons(s,i.dotProduct(s,l))),o=i.multGamma(i.multL(i.multGamma(l),C,I)),n=i.dotProduct(l,o),o=i.normalize(o),u=i.dotProduct(l,o),(h=Math.abs(u/f))<=1+x&&h>=1)break;f=u}for(var T=0;T<_;T++)l[T]=o[T];p=i.multCons(s,Math.sqrt(Math.abs(e))),v=i.multCons(l,Math.sqrt(Math.abs(n)))})(),W={nodeIndexes:f,xCoords:p,yCoords:v}):(f.forEach(function(e,t){p.push(n.getElementById(t).position("x")),v.push(n.getElementById(t).position("y"))}),W={nodeIndexes:f,xCoords:p,yCoords:v}),W}var J=f.keys(),K=n.getElementById(J.next().value),$=K.position(),ee=K.outerWidth();if(p.push($.x),v.push($.y),2==_){var ne=n.getElementById(J.next().value).outerWidth();p.push($.x+ee/2+ne/2+e.idealEdgeLength),v.push($.y)}return W={nodeIndexes:f,xCoords:p,yCoords:v}}}},579:(e,n,t)=>{var o=t(212),i=function(e){e&&e('layout','fcose',o)};'undefined'!=typeof cytoscape&&i(cytoscape),e.exports=i},140:n=>{n.exports=e}},t={},o=(function e(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return n[o](s,s.exports,e),s.exports})(579);return o})()},'object'==typeof _e2&&'object'==typeof m?m.exports=n(r(d[0])):'function'==typeof define&&define.amd?define(["cose-base"],n):'object'==typeof _e2?_e2.cytoscapeFcose=n(r(d[0])):e.cytoscapeFcose=n(e.coseBase)},5330,[5331]);
3
+ __d(function(g,_r,_i0,a,m,e,d){var t,i;t=this,i=function(t){return(()=>{"use strict";var i={45:(t,i,o)=>{var n={};n.layoutBase=o(551),n.CoSEConstants=o(806),n.CoSEEdge=o(767),n.CoSEGraph=o(880),n.CoSEGraphManager=o(578),n.CoSELayout=o(765),n.CoSENode=o(991),n.ConstraintHandler=o(902),t.exports=n},806:(t,i,o)=>{var n=o(551).FDLayoutConstants;function r(){}for(var s in n)r[s]=n[s];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,t.exports=r},767:(t,i,o)=>{var n=o(551).FDLayoutEdge;function r(t,i,o){n.call(this,t,i,o)}for(var s in r.prototype=Object.create(n.prototype),n)r[s]=n[s];t.exports=r},880:(t,i,o)=>{var n=o(551).LGraph;function r(t,i,o){n.call(this,t,i,o)}for(var s in r.prototype=Object.create(n.prototype),n)r[s]=n[s];t.exports=r},578:(t,i,o)=>{var n=o(551).LGraphManager;function r(t){n.call(this,t)}for(var s in r.prototype=Object.create(n.prototype),n)r[s]=n[s];t.exports=r},765:(t,i,o)=>{var n=o(551).FDLayout,r=o(578),s=o(880),h=o(991),l=o(767),c=o(806),p=o(902),f=o(551).FDLayoutConstants,u=o(551).LayoutConstants,v=o(551).Point,T=o(551).PointD,N=o(551).DimensionD,E=o(551).Layout,y=o(551).Integer,C=o(551).IGeometry,M=o(551).LGraph,w=o(551).Transform,A=o(551).LinkedList;function I(){n.call(this),this.toBeTiled={},this.constraints={}}for(var L in I.prototype=Object.create(n.prototype),n)I[L]=n[L];I.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},I.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},I.prototype.newNode=function(t){return new h(this.graphManager,t)},I.prototype.newEdge=function(t){return new l(null,null,t)},I.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},I.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},I.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},I.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)c.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),i=new Set(this.getAllNodes()),o=this.nodesWithGravity.filter(function(t){return i.has(t)}),this.graphManager.setAllNodesToApplyGravitation(o));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var i=new Set(this.getAllNodes()),o=this.nodesWithGravity.filter(function(t){return i.has(t)});this.graphManager.setAllNodesToApplyGravitation(o),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(p.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},I.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%f.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(),c.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=f.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()),c.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var o=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(o,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},I.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),i={},o=0;o<t.length;o++){var n=t[o].rect,r=t[o].id;i[r]={id:r,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return i},I.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if('during'===f.ANIMATE)this.emit('layoutstarted');else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},I.prototype.moveNodes=function(){for(var t=this.getAllNodes(),i=0;i<t.length;i++)t[i].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),i=0;i<t.length;i++)t[i].move()},I.prototype.initConstraintVariables=function(){var t=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var i=this.graphManager.getAllNodes(),o=0;o<i.length;o++){var n=i[o];this.idToNodeMap.set(n.id,n)}var r=function i(o){for(var n,r=o.getChild().getNodes(),s=0,h=0;h<r.length;h++)null==(n=r[h]).getChild()?t.fixedNodeSet.has(n.id)&&(s+=100):s+=i(n);return s};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach(function(i){t.fixedNodeSet.add(i.nodeId)}),i=this.graphManager.getAllNodes(),o=0;o<i.length;o++)if(null!=(n=i[o]).getChild()){var s=r(n);s>0&&(n.fixedNodeWeight=s)}if(this.constraints.relativePlacementConstraint){var h=new Map,l=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(i){t.fixedNodesOnHorizontal.add(i),t.fixedNodesOnVertical.add(i)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var p=this.constraints.alignmentConstraint.vertical;for(o=0;o<p.length;o++)this.dummyToNodeForVerticalAlignment.set("dummy"+o,[]),p[o].forEach(function(i){h.set(i,"dummy"+o),t.dummyToNodeForVerticalAlignment.get("dummy"+o).push(i),t.fixedNodeSet.has(i)&&t.fixedNodesOnHorizontal.add("dummy"+o)})}if(this.constraints.alignmentConstraint.horizontal){var f=this.constraints.alignmentConstraint.horizontal;for(o=0;o<f.length;o++)this.dummyToNodeForHorizontalAlignment.set("dummy"+o,[]),f[o].forEach(function(i){l.set(i,"dummy"+o),t.dummyToNodeForHorizontalAlignment.get("dummy"+o).push(i),t.fixedNodeSet.has(i)&&t.fixedNodesOnVertical.add("dummy"+o)})}}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(t){var i,o,n;for(n=t.length-1;n>=2*t.length/3;n--)i=Math.floor(Math.random()*(n+1)),o=t[n],t[n]=t[i],t[i]=o;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(i){if(i.left){var o=h.has(i.left)?h.get(i.left):i.left,n=h.has(i.right)?h.get(i.right):i.right;t.nodesInRelativeHorizontal.includes(o)||(t.nodesInRelativeHorizontal.push(o),t.nodeToRelativeConstraintMapHorizontal.set(o,[]),t.dummyToNodeForVerticalAlignment.has(o)?t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(o)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(o).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(o).push({right:n,gap:i.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:o,gap:i.gap})}else{var r=l.has(i.top)?l.get(i.top):i.top,s=l.has(i.bottom)?l.get(i.bottom):i.bottom;t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodesInRelativeVertical.includes(s)||(t.nodesInRelativeVertical.push(s),t.nodeToRelativeConstraintMapVertical.set(s,[]),t.dummyToNodeForHorizontalAlignment.has(s)?t.nodeToTempPositionMapVertical.set(s,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(s)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(s,t.idToNodeMap.get(s).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(r).push({bottom:s,gap:i.gap}),t.nodeToRelativeConstraintMapVertical.get(s).push({top:r,gap:i.gap})}});else{var u=new Map,v=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var i=h.has(t.left)?h.get(t.left):t.left,o=h.has(t.right)?h.get(t.right):t.right;u.has(i)?u.get(i).push(o):u.set(i,[o]),u.has(o)?u.get(o).push(i):u.set(o,[i])}else{var n=l.has(t.top)?l.get(t.top):t.top,r=l.has(t.bottom)?l.get(t.bottom):t.bottom;v.has(n)?v.get(n).push(r):v.set(n,[r]),v.has(r)?v.get(r).push(n):v.set(r,[n])}});var T=function(t,i){var o=[],n=[],r=new A,s=new Set,h=0;return t.forEach(function(l,c){if(!s.has(c)){o[h]=[],n[h]=!1;var p=c;for(r.push(p),s.add(p),o[h].push(p);0!=r.length;)p=r.shift(),i.has(p)&&(n[h]=!0),t.get(p).forEach(function(t){s.has(t)||(r.push(t),s.add(t),o[h].push(t))});h++}}),{components:o,isFixed:n}},N=T(u,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=N.components,this.fixedComponentsOnHorizontal=N.isFixed;var E=T(v,t.fixedNodesOnVertical);this.componentsOnVertical=E.components,this.fixedComponentsOnVertical=E.isFixed}}},I.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(i){var o=t.idToNodeMap.get(i.nodeId);o.displacementX=0,o.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var i=this.constraints.alignmentConstraint.vertical,o=0;o<i.length;o++){for(var n=0,r=0;r<i[o].length;r++){if(this.fixedNodeSet.has(i[o][r])){n=0;break}n+=this.idToNodeMap.get(i[o][r]).displacementX}var s=n/i[o].length;for(r=0;r<i[o].length;r++)this.idToNodeMap.get(i[o][r]).displacementX=s}if(this.constraints.alignmentConstraint.horizontal){var h=this.constraints.alignmentConstraint.horizontal;for(o=0;o<h.length;o++){var l=0;for(r=0;r<h[o].length;r++){if(this.fixedNodeSet.has(h[o][r])){l=0;break}l+=this.idToNodeMap.get(h[o][r]).displacementY}var p=l/h[o].length;for(r=0;r<h[o].length;r++)this.idToNodeMap.get(h[o][r]).displacementY=p}}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(i){if(!t.fixedNodesOnHorizontal.has(i)){var o=0;o=t.dummyToNodeForVerticalAlignment.has(i)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).displacementX:t.idToNodeMap.get(i).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(i).forEach(function(n){var r;n.right?(r=t.nodeToTempPositionMapHorizontal.get(n.right)-t.nodeToTempPositionMapHorizontal.get(i)-o)<n.gap&&(o-=n.gap-r):(r=t.nodeToTempPositionMapHorizontal.get(i)-t.nodeToTempPositionMapHorizontal.get(n.left)+o)<n.gap&&(o+=n.gap-r)}),t.nodeToTempPositionMapHorizontal.set(i,t.nodeToTempPositionMapHorizontal.get(i)+o),t.dummyToNodeForVerticalAlignment.has(i)?t.dummyToNodeForVerticalAlignment.get(i).forEach(function(i){t.idToNodeMap.get(i).displacementX=o}):t.idToNodeMap.get(i).displacementX=o}}),this.nodesInRelativeVertical.forEach(function(i){if(!t.fixedNodesOnHorizontal.has(i)){var o=0;o=t.dummyToNodeForHorizontalAlignment.has(i)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).displacementY:t.idToNodeMap.get(i).displacementY,t.nodeToRelativeConstraintMapVertical.get(i).forEach(function(n){var r;n.bottom?(r=t.nodeToTempPositionMapVertical.get(n.bottom)-t.nodeToTempPositionMapVertical.get(i)-o)<n.gap&&(o-=n.gap-r):(r=t.nodeToTempPositionMapVertical.get(i)-t.nodeToTempPositionMapVertical.get(n.top)+o)<n.gap&&(o+=n.gap-r)}),t.nodeToTempPositionMapVertical.set(i,t.nodeToTempPositionMapVertical.get(i)+o),t.dummyToNodeForHorizontalAlignment.has(i)?t.dummyToNodeForHorizontalAlignment.get(i).forEach(function(i){t.idToNodeMap.get(i).displacementY=o}):t.idToNodeMap.get(i).displacementY=o}});else{for(o=0;o<this.componentsOnHorizontal.length;o++){var f=this.componentsOnHorizontal[o];if(this.fixedComponentsOnHorizontal[o])for(r=0;r<f.length;r++)this.dummyToNodeForVerticalAlignment.has(f[r])?this.dummyToNodeForVerticalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementX=0}):this.idToNodeMap.get(f[r]).displacementX=0;else{var u=0,v=0;for(r=0;r<f.length;r++)this.dummyToNodeForVerticalAlignment.has(f[r])?(u+=(N=this.dummyToNodeForVerticalAlignment.get(f[r])).length*this.idToNodeMap.get(N[0]).displacementX,v+=N.length):(u+=this.idToNodeMap.get(f[r]).displacementX,v++);var T=u/v;for(r=0;r<f.length;r++)this.dummyToNodeForVerticalAlignment.has(f[r])?this.dummyToNodeForVerticalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementX=T}):this.idToNodeMap.get(f[r]).displacementX=T}}for(o=0;o<this.componentsOnVertical.length;o++)if(f=this.componentsOnVertical[o],this.fixedComponentsOnVertical[o])for(r=0;r<f.length;r++)this.dummyToNodeForHorizontalAlignment.has(f[r])?this.dummyToNodeForHorizontalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementY=0}):this.idToNodeMap.get(f[r]).displacementY=0;else{for(u=0,v=0,r=0;r<f.length;r++){var N;this.dummyToNodeForHorizontalAlignment.has(f[r])?(u+=(N=this.dummyToNodeForHorizontalAlignment.get(f[r])).length*this.idToNodeMap.get(N[0]).displacementY,v+=N.length):(u+=this.idToNodeMap.get(f[r]).displacementY,v++)}for(T=u/v,r=0;r<f.length;r++)this.dummyToNodeForHorizontalAlignment.has(f[r])?this.dummyToNodeForHorizontalAlignment.get(f[r]).forEach(function(i){t.idToNodeMap.get(i).displacementY=T}):this.idToNodeMap.get(f[r]).displacementY=T}}},I.prototype.calculateNodesToApplyGravitationTo=function(){var t,i,o=[],n=this.graphManager.getGraphs(),r=n.length;for(i=0;i<r;i++)(t=n[i]).updateConnected(),t.isConnected||(o=o.concat(t.getNodes()));return o},I.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var i,o=new Set;for(i=0;i<t.length;i++){var n=t[i];if(!o.has(n)){var r=n.getSource(),s=n.getTarget();if(r==s)n.getBendpoints().push(new T),n.getBendpoints().push(new T),this.createDummyNodesForBendpoints(n),o.add(n);else{var h=[];if(h=(h=h.concat(r.getEdgeListToNode(s))).concat(s.getEdgeListToNode(r)),!o.has(h[0])){var l;if(h.length>1)for(l=0;l<h.length;l++){var c=h[l];c.getBendpoints().push(new T),this.createDummyNodesForBendpoints(c)}h.forEach(function(t){o.add(t)})}}}if(o.size==t.length)break}},I.prototype.positionNodesRadially=function(t){for(var i=new v(0,0),o=Math.ceil(Math.sqrt(t.length)),n=0,r=0,s=0,h=new T(0,0),l=0;l<t.length;l++){l%o==0&&(s=0,r=n,0!=l&&(r+=c.DEFAULT_COMPONENT_SEPERATION),n=0);var p=t[l],f=E.findCenterOfTree(p);i.x=s,i.y=r,(h=I.radialLayout(p,f,i)).y>n&&(n=Math.floor(h.y)),s=Math.floor(h.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(u.WORLD_CENTER_X-h.x/2,u.WORLD_CENTER_Y-h.y/2))},I.radialLayout=function(t,i,o){var n=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);I.branchRadialLayout(i,null,0,359,0,n);var r=M.calculateBounds(t),s=new w;s.setDeviceOrgX(r.getMinX()),s.setDeviceOrgY(r.getMinY()),s.setWorldOrgX(o.x),s.setWorldOrgY(o.y);for(var h=0;h<t.length;h++)t[h].transform(s);var l=new T(r.getMaxX(),r.getMaxY());return s.inverseTransformPoint(l)},I.branchRadialLayout=function(t,i,o,n,r,s){var h=(n-o+1)/2;h<0&&(h+=180);var l=(h+o)%360*C.TWO_PI/360,c=(Math.cos(l),r*Math.cos(l)),p=r*Math.sin(l);t.setCenter(c,p);var f=[],u=(f=f.concat(t.getEdges())).length;null!=i&&u--;for(var v,T=0,N=f.length,E=t.getEdgesBetween(i);E.length>1;){var y=E[0];E.splice(0,1);var M=f.indexOf(y);M>=0&&f.splice(M,1),N--,u--}v=null!=i?(f.indexOf(E[0])+1)%N:0;for(var w=Math.abs(n-o)/u,A=v;T!=u;A=++A%N){var L=f[A].getOtherEnd(t);if(L!=i){var b=(o+T*w)%360,F=(b+w)%360;I.branchRadialLayout(L,t,b,F,r+s,s),T++}}},I.maxDiagonalInTree=function(t){for(var i=y.MIN_VALUE,o=0;o<t.length;o++){var n=t[o].getDiagonal();n>i&&(i=n)}return i},I.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},I.prototype.groupZeroDegreeMembers=function(){var t=this,i={};this.memberGroups={},this.idToDummyNode={};for(var o=[],n=this.graphManager.getAllNodes(),r=0;r<n.length;r++){var s=(l=n[r]).getParent();0!==this.getNodeDegreeWithChildren(l)||null!=s.id&&this.getToBeTiled(s)||o.push(l)}for(r=0;r<o.length;r++){var l,c=(l=o[r]).getParent().id;void 0===i[c]&&(i[c]=[]),i[c]=i[c].concat(l)}Object.keys(i).forEach(function(o){if(i[o].length>1){var n="DummyCompound_"+o;t.memberGroups[n]=i[o];var r=i[o][0].getParent(),s=new h(t.graphManager);s.id=n,s.paddingLeft=r.paddingLeft||0,s.paddingRight=r.paddingRight||0,s.paddingBottom=r.paddingBottom||0,s.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=s;var l=t.getGraphManager().add(t.newGraph(),s),c=r.getChild();c.add(s);for(var p=0;p<i[o].length;p++){var f=i[o][p];c.remove(f),l.add(f)}}})},I.prototype.clearCompounds=function(){var t={},i={};this.performDFSOnCompounds();for(var o=0;o<this.compoundOrder.length;o++)i[this.compoundOrder[o].id]=this.compoundOrder[o],t[this.compoundOrder[o].id]=[].concat(this.compoundOrder[o].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[o].getChild()),this.compoundOrder[o].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,i)},I.prototype.clearZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(o){var n=t.idToDummyNode[o];if(i[o]=t.tileNodes(t.memberGroups[o],n.paddingLeft+n.paddingRight),n.rect.width=i[o].width,n.rect.height=i[o].height,n.setCenter(i[o].centerX,i[o].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var r=n.rect.width,s=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(r+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>r?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(s+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>s?(n.rect.y-=(n.labelHeight-s)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-s)/2):"bottom"==n.labelPosVertical&&n.setHeight(s+n.labelHeight))}})},I.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var i=this.compoundOrder[t],o=i.id,n=i.paddingLeft,r=i.paddingTop,s=i.labelMarginLeft,h=i.labelMarginTop;this.adjustLocations(this.tiledMemberPack[o],i.rect.x,i.rect.y,n,r,s,h)}},I.prototype.repopulateZeroDegreeMembers=function(){var t=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(o){var n=t.idToDummyNode[o],r=n.paddingLeft,s=n.paddingTop,h=n.labelMarginLeft,l=n.labelMarginTop;t.adjustLocations(i[o],n.rect.x,n.rect.y,r,s,h,l)})},I.prototype.getToBeTiled=function(t){var i=t.id;if(null!=this.toBeTiled[i])return this.toBeTiled[i];var o=t.getChild();if(null==o)return this.toBeTiled[i]=!1,!1;for(var n=o.getNodes(),r=0;r<n.length;r++){var s=n[r];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},I.prototype.getNodeDegree=function(t){t.id;for(var i=t.getEdges(),o=0,n=0;n<i.length;n++){var r=i[n];r.getSource().id!==r.getTarget().id&&(o+=1)}return o},I.prototype.getNodeDegreeWithChildren=function(t){var i=this.getNodeDegree(t);if(null==t.getChild())return i;for(var o=t.getChild().getNodes(),n=0;n<o.length;n++){var r=o[n];i+=this.getNodeDegreeWithChildren(r)}return i},I.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},I.prototype.fillCompexOrderByDFS=function(t){for(var i=0;i<t.length;i++){var o=t[i];null!=o.getChild()&&this.fillCompexOrderByDFS(o.getChild().getNodes()),this.getToBeTiled(o)&&this.compoundOrder.push(o)}},I.prototype.adjustLocations=function(t,i,o,n,r,s,h){o+=r+h;for(var l=i+=n+s,c=0;c<t.rows.length;c++){var p=t.rows[c];i=l;for(var f=0,u=0;u<p.length;u++){var v=p[u];v.rect.x=i,v.rect.y=o,i+=v.rect.width+t.horizontalPadding,v.rect.height>f&&(f=v.rect.height)}o+=f+t.verticalPadding}},I.prototype.tileCompoundMembers=function(t,i){var o=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var r=i[n];if(o.tiledMemberPack[n]=o.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=o.tiledMemberPack[n].width,r.rect.height=o.tiledMemberPack[n].height,r.setCenter(o.tiledMemberPack[n].centerX,o.tiledMemberPack[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var s=r.rect.width,h=r.rect.height;r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(s+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>s?(r.rect.x-=(r.labelWidth-s)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-s)/2):"right"==r.labelPosHorizontal&&r.setWidth(s+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(h+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>h?(r.rect.y-=(r.labelHeight-h)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-h)/2):"bottom"==r.labelPosVertical&&r.setHeight(h+r.labelHeight))}})},I.prototype.tileNodes=function(t,i){var o=this.tileNodesByFavoringDim(t,i,!0),n=this.tileNodesByFavoringDim(t,i,!1),r=this.getOrgRatio(o);return this.getOrgRatio(n)<r?n:o},I.prototype.getOrgRatio=function(t){var i=t.width/t.height;return i<1&&(i=1/i),i},I.prototype.calcIdealRowWidth=function(t,i){var o=c.TILING_PADDING_VERTICAL,n=c.TILING_PADDING_HORIZONTAL,r=t.length,s=0,h=0,l=0;t.forEach(function(t){s+=t.getWidth(),h+=t.getHeight(),t.getWidth()>l&&(l=t.getWidth())});var p,f=s/r,u=h/r,v=Math.pow(o-n,2)+4*(f+n)*(u+o)*r,T=(n-o+Math.sqrt(v))/(2*(f+n));i?(p=Math.ceil(T))==T&&p++:p=Math.floor(T);var N=p*(f+n)-n;return l>N&&(N=l),N+=2*n},I.prototype.tileNodesByFavoringDim=function(t,i,o){var n=c.TILING_PADDING_VERTICAL,r=c.TILING_PADDING_HORIZONTAL,s=c.TILING_COMPARE_BY,h={rows:[],rowWidth:[],rowHeight:[],width:0,height:i,verticalPadding:n,horizontalPadding:r,centerX:0,centerY:0};s&&(h.idealRowWidth=this.calcIdealRowWidth(t,o));var l=function(t){return t.rect.width*t.rect.height},p=function(t,i){return l(i)-l(t)};t.sort(function(t,i){var o=p;return h.idealRowWidth?(o=s)(t.id,i.id):o(t,i)});for(var f=0,u=0,v=0;v<t.length;v++)f+=(T=t[v]).getCenterX(),u+=T.getCenterY();for(h.centerX=f/t.length,h.centerY=u/t.length,v=0;v<t.length;v++){var T=t[v];if(0==h.rows.length)this.insertNodeToRow(h,T,0,i);else if(this.canAddHorizontal(h,T.rect.width,T.rect.height)){var N=h.rows.length-1;h.idealRowWidth||(N=this.getShortestRowIndex(h)),this.insertNodeToRow(h,T,N,i)}else this.insertNodeToRow(h,T,h.rows.length,i);this.shiftToLastRow(h)}return h},I.prototype.insertNodeToRow=function(t,i,o,n){var r=n;o==t.rows.length&&(t.rows.push([]),t.rowWidth.push(r),t.rowHeight.push(0));var s=t.rowWidth[o]+i.rect.width;t.rows[o].length>0&&(s+=t.horizontalPadding),t.rowWidth[o]=s,t.width<s&&(t.width=s);var h=i.rect.height;o>0&&(h+=t.verticalPadding);var l=0;h>t.rowHeight[o]&&(l=t.rowHeight[o],t.rowHeight[o]=h,l=t.rowHeight[o]-l),t.height+=l,t.rows[o].push(i)},I.prototype.getShortestRowIndex=function(t){for(var i=-1,o=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<o&&(i=n,o=t.rowWidth[n]);return i},I.prototype.getLongestRowIndex=function(t){for(var i=-1,o=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>o&&(i=n,o=t.rowWidth[n]);return i},I.prototype.canAddHorizontal=function(t,i,o){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+i+t.horizontalPadding<=t.idealRowWidth}var r=this.getShortestRowIndex(t);if(r<0)return!0;var s=t.rowWidth[r];if(s+t.horizontalPadding+i<=t.width)return!0;var h,l,c=0;return t.rowHeight[r]<o&&r>0&&(c=o+t.verticalPadding-t.rowHeight[r]),h=t.width-s>=i+t.horizontalPadding?(t.height+c)/(s+i+t.horizontalPadding):(t.height+c)/t.width,c=o+t.verticalPadding,(l=t.width<i?(t.height+c)/i:(t.height+c)/t.width)<1&&(l=1/l),h<1&&(h=1/h),h<l},I.prototype.shiftToLastRow=function(t){var i=this.getLongestRowIndex(t),o=t.rowWidth.length-1,n=t.rows[i],r=n[n.length-1],s=r.width+t.horizontalPadding;if(t.width-t.rowWidth[o]>s&&i!=o){n.splice(-1,1),t.rows[o].push(r),t.rowWidth[i]=t.rowWidth[i]-s,t.rowWidth[o]=t.rowWidth[o]+s,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var h=Number.MIN_VALUE,l=0;l<n.length;l++)n[l].height>h&&(h=n[l].height);i>0&&(h+=t.verticalPadding);var c=t.rowHeight[i]+t.rowHeight[o];t.rowHeight[i]=h,t.rowHeight[o]<r.height+t.verticalPadding&&(t.rowHeight[o]=r.height+t.verticalPadding);var p=t.rowHeight[i]+t.rowHeight[o];t.height+=p-c,this.shiftToLastRow(t)}},I.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},I.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},I.prototype.reduceTrees=function(){for(var t,i=[],o=!0;o;){var n=this.graphManager.getAllNodes(),r=[];o=!1;for(var s=0;s<n.length;s++)if(1==(t=n[s]).getEdges().length&&!t.getEdges()[0].isInterGraph&&null==t.getChild()){if(c.PURE_INCREMENTAL){var h=t.getEdges()[0].getOtherEnd(t),l=new N(t.getCenterX()-h.getCenterX(),t.getCenterY()-h.getCenterY());r.push([t,t.getEdges()[0],t.getOwner(),l])}else r.push([t,t.getEdges()[0],t.getOwner()]);o=!0}if(1==o){for(var p=[],f=0;f<r.length;f++)1==r[f][0].getEdges().length&&(p.push(r[f]),r[f][0].getOwner().remove(r[f][0]));i.push(p),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=i},I.prototype.growTree=function(t){for(var i,o=t[t.length-1],n=0;n<o.length;n++)i=o[n],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()},I.prototype.findPlaceforPrunedNode=function(t){var i,o,n=t[0];if(o=n==t[1].source?t[1].target:t[1].source,c.PURE_INCREMENTAL)n.setCenter(o.getCenterX()+t[3].getWidth(),o.getCenterY()+t[3].getHeight());else{var r=o.startX,s=o.finishX,h=o.startY,l=o.finishY,p=[0,0,0,0];if(h>0)for(var u=r;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=r;u<=s;u++)p[2]+=this.grid[u][l+1].length+this.grid[u][l].length-1;if(r>0)for(u=h;u<=l;u++)p[3]+=this.grid[r-1][u].length+this.grid[r][u].length-1;for(var v,T,N=y.MAX_VALUE,E=0;E<p.length;E++)p[E]<N?(N=p[E],v=1,T=E):p[E]==N&&v++;if(3==v&&0==N)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==v&&0==N){var C=Math.floor(2*Math.random());i=0==p[0]&&0==p[1]?0==C?0:1:0==p[0]&&0==p[2]?0==C?0:2:0==p[0]&&0==p[3]?0==C?0:3:0==p[1]&&0==p[2]?0==C?1:2:0==p[1]&&0==p[3]?0==C?1:3:0==C?2:3}else i=4==v&&0==N?C=Math.floor(4*Math.random()):T;0==i?n.setCenter(o.getCenterX(),o.getCenterY()-o.getHeight()/2-f.DEFAULT_EDGE_LENGTH-n.getHeight()/2):1==i?n.setCenter(o.getCenterX()+o.getWidth()/2+f.DEFAULT_EDGE_LENGTH+n.getWidth()/2,o.getCenterY()):2==i?n.setCenter(o.getCenterX(),o.getCenterY()+o.getHeight()/2+f.DEFAULT_EDGE_LENGTH+n.getHeight()/2):n.setCenter(o.getCenterX()-o.getWidth()/2-f.DEFAULT_EDGE_LENGTH-n.getWidth()/2,o.getCenterY())}},t.exports=I},991:(t,i,o)=>{var n=o(551).FDLayoutNode,r=o(551).IMath;function s(t,i,o,r){n.call(this,t,i,o,r)}for(var h in s.prototype=Object.create(n.prototype),n)s[h]=n[h];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(t,i){for(var o,n=this.getChild().getNodes(),r=0;r<n.length;r++)null==(o=n[r]).getChild()?(o.displacementX+=t,o.displacementY+=i):o.propogateDisplacementToChildren(t,i)},s.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(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.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},902:(t,i,o)=>{function n(t){if(Array.isArray(t)){for(var i=0,o=Array(t.length);i<t.length;i++)o[i]=t[i];return o}return Array.from(t)}var r=o(806),s=o(551).LinkedList,h=o(551).Matrix,l=o(551).SVD;function c(){}c.handleConstraints=function(t){var i={};i.fixedNodeConstraint=t.constraints.fixedNodeConstraint,i.alignmentConstraint=t.constraints.alignmentConstraint,i.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var o=new Map,c=new Map,p=[],f=[],u=t.getAllNodes(),v=0,T=0;T<u.length;T++){var N=u[T];null==N.getChild()&&(c.set(N.id,v++),p.push(N.getCenterX()),f.push(N.getCenterY()),o.set(N.id,N))}i.relativePlacementConstraint&&i.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=r.DEFAULT_EDGE_LENGTH+o.get(t.left).getWidth()/2+o.get(t.right).getWidth()/2:t.gap=r.DEFAULT_EDGE_LENGTH+o.get(t.top).getHeight()/2+o.get(t.bottom).getHeight()/2)});var E=function(t){var i=0,o=0;return t.forEach(function(t){i+=p[c.get(t)],o+=f[c.get(t)]}),{x:i/t.size,y:o/t.size}},y=function(t,i,o,r,h){function l(t,i){var o=new Set(t),n=!0,r=!1,s=void 0;try{for(var h,l=i[Symbol.iterator]();!(n=(h=l.next()).done);n=!0){var c=h.value;o.add(c)}}catch(t){r=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(r)throw s}}return o}var u=new Map;t.forEach(function(t,i){u.set(i,0)}),t.forEach(function(t,i){t.forEach(function(t){u.set(t.id,u.get(t.id)+1)})});var v=new Map,T=new Map,N=new s;u.forEach(function(t,n){0==t?(N.push(n),o||("horizontal"==i?v.set(n,c.has(n)?p[c.get(n)]:r.get(n)):v.set(n,c.has(n)?f[c.get(n)]:r.get(n)))):v.set(n,Number.NEGATIVE_INFINITY),o&&T.set(n,new Set([n]))}),o&&h.forEach(function(t){var n=[];if(t.forEach(function(t){o.has(t)&&n.push(t)}),n.length>0){var s=0;n.forEach(function(t){"horizontal"==i?(v.set(t,c.has(t)?p[c.get(t)]:r.get(t)),s+=v.get(t)):(v.set(t,c.has(t)?f[c.get(t)]:r.get(t)),s+=v.get(t))}),s/=n.length,t.forEach(function(t){o.has(t)||v.set(t,s)})}else{var h=0;t.forEach(function(t){h+="horizontal"==i?c.has(t)?p[c.get(t)]:r.get(t):c.has(t)?f[c.get(t)]:r.get(t)}),h/=t.length,t.forEach(function(t){v.set(t,h)})}});for(var E=function(){var n=N.shift();t.get(n).forEach(function(t){if(v.get(t.id)<v.get(n)+t.gap)if(o&&o.has(t.id)){var s=void 0;if(s="horizontal"==i?c.has(t.id)?p[c.get(t.id)]:r.get(t.id):c.has(t.id)?f[c.get(t.id)]:r.get(t.id),v.set(t.id,s),s<v.get(n)+t.gap){var h=v.get(n)+t.gap-s;T.get(n).forEach(function(t){v.set(t,v.get(t)-h)})}}else v.set(t.id,v.get(n)+t.gap);u.set(t.id,u.get(t.id)-1),0==u.get(t.id)&&N.push(t.id),o&&T.set(t.id,l(T.get(n),T.get(t.id)))})};0!=N.length;)E();if(o){var y=new Set;t.forEach(function(t,i){0==t.length&&y.add(i)});var C=[];T.forEach(function(t,i){if(y.has(i)){var r=!1,s=!0,h=!1,l=void 0;try{for(var c,p=t[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var f=c.value;o.has(f)&&(r=!0)}}catch(t){h=!0,l=t}finally{try{!s&&p.return&&p.return()}finally{if(h)throw l}}if(!r){var u=!1,v=void 0;C.forEach(function(i,o){i.has([].concat(n(t))[0])&&(u=!0,v=o)}),u?t.forEach(function(t){C[v].add(t)}):C.push(new Set(t))}}}),C.forEach(function(t,o){var n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=!0,T=!1,N=void 0;try{for(var E,y=t[Symbol.iterator]();!(u=(E=y.next()).done);u=!0){var C=E.value,M=void 0;M="horizontal"==i?c.has(C)?p[c.get(C)]:r.get(C):c.has(C)?f[c.get(C)]:r.get(C);var w=v.get(C);M<n&&(n=M),M>h&&(h=M),w<s&&(s=w),w>l&&(l=w)}}catch(t){T=!0,N=t}finally{try{!u&&y.return&&y.return()}finally{if(T)throw N}}var A=(n+h)/2-(s+l)/2,I=!0,L=!1,b=void 0;try{for(var F,R=t[Symbol.iterator]();!(I=(F=R.next()).done);I=!0){var O=F.value;v.set(O,v.get(O)+A)}}catch(t){L=!0,b=t}finally{try{!I&&R.return&&R.return()}finally{if(L)throw b}}})}return v},C=function(t){var i=0,o=0,n=0,r=0;if(t.forEach(function(t){t.left?p[c.get(t.left)]-p[c.get(t.right)]>=0?i++:o++:f[c.get(t.top)]-f[c.get(t.bottom)]>=0?n++:r++}),i>o&&n>r)for(var s=0;s<c.size;s++)p[s]=-1*p[s],f[s]=-1*f[s];else if(i>o)for(var h=0;h<c.size;h++)p[h]=-1*p[h];else if(n>r)for(var l=0;l<c.size;l++)f[l]=-1*f[l]},M=function(t){var i=[],o=new s,n=new Set,r=0;return t.forEach(function(s,h){if(!n.has(h)){i[r]=[];var l=h;for(o.push(l),n.add(l),i[r].push(l);0!=o.length;)l=o.shift(),t.get(l).forEach(function(t){n.has(t.id)||(o.push(t.id),n.add(t.id),i[r].push(t.id))});r++}}),i},w=function(t){var i=new Map;return t.forEach(function(t,o){i.set(o,[])}),t.forEach(function(t,o){t.forEach(function(t){i.get(o).push(t),i.get(t.id).push({id:o,gap:t.gap,direction:t.direction})})}),i},A=function(t){var i=new Map;return t.forEach(function(t,o){i.set(o,[])}),t.forEach(function(t,o){t.forEach(function(t){i.get(t.id).push({id:o,gap:t.gap,direction:t.direction})})}),i},I=[],L=[],b=!1,F=!1,R=new Set,O=new Map,_=new Map,P=[];if(i.fixedNodeConstraint&&i.fixedNodeConstraint.forEach(function(t){R.add(t.nodeId)}),i.relativePlacementConstraint&&(i.relativePlacementConstraint.forEach(function(t){t.left?(O.has(t.left)?O.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):O.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),O.has(t.right)||O.set(t.right,[])):(O.has(t.top)?O.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):O.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),O.has(t.bottom)||O.set(t.bottom,[]))}),_=w(O),P=M(_)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(i.fixedNodeConstraint&&i.fixedNodeConstraint.length>1)i.fixedNodeConstraint.forEach(function(t,i){I[i]=[t.position.x,t.position.y],L[i]=[p[c.get(t.nodeId)],f[c.get(t.nodeId)]]}),b=!0;else if(i.alignmentConstraint)!(function(){var t=0;if(i.alignmentConstraint.vertical){for(var o=i.alignmentConstraint.vertical,r=function(i){var r=new Set;o[i].forEach(function(t){r.add(t)});var s=new Set([].concat(n(r)).filter(function(t){return R.has(t)})),h=void 0;h=s.size>0?p[c.get(s.values().next().value)]:E(r).x,o[i].forEach(function(i){I[t]=[h,f[c.get(i)]],L[t]=[p[c.get(i)],f[c.get(i)]],t++})},s=0;s<o.length;s++)r(s);b=!0}if(i.alignmentConstraint.horizontal){for(var h=i.alignmentConstraint.horizontal,l=function(i){var o=new Set;h[i].forEach(function(t){o.add(t)});var r=new Set([].concat(n(o)).filter(function(t){return R.has(t)})),s=void 0;s=r.size>0?p[c.get(r.values().next().value)]:E(o).y,h[i].forEach(function(i){I[t]=[p[c.get(i)],s],L[t]=[p[c.get(i)],f[c.get(i)]],t++})},u=0;u<h.length;u++)l(u);b=!0}i.relativePlacementConstraint&&(F=!0)})();else if(i.relativePlacementConstraint){for(var D=0,x=0,H=0;H<P.length;H++)P[H].length>D&&(D=P[H].length,x=H);if(D<_.size/2)C(i.relativePlacementConstraint),b=!1,F=!1;else{var G=new Map,z=new Map,S=[];P[x].forEach(function(t){O.get(t).forEach(function(i){"horizontal"==i.direction?(G.has(t)?G.get(t).push(i):G.set(t,[i]),G.has(i.id)||G.set(i.id,[]),S.push({left:t,right:i.id})):(z.has(t)?z.get(t).push(i):z.set(t,[i]),z.has(i.id)||z.set(i.id,[]),S.push({top:t,bottom:i.id}))})}),C(S),F=!1;var V=y(G,"horizontal"),W=y(z,"vertical");P[x].forEach(function(t,i){L[i]=[p[c.get(t)],f[c.get(t)]],I[i]=[],V.has(t)?I[i][0]=V.get(t):I[i][0]=p[c.get(t)],W.has(t)?I[i][1]=W.get(t):I[i][1]=f[c.get(t)]}),b=!0}}if(b){for(var Y,X=h.transpose(I),U=h.transpose(L),B=0;B<X.length;B++)X[B]=h.multGamma(X[B]),U[B]=h.multGamma(U[B]);var k=h.multMat(X,h.transpose(U)),j=l.svd(k);Y=h.multMat(j.V,h.transpose(j.U));for(var Z=0;Z<c.size;Z++){var q=[p[Z],f[Z]],K=[Y[0][0],Y[1][0]],Q=[Y[0][1],Y[1][1]];p[Z]=h.dotProduct(q,K),f[Z]=h.dotProduct(q,Q)}F&&C(i.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(i.fixedNodeConstraint&&i.fixedNodeConstraint.length>0){var J={x:0,y:0};i.fixedNodeConstraint.forEach(function(t,i){var o,n,r={x:p[c.get(t.nodeId)],y:f[c.get(t.nodeId)]},s=t.position,h=(n=r,{x:(o=s).x-n.x,y:o.y-n.y});J.x+=h.x,J.y+=h.y}),J.x/=i.fixedNodeConstraint.length,J.y/=i.fixedNodeConstraint.length,p.forEach(function(t,i){p[i]+=J.x}),f.forEach(function(t,i){f[i]+=J.y}),i.fixedNodeConstraint.forEach(function(t){p[c.get(t.nodeId)]=t.position.x,f[c.get(t.nodeId)]=t.position.y})}if(i.alignmentConstraint){if(i.alignmentConstraint.vertical)for(var $=i.alignmentConstraint.vertical,tt=function(t){var i=new Set;$[t].forEach(function(t){i.add(t)});var o=new Set([].concat(n(i)).filter(function(t){return R.has(t)})),r=void 0;r=o.size>0?p[c.get(o.values().next().value)]:E(i).x,i.forEach(function(t){R.has(t)||(p[c.get(t)]=r)})},et=0;et<$.length;et++)tt(et);if(i.alignmentConstraint.horizontal)for(var it=i.alignmentConstraint.horizontal,ot=function(t){var i=new Set;it[t].forEach(function(t){i.add(t)});var o=new Set([].concat(n(i)).filter(function(t){return R.has(t)})),r=void 0;r=o.size>0?f[c.get(o.values().next().value)]:E(i).y,i.forEach(function(t){R.has(t)||(f[c.get(t)]=r)})},nt=0;nt<it.length;nt++)ot(nt)}i.relativePlacementConstraint&&(function(){var t=new Map,o=new Map,n=new Map,r=new Map,s=new Map,h=new Map,l=new Set,u=new Set;if(R.forEach(function(t){l.add(t),u.add(t)}),i.alignmentConstraint){if(i.alignmentConstraint.vertical)for(var v=i.alignmentConstraint.vertical,T=function(i){n.set("dummy"+i,[]),v[i].forEach(function(o){t.set(o,"dummy"+i),n.get("dummy"+i).push(o),R.has(o)&&l.add("dummy"+i)}),s.set("dummy"+i,p[c.get(v[i][0])])},N=0;N<v.length;N++)T(N);if(i.alignmentConstraint.horizontal)for(var E=i.alignmentConstraint.horizontal,C=function(t){r.set("dummy"+t,[]),E[t].forEach(function(i){o.set(i,"dummy"+t),r.get("dummy"+t).push(i),R.has(i)&&u.add("dummy"+t)}),h.set("dummy"+t,f[c.get(E[t][0])])},I=0;I<E.length;I++)C(I)}var L=new Map,b=new Map,F=function(i){O.get(i).forEach(function(n){var r=void 0,s=void 0;"horizontal"==n.direction?(r=t.get(i)?t.get(i):i,s=t.get(n.id)?{id:t.get(n.id),gap:n.gap,direction:n.direction}:n,L.has(r)?L.get(r).push(s):L.set(r,[s]),L.has(s.id)||L.set(s.id,[])):(r=o.get(i)?o.get(i):i,s=o.get(n.id)?{id:o.get(n.id),gap:n.gap,direction:n.direction}:n,b.has(r)?b.get(r).push(s):b.set(r,[s]),b.has(s.id)||b.set(s.id,[]))})},_=!0,P=!1,D=void 0;try{for(var x,H=O.keys()[Symbol.iterator]();!(_=(x=H.next()).done);_=!0)F(x.value)}catch(t){P=!0,D=t}finally{try{!_&&H.return&&H.return()}finally{if(P)throw D}}var G=w(L),z=w(b),S=M(G),V=M(z),W=A(L),Y=A(b),X=[],U=[];S.forEach(function(t,i){X[i]=[],t.forEach(function(t){0==W.get(t).length&&X[i].push(t)})}),V.forEach(function(t,i){U[i]=[],t.forEach(function(t){0==Y.get(t).length&&U[i].push(t)})});var B=y(L,"horizontal",l,s,X),k=y(b,"vertical",u,h,U),j=function(t){n.get(t)?n.get(t).forEach(function(i){p[c.get(i)]=B.get(t)}):p[c.get(t)]=B.get(t)},Z=!0,q=!1,K=void 0;try{for(var Q,J=B.keys()[Symbol.iterator]();!(Z=(Q=J.next()).done);Z=!0)j(Q.value)}catch(t){q=!0,K=t}finally{try{!Z&&J.return&&J.return()}finally{if(q)throw K}}var $=function(t){r.get(t)?r.get(t).forEach(function(i){f[c.get(i)]=k.get(t)}):f[c.get(t)]=k.get(t)},tt=!0,et=!1,it=void 0;try{for(var ot,nt=k.keys()[Symbol.iterator]();!(tt=(ot=nt.next()).done);tt=!0)$(ot.value)}catch(t){et=!0,it=t}finally{try{!tt&&nt.return&&nt.return()}finally{if(et)throw it}}})()}for(var rt=0;rt<u.length;rt++){var at=u[rt];null==at.getChild()&&at.setCenter(p[c.get(at.id)],f[c.get(at.id)])}},t.exports=c},551:i=>{i.exports=t}},o={},n=(function t(n){var r=o[n];if(void 0!==r)return r.exports;var s=o[n]={exports:{}};return i[n](s,s.exports,t),s.exports})(45);return n})()},'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)},5331,[5332]);
4
+ __d(function(_g,_r,_i0,_a,m,_e,_d){var t,e;t=this,e=function(){return(function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,'a',e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)})([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var h in s.prototype=Object.create(r.prototype),r)s[h]=r[h];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.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"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),h=i(16),a=i(5);function u(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(t){this.rect.width=t},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(t){this.rect.height=t},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new a(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},u.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},u.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},u.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},u.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},u.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},u.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},u.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;i<e.length;i++)e[i].withChildren().forEach(function(e){t.add(e)});return t},u.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),i=0;i<e.length;i++)t+=e[i].getNoOfChildren();return 0==t&&(t=1),t},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.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)},u.prototype.scatter=function(){var t,e,i=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+h.nextDouble()*(r-i)+i;var n=-s.INITIAL_WORLD_BOUNDARY,o=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+h.nextDouble()*(o-n)+n,this.rect.x=t,this.rect.y=e},u.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()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),i=t.getBottom()-t.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new a(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=u},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(7),h=i(3),a=i(1),u=i(13),l=i(12),g=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in c.prototype=Object.create(r.prototype),r)c[p]=r[p];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},c.prototype.remove=function(t){var e=t;if(t instanceof h){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n<r;n++)(o=i[n]).isInterGraph?this.graphManager.remove(o):o.source.owner.remove(o);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof a){var o;if(null==(o=t))throw"Edge is null!";if(null==o.source||null==o.target)throw"Source and/or target is null!";if(null==o.source.owner||null==o.target.owner||o.source.owner!=this||o.target.owner!=this)throw"Source and/or target owner is invalid!";var s,u=o.source.edges.indexOf(o),l=o.target.edges.indexOf(o);if(!(u>-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),h=s.length,a=0;a<h;a++){var u=s[a];r>(t=u.getTop())&&(r=t),o>(e=u.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new l(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,h=n.MAX_VALUE,a=-n.MAX_VALUE,l=n.MAX_VALUE,g=-n.MAX_VALUE,c=this.nodes,p=c.length,f=0;f<p;f++){var d=c[f];t&&null!=d.child&&d.updateBounds(),h>(e=d.getLeft())&&(h=e),a<(i=d.getRight())&&(a=i),l>(r=d.getTop())&&(l=r),g<(o=d.getBottom())&&(g=o)}var y=new u(h,l,a-h,g-l);h==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,h=-n.MAX_VALUE,a=n.MAX_VALUE,l=-n.MAX_VALUE,g=t.length,c=0;c<g;c++){var p=t[c];s>(e=p.getLeft())&&(s=e),h<(i=p.getRight())&&(h=i),a>(r=p.getTop())&&(a=r),l<(o=p.getBottom())&&(l=o)}return new u(s,a,h-s,l-a)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r<i;r++)t+=e[r].calcEstimatedSize();return this.estimatedSize=0==t?o.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},c.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,i,r=new g,n=new Set,o=this.nodes[0];for(o.withChildren().forEach(function(t){r.push(t),n.add(t)});0!==r.length;)for(var s=(e=(o=r.shift()).getEdges()).length,h=0;h<s;h++)null==(i=e[h].getOtherEndInGraph(o,this))||n.has(i)||i.withChildren().forEach(function(t){r.push(t),n.add(t)});if(this.isConnected=!1,n.size>=this.nodes.length){var a=0;n.forEach(function(e){e.owner==t&&a++}),a==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)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!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,h=0;h<s;h++)i=o[h],e.remove(i);var a,u=[];for(s=(u=u.concat(e.getNodes())).length,h=0;h<s;h++)a=u[h],e.remove(a);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof n){if(null==(i=t))throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(null==i.source||null==i.target)throw"Source and/or target is null!";if(-1==i.source.edges.indexOf(i)||-1==i.target.edges.indexOf(i))throw"Source and/or target doesn't know this edge!";if(l=i.source.edges.indexOf(i),i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,1),null==i.source.owner||null==i.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==i.source.owner.getGraphManager().edges.indexOf(i))throw"Not in owner graph manager's edge list!";l=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(l,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),i=e.length,r=0;r<i;r++)t=t.concat(e[r].getNodes());this.allNodes=t}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),i=(e.length,0);i<e.length;i++)t=t.concat(e[i].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},o.prototype.getRoot=function(){return this.rootGraph},o.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"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var i,r=t.getOwner();null!=(i=r.getParent());){if(i==e)return!0;if(null==(r=i.getOwner()))break}for(r=e.getOwner();null!=(i=r.getParent());){if(i==t)return!0;if(null==(r=i.getOwner()))break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var t,e,i,r,n,o=this.getAllEdges(),s=o.length,h=0;h<s;h++)if(e=(t=o[h]).source,i=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=i,e!=i){for(r=e.getOwner();null==t.lca;){for(t.targetInLca=i,n=i.getOwner();null==t.lca;){if(n==r){t.lca=n;break}if(n==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=n.getParent(),n=t.targetInLca.getOwner()}if(r==this.rootGraph)break;null==t.lca&&(t.sourceInLca=r.getParent(),r=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},o.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var i=t.getOwner();null!=i;){for(var r=e.getOwner();null!=r;){if(r==i)return r;r=r.getParent().getOwner()}i=i.getParent().getOwner()}return i},o.prototype.calcInclusionTreeDepths=function(t,e){var i;null==t&&null==e&&(t=this.rootGraph,e=1);for(var r=t.getNodes(),n=r.length,o=0;o<n;o++)(i=r[o]).inclusionTreeDepth=e,null!=i.child&&this.calcInclusionTreeDepths(i.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var t,e=[],i=this.edges.length,r=0;r<i;r++)t=this.edges[r],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(r=0;r<e.length;r++)this.remove(e[r]);return!1},t.exports=o},function(t,e,i){"use strict";var r=i(12);function n(){}n.calcSeparationAmount=function(t,e,i,r){if(!t.intersects(e))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,n),i[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),i[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],h=i[1]/o;i[0]<h?h=i[0]:s=i[1],i[0]=-1*n[0]*(h/2+r),i[1]=-1*n[1]*(s/2+r)},n.decideDirectionsForOverlappingNodes=function(t,e,i){t.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,t.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},n.getIntersection2=function(t,e,i){var r=t.getCenterX(),n=t.getCenterY(),o=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return i[0]=r,i[1]=n,i[2]=o,i[3]=s,!0;var h=t.getX(),a=t.getY(),u=t.getRight(),l=t.getX(),g=t.getBottom(),c=t.getRight(),p=t.getWidthHalf(),f=t.getHeightHalf(),d=e.getX(),y=e.getY(),v=e.getRight(),E=e.getX(),A=e.getBottom(),_=e.getRight(),O=e.getWidthHalf(),N=e.getHeightHalf(),L=!1,I=!1;if(r===o){if(n>s)return i[0]=r,i[1]=a,i[2]=o,i[3]=A,!1;if(n<s)return i[0]=r,i[1]=g,i[2]=o,i[3]=y,!1}else if(n===s){if(r>o)return i[0]=h,i[1]=n,i[2]=v,i[3]=s,!1;if(r<o)return i[0]=u,i[1]=n,i[2]=d,i[3]=s,!1}else{var T=t.height/t.width,D=e.height/e.width,M=(s-n)/(o-r),w=void 0,R=void 0,x=void 0,C=void 0,G=void 0,U=void 0;if(-T===M?r>o?(i[0]=l,i[1]=g,L=!0):(i[0]=u,i[1]=a,L=!0):T===M&&(r>o?(i[0]=h,i[1]=a,L=!0):(i[0]=c,i[1]=g,L=!0)),-D===M?o>r?(i[2]=E,i[3]=A,I=!0):(i[2]=v,i[3]=y,I=!0):D===M&&(o>r?(i[2]=d,i[3]=y,I=!0):(i[2]=_,i[3]=A,I=!0)),L&&I)return!1;if(r>o?n>s?(w=this.getCardinalDirection(T,M,4),R=this.getCardinalDirection(D,M,2)):(w=this.getCardinalDirection(-T,M,3),R=this.getCardinalDirection(-D,M,1)):n>s?(w=this.getCardinalDirection(-T,M,1),R=this.getCardinalDirection(-D,M,3)):(w=this.getCardinalDirection(T,M,2),R=this.getCardinalDirection(D,M,4)),!L)switch(w){case 1:C=a,x=r+-f/M,i[0]=x,i[1]=C;break;case 2:x=c,C=n+p*M,i[0]=x,i[1]=C;break;case 3:C=g,x=r+f/M,i[0]=x,i[1]=C;break;case 4:x=l,C=n+-p*M,i[0]=x,i[1]=C}if(!I)switch(R){case 1:U=y,G=o+-N/M,i[2]=G,i[3]=U;break;case 2:G=_,U=s+O*M,i[2]=G,i[3]=U;break;case 3:U=A,G=o+N/M,i[2]=G,i[3]=U;break;case 4:G=E,U=s+-O*M,i[2]=G,i[3]=U}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,h,a,u,l,g,c=t.x,p=t.y,f=e.x,d=e.y,y=i.x,v=i.y,E=n.x,A=n.y;return 0===(g=(o=d-p)*(a=y-E)-(s=A-v)*(h=c-f))?null:new r((h*(l=E*v-y*A)-a*(u=f*p-c*d))/g,(s*u-o*l)/g)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i<t?n+=Math.PI:r<e&&(n+=this.TWO_PI)):n=r<e?this.ONE_AND_HALF_PI:this.HALF_PI,n},n.doIntersect=function(t,e,i,r){var n=t.x,o=t.y,s=e.x,h=e.y,a=i.x,u=i.y,l=r.x,g=r.y,c=(s-n)*(g-u)-(l-a)*(h-o);if(0===c)return!1;var p=((g-u)*(l-n)+(a-l)*(g-o))/c,f=((o-h)*(l-n)+(s-n)*(g-o))/c;return 0<p&&p<1&&0<f&&f<1},n.findCircleLineIntersections=function(t,e,i,r,n,o,s){var h=(i-t)*(i-t)+(r-e)*(r-e),a=2*((t-n)*(i-t)+(e-o)*(r-e)),u=(t-n)*(t-n)+(e-o)*(e-o)-s*s;if(a*a-4*h*u>=0){var l=(-a+Math.sqrt(a*a-4*h*u))/(2*h),g=(-a-Math.sqrt(a*a-4*h*u))/(2*h);return l>=0&&l<=1?[l]:g>=0&&g<=1?[g]:null}return null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=(function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}})();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return{value:t,next:null,prev:null}},s=function(t,e,i,r){return null!==t?t.next=e:r.head=e,null!==i?i.prev=e:r.tail=e,e.prev=t,e.next=i,r.length++,e},h=function(t,e){var i=t.prev,r=t.next;return null!==i?i.next=r:e.head=r,null!==r?r.prev=i:e.tail=i,t.prev=t.next=null,e.length--,t},a=(function(){function t(e){var i=this;n(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return i.push(t)})}return r(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return s(e.prev,o(t),e,this)}},{key:"insertAfter",value:function(t,e){return s(e,o(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return s(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return s(e,t,e.next,this)}},{key:"push",value:function(t){return s(this.tail,o(t),null,this)}},{key:"unshift",value:function(t){return s(null,o(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 e=1,i=this.head;e<t;)i=i.next,e++;return i.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var i=1,r=this.head;i<t;)r=r.next,i++;r.value=e}}}]),t})();t.exports=a},function(t,e,i){"use strict";function r(t,e,i){this.x=null,this.y=null,null==t&&null==e&&null==i?(this.x=0,this.y=0):'number'==typeof t&&'number'==typeof e&&null==i?(this.x=t,this.y=e):'Point'==t.constructor.name&&null==e&&null==i&&(i=t,this.x=i.x,this.y=i.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(t,e,i){'Point'==t.constructor.name&&null==e&&null==i?(i=t,this.setLocation(i.x,i.y)):'number'==typeof t&&'number'==typeof e&&null==i&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},r.prototype.move=function(t,e){this.x=t,this.y=e},r.prototype.translate=function(t,e){this.x+=t,this.y+=e},r.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},r.prototype.toString=function(){return(new r).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=r},function(t,e,i){"use strict";function r(t,e,i,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=i&&null!=r&&(this.x=t,this.y=e,this.width=i,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(t){this.x=t},r.prototype.getY=function(){return this.y},r.prototype.setY=function(t){this.y=t},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},t.exports=r},function(t,e,i){"use strict";var r="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 n(){}n.lastID=0,n.createID=function(t){return n.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=n.getString(),n.lastID++),t.uniqueID)},n.getString=function(t){return null==t&&(t=n.lastID),"Object#"+t},n.isPrimitive=function(t){var e=void 0===t?"undefined":r(t);return null==t||"object"!=e&&"function"!=e},t.exports=n},function(t,e,i){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var n=i(0),o=i(7),s=i(3),h=i(1),a=i(6),u=i(5),l=i(17),g=i(29);function c(t){g.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}c.RANDOM_SEED=1,c.prototype=Object.create(g.prototype),c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},c.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},c.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},c.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},c.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},c.prototype.newNode=function(t){return new s(this.graphManager,t)},c.prototype.newEdge=function(t){return new h(null,null,t)},c.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},c.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),'during'!==n.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},c.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},c.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var i=this.graphManager.getRoot().getNodes();for(e=0;e<i.length;e++)i[e];this.update(this.graphManager.getRoot())}},c.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){var e=t;if(null!=e.getChild())for(var i=e.getChild().getNodes(),r=0;r<i.length;r++)update(i[r]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof h){var n=t;null!=n.vGraphObject&&n.vGraphObject.update(n)}else if(t instanceof a){var o=t;null!=o.vGraphObject&&o.vGraphObject.update(o)}},c.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},c.prototype.transform=function(t){if(null==t)this.transform(new u(0,0));else{var e=new l,i=this.graphManager.getRoot().updateLeftTop();if(null!=i){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(i.x),e.setDeviceOrgY(i.y);for(var r=this.getAllNodes(),n=0;n<r.length;n++)r[n].transform(e)}}},c.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,i,r=t.getNodes(),n=0;n<r.length;n++)null==(i=(e=r[n]).getChild())||0==i.getNodes().length?e.scatter():(this.positionNodesRandomly(i),e.updateBounds())},c.prototype.getFlatForest=function(){for(var t=[],e=!0,i=this.graphManager.getRoot().getNodes(),n=!0,o=0;o<i.length;o++)null!=i[o].getChild()&&(n=!1);if(!n)return t;var s=new Set,h=[],a=new Map,u=[];for(u=u.concat(i);u.length>0&&e;){for(h.push(u[0]);h.length>0&&e;){var l=h[0];h.splice(0,1),s.add(l);var g=l.getEdges();for(o=0;o<g.length;o++){var c=g[o].getOtherEnd(l);if(a.get(l)!=c){if(s.has(c)){e=!1;break}h.push(c),a.set(c,l)}}}if(e){var p=[].concat(r(s));for(t.push(p),o=0;o<p.length;o++){var f=p[o],d=u.indexOf(f);d>-1&&u.splice(d,1)}s=new Set,a=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n<t.bendpoints.length;n++){var o=this.newNode(null);o.setRect(new Point(0,0),new Dimension(1,1)),r.add(o);var s=this.newEdge(null);this.graphManager.add(s,i,o),e.add(o),i=o}return s=this.newEdge(null),this.graphManager.add(s,i,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):r.remove(t),e},c.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(r(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var i=t[e];if(i.bendpoints.length>0){for(var n=this.edgeToDummyNodes.get(i),o=0;o<n.length;o++){var s=n[o],h=new u(s.getCenterX(),s.getCenterY()),a=i.bendpoints.get(o);a.x=h.x,a.y=h.y,s.getOwner().remove(s)}this.graphManager.add(i,i.source,i.target)}}},c.transform=function(t,e,i,r){if(null!=i&&null!=r){var n=e;return t<=50?n-=(e-e/i)/50*(50-t):n+=(e*r-e)/50*(t-50),n}var o,s;return t<=50?(o=9*e/500,s=e/10):(o=9*e/50,s=-8*e),o*t+s},c.findCenterOfTree=function(t){var e=[];e=e.concat(t);var i=[],r=new Map,n=!1,o=null;1!=e.length&&2!=e.length||(n=!0,o=e[0]);for(var s=0;s<e.length;s++){var h=(l=e[s]).getNeighborsList().size;r.set(l,l.getNeighborsList().size),1==h&&i.push(l)}var a=[];for(a=a.concat(i);!n;){var u=[];for(u=u.concat(a),a=[],s=0;s<e.length;s++){var l=e[s],g=e.indexOf(l);g>=0&&e.splice(g,1),l.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&a.push(t),r.set(t,e)}})}i=i.concat(a),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(5);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var n=i(15),o=i(4),s=i(0),h=i(8),a=i(9);function u(){n.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var l in u.prototype=Object.create(n.prototype),n)u[l]=n[l];u.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,n,h,a,u=this.getGraphManager().getAllEdges(),l=0;l<u.length;l++)e=(t=u[l]).idealLength,t.isInterGraph&&(r=t.getSource(),n=t.getTarget(),h=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=h+a-2*s.SIMPLE_NODE_SIZE),i=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.getInclusionTreeDepth()-2*i))},u.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i<e.length;i++)t=e[i],this.calcSpringForce(t,t.idealLength)},u.prototype.calcRepulsionForces=function(){var t,e,i,r,n,s=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),n=new Set,t=0;t<a.length;t++)i=a[t],this.calculateRepulsionForceOfANode(i,n,s,h),n.add(i);else for(t=0;t<a.length;t++)for(i=a[t],e=t+1;e<a.length;e++)r=a[e],i.getOwner()==r.getOwner()&&this.calcRepulsionForce(i,r)},u.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),i=0;i<e.length;i++)t=e[i],this.calcGravitationalForce(t)},u.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},u.prototype.calcSpringForce=function(t,e){var i,r,n,o,s=t.getSource(),h=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==h.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(i=t.getLength())&&(n=(r=t.edgeElasticity*(i-e))*(t.lengthX/i),o=r*(t.lengthY/i),s.springForceX+=n,s.springForceY+=o,h.springForceX-=n,h.springForceY-=o)},u.prototype.calcRepulsionForce=function(t,e){var i,r,n,s,u,l,g,c=t.getRect(),p=e.getRect(),f=new Array(2),d=new Array(4);if(c.intersects(p)){h.calcSeparationAmount(c,p,f,o.DEFAULT_EDGE_LENGTH/2),l=2*f[0],g=2*f[1];var y=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=y*l,t.repulsionForceY-=y*g,e.repulsionForceX+=y*l,e.repulsionForceY+=y*g}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(i=p.getCenterX()-c.getCenterX(),r=p.getCenterY()-c.getCenterY()):(h.getIntersection(c,p,d),i=d[2]-d[0],r=d[3]-d[1]),Math.abs(i)<o.MIN_REPULSION_DIST&&(i=a.sign(i)*o.MIN_REPULSION_DIST),Math.abs(r)<o.MIN_REPULSION_DIST&&(r=a.sign(r)*o.MIN_REPULSION_DIST),n=i*i+r*r,s=Math.sqrt(n),l=(u=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/n)*i/s,g=u*r/s,t.repulsionForceX-=l,t.repulsionForceY-=g,e.repulsionForceX+=l,e.repulsionForceY+=g},u.prototype.calcGravitationalForce=function(t){var e,i,r,n,o,s,h,a;i=((e=t.getOwner()).getRight()+e.getLeft())/2,r=(e.getTop()+e.getBottom())/2,n=t.getCenterX()-i,o=t.getCenterY()-r,s=Math.abs(n)+t.getWidth()/2,h=Math.abs(o)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(a=e.getEstimatedSize()*this.gravityRangeFactor)||h>a)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(a=e.getEstimatedSize()*this.compoundGravityRangeFactor)||h>a)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},u.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)(t=e[i]).noOfChildren=t.getNoOfChildren()},u.prototype.calcGrid=function(t){var e,i;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),i=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(i);for(n=0;n<e;n++)for(var o=0;o<i;o++)r[n][o]=new Array;return r},u.prototype.addNodeToGrid=function(t,e,i){var r,n,o,s;r=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),n=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().y-i)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-i)/this.repulsionRange));for(var h=r;h<=n;h++)for(var a=o;a<=s;a++)this.grid[h][a].push(t),t.setGridCoordinates(r,n,o,s)},u.prototype.updateGrid=function(){var t,e,i=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<i.length;t++)e=i[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(t,e,i,n){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i||n){var s,h=new Set;t.surrounding=new Array;for(var a=this.grid,u=t.startX-1;u<t.finishX+2;u++)for(var l=t.startY-1;l<t.finishY+2;l++)if(!(u<0||l<0||u>=a.length||l>=a[0].length))for(var g=0;g<a[u][l].length;g++)if(s=a[u][l][g],t.getOwner()==s.getOwner()&&t!=s&&!e.has(s)&&!h.has(s)){var c=Math.abs(t.getCenterX()-s.getCenterX())-(t.getWidth()/2+s.getWidth()/2),p=Math.abs(t.getCenterY()-s.getCenterY())-(t.getHeight()/2+s.getHeight()/2);c<=this.repulsionRange&&p<=this.repulsionRange&&h.add(s)}t.surrounding=[].concat(r(h))}for(u=0;u<t.surrounding.length;u++)this.calcRepulsionForce(t,t.surrounding[u])},u.prototype.calcRepulsionRange=function(){return 0},t.exports=u},function(t,e,i){"use strict";var r=i(1),n=i(4);function o(t,e,i){r.call(this,t,e,i),this.idealLength=n.DEFAULT_EDGE_LENGTH,this.edgeElasticity=n.DEFAULT_SPRING_STRENGTH}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];t.exports=o},function(t,e,i){"use strict";var r=i(3),n=i(4);function o(t,e,i,o){r.call(this,t,e,i,o),this.nodeRepulsion=n.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.setGridCoordinates=function(t,e,i,r){this.startX=t,this.finishX=e,this.startY=i,this.finishY=r},t.exports=o},function(t,e,i){"use strict";function r(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},t.exports=r},function(t,e,i){"use strict";var r=i(14);function n(){this.map={},this.keys=[]}n.prototype.put=function(t,e){var i=r.createID(t);this.contains(i)||(this.map[i]=e,this.keys.push(t))},n.prototype.contains=function(t){return r.createID(t),null!=this.map[t]},n.prototype.get=function(t){var e=r.createID(t);return this.map[e]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,i){"use strict";var r=i(14);function n(){this.set={}}n.prototype.add=function(t){var e=r.createID(t);this.contains(e)||(this.set[e]=t)},n.prototype.remove=function(t){delete this.set[r.createID(t)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(t){return this.set[r.createID(t)]==t},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),i=e.length,r=0;r<i;r++)t.push(this.set[e[r]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(t){for(var e=t.length,i=0;i<e;i++){var r=t[i];this.add(r)}},t.exports=n},function(t,e,i){"use strict";function r(){}r.multMat=function(t,e){for(var i=[],r=0;r<t.length;r++){i[r]=[];for(var n=0;n<e[0].length;n++){i[r][n]=0;for(var o=0;o<t[0].length;o++)i[r][n]+=t[r][o]*e[o][n]}}return i},r.transpose=function(t){for(var e=[],i=0;i<t[0].length;i++){e[i]=[];for(var r=0;r<t.length;r++)e[i][r]=t[r][i]}return e},r.multCons=function(t,e){for(var i=[],r=0;r<t.length;r++)i[r]=t[r]*e;return i},r.minusOp=function(t,e){for(var i=[],r=0;r<t.length;r++)i[r]=t[r]-e[r];return i},r.dotProduct=function(t,e){for(var i=0,r=0;r<t.length;r++)i+=t[r]*e[r];return i},r.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},r.normalize=function(t){for(var e=[],i=this.mag(t),r=0;r<t.length;r++)e[r]=t[r]/i;return e},r.multGamma=function(t){for(var e=[],i=0,r=0;r<t.length;r++)i+=t[r];i*=-1/t.length;for(var n=0;n<t.length;n++)e[n]=i+t[n];return e},r.multL=function(t,e,i){for(var r=[],n=[],o=[],s=0;s<e[0].length;s++){for(var h=0,a=0;a<e.length;a++)h+=-.5*e[a][s]*t[a];n[s]=h}for(var u=0;u<i.length;u++){for(var l=0,g=0;g<i.length;g++)l+=i[u][g]*n[g];o[u]=l}for(var c=0;c<e.length;c++){for(var p=0,f=0;f<e[0].length;f++)p+=e[c][f]*o[f];r[c]=p}return r},t.exports=r},function(t,e,i){"use strict";var r=(function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}})();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=i(11),s=(function(){function t(e,i){n(this,t),null===i&&void 0===i||(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=e instanceof o?e.size():e.length,this._quicksort(e,0,r-1)}return r(t,[{key:'_quicksort',value:function(t,e,i){if(e<i){var r=this._partition(t,e,i);this._quicksort(t,e,r),this._quicksort(t,r+1,i)}}},{key:'_partition',value:function(t,e,i){for(var r=this._get(t,e),n=e,o=i;;){for(;this.compareFunction(r,this._get(t,o));)o--;for(;this.compareFunction(this._get(t,n),r);)n++;if(!(n<o))return o;this._swap(t,n,o),n++,o--}}},{key:'_get',value:function(t,e){return t instanceof o?t.get_object_at(e):t[e]}},{key:'_set',value:function(t,e,i){t instanceof o?t.set_object_at(e,i):t[e]=i}},{key:'_swap',value:function(t,e,i){var r=this._get(t,e);this._set(t,e,this._get(t,i)),this._set(t,i,r)}},{key:'_defaultCompareFunction',value:function(t,e){return e>t}}]),t})();t.exports=s},function(t,e,i){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=(function(t){for(var e=[];t-- >0;)e.push(0);return e})(Math.min(this.m+1,this.n)),this.U=(function t(e){if(0==e.length)return 0;for(var i=[],r=0;r<e[0];r++)i.push(t(e.slice(1)));return i})([this.m,e]),this.V=(function(t){return(function t(e){if(0==e.length)return 0;for(var i=[],r=0;r<e[0];r++)i.push(t(e.slice(1)));return i})(t)})([this.n,this.n]);for(var i=(function(t){for(var e=[];t-- >0;)e.push(0);return e})(this.n),n=(function(t){for(var e=[];t-- >0;)e.push(0);return e})(this.m),o=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),h=0;h<Math.max(o,s);h++){if(h<o){this.s[h]=0;for(var a=h;a<this.m;a++)this.s[h]=r.hypot(this.s[h],t[a][h]);if(0!==this.s[h]){t[h][h]<0&&(this.s[h]=-this.s[h]);for(var u=h;u<this.m;u++)t[u][h]/=this.s[h];t[h][h]+=1}this.s[h]=-this.s[h]}for(var l=h+1;l<this.n;l++){if((function(t,e){return t&&e})(h<o,0!==this.s[h])){for(var g=0,c=h;c<this.m;c++)g+=t[c][h]*t[c][l];g=-g/t[h][h];for(var p=h;p<this.m;p++)t[p][l]+=g*t[p][h]}i[l]=t[h][l]}if((function(t,e){return e})(0,h<o))for(var f=h;f<this.m;f++)this.U[f][h]=t[f][h];if(h<s){i[h]=0;for(var d=h+1;d<this.n;d++)i[h]=r.hypot(i[h],i[d]);if(0!==i[h]){i[h+1]<0&&(i[h]=-i[h]);for(var y=h+1;y<this.n;y++)i[y]/=i[h];i[h+1]+=1}if(i[h]=-i[h],(function(t,e){return t&&e})(h+1<this.m,0!==i[h])){for(var v=h+1;v<this.m;v++)n[v]=0;for(var E=h+1;E<this.n;E++)for(var A=h+1;A<this.m;A++)n[A]+=i[E]*t[A][E];for(var _=h+1;_<this.n;_++)for(var O=-i[_]/i[h+1],N=h+1;N<this.m;N++)t[N][_]+=O*n[N]}for(var L=h+1;L<this.n;L++)this.V[L][h]=i[L]}}var I=Math.min(this.n,this.m+1);o<this.n&&(this.s[o]=t[o][o]),this.m<I&&(this.s[I-1]=0),s+1<I&&(i[s]=t[s][I-1]),i[I-1]=0;for(var T=o;T<e;T++){for(var D=0;D<this.m;D++)this.U[D][T]=0;this.U[T][T]=1}for(var M=o-1;M>=0;M--)if(0!==this.s[M]){for(var w=M+1;w<e;w++){for(var R=0,x=M;x<this.m;x++)R+=this.U[x][M]*this.U[x][w];R=-R/this.U[M][M];for(var C=M;C<this.m;C++)this.U[C][w]+=R*this.U[C][M]}for(var G=M;G<this.m;G++)this.U[G][M]=-this.U[G][M];this.U[M][M]=1+this.U[M][M];for(var U=0;U<M-1;U++)this.U[U][M]=0}else{for(var b=0;b<this.m;b++)this.U[b][M]=0;this.U[M][M]=1}for(var S=this.n-1;S>=0;S--){if((function(t,e){return t&&e})(S<s,0!==i[S]))for(var F=S+1;F<e;F++){for(var Y=0,X=S+1;X<this.n;X++)Y+=this.V[X][S]*this.V[X][F];Y=-Y/this.V[S+1][S];for(var P=S+1;P<this.n;P++)this.V[P][F]+=Y*this.V[P][S]}for(var k=0;k<this.n;k++)this.V[k][S]=0;this.V[S][S]=1}for(var V=I-1,B=Math.pow(2,-52),H=Math.pow(2,-966);I>0;){var W=void 0,q=void 0;for(W=I-2;W>=-1&&-1!==W;W--)if(Math.abs(i[W])<=H+B*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){i[W]=0;break}if(W===I-2)q=4;else{var j=void 0;for(j=I-1;j>=W&&j!==W;j--){var z=(j!==I?Math.abs(i[j]):0)+(j!==W+1?Math.abs(i[j-1]):0);if(Math.abs(this.s[j])<=H+B*z){this.s[j]=0;break}}j===W?q=3:j===I-1?q=1:(q=2,W=j)}switch(W++,q){case 1:var Z=i[I-2];i[I-2]=0;for(var Q=I-2;Q>=W;Q--){var K=r.hypot(this.s[Q],Z),J=this.s[Q]/K,$=Z/K;this.s[Q]=K,Q!==W&&(Z=-$*i[Q-1],i[Q-1]=J*i[Q-1]);for(var tt=0;tt<this.n;tt++)K=J*this.V[tt][Q]+$*this.V[tt][I-1],this.V[tt][I-1]=-$*this.V[tt][Q]+J*this.V[tt][I-1],this.V[tt][Q]=K}break;case 2:var et=i[W-1];i[W-1]=0;for(var it=W;it<I;it++){var rt=r.hypot(this.s[it],et),nt=this.s[it]/rt,ot=et/rt;this.s[it]=rt,et=-ot*i[it],i[it]=nt*i[it];for(var st=0;st<this.m;st++)rt=nt*this.U[st][it]+ot*this.U[st][W-1],this.U[st][W-1]=-ot*this.U[st][it]+nt*this.U[st][W-1],this.U[st][it]=rt}break;case 3:var ht=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[I-1]),Math.abs(this.s[I-2])),Math.abs(i[I-2])),Math.abs(this.s[W])),Math.abs(i[W])),at=this.s[I-1]/ht,ut=this.s[I-2]/ht,lt=i[I-2]/ht,gt=this.s[W]/ht,ct=i[W]/ht,pt=((ut+at)*(ut-at)+lt*lt)/2,ft=at*lt*(at*lt),dt=0;(function(t,e){return t||e})(0!==pt,0!==ft)&&(dt=Math.sqrt(pt*pt+ft),pt<0&&(dt=-dt),dt=ft/(pt+dt));for(var yt=(gt+at)*(gt-at)+dt,vt=gt*ct,Et=W;Et<I-1;Et++){var At=r.hypot(yt,vt),_t=yt/At,Ot=vt/At;Et!==W&&(i[Et-1]=At),yt=_t*this.s[Et]+Ot*i[Et],i[Et]=_t*i[Et]-Ot*this.s[Et],vt=Ot*this.s[Et+1],this.s[Et+1]=_t*this.s[Et+1];for(var Nt=0;Nt<this.n;Nt++)At=_t*this.V[Nt][Et]+Ot*this.V[Nt][Et+1],this.V[Nt][Et+1]=-Ot*this.V[Nt][Et]+_t*this.V[Nt][Et+1],this.V[Nt][Et]=At;if(_t=yt/(At=r.hypot(yt,vt)),Ot=vt/At,this.s[Et]=At,yt=_t*i[Et]+Ot*this.s[Et+1],this.s[Et+1]=-Ot*i[Et]+_t*this.s[Et+1],vt=Ot*i[Et+1],i[Et+1]=_t*i[Et+1],Et<this.m-1)for(var mt=0;mt<this.m;mt++)At=_t*this.U[mt][Et]+Ot*this.U[mt][Et+1],this.U[mt][Et+1]=-Ot*this.U[mt][Et]+_t*this.U[mt][Et+1],this.U[mt][Et]=At}i[I-2]=yt;break;case 4:if(this.s[W]<=0){this.s[W]=this.s[W]<0?-this.s[W]:0;for(var Lt=0;Lt<=V;Lt++)this.V[Lt][W]=-this.V[Lt][W]}for(;W<V&&!(this.s[W]>=this.s[W+1]);){var It=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=It,W<this.n-1)for(var Tt=0;Tt<this.n;Tt++)It=this.V[Tt][W+1],this.V[Tt][W+1]=this.V[Tt][W],this.V[Tt][W]=It;if(W<this.m-1)for(var Dt=0;Dt<this.m;Dt++)It=this.U[Dt][W+1],this.U[Dt][W+1]=this.U[Dt][W],this.U[Dt][W]=It;W++}I--}}return{U:this.U,V:this.V,S:this.s}},r.hypot=function(t,e){var i=void 0;return Math.abs(t)>Math.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=r},function(t,e,i){"use strict";var r=(function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}})();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=(function(){function t(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;n(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=s,this.iMax=e.length+1,this.jMax=i.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 a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[u][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(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 e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var r=1;r<this.jMax;r++){var n=[this.sequence1[i-1]===this.sequence2[r-1]?this.grid[i-1][r-1]+this.match_score:this.grid[i-1][r-1]+this.mismatch_penalty,this.grid[i-1][r]+this.gap_penalty,this.grid[i][r-1]+this.gap_penalty],o=this.arrayAllMaxIndexes(n);this.grid[i][r]=n[o[0]],this.tracebackGrid[i][r]=[o.includes(0),o.includes(1),o.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 e=t[0],i=this.tracebackGrid[e.pos[0]][e.pos[1]];i[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),i[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:'-'+e.seq2}),i[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:'-'+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var i=[],r=-1;-1!==(r=t.indexOf(e,r+1));)i.push(r);return i}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t})();t.exports=o},function(t,e,i){"use strict";var r=function(){};r.FDLayout=i(18),r.FDLayoutConstants=i(4),r.FDLayoutEdge=i(19),r.FDLayoutNode=i(20),r.DimensionD=i(21),r.HashMap=i(22),r.HashSet=i(23),r.IGeometry=i(8),r.IMath=i(9),r.Integer=i(10),r.Point=i(12),r.PointD=i(5),r.RandomSeed=i(16),r.RectangleD=i(13),r.Transform=i(17),r.UniqueIDGeneretor=i(14),r.Quicksort=i(25),r.LinkedList=i(11),r.LGraphObject=i(2),r.LGraph=i(6),r.LEdge=i(1),r.LGraphManager=i(7),r.LNode=i(3),r.Layout=i(15),r.LayoutConstants=i(0),r.NeedlemanWunsch=i(27),r.Matrix=i(24),r.SVD=i(26),t.exports=r},function(t,e,i){"use strict";function r(){this.listeners=[]}var n=r.prototype;n.addListener=function(t,e){this.listeners.push({event:t,callback:e})},n.removeListener=function(t,e){for(var i=this.listeners.length;i>=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i<this.listeners.length;i++){var r=this.listeners[i];t===r.event&&r.callback(e)}},t.exports=r}])},'object'==typeof _e&&'object'==typeof m?m.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof _e?_e.layoutBase=e():t.layoutBase=e()},5332,[]);