synabun 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/THIRD-PARTY-LICENSES.md +46 -4
- package/launcher.mjs +9 -3
- package/lib/start-launcher.js +6 -1
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -1
- package/neural-interface/i18n/en.json +218 -7
- package/neural-interface/i18n/pt-BR.json +220 -9
- package/neural-interface/lib/account-usage.js +5 -3
- package/neural-interface/lib/app-controls-api.js +161 -0
- package/neural-interface/lib/assistant-api.js +21 -7
- package/neural-interface/lib/assistant-brains/opencode.js +13 -1
- package/neural-interface/lib/assistant-brains/opencode2-browser-policy/index.js +44 -0
- package/neural-interface/lib/assistant-brains/opencode2-route-gate/index.js +57 -0
- package/neural-interface/lib/assistant-catalog.js +17 -2
- package/neural-interface/lib/assistant-dispatch.js +3 -0
- package/neural-interface/lib/assistant-envelope.js +19 -1
- package/neural-interface/lib/assistant-runtime.js +127 -8
- package/neural-interface/lib/claude-model-catalog.js +64 -14
- package/neural-interface/lib/codex-settings-schema.js +109 -47
- package/neural-interface/lib/editor-completion-opencode.js +132 -35
- package/neural-interface/lib/exec-loop-command.js +8 -1
- package/neural-interface/lib/launch-cache.js +293 -0
- package/neural-interface/lib/login-start.js +524 -0
- package/neural-interface/lib/native-loop-providers.js +18 -3
- package/neural-interface/lib/native-loop-runtime.js +19 -0
- package/neural-interface/lib/opencode-db-schema.js +75 -0
- package/neural-interface/lib/opencode-history.js +16 -1
- package/neural-interface/lib/opencode-protocol.js +173 -0
- package/neural-interface/lib/opencode-provider-view.js +81 -0
- package/neural-interface/lib/opencode-runtime-config.js +10 -3
- package/neural-interface/lib/opencode-serve-records.js +606 -0
- package/neural-interface/lib/opencode-v2-client.js +33 -6
- package/neural-interface/lib/opencode-v2-ws-requests.js +19 -5
- package/neural-interface/lib/opencode-worker-activity.js +229 -0
- package/neural-interface/lib/opencode2-client.js +760 -0
- package/neural-interface/lib/opencode2-proxy.js +116 -0
- package/neural-interface/lib/opencode2-translate.js +1008 -0
- package/neural-interface/lib/process-identity.js +361 -0
- package/neural-interface/lib/session-cache-builder.js +26 -5
- package/neural-interface/lib/session-title-generator.js +18 -0
- package/neural-interface/lib/style-guide/api.js +4 -3
- package/neural-interface/lib/untrusted-file-headers.js +27 -0
- package/neural-interface/package-lock.json +1343 -45
- package/neural-interface/package.json +5 -1
- package/neural-interface/public/index.html +2 -2
- package/neural-interface/public/shared/agent-runtime-options.js +55 -11
- package/neural-interface/public/shared/assistant/asst-agents-dock.js +172 -17
- package/neural-interface/public/shared/assistant/asst-api.js +11 -3
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +195 -80
- package/neural-interface/public/shared/assistant/asst-composer.js +1 -1
- package/neural-interface/public/shared/assistant/asst-hosts.js +49 -2
- package/neural-interface/public/shared/assistant/asst-menu.js +77 -6
- package/neural-interface/public/shared/assistant/asst-panel.js +197 -33
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +28 -10
- package/neural-interface/public/shared/assistant/asst-redact.js +186 -0
- package/neural-interface/public/shared/assistant/asst-render.js +382 -36
- package/neural-interface/public/shared/assistant/asst-run-stage.js +231 -0
- package/neural-interface/public/shared/assistant/asst-sanitize.js +193 -3
- package/neural-interface/public/shared/assistant/asst-scene-styles.js +273 -0
- package/neural-interface/public/shared/assistant/asst-scenes.js +528 -0
- package/neural-interface/public/shared/assistant/asst-sidepanel-styles.js +3 -15
- package/neural-interface/public/shared/assistant/asst-state.js +14 -0
- package/neural-interface/public/shared/assistant/asst-styles.js +43 -0
- package/neural-interface/public/shared/assistant/asst-tool-kinds.js +13 -1
- package/neural-interface/public/shared/cc-dropdown.js +480 -0
- package/neural-interface/public/shared/cdx/cdx-panel.js +13 -1
- package/neural-interface/public/shared/cdx/cdx-render.js +15 -3
- package/neural-interface/public/shared/cdx/cdx-styles.js +4 -0
- package/neural-interface/public/shared/cdx/cdx-tabs.js +149 -35
- package/neural-interface/public/shared/cp/cp-markdown.js +4 -57
- package/neural-interface/public/shared/data-cache.js +223 -0
- package/neural-interface/public/shared/desktop-bridge.js +11 -0
- package/neural-interface/public/shared/desktop-titlebar-view.js +78 -1
- package/neural-interface/public/shared/desktop-titlebar.js +214 -28
- package/neural-interface/public/shared/desktop-update-view.js +15 -5
- package/neural-interface/public/shared/file-links.js +73 -8
- package/neural-interface/public/shared/html-shell.js +74 -80
- package/neural-interface/public/shared/launch-prefetch.js +59 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-caps.js +3 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +7 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-modelpicker.js +54 -17
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +93 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-projectbar.js +3 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-providers.js +11 -9
- package/neural-interface/public/shared/ocp-v2/ocp-v2-rehydrate.js +15 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +1 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send-logic.js +401 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +16 -9
- package/neural-interface/public/shared/ocp-v2/ocp-v2-sessions-logic.js +60 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +48 -19
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +195 -19
- package/neural-interface/public/shared/opencode-providers.js +39 -0
- package/neural-interface/public/shared/schedules-view.js +318 -0
- package/neural-interface/public/shared/settings/settings-app-pane.js +335 -0
- package/neural-interface/public/shared/settings/settings-app.js +243 -0
- package/neural-interface/public/shared/settings/settings-data.js +88 -0
- package/neural-interface/public/shared/settings/settings-ia.js +17 -0
- package/neural-interface/public/shared/sidepanel-session-status.js +49 -0
- package/neural-interface/public/shared/styles.css +540 -371
- package/neural-interface/public/shared/ui-assistant.js +27 -5
- package/neural-interface/public/shared/ui-automation-studio.js +67 -27
- package/neural-interface/public/shared/ui-bookmarks.js +2 -1
- package/neural-interface/public/shared/ui-claude-panel.js +76 -8
- package/neural-interface/public/shared/ui-codex-panel.js +1 -0
- package/neural-interface/public/shared/ui-detail.js +6 -6
- package/neural-interface/public/shared/ui-file-links.js +1 -0
- package/neural-interface/public/shared/ui-image-gallery.js +6 -5
- package/neural-interface/public/shared/ui-invite.js +18 -2
- package/neural-interface/public/shared/ui-link.js +9 -9
- package/neural-interface/public/shared/ui-menubar.js +232 -33
- package/neural-interface/public/shared/ui-native-loop-router.js +2 -0
- package/neural-interface/public/shared/ui-opencode-panel-v2.js +1 -0
- package/neural-interface/public/shared/ui-schedules-studio.js +2099 -869
- package/neural-interface/public/shared/ui-sessions.js +15 -4
- package/neural-interface/public/shared/ui-settings.js +87 -36
- package/neural-interface/public/shared/ui-sidebar.js +4 -4
- package/neural-interface/public/shared/ui-sidepanel-session-entry.js +13 -0
- package/neural-interface/public/shared/ui-sidepanel-sessions.js +55 -4
- package/neural-interface/public/shared/ui-sidepanel-tray.js +84 -8
- package/neural-interface/public/shared/ui-skills.js +70 -12
- package/neural-interface/public/shared/ui-sync.js +7 -0
- package/neural-interface/public/shared/ui-terminal.js +36 -20
- package/neural-interface/public/shared/ui-trash.js +8 -1
- package/neural-interface/public/shared/ui-tutorial-steps.js +7 -3
- package/neural-interface/public/shared/ui-tutorial.js +15 -5
- package/neural-interface/public/shared/ui-update.js +83 -14
- package/neural-interface/public/shared/ui-whiteboard.js +2 -1
- package/neural-interface/public/variant/2d/main.js +4 -1
- package/neural-interface/public/variant/3d/main.js +3 -0
- package/neural-interface/public/vendor/highlight/LICENSE +29 -0
- package/neural-interface/public/vendor/highlight/github-dark-dimmed-11.12.0.min.css +9 -0
- package/neural-interface/public/vendor/highlight/highlight-11.12.0.min.js +1262 -0
- package/neural-interface/public/vendor/highlight/manifest.json +5 -0
- package/neural-interface/public/vendor/html2canvas/LICENSE +22 -0
- package/neural-interface/public/vendor/html2canvas/html2canvas-1.4.1.min.js +20 -0
- package/neural-interface/public/vendor/html2canvas/manifest.json +4 -0
- package/neural-interface/public/vendor/marked/LICENSE.md +44 -0
- package/neural-interface/public/vendor/marked/manifest.json +4 -0
- package/neural-interface/public/vendor/marked/marked-14.1.4.esm.js +2502 -0
- package/neural-interface/public/vendor/mermaid/LICENSE +21 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/abnfDiagram-PAR5IXJI.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/architecture-7GRP2DOG-M7G3SWCO.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/architectureDiagram-2PNWDENW.mjs +36 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/blockDiagram-PUWGUBOA.mjs +129 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/c4Diagram-3NLNHZP5.mjs +38 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-2NMSUPJH.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-32MCUW2P.mjs +206 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-3NPNU5GP.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-3SMGFRGC.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-4CAJECRU.mjs +14 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-4OADUZ5Q.mjs +10 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-5IMINLNL.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-5IQCK5RY.mjs +3 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-5MVFYWFU.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-AQ6EADP3.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-AZZRMDJM.mjs +15 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-CLS4B6BI.mjs +168 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-DZP67EKU.mjs +70 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-EICP7K5X.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-GDY2UAB4.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-H7VHZCWX.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-IJBDOHL6.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-JFFVMJIA.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-JQRUD6KW.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-JZGDI5JK.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-KD6SPIPN.mjs +2 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-NF366YI6.mjs +231 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-NUDPKBEF.mjs +32 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-OJINMHTS.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-Q6NGPIAH.mjs +2 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-QJSWEUOL.mjs +132 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-R7JDMUKV.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-RCXAM2GK.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-RT4MAWR3.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-SFMINX4W.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-SLDQ463B.mjs +88 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-STOV2HOB.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-T5OCTHI4.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-TCEHX7R3.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-VQC2EELJ.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-VRZKL3EH.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-VTHDQ7BV.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-VY2OSTJR.mjs +2 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-WUBWJARI.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-YBMQ5JGJ.mjs +2 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-YDMLL4PJ.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-Z6V44ARX.mjs +62 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-ZJJ7VQJP.mjs +339 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-ZNLK7HRR.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-ZQN7UHIL.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-ZS6VBONO.mjs +174 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/chunk-ZUNWM646.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/classDiagram-FGAMPOII.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/classDiagram-v2-AI5RJEK4.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/cose-bilkent-Q72C2OJ3.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/cynefin-OW5HDTMX-6OCTWOGG.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/cynefinDiagram-2OOWUY4M.mjs +62 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/dagre-MPVFI544.mjs +4 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/diagram-AE4NWXFW.mjs +24 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/diagram-BUJID5UG.mjs +41 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/diagram-C44CZ5NI.mjs +24 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/diagram-EYOLEXXS.mjs +30 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/diagram-P7B6PWOJ.mjs +3 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/ebnfDiagram-FTPZ3PV6.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/erDiagram-H3ERR26V.mjs +99 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/eventmodeling-NTZA5JFV-WKSWQHFS.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/flowDiagram-YHGXBVSY.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/ganttDiagram-RWFTB7ED.mjs +292 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/gitGraph-4MIJSDKK-JH2HKYUO.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/gitGraphDiagram-MAR6GKOP.mjs +106 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/info-A6RAGUB7-3TX3OFWW.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/infoDiagram-LV547AFH.mjs +2 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/ishikawaDiagram-PUJQGNDS.mjs +70 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/journeyDiagram-EW5QJT4W.mjs +139 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/kanban-definition-JSQERAZB.mjs +89 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/katex-CZ4GXH2S.mjs +257 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/mindmap-definition-VBJCLQLM.mjs +96 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/packet-AYTQ26CC-MKII6P3Y.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/pegDiagram-7WILOQTJ.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/pie-WAS4IAKB-6B4OPMJ5.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/pieDiagram-EFA7CBSB.mjs +39 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/quadrantDiagram-WARVYA7P.mjs +7 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/radar-RG4KPBEZ-UPTR3XUL.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/railroad-74A4TZTK-MEFUPFMS.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/railroad-abnf-HS5TGJTU-R5YG2S5D.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/railroad-ebnf-LZEXJU2U-G5QEX2L6.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/railroad-peg-WCYAUIDC-H5I2ZRY2.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/railroadDiagram-5NIQVNLQ.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/requirementDiagram-SXREGOKZ.mjs +84 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/sankeyDiagram-VV74M2VP.mjs +40 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/sequenceDiagram-52ZFIFDL.mjs +162 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/sizeCapture-FGA5AGYP.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/stateDiagram-3QAKPIVI.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/stateDiagram-v2-HN2P4RDZ.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/swimlanes-QLVP42QD.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/swimlanesDiagram-JKPDBFCN.mjs +8 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/timeline-definition-GS45XAXW.mjs +120 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/treeView-Q6P3EWNA-ZRJGANNQ.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/treemap-WGGIJYW6-K64VN5AS.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/vennDiagram-QIQU2ZRJ.mjs +34 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/wardley-WFR3VGLG-D67OWCCH.mjs +1 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/wardleyDiagram-U6YNM66N.mjs +78 -0
- package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/xychartDiagram-XJAZEDNM.mjs +7 -0
- package/neural-interface/public/vendor/mermaid/manifest.json +4 -0
- package/neural-interface/public/vendor/mermaid/mermaid-11.17.2.esm.min.mjs +14 -0
- package/neural-interface/scripts/build-vendor.mjs +84 -3
- package/neural-interface/server.js +1099 -286
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/synabun/modules/schedule.md +1 -1
package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/vennDiagram-QIQU2ZRJ.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{a as Bt}from"./chunk-IJBDOHL6.mjs";import{a as Pt}from"./chunk-5IMINLNL.mjs";import{o as Ft}from"./chunk-VY2OSTJR.mjs";import"./chunk-STOV2HOB.mjs";import{O as At,S as Rt,T as Ct,U as Vt,V as Ot,W as Nt,X as jt,Y as Lt,d as Tt,e as Et,f as _t,g as ct,j as zt,t as it}from"./chunk-QJSWEUOL.mjs";import{h as ot}from"./chunk-H7VHZCWX.mjs";import{a as d}from"./chunk-AQ6EADP3.mjs";var ut=(function(){var t=d(function(D,x,b,k){for(b=b||{},k=D.length;k--;b[D[k]]=x);return b},"o"),n=[5,8],s=[7,8,11,12,17,19,22,24],e=[1,17],i=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],r=[1,31],l=[1,39],f=[7,8,11,12,17,19,22,24,27],u=[1,57],a=[1,56],p=[1,58],g=[1,59],v=[1,60],m=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],S={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:d(function(x,b,k,c,y,h,A){var I=h.length-1;switch(y){case 1:return h[I-1];case 2:case 3:case 4:this.$=[];break;case 5:h[I-1].push(h[I]),this.$=h[I-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=h[I];break;case 8:c.setDiagramTitle(h[I].substr(6)),this.$=h[I].substr(6);break;case 9:c.addSubsetData([h[I]],void 0,void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 10:c.addSubsetData([h[I-1]],h[I],void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 11:c.addSubsetData([h[I-2]],void 0,parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 12:c.addSubsetData([h[I-3]],h[I-2],parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 13:if(h[I].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I]),c.addSubsetData(h[I],void 0,void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 14:if(h[I-1].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I-1]),c.addSubsetData(h[I-1],h[I],void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 15:if(h[I-2].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I-2]),c.addSubsetData(h[I-2],void 0,parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 16:if(h[I-3].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I-3]),c.addSubsetData(h[I-3],h[I-2],parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 17:case 18:case 19:c.addTextData(h[I-1],h[I],void 0);break;case 20:case 21:c.addTextData(h[I-2],h[I-1],h[I]);break;case 23:c.addStyleData(h[I-1],h[I]);break;case 24:case 25:case 26:var R=c.getCurrentSets();if(!R)throw new Error("text requires set");c.addTextData(R,h[I],void 0);break;case 27:case 28:var R=c.getCurrentSets();if(!R)throw new Error("text requires set");c.addTextData(R,h[I-1],h[I]);break;case 29:case 41:this.$=[h[I]];break;case 30:case 42:this.$=[...h[I-2],h[I]];break;case 31:this.$=[h[I-2],h[I]];break;case 33:this.$=h[I].join(" ");break;case 34:this.$=[h[I]];break;case 35:h[I-1].push(h[I]),this.$=h[I-1];break;case 43:case 44:this.$=h[I];break}},"anonymous"),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(s,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(s,[2,5]),t(s,[2,6]),t(s,[2,7]),t(s,[2,8]),{13:16,20:e,21:i},{13:20,18:19,20:e,21:i},{13:20,18:21,20:e,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:e,21:i},t(s,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(s,[2,13],{14:[1,29],15:[1,30],27:r}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:r},t(s,[2,22]),t(s,[2,24],{14:[1,35]}),t(s,[2,25],{14:[1,36]}),t(s,[2,26]),{20:l,25:37,26:38,27:r},t(s,[2,10],{15:[1,40]}),{16:[1,41]},t(s,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:e,21:i},t(s,[2,17],{14:[1,45]}),t(s,[2,18],{14:[1,46]}),t(s,[2,19]),t(s,[2,27]),t(s,[2,28]),t(s,[2,23],{27:[1,47]}),t(f,[2,29]),{15:[1,48]},{16:[1,49]},t(s,[2,11]),{16:[1,50]},t(s,[2,15]),t(o,[2,42]),t(s,[2,20]),t(s,[2,21]),{20:l,26:51},{16:u,20:a,21:[1,53],28:52,29:54,30:55,31:p,32:g,33:v},t(s,[2,12]),t(s,[2,16]),t(f,[2,30]),t(f,[2,31]),t(f,[2,32]),t(f,[2,33],{30:61,16:u,20:a,31:p,32:g,33:v}),t(m,[2,34]),t(m,[2,36]),t(m,[2,37]),t(m,[2,38]),t(m,[2,39]),t(m,[2,40]),t(m,[2,35])],defaultActions:{6:[2,1]},parseError:d(function(x,b){if(b.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=b,k}},"parseError"),parse:d(function(x){var b=this,k=[0],c=[],y=[null],h=[],A=this.table,I="",R=0,U=0,P=0,V=2,z=1,C=h.slice.call(arguments,1),T=Object.create(this.lexer),O={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(O.yy[B]=this.yy[B]);T.setInput(x,O.yy),O.yy.lexer=T,O.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var N=T.yylloc;h.push(N);var j=T.options&&T.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(K){k.length=k.length-2*K,y.length=y.length-K,h.length=h.length-K}d(H,"popStack");function L(){var K;return K=c.pop()||T.lex()||z,typeof K!="number"&&(K instanceof Array&&(c=K,K=c.pop()),K=b.symbols_[K]||K),K}d(L,"lex");for(var _,X,W,M,F,et,Z={},Y,q,wt,st;;){if(W=k[k.length-1],this.defaultActions[W]?M=this.defaultActions[W]:((_===null||typeof _>"u")&&(_=L()),M=A[W]&&A[W][_]),typeof M>"u"||!M.length||!M[0]){var lt="";st=[];for(Y in A[W])this.terminals_[Y]&&Y>V&&st.push("'"+this.terminals_[Y]+"'");T.showPosition?lt="Parse error on line "+(R+1)+`:
|
|
2
|
+
`+T.showPosition()+`
|
|
3
|
+
Expecting `+st.join(", ")+", got '"+(this.terminals_[_]||_)+"'":lt="Parse error on line "+(R+1)+": Unexpected "+(_==z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(lt,{text:T.match,token:this.terminals_[_]||_,line:T.yylineno,loc:N,expected:st})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+_);switch(M[0]){case 1:k.push(_),y.push(T.yytext),h.push(T.yylloc),k.push(M[1]),_=null,X?(_=X,X=null):(U=T.yyleng,I=T.yytext,R=T.yylineno,N=T.yylloc,P>0&&P--);break;case 2:if(q=this.productions_[M[1]][1],Z.$=y[y.length-q],Z._$={first_line:h[h.length-(q||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(q||1)].first_column,last_column:h[h.length-1].last_column},j&&(Z._$.range=[h[h.length-(q||1)].range[0],h[h.length-1].range[1]]),et=this.performAction.apply(Z,[I,U,R,O.yy,M[1],y,h].concat(C)),typeof et<"u")return et;q&&(k=k.slice(0,-1*q*2),y=y.slice(0,-1*q),h=h.slice(0,-1*q)),k.push(this.productions_[M[1]][0]),y.push(Z.$),h.push(Z._$),wt=A[k[k.length-2]][k[k.length-1]],k.push(wt);break;case 3:return!0}}return!0},"parse")},E=(function(){var D={EOF:1,parseError:d(function(b,k){if(this.yy.parser)this.yy.parser.parseError(b,k);else throw new Error(b)},"parseError"),setInput:d(function(x,b){return this.yy=b||this.yy||{},this._input=x,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:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var b=x.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var b=x.length,k=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var c=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),k.length-1&&(this.yylineno-=k.length-1);var y=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:k?(k.length===c.length?this.yylloc.first_column:0)+c[c.length-k.length].length-k[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),b=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
|
5
|
+
`+b+"^"},"showPosition"),test_match:d(function(x,b){var k,c,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),c=x[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],k=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var h in y)this[h]=y[h];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,b,k,c;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),h=0;h<y.length;h++)if(k=this._input.match(this.rules[y[h]]),k&&(!b||k[0].length>b[0].length)){if(b=k,c=h,this.options.backtrack_lexer){if(x=this.test_match(k,y[h]),x!==!1)return x;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(x=this.test_match(b,y[c]),x!==!1?x:!1):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:d(function(){var b=this.next();return b||this.lex()},"lex"),begin:d(function(b){this.conditionStack.push(b)},"begin"),popState:d(function(){var b=this.conditionStack.length-1;return b>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},"topState"),pushState:d(function(b){this.begin(b)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(b,k,c,y){var h=y;switch(c){case 0:break;case 1:break;case 2:break;case 3:if(b.getIndentMode&&b.getIndentMode())return b.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:b.setIndentMode&&b.setIndentMode(!1),this.begin("INITIAL"),this.unput(k.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(b.consumeIndentText)b.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return k.yytext=k.yytext.slice(2,-2),14;break;case 17:return k.yytext=k.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return D})();S.lexer=E;function w(){this.yy={}}return d(w,"Parser"),w.prototype=S,S.Parser=w,new w})();ut.parser=ut;var qt=ut;var ft=[],ht=[],dt=[],gt=new Set,xt,yt=!1,ue=d((t,n,s)=>{let e=rt(t).sort(),i=s??10/Math.pow(t.length,2);xt=e,e.length===1&>.add(e[0]),ft.push({sets:e,size:i,label:n?nt(n):void 0})},"addSubsetData"),fe=d(()=>ft,"getSubsetData"),nt=d(t=>{let n=t.trim();return n.length>=2&&n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n},"normalizeText"),he=d(t=>t&&nt(t),"normalizeStyleValue"),de=d((t,n,s)=>{let e=nt(n);ht.push({sets:rt(t).sort(),id:e,label:s?nt(s):void 0})},"addTextData"),ge=d((t,n)=>{let s=rt(t).sort(),e={};for(let[i,o]of n)e[i]=he(o)??o;dt.push({targets:s,styles:e})},"addStyleData"),xe=d(()=>dt,"getStyleData"),rt=d(t=>t.map(n=>nt(n)),"normalizeIdentifierList"),ye=d(t=>{let s=rt(t).filter(e=>!gt.has(e));if(s.length>0)throw new Error(`unknown set identifier: ${s.join(", ")}`)},"validateUnionIdentifiers"),pe=d(()=>ht,"getTextData"),me=d(()=>xt,"getCurrentSets"),be=d(()=>yt,"getIndentMode"),ve=d(t=>{yt=t},"setIndentMode"),ke=zt.venn;function Me(){return Ft(ke,it().venn)}d(Me,"getConfig");var Ie=d(()=>{Rt(),ft.length=0,ht.length=0,dt.length=0,gt.clear(),xt=void 0,yt=!1},"customClear"),Gt={getConfig:Me,clear:Ie,setAccTitle:Ct,getAccTitle:Vt,setDiagramTitle:jt,getDiagramTitle:Lt,getAccDescription:Nt,setAccDescription:Ot,addSubsetData:ue,getSubsetData:fe,addTextData:de,addStyleData:ge,validateUnionIdentifiers:ye,getTextData:pe,getStyleData:xe,getCurrentSets:me,getIndentMode:be,setIndentMode:ve};var Se=d(t=>`
|
|
7
|
+
.venn-title {
|
|
8
|
+
font-size: 32px;
|
|
9
|
+
fill: ${t.vennTitleTextColor};
|
|
10
|
+
font-family: ${t.fontFamily};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.venn-circle text {
|
|
14
|
+
font-size: 48px;
|
|
15
|
+
font-family: ${t.fontFamily};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.venn-intersection text {
|
|
19
|
+
font-size: 48px;
|
|
20
|
+
fill: ${t.vennSetTextColor};
|
|
21
|
+
font-family: ${t.fontFamily};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.venn-text-node {
|
|
25
|
+
font-family: ${t.fontFamily};
|
|
26
|
+
color: ${t.vennSetTextColor};
|
|
27
|
+
}
|
|
28
|
+
`,"getStyles"),Ut=Se;function at(t,n){let s=we(t),e=s.filter(l=>De(l,t)),i=0,o=0,r=[];if(e.length>1){let l=Yt(e);for(let u=0;u<e.length;++u){let a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){let a=e[u];o+=(f.x+a.x)*(a.y-f.y);let p={x:(a.x+f.x)/2,y:(a.y+f.y)/2},g=null;for(let v=0;v<a.parentIndex.length;++v)if(f.parentIndex.includes(a.parentIndex[v])){let m=t[a.parentIndex[v]],S=Math.atan2(a.x-m.x,a.y-m.y),E=Math.atan2(f.x-m.x,f.y-m.y),w=E-S;w<0&&(w+=2*Math.PI);let D=E-w/2,x=G(p,{x:m.x+m.radius*Math.sin(D),y:m.y+m.radius*Math.cos(D)});x>m.radius*2&&(x=m.radius*2),(g==null||g.width>x)&&(g={circle:m,width:x,p1:a,p2:f,large:x>m.radius,sweep:!0})}g!=null&&(r.push(g),i+=bt(g.circle.radius,g.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(G(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-1e-10,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}d(at,"intersectionArea");function De(t,n){return n.every(s=>G(t,s)<s.radius+1e-10)}d(De,"containedInCircles");function we(t){let n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){let i=Ht(t[s],t[e]);for(let o of i)o.parentIndex=[s,e],n.push(o)}return n}d(we,"getIntersectionPoints");function bt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}d(bt,"circleArea");function G(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}d(G,"distance");function Dt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);let e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return bt(t,e)+bt(n,i)}d(Dt,"circleOverlap");function Ht(t,n){let s=G(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];let o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}d(Ht,"circleCircleIntersection");function Yt(t){let n={x:0,y:0};for(let s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}d(Yt,"getCenter");function Te(t,n,s,e){e=e||{};let i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s),f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;let a=n+f,p=t(a);if(p*r>=0&&(n=a),Math.abs(f)<o||p===0)return a}return n+f}d(Te,"bisect");function vt(t){let n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}d(vt,"zeros");function Wt(t,n){return vt(t).map(()=>vt(n))}d(Wt,"zerosM");function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}d($,"dot");function kt(t){return Math.sqrt($(t,t))}d(kt,"norm2");function Mt(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}d(Mt,"scale");function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}d(J,"weightedSum");function Xt(t,n,s){s=s||{};let e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,p=s.sigma!==void 0?s.sigma:.5,g,v=n.length,m=new Array(v+1);m[0]=n,m[0].fx=t(n),m[0].id=0;for(let k=0;k<v;++k){let c=n.slice();c[k]=c[k]?c[k]*i:o,m[k+1]=c,m[k+1].fx=t(c),m[k+1].id=k+1}function S(k){for(let c=0;c<k.length;c++)m[v][c]=k[c];m[v].fx=k.fx}d(S,"updateSimplex");let E=d((k,c)=>k.fx-c.fx,"sortOrder"),w=n.slice(),D=n.slice(),x=n.slice(),b=n.slice();for(let k=0;k<e;++k){if(m.sort(E),s.history){let y=m.map(h=>{let A=h.slice();return A.fx=h.fx,A.id=h.id,A});y.sort((h,A)=>h.id-A.id),s.history.push({x:m[0].slice(),fx:m[0].fx,simplex:y})}g=0;for(let y=0;y<v;++y)g=Math.max(g,Math.abs(m[0][y]-m[1][y]));if(Math.abs(m[0].fx-m[v].fx)<r&&g<l)break;for(let y=0;y<v;++y){w[y]=0;for(let h=0;h<v;++h)w[y]+=m[h][y];w[y]/=v}let c=m[v];if(J(D,1+f,w,-f,c),D.fx=t(D),D.fx<m[0].fx)J(b,1+u,w,-u,c),b.fx=t(b),b.fx<D.fx?S(b):S(D);else if(D.fx>=m[v-1].fx){let y=!1;if(D.fx>c.fx?(J(x,1+a,w,-a,c),x.fx=t(x),x.fx<c.fx?S(x):y=!0):(J(x,1-a*f,w,a*f,c),x.fx=t(x),x.fx<D.fx?S(x):y=!0),y){if(p>=1)break;for(let h=1;h<m.length;++h)J(m[h],1-p,m[0],p,m[h]),m[h].fx=t(m[h])}}else S(D)}return m.sort(E),{fx:m[0].fx,x:m[0]}}d(Xt,"nelderMead");function Ee(t,n,s,e,i,o,r){let l=s.fx,f=$(s.fxprime,n),u=l,a=l,p=f,g=0;i=i||1,o=o||1e-6,r=r||.1;function v(m,S,E){for(let w=0;w<16;++w)if(i=(m+S)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=$(e.fxprime,n),u>l+o*i*f||u>=E)S=i;else{if(Math.abs(p)<=-r*f)return i;p*(S-m)>=0&&(S=m),m=i,E=u}return 0}d(v,"zoom");for(let m=0;m<10;++m){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=$(e.fxprime,n),u>l+o*i*f||m&&u>=a)return v(g,i,a);if(Math.abs(p)<=-r*f)return i;if(p>=0)return v(i,g,u);a=u,g=i,i*=2}return i}d(Ee,"wolfeLineSearch");function _e(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()},o=n.slice(),r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),Mt(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=Ee(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)Mt(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);let p=$(e.fxprime,e.fxprime),g=Math.max(0,$(o,i.fxprime)/p);J(r,g,r,-1,i.fxprime),l=e,e=i,i=l}if(kt(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}d(_e,"conjugateGradient");function Zt(t,n={}){n.maxIterations=n.maxIterations||500;let s=n.initialLayout||Ce,e=n.lossFunction||tt,i=ze(t,n),o=s(i,n),r=Object.keys(o),l=[];for(let a of r)l.push(o[a].x),l.push(o[a].y);let u=Xt(a=>{let p={};for(let g=0;g<r.length;++g){let v=r[g];p[v]={x:a[2*g],y:a[2*g+1],radius:o[v].radius}}return e(p,i)},l,n).x;for(let a=0;a<r.length;++a){let p=r[a];o[p].x=u[2*a],o[p].y=u[2*a+1]}return o}d(Zt,"venn");var Jt=1e-10;function It(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Jt?Math.abs(t-n):Te(e=>Dt(t,n,e)-s,0,t+n)}d(It,"distanceFromIntersectArea");function ze(t,n={}){let s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(d(i,"toKey"),s){let l=new Map;for(let f of e)for(let u=0;u<f.sets.length;u++){let a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let p=u+1;p<f.sets.length;p++){let g=String(f.sets[p]),v=`${a};${g}`,m=`${g};${a}`;l.set(v,f.size+(l.get(v)||0)),l.set(m,f.size+(l.get(m)||0))}}for(let f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}let o=[],r=new Set;for(let l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){let f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){let f=o[l];for(let u=l+1;u<o.length;++u){let a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}d(ze,"addMissingAreas");function Ae(t,n,s){let e=Wt(n.length,n.length),i=Wt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{let r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=It(f,u,o.size);e[r][l]=e[l][r]=a;let p=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?p=1:o.size<=1e-10&&(p=-1),i[r][l]=i[l][r]=p}),{distances:e,constraints:i}}d(Ae,"getDistanceMatrices");function Re(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){let r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){let u=t[2*f],a=t[2*f+1],p=s[o][f],g=e[o][f],v=(u-r)*(u-r)+(a-l)*(a-l),m=Math.sqrt(v),S=v-p*p;g>0&&m<=p||g<0&&m>=p||(i+=2*S*S,n[2*o]+=4*S*(r-u),n[2*o+1]+=4*S*(l-a),n[2*f]+=4*S*(u-r),n[2*f+1]+=4*S*(a-l))}}return i}d(Re,"constrainedMDSGradient");function Ce(t,n={}){let s=Oe(t,n),e=n.lossFunction||tt;if(t.length>=8){let i=Ve(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}d(Ce,"bestInitialLayout");function Ve(t,n={}){let s=n.restarts||10,e=[],i={};for(let g of t)g.sets.length===1&&(i[g.sets[0]]=e.length,e.push(g));let{distances:o,constraints:r}=Ae(t,e,i),l=kt(o.map(kt))/o.length;o=o.map(g=>g.map(v=>v/l));let f=d((g,v)=>Re(g,v,o,r),"obj"),u=null;for(let g=0;g<s;++g){let v=vt(o.length*2).map(Math.random),m=_e(f,v,n);(!u||m.fx<u.fx)&&(u=m)}let a=u.x,p={};for(let g=0;g<e.length;++g){let v=e[g];p[v.sets[0]]={x:a[2*g]*l,y:a[2*g+1]*l,radius:Math.sqrt(v.size/Math.PI)}}if(n.history)for(let g of n.history)Mt(g.x,l);return p}d(Ve,"constrainedMDSLayout");function Oe(t,n){let s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(let p of t)if(p.sets.length===1){let g=p.sets[0];e[g]={x:1e10,y:1e10,rowid:e.length,size:p.size,radius:Math.sqrt(p.size/Math.PI)},i[g]=[]}t=t.filter(p=>p.sets.length===2);for(let p of t){let g=p.weight!=null?p.weight:1,v=p.sets[0],m=p.sets[1];p.size+Jt>=Math.min(e[v].size,e[m].size)&&(g=0),i[v].push({set:m,size:p.size,weight:g}),i[m].push({set:v,size:p.size,weight:g})}let o=[];Object.keys(i).forEach(p=>{let g=0;for(let v=0;v<i[p].length;++v)g+=i[p][v].size*i[p][v].weight;o.push({set:p,size:g})});function r(p,g){return g.size-p.size}d(r,"sortOrder"),o.sort(r);let l={};function f(p){return p.set in l}d(f,"isPositioned");function u(p,g){e[g].x=p.x,e[g].y=p.y,l[g]=!0}d(u,"positionSet"),u({x:0,y:0},o[0].set);for(let p=1;p<o.length;++p){let g=o[p].set,v=i[g].filter(f),m=e[g];if(v.sort(r),v.length===0)throw"ERROR: missing pairwise overlap information";let S=[];for(var a=0;a<v.length;++a){let D=e[v[a].set],x=It(m.radius,D.radius,v[a].size);S.push({x:D.x+x,y:D.y}),S.push({x:D.x-x,y:D.y}),S.push({y:D.y+x,x:D.x}),S.push({y:D.y-x,x:D.x});for(let b=a+1;b<v.length;++b){let k=e[v[b].set],c=It(m.radius,k.radius,v[b].size),y=Ht({x:D.x,y:D.y,radius:x},{x:k.x,y:k.y,radius:c});S.push(...y)}}let E=1e50,w=S[0];for(let D of S){e[g].x=D.x,e[g].y=D.y;let x=s(e,t);x<E&&(E=x,w=D)}u(w,g)}return e}d(Oe,"greedyLayout");function tt(t,n){let s=0;for(let e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){let r=t[e.sets[0]],l=t[e.sets[1]];i=Dt(r.radius,l.radius,G(r,l))}else i=at(e.sets.map(r=>t[r]));let o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}d(tt,"lossFunction");function Qt(t,n){let s=0;for(let e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){let l=t[e.sets[0]],f=t[e.sets[1]];i=Dt(l.radius,f.radius,G(l,f))}else i=at(e.sets.map(l=>t[l]));let o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}d(Qt,"logRatioLossFunction");function Ne(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){let i=t[0].x,o=t[0].y;for(let r of t)r.x-=i,r.y-=o}if(t.length===2&&G(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){let i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(let l of t){let f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){let o=t[1].y/(1e-10+t[1].x);for(let r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}d(Ne,"orientateCircles");function je(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}d(n,"find");function s(i,o){let r=n(i),l=n(o);r.parent=l}d(s,"union");for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){let r=t[i].radius+t[o].radius;G(t[i],t[o])+1e-10<r&&s(t[o],t[i])}let e=new Map;for(let i=0;i<t.length;++i){let o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}d(je,"disjointCluster");function St(t){let n=d(s=>{let e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}},"minMax");return{xRange:n("x"),yRange:n("y")}}d(St,"getBoundingBox");function $t(t,n,s){n==null&&(n=Math.PI/2);let e=ne(t).map(u=>Object.assign({},u)),i=je(e);for(let u of i){Ne(u,n,s);let a=St(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds,r=(o.xRange.max-o.xRange.min)/50;function l(u,a,p){if(!u)return;let g=u.bounds,v,m;if(a)v=o.xRange.max-g.xRange.min+r;else{v=o.xRange.max-g.xRange.max;let S=(g.xRange.max-g.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;S<0&&(v+=S)}if(p)m=o.yRange.max-g.yRange.min+r;else{m=o.yRange.max-g.yRange.max;let S=(g.yRange.max-g.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;S<0&&(m+=S)}for(let S of u)S.x+=v,S.y+=m,e.push(S)}d(l,"addCluster");let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=St(e);return ee(e)}d($t,"normalizeSolution");function te(t,n,s,e,i){let o=ne(t);n-=2*e,s-=2*e;let{xRange:r,yRange:l}=St(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){let v=Math.sqrt(i/Math.PI)*2;f=n/v,u=s/v}else f=n/(r.max-r.min),u=s/(l.max-l.min);let a=Math.min(u,f),p=(n-(r.max-r.min)*a)/2,g=(s-(l.max-l.min)*a)/2;return ee(o.map(v=>({radius:a*v.radius,x:e+p+(v.x-r.min)*a,y:e+g+(v.y-l.min)*a,setid:v.setid})))}d(te,"scaleSolution");function ee(t){let n={};for(let s of t)n[s.setid]=s;return n}d(ee,"toObjectNotation");function ne(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}d(ne,"fromObjectNotation");function se(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,p=null,g=null,v=!1,m=null,S=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},w=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],D=0,x=d(function(y){if(y in E)return E[y];var h=E[y]=w[D];return D+=1,D>=w.length&&(D=0),h},"colours"),b=Zt,k=tt;function c(y){let h=y.datum(),A=new Set;h.forEach(M=>{M.size==0&&M.sets.length==1&&A.add(M.sets[0])}),h=h.filter(M=>!M.sets.some(F=>A.has(F)));let I={},R={};if(h.length>0){let M=b(h,{lossFunction:k,distinct:v});l&&(M=$t(M,r,g)),I=te(M,s,e,i,f),R=oe(I,h,S)}let U={};h.forEach(M=>{M.label&&(U[M.sets]=M.label)});function P(M){if(M.sets in U)return U[M.sets];if(M.sets.length==1)return""+M.sets[0]}d(P,"label"),y.selectAll("svg").data([I]).enter().append("svg");let V=y.select("svg");n?V.attr("viewBox",`0 0 ${s} ${e}`):V.attr("width",s).attr("height",e);let z={},C=!1;V.selectAll(".venn-area path").each(function(M){let F=this.getAttribute("d");M.sets.length==1&&F&&!v&&(C=!0,z[M.sets[0]]=Pe(F))});function T(M){return F=>{let et=M.sets.map(Z=>{let Y=z[Z],q=I[Z];return Y||(Y={x:s/2,y:e/2,radius:1}),q||(q={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+q.x*F,y:Y.y*(1-F)+q.y*F,radius:Y.radius*(1-F)+q.radius*F}});return Kt(et,m)}}d(T,"pathTween");let O=V.selectAll(".venn-area").data(h,M=>M.sets),B=O.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),N=B.append("path"),j=B.append("text").attr("class","label").text(M=>P(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(N.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:x(M.sets)).style("fill-opacity",".25"),j.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?x(M.sets):"#444"));function H(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}d(H,"asTransition");let L=y;C&&typeof L.transition=="function"?(L=H(y),L.selectAll("path").attrTween("d",T)):L.selectAll("path").attr("d",M=>Kt(M.sets.map(F=>I[F])),m);let _=L.selectAll("text").filter(M=>M.sets in R).text(M=>P(M)).attr("x",M=>Math.floor(R[M.sets].x)).attr("y",M=>Math.floor(R[M.sets].y));u&&(C?"on"in _?_.on("end",pt(I,P)):_.each("end",pt(I,P)):_.each(pt(I,P)));let X=H(O.exit()).remove();typeof O.transition=="function"&&X.selectAll("path").attrTween("d",T);let W=X.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(j.style("font-size","0px"),_.style("font-size",p),W.style("font-size","0px")),{circles:I,textCentres:R,nodes:O,enter:B,update:L,exit:X}}return d(c,"chart"),c.wrap=function(y){return arguments.length?(u=y,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(y){return arguments.length?(s=y,c):s},c.height=function(y){return arguments.length?(e=y,c):e},c.padding=function(y){return arguments.length?(i=y,c):i},c.distinct=function(y){return arguments.length?(v=y,c):v},c.colours=function(y){return arguments.length?(x=y,c):x},c.colors=function(y){return arguments.length?(x=y,c):x},c.fontSize=function(y){return arguments.length?(p=y,c):p},c.round=function(y){return arguments.length?(m=y,c):m},c.duration=function(y){return arguments.length?(o=y,c):o},c.layoutFunction=function(y){return arguments.length?(b=y,c):b},c.normalize=function(y){return arguments.length?(l=y,c):l},c.scaleToFit=function(y){return arguments.length?(f=y,c):f},c.styled=function(y){return arguments.length?(a=y,c):a},c.orientation=function(y){return arguments.length?(r=y,c):r},c.orientationOrder=function(y){return arguments.length?(g=y,c):g},c.lossFunction=function(y){return arguments.length?(k=y==="default"?tt:y==="logRatio"?Qt:y,c):k},c}d(se,"VennDiagram");function pt(t,n){return function(s){let e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3,u=r.pop(),a=[u],p=0,g=1.1;e.textContent=null;let v=[];function m(x){let b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=x,v.push(b),e.append(b),b}d(m,"append");let S=m(u);for(;u=r.pop(),!!u;){a.push(u);let x=a.join(" ");S.textContent=x,x.length>f&&S.getComputedTextLength()>i&&(a.pop(),S.textContent=a.join(" "),a=[u],S=m(u),p++)}let E=.35-p*g/2,w=e.getAttribute("x"),D=e.getAttribute("y");v.forEach((x,b)=>{x.setAttribute("x",w),x.setAttribute("y",D),x.setAttribute("dy",`${E+b*g}em`)})}}d(pt,"wrapText");function mt(t,n,s){let e=n[0].radius-G(n[0],t);for(let i=1;i<n.length;++i){let o=n[i].radius-G(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){let o=G(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}d(mt,"circleMargin");function ie(t,n,s){let e=[];for(let a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=mt(e[0],t,n);for(let a=1;a<e.length;++a){let p=mt(e[a],t,n);p>=o&&(i=e[a],o=p)}let r=Xt(a=>-1*mt({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]},f=!0;for(let a of t)if(G(l,a)>a.radius){f=!1;break}for(let a of n)if(G(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};let u={};return at(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?ie(t,[]):Yt(u.arcs.map(a=>a.p1))}d(ie,"computeTextCentre");function Le(t){let n={},s=Object.keys(t);for(let e of s)n[e]=[];for(let e=0;e<s.length;e++){let i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){let l=s[r],f=t[l],u=G(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}d(Le,"getOverlappingCircles");function oe(t,n,s){let e={},i=Le(t);for(let o=0;o<n.length;++o){let r=n[o].sets,l={},f={};for(let g=0;g<r.length;++g){l[r[g]]=!0;let v=i[r[g]];for(let m=0;m<v.length;++m)f[v[m]]=!0}let u=[],a=[];for(let g in t)g in l?u.push(t[g]):g in f||a.push(t[g]);let p=ie(u,a,s);e[r]=p,p.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}d(oe,"computeTextCentres");function Fe(t,n,s){let e=[];return e.push(`
|
|
29
|
+
M`,t,n),e.push(`
|
|
30
|
+
m`,-s,0),e.push(`
|
|
31
|
+
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
32
|
+
a`,s,s,0,1,0,-s*2,0),e.join(" ")}d(Fe,"circlePath");function Pe(t){let n=t.split(" ");return{x:Number.parseFloat(n[1]),y:Number.parseFloat(n[2]),radius:-Number.parseFloat(n[4])}}d(Pe,"circleFromPath");function re(t){if(t.length===0)return[];let n={};return at(t,n),n.arcs}d(re,"intersectionAreaArcs");function ae(t,n){if(t.length===0)return"M 0 0";let s=Math.pow(10,n||0),e=n!=null?o=>Math.round(o*s)/s:o=>o;if(t.length==1){let o=t[0].circle;return Fe(e(o.x),e(o.y),e(o.radius))}let i=[`
|
|
33
|
+
M`,e(t[0].p2.x),e(t[0].p2.y)];for(let o of t){let r=e(o.circle.radius);i.push(`
|
|
34
|
+
A`,r,r,0,o.large?1:0,o.sweep?1:0,e(o.p1.x),e(o.p1.y))}return i.join(" ")}d(ae,"arcsToPath");function Kt(t,n){return ae(re(t),n)}d(Kt,"intersectionAreaPath");function le(t,n={}){let{lossFunction:s,layoutFunction:e=Zt,normalize:i=!0,orientation:o=Math.PI/2,orientationOrder:r,width:l=600,height:f=350,padding:u=15,scaleToFit:a=!1,symmetricalTextCentre:p=!1,distinct:g,round:v=2}=n,m=e(t,{lossFunction:s==="default"||!s?tt:s==="logRatio"?Qt:s,distinct:g});i&&(m=$t(m,o,r));let S=te(m,l,f,u,a),E=oe(S,t,p),w=new Map(Object.keys(S).map(b=>[b,{set:b,x:S[b].x,y:S[b].y,radius:S[b].radius}])),D=t.map(b=>{let k=b.sets.map(h=>w.get(h)),c=re(k),y=ae(c,v);return{circles:k,arcs:c,path:y,area:b,has:new Set(b.sets)}});function x(b){let k="";for(let c of D)c.has.size>b.length&&b.every(y=>c.has.has(y))&&(k+=" "+c.path);return k}return d(x,"genDistinctPath"),D.map(({circles:b,arcs:k,path:c,area:y})=>({data:y,text:E[y.sets],circles:b,arcs:k,path:c,distinctPath:c+x(y.sets)}))}d(le,"layout");function qe(t){let n=new Map;for(let s of t){let e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}d(qe,"buildStyleByKey");var Ge=d((t,n,s,e)=>{let i=e.db,o=i.getConfig?.(),{themeVariables:r,look:l,handDrawnSeed:f}=it(),u=l==="handDrawn",a=[r.venn1,r.venn2,r.venn3,r.venn4,r.venn5,r.venn6,r.venn7,r.venn8].filter(Boolean),p=i.getDiagramTitle?.(),g=i.getSubsetData(),v=i.getTextData(),m=qe(i.getStyleData()),S=We(g),E=o?.width??800,w=o?.height??450,x=E/1600,b=p?48*x:0,k=r.primaryTextColor??r.textColor,c=Bt(n);c.attr("viewBox",`0 0 ${E} ${w}`),p&&c.append("text").text(p).attr("class","venn-title").attr("font-size",`${32*x}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*x).style("fill",r.vennTitleTextColor||r.titleColor);let y=ot(document.createElement("div")),h=se().width(E).height(w-b);y.datum(S).call(h);let A=u?Pt.svg(y.select("svg").node()):void 0,I=le(S,{width:E,height:w-b,padding:o?.padding??15}),R=new Map;for(let z of I){let C=Q([...z.data.sets].sort());R.set(C,z)}v.length>0&&Ue(o,R,y,v,x,m);let U=Tt(r.background||"#f4f4f4");y.selectAll(".venn-circle").each(function(z,C){let T=ot(this),B=Q([...z.sets].sort()),N=m.get(B),j=N?.fill||a[C%a.length]||r.primaryColor;T.classed(`venn-set-${C%8}`,!0);let H=N?.["fill-opacity"]??.1,L=N?.stroke||j,_=N?.["stroke-width"]||`${5*x}`;if(u&&A){let W=R.get(B);if(W&&W.circles.length>0){let M=W.circles[0],F=A.circle(M.x,M.y,M.radius*2,{roughness:.7,seed:f,fill:ct(j,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+C*60,stroke:L,strokeWidth:parseFloat(String(_))});T.select("path").remove(),T.node()?.insertBefore(F,T.select("text").node())}}else T.select("path").style("fill",j).style("fill-opacity",H).style("stroke",L).style("stroke-width",_).style("stroke-opacity",.95);let X=N?.color||(U?Et(j,30):_t(j,30));T.select("text").style("font-size",`${48*x}px`).style("fill",X)}),u&&A?y.selectAll(".venn-intersection").each(function(z){let C=ot(this),O=Q([...z.sets].sort()),B=m.get(O),N=B?.fill;if(N){let j=C.select("path"),H=j.attr("d");if(H){let L=A.path(H,{roughness:.7,seed:f,fill:ct(N,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),_=j.node();_?.parentNode?.insertBefore(L,_),j.remove()}}else C.select("path").style("fill-opacity",0);C.select("text").style("font-size",`${48*x}px`).style("fill",B?.color??r.vennSetTextColor??k)}):(y.selectAll(".venn-intersection text").style("font-size",`${48*x}px`).style("fill",z=>{let T=Q([...z.sets].sort());return m.get(T)?.color??r.vennSetTextColor??k}),y.selectAll(".venn-intersection path").style("fill-opacity",z=>{let T=Q([...z.sets].sort());return m.get(T)?.fill?1:0}).style("fill",z=>{let T=Q([...z.sets].sort());return m.get(T)?.fill??"transparent"}));let P=c.append("g").attr("transform",`translate(0, ${b})`),V=y.select("svg").node();if(V&&"childNodes"in V)for(let z of[...V.childNodes])P.node()?.appendChild(z);At(c,w,E,o?.useMaxWidth??!0)},"draw");function Q(t){return t.join("|")}d(Q,"stableSetsKey");function Ue(t,n,s,e,i,o){let r=t?.useDebugLayout??!1,f=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(let a of e){let p=Q(a.sets),g=u.get(p);g?g.push(a):u.set(p,[a])}for(let[a,p]of u.entries()){let g=n.get(a);if(!g?.text)continue;let v=g.text.x,m=g.text.y,S=Math.min(...g.circles.map(V=>V.radius)),E=Math.min(...g.circles.map(V=>V.radius-Math.hypot(v-V.x,m-V.y))),w=Number.isFinite(E)?Math.max(0,E):0;w===0&&Number.isFinite(S)&&(w=S*.6);let D=f.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);r&&D.append("circle").attr("class","venn-text-debug-circle").attr("cx",v).attr("cy",m).attr("r",w).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let x=Math.max(80*i,w*2*.95),b=Math.max(60*i,w*2*.95),y=(g.data.label&&g.data.label.length>0?Math.min(32*i,w*.25):0)+(p.length<=2?30*i:0),h=v-x/2,A=m-b/2+y,I=Math.max(1,Math.ceil(Math.sqrt(p.length))),R=Math.max(1,Math.ceil(p.length/I)),U=x/I,P=b/R;for(let[V,z]of p.entries()){let C=V%I,T=Math.floor(V/I),O=h+U*(C+.5),B=A+P*(T+.5);r&&D.append("rect").attr("class","venn-text-debug-cell").attr("x",h+U*C).attr("y",A+P*T).attr("width",U).attr("height",P).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);let N=U*.9,j=P*.9,H=D.append("foreignObject").attr("class","venn-text-node-fo").attr("width",N).attr("height",j).attr("x",O-N/2).attr("y",B-j/2).attr("overflow","visible"),L=o.get(z.id)?.color,_=H.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(z.label??z.id);L&&_.style("color",L)}}}d(Ue,"renderTextNodes");function We(t){let n=new Set(t.map(i=>[...i.sets].sort().join("|"))),s=new Map(t.filter(i=>i.sets.length===1&&i.size!==void 0).map(i=>[i.sets[0],i.size])),e=[];for(let i of t){if(i.sets.length<3)continue;let o=[...i.sets].sort();for(let r=0;r<o.length-1;r++)for(let l=r+1;l<o.length;l++){let f=[o[r],o[l]],u=f.join("|");if(!n.has(u)){n.add(u);let a=s.get(f[0]),p=s.get(f[1]),g=a!==void 0&&p!==void 0?Math.min(a,p)/4:2.5;e.push({sets:f,size:g,label:""})}}}return e.length>0?[...t,...e]:t}d(We,"ensurePairwiseSubsets");var ce={draw:Ge};var yn={parser:qt,db:Gt,renderer:ce,styles:Ut};export{yn as diagram};
|
package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/wardley-WFR3VGLG-D67OWCCH.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as r}from"./chunk-3SMGFRGC.mjs";import"./chunk-ZS6VBONO.mjs";import"./chunk-AQ6EADP3.mjs";export{e as WardleyModule,r as createWardleyServices};
|
package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/wardleyDiagram-U6YNM66N.mjs
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import{a as pt}from"./chunk-JQRUD6KW.mjs";import{a as ct}from"./chunk-5IQCK5RY.mjs";import"./chunk-JZGDI5JK.mjs";import"./chunk-OJINMHTS.mjs";import"./chunk-VQC2EELJ.mjs";import"./chunk-KD6SPIPN.mjs";import"./chunk-Q6NGPIAH.mjs";import"./chunk-RT4MAWR3.mjs";import"./chunk-YBMQ5JGJ.mjs";import"./chunk-GDY2UAB4.mjs";import"./chunk-3SMGFRGC.mjs";import"./chunk-3NPNU5GP.mjs";import"./chunk-TCEHX7R3.mjs";import"./chunk-5MVFYWFU.mjs";import"./chunk-SFMINX4W.mjs";import"./chunk-JFFVMJIA.mjs";import"./chunk-ZUNWM646.mjs";import"./chunk-ZS6VBONO.mjs";import{a as gt}from"./chunk-IJBDOHL6.mjs";import{o as Z}from"./chunk-VY2OSTJR.mjs";import"./chunk-STOV2HOB.mjs";import{O as rt,S as at,T as nt,U as ot,V as st,W as it,X as lt,Y as dt,_ as Y,h as tt,t as et}from"./chunk-QJSWEUOL.mjs";import{b as G}from"./chunk-H7VHZCWX.mjs";import{a as m}from"./chunk-AQ6EADP3.mjs";var j=m((n,a)=>{let e=n<=1?n*100:n;if(e<0||e>100)throw new Error(`${a} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${n}`);return e},"toPercent"),L=m((n,a,e)=>({x:j(a,`${e} evolution`),y:j(n,`${e} visibility`)}),"toCoordinates"),ut=m(n=>{if(n){if(n==="+<>")return"bidirectional";if(n==="+<")return"backward";if(n==="+>")return"forward"}},"getFlowFromPort"),$t=m(n=>{if(!n?.startsWith("+"))return{};let e=/^\+'([^']*)'/.exec(n)?.[1];return n.includes("<>")?{flow:"bidirectional",label:e}:n.includes("<")?{flow:"backward",label:e}:n.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Nt=m((n,a)=>{if(pt(n,a),n.size&&a.setSize(n.size.width,n.size.height),n.evolution){let e=n.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),u=n.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);a.updateAxes({stages:e,stageBoundaries:u})}if(n.anchors.forEach(e=>{let u=L(e.visibility,e.evolution,`Anchor "${e.name}"`);a.addNode(e.name,e.name,u.x,u.y,"anchor")}),n.components.forEach(e=>{let u=L(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,l=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,h=e.decorator?.strategy;a.addNode(e.name,e.name,u.x,u.y,"component",r,l,e.inertia,h)}),n.notes.forEach(e=>{let u=L(e.visibility,e.evolution,`Note "${e.text}"`);a.addNote(e.text,u.x,u.y)}),n.pipelines.forEach(e=>{let u=a.getNode(e.parent);if(!u||typeof u.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=u.y;a.startPipeline(e.parent),e.components.forEach(l=>{let h=`${e.parent}_${l.name}`,S=l.label?(l.label.negX?-1:1)*l.label.offsetX:void 0,y=l.label?(l.label.negY?-1:1)*l.label.offsetY:void 0,I=j(l.evolution,`Pipeline component "${l.name}" evolution`);a.addNode(h,l.name,I,r,"pipeline-component",S,y),a.addPipelineComponent(e.parent,h)})}),n.links.forEach(e=>{let u=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-.")),r=ut(e.fromPort)??ut(e.toPort),{flow:l,label:h}=$t(e.arrow);!r&&l&&(r=l);let S=e.linkLabel,y=h??S;a.addLink(a.resolveNodeId(e.from),a.resolveNodeId(e.to),u,y,r)}),n.evolves.forEach(e=>{let u=a.getNode(e.component);if(u?.y!==void 0){let r=j(e.target,`Evolve target for "${e.component}"`);a.addTrend(e.component,r,u.y)}}),n.annotations.length>0){let e=n.annotations[0],u=L(e.x,e.y,"Annotations box");a.setAnnotationsBox(u.x,u.y)}n.annotation.forEach(e=>{let u=L(e.x,e.y,`Annotation ${e.number}`);a.addAnnotation(e.number,[{x:u.x,y:u.y}],e.text)}),n.accelerators.forEach(e=>{let u=L(e.x,e.y,`Accelerator "${e.name}"`);a.addAccelerator(e.name,u.x,u.y)}),n.deaccelerators.forEach(e=>{let u=L(e.x,e.y,`Deaccelerator "${e.name}"`);a.addDeaccelerator(e.name,u.x,u.y)})},"populateDb"),U={parser:{yy:void 0},parse:m(async n=>{let a=await ct("wardley",n);G.debug(a);let e=U.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Nt(a,e)},"parse")};var q=class{constructor(){this.nodes=new Map;this.links=[];this.trends=new Map;this.pipelines=new Map;this.annotations=[];this.notes=[];this.accelerators=[];this.deaccelerators=[];this.axes={}}static{m(this,"WardleyBuilder")}addNode(a){let e=this.nodes.get(a.id)??{id:a.id,label:a.label},u={...e,...a,className:a.className??e.className,labelOffsetX:a.labelOffsetX??e.labelOffsetX,labelOffsetY:a.labelOffsetY??e.labelOffsetY};this.nodes.set(a.id,u)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let e=this.nodes.get(a);e&&(e.isPipelineParent=!0)}addPipelineComponent(a,e){let u=this.pipelines.get(a);u&&u.componentIds.push(e);let r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,e){this.annotationsBox={x:a,y:e}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,e){this.size={width:a,height:e}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[e,u]of this.nodes)if(u.label===a)return e;return a}build(){let a=[];for(let e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);a.push(e)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};var w=new q;function Mt(){return Y()["wardley-beta"]}m(Mt,"getConfig");function vt(n,a,e,u,r,l,h,S,y){w.addNode({id:n,label:a,x:e,y:u,className:r,labelOffsetX:l,labelOffsetY:h,inertia:S,sourceStrategy:y})}m(vt,"addNode");function Tt(n,a,e=!1,u,r){w.addLink({source:n,target:a,dashed:e,label:u,flow:r})}m(Tt,"addLink");function At(n,a,e){w.addTrend({nodeId:n,targetX:a,targetY:e})}m(At,"addTrend");function Lt(n,a,e){w.addAnnotation({number:n,coordinates:a,text:e})}m(Lt,"addAnnotation");function zt(n,a,e){w.addNote({text:n,x:a,y:e})}m(zt,"addNote");function Xt(n,a,e){w.addAccelerator({name:n,x:a,y:e})}m(Xt,"addAccelerator");function Bt(n,a,e){w.addDeaccelerator({name:n,x:a,y:e})}m(Bt,"addDeaccelerator");function Et(n,a){w.setAnnotationsBox(n,a)}m(Et,"setAnnotationsBox");function Dt(n,a){w.setSize(n,a)}m(Dt,"setSize");function Yt(n){w.startPipeline(n)}m(Yt,"startPipeline");function It(n,a){w.addPipelineComponent(n,a)}m(It,"addPipelineComponent");function Ot(n){w.setAxes(n)}m(Ot,"updateAxes");function Rt(n){return w.getNode(n)}m(Rt,"getNode");function Ft(n){return w.resolveNodeId(n)}m(Ft,"resolveNodeId");function Gt(){return w.build()}m(Gt,"getWardleyData");function jt(){w.clear(),at()}m(jt,"clear");var ft={getConfig:Mt,addNode:vt,addLink:Tt,addTrend:At,addAnnotation:Lt,addNote:zt,addAccelerator:Xt,addDeaccelerator:Bt,setAnnotationsBox:Et,setSize:Dt,startPipeline:Yt,addPipelineComponent:It,updateAxes:Ot,getNode:Rt,resolveNodeId:Ft,getWardleyData:Gt,clear:jt,setAccTitle:nt,getAccTitle:ot,setDiagramTitle:lt,getDiagramTitle:dt,getAccDescription:it,setAccDescription:st};var qt=["Genesis","Custom Built","Product","Commodity"],Ht=m(()=>{let{themeVariables:n}=Y();return{backgroundColor:n.wardley?.backgroundColor??n.background??"#fff",axisColor:n.wardley?.axisColor??"#000",axisTextColor:n.wardley?.axisTextColor??n.primaryTextColor??"#222",gridColor:n.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:n.wardley?.componentFill??"#fff",componentStroke:n.wardley?.componentStroke??"#000",componentLabelColor:n.wardley?.componentLabelColor??n.primaryTextColor??"#222",linkStroke:n.wardley?.linkStroke??"#000",evolutionStroke:n.wardley?.evolutionStroke??"#dc3545",annotationStroke:n.wardley?.annotationStroke??"#000",annotationTextColor:n.wardley?.annotationTextColor??n.primaryTextColor??"#222",annotationFill:n.wardley?.annotationFill??n.background??"#fff"}},"getTheme"),Vt=m(()=>{let n=Y()["wardley-beta"];return{width:n?.width??900,height:n?.height??600,padding:n?.padding??48,nodeRadius:n?.nodeRadius??6,nodeLabelOffset:n?.nodeLabelOffset??8,axisFontSize:n?.axisFontSize??12,labelFontSize:n?.labelFontSize??10,showGrid:n?.showGrid??!1,useMaxWidth:n?.useMaxWidth??!0}},"getConfigValues"),_t=m((n,a,e,u)=>{G.debug(`Rendering Wardley map
|
|
2
|
+
`+n);let r=Vt(),l=Ht(),h=r.nodeRadius*1.6,S=u.db,y=S.getWardleyData(),I=S.getDiagramTitle(),$=y.size?.width??r.width,k=y.size?.height??r.height,X=gt(a);X.selectAll("*").remove(),rt(X,k,$,r.useMaxWidth),X.attr("viewBox",`0 0 ${$} ${k}`);let W=X.append("g").attr("class","wardley-map"),H=X.append("defs");H.append("marker").attr("id",`arrow-${a}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.evolutionStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-end-${a}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.linkStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-start-${a}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",l.linkStroke).attr("stroke","none"),W.append("rect").attr("class","wardley-background").attr("width",$).attr("height",k).attr("fill",l.backgroundColor);let B=$-r.padding*2,E=k-r.padding*2;I&&W.append("text").attr("class","wardley-title").attr("x",$/2).attr("y",r.padding/2).attr("fill",l.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(I);let v=m(t=>r.padding+t/100*B,"projectX"),T=m(t=>k-r.padding-t/100*E,"projectY"),O=W.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",$-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",l.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",l.axisColor).attr("stroke-width",1);let mt=y.axes.xLabel??"Evolution",ht=y.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+B/2).attr("y",k-r.padding/4).attr("fill",l.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(mt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+E/2).attr("fill",l.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+E/2})`).text(ht);let D=y.axes.stages&&y.axes.stages.length>0?y.axes.stages:qt;if(D.length>0){let t=W.append("g").attr("class","wardley-stages"),s=y.axes.stageBoundaries,o=[];if(s&&s.length===D.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{let i=1/D.length;D.forEach((p,d)=>{o.push({start:d*i,end:(d+1)*i})})}D.forEach((i,p)=>{let d=o[p],g=r.padding+d.start*B,f=r.padding+d.end*B,x=(g+f)/2;p>0&&t.append("line").attr("x1",g).attr("x2",g).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",x).attr("y",k-r.padding/1.5).attr("fill",l.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){let t=W.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){let o=s/4,i=r.padding+B*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",$-r.padding).attr("y1",k-r.padding-E*o).attr("y2",k-r.padding-E*o).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6")}}let c=new Map;if(y.nodes.forEach(t=>{c.set(t.id,{x:v(t.x),y:T(t.y),node:t})}),y.pipelines.length>0){let t=W.append("g").attr("class","wardley-pipelines"),s=W.append("g").attr("class","wardley-pipeline-links");y.pipelines.forEach(o=>{if(o.componentIds.length===0)return;let i=o.componentIds.map(f=>({id:f,pos:c.get(f),node:y.nodes.find(x=>x.id===f)})).filter(f=>f.pos&&f.node).sort((f,x)=>f.node.x-x.node.x);for(let f=0;f<i.length-1;f++){let x=i[f],b=i[f+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",x.pos.x).attr("y1",x.pos.y).attr("x2",b.pos.x).attr("y2",b.pos.y).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,d=-1/0,g=0;if(o.componentIds.forEach(f=>{let x=c.get(f);x&&(p=Math.min(p,x.x),d=Math.max(d,x.x),g=x.y)}),p!==1/0&&d!==-1/0){let x=r.nodeRadius*4,b=g-x/2,P=c.get(o.nodeId);if(P){let M=(p+d)/2;P.x=M,P.y=b-h/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",b).attr("width",d-p+30).attr("height",x).attr("fill","none").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let J=W.append("g").attr("class","wardley-links"),K=new Map;y.pipelines.forEach(t=>{K.set(t.nodeId,new Set(t.componentIds))});let Q=y.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||K.get(t.target)?.has(t.source)));J.selectAll("line").data(Q).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{let s=c.get(t.source),o=c.get(t.target),p=y.nodes.find(x=>x.id===t.source).isPipelineParent?h/Math.sqrt(2):r.nodeRadius,d=o.x-s.x,g=o.y-s.y,f=Math.sqrt(d*d+g*g);return s.x+d/f*p}).attr("y1",t=>{let s=c.get(t.source),o=c.get(t.target),p=y.nodes.find(x=>x.id===t.source).isPipelineParent?h/Math.sqrt(2):r.nodeRadius,d=o.x-s.x,g=o.y-s.y,f=Math.sqrt(d*d+g*g);return s.y+g/f*p}).attr("x2",t=>{let s=c.get(t.source),o=c.get(t.target),p=y.nodes.find(x=>x.id===t.target).isPipelineParent?h/Math.sqrt(2):r.nodeRadius,d=s.x-o.x,g=s.y-o.y,f=Math.sqrt(d*d+g*g);return o.x+d/f*p}).attr("y2",t=>{let s=c.get(t.source),o=c.get(t.target),p=y.nodes.find(x=>x.id===t.target).isPipelineParent?h/Math.sqrt(2):r.nodeRadius,d=s.x-o.x,g=s.y-o.y,f=Math.sqrt(d*d+g*g);return o.y+g/f*p}).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${a})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${a})`:null),J.selectAll("text").data(Q.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{let s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,d=o.x-s.x,g=Math.sqrt(d*d+p*p),f=8,x=p/g;return i+x*f}).attr("y",t=>{let s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,d=o.y-s.y,g=Math.sqrt(p*p+d*d),f=8,x=-p/g;return i+x*f}).attr("fill",l.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{let s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,d=o.x-s.x,g=o.y-s.y,f=Math.sqrt(d*d+g*g),x=8,b=g/f,P=-d/f,M=i+b*x,R=p+P*x,z=Math.atan2(g,d)*180/Math.PI;return(z>90||z<-90)&&(z+=180),`rotate(${z} ${M} ${R})`}).text(t=>t.label);let bt=W.append("g").attr("class","wardley-trends"),wt=y.trends.map(t=>{let s=c.get(t.nodeId);if(!s)return null;let o=v(t.targetX),i=T(t.targetY),p=o-s.x,d=i-s.y,g=Math.sqrt(p*p+d*d),f=r.nodeRadius+2,x=g>f?o-p/g*f:o,b=g>f?i-d/g*f:i;return{origin:s,targetX:o,targetY:i,adjustedX2:x,adjustedY2:b}}).filter(t=>t!==null);bt.selectAll("line").data(wt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",l.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${a})`);let N=W.append("g").attr("class","wardley-nodes").selectAll("g").data(y.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));N.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",l.componentStroke).attr("stroke-width",1),N.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",l.componentStroke).attr("stroke-width",1),N.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let A=N.filter(t=>t.sourceStrategy==="market");A.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),N.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1);let V=r.nodeRadius*.7,C=r.nodeRadius*1.2;if(A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-C).attr("x2",t=>c.get(t.id).x-C*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+C*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-C*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+C*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+C*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+C*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+C*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+C*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-C).attr("stroke",l.componentStroke).attr("stroke-width",1),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-C).attr("r",V).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-C*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+C*Math.sin(Math.PI/6)).attr("r",V).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+C*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+C*Math.sin(Math.PI/6)).attr("r",V).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),N.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-h/2).attr("y",t=>c.get(t.id).y-h/2).attr("width",h).attr("height",h).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1),N.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{let s=c.get(t.id),o=t.isPipelineParent?h/2+15:r.nodeRadius+15;return t.sourceStrategy&&(o+=r.nodeRadius+10),s.x+o}).attr("y1",t=>{let s=c.get(t.id),o=t.isPipelineParent?h:r.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{let s=c.get(t.id),o=t.isPipelineParent?h/2+15:r.nodeRadius+15;return t.sourceStrategy&&(o+=r.nodeRadius+10),s.x+o}).attr("y2",t=>{let s=c.get(t.id),o=t.isPipelineParent?h:r.nodeRadius*2;return s.y+o/2}).attr("stroke",l.componentStroke).attr("stroke-width",6),N.append("text").attr("x",t=>{let s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);let i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{let s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);let i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?l.evolutionStroke:t.className==="anchor"?"#000":l.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),y.annotations.length>0){let t=W.append("g").attr("class","wardley-annotations");if(y.annotations.forEach(s=>{let o=s.coordinates.map(i=>({x:v(i.x),y:T(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{let p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(s.number)})}),y.annotationsBox){let s=v(y.annotationsBox.x),o=T(y.annotationsBox.y),i=10,p=16,d=11,g=t.append("g").attr("class","wardley-annotations-box"),f=[...y.annotations].filter(b=>b.text).sort((b,P)=>b.number-P.number),x=[];if(f.forEach((b,P)=>{let M=g.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",d).attr("fill",l.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${b.number}. ${b.text}`);x.push(M)}),x.length>0){let b=0,P=0;x.forEach(_=>{let F=_.node(),Pt=F.getComputedTextLength();b=Math.max(b,Pt);let St=F.getBBox();P=Math.max(P,St.height)});let M=b+i*2+105,R=f.length*p+i*2+P/2,z=r.padding,kt=$-r.padding-M,Ct=r.padding,Wt=k-r.padding-R;s=Math.max(z,Math.min(s,kt)),o=Math.max(Ct,Math.min(o,Wt)),x.forEach((_,F)=>{_.attr("x",s+i).attr("y",o+i+(F+1)*p)}),g.insert("rect","text").attr("x",s).attr("y",o).attr("width",M).attr("height",R).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(y.notes.length>0){let t=W.append("g").attr("class","wardley-notes");y.notes.forEach(s=>{let o=v(s.x),i=T(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",l.axisTextColor).attr("font-weight","bold").text(s.text)})}if(y.accelerators.length>0){let t=W.append("g").attr("class","wardley-accelerators");y.accelerators.forEach(s=>{let o=v(s.x),i=T(s.y),p=60,d=30,g=20,f=`
|
|
3
|
+
M ${o} ${i-d/2}
|
|
4
|
+
L ${o+p-g} ${i-d/2}
|
|
5
|
+
L ${o+p-g} ${i-d/2-8}
|
|
6
|
+
L ${o+p} ${i}
|
|
7
|
+
L ${o+p-g} ${i+d/2+8}
|
|
8
|
+
L ${o+p-g} ${i+d/2}
|
|
9
|
+
L ${o} ${i+d/2}
|
|
10
|
+
Z
|
|
11
|
+
`;t.append("path").attr("d",f).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+p/2).attr("y",i+d/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(s.name)})}if(y.deaccelerators.length>0){let t=W.append("g").attr("class","wardley-deaccelerators");y.deaccelerators.forEach(s=>{let o=v(s.x),i=T(s.y),p=60,d=30,g=20,f=`
|
|
12
|
+
M ${o+p} ${i-d/2}
|
|
13
|
+
L ${o+g} ${i-d/2}
|
|
14
|
+
L ${o+g} ${i-d/2-8}
|
|
15
|
+
L ${o} ${i}
|
|
16
|
+
L ${o+g} ${i+d/2+8}
|
|
17
|
+
L ${o+g} ${i+d/2}
|
|
18
|
+
L ${o+p} ${i+d/2}
|
|
19
|
+
Z
|
|
20
|
+
`;t.append("path").attr("d",f).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+p/2).attr("y",i+d/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(s.name)})}},"draw"),yt={draw:_t};var xt=m(({wardley:n}={})=>{let a=tt(),e=et(),u=Z(a,e.themeVariables),r=Z(u.wardley,n);return`
|
|
21
|
+
.wardley-background {
|
|
22
|
+
fill: ${r.backgroundColor};
|
|
23
|
+
}
|
|
24
|
+
.wardley-axes line, .wardley-axes path {
|
|
25
|
+
stroke: ${r.axisColor};
|
|
26
|
+
}
|
|
27
|
+
.wardley-axis-label {
|
|
28
|
+
fill: ${r.axisTextColor};
|
|
29
|
+
}
|
|
30
|
+
.wardley-stage-label {
|
|
31
|
+
fill: ${r.axisTextColor};
|
|
32
|
+
}
|
|
33
|
+
.wardley-grid line {
|
|
34
|
+
stroke: ${r.gridColor};
|
|
35
|
+
}
|
|
36
|
+
.wardley-node circle {
|
|
37
|
+
fill: ${r.componentFill};
|
|
38
|
+
stroke: ${r.componentStroke};
|
|
39
|
+
}
|
|
40
|
+
.wardley-node-label {
|
|
41
|
+
fill: ${r.componentLabelColor};
|
|
42
|
+
}
|
|
43
|
+
.wardley-link {
|
|
44
|
+
stroke: ${r.linkStroke};
|
|
45
|
+
}
|
|
46
|
+
.wardley-link--dashed {
|
|
47
|
+
stroke-dasharray: 4 4;
|
|
48
|
+
}
|
|
49
|
+
.wardley-link-label {
|
|
50
|
+
fill: ${r.axisTextColor};
|
|
51
|
+
}
|
|
52
|
+
.wardley-trend line {
|
|
53
|
+
stroke: ${r.evolutionStroke};
|
|
54
|
+
}
|
|
55
|
+
.wardley-annotation-line {
|
|
56
|
+
stroke: ${r.annotationStroke};
|
|
57
|
+
}
|
|
58
|
+
.wardley-annotation circle {
|
|
59
|
+
fill: ${r.annotationFill};
|
|
60
|
+
stroke: ${r.annotationStroke};
|
|
61
|
+
}
|
|
62
|
+
.wardley-annotation text {
|
|
63
|
+
fill: ${r.annotationTextColor};
|
|
64
|
+
}
|
|
65
|
+
.wardley-annotations-box rect {
|
|
66
|
+
fill: ${r.annotationFill};
|
|
67
|
+
stroke: ${r.annotationStroke};
|
|
68
|
+
}
|
|
69
|
+
.wardley-annotations-box text {
|
|
70
|
+
fill: ${r.annotationTextColor};
|
|
71
|
+
}
|
|
72
|
+
.wardley-pipeline-box {
|
|
73
|
+
stroke: ${r.componentStroke};
|
|
74
|
+
}
|
|
75
|
+
.wardley-notes text {
|
|
76
|
+
fill: ${r.axisTextColor};
|
|
77
|
+
}
|
|
78
|
+
`},"styles");var We={parser:U,db:ft,renderer:yt,styles:xt};export{We as diagram};
|
package/neural-interface/public/vendor/mermaid/chunks/mermaid.esm.min/xychartDiagram-XJAZEDNM.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as Kt}from"./chunk-IJBDOHL6.mjs";import{c as qt}from"./chunk-DZP67EKU.mjs";import"./chunk-2NMSUPJH.mjs";import{o as Rt}from"./chunk-VY2OSTJR.mjs";import"./chunk-STOV2HOB.mjs";import{A as Wt,O as Ft,S as Nt,T as jt,U as Gt,V as Ht,W as $t,X as Ut,Y as Tt,h as zt,j as Ot,t as ct}from"./chunk-QJSWEUOL.mjs";import{H as kt,b as ht,n as wt,o as St}from"./chunk-H7VHZCWX.mjs";import{a as s}from"./chunk-AQ6EADP3.mjs";var _t=(function(){var i=s(function(Y,l,c,p){for(c=c||{},p=Y.length;p--;c[Y[p]]=l);return c},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],a=[1,3],n=[1,5],r=[1,6],h=[1,7],b=[1,5,10,12,14,16,18,19,21,23,36,37,38],x=[1,25],d=[1,26],S=[1,28],k=[1,29],P=[1,30],V=[1,31],z=[1,32],E=[1,33],O=[1,34],W=[1,35],F=[1,36],y=[1,37],L=[1,43],g=[1,42],j=[1,47],B=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],G=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],_=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],K=[1,65],w=[26,28],C={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:s(function(l,c,p,u,D,o,$){var m=o.length-1;switch(D){case 5:u.setOrientation(o[m]);break;case 9:u.setDiagramTitle(o[m].text.trim());break;case 12:u.setLineData({text:"",type:"text"},o[m]);break;case 13:u.setLineData(o[m-1],o[m]);break;case 14:u.setBarData({text:"",type:"text"},o[m]);break;case 15:u.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),u.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:u.setXAxisTitle(o[m]);break;case 25:u.setXAxisTitle(o[m-1]);break;case 26:u.setXAxisTitle({type:"text",text:""});break;case 27:u.setXAxisBand(o[m]);break;case 28:u.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:u.setYAxisTitle(o[m]);break;case 33:u.setYAxisTitle(o[m-1]);break;case 34:u.setYAxisTitle({type:"text",text:""});break;case 35:u.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:a,36:n,37:r,38:h}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:a,36:n,37:r,38:h}),i(t,e,{4:2,7:4,6:9,3:10,5:a,8:[1,11],36:n,37:r,38:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(b,[2,36]),i(b,[2,37]),i(b,[2,38]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:a,36:n,37:r,38:h}),{1:[2,3]},i(b,[2,5]),i(t,[2,7],{4:22,36:n,37:r,38:h}),{11:23,30:x,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},{11:39,13:38,24:L,29:g,30:x,31:40,32:41,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},{11:45,15:44,29:j,30:x,35:46,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},{11:49,17:48,24:B,30:x,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},{11:52,17:51,24:B,30:x,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},{20:[1,53]},{22:[1,54]},i(A,[2,18]),{1:[2,2]},i(A,[2,8]),i(A,[2,9]),i(G,[2,39],{41:55,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y}),i(G,[2,40]),i(G,[2,41]),i(_,[2,42]),i(_,[2,44]),i(_,[2,45]),i(_,[2,46]),i(_,[2,47]),i(_,[2,48]),i(_,[2,49]),i(_,[2,50]),i(_,[2,51]),i(_,[2,52]),i(_,[2,53]),i(A,[2,10]),i(A,[2,24],{32:41,31:56,24:L,29:g}),i(A,[2,26]),i(A,[2,27]),{33:[1,57]},{11:59,30:x,34:58,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},i(A,[2,11]),i(A,[2,32],{35:60,29:j}),i(A,[2,34]),{33:[1,61]},i(A,[2,12]),{17:62,24:B},{25:63,27:64,29:K},i(A,[2,14]),{17:66,24:B},i(A,[2,16]),i(A,[2,17]),i(_,[2,43]),i(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},i(A,[2,33]),{29:[1,70]},i(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},i(w,[2,23],{30:[1,73]}),i(A,[2,15]),i(A,[2,28]),i(A,[2,29]),{11:59,30:x,34:74,39:24,40:d,41:27,42:S,43:k,44:P,45:V,46:z,47:E,48:O,49:W,50:F,51:y},i(A,[2,35]),i(A,[2,19]),{25:75,27:64,29:K},i(w,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:s(function(l,c){if(c.recoverable)this.trace(l);else{var p=new Error(l);throw p.hash=c,p}},"parseError"),parse:s(function(l){var c=this,p=[0],u=[],D=[null],o=[],$=this.table,m="",ot=0,It=0,Bt=0,ge=2,Mt=1,pe=o.slice.call(arguments,1),R=Object.create(this.lexer),U={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&(U.yy[bt]=this.yy[bt]);R.setInput(l,U.yy),U.yy.lexer=R,U.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var yt=R.yylloc;o.push(yt);var ue=R.options&&R.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xe(X){p.length=p.length-2*X,D.length=D.length-X,o.length=o.length-X}s(Xe,"popStack");function xe(){var X;return X=u.pop()||R.lex()||Mt,typeof X!="number"&&(X instanceof Array&&(u=X,X=u.pop()),X=c.symbols_[X]||X),X}s(xe,"lex");for(var v,Ct,q,I,Ye,At,Q={},rt,N,Vt,lt;;){if(q=p[p.length-1],this.defaultActions[q]?I=this.defaultActions[q]:((v===null||typeof v>"u")&&(v=xe()),I=$[q]&&$[q][v]),typeof I>"u"||!I.length||!I[0]){var Dt="";lt=[];for(rt in $[q])this.terminals_[rt]&&rt>ge&<.push("'"+this.terminals_[rt]+"'");R.showPosition?Dt="Parse error on line "+(ot+1)+`:
|
|
2
|
+
`+R.showPosition()+`
|
|
3
|
+
Expecting `+lt.join(", ")+", got '"+(this.terminals_[v]||v)+"'":Dt="Parse error on line "+(ot+1)+": Unexpected "+(v==Mt?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(Dt,{text:R.match,token:this.terminals_[v]||v,line:R.yylineno,loc:yt,expected:lt})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+v);switch(I[0]){case 1:p.push(v),D.push(R.yytext),o.push(R.yylloc),p.push(I[1]),v=null,Ct?(v=Ct,Ct=null):(It=R.yyleng,m=R.yytext,ot=R.yylineno,yt=R.yylloc,Bt>0&&Bt--);break;case 2:if(N=this.productions_[I[1]][1],Q.$=D[D.length-N],Q._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},ue&&(Q._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),At=this.performAction.apply(Q,[m,It,ot,U.yy,I[1],D,o].concat(pe)),typeof At<"u")return At;N&&(p=p.slice(0,-1*N*2),D=D.slice(0,-1*N),o=o.slice(0,-1*N)),p.push(this.productions_[I[1]][0]),D.push(Q.$),o.push(Q._$),Vt=$[p[p.length-2]][p[p.length-1]],p.push(Vt);break;case 3:return!0}}return!0},"parse")},M=(function(){var Y={EOF:1,parseError:s(function(c,p){if(this.yy.parser)this.yy.parser.parseError(c,p);else throw new Error(c)},"parseError"),setInput:s(function(l,c){return this.yy=c||this.yy||{},this._input=l,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:s(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var c=l.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:s(function(l){var c=l.length,p=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var u=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),p.length-1&&(this.yylineno-=p.length-1);var D=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:p?(p.length===u.length?this.yylloc.first_column:0)+u[u.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(l){this.unput(this.match.slice(l))},"less"),pastInput:s(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var l=this.pastInput(),c=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:s(function(l,c){var p,u,D;if(this.options.backtrack_lexer&&(D={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&&(D.yylloc.range=this.yylloc.range.slice(0))),u=l[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var o in D)this[o]=D[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,c,p,u;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),o=0;o<D.length;o++)if(p=this._input.match(this.rules[D[o]]),p&&(!c||p[0].length>c[0].length)){if(c=p,u=o,this.options.backtrack_lexer){if(l=this.test_match(p,D[o]),l!==!1)return l;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(l=this.test_match(c,D[u]),l!==!1?l:!1):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:s(function(){var c=this.next();return c||this.lex()},"lex"),begin:s(function(c){this.conditionStack.push(c)},"begin"),popState:s(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:s(function(c){this.begin(c)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(c,p,u,D){var o=D;switch(u){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return Y})();C.lexer=M;function T(){this.yy={}}return s(T,"Parser"),T.prototype=C,C.Parser=T,new T})();_t.parser=_t;var Qt=_t;function et(i){return i.type==="bar"}s(et,"isBarPlot");function it(i){return i.type==="band"}s(it,"isBandAxisData");function Z(i){return i.type==="linear"}s(Z,"isLinearAxisData");var H=class{constructor(t){this.parentGroup=t}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((r,h)=>Math.max(h.length,r),0)*e,height:e};let a={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(let r of t){let h=qt(n,1,r),b=h?h.width:r.length*e,x=h?h.height:e;a.width=Math.max(a.width,b),a.height=Math.max(a.height,x)}return n.remove(),a}};var J=class{constructor(t,e,a,n){this.axisConfig=t;this.title=e;this.textDimensionCalculator=a;this.axisThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.normalizedLabelRotationInRad=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{s(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let a=this.getLabelDimension(),n=.2*t.width;this.outerPadding=Math.min(a.width/2,n);let r=a.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(r=Math.max(r,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*a.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*a.height))),r+=this.axisConfig.labelPadding*2,this.labelTextHeight=a.height,r<=e&&(e-=r,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=a.height+this.axisConfig.titlePadding*2;this.titleTextHeight=a.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let a=this.getLabelDimension(),n=.2*t.height;this.outerPadding=Math.min(a.height/2,n);let r=a.width+this.axisConfig.labelPadding*2;r<=e&&(e-=r,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=a.height+this.axisConfig.titlePadding*2;this.titleTextHeight=a.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let e=this.normalizedLabelRotationInRad;return e===0?0:Math.sin(e)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${e},${this.getScaleValue(a)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${e} L ${this.getScaleValue(a)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}};var gt=class extends J{static{s(this,"BandAxis")}constructor(t,e,a,n,r){super(t,n,r,e),this.categories=a,this.scale=wt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=wt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),ht.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}};var pt=class extends J{static{s(this,"LinearAxis")}constructor(t,e,a,n,r){super(t,n,r,e),this.domain=a,this.scale=St().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=St().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function Pt(i,t,e,a){let n=new H(a);return it(i)?new gt(t,e,i.categories,i.title,n):new pt(t,e,[i.min,i.max],i.title,n)}s(Pt,"getAxis");var vt=class{constructor(t,e,a,n){this.textDimensionCalculator=t;this.chartConfig=e;this.chartData=a;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),a=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=a&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=a,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Zt(i,t,e,a){let n=new H(a);return new vt(n,i,t,e)}s(Zt,"getChartTitleComponent");var me=.75,de=.5,fe=.35;function Jt(i){return{fontSize:i,markerSize:i*me,markerSpacing:i*fe,itemSpacing:i*de}}s(Jt,"getLegendLayout");var Et=class{constructor(t,e,a,n){this.textDimensionCalculator=t;this.chartConfig=e;this.chartData=a;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0};this.visiblePlots=[]}static{s(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(d=>d.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:e,markerSize:a,markerSpacing:n,itemSpacing:r}=Jt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(d=>d.title),e),b=this.chartConfig.legendPadding*2+a+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*e+(this.visiblePlots.length-1)*r;return b<=t.width&&x<=t.height?(this.boundingRect.width=b,this.boundingRect.height=x):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:e,markerSpacing:a,itemSpacing:n}=Jt(this.chartConfig.legendFontSize),r=t+n,h=this.boundingRect.x+this.chartConfig.legendPadding,b=this.boundingRect.y+this.chartConfig.legendPadding,x=[],d=[];for(let[S,k]of this.visiblePlots.entries())if(et(k))x.push({x:h,y:b+S*r,width:e,height:e,fill:k.fill,strokeFill:k.fill,strokeWidth:0});else{let P=b+S*r+e/2;d.push({path:`M ${h},${P} L ${h+e},${P}`,strokeFill:k.strokeFill,strokeWidth:k.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:d},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,k)=>({text:S.title,x:h+e+a,y:b+k*r+e/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function te(i,t,e,a){let n=new H(a);return new Et(n,i,t,e)}s(te,"getChartLegendComponent");var ut=class{constructor(t,e,a,n,r){this.plotData=t;this.xAxis=e;this.yAxis=a;this.orientation=n;this.plotIndex=r}static{s(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),e;if(this.orientation==="horizontal"?e=kt().y(n=>n[0]).x(n=>n[1])(t):e=kt().x(n=>n[0]).y(n=>n[1])(t),!e)return[];let a=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[b,[x,d]]of t.entries()){let S=this.plotData.pointLabels[b];S&&(this.orientation==="horizontal"?h.push({x:d+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):h.push({x,y:d-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}h.length>0&&a.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return a}};var xt=class{constructor(t,e,a,n,r,h){this.barData=t;this.boundingRect=e;this.xAxis=a;this.yAxis=n;this.orientation=r;this.plotIndex=h}static{s(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(r=>[this.xAxis.getScaleValue(r[0]),this.yAxis.getScaleValue(r[1])]),a=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=a/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(r=>({x:this.boundingRect.x,y:r[0]-n,height:a,width:r[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(r=>({x:r[0]-n,y:r[1],width:a,height:this.boundingRect.y+this.boundingRect.height-r[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}};var Lt=class{constructor(t,e,a){this.chartConfig=t;this.chartData=e;this.chartThemeConfig=a;this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[e,a]of this.chartData.plots.entries())switch(a.type){case"line":{let n=new ut(a,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{let n=new xt(a,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break}return t}};function ee(i,t,e){return new Lt(i,t,e)}s(ee,"getPlotComponent");var mt=class{constructor(t,e,a,n){this.chartConfig=t;this.chartData=e;this.componentStore={title:Zt(t,e,a,n),plot:ee(t,e,a),legend:te(t,e,a,n),xAxis:Pt(e.xAxis,t.xAxis,{titleColor:a.xAxisTitleColor,labelColor:a.xAxisLabelColor,tickColor:a.xAxisTickColor,axisLineColor:a.xAxisLineColor},n),yAxis:Pt(e.yAxis,t.yAxis,{titleColor:a.yAxisTitleColor,labelColor:a.yAxisLabelColor,tickColor:a.yAxisTickColor,axisLineColor:a.yAxisLineColor},n)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,a=0,n=0,r={width:0,height:0},h=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),b=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:b});t-=x.width,e-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=x.height,e-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:t,height:e}),a=x.width,t-=x.width,r=this.componentStore.legend.calculateSpace({width:t,height:b}),t-=r.width,t>0&&(h+=t,t=0),e>0&&(b+=e,e=0),this.componentStore.plot.calculateSpace({width:h,height:b}),this.componentStore.plot.setBoundingBoxXY({x:a,y:n}),this.componentStore.legend.setBoundingBoxXY({x:a+h,y:n+Math.max((b-r.height)/2,0)}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:a,y:n+b}),this.componentStore.yAxis.setRange([n,n+b]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(d=>et(d))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,a=0,n=0,r=0,h={width:0,height:0},b=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),d=this.componentStore.plot.calculateSpace({width:b,height:x});t-=d.width,e-=d.height,d=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),a=d.height,e-=d.height,this.componentStore.xAxis.setAxisPosition("left"),d=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=d.width,n=d.width,this.componentStore.yAxis.setAxisPosition("top"),d=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=d.height,r=a+d.height,h=this.componentStore.legend.calculateSpace({width:t,height:x}),t-=h.width,t>0&&(b+=t,t=0),e>0&&(x+=e,e=0),this.componentStore.plot.calculateSpace({width:b,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.legend.setBoundingBoxXY({x:n+b,y:r+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+b]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:a}),this.componentStore.xAxis.setRange([r,r+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(S=>et(S))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}};var dt=class{static{s(this,"XYChartBuilder")}static build(t,e,a,n){return new mt(t,e,a,n).getDrawableElement()}};var at=0,ie,nt=ne(),st=ae(),f=se(),Xt=st.plotColorPalette.split(",").map(i=>i.trim()),ft=!1,Yt=!1;function ae(){let i=zt(),t=ct();return Rt(i.xyChart,t.themeVariables.xyChart)}s(ae,"getChartDefaultThemeConfig");function ne(){let i=ct();return Rt(Ot.xyChart,i.xyChart)}s(ne,"getChartDefaultConfig");function se(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}s(se,"getChartDefaultData");function tt(i){let t=ct();return Wt(i.trim(),t)}s(tt,"textSanitizer");function be(i){ie=i}s(be,"setTmpSVGG");function ye(i){i==="horizontal"?nt.chartOrientation="horizontal":nt.chartOrientation="vertical"}s(ye,"setOrientation");function Ce(i){f.xAxis.title=tt(i.text)}s(Ce,"setXAxisTitle");function oe(i,t){f.xAxis={type:"linear",title:f.xAxis.title,min:i,max:t},ft=!0}s(oe,"setXAxisRangeData");function Ae(i){f.xAxis={type:"band",title:f.xAxis.title,categories:i.map(t=>tt(t.text))},ft=!0}s(Ae,"setXAxisBand");function De(i){f.yAxis.title=tt(i.text)}s(De,"setYAxisTitle");function Te(i,t){f.yAxis={type:"linear",title:f.yAxis.title,min:i,max:t},Yt=!0}s(Te,"setYAxisRangeData");function we(i){let t=Math.min(...i),e=Math.max(...i),a=Z(f.yAxis)?f.yAxis.min:1/0,n=Z(f.yAxis)?f.yAxis.max:-1/0;f.yAxis={type:"linear",title:f.yAxis.title,min:Math.min(a,t),max:Math.max(n,e)}}s(we,"setYAxisRangeFromPlotData");function re(i){let t=[];if(i.length===0)return t;if(!ft){let e=Z(f.xAxis)?f.xAxis.min:1/0,a=Z(f.xAxis)?f.xAxis.max:-1/0;oe(Math.min(e,1),Math.max(a,i.length))}if(it(f.xAxis)&&i.length>f.xAxis.categories.length&&(i=i.slice(0,f.xAxis.categories.length)),Yt||we(i),it(f.xAxis)&&(t=f.xAxis.categories.map((e,a)=>[e,i[a]])),Z(f.xAxis)){let e=f.xAxis.min,a=f.xAxis.max;if(i.length===1)t=[[`${e}`,i[0]]];else{let n=(a-e)/(i.length-1);t=i.map((r,h)=>[`${e+h*n}`,r])}}return t}s(re,"transformDataWithoutCategory");function le(i){return Xt[i===0?0:i%Xt.length]}s(le,"getPlotColorFromPalette");function Se(i,t){let e=t.map(h=>h.value),a=t.map(h=>h.label?tt(h.label):""),n=re(e),r=a.some(h=>h!=="");f.plots.push({type:"line",title:tt(i.text),strokeFill:le(at),strokeWidth:2,data:n,...r?{pointLabels:a}:{}}),at++}s(Se,"setLineData");function ke(i,t){let e=t.map(n=>n.value),a=re(e);f.plots.push({type:"bar",title:tt(i.text),fill:le(at),data:a}),at++}s(ke,"setBarData");function Re(){if(f.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return f.title=Tt(),dt.build(nt,f,st,ie)}s(Re,"getDrawableElem");function _e(){return st}s(_e,"getChartThemeConfig");function Pe(){return nt}s(Pe,"getChartConfig");function ve(){return f}s(ve,"getXYChartData");var Ee=s(function(){Nt(),at=0,nt=ne(),f=se(),st=ae(),Xt=st.plotColorPalette.split(",").map(i=>i.trim()),ft=!1,Yt=!1},"clear"),he={getDrawableElem:Re,clear:Ee,setAccTitle:jt,getAccTitle:Gt,setDiagramTitle:Ut,getDiagramTitle:Tt,getAccDescription:$t,setAccDescription:Ht,setOrientation:ye,setXAxisTitle:Ce,setXAxisRangeData:oe,setXAxisBand:Ae,setYAxisTitle:De,setYAxisRangeData:Te,setLineData:Se,setBarData:ke,setTmpSVGG:be,getChartThemeConfig:_e,getChartConfig:Pe,getXYChartData:ve};var Le=s((i,t,e,a)=>{let n=a.db,r=n.getChartThemeConfig(),h=n.getChartConfig(),b=n.getXYChartData().plots[0].data.map(y=>y[1]);function x(y){return y==="top"?"text-before-edge":"middle"}s(x,"getDominantBaseLine");function d(y){return y==="left"?"start":y==="right"?"end":"middle"}s(d,"getTextAnchor");function S(y){return`translate(${y.x}, ${y.y}) rotate(${y.rotation||0})`}s(S,"getTextTransformation"),ht.debug(`Rendering xychart chart
|
|
7
|
+
`+i);let k=Kt(t),P=k.append("g").attr("class","main"),V=P.append("rect").attr("width",h.width).attr("height",h.height).attr("class","background");Ft(k,h.height,h.width,!0),k.attr("viewBox",`0 0 ${h.width} ${h.height}`),V.attr("fill",r.backgroundColor),n.setTmpSVGG(k.append("g").attr("class","mermaid-tmp-group"));let z=n.getDrawableElem(),E={};function O(y){let L=P,g="";for(let[j]of y.entries()){let B=P;j>0&&E[g]&&(B=E[g]),g+=y[j],L=E[g],L||(L=E[g]=B.append("g").attr("class",y[j]))}return L}s(O,"getGroup");for(let y of z){if(y.data.length===0)continue;let L=O(y.groupTexts);switch(y.type){case"rect":if(L.selectAll("rect").data(y.data).enter().append("rect").attr("x",g=>g.x).attr("y",g=>g.y).attr("width",g=>g.width).attr("height",g=>g.height).attr("fill",g=>g.fill).attr("stroke",g=>g.strokeFill).attr("stroke-width",g=>g.strokeWidth),h.showDataLabel){let g=h.showDataLabelOutsideBar;if(h.chartOrientation==="horizontal"){let G=function(C,M){let{data:T,label:Y}=C;return M*Y.length*.7<=T.width-10};var W=G;s(G,"fitsHorizontally");let j=.7,B=10,A=y.data.map((C,M)=>({data:C,label:b[M].toString()})).filter(C=>C.data.width>0&&C.data.height>0),_=A.map(C=>{let{data:M}=C,T=M.height*.7;for(;!G(C,T)&&T>0;)T-=1;return T}),K=Math.floor(Math.min(..._)),w=s(C=>g?C.data.x+C.data.width+10:C.data.x+C.data.width-10,"determineLabelXPosition");L.selectAll("text").data(A).enter().append("text").attr("x",w).attr("y",C=>C.data.y+C.data.height/2).attr("text-anchor",g?"start":"end").attr("dominant-baseline","middle").attr("fill",r.dataLabelColor).attr("font-size",`${K}px`).text(C=>C.label)}else{let A=function(w,C,M){let{data:T,label:Y}=w,c=C*Y.length*.7,p=T.x+T.width/2,u=p-c/2,D=p+c/2,o=u>=T.x&&D<=T.x+T.width,$=T.y+M+C<=T.y+T.height;return o&&$};var F=A;s(A,"fitsInBar");let j=10,B=y.data.map((w,C)=>({data:w,label:b[C].toString()})).filter(w=>w.data.width>0&&w.data.height>0),G=B.map(w=>{let{data:C,label:M}=w,T=C.width/(M.length*.7);for(;!A(w,T,10)&&T>0;)T-=1;return T}),_=Math.floor(Math.min(...G)),K=s(w=>g?w.data.y-10:w.data.y+10,"determineLabelYPosition");L.selectAll("text").data(B).enter().append("text").attr("x",w=>w.data.x+w.data.width/2).attr("y",K).attr("text-anchor","middle").attr("dominant-baseline",g?"auto":"hanging").attr("fill",r.dataLabelColor).attr("font-size",`${_}px`).text(w=>w.label)}}break;case"text":L.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",g=>g.fill).attr("font-size",g=>g.fontSize).attr("dominant-baseline",g=>x(g.verticalPos)).attr("text-anchor",g=>d(g.horizontalPos)).attr("transform",g=>S(g)).text(g=>g.text);break;case"path":L.selectAll("path").data(y.data).enter().append("path").attr("d",g=>g.path).attr("fill",g=>g.fill?g.fill:"none").attr("stroke",g=>g.strokeFill).attr("stroke-width",g=>g.strokeWidth);break}}},"draw"),ce={draw:Le};var qi={parser:Qt,db:he,renderer:ce};export{qi as diagram};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{a as Qt}from"./chunks/mermaid.esm.min/chunk-IJBDOHL6.mjs";import{g as ca,h as ma,i as pa,j as da}from"./chunks/mermaid.esm.min/chunk-WUBWJARI.mjs";import"./chunks/mermaid.esm.min/chunk-4CAJECRU.mjs";import{a as Wt,b as Xt}from"./chunks/mermaid.esm.min/chunk-NUDPKBEF.mjs";import{a as Kt}from"./chunks/mermaid.esm.min/chunk-YDMLL4PJ.mjs";import"./chunks/mermaid.esm.min/chunk-ZQN7UHIL.mjs";import"./chunks/mermaid.esm.min/chunk-4OADUZ5Q.mjs";import"./chunks/mermaid.esm.min/chunk-VRZKL3EH.mjs";import"./chunks/mermaid.esm.min/chunk-Z6V44ARX.mjs";import"./chunks/mermaid.esm.min/chunk-5IMINLNL.mjs";import"./chunks/mermaid.esm.min/chunk-ZNLK7HRR.mjs";import{a as Vt}from"./chunks/mermaid.esm.min/chunk-DZP67EKU.mjs";import{b as $t}from"./chunks/mermaid.esm.min/chunk-2NMSUPJH.mjs";import{b as Et,d as Ut,m as wt,o as Bt,p as _,q as Yt,r as qt}from"./chunks/mermaid.esm.min/chunk-VY2OSTJR.mjs";import"./chunks/mermaid.esm.min/chunk-STOV2HOB.mjs";import{H as _t,J as zt,K,L as at,M as Q,N as Gt,O as Ht,Q as ht,R as Nt,a as At,da as V,ea as Z,i as et,l as Rt,m as yt,n as Ct,o as Tt,p as jt,q as kt,r as xt,s as Pt,t as $,u as Ot,v as X,x as It,y as Ft}from"./chunks/mermaid.esm.min/chunk-QJSWEUOL.mjs";import{b as g,c as Dt,h as j}from"./chunks/mermaid.esm.min/chunk-H7VHZCWX.mjs";import{a as r}from"./chunks/mermaid.esm.min/chunk-AQ6EADP3.mjs";var fa=r(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),ga=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/c4Diagram-3NLNHZP5.mjs");return{id:"c4",diagram:t}},"loader"),la={id:"c4",detector:fa,loader:ga},Zt=la;var Jt="flowchart",ua=r((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),Da=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-YHGXBVSY.mjs");return{id:Jt,diagram:t}},"loader"),ya={id:Jt,detector:ua,loader:Da},tr=ya;var rr="flowchart-v2",xa=r((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),ha=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-YHGXBVSY.mjs");return{id:rr,diagram:t}},"loader"),Ea={id:rr,detector:xa,loader:ha},er=Ea;var ar="swimlane",wa=r(t=>/^\s*swimlane-beta\b/.test(t),"detector"),La=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/swimlanesDiagram-JKPDBFCN.mjs");return{id:ar,diagram:t}},"loader"),ba={id:ar,detector:wa,loader:La},ir=ba;var Sa=r(t=>/^\s*erDiagram/.test(t),"detector"),Ma=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/erDiagram-H3ERR26V.mjs");return{id:"er",diagram:t}},"loader"),va={id:"er",detector:Sa,loader:Ma},or=va;var nr="gitGraph",Aa=r(t=>/^\s*gitGraph/.test(t),"detector"),Ra=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-MAR6GKOP.mjs");return{id:nr,diagram:t}},"loader"),Ca={id:nr,detector:Aa,loader:Ra},sr=Ca;var cr="gantt",Ta=r(t=>/^\s*gantt/.test(t),"detector"),ja=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ganttDiagram-RWFTB7ED.mjs");return{id:cr,diagram:t}},"loader"),ka={id:cr,detector:Ta,loader:ja},mr=ka;var pr="info",Pa=r(t=>/^\s*info/.test(t),"detector"),Oa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/infoDiagram-LV547AFH.mjs");return{id:pr,diagram:t}},"loader"),dr={id:pr,detector:Pa,loader:Oa};var Ia=r(t=>/^\s*pie/.test(t),"detector"),Fa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/pieDiagram-EFA7CBSB.mjs");return{id:"pie",diagram:t}},"loader"),fr={id:"pie",detector:Ia,loader:Fa};var gr="quadrantChart",$a=r(t=>/^\s*quadrantChart/.test(t),"detector"),Va=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/quadrantDiagram-WARVYA7P.mjs");return{id:gr,diagram:t}},"loader"),_a={id:gr,detector:$a,loader:Va},lr=_a;var ur="xychart",za=r(t=>/^\s*xychart(-beta)?/.test(t),"detector"),Ga=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/xychartDiagram-XJAZEDNM.mjs");return{id:ur,diagram:t}},"loader"),Ha={id:ur,detector:za,loader:Ga},Dr=Ha;var yr="requirement",Na=r(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),Ua=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/requirementDiagram-SXREGOKZ.mjs");return{id:yr,diagram:t}},"loader"),Ba={id:yr,detector:Na,loader:Ua},xr=Ba;var hr="sequence",Ya=r(t=>/^\s*sequenceDiagram/.test(t),"detector"),qa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sequenceDiagram-52ZFIFDL.mjs");return{id:hr,diagram:t}},"loader"),Wa={id:hr,detector:Ya,loader:qa},Er=Wa;var wr="class",Xa=r((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),Ka=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-FGAMPOII.mjs");return{id:wr,diagram:t}},"loader"),Qa={id:wr,detector:Xa,loader:Ka},Lr=Qa;var br="classDiagram",Za=r((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),Ja=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-v2-AI5RJEK4.mjs");return{id:br,diagram:t}},"loader"),ti={id:br,detector:Za,loader:Ja},Sr=ti;var Mr="state",ri=r((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),ei=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/stateDiagram-3QAKPIVI.mjs");return{id:Mr,diagram:t}},"loader"),ai={id:Mr,detector:ri,loader:ei},vr=ai;var Ar="stateDiagram",ii=r((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),oi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/stateDiagram-v2-HN2P4RDZ.mjs");return{id:Ar,diagram:t}},"loader"),ni={id:Ar,detector:ii,loader:oi},Rr=ni;var Cr="journey",si=r(t=>/^\s*journey/.test(t),"detector"),ci=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/journeyDiagram-EW5QJT4W.mjs");return{id:Cr,diagram:t}},"loader"),mi={id:Cr,detector:si,loader:ci},Tr=mi;var pi=r((t,e,a)=>{g.debug(`rendering svg for syntax error
|
|
2
|
+
`);let i=Qt(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Ht(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${a}`)},"draw"),Lt={draw:pi},jr=Lt;var di={db:{},renderer:Lt,parser:{parse:r(()=>{},"parse")}},kr=di;var Pr="flowchart-elk",fi=r((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),gi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-YHGXBVSY.mjs");return{id:Pr,diagram:t}},"loader"),li={id:Pr,detector:fi,loader:gi},Or=li;var Ir="timeline",ui=r(t=>/^\s*timeline/.test(t),"detector"),Di=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/timeline-definition-GS45XAXW.mjs");return{id:Ir,diagram:t}},"loader"),yi={id:Ir,detector:ui,loader:Di},Fr=yi;var $r="mindmap",xi=r(t=>/^\s*mindmap/.test(t),"detector"),hi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/mindmap-definition-VBJCLQLM.mjs");return{id:$r,diagram:t}},"loader"),Ei={id:$r,detector:xi,loader:hi},Vr=Ei;var _r="kanban",wi=r(t=>/^\s*kanban/.test(t),"detector"),Li=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/kanban-definition-JSQERAZB.mjs");return{id:_r,diagram:t}},"loader"),bi={id:_r,detector:wi,loader:Li},zr=bi;var Gr="sankey",Si=r(t=>/^\s*sankey(-beta)?/.test(t),"detector"),Mi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sankeyDiagram-VV74M2VP.mjs");return{id:Gr,diagram:t}},"loader"),vi={id:Gr,detector:Si,loader:Mi},Hr=vi;var Nr="packet",Ai=r(t=>/^\s*packet(-beta)?/.test(t),"detector"),Ri=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-AE4NWXFW.mjs");return{id:Nr,diagram:t}},"loader"),Ur={id:Nr,detector:Ai,loader:Ri};var Br="radar",Ci=r(t=>/^\s*radar-beta/.test(t),"detector"),Ti=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-BUJID5UG.mjs");return{id:Br,diagram:t}},"loader"),Yr={id:Br,detector:Ci,loader:Ti};var qr="block",ji=r(t=>/^\s*block(-beta)?/.test(t),"detector"),ki=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/blockDiagram-PUWGUBOA.mjs");return{id:qr,diagram:t}},"loader"),Pi={id:qr,detector:ji,loader:ki},Wr=Pi;var Xr="treeView",Oi=r(t=>/^\s*treeView-beta/.test(t),"detector"),Ii=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-EYOLEXXS.mjs");return{id:Xr,diagram:t}},"loader"),Fi={id:Xr,detector:Oi,loader:Ii},Kr=Fi;var Qr="architecture",$i=r(t=>/^\s*architecture/.test(t),"detector"),Vi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/architectureDiagram-2PNWDENW.mjs");return{id:Qr,diagram:t}},"loader"),_i={id:Qr,detector:$i,loader:Vi},Zr=_i;var Jr="eventmodeling",zi=r(t=>/^\s*eventmodeling/.test(t),"detector"),Gi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-P7B6PWOJ.mjs");return{id:Jr,diagram:t}},"loader"),Hi={id:Jr,detector:zi,loader:Gi},te=Hi;var re="ishikawa",Ni=r(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),Ui=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ishikawaDiagram-PUJQGNDS.mjs");return{id:re,diagram:t}},"loader"),ee={id:re,detector:Ni,loader:Ui};var ae="venn",Bi=r(t=>/^\s*venn-beta/.test(t),"detector"),Yi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/vennDiagram-QIQU2ZRJ.mjs");return{id:ae,diagram:t}},"loader"),qi={id:ae,detector:Bi,loader:Yi},ie=qi;var oe="treemap",Wi=r(t=>/^\s*treemap/.test(t),"detector"),Xi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-C44CZ5NI.mjs");return{id:oe,diagram:t}},"loader"),ne={id:oe,detector:Wi,loader:Xi};var se="wardley",Ki=r(t=>/^\s*wardley-beta/i.test(t),"detector"),Qi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/wardleyDiagram-U6YNM66N.mjs");return{id:se,diagram:t}},"loader"),Zi={id:se,detector:Ki,loader:Qi},ce=Zi;var me="cynefin",Ji=r(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),to=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/cynefinDiagram-2OOWUY4M.mjs");return{id:me,diagram:t}},"loader"),pe={id:me,detector:Ji,loader:to};var de="railroad",ro=r(t=>/^\s*railroad-beta/i.test(t),"detector"),eo=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/railroadDiagram-5NIQVNLQ.mjs");return{id:de,diagram:t}},"loader"),fe={id:de,detector:ro,loader:eo};var ge="railroadEbnf",ao=r(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),io=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ebnfDiagram-FTPZ3PV6.mjs");return{id:ge,diagram:t}},"loader"),le={id:ge,detector:ao,loader:io};var ue="railroadAbnf",oo=r(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),no=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/abnfDiagram-PAR5IXJI.mjs");return{id:ue,diagram:t}},"loader"),De={id:ue,detector:oo,loader:no};var ye="railroadPeg",so=r(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),co=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/pegDiagram-7WILOQTJ.mjs");return{id:ye,diagram:t}},"loader"),xe={id:ye,detector:so,loader:co};var he=!1,z=r(()=>{he||(he=!0,V("error",kr,t=>t.toLowerCase().trim()==="error"),V("---",{db:{clear:r(()=>{},"clear")},styles:{},renderer:{draw:r(()=>{},"draw")},parser:{parse:r(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:r(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Q(Or,Vr,Zr),Q(Zt,zr,Sr,Lr,or,mr,dr,fr,xr,Er,ir,er,tr,Fr,sr,Rr,vr,Tr,lr,Hr,Ur,Dr,Wr,te,Kr,Yr,ee,ne,fe,le,De,xe,ie,ce,pe))},"addDiagrams");var Ee=r(async()=>{g.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(K).map(async([a,{detector:i,loader:o}])=>{if(o)try{Z(a)}catch{try{let{diagram:n,id:c}=await o();V(c,n,i)}catch(n){throw g.error(`Failed to load external diagram with key ${a}. Removing from detectors.`),delete K[a],n}}}))).filter(a=>a.status==="rejected");if(e.length>0){g.error(`Failed to load ${e.length} external diagrams`);for(let a of e)g.error(a);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");var G="comm",it="rule",ot="decl";var we="@media",Le="@import";var be="@supports";var Se="@namespace",J="@keyframes";var nt="@layer",Me="@scope";var bt=Math.abs,tt=String.fromCharCode;function st(t){return t.trim()}r(st,"trim");function H(t,e,a){return t.replace(e,a)}r(H,"replace");function ve(t,e,a){return t.indexOf(e,a)}r(ve,"indexof");function k(t,e){return t.charCodeAt(e)|0}r(k,"charat");function P(t,e,a){return t.slice(e,a)}r(P,"substr");function E(t){return t.length}r(E,"strlen");function ct(t){return t.length}r(ct,"sizeof");function N(t,e){return e.push(t),t}r(N,"append");var mt=1,U=1,Ae=0,L=0,y=0,Y="";function pt(t,e,a,i,o,n,c,s){return{value:t,root:e,parent:a,type:i,props:o,children:n,line:mt,column:U,length:c,return:"",siblings:s}}r(pt,"node");function Re(){return y}r(Re,"char");function Ce(){return y=L>0?k(Y,--L):0,U--,y===10&&(U=1,mt--),y}r(Ce,"prev");function b(){return y=L<Ae?k(Y,L++):0,U++,y===10&&(U=1,mt++),y}r(b,"next");function O(){return k(Y,L)}r(O,"peek");function rt(){return L}r(rt,"caret");function dt(t,e){return P(Y,t,e)}r(dt,"slice");function B(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}r(B,"token");function Te(t){return mt=U=1,Ae=E(Y=t),L=0,[]}r(Te,"alloc");function je(t){return Y="",t}r(je,"dealloc");function ft(t){return st(dt(L-1,St(t===91?t+2:t===40?t+1:t)))}r(ft,"delimit");function ke(t){for(;(y=O())&&y<33;)b();return B(t)>2||B(y)>3?"":" "}r(ke,"whitespace");function Pe(t,e){for(;--e&&b()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return dt(t,rt()+(e<6&&O()==32&&b()==32))}r(Pe,"escaping");function St(t){for(;b();)switch(y){case t:return L;case 34:case 39:t!==34&&t!==39&&St(y);break;case 40:t===41&&St(t);break;case 92:b();break}return L}r(St,"delimiter");function Oe(t,e){for(;b()&&t+y!==57;)if(t+y===84&&O()===47)break;return"/*"+dt(e,L-1)+"*"+tt(t===47?t:b())}r(Oe,"commenter");function Ie(t){for(;!B(O());)b();return dt(t,L)}r(Ie,"identifier");function Ve(t){return je(gt("",null,null,null,[""],t=Te(t),0,[0],t))}r(Ve,"compile");function gt(t,e,a,i,o,n,c,s,m){for(var f=0,u=0,p=c,h=0,A=0,S=0,l=1,C=1,M=1,D=0,v="",T=o,R=n,w=i,d=v;C;)switch(S=D,D=b()){case 40:if(S!=108&&k(d,p-1)==58){ve(d+=H(ft(D),"&","&\f"),"&\f",bt(f?s[f-1]:0))!=-1&&(M=-1);break}case 34:case 39:case 91:d+=ft(D);break;case 9:case 10:case 13:case 32:d+=ke(S);break;case 92:d+=Pe(rt()-1,7);continue;case 47:switch(O()){case 42:case 47:N(po(Oe(b(),rt()),e,a,m),m),(B(S||1)==5||B(O()||1)==5)&&E(d)&&P(d,-1,void 0)!==" "&&(d+=" ");break;default:d+="/"}break;case 123*l:s[f++]=E(d)*M;case 125*l:case 59:case 0:switch(D){case 0:case 125:C=0;case 59+u:M==-1&&(d=H(d,/\f/g,"")),A>0&&(E(d)-p||l===0&&S===47)&&N(A>32?$e(d+";",i,a,p-1,m):$e(H(d," ","")+";",i,a,p-2,m),m);break;case 59:d+=";";default:if(N(w=Fe(d,e,a,f,u,o,s,v,T=[],R=[],p,n),n),D===123)if(u===0)gt(d,e,w,w,T,n,p,s,R);else{switch(h){case 99:if(k(d,3)===110)break;case 108:if(k(d,2)===97)break;default:u=0;case 100:case 109:case 115:}u?gt(t,w,w,i&&N(Fe(t,w,w,0,0,o,s,v,o,T=[],p,R),R),o,R,p,s,i?T:R):gt(d,w,w,w,[""],R,0,s,R)}}f=u=A=0,l=M=1,v=d="",p=c;break;case 58:p=1+E(d),A=S;default:if(l<1){if(D==123)--l;else if(D==125&&l++==0&&Ce()==125)continue}switch(d+=tt(D),D*l){case 38:M=u>0?1:(d+="\f",-1);break;case 44:s[f++]=(E(d)-1)*M,M=1;break;case 64:O()===45&&(d+=ft(b())),h=O(),u=p=E(v=d+=Ie(rt())),D++;break;case 45:S===45&&E(d)==2&&(l=0)}}return n}r(gt,"parse");function Fe(t,e,a,i,o,n,c,s,m,f,u,p){for(var h=o-1,A=o===0?n:[""],S=ct(A),l=0,C=0,M=0;l<i;++l)for(var D=0,v=P(t,h+1,h=bt(C=c[l])),T=t;D<S;++D)(T=st(C>0?A[D]+" "+v:H(v,/&\f/g,A[D])))&&(m[M++]=T);return pt(t,e,a,o===0?it:s,m,f,u,p)}r(Fe,"ruleset");function po(t,e,a,i){return pt(t,e,a,G,tt(Re()),P(t,2,-2),0,i)}r(po,"comment");function $e(t,e,a,i,o){return pt(t,e,a,ot,P(t,0,i),P(t,i+1,-1),i,o)}r($e,"declaration");function lt(t,e){for(var a="",i=0;i<t.length;i++)a+=e(t[i],i,t,e)||"";return a}r(lt,"serialize");function _e(t,e,a,i){switch(t.type){case nt:if(t.children.length)break;case Le:case Se:case ot:return t.return=t.return||t.value;case G:return"";case J:return t.return=t.value+"{"+lt(t.children,i)+"}";case it:if(!E(t.value=t.props.join(",")))return""}return E(a=lt(t.children,i))?t.return=t.value+"{"+a+"}":""}r(_e,"stringify");function ze(t){var e=ct(t);return function(a,i,o,n){for(var c="",s=0;s<e;s++)c+=t[s](a,i,o,n)||"";return c}}r(ze,"middleware");var fo="graphics-document document";function Ge(t,e){t.attr("role",fo),e!==""&&t.attr("aria-roledescription",e)}r(Ge,"setA11yDiagramInfo");function He(t,e,a,i){if(t.insert!==void 0){if(a){let o=`chart-desc-${i}`;t.attr("aria-describedby",o),t.insert("desc",":first-child").attr("id",o).text(a)}if(e){let o=`chart-title-${i}`;t.attr("aria-labelledby",o),t.insert("title",":first-child").attr("id",o).text(e)}}}r(He,"addSVGa11yTitleDescription");var q=class t{constructor(e,a,i,o,n){this.type=e;this.text=a;this.db=i;this.parser=o;this.renderer=n}static{r(this,"Diagram")}static async fromText(e,a={}){let i=$(),o=at(e,i);e=Yt(e)+`
|
|
3
|
+
`;try{Z(o)}catch{let f=Gt(o);if(!f)throw new zt(`Diagram ${o} not found.`);let{id:u,diagram:p}=await f();V(u,p)}let{db:n,parser:c,renderer:s,init:m}=Z(o);return c.parser&&(c.parser.yy=n),n.clear?.(),m?.(i),a.title&&n.setDiagramTitle?.(a.title),await c.parse(e),new t(o,e,n,c,s)}async render(e,a){await this.renderer.draw(this.text,e,a,this)}getParser(){return this.parser}getType(){return this.type}};var Ne=[];var Ue=r(()=>{Ne.forEach(t=>{t()}),Ne=[]},"attachFunctions");var Be=r(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ye(t){let e=t.match(_t);if(!e)return{text:t,metadata:{}};let a=e[1],i=a?e[2].split(`
|
|
4
|
+
`).map(c=>c.startsWith(a)?c.slice(a.length):c).join(`
|
|
5
|
+
`):e[2],o=Xt(i,{schema:Wt})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};let n={};return o.displayMode&&(n.displayMode=o.displayMode.toString()),o.title&&(n.title=o.title.toString()),o.config&&(n.config=o.config),{text:t.slice(e[0].length),metadata:n}}r(Ye,"extractFrontMatter");var lo=r(t=>t.replace(/\r\n?/g,`
|
|
6
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,a,i)=>"<"+a+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),uo=r(t=>{let{text:e,metadata:a}=Ye(t),{displayMode:i,title:o,config:n={}}=a;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),Do=r(t=>{let e=_.detectInit(t)??{},a=_.detectDirective(t,"wrap");return Array.isArray(a)?e.wrap=a.some(({type:i})=>i==="wrap"):a?.type==="wrap"&&(e.wrap=!0),{text:Ut(t),directive:e}},"processDirectives");function Mt(t){let e=lo(t),a=uo(e),i=Do(a.text),o=Bt(a.config,i.directive);return t=Be(i.text),{code:t,title:a.title,config:o}}r(Mt,"preprocessDiagram");function qe(t){let e=new TextEncoder().encode(t),a=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(a)}r(qe,"toBase64");var yo=5e4,xo="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",ho="sandbox",Eo="loose",wo="http://www.w3.org/2000/svg",Lo="http://www.w3.org/1999/xlink",bo="http://www.w3.org/1999/xhtml",So="100%",Mo="100%",vo="border:0;margin:0;",Ao="margin:0",Ro="allow-top-navigation-by-user-activation allow-popups",Co='The "iframe" tag is not supported by your browser.',To=["foreignobject"],jo=["dominant-baseline"];function Qe(t){let e=Mt(t);return X(),Ot(e.config??{}),e}r(Qe,"processAndSetConfigs");async function ko(t,e){z();try{let{code:a,config:i}=Qe(t);return{diagramType:(await Ze(a)).type,config:i}}catch(a){if(e?.suppressErrors)return!1;throw a}}r(ko,"parse");var We=r((t,e,a=[])=>{let i=Rt(`{ ${a.join(" !important; ")} !important; }`);return`.${t} ${e} ${i}`},"cssImportantStyles"),Po=r((t,e=new Map)=>{let a=new CSSStyleSheet;if(t.fontFamily!==void 0&&a.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,a.cssRules.length),t.altFontFamily!==void 0&&a.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,a.cssRules.length),e instanceof Map){let s=It(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(m=>{Et(m.styles)||s.forEach(f=>{a.insertRule(We(m.id,f,m.styles),a.cssRules.length)}),Et(m.textStyles)||a.insertRule(We(m.id,"tspan",(m?.textStyles||[]).map(f=>f.replace("color","fill"))),a.cssRules.length)})}let i="";if(t.themeCSS!==void 0)if(typeof a.replaceSync=="function"){let o=new CSSStyleSheet;o.replaceSync(t.themeCSS),i=ht(o)+`
|
|
7
|
+
`}else i+=`${t.themeCSS}
|
|
8
|
+
`;return i+ht(a)},"createCssStyles"),Oo=r((t,e)=>lt(Ve(`${t}{${e}}`),ze([r(function(i,o,n,c){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===J)return;i.props=i.props.map(s=>s===t&&Array.isArray(i.children)&&i.children.every(f=>f.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(f.props))||(s.startsWith(`${t} `)||s.startsWith(`${t}>`))&&!s.startsWith(`${t} ||`)?s:`${t} ${s}`)}else i.type.startsWith("@")&&([...[we,be,nt,Me,"@container","@starting-style"],J].includes(i.type)||(g.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=G))},"addNamespace"),_e])),"compileCSS"),Io=r((t,e,a,i)=>{let o=Po(t,a),n=Nt(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return Oo(i,n)},"createUserStyles"),Fo=r((t="",e,a)=>{let i=t;return!a&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=qt(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),$o=r((t="",e)=>{let a=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":Mo,i=qe(`<body style="${Ao}">${t}</body>`);return`<iframe style="width:${So};height:${a};${vo}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Ro}">
|
|
9
|
+
${Co}
|
|
10
|
+
</iframe>`},"putIntoIFrame"),Xe=r((t,e,a,i,o)=>{let n=t.append("div");n.attr("id",a),i&&n.attr("style",i);let c=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",wo);return o&&c.attr("xmlns:xlink",o),c.append("g"),t},"appendDivSvgG");function Ke(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}r(Ke,"sandboxedIframe");var Vo=r((t,e,a,i)=>{t.getElementById(e)?.remove(),t.getElementById(a)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),_o=r(async function(t,e,a){z();let i=Qe(e);e=i.code;let o=$();g.debug(o),e.length>(o?.maxTextSize??yo)&&(e=xo);let n=`#${t}`,c="i"+t,s="#"+c,m="d"+t,f="#"+m,u=r(()=>{let W=j(h?s:f).node();W&&"remove"in W&&W.remove()},"removeTempElements"),p=j(document.body),h=o.securityLevel===ho,A=o.securityLevel===Eo,S=o.fontFamily;if(a!==void 0){if(a&&(a.innerHTML=""),h){let x=Ke(j(a),c);p=j(x.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=j(a);Xe(p,t,m,`font-family: ${S}`,Lo)}else{if(Vo(document,t,m,c),h){let x=Ke(j(document.body),c);p=j(x.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=j("body");Xe(p,t,m)}let l,C;try{l=await q.fromText(e,{title:i.title})}catch(x){if(o.suppressErrorRendering)throw u(),x;l=await q.fromText("error"),C=x}let M=p.select(f).node(),D=l.type,v=M.firstChild,T=v.firstChild,R=l.renderer.getClasses?.(e,l),w=Io(o,D,R,n),d=document.createElement("style");d.innerHTML=w,v.insertBefore(d,T);try{await l.renderer.draw(e,t,"11.17.2",l)}catch(x){throw o.suppressErrorRendering?u():jr.draw(e,t,"11.17.2"),x}let ia=p.select(`${f} svg`),oa=l.db.getAccTitle?.(),na=l.db.getAccDescription?.();Go(D,ia,oa,na);let sa=r(()=>{p.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",bo);let x=p.select(f).node().innerHTML;if(g.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),x=Fo(x,h,Ct(o.arrowMarkerAbsolute)),h){let W=p.select(f+" svg").node();x=$o(x,W)}else A||(x=Ft.sanitize(x,{ADD_TAGS:To,ADD_ATTR:jo,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Ue(),x},"serializeSvg")();if(C)throw C;return u(),{diagramType:D,svg:sa,bindFunctions:l.db.bindFunctions}},"render");function zo(t={}){let e=At({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),jt(e),e?.theme&&e.theme in et?e.themeVariables=et[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=et.default.getThemeVariables(e.themeVariables));let a=typeof e=="object"?Tt(e):xt();Dt(a.logLevel),z()}r(zo,"initialize");var Ze=r((t,e={})=>{let{code:a}=Mt(t);return q.fromText(a,e)},"getDiagramFromText");function Go(t,e,a,i){Ge(e,t),He(e,a,i,e.attr("id"))}r(Go,"addA11yInfo");var F=Object.freeze({render:_o,parse:ko,getDiagramFromText:Ze,initialize:zo,getConfig:$,setConfig:Pt,getSiteConfig:xt,updateSiteConfig:kt,reset:r(()=>{X()},"reset"),globalReset:r(()=>{X(yt)},"globalReset"),defaultConfig:yt});Dt($().logLevel);X($());var Ho=r((t,e,a)=>{g.warn(t),wt(t)?(a&&a(t.str,t.hash),e.push({...t,message:t.str,error:t})):(a&&a(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Je=r(async function(t={querySelector:".mermaid"}){try{await No(t)}catch(e){if(wt(e)&&g.error(e.str),I.parseError&&I.parseError(e),!t.suppressErrors)throw g.error("Use the suppressErrors option to suppress these errors"),e}},"run"),No=r(async function({postRenderCallback:t,querySelector:e,nodes:a}={querySelector:".mermaid"}){let i=F.getConfig();g.debug(`${t?"":"No "}Callback function found`);let o;if(a)o=a;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");g.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(g.debug("Start On Load: "+i?.startOnLoad),F.updateSiteConfig({startOnLoad:i?.startOnLoad}));let n=new _.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),c,s=[];for(let m of Array.from(o)){g.info("Rendering diagram: "+m.id);if(m.getAttribute("data-processed"))continue;m.setAttribute("data-processed","true");let f=`mermaid-${n.next()}`;c=m.innerHTML,c=Vt(_.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");let u=_.detectInit(c);u&&g.debug("Detected early reinit: ",u);try{let{svg:p,bindFunctions:h}=await aa(f,c,m);m.innerHTML=p,t&&await t(f),h&&h(m)}catch(p){Ho(p,s,I.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ta=r(function(t){F.initialize(t)},"initialize"),Uo=r(async function(t,e,a){g.warn("mermaid.init is deprecated. Please use run instead."),t&&ta(t);let i={postRenderCallback:a,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Je(i)},"init"),Bo=r(async(t,{lazyLoad:e=!0}={})=>{z(),Q(...t),e===!1&&await Ee()},"registerExternalDiagrams"),ra=r(function(){if(I.startOnLoad){let{startOnLoad:t}=F.getConfig();t&&I.run().catch(e=>g.error("Mermaid failed to initialize",e))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",ra,!1)}var Yo=r(function(t){I.parseError=t},"setParseErrorHandler"),ut=[],vt=!1,ea=r(async()=>{if(!vt){for(vt=!0;ut.length>0;){let t=ut.shift();if(t)try{await t()}catch(e){g.error("Error executing queue",e)}}vt=!1}},"executeQueue"),qo=r(async(t,e)=>new Promise((a,i)=>{let o=r(()=>new Promise((n,c)=>{F.parse(t,e).then(s=>{n(s),a(s)},s=>{g.error("Error parsing",s),I.parseError?.(s),c(s),i(s)})}),"performCall");ut.push(o),ea().catch(i)}),"parse"),aa=r((t,e,a)=>new Promise((i,o)=>{let n=r(()=>new Promise((c,s)=>{F.render(t,e,a).then(m=>{c(m),i(m)},m=>{g.error("Error parsing",m),I.parseError?.(m),s(m),o(m)})}),"performCall");ut.push(n),ea().catch(o)}),"render"),Wo=r(()=>Object.keys(K).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),I={startOnLoad:!0,mermaidAPI:F,parse:qo,render:aa,init:Uo,run:Je,registerExternalDiagrams:Bo,registerLayoutLoaders:Kt,initialize:ta,parseError:void 0,contentLoaded:ra,setParseErrorHandler:Yo,detectType:at,registerIconPacks:$t,getRegisteredDiagramsMetadata:Wo},Nm=I;export{ma as clearLayoutRenderState,ca as createCommonLayoutRenderer,Nm as default,pa as defaultMeasureLayout,da as paintLayoutData};
|
|
11
|
+
/*! Check if previously processed */
|
|
12
|
+
/*!
|
|
13
|
+
* Wait for document loaded before starting the execution
|
|
14
|
+
*/
|