cli-jaw 2.0.5 → 2.0.6

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 (614) hide show
  1. package/README.ja.md +229 -315
  2. package/README.ko.md +248 -315
  3. package/README.md +103 -186
  4. package/README.zh-CN.md +282 -296
  5. package/dist/bin/commands/browser-web-ai.js +4 -2
  6. package/dist/bin/commands/browser-web-ai.js.map +1 -1
  7. package/dist/bin/commands/browser.js +76 -0
  8. package/dist/bin/commands/browser.js.map +1 -1
  9. package/dist/bin/commands/doctor.js +122 -4
  10. package/dist/bin/commands/doctor.js.map +1 -1
  11. package/dist/bin/commands/skill.js +5 -3
  12. package/dist/bin/commands/skill.js.map +1 -1
  13. package/dist/bin/postinstall.js +507 -89
  14. package/dist/bin/postinstall.js.map +1 -1
  15. package/dist/lib/mcp/format-converters.js +32 -4
  16. package/dist/lib/mcp/format-converters.js.map +1 -1
  17. package/dist/lib/mcp/mcp-install.js +5 -0
  18. package/dist/lib/mcp/mcp-install.js.map +1 -1
  19. package/dist/lib/mcp/skills-distribution.js +52 -53
  20. package/dist/lib/mcp/skills-distribution.js.map +1 -1
  21. package/dist/lib/mcp/skills-reset.js +29 -16
  22. package/dist/lib/mcp/skills-reset.js.map +1 -1
  23. package/dist/lib/mcp/skills-utils.js +64 -2
  24. package/dist/lib/mcp/skills-utils.js.map +1 -1
  25. package/dist/lib/mcp/unified-config.js +7 -3
  26. package/dist/lib/mcp/unified-config.js.map +1 -1
  27. package/dist/scripts/fresh-install-smoke.js +1 -1
  28. package/dist/scripts/fresh-install-smoke.js.map +1 -1
  29. package/dist/server.js +44 -4
  30. package/dist/server.js.map +1 -1
  31. package/dist/src/agent/args.js +148 -1
  32. package/dist/src/agent/args.js.map +1 -1
  33. package/dist/src/agent/claude-e-runtime.js +42 -0
  34. package/dist/src/agent/claude-e-runtime.js.map +1 -0
  35. package/dist/src/agent/claude-i-runtime.js +42 -0
  36. package/dist/src/agent/claude-i-runtime.js.map +1 -0
  37. package/dist/src/agent/cli-helpers.js +9 -0
  38. package/dist/src/agent/cli-helpers.js.map +1 -0
  39. package/dist/src/agent/codex-app-client.js +240 -0
  40. package/dist/src/agent/codex-app-client.js.map +1 -0
  41. package/dist/src/agent/codex-app-events.js +268 -0
  42. package/dist/src/agent/codex-app-events.js.map +1 -0
  43. package/dist/src/agent/error-classifier.js +8 -2
  44. package/dist/src/agent/error-classifier.js.map +1 -1
  45. package/dist/src/agent/events/acp.js +200 -0
  46. package/dist/src/agent/events/acp.js.map +1 -0
  47. package/dist/src/agent/events/claude.js +200 -0
  48. package/dist/src/agent/events/claude.js.map +1 -0
  49. package/dist/src/agent/events/codex.js +118 -0
  50. package/dist/src/agent/events/codex.js.map +1 -0
  51. package/dist/src/agent/events/gemini.js +100 -0
  52. package/dist/src/agent/events/gemini.js.map +1 -0
  53. package/dist/src/agent/events/grok.js +298 -0
  54. package/dist/src/agent/events/grok.js.map +1 -0
  55. package/dist/src/agent/events/helpers.js +237 -0
  56. package/dist/src/agent/events/helpers.js.map +1 -0
  57. package/dist/src/agent/events/index.js +315 -0
  58. package/dist/src/agent/events/index.js.map +1 -0
  59. package/dist/src/agent/events/opencode.js +171 -0
  60. package/dist/src/agent/events/opencode.js.map +1 -0
  61. package/dist/src/agent/events/summary.js +128 -0
  62. package/dist/src/agent/events/summary.js.map +1 -0
  63. package/dist/src/agent/events/tool-labels.js +299 -0
  64. package/dist/src/agent/events/tool-labels.js.map +1 -0
  65. package/dist/src/agent/events/types.js +3 -0
  66. package/dist/src/agent/events/types.js.map +1 -0
  67. package/dist/src/agent/events.js +2 -1487
  68. package/dist/src/agent/events.js.map +1 -1
  69. package/dist/src/agent/grok-trace-backfill.js +153 -0
  70. package/dist/src/agent/grok-trace-backfill.js.map +1 -0
  71. package/dist/src/agent/lifecycle-handler.js +60 -16
  72. package/dist/src/agent/lifecycle-handler.js.map +1 -1
  73. package/dist/src/agent/live-run-state.js +1 -1
  74. package/dist/src/agent/live-run-state.js.map +1 -1
  75. package/dist/src/agent/memory-flush-controller.js +26 -0
  76. package/dist/src/agent/memory-flush-controller.js.map +1 -1
  77. package/dist/src/agent/resume-classifier.js +9 -0
  78. package/dist/src/agent/resume-classifier.js.map +1 -1
  79. package/dist/src/agent/session-persistence.js +7 -2
  80. package/dist/src/agent/session-persistence.js.map +1 -1
  81. package/dist/src/agent/spawn/process-kill.js +29 -0
  82. package/dist/src/agent/spawn/process-kill.js.map +1 -0
  83. package/dist/src/agent/spawn/queue.js +273 -0
  84. package/dist/src/agent/spawn/queue.js.map +1 -0
  85. package/dist/src/agent/spawn/resume.js +56 -0
  86. package/dist/src/agent/spawn/resume.js.map +1 -0
  87. package/dist/src/agent/spawn.js +435 -371
  88. package/dist/src/agent/spawn.js.map +1 -1
  89. package/dist/src/agent/watchdog.js +5 -1
  90. package/dist/src/agent/watchdog.js.map +1 -1
  91. package/dist/src/browser/adaptive-fetch/browser-escalation.js +177 -0
  92. package/dist/src/browser/adaptive-fetch/browser-escalation.js.map +1 -0
  93. package/dist/src/browser/adaptive-fetch/browser-runtime.js +38 -0
  94. package/dist/src/browser/adaptive-fetch/browser-runtime.js.map +1 -0
  95. package/dist/src/browser/adaptive-fetch/browser-session.js +97 -0
  96. package/dist/src/browser/adaptive-fetch/browser-session.js.map +1 -0
  97. package/dist/src/browser/adaptive-fetch/challenge-detector.js +88 -0
  98. package/dist/src/browser/adaptive-fetch/challenge-detector.js.map +1 -0
  99. package/dist/src/browser/adaptive-fetch/content-scorer.js +145 -0
  100. package/dist/src/browser/adaptive-fetch/content-scorer.js.map +1 -0
  101. package/dist/src/browser/adaptive-fetch/endpoint-resolvers.js +382 -0
  102. package/dist/src/browser/adaptive-fetch/endpoint-resolvers.js.map +1 -0
  103. package/dist/src/browser/adaptive-fetch/fetcher.js +105 -0
  104. package/dist/src/browser/adaptive-fetch/fetcher.js.map +1 -0
  105. package/dist/src/browser/adaptive-fetch/human-loop.js +101 -0
  106. package/dist/src/browser/adaptive-fetch/human-loop.js.map +1 -0
  107. package/dist/src/browser/adaptive-fetch/index.js +586 -0
  108. package/dist/src/browser/adaptive-fetch/index.js.map +1 -0
  109. package/dist/src/browser/adaptive-fetch/metadata.js +169 -0
  110. package/dist/src/browser/adaptive-fetch/metadata.js.map +1 -0
  111. package/dist/src/browser/adaptive-fetch/output.js +71 -0
  112. package/dist/src/browser/adaptive-fetch/output.js.map +1 -0
  113. package/dist/src/browser/adaptive-fetch/reader-adapters.js +135 -0
  114. package/dist/src/browser/adaptive-fetch/reader-adapters.js.map +1 -0
  115. package/dist/src/browser/adaptive-fetch/safety.js +296 -0
  116. package/dist/src/browser/adaptive-fetch/safety.js.map +1 -0
  117. package/dist/src/browser/adaptive-fetch/third-party-readers.js +43 -0
  118. package/dist/src/browser/adaptive-fetch/third-party-readers.js.map +1 -0
  119. package/dist/src/browser/adaptive-fetch/trace.js +61 -0
  120. package/dist/src/browser/adaptive-fetch/trace.js.map +1 -0
  121. package/dist/src/browser/adaptive-fetch/transforms.js +81 -0
  122. package/dist/src/browser/adaptive-fetch/transforms.js.map +1 -0
  123. package/dist/src/browser/adaptive-fetch/validators.js +108 -0
  124. package/dist/src/browser/adaptive-fetch/validators.js.map +1 -0
  125. package/dist/src/browser/adaptive-fetch/waf-profiles.js +135 -0
  126. package/dist/src/browser/adaptive-fetch/waf-profiles.js.map +1 -0
  127. package/dist/src/browser/index.js +1 -0
  128. package/dist/src/browser/index.js.map +1 -1
  129. package/dist/src/browser/web-ai/gemini-model.js +42 -15
  130. package/dist/src/browser/web-ai/gemini-model.js.map +1 -1
  131. package/dist/src/cli/claude-models.js +1 -1
  132. package/dist/src/cli/claude-models.js.map +1 -1
  133. package/dist/src/cli/compact.js +2 -0
  134. package/dist/src/cli/compact.js.map +1 -1
  135. package/dist/src/cli/handlers-completions.js +3 -0
  136. package/dist/src/cli/handlers-completions.js.map +1 -1
  137. package/dist/src/cli/handlers-runtime.js +5 -2
  138. package/dist/src/cli/handlers-runtime.js.map +1 -1
  139. package/dist/src/cli/readiness.js +43 -1
  140. package/dist/src/cli/readiness.js.map +1 -1
  141. package/dist/src/cli/registry.js +58 -0
  142. package/dist/src/cli/registry.js.map +1 -1
  143. package/dist/src/core/browser-open.js +4 -1
  144. package/dist/src/core/browser-open.js.map +1 -1
  145. package/dist/src/core/claude-install.js +4 -0
  146. package/dist/src/core/claude-install.js.map +1 -1
  147. package/dist/src/core/cli-detect.js +61 -13
  148. package/dist/src/core/cli-detect.js.map +1 -1
  149. package/dist/src/core/compact.js +295 -63
  150. package/dist/src/core/compact.js.map +1 -1
  151. package/dist/src/core/config.js +151 -11
  152. package/dist/src/core/config.js.map +1 -1
  153. package/dist/src/core/db.js +10 -1
  154. package/dist/src/core/db.js.map +1 -1
  155. package/dist/src/core/employees.js +1 -1
  156. package/dist/src/core/employees.js.map +1 -1
  157. package/dist/src/core/logger.js +28 -9
  158. package/dist/src/core/logger.js.map +1 -1
  159. package/dist/src/core/runtime-settings.js +32 -5
  160. package/dist/src/core/runtime-settings.js.map +1 -1
  161. package/dist/src/manager/memory/embedding/state-machine.js +2 -1
  162. package/dist/src/manager/memory/embedding/state-machine.js.map +1 -1
  163. package/dist/src/manager/memory/embedding/sync.js +52 -33
  164. package/dist/src/manager/memory/embedding/sync.js.map +1 -1
  165. package/dist/src/manager/memory/embedding/vec-store.js +10 -10
  166. package/dist/src/manager/memory/embedding/vec-store.js.map +1 -1
  167. package/dist/src/manager/routes/dashboard-memory.js +43 -16
  168. package/dist/src/manager/routes/dashboard-memory.js.map +1 -1
  169. package/dist/src/manager/server.js +11 -0
  170. package/dist/src/manager/server.js.map +1 -1
  171. package/dist/src/memory/indexing.js +6 -1
  172. package/dist/src/memory/indexing.js.map +1 -1
  173. package/dist/src/orchestrator/distribute.js +5 -4
  174. package/dist/src/orchestrator/distribute.js.map +1 -1
  175. package/dist/src/prompt/builder.js +12 -1
  176. package/dist/src/prompt/builder.js.map +1 -1
  177. package/dist/src/prompt/runtime-context.js +69 -0
  178. package/dist/src/prompt/runtime-context.js.map +1 -0
  179. package/dist/src/routes/browser.js +33 -0
  180. package/dist/src/routes/browser.js.map +1 -1
  181. package/dist/src/routes/employees.js +1 -1
  182. package/dist/src/routes/employees.js.map +1 -1
  183. package/dist/src/routes/memory.js +1 -1
  184. package/dist/src/routes/memory.js.map +1 -1
  185. package/dist/src/routes/orchestrate.js +37 -10
  186. package/dist/src/routes/orchestrate.js.map +1 -1
  187. package/dist/src/routes/quota.js +91 -1
  188. package/dist/src/routes/quota.js.map +1 -1
  189. package/dist/src/routes/runtime-context.js +43 -0
  190. package/dist/src/routes/runtime-context.js.map +1 -0
  191. package/dist/src/routes/security-audit.js +14 -0
  192. package/dist/src/routes/security-audit.js.map +1 -0
  193. package/dist/src/routes/settings.js +8 -1
  194. package/dist/src/routes/settings.js.map +1 -1
  195. package/dist/src/security/security-audit-log.js +99 -0
  196. package/dist/src/security/security-audit-log.js.map +1 -0
  197. package/dist/src/telegram/bot.js +4 -2
  198. package/dist/src/telegram/bot.js.map +1 -1
  199. package/dist/src/types/cli-engine.js +4 -0
  200. package/dist/src/types/cli-engine.js.map +1 -1
  201. package/dist/src/types/cli-events.js +1 -1
  202. package/dist/src/types/cli-events.js.map +1 -1
  203. package/package.json +9 -3
  204. package/public/assets/providers/antigravity-color.svg +1 -0
  205. package/public/assets/providers/antigravity.svg +1 -0
  206. package/public/assets/providers/copilot-color.svg +1 -1
  207. package/public/assets/providers/copilot.svg +1 -1
  208. package/public/assets/providers/grok-color.svg +1 -0
  209. package/public/assets/providers/grok.svg +1 -0
  210. package/public/css/chat-search.css +168 -0
  211. package/public/css/chat.css +43 -1
  212. package/public/css/modals.css +41 -0
  213. package/public/dist/assets/{AdvancedExport-BAdZUC-6.js → AdvancedExport-CBvz4_IZ.js} +1 -1
  214. package/public/dist/assets/Agent-DlUqCMXJ.js +1 -0
  215. package/public/dist/assets/{Browser-BsdxDVgM.js → Browser-66BpLQck.js} +1 -1
  216. package/public/dist/assets/{ChannelsDiscord-Dg_jto6l.js → ChannelsDiscord-BifT2Dum.js} +1 -1
  217. package/public/dist/assets/{ChannelsTelegram-DGyZfJGS.js → ChannelsTelegram-CK6tYQ8k.js} +1 -1
  218. package/public/dist/assets/DashboardEmbeddingSection-6F8zSSja.js +2 -0
  219. package/public/dist/assets/{DashboardMeta-CAH9ONTb.js → DashboardMeta-Cc03HT5R.js} +1 -1
  220. package/public/dist/assets/{Display-DM_yvyKL.js → Display-arOjcMQZ.js} +1 -1
  221. package/public/dist/assets/Employees-YbW-mI67.js +1 -0
  222. package/public/dist/assets/{HealthBadge-Dtr-dDnw.js → HealthBadge-DEPFkcA0.js} +1 -1
  223. package/public/dist/assets/Heartbeat-CW4eIhtJ.js +1 -0
  224. package/public/dist/assets/{InlineWarn-E64UaKFh.js → InlineWarn-DoJS7AgM.js} +1 -1
  225. package/public/dist/assets/{Mcp-Dlp2X7X7.js → Mcp-ZQ6ARQb6.js} +1 -1
  226. package/public/dist/assets/Memory-BAUWJMqc.js +1 -0
  227. package/public/dist/assets/{MilkdownWysiwygEditor-Ctww8i0L.js → MilkdownWysiwygEditor-IAqFtXvM.js} +1 -1
  228. package/public/dist/assets/ModelProvider-DUtmFh0J.js +1 -0
  229. package/public/dist/assets/{Network-Df1R2YcQ.js → Network-B_4E82zQ.js} +1 -1
  230. package/public/dist/assets/{Permissions-BKJ5K6EL.js → Permissions-BkADXjQ4.js} +1 -1
  231. package/public/dist/assets/{Permissions-CcWZoOVP.js → Permissions-DvUCB8wA.js} +1 -1
  232. package/public/dist/assets/{Profile-DZ7xf1WZ.js → Profile-BcnTCSYM.js} +1 -1
  233. package/public/dist/assets/{Prompts-Bh5DYt8e.js → Prompts-CUs_RoRE.js} +1 -1
  234. package/public/dist/assets/{SpeechKeys-CQwtVxOP.js → SpeechKeys-qxc-ROWN.js} +1 -1
  235. package/public/dist/assets/agent-meta-Du8y6mSM.js +1 -0
  236. package/public/dist/assets/app-CGqTcIeF.js +39 -0
  237. package/public/dist/assets/app-Dpk6cE6C.css +1 -0
  238. package/public/dist/assets/architecture-7EHR7CIX-wVaUQezY.js +1 -0
  239. package/public/dist/assets/architectureDiagram-3BPJPVTR-kYIVzmWe.js +36 -0
  240. package/public/dist/assets/blockDiagram-GPEHLZMM-B204CPhe.js +132 -0
  241. package/public/dist/assets/{c4Diagram-AHTNJAMY-Bp2QLC-s.js → c4Diagram-AAUBKEIU-DAv6TAjg.js} +6 -6
  242. package/public/dist/assets/channel-CCQujL1n.js +1 -0
  243. package/public/dist/assets/{chunk-EDXVE4YY-COudQKkJ.js → chunk-2J33WTMH-xiPJWKcl.js} +1 -1
  244. package/public/dist/assets/chunk-3OPIFGDE-DOAvk9x8.js +62 -0
  245. package/public/dist/assets/{chunk-4BX2VUAB-Cm3KqBkS.js → chunk-4BX2VUAB-6lTRwyT0.js} +1 -1
  246. package/public/dist/assets/chunk-4EGX6M5U-DXtAEgX6.js +1 -0
  247. package/public/dist/assets/chunk-55IACEB6-Dx2JkQLw.js +1 -0
  248. package/public/dist/assets/chunk-5DO6E6H7-DDcMHB95.js +1 -0
  249. package/public/dist/assets/chunk-5ZQYHXKU-Bd-RFO5i.js +2 -0
  250. package/public/dist/assets/chunk-727SXJPM-BrsRzj8z.js +206 -0
  251. package/public/dist/assets/{chunk-AGHRB4JF-DIMn8T3_.js → chunk-AGHRB4JF-CYdXVA2-.js} +1 -1
  252. package/public/dist/assets/chunk-AQP2D5EJ-Di6Gstk-.js +231 -0
  253. package/public/dist/assets/{chunk-LIHQZDEY-Xw9ZX8of.js → chunk-BR22UD5L-CVuYkAd1.js} +1 -1
  254. package/public/dist/assets/{chunk-BSJP7CBP-DnSYKjii.js → chunk-BSJP7CBP-B47GpxcW.js} +1 -1
  255. package/public/dist/assets/chunk-CSCIHK7Q-CAE1p4Em.js +123 -0
  256. package/public/dist/assets/chunk-FHYWG6QK-CxZt-yZZ.js +1 -0
  257. package/public/dist/assets/{chunk-FMBD7UC4-6yXYicjw.js → chunk-FMBD7UC4-CwqBlx0l.js} +1 -1
  258. package/public/dist/assets/chunk-KSCS5N6A-D9a4ZkOy.js +10 -0
  259. package/public/dist/assets/{chunk-ZZ45TVLE-D5oxCC1O.js → chunk-L5ZTLDWV-D208QbfC.js} +1 -1
  260. package/public/dist/assets/{chunk-336JU56O-CAt5aBOe.js → chunk-LZXEDZCA-CE2KFduj.js} +1 -1
  261. package/public/dist/assets/chunk-MPE355IW-Bp4qAOUf.js +1 -0
  262. package/public/dist/assets/chunk-MZUSXYTE-DAU-v-0c.js +1 -0
  263. package/public/dist/assets/chunk-N66VUXT2-CpPz1L5u.js +1 -0
  264. package/public/dist/assets/chunk-ND2GUHAM-zZ7h1CPf.js +1 -0
  265. package/public/dist/assets/chunk-NNHCCRGN-BaiX9a5F.js +159 -0
  266. package/public/dist/assets/{chunk-X2U36JSP-CoMFMVNF.js → chunk-NZK2D7GU-CTqFQ8K5.js} +1 -1
  267. package/public/dist/assets/chunk-O5CBEL6O-BTuvXKFi.js +11 -0
  268. package/public/dist/assets/chunk-PUPMXCY4-ppZvktf-.js +1 -0
  269. package/public/dist/assets/chunk-QZHKN3VN-CBAtPPT7.js +1 -0
  270. package/public/dist/assets/chunk-UIBZB4QT-rJZEVBX0.js +1 -0
  271. package/public/dist/assets/chunk-WCWK7LTN-CGvUyB8h.js +1 -0
  272. package/public/dist/assets/chunk-WU5MYG2G-C3fKlSvP.js +1 -0
  273. package/public/dist/assets/{chunk-XPW4576I-CmAz5C-j.js → chunk-XPW4576I-BaQfzRci.js} +1 -1
  274. package/public/dist/assets/classDiagram-4FO5ZUOK-Cb-qL5u3.js +1 -0
  275. package/public/dist/assets/classDiagram-v2-Q7XG4LA2-BPhGdj15.js +1 -0
  276. package/public/dist/assets/constants-BxG09J6S.js +1 -0
  277. package/public/dist/assets/cose-bilkent-S5V4N54A-D1zmarou.js +1 -0
  278. package/public/dist/assets/dagre-BM42HDAG-BVkBttzA.js +4 -0
  279. package/public/dist/assets/dagre-DnoxfNXr.js +1 -0
  280. package/public/dist/assets/diagram-2AECGRRQ-Bs32KPnT.js +43 -0
  281. package/public/dist/assets/{diagram-5BDNPKRD-Cl4PzCD0.js → diagram-5GNKFQAL-YDYgPOQj.js} +2 -2
  282. package/public/dist/assets/diagram-KO2AKTUF-1tIdFl26.js +3 -0
  283. package/public/dist/assets/{diagram-TYMM5635-B_Xoa1Gp.js → diagram-LMA3HP47-B1y15kav.js} +1 -1
  284. package/public/dist/assets/diagram-OG6HWLK6-C25j1jGg.js +24 -0
  285. package/public/dist/assets/{dist-C9LWf2uC.js → dist-0v1UKkQ3.js} +1 -1
  286. package/public/dist/assets/dist-BMi_buEb.js +1 -0
  287. package/public/dist/assets/{dist-B6G8pbap.js → dist-BQNQk-1M.js} +1 -1
  288. package/public/dist/assets/{dist-CCKktDoF.js → dist-BVpa_e6W.js} +1 -1
  289. package/public/dist/assets/dist-BkrbW_LS.js +1 -0
  290. package/public/dist/assets/{dist-CkMC2PPt.js → dist-C1VqWrYZ.js} +1 -1
  291. package/public/dist/assets/{dist-BA7sRne4.js → dist-C3vh7d65.js} +1 -1
  292. package/public/dist/assets/{dist-BhzKO6nt2.js → dist-CE4s7vg82.js} +1 -1
  293. package/public/dist/assets/{dist-BDMNMdPF.js → dist-CjPin7Mr.js} +1 -1
  294. package/public/dist/assets/{dist-W7IGn2ug.js → dist-Ck6PnIlo.js} +1 -1
  295. package/public/dist/assets/{dist-B1rKu9eP.js → dist-CnIrGAPx.js} +1 -1
  296. package/public/dist/assets/{dist-CEDX2HGI.js → dist-Cv8S3FhF.js} +1 -1
  297. package/public/dist/assets/{dist-55MYVjjj.js → dist-D0PYXGt2.js} +1 -1
  298. package/public/dist/assets/{dist-C0sOT_UM.js → dist-D5GUqT-6.js} +1 -1
  299. package/public/dist/assets/{dist-C5S-Rbvc.js → dist-D66X8iAn.js} +1 -1
  300. package/public/dist/assets/dist-D815C1Fv.js +1 -0
  301. package/public/dist/assets/{dist-Ch6JG5jE.js → dist-DDDFJ8jG.js} +1 -1
  302. package/public/dist/assets/{dist-2oDfqE98.js → dist-DHQI31dn.js} +1 -1
  303. package/public/dist/assets/{dist-BTp_Oy_x.js → dist-DTQW91xt.js} +1 -1
  304. package/public/dist/assets/{dist-BuaQLcgQ.js → dist-Dm7RAaUo.js} +1 -1
  305. package/public/dist/assets/{dist-BJyDhGpS.js → dist-DrIWh2fi.js} +1 -1
  306. package/public/dist/assets/{dist-BGzHP3f8.js → dist-DzT7frM2.js} +1 -1
  307. package/public/dist/assets/{dist-wdLr2dSH.js → dist-Qs7HHNCC.js} +1 -1
  308. package/public/dist/assets/{dist-BjqyutOM.js → dist-Rs_Khtjb.js} +1 -1
  309. package/public/dist/assets/{dist-DdhWu7OM.js → dist-fJAyK82z.js} +1 -1
  310. package/public/dist/assets/{dist-G7QUHtDS.js → dist-jcptfm_T.js} +1 -1
  311. package/public/dist/assets/dist-sOV2kBhQ.js +1 -0
  312. package/public/dist/assets/{dist-BoG5I6U5.js → dist-vQskrHxt.js} +1 -1
  313. package/public/dist/assets/{dockerfile-CrC2HXHP.js → dockerfile-DAfh5qoE.js} +1 -1
  314. package/public/dist/assets/{employees-CIkIyvtL.js → employees-DRmX2RDd.js} +2 -2
  315. package/public/dist/assets/{erDiagram-SMLLAGMA-BvtqhMsS.js → erDiagram-TEJ5UH35-CRvCbztR.js} +6 -6
  316. package/public/dist/assets/{error-normalize-CkhPeQYx.js → error-normalize-CNbPE4lO.js} +1 -1
  317. package/public/dist/assets/eventmodeling-FCH6USID-Cq0nylxO.js +1 -0
  318. package/public/dist/assets/{factor-1CttFx2G.js → factor-BpoYJieo.js} +1 -1
  319. package/public/dist/assets/fields-DUawAHWZ.js +1 -0
  320. package/public/dist/assets/flowDiagram-I6XJVG4X-CzvVnib_.js +162 -0
  321. package/public/dist/assets/ganttDiagram-6RSMTGT7-BbUYP6iv.js +292 -0
  322. package/public/dist/assets/gitGraph-WXDBUCRP-DDq6-3D3.js +1 -0
  323. package/public/dist/assets/gitGraphDiagram-PVQCEYII-CbKdM7nW.js +106 -0
  324. package/public/dist/assets/graphlib-BLOO0H5r.js +1 -0
  325. package/public/dist/assets/info-J43DQDTF-OUnqwpUV.js +1 -0
  326. package/public/dist/assets/infoDiagram-5YYISTIA-BrZmg1At.js +2 -0
  327. package/public/dist/assets/{ishikawaDiagram-UXIWVN3A-DZW-Nqsf.js → ishikawaDiagram-YF4QCWOH-BDWXqJi5.js} +2 -2
  328. package/public/dist/assets/javascript-CZjRNq5R.js +1 -0
  329. package/public/dist/assets/{journeyDiagram-VCZTEJTY-ByVRJxVF.js → journeyDiagram-JHISSGLW-CPFRd_M3.js} +6 -6
  330. package/public/dist/assets/{jsx-runtime-BjL7qHh8.js → jsx-runtime-BZmCptaP.js} +1 -1
  331. package/public/dist/assets/{kanban-definition-6JOO6SKY-xwN0YCW2.js → kanban-definition-UN3LZRKU-BcQbBplS.js} +10 -10
  332. package/public/dist/assets/katex-CF5bGce6.js +1 -0
  333. package/public/dist/assets/manager-B5OmizBL.css +1 -0
  334. package/public/dist/assets/manager-Cs3eMBcx.js +25 -0
  335. package/public/dist/assets/{memory-CnBc2_Va.js → memory-BA-ki3gn.js} +1 -1
  336. package/public/dist/assets/memory-DLQbyBA3.js +1 -0
  337. package/public/dist/assets/mermaid-loader-BVPsKrpr.js +1 -0
  338. package/public/dist/assets/mermaid-parser.core-C62NUJRb.js +3 -0
  339. package/public/dist/assets/mermaid.core-ArqR5iFa.js +9 -0
  340. package/public/dist/assets/mermaid.core-BAwu4U2Y.js +1 -0
  341. package/public/dist/assets/{mindmap-definition-QFDTVHPH-Chqgsh1N.js → mindmap-definition-RKZ34NQL-C35cGkNU.js} +29 -29
  342. package/public/dist/assets/{nsis-_CjIiUyF.js → nsis-Ch4QINLN.js} +1 -1
  343. package/public/dist/assets/packet-YPE3B663-Bb9hBQ06.js +1 -0
  344. package/public/dist/assets/{page-shell-CTxVDJ8Y.js → page-shell-CVAobxbP.js} +1 -1
  345. package/public/dist/assets/pie-LRSECV5Y-CNRQnRNZ.js +1 -0
  346. package/public/dist/assets/pieDiagram-4H26LBE5-B8C_hoqJ.js +30 -0
  347. package/public/dist/assets/provider-icons-dxT69zGg.js +8 -0
  348. package/public/dist/assets/{pug-CbR8lCtK.js → pug-CXYqmmpP.js} +1 -1
  349. package/public/dist/assets/quadrantDiagram-W4KKPZXB-BEPrine5.js +7 -0
  350. package/public/dist/assets/radar-GUYGQ44K-BxngU2v0.js +1 -0
  351. package/public/dist/assets/{render-lpTpN1El.js → render-C7_e0J_X.js} +3 -3
  352. package/public/dist/assets/{requirementDiagram-MS252O5E-wnPtv0LG.js → requirementDiagram-4Y6WPE33-ClDDon9c.js} +4 -4
  353. package/public/dist/assets/rolldown-runtime-XQCOJYun.js +1 -0
  354. package/public/dist/assets/sankeyDiagram-5OEKKPKP-Bjs3OE-1.js +40 -0
  355. package/public/dist/assets/sequenceDiagram-3UESZ5HK-BM8IAaEe.js +162 -0
  356. package/public/dist/assets/settings-DjyKdqev.js +1 -0
  357. package/public/dist/assets/settings-pUJzyeX2.js +42 -0
  358. package/public/dist/assets/{sidebar-Cwt0FxQl.js → sidebar-CO9Qjj6v.js} +2 -2
  359. package/public/dist/assets/skills-CX3qJ77s.js +1 -0
  360. package/public/dist/assets/{skills-DDmTyywh.js → skills-Dq7fD8I3.js} +1 -1
  361. package/public/dist/assets/{slash-commands-D5y5AVvS.js → slash-commands-DRsKtuGT.js} +1 -1
  362. package/public/dist/assets/slash-commands-UbS8w9ij.js +1 -0
  363. package/public/dist/assets/stateDiagram-AJRCARHV-BvNABuXE.js +1 -0
  364. package/public/dist/assets/stateDiagram-v2-BHNVJYJU-CCIo81qy.js +1 -0
  365. package/public/dist/assets/{timeline-definition-GMOUNBTQ-DUz1-iOx.js → timeline-definition-PNZ67QCA-CIvTvac3.js} +8 -8
  366. package/public/dist/assets/trace-drawer-DDFdU07_.js +15 -0
  367. package/public/dist/assets/treeView-BLDUP644-cXRzPGzz.js +1 -0
  368. package/public/dist/assets/treemap-LRROVOQU-BsZE5HPE.js +1 -0
  369. package/public/dist/assets/ui-CeBmBBZM.js +140 -0
  370. package/public/dist/assets/ui-TMXjvH0r.js +1 -0
  371. package/public/dist/assets/{vendor-render-DEStnpJ8.js → vendor-render-DCb9B75Q.js} +38 -37
  372. package/public/dist/assets/vendor-utils-BnxL60_-.js +1 -0
  373. package/public/dist/assets/vennDiagram-CIIHVFJN-C5cbS2KC.js +34 -0
  374. package/public/dist/assets/wardley-L42UT6IY-D_qm0cZD.js +1 -0
  375. package/public/dist/assets/{wardleyDiagram-NUSXRM2D-CLAhOzap.js → wardleyDiagram-YWT4CUSO-BsRBBGFP.js} +61 -3
  376. package/public/dist/assets/{wiki-link-suggestions-LQuYT22G.js → wiki-link-suggestions-BHwNQXT_.js} +2 -2
  377. package/public/dist/assets/{xychartDiagram-5P7HB3ND-DLnY9i8z.js → xychartDiagram-2RQKCTM6-B6rqui6F.js} +6 -6
  378. package/public/dist/index.html +102 -3
  379. package/public/dist/manager/index.html +2 -2
  380. package/public/index.html +101 -1
  381. package/public/js/constants.ts +72 -0
  382. package/public/js/diagram/iframe-renderer.ts +7 -0
  383. package/public/js/features/chat-scroll.ts +31 -0
  384. package/public/js/features/chat-search.ts +223 -0
  385. package/public/js/features/help-content.ts +20 -2
  386. package/public/js/features/help-dialog.ts +38 -2
  387. package/public/js/features/pending-queue.ts +6 -0
  388. package/public/js/features/process-block.ts +20 -0
  389. package/public/js/features/settings-channel.ts +3 -1
  390. package/public/js/features/settings-cli-status.ts +24 -3
  391. package/public/js/features/settings-core.ts +134 -21
  392. package/public/js/features/settings-types.ts +12 -1
  393. package/public/js/features/settings.ts +1 -1
  394. package/public/js/features/trace-drawer.ts +2 -1
  395. package/public/js/features/voice-recorder.ts +222 -42
  396. package/public/js/main.ts +58 -4
  397. package/public/js/provider-icons.ts +46 -27
  398. package/public/js/render/markdown.ts +6 -0
  399. package/public/js/ui.ts +33 -7
  400. package/public/js/ws.ts +5 -1
  401. package/public/locales/en.json +31 -7
  402. package/public/locales/ja.json +31 -7
  403. package/public/locales/ko.json +31 -7
  404. package/public/locales/zh.json +31 -7
  405. package/public/manager/src/App.tsx +19 -55
  406. package/public/manager/src/InstancePreview.tsx +46 -1
  407. package/public/manager/src/components/InstanceDetailPanel.tsx +7 -2
  408. package/public/manager/src/components/InstanceLogsPanel.tsx +138 -0
  409. package/public/manager/src/dashboard-settings/DashboardEmbeddingSection.tsx +37 -7
  410. package/public/manager/src/jaw-ceo/useJawCeoDashboardBridge.tsx +1 -0
  411. package/public/manager/src/manager-components.css +76 -0
  412. package/public/manager/src/preview.ts +26 -3
  413. package/public/manager/src/settings/fields/SelectField.tsx +51 -17
  414. package/public/manager/src/settings/pages/Agent.tsx +37 -2
  415. package/public/manager/src/settings/pages/Heartbeat.tsx +3 -2
  416. package/public/manager/src/settings/pages/Memory.tsx +3 -2
  417. package/public/manager/src/settings/pages/components/EmployeeRow.tsx +8 -4
  418. package/public/manager/src/settings/pages/components/PerCliRow.tsx +31 -5
  419. package/public/manager/src/settings/pages/components/agent/FlushAgentSection.tsx +4 -2
  420. package/public/manager/src/settings/pages/components/agent/RuntimeEmployeeRow.tsx +1 -1
  421. package/public/manager/src/settings/pages/components/agent/RuntimeHeader.tsx +23 -1
  422. package/public/manager/src/settings/pages/components/agent/agent-meta.ts +49 -0
  423. package/public/manager/src/settings/pages/components/employees-helpers.ts +6 -1
  424. package/public/manager/src/settings/pages/components/heartbeat-helpers.ts +11 -1
  425. package/public/manager/src/settings-controls.css +25 -0
  426. package/public/manager/src/usePreviewShortcutMessages.ts +30 -0
  427. package/public/manager/src/usePreviewSttLifecycle.ts +31 -0
  428. package/scripts/fresh-install-smoke.ts +1 -1
  429. package/scripts/install-officecli.ps1 +33 -5
  430. package/scripts/install-officecli.sh +52 -8
  431. package/scripts/install-wsl.sh +96 -24
  432. package/scripts/install.sh +82 -11
  433. package/scripts/postinstall-guard.cjs +57 -30
  434. package/public/dist/assets/Agent-DNpehKB2.js +0 -1
  435. package/public/dist/assets/DashboardEmbeddingSection-BYdGgqg7.js +0 -2
  436. package/public/dist/assets/Employees-CuYuTy0R.js +0 -1
  437. package/public/dist/assets/Heartbeat-C-vq02MW.js +0 -1
  438. package/public/dist/assets/Memory-BPKWJDXK.js +0 -1
  439. package/public/dist/assets/ModelProvider-Bd6vGkXT.js +0 -1
  440. package/public/dist/assets/agent-meta-C1pQzExf.js +0 -1
  441. package/public/dist/assets/app-BxsIleo0.js +0 -32
  442. package/public/dist/assets/app-CB9n5A77.css +0 -1
  443. package/public/dist/assets/architecture-YZFGNWBL-BRI-0IaU.js +0 -1
  444. package/public/dist/assets/architectureDiagram-Q4EWVU46-z0JCgZrJ.js +0 -36
  445. package/public/dist/assets/blockDiagram-DXYQGD6D-KaOz3aFS.js +0 -132
  446. package/public/dist/assets/channel-jLopKIgm.js +0 -1
  447. package/public/dist/assets/chunk-2KRD3SAO-C8hJZPJu.js +0 -1
  448. package/public/dist/assets/chunk-426QAEUC-atJRhvKN.js +0 -1
  449. package/public/dist/assets/chunk-4TB4RGXK-BD7UhIN8.js +0 -206
  450. package/public/dist/assets/chunk-55IACEB6-CAWcPDdr.js +0 -1
  451. package/public/dist/assets/chunk-5FUZZQ4R-Cg1pzs6p.js +0 -62
  452. package/public/dist/assets/chunk-5PVQY5BW-otv3HwE_.js +0 -2
  453. package/public/dist/assets/chunk-67CJDMHE-AU2iOKLT.js +0 -1
  454. package/public/dist/assets/chunk-7N4EOEYR-BTIS4jBw.js +0 -1
  455. package/public/dist/assets/chunk-AA7GKIK3-c9UUJO_T.js +0 -1
  456. package/public/dist/assets/chunk-CIAEETIT-Dwbln6rM.js +0 -1
  457. package/public/dist/assets/chunk-ENJZ2VHE-PT_jAckw.js +0 -10
  458. package/public/dist/assets/chunk-FOC6F5B3-BqDmFFeg.js +0 -1
  459. package/public/dist/assets/chunk-ICPOFSXX-P6V6jqiT.js +0 -122
  460. package/public/dist/assets/chunk-K5T4RW27-C42sOmZR.js +0 -27
  461. package/public/dist/assets/chunk-KGLVRYIC-K-BVa8b2.js +0 -1
  462. package/public/dist/assets/chunk-ORNJ4GCN-CEXU6WaD.js +0 -1
  463. package/public/dist/assets/chunk-OYMX7WX6-DmJG2z1S.js +0 -231
  464. package/public/dist/assets/chunk-QZHKN3VN-BkVLii_3.js +0 -1
  465. package/public/dist/assets/chunk-U2HBQHQK-Ny6UwUgK.js +0 -11
  466. package/public/dist/assets/chunk-YZCP3GAM-c7FYtZME.js +0 -1
  467. package/public/dist/assets/classDiagram-6PBFFD2Q-BgOyAynm.js +0 -1
  468. package/public/dist/assets/classDiagram-v2-HSJHXN6E-5gBdoVH9.js +0 -1
  469. package/public/dist/assets/constants-4A2GptQT.js +0 -1
  470. package/public/dist/assets/cose-bilkent-S5V4N54A-CvH6qY_r.js +0 -1
  471. package/public/dist/assets/dagre--20B2-ZQ.js +0 -1
  472. package/public/dist/assets/dagre-KV5264BT-CQ0wo0ma.js +0 -4
  473. package/public/dist/assets/diagram-G4DWMVQ6-_aP6kMTh.js +0 -24
  474. package/public/dist/assets/diagram-MMDJMWI5-J1l6Q0JG.js +0 -43
  475. package/public/dist/assets/dist-B1p80u1b.js +0 -1
  476. package/public/dist/assets/dist-BKyzWv22.js +0 -1
  477. package/public/dist/assets/dist-CxJpXP6s.js +0 -1
  478. package/public/dist/assets/dist-DNLFuTrS.js +0 -1
  479. package/public/dist/assets/fields-BISouxp2.js +0 -1
  480. package/public/dist/assets/flowDiagram-DWJPFMVM-C_F0rqqT.js +0 -162
  481. package/public/dist/assets/ganttDiagram-T4ZO3ILL-B5S8EZRg.js +0 -292
  482. package/public/dist/assets/gitGraph-7Q5UKJZL-DTTW6pxr.js +0 -1
  483. package/public/dist/assets/gitGraphDiagram-UUTBAWPF-DMGzYJeb.js +0 -106
  484. package/public/dist/assets/graphlib-CZk_Ii16.js +0 -1
  485. package/public/dist/assets/info-OMHHGYJF-BU-iuaSm.js +0 -1
  486. package/public/dist/assets/infoDiagram-42DDH7IO-dzSaYFFK.js +0 -2
  487. package/public/dist/assets/javascript-BhB45e0W.js +0 -1
  488. package/public/dist/assets/katex-DamPUmTE.js +0 -1
  489. package/public/dist/assets/manager-B84u-pcn.js +0 -25
  490. package/public/dist/assets/manager-DMg_sTEP.css +0 -1
  491. package/public/dist/assets/memory-BV62wlsG.js +0 -1
  492. package/public/dist/assets/mermaid-loader-DxFGz4EE.js +0 -1
  493. package/public/dist/assets/mermaid-parser.core-CMIZ0my_.js +0 -3
  494. package/public/dist/assets/mermaid.core-CicVBD9l.js +0 -1
  495. package/public/dist/assets/mermaid.core-Dj6viEzN.js +0 -11
  496. package/public/dist/assets/packet-4T2RLAQJ-DzmBsAf0.js +0 -1
  497. package/public/dist/assets/pie-ZZUOXDRM-DyG1KzTn.js +0 -1
  498. package/public/dist/assets/pieDiagram-DEJITSTG-DJLiSymi.js +0 -30
  499. package/public/dist/assets/quadrantDiagram-34T5L4WZ-qcnWmcRr.js +0 -7
  500. package/public/dist/assets/radar-PYXPWWZC-CEBZARUu.js +0 -1
  501. package/public/dist/assets/rolldown-runtime-DE9SaGGd.js +0 -1
  502. package/public/dist/assets/sankeyDiagram-XADWPNL6-Bn3pUd_K.js +0 -10
  503. package/public/dist/assets/sequenceDiagram-FGHM5R23-DfxcHSdj.js +0 -157
  504. package/public/dist/assets/settings-CfAXLa8a.js +0 -1
  505. package/public/dist/assets/settings-FWgmcubl.js +0 -40
  506. package/public/dist/assets/skills-D-qUVJ-e.js +0 -1
  507. package/public/dist/assets/slash-commands-BfI19vIz.js +0 -1
  508. package/public/dist/assets/stateDiagram-FHFEXIEX-CiR7P2OG.js +0 -1
  509. package/public/dist/assets/stateDiagram-v2-QKLJ7IA2-BaWWpysK.js +0 -1
  510. package/public/dist/assets/trace-drawer-DVF5F1df.js +0 -15
  511. package/public/dist/assets/treeView-SZITEDCU-D5-TP7Qp.js +0 -1
  512. package/public/dist/assets/treemap-W4RFUUIX-BQhm_ZSp.js +0 -1
  513. package/public/dist/assets/ui-BJXY16Dk.js +0 -140
  514. package/public/dist/assets/ui-BXm3OPPh.js +0 -1
  515. package/public/dist/assets/vendor-utils-IVTPs69f.js +0 -68
  516. package/public/dist/assets/vennDiagram-DHZGUBPP-CYu7SDdG.js +0 -34
  517. package/public/dist/assets/wardley-RL74JXVD-CpnBMRe0.js +0 -1
  518. package/public/manager/src/settings/pages/Embedding.tsx +0 -382
  519. /package/public/dist/assets/{apl-HYRstREL.js → apl-CieDeb7B.js} +0 -0
  520. /package/public/dist/assets/{asciiarmor-BDXCrhAK.js → asciiarmor-BRTyulZY.js} +0 -0
  521. /package/public/dist/assets/{asn1-CnSBhb0M.js → asn1-DoNAtQ5o.js} +0 -0
  522. /package/public/dist/assets/{asterisk-AqV7rnIi.js → asterisk-CR7oKPxi.js} +0 -0
  523. /package/public/dist/assets/{brainfuck-Dv46-iL9.js → brainfuck-abzPcrOz.js} +0 -0
  524. /package/public/dist/assets/{clike-GRffz5hY.js → clike-B71Zq38G.js} +0 -0
  525. /package/public/dist/assets/{clojure-DzgT_fqE.js → clojure-Zm0UzHPq.js} +0 -0
  526. /package/public/dist/assets/{cmake-Co1237r5.js → cmake-D3UNdg6L.js} +0 -0
  527. /package/public/dist/assets/{cobol-rUaLketb.js → cobol-4fYvwQR0.js} +0 -0
  528. /package/public/dist/assets/{coffeescript-DQyfHE86.js → coffeescript-Ct6bZdRU.js} +0 -0
  529. /package/public/dist/assets/{commonlisp-Buue1PGW.js → commonlisp-CrgXVPcd.js} +0 -0
  530. /package/public/dist/assets/{crystal-BMWO0kOJ.js → crystal-bGOl67VM.js} +0 -0
  531. /package/public/dist/assets/{css-DaxibPo5.js → css-B_EV3Xq2.js} +0 -0
  532. /package/public/dist/assets/{cypher-CmpGfiBR.js → cypher-DXDlHTYf.js} +0 -0
  533. /package/public/dist/assets/{cytoscape.esm-zT8GwLFm.js → cytoscape.esm-BK7ao2Ti.js} +0 -0
  534. /package/public/dist/assets/{d-qmdtoIzU.js → d-RL5ynsiz.js} +0 -0
  535. /package/public/dist/assets/{diff-B40m6u1h.js → diff-B5McBGjz.js} +0 -0
  536. /package/public/dist/assets/{dtd-569ynYVj.js → dtd-l3sK4p_C.js} +0 -0
  537. /package/public/dist/assets/{dylan-Dxolp30i.js → dylan-WjJGY-rW.js} +0 -0
  538. /package/public/dist/assets/{ebnf-BZiX9Iq3.js → ebnf-BGY79HOS.js} +0 -0
  539. /package/public/dist/assets/{ecl-B8F1Q0oZ.js → ecl-BKh7OE1d.js} +0 -0
  540. /package/public/dist/assets/{eiffel-Bv8Kvgh1.js → eiffel-Bzvlg3oK.js} +0 -0
  541. /package/public/dist/assets/{elm-QWXQaIis.js → elm-5_BqNmKu.js} +0 -0
  542. /package/public/dist/assets/{erlang-CuDGzTGm.js → erlang-BdVwz8I8.js} +0 -0
  543. /package/public/dist/assets/{fcl-BiFeqtHf.js → fcl-B9cnfODD.js} +0 -0
  544. /package/public/dist/assets/{forth-R7Uc2VcL.js → forth-wZbbnGzb.js} +0 -0
  545. /package/public/dist/assets/{fortran-kDRG6BzW.js → fortran-BAJZrRfU.js} +0 -0
  546. /package/public/dist/assets/{gas-CyRkuC5T.js → gas-D60ZhBat.js} +0 -0
  547. /package/public/dist/assets/{gherkin-BE0p00ey.js → gherkin-B8tKjAAi.js} +0 -0
  548. /package/public/dist/assets/{groovy-B_Sh3D1t.js → groovy-BAG9eJUD.js} +0 -0
  549. /package/public/dist/assets/{haskell-DWXgCy4o.js → haskell-Cj4TmWbg.js} +0 -0
  550. /package/public/dist/assets/{haxe-xGxZ54Hv.js → haxe-8chnvz-o.js} +0 -0
  551. /package/public/dist/assets/{http-CKv9cSBA.js → http-DDYeO71z.js} +0 -0
  552. /package/public/dist/assets/{idl-DmlI3XzS.js → idl-D1hY-Gp_.js} +0 -0
  553. /package/public/dist/assets/{javascript-j6r5uf_k.js → javascript-Sh0ZUMP2.js} +0 -0
  554. /package/public/dist/assets/{julia-CQSp9Qa0.js → julia-BibioBF2.js} +0 -0
  555. /package/public/dist/assets/{livescript-CqvtVTlb.js → livescript-CSZrB6F4.js} +0 -0
  556. /package/public/dist/assets/{lua-DazQKUZ0.js → lua-BvTlo5w3.js} +0 -0
  557. /package/public/dist/assets/{mathematica-DqhJVCs9.js → mathematica-Bexv8BWZ.js} +0 -0
  558. /package/public/dist/assets/{mbox-Dsyo1_UL.js → mbox-BAhbA8z2.js} +0 -0
  559. /package/public/dist/assets/{mirc-D7ThhoF-.js → mirc-BzT5Kh4S.js} +0 -0
  560. /package/public/dist/assets/{mllike-EPZ6pqQD.js → mllike-DeoJnUZQ.js} +0 -0
  561. /package/public/dist/assets/{modelica-PU45hbqg.js → modelica-FD_-Fxlc.js} +0 -0
  562. /package/public/dist/assets/{mscgen-DEnh2Ojr.js → mscgen-C-OyhbwB.js} +0 -0
  563. /package/public/dist/assets/{mumps-8GhR7rRa.js → mumps-BxkCDTK7.js} +0 -0
  564. /package/public/dist/assets/{nginx-CXwagpwp.js → nginx-2JaV__gC.js} +0 -0
  565. /package/public/dist/assets/{ntriples-BDQxxstw.js → ntriples--rhhCzqb.js} +0 -0
  566. /package/public/dist/assets/{octave-2c90WnyU.js → octave-rS4nMzRe.js} +0 -0
  567. /package/public/dist/assets/{oz-CO0rQ8EL.js → oz-I4fMb_NC.js} +0 -0
  568. /package/public/dist/assets/{pascal-CcVwOGeN.js → pascal-BEghJs8t.js} +0 -0
  569. /package/public/dist/assets/{path-utils-DySmCVZK.js → path-utils-r2bJIu28.js} +0 -0
  570. /package/public/dist/assets/{perl-B9UvGoAV.js → perl-BRO9ZFo9.js} +0 -0
  571. /package/public/dist/assets/{pig-Cd1f86ZJ.js → pig-L4Ii6KI0.js} +0 -0
  572. /package/public/dist/assets/{powershell-DV4cOnkJ.js → powershell-BBeqUCRp.js} +0 -0
  573. /package/public/dist/assets/{properties-DaSVPhrZ.js → properties-Boi0jF2J.js} +0 -0
  574. /package/public/dist/assets/{protobuf-CEtFnY22.js → protobuf-fB2aGypX.js} +0 -0
  575. /package/public/dist/assets/{puppet-Ca0DHfcW.js → puppet-BRmsErtO.js} +0 -0
  576. /package/public/dist/assets/{python-ydzCwWG-.js → python-Be4P9Dgp.js} +0 -0
  577. /package/public/dist/assets/{q-Cl8kzQmk.js → q-DZGhDLYt.js} +0 -0
  578. /package/public/dist/assets/{r-DKZPJFrD.js → r-B4NERjRM.js} +0 -0
  579. /package/public/dist/assets/{rough.esm-Dnk3WN4D.js → rough.esm-C0Gkx4O1.js} +0 -0
  580. /package/public/dist/assets/{rpm-D0lqeHoZ.js → rpm-e-QbHJ1q.js} +0 -0
  581. /package/public/dist/assets/{ruby-RVmtmNDw.js → ruby-BSVP_v59.js} +0 -0
  582. /package/public/dist/assets/{sas-CEzodAB7.js → sas-DHlU4v4g.js} +0 -0
  583. /package/public/dist/assets/{scheme-Pqmt6dh3.js → scheme-BGXbz5Hz.js} +0 -0
  584. /package/public/dist/assets/{settings-client-BN3XzwEo.js → settings-client-DPuJroyk.js} +0 -0
  585. /package/public/dist/assets/{shell-CLG3zy-u.js → shell-yonx6xY2.js} +0 -0
  586. /package/public/dist/assets/{sieve-C95IWC3O.js → sieve-ClPJUZyi.js} +0 -0
  587. /package/public/dist/assets/{simple-mode-B9ErAHMD.js → simple-mode-CjViblDK.js} +0 -0
  588. /package/public/dist/assets/{smalltalk-4cL-gRJb.js → smalltalk-CHXubeqS.js} +0 -0
  589. /package/public/dist/assets/{solr-CEA7oOx_.js → solr-C6q6YwPz.js} +0 -0
  590. /package/public/dist/assets/{sparql-w8kHjP6I.js → sparql-CcspZvEd.js} +0 -0
  591. /package/public/dist/assets/{spreadsheet-C8bDfTgC.js → spreadsheet-DH3a4LBS.js} +0 -0
  592. /package/public/dist/assets/{sql-BrKz8968.js → sql-meoY6gNi.js} +0 -0
  593. /package/public/dist/assets/{stex-xFw1nXeT.js → stex-D2bn6Zsh.js} +0 -0
  594. /package/public/dist/assets/{stylus-gS_68vPk.js → stylus-DbXGih0S.js} +0 -0
  595. /package/public/dist/assets/{swift-D5lXmY2d.js → swift-Ch391uOd.js} +0 -0
  596. /package/public/dist/assets/{tcl-D-41REtC.js → tcl-CQBgGWDP.js} +0 -0
  597. /package/public/dist/assets/{textile-D-Znao0j.js → textile-4i3oG3tg.js} +0 -0
  598. /package/public/dist/assets/{tiddlywiki-Co8lXJKd.js → tiddlywiki-CXG1-CcK.js} +0 -0
  599. /package/public/dist/assets/{tiki-DsiNRYMP.js → tiki-DJqKUhA-.js} +0 -0
  600. /package/public/dist/assets/{toml-CaVZGou4.js → toml-C1FnyICQ.js} +0 -0
  601. /package/public/dist/assets/{troff-DJvDVr-d.js → troff-Cp8NvRO0.js} +0 -0
  602. /package/public/dist/assets/{ttcn-DAC92l4d.js → ttcn-NlmW_fji.js} +0 -0
  603. /package/public/dist/assets/{ttcn-cfg-C0X-mYlr.js → ttcn-cfg-BVuxfGZf.js} +0 -0
  604. /package/public/dist/assets/{turtle-D6WHyCrL.js → turtle-Ba9ERlnm.js} +0 -0
  605. /package/public/dist/assets/{vb-CEo_ccq3.js → vb-DDs4gjJb.js} +0 -0
  606. /package/public/dist/assets/{vbscript-B_PKDV1v.js → vbscript-gOFmdMJN.js} +0 -0
  607. /package/public/dist/assets/{velocity-ClKnKBLH.js → velocity-DtSNZA7i.js} +0 -0
  608. /package/public/dist/assets/{verilog-Pnuspgw6.js → verilog-Pldmtxe7.js} +0 -0
  609. /package/public/dist/assets/{vhdl-CZnyY4fs.js → vhdl-BFfSgWGp.js} +0 -0
  610. /package/public/dist/assets/{w3c-keyname-DJlC6DTY.js → w3c-keyname-BggQEPNo.js} +0 -0
  611. /package/public/dist/assets/{webidl-DHr762Dm.js → webidl-B6ZFYE2L.js} +0 -0
  612. /package/public/dist/assets/{xquery-5-FiyUtN.js → xquery-DhxUT98N.js} +0 -0
  613. /package/public/dist/assets/{yacas-GlqsXIeT.js → yacas-jSkQeF1Q.js} +0 -0
  614. /package/public/dist/assets/{z80-CI7N40Oo.js → z80-D7Lt6v61.js} +0 -0
@@ -1 +0,0 @@
1
- import{_ as e,g as t,h as n,i as r,m as i,o as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-C42sOmZR.js";var l=class extends s{static{i(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},u={parser:{TokenBuilder:i(()=>new l,`TokenBuilder`),ValueConverter:i(()=>new r,`ValueConverter`)}};function d(r=n){let i=t(c(r),o),s=t(e({shared:i}),a,u);return i.ServiceRegistry.register(s),{shared:i,Info:s}}i(d,`createInfoServices`);export{d as n,u as t};
@@ -1 +0,0 @@
1
- import{_ as e,d as t,g as n,h as r,m as i,n as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-C42sOmZR.js";var l=class extends a{static{i(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`STRING2`)return t.substring(1,t.length-1)}},u=class extends s{static{i(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},d={parser:{TokenBuilder:i(()=>new u,`TokenBuilder`),ValueConverter:i(()=>new l,`ValueConverter`)}};function f(i=r){let a=n(c(i),o),s=n(e({shared:a}),t,d);return a.ServiceRegistry.register(s),{shared:a,TreeView:s}}i(f,`createTreeViewServices`);export{f as n,d as t};
@@ -1,231 +0,0 @@
1
- import{n as e,r as t}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,b as c,s as l,v as u}from"./chunk-ICPOFSXX-P6V6jqiT.js";import{h as d,o as f}from"./chunk-5PVQY5BW-otv3HwE_.js";import{t as p}from"./chunk-55IACEB6-CAWcPDdr.js";import{t as m}from"./chunk-EDXVE4YY-COudQKkJ.js";import{r as h}from"./chunk-336JU56O-CAt5aBOe.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
- `+h.showPosition()+`
3
- Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
- `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState(`SCALE`),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin(`acc_title`),33;case 19:return this.popState(),`acc_title_value`;case 20:return this.begin(`acc_descr`),35;case 21:return this.popState(),`acc_descr_value`;case 22:this.begin(`acc_descr_multiline`);break;case 23:this.popState();break;case 24:return`acc_descr_multiline_value`;case 25:return this.pushState(`CLASSDEF`),41;case 26:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 27:return this.popState(),this.pushState(`CLASSDEFID`),42;case 28:return this.popState(),43;case 29:return this.pushState(`CLASS`),48;case 30:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 31:return this.popState(),50;case 32:return this.pushState(`STYLE`),45;case 33:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 34:return this.popState(),47;case 35:return this.pushState(`SCALE`),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState(`STATE`);break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState(`STATE_STRING`);break;case 50:return this.pushState(`STATE_ID`),`AS`;case 51:return this.popState(),`ID`;case 52:this.popState();break;case 53:return`STATE_DESCR`;case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState(`struct`),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin(`NOTE`),29;case 61:return this.popState(),this.pushState(`NOTE_ID`),59;case 62:return this.popState(),this.pushState(`NOTE_ID`),60;case 63:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 64:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 65:break;case 66:return`NOTE_TEXT`;case 67:return this.popState(),`ID`;case 68:return this.popState(),this.pushState(`NOTE_TEXT`),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}})();function P(){this.yy={}}return e(P,`Parser`),P.prototype=N,N.Parser=P,new P})();g.parser=g;var _=g,v=`TB`,y=`TB`,b=`dir`,x=`state`,S=`root`,C=`relation`,w=`classDef`,T=`style`,E=`applyClass`,D=`default`,O=`divider`,k=`fill:none`,A=`fill: #333`,j=`c`,M=`markdown`,N=`normal`,P=`rect`,F=`rectWithTitle`,ee=`stateStart`,te=`stateEnd`,I=`divider`,L=`roundedWithTitle`,ne=`note`,re=`noteGroup`,R=`statediagram`,ie=`${R}-state`,ae=`transition`,oe=`note`,se=`${ae} note-edge`,ce=`${R}-${oe}`,le=`${R}-cluster`,ue=`${R}-cluster-alt`,z=`parent`,B=`note`,de=`state`,V=`----`,fe=`${V}${B}`,H=`${V}${z}`,U=e((e,t=y)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),pe={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing state diagram (v2)`,n);let{securityLevel:a,state:o,layout:s}=c();i.db.extract(i.db.getRootDocV2());let l=i.db.getData(),u=p(n,a);l.type=i.type,l.layoutAlgorithm=s,l.nodeSpacing=o?.nodeSpacing||50,l.rankSpacing=o?.rankSpacing||50,c().look===`neo`?l.markers=[`barbNeo`]:l.markers=[`barb`],l.diagramId=n,await h(l,u);try{(typeof i.db.getLinks==`function`?i.db.getLinks():new Map).forEach((e,n)=>{let r=typeof n==`string`?n:typeof n?.id==`string`?n.id:``;if(!r){t.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(n));return}let i=u.node()?.querySelectorAll(`g`),a;if(i?.forEach(e=>{e.textContent?.trim()===r&&(a=e)}),!a){t.warn(`⚠️ Could not find node matching text:`,r);return}let o=a.parentNode;if(!o){t.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),c=e.url.replace(/^"+|"+$/g,``);if(s.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,c),s.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);s.setAttribute(`title`,t)}o.replaceChild(s,a),s.appendChild(a),t.info(`🔗 Wrapped node in <a> tag for:`,r,e.url)})}catch(e){t.error(`❌ Error injecting clickable links:`,e)}d.insertTitle(u,`statediagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),m(u,8,R,o?.useMaxWidth??!0)},`draw`),getDir:U},W=new Map,G=0;function K(e=``,t=0,n=``,r=V){return`${de}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}e(K,`stateDomId`);var me=e((e,n,r,i,a,o,s,u)=>{t.trace(`items`,n),n.forEach(t=>{switch(t.stmt){case x:X(e,t,r,i,a,o,s,u);break;case D:X(e,t,r,i,a,o,s,u);break;case C:{X(e,t.state1,r,i,a,o,s,u),X(e,t.state2,r,i,a,o,s,u);let n=s===`neo`,d={id:`edge`+G,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:k,labelStyle:``,label:l.sanitizeText(t.description??``,c()),arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,classes:ae,look:s};a.push(d),G++}break}})},`setupDoc`),q=e((e,t=y)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function J(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}e(J,`insertOrUpdateNode`);function Y(e){return e?.classes?.join(` `)??``}e(Y,`getClassesFromDbInfo`);function he(e){return e?.styles??[]}e(he,`getStylesFromDbInfo`);var X=e((e,n,r,i,a,o,s,u)=>{let d=n.id,f=r.get(d),p=Y(f),m=he(f),h=c();if(t.info(`dataFetcher parsedItem`,n,f,m),d!==`root`){let r=P;n.start===!0?r=ee:n.start===!1&&(r=te),n.type!==D&&(r=n.type),W.get(d)||W.set(d,{id:d,shape:r,description:l.sanitizeText(d,h),cssClasses:`${p} ${ie}`,cssStyles:m});let c=W.get(d);n.description&&(Array.isArray(c.description)?(c.shape=F,c.description.push(n.description)):c.description?.length&&c.description.length>0?(c.shape=F,c.description===d?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=P,c.description=n.description),c.description=l.sanitizeTextOrArray(c.description,h)),c.description?.length===1&&c.shape===F&&(c.type===`group`?c.shape=L:c.shape=P),!c.type&&n.doc&&(t.info(`Setting cluster for XCX`,d,q(n)),c.type=`group`,c.isGroup=!0,c.dir=q(n),c.shape=n.type===O?I:L,c.cssClasses=`${c.cssClasses} ${le} ${o?ue:``}`);let f={labelStyle:``,shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:d,dir:c.dir,domId:K(d,G),type:c.type,isGroup:c.type===`group`,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===I&&(f.label=``),e&&e.id!==`root`&&(t.trace(`Setting node `,d,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,n.note){let e={labelStyle:``,shape:ne,label:n.note.text,labelType:`markdown`,cssClasses:ce,cssStyles:[],cssCompiledStyles:[],id:d+fe+`-`+G,domId:K(d,G,B),type:c.type,isGroup:c.type===`group`,padding:h.flowchart?.padding,look:s,position:n.note.position},t=d+H,r={labelStyle:``,shape:re,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:d+H,domId:K(d,G,z),type:`group`,isGroup:!0,padding:16,look:s,position:n.note.position};G++,r.id=t,e.parentId=t,J(i,r,u),J(i,e,u),J(i,f,u);let o=d,l=e.id;n.note.position===`left of`&&(o=e.id,l=d),a.push({id:o+`-`+l,start:o,end:l,arrowhead:`none`,arrowTypeEnd:``,style:k,labelStyle:``,classes:se,arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,look:s})}else J(i,f,u)}n.doc&&(t.trace(`Adding nodes children `),me(n,n.doc,r,i,a,!o,s,u))},`dataFetcher`),ge=e(()=>{W.clear(),G=0},`reset`),Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},_e=e(()=>new Map,`newClassesList`),Q=e(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=e(e=>JSON.parse(JSON.stringify(e)),`clone`),ve=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=_e(),this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=u,this.setAccTitle=i,this.getAccDescription=o,this.setAccDescription=n,this.setDiagramTitle=a,this.getDiagramTitle=r,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{e(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case x:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case C:this.addRelation(t.state1,t.state2,t.description);break;case w:this.addStyleClass(t.id.trim(),t.classes);break;case T:this.handleStyleDef(t);break;case E:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=c();ge(),X(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){t.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===C){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===x&&(t.id===Z.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==S&&t.stmt!==x||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===O){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:x,id:f(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:S,stmt:S},{id:S,stmt:S,doc:this.rootDoc},!0),{id:S,doc:this.rootDoc}}addState(e,n=D,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0){let d=e?.trim();if(!this.currentDocument.states.has(d))t.info(`Adding state `,d,i),this.currentDocument.states.set(d,{stmt:x,id:d,descriptions:[],type:n,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.doc||=r,e.type||=n}if(i&&(t.info(`Setting state description`,d,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(d,e.trim()))),a){let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.note=a,e.note.text=l.sanitizeText(e.note.text,c())}o&&(t.info(`Setting state classes`,d,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(d,e.trim()))),s&&(t.info(`Setting state styles`,d,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(d,e.trim()))),u&&(t.info(`Setting state styles`,d,s),(Array.isArray(u)?u:[u]).forEach(e=>this.setTextStyle(d,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=_e(),e||(this.links=new Map,s())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){t.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,n,r){this.links.set(e,{url:n,tooltip:r}),t.warn(`Adding link`,e,n,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=D){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=D){return e===Z.END_NODE?Z.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:l.sanitizeText(n,c())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?l.sanitizeText(n,c()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(l.sanitizeText(r,c()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===b)}getDirection(){return this.getDirectionStatement()?.value??v}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:b,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=c();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:U(this.getRootDocV2())}}getConfig(){return c().state}},ye=e(e=>`
7
- defs [id$="-barbEnd"] {
8
- fill: ${e.transitionColor};
9
- stroke: ${e.transitionColor};
10
- }
11
- g.stateGroup text {
12
- fill: ${e.nodeBorder};
13
- stroke: none;
14
- font-size: 10px;
15
- }
16
- g.stateGroup text {
17
- fill: ${e.textColor};
18
- stroke: none;
19
- font-size: 10px;
20
-
21
- }
22
- g.stateGroup .state-title {
23
- font-weight: bolder;
24
- fill: ${e.stateLabelColor};
25
- }
26
-
27
- g.stateGroup rect {
28
- fill: ${e.mainBkg};
29
- stroke: ${e.nodeBorder};
30
- }
31
-
32
- g.stateGroup line {
33
- stroke: ${e.lineColor};
34
- stroke-width: ${e.strokeWidth||1};
35
- }
36
-
37
- .transition {
38
- stroke: ${e.transitionColor};
39
- stroke-width: ${e.strokeWidth||1};
40
- fill: none;
41
- }
42
-
43
- .stateGroup .composit {
44
- fill: ${e.background};
45
- border-bottom: 1px
46
- }
47
-
48
- .stateGroup .alt-composit {
49
- fill: #e0e0e0;
50
- border-bottom: 1px
51
- }
52
-
53
- .state-note {
54
- stroke: ${e.noteBorderColor};
55
- fill: ${e.noteBkgColor};
56
-
57
- text {
58
- fill: ${e.noteTextColor};
59
- stroke: none;
60
- font-size: 10px;
61
- }
62
- }
63
-
64
- .stateLabel .box {
65
- stroke: none;
66
- stroke-width: 0;
67
- fill: ${e.mainBkg};
68
- opacity: 0.5;
69
- }
70
-
71
- .edgeLabel .label rect {
72
- fill: ${e.labelBackgroundColor};
73
- opacity: 0.5;
74
- }
75
- .edgeLabel {
76
- background-color: ${e.edgeLabelBackground};
77
- p {
78
- background-color: ${e.edgeLabelBackground};
79
- }
80
- rect {
81
- opacity: 0.5;
82
- background-color: ${e.edgeLabelBackground};
83
- fill: ${e.edgeLabelBackground};
84
- }
85
- text-align: center;
86
- }
87
- .edgeLabel .label text {
88
- fill: ${e.transitionLabelColor||e.tertiaryTextColor};
89
- }
90
- .label div .edgeLabel {
91
- color: ${e.transitionLabelColor||e.tertiaryTextColor};
92
- }
93
-
94
- .stateLabel text {
95
- fill: ${e.stateLabelColor};
96
- font-size: 10px;
97
- font-weight: bold;
98
- }
99
-
100
- .node circle.state-start {
101
- fill: ${e.specialStateColor};
102
- stroke: ${e.specialStateColor};
103
- }
104
-
105
- .node .fork-join {
106
- fill: ${e.specialStateColor};
107
- stroke: ${e.specialStateColor};
108
- }
109
-
110
- .node circle.state-end {
111
- fill: ${e.innerEndBackground};
112
- stroke: ${e.background};
113
- stroke-width: 1.5
114
- }
115
- .end-state-inner {
116
- fill: ${e.compositeBackground||e.background};
117
- // stroke: ${e.background};
118
- stroke-width: 1.5
119
- }
120
-
121
- .node rect {
122
- fill: ${e.stateBkg||e.mainBkg};
123
- stroke: ${e.stateBorder||e.nodeBorder};
124
- stroke-width: ${e.strokeWidth||1}px;
125
- }
126
- .node polygon {
127
- fill: ${e.mainBkg};
128
- stroke: ${e.stateBorder||e.nodeBorder};;
129
- stroke-width: ${e.strokeWidth||1}px;
130
- }
131
- [id$="-barbEnd"] {
132
- fill: ${e.lineColor};
133
- }
134
-
135
- .statediagram-cluster rect {
136
- fill: ${e.compositeTitleBackground};
137
- stroke: ${e.stateBorder||e.nodeBorder};
138
- stroke-width: ${e.strokeWidth||1}px;
139
- }
140
-
141
- .cluster-label, .nodeLabel {
142
- color: ${e.stateLabelColor};
143
- // line-height: 1;
144
- }
145
-
146
- .statediagram-cluster rect.outer {
147
- rx: 5px;
148
- ry: 5px;
149
- }
150
- .statediagram-state .divider {
151
- stroke: ${e.stateBorder||e.nodeBorder};
152
- }
153
-
154
- .statediagram-state .title-state {
155
- rx: 5px;
156
- ry: 5px;
157
- }
158
- .statediagram-cluster.statediagram-cluster .inner {
159
- fill: ${e.compositeBackground||e.background};
160
- }
161
- .statediagram-cluster.statediagram-cluster-alt .inner {
162
- fill: ${e.altBackground?e.altBackground:`#efefef`};
163
- }
164
-
165
- .statediagram-cluster .inner {
166
- rx:0;
167
- ry:0;
168
- }
169
-
170
- .statediagram-state rect.basic {
171
- rx: 5px;
172
- ry: 5px;
173
- }
174
- .statediagram-state rect.divider {
175
- stroke-dasharray: 10,10;
176
- fill: ${e.altBackground?e.altBackground:`#efefef`};
177
- }
178
-
179
- .note-edge {
180
- stroke-dasharray: 5;
181
- }
182
-
183
- .statediagram-note rect {
184
- fill: ${e.noteBkgColor};
185
- stroke: ${e.noteBorderColor};
186
- stroke-width: 1px;
187
- rx: 0;
188
- ry: 0;
189
- }
190
- .statediagram-note rect {
191
- fill: ${e.noteBkgColor};
192
- stroke: ${e.noteBorderColor};
193
- stroke-width: 1px;
194
- rx: 0;
195
- ry: 0;
196
- }
197
-
198
- .statediagram-note text {
199
- fill: ${e.noteTextColor};
200
- }
201
-
202
- .statediagram-note .nodeLabel {
203
- color: ${e.noteTextColor};
204
- }
205
- .statediagram .edgeLabel {
206
- color: red; // ${e.noteTextColor};
207
- }
208
-
209
- [id$="-dependencyStart"], [id$="-dependencyEnd"] {
210
- fill: ${e.lineColor};
211
- stroke: ${e.lineColor};
212
- stroke-width: ${e.strokeWidth||1};
213
- }
214
-
215
- .statediagramTitleText {
216
- text-anchor: middle;
217
- font-size: 18px;
218
- fill: ${e.textColor};
219
- }
220
-
221
- [data-look="neo"].statediagram-cluster rect {
222
- fill: ${e.mainBkg};
223
- stroke: ${e.useGradient?`url(`+e.svgId+`-gradient)`:e.stateBorder||e.nodeBorder};
224
- stroke-width: ${e.strokeWidth??1};
225
- }
226
- [data-look="neo"].statediagram-cluster rect.outer {
227
- rx: ${e.radius}px;
228
- ry: ${e.radius}px;
229
- filter: ${e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${e.svgId}-drop-shadow)`):`none`}
230
- }
231
- `,`getStyles`);export{ye as i,_ as n,pe as r,ve as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-AGHRB4JF-DIMn8T3_.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t};
@@ -1,11 +0,0 @@
1
- import{t as e}from"./vendor-render-DEStnpJ8.js";import{Ct as t}from"./vendor-utils-IVTPs69f.js";import{n,r}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{L as i,P as a,k as o,s,y as c}from"./chunk-ICPOFSXX-P6V6jqiT.js";import{i as l}from"./chunk-5PVQY5BW-otv3HwE_.js";var u=Object.freeze({left:0,top:0,width:16,height:16}),d=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),f=Object.freeze({...u,...d}),p=Object.freeze({...f,body:``,hidden:!1}),m=Object.freeze({width:null,height:null}),h=Object.freeze({...m,...d}),g=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!_(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!_(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!_(e,n)?null:e}return null},_=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function ee(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function v(e,t){let n=ee(e,t);for(let r in p)r in d?r in e&&!(r in n)&&(n[r]=d[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function y(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function b(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=v(r[e]||i[e],a)}return o(t),n.forEach(o),v(e,a)}function te(e,t){if(e.icons[t])return b(e,t,[]);let n=y(e,[t])[t];return n?b(e,t,n):null}var ne=/(-?[0-9.]*[0-9]+[0-9.]*)/g,re=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function x(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(ne);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=re.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function S(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function C(e,t){return e?`<defs>`+e+`</defs>`+t:t}function w(e,t,n){let r=S(e);return C(r.defs,t+r.content+n)}var ie=e=>e===`unset`||e===`undefined`||e===`none`;function ae(e,t){let n={...f,...e},r={...h,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=w(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=x(d,c/l)):(u=o===`auto`?c:o,d=s===null?x(u,l/c):s===`auto`?l:s);let p={},m=(e,t)=>{ie(t)||(p[e]=t.toString())};m(`width`,u),m(`height`,d);let g=[i.left,i.top,c,l];return p.viewBox=g.join(` `),{attributes:p,viewBox:g,body:a}}var oe=/\sid="(\S+)"/g,T=new Map;function se(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=T.get(e)||0;return T.set(e,t+1),t?`${e}${t}`:e}function ce(e){let t=[],n;for(;n=oe.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=se(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function le(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function E(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
2
- [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
3
- `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
4
- `)&&(o=String(e).split(`
5
- `).map(function(e,t){return t===0?e:``+i+e}).join(`
6
- `)),a+=o+n[t+1]}),a}var D={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},O=new Map,k=new Map,A=n(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(r.debug(`Registering icon pack:`,t.name),`loader`in t)k.set(t.name,t.loader);else if(`icons`in t)O.set(t.name,t.icons);else throw r.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),j=n(async(e,t)=>{let n=g(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let i=n.prefix||t;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=O.get(i);if(!a){let e=k.get(i);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{a={...await e(),prefix:i},O.set(i,a)}catch(e){throw r.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let o=te(a,n.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),M=n(async e=>{try{return await j(e),!0}catch{return!1}},`isIconAvailable`),N=n(async(e,t,n)=>{let a;try{a=await j(e,t?.fallbackPrefix)}catch(e){r.error(e),a=D}let o=ae(a,t);return i(le(ce(o.body),{...o.attributes,...n}),c())},`getIconSVG`);function P(e,{markdownAutoWrap:t}){return E(e.replace(/<br\/>/g,`
7
- `).replace(/\n{2,}/g,`
8
- `))}n(P,`preprocessMarkdown`);function F(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}n(F,`nonMarkdownToLines`);function I(t,r={}){let i=P(t,r),a=e.lexer(i),o=[[]],s=0;function c(e,t=`normal`){e.type===`text`?e.text.split(`
9
- `).forEach((e,n)=>{n!==0&&(s++,o.push([])),e.split(` `).forEach(e=>{e=e.replace(/&#39;/g,`'`),e&&o[s].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{c(t,e.type)}):e.type===`html`&&o[s].push({content:e.text,type:`normal`})}return n(c,`processNode`),a.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{c(e)}):e.type===`html`?o[s].push({content:e.text,type:`normal`}):o[s].push({content:e.raw,type:`normal`})}),o}n(I,`markdownToLines`);function L(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}n(L,`nonMarkdownToHTML`);function R(t,{markdownAutoWrap:i}={}){let a=e.lexer(t);function o(e){return e.type===`text`?i===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,`&nbsp;`):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(o).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(o).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(o).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(r.warn(`Unsupported markdown: ${e.type}`),e.raw)}return n(o,`output`),a.map(o).join(``)}n(R,`markdownToHTML`);function z(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}n(z,`splitTextToChars`);function B(e,t){return V(e,[],z(t.content),t.type)}n(B,`splitWordToFitWidth`);function V(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?V(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}n(V,`splitWordToFitWidthRecursion`);function H(e,t){if(e.some(({content:e})=>e.includes(`
10
- `)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return U(e,t)}n(H,`splitLineToFitWidth`);function U(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return U(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=B(t,a);n.push([r]),i.content&&e.unshift(i)}return U(e,t,n)}n(U,`splitLineToFitWidthRecursion`);function W(e,t){t&&e.attr(`style`,t)}n(W,`applyStyle`);var G=16384;async function K(e,t,n,r,l=!1,u=c()){let d=e.append(`foreignObject`);d.attr(`width`,`${Math.min(10*n,G)}px`),d.attr(`height`,`${Math.min(10*n,G)}px`);let f=d.append(`xhtml:div`),p=o(t.label)?await a(t.label.replace(s.lineBreakRegex,`
11
- `),u):i(t.label,u),m=t.isNode?`nodeLabel`:`edgeLabel`,h=f.append(`span`);h.html(p),W(h,t.labelStyle),h.attr(`class`,`${m} ${r}`),W(f,t.labelStyle),f.style(`display`,`table-cell`),f.style(`white-space`,`nowrap`),f.style(`line-height`,`1.5`),n!==1/0&&(f.style(`max-width`,n+`px`),f.style(`text-align`,`center`)),f.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),l&&f.attr(`class`,`labelBkg`);let g=f.node().getBoundingClientRect();return g.width===n&&(f.style(`display`,`table`),f.style(`white-space`,`break-spaces`),f.style(`width`,n+`px`),g=f.node().getBoundingClientRect()),d.node()}n(K,`addHtmlSpan`);function q(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}n(q,`createTspan`);function J(e,t,n){let r=e.append(`text`),i=q(r,1,t);Q(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}n(J,`computeWidthOfText`);function Y(e,t,n){let r=e.append(`text`),i=q(r,1,t);Q(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}n(Y,`computeDimensionOfText`);function X(e,t,r,i=!1,a=!1){let o=1.1,s=t.append(`g`),c=s.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=s.append(`text`).attr(`y`,`-10.1`);a&&l.attr(`text-anchor`,`middle`);let u=0;for(let t of r){let r=n(t=>J(s,o,t)<=e,`checkWidth`),i=r(t)?[t]:H(t,r);for(let e of i)Q(q(l,u,o,a),e),u++}if(i){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),s.node()}else return l.node()}n(X,`createFormattedText`);function Z(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}n(Z,`decodeHTMLEntities`);function Q(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Z(t.content)):r.text(` `+Z(t.content))})}n(Q,`updateTextContentAndStyles`);async function $(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,a)=>(n.push((async()=>{let n=`${r}:${a}`;return await M(n)?await N(n,void 0,{class:`label-icon`}):`<i class='${i(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}n($,`replaceIconSubstring`);var ue=n(async(e,n=``,{style:i=``,isTitle:a=!1,classes:s=``,useHtmlLabels:c=!0,markdown:u=!0,isNode:d=!0,width:f=200,addSvgBackground:p=!1}={},m)=>{if(r.debug(`XYZ createText`,n,i,a,s,c,d,`addSvgBackground: `,p),c){let t=await $(l(u?R(n,m):L(n)),m),r=n.replace(/\\\\/g,`\\`);return await K(e,{isNode:d,label:o(n)?r:t,labelStyle:i.replace(`fill:`,`color:`)},f,s,p,m)}else{let r=l(n.replace(/<br\s*\/?>/g,`<br/>`)),o=X(f,e,u?I(r.replace(`<br>`,`<br/>`),m):F(r),n?p:!1,!d);if(d){/stroke:/.exec(i)&&(i=i.replace(`stroke:`,`lineColor:`));let e=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);t(o).attr(`style`,e)}else{let e=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);t(o).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let n=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);t(o).select(`text`).attr(`style`,n)}return a?t(o).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):t(o).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),o}},`createText`);export{D as a,A as i,ue as n,E as o,N as r,Y as t};
@@ -1 +0,0 @@
1
- import{Ct as e}from"./vendor-utils-IVTPs69f.js";import{n as t}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{A as n}from"./chunk-ICPOFSXX-P6V6jqiT.js";import{t as r}from"./dist-BJyDhGpS.js";var i=r(),a=t((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=t((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=t((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=t((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=t((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=t(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=t(()=>{let t=e(`.mermaidTooltip`);return t.empty()&&(t=e(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),t},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-AGHRB4JF-DIMn8T3_.js";import"./chunk-ICPOFSXX-P6V6jqiT.js";import"./chunk-5PVQY5BW-otv3HwE_.js";import"./chunk-U2HBQHQK-Ny6UwUgK.js";import"./chunk-FMBD7UC4-6yXYicjw.js";import"./chunk-BSJP7CBP-DnSYKjii.js";import"./chunk-ZZ45TVLE-D5oxCC1O.js";import"./chunk-YZCP3GAM-c7FYtZME.js";import"./chunk-55IACEB6-CAWcPDdr.js";import"./chunk-EDXVE4YY-COudQKkJ.js";import"./chunk-X2U36JSP-CoMFMVNF.js";import"./chunk-5FUZZQ4R-Cg1pzs6p.js";import"./chunk-ENJZ2VHE-PT_jAckw.js";import"./chunk-336JU56O-CAt5aBOe.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-BD7UhIN8.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-AGHRB4JF-DIMn8T3_.js";import"./chunk-ICPOFSXX-P6V6jqiT.js";import"./chunk-5PVQY5BW-otv3HwE_.js";import"./chunk-U2HBQHQK-Ny6UwUgK.js";import"./chunk-FMBD7UC4-6yXYicjw.js";import"./chunk-BSJP7CBP-DnSYKjii.js";import"./chunk-ZZ45TVLE-D5oxCC1O.js";import"./chunk-YZCP3GAM-c7FYtZME.js";import"./chunk-55IACEB6-CAWcPDdr.js";import"./chunk-EDXVE4YY-COudQKkJ.js";import"./chunk-X2U36JSP-CoMFMVNF.js";import"./chunk-5FUZZQ4R-Cg1pzs6p.js";import"./chunk-ENJZ2VHE-PT_jAckw.js";import"./chunk-336JU56O-CAt5aBOe.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-BD7UhIN8.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +0,0 @@
1
- import{n as e}from"./api-tVoG39dL.js";var t={claude:{label:`Claude`,efforts:[`low`,`medium`,`high`,`xhigh`,`max`],models:[`opus`,`sonnet`,`sonnet[1m]`,`haiku`,`claude-opus-4-7`,`claude-opus-4-7[1m]`,`claude-opus-4-6`,`claude-opus-4-6[1m]`,`claude-sonnet-4-6`,`claude-sonnet-4-6[1m]`,`claude-haiku-4-5`]},codex:{label:`Codex`,efforts:[`low`,`medium`,`high`,`xhigh`],models:[`gpt-5.5`,`gpt-5.4`,`gpt-5.3-codex`,`gpt-5.3-codex-spark`,`gpt-5.2-codex`,`gpt-5.1-codex-max`,`gpt-5.1-codex-mini`]},gemini:{label:`Gemini`,efforts:[],models:[`gemini-3.0-pro-preview`,`gemini-3.1-pro-preview`,`gemini-2.5-pro`,`gemini-3-flash-preview`,`gemini-2.5-flash`]},opencode:{label:`OpenCode`,efforts:[`minimal`,`low`,`high`,`max`],models:[`opencode-go/glm-5.1`,`opencode-go/kimi-k2.6`,`opencode-go/mimo-v2.5-pro`,`opencode-go/mimo-v2.5`,`opencode-go/minimax-m2.7`,`opencode-go/qwen3.6-plus`,`opencode-go/deepseek-v4-pro`,`opencode-go/deepseek-v4-flash`]},copilot:{label:`Copilot`,efforts:[`low`,`medium`,`high`],effortNote:`-> ~/.copilot/config.json`,models:[`gpt-5.5`,`claude-sonnet-4.6`,`claude-haiku-4.5`,`gpt-5.4`,`gpt-5.3-codex`,`gpt-5.2-codex`,`gpt-5.1-codex`,`gpt-4.1`,`gpt-5-mini`,`gemini-3-pro-preview`]}};function n(e){let t={};for(let[n,r]of Object.entries(e))t[n]=Array.isArray(r?.models)?[...r.models]:[];return t}function r(e){let t={};for(let[n,r]of Object.entries(e||{})){if(!r||typeof r!=`object`)continue;let e=r,i={label:e.label||n,efforts:Array.isArray(e.efforts)?[...e.efforts]:[],models:Array.isArray(e.models)?[...e.models]:[]};typeof e.effortNote==`string`&&e.effortNote.trim()&&(i.effortNote=e.effortNote),t[n]=i}return t}var i=r(t),a=Object.keys(i),o=n(i);function s(e){let t=r(e);return Object.keys(t).length?(i=t,a=Object.keys(t),o=n(t),!0):!1}async function c(){try{let t=await e(`/api/cli-registry`);if(!t||!s(t))throw Error(`invalid registry`)}catch(e){console.warn(`[cli-registry] fallback:`,e.message),s(t)}return i}function l(){return a}function u(e){return i[e]||null}var d=[{value:`frontend`,labelKey:`role.label.frontend`,label:`Frontend`,prompt:`Frontend employee — UI/UX, CSS, components`,skill:`dev-frontend`},{value:`backend`,labelKey:`role.label.backend`,label:`Backend`,prompt:`Backend employee — API, DB, server logic`,skill:`dev-backend`},{value:`data`,labelKey:`role.label.data`,label:`Data`,prompt:`Data employee — data pipeline, analysis, ML`,skill:`dev-data`},{value:`docs`,labelKey:`role.label.docs`,label:`Docs`,prompt:`Docs employee — documentation, README, API docs`,skill:`documentation`},{value:`custom`,labelKey:`role.label.custom`,label:`Custom...`,prompt:``,skill:null}];export{c as a,u as i,d as n,l as r,o as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./rolldown-runtime-DE9SaGGd.js";import{Ct as n}from"./vendor-utils-IVTPs69f.js";import{n as r,r as i}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{t as a}from"./cytoscape.esm-zT8GwLFm.js";var o=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){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,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(4);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},l.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},l.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},l.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)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}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof c){var r=e;if(r==null)throw`Edge is null!`;if(!(r.source!=null&&r.target!=null))throw`Source and/or target is null!`;if(!(r.source.owner!=null&&r.target.owner!=null&&r.source.owner==this&&r.target.owner==this))throw`Source and/or target owner is invalid!`;var l=r.source.edges.indexOf(r),u=r.target.edges.indexOf(r);if(!(l>-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;c<s;c++){var l=o[c];n=l.getTop(),r=l.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;m<p;m++){var h=f[m];e&&h.child!=null&&h.updateBounds(),o=h.getLeft(),s=h.getRight(),c=h.getTop(),u=h.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}var g=new l(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),d=f[0].getParent().paddingLeft==null?this.margin:f[0].getParent().paddingLeft,this.left=g.x-d,this.right=g.x+g.width+d,this.top=g.y-d,this.bottom=g.y+g.height+d},f.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d=e.length,f=0;f<d;f++){var p=e[f];o=p.getLeft(),s=p.getRight(),c=p.getTop(),u=p.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}return new l(t,r,n-t,a-r)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return e==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=e/Math.sqrt(this.nodes.length),this.estimatedSize},f.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new d,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var c=[];c=c.concat(t.getNodes());var l;o=c.length;for(var s=0;s<o;s++)l=c[s],t.remove(l);t==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(t);this.graphs.splice(u,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(!(a.source!=null&&a.target!=null))throw`Source and/or target is null!`;if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw`Source and/or target doesn't know this edge!`;var u=a.source.edges.indexOf(a);if(a.source.edges.splice(u,1),u=a.target.edges.indexOf(a),a.target.edges.splice(u,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var u=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(u,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(!(e!=null&&t!=null))throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(!0);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(!0);n=n.getParent().getOwner()}while(!0);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){e.getCenterX()<t.getCenterX()?n[0]=-1:n[0]=1,e.getCenterY()<t.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),c=e.getY(),l=e.getRight(),u=e.getX(),d=e.getBottom(),f=e.getRight(),p=e.getWidthHalf(),m=e.getHeightHalf(),h=t.getX(),g=t.getY(),_=t.getRight(),v=t.getX(),y=t.getBottom(),b=t.getRight(),x=t.getWidthHalf(),S=t.getHeightHalf(),C=!1,w=!1;if(r===a){if(i>o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(i<o)return n[0]=r,n[1]=d,n[2]=a,n[3]=g,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(r<a)return n[0]=l,n[1]=i,n[2]=h,n[3]=o,!1}else{var T=e.height/e.width,E=t.height/t.width,D=(o-i)/(a-r),O=void 0,k=void 0,A=void 0,j=void 0,M=void 0,N=void 0;if(-T===D?r>a?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,c=n.x,l=n.y,u=r.x,d=r.y,f=(o-i)*(d-l)-(u-c)*(s-a);if(f===0)return!1;var p=((d-l)*(u-i)+(c-u)*(d-a))/f,m=((a-s)*(u-i)+(o-i)*(d-a))/f;return 0<p&&p<1&&0<m&&m<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.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(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.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},e.exports=r}),(function(e,t,n){var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),c=n(5),l=n(4),u=n(17),d=n(27);function f(e){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}f.RANDOM_SEED=1,f.prototype=Object.create(d.prototype),f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},f.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},f.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},f.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},f.prototype.newGraph=function(e){return new c(null,this.graphManager,e)},f.prototype.newNode=function(e){return new o(this.graphManager,e)},f.prototype.newEdge=function(e){return new s(null,null,e)},f.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},f.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE===`during`?!1:(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},f.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},f.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},f.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof c){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},f.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},f.prototype.transform=function(e){if(e==null)this.transform(new l(0,0));else{var t=new u,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},f.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},f.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],c=new Map,l=[];for(l=l.concat(n);l.length>0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a<d.length;a++){var f=d[a].getOtherEnd(u);if(c.get(u)!=f)if(!o.has(f))s.push(f),c.set(f,u);else{t=!1;break}}}if(!t)e=[];else{var p=[].concat(r(o));e.push(p);for(var a=0;a<p.length;a++){var m=p[a],h=l.indexOf(m);h>-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},f.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new l(o.getCenterX(),o.getCenterY()),c=n.bendpoints.get(a);c.x=s.x,c.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},f.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}else{var s,c;return e<=50?(s=9*t/500,c=t/10):(s=9*t/50,c=-8*t),s*e+c}},f.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],c=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),c==1&&n.push(s)}var l=[];for(l=l.concat(n);!i;){var u=[];u=u.concat(l),l=[];for(var o=0;o<t.length;o++){var s=t[o],d=t.indexOf(s);d>=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),c=n(9);function l(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var u in l.prototype=Object.create(i.prototype),i)l[u]=i[u];l.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,c=this.getGraphManager().getAllEdges(),l=0;l<c.length;l++)e=c[l],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},l.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,c,e,t),c.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},l.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},l.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},l.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},l.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],l,u,d,f,p,m,h;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),m=2*i[0],h=2*i[1];var g=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=g*m,e.repulsionForceY-=g*h,t.repulsionForceX+=g*m,t.repulsionForceY+=g*h}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(l=r.getCenterX()-n.getCenterX(),u=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),l=o[2]-o[0],u=o[3]-o[1]),Math.abs(l)<a.MIN_REPULSION_DIST&&(l=c.sign(l)*a.MIN_REPULSION_DIST),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=c.sign(u)*a.MIN_REPULSION_DIST),d=l*l+u*u,f=Math.sqrt(d),p=this.repulsionConstant*e.noOfChildren*t.noOfChildren/d,m=p*l/f,h=p*u/f,e.repulsionForceX-=m,e.repulsionForceY-=h,t.repulsionForceX+=m,t.repulsionForceY+=h},l.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,c;e.getOwner()==this.graphManager.getRoot()?(c=t.getEstimatedSize()*this.gravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},l.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},l.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var c=a;c<=o;c++)this.grid[s][c].push(e),e.setGridCoordinates(r,i,a,o)},l.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,c=this.grid,l=e.startX-1;l<e.finishX+2;l++)for(var u=e.startY-1;u<e.finishY+2;u++)if(!(l<0||u<0||l>=c.length||u>=c[0].length)){for(var d=0;d<c[l][u].length;d++)if(s=c[l][u][d],!(e.getOwner()!=s.getOwner()||e==s)&&!t.has(s)&&!o.has(s)){var f=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),p=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);f<=this.repulsionRange&&p<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(l=0;l<e.surrounding.length;l++)this.calcRepulsionForce(e,e.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},e.exports=l}),(function(e,t,n){var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),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 a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[s][c]=0}this.tracebackGrid=Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=Array(this.jMax);for(var u=0;u<this.jMax;u++)this.tracebackGrid[l][u]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],c=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[c[0]],this.tracebackGrid[n][r]=[c.includes(0),c.includes(1),c.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),s=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(o()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(o()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.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},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),c=n(1),l=n(0).FDLayoutConstants,u=n(0).LayoutConstants,d=n(0).Point,f=n(0).PointD,p=n(0).Layout,m=n(0).Integer,h=n(0).IGeometry,g=n(0).LGraph,_=n(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var y in v.prototype=Object.create(r.prototype),r)v[y]=r[y];v.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},v.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},v.prototype.newNode=function(e){return new o(this.graphManager,e)},v.prototype.newEdge=function(e){return new s(null,null,e)},v.prototype.initParameters=function(){r.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.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.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){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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 e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(l.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},v.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new f),r.getBendpoints().push(new f),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var c=o[s];c.getBendpoints().push(new f),this.createDummyNodesForBendpoints(c)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},v.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new f(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=c.DEFAULT_COMPONENT_SEPERATION),r=0);var l=e[s],m=p.findCenterOfTree(l);t.x=a,t.y=i,o=v.radialLayout(l,m,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(t,null,0,359,0,r);var i=g.calculateBounds(e),a=new _;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new f(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},v.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*h.TWO_PI/360,c=i*Math.cos(s),l=i*Math.sin(s);e.setCenter(c,l);var u=[];u=u.concat(e.getEdges());var d=u.length;t!=null&&d--;for(var f=0,p=u.length,m,g=e.getEdgesBetween(t);g.length>1;){var _=g[0];g.splice(0,1);var y=u.indexOf(_);y>=0&&u.splice(y,1),p--,d--}m=t==null?0:(u.indexOf(g[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;v.branchRadialLayout(S,e,C,w,i+a,a),f++}}},v.maxDiagonalInTree=function(e){for(var t=m.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],c=a.getParent().id;t[c]===void 0&&(t[c]=[]),t[c]=t[c].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l<t[n].length;l++){var u=t[n][l];c.remove(u),s.add(u)}}})},v.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},v.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},v.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},v.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},v.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},v.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var c=0,l=0;l<s.length;l++){var u=s[l];u.rect.x=t,u.rect.y=n,t+=u.rect.width+e.horizontalPadding,u.rect.height>c&&(c=u.rect.height)}n+=c+e.verticalPadding}},v.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},v.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},v.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},v.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.height+=l-c,this.shiftToLastRow(e)}},v.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,c=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(var u=o;u<=s;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(var u=i;u<=a;u++)c[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d=m.MAX_VALUE,f,p,h=0;h<c.length;h++)c[h]<d?(d=c[h],f=1,p=h):c[h]==d&&f++;if(f==3&&d==0)c[0]==0&&c[1]==0&&c[2]==0?t=1:c[0]==0&&c[1]==0&&c[3]==0?t=0:c[0]==0&&c[2]==0&&c[3]==0?t=3:c[1]==0&&c[2]==0&&c[3]==0&&(t=2);else if(f==2&&d==0){var g=Math.floor(Math.random()*2);t=c[0]==0&&c[1]==0?g==0?0:1:c[0]==0&&c[2]==0?g==0?0:2:c[0]==0&&c[3]==0?g==0?0:3:c[1]==0&&c[2]==0?g==0?1:2:c[1]==0&&c[3]==0?g==0?1:3:g==0?2:3}else if(f==4&&d==0){var g=Math.floor(Math.random()*4);t=g}else t=p;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-l.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+l.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+l.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-l.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=v}),(function(e,t,n){var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),c=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(s()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(s()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,u={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e){this.options=d(u,e),p(this.options)}var p=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.quality==`draft`?r.QUALITY=0:e.quality==`proof`?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l<c.length;l++){var u=c[l],d=this.idToLNode[u.data(`source`)],f=this.idToLNode[u.data(`target`)];if(d!==f&&d.getEdgesBetween(f).length==0){var p=a.add(r.newEdge(),d,f);p.id=u.id()}}var m=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},h=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,c,l=0;l<s&&!c;l++)c=i.stopped||i.layout.tick();if(c){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(m),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var u=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=u[n],i=e;r==null&&(r=u[i.data(`parent`)]||u[`DummyCompound_`+i.data(`parent`)],u[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(h))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,m),e=!1),this},f.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},f.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),u,d=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(u=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new c(a.position(`x`)-d.w/2,a.position(`y`)-d.h/2),new l(parseFloat(d.w),parseFloat(d.h)))):e.add(new s(this.graphManager)),u.id=a.data(`id`),u.paddingLeft=parseInt(a.css(`padding`)),u.paddingTop=parseInt(a.css(`padding`)),u.paddingRight=parseInt(a.css(`padding`)),u.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var f=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=a.css(`text-halign`);u.labelWidth=f,u.labelHeight=p,u.labelPos=m}if(this.idToLNode[a.data(`id`)]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),o!=null&&o.length>0){var h=n.getGraphManager().add(n.newGraph(),u);this.processChildrenList(h,o,n)}}},f.prototype.stop=function(){return this.stopped=!0,this};var m=function(e){e(`layout`,`cose-bilkent`,f)};typeof cytoscape<`u`&&m(cytoscape),e.exports=m})])})}))(),1);a.use(c.default);function l(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}r(l,`addNodes`);function u(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}r(u,`addEdges`);function d(e){return new Promise(t=>{let r=n(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),o=a({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});r.remove(),l(e.nodes,o),u(e.edges,o),o.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),o.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),o.ready(e=>{i.info(`Cytoscape ready`,e),t(o)})})}r(d,`createCytoscapeInstance`);function f(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}r(f,`extractPositionedNodes`);function p(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}r(p,`extractPositionedEdges`);async function m(e,t){i.debug(`Starting cose-bilkent layout algorithm`);try{h(e);let t=await d(e),n=f(t),r=p(t);return i.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw i.error(`Error in cose-bilkent layout algorithm:`,e),e}}r(m,`executeCoseBilkentLayout`);function h(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}r(h,`validateLayoutData`);var g=r(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:c},{algorithm:l})=>{let u={},d={},f=t.select(`g`);a(f,e.markers,e.type,e.diagramId);let p=f.insert(`g`).attr(`class`,`subgraphs`),h=f.insert(`g`).attr(`class`,`edgePaths`),g=f.insert(`g`).attr(`class`,`edgeLabels`),_=f.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};d[t.id]=e,u[t.id]=e,await n(p,t)}else{let n={...t};u[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await m({...e,nodes:e.nodes.map(e=>{let t=u[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=u[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=u[t.start??``],a=u[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};c(o,r(h,o,d,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};c(i,r(h,i,d,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`);export{g as render};