@kabmo-labs/kabmo 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +606 -560
- package/dist/client/static/js/{Body-9h5hd351.js → Body-s3nh6vet.js} +3 -3
- package/dist/client/static/js/{CsvGrid-s05k1q18.js → CsvGrid-j4h6cpnn.js} +2 -2
- package/dist/client/static/js/{DocxView-x6sjw5ht.js → DocxView-197x16zq.js} +3 -3
- package/dist/client/static/js/{DrawioView-jashn8sf.js → DrawioView-v6ps0cm5.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-eygzgtyc.js → HtmlPreview-a2t5zngp.js} +1 -1
- package/dist/client/static/js/ImageView-ar7hz7jx.js +1 -0
- package/dist/client/static/js/LayoutWrapper-epef152a.js +2 -0
- package/dist/client/static/js/MergeDiffView-7rwjvzk5.js +1 -0
- package/dist/client/static/js/Modal-9nxt67fm.js +60 -0
- package/dist/client/static/js/{PdfView-syhjmyqf.js → PdfView-gzhcym20.js} +1 -1
- package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
- package/dist/client/static/js/{SheetView-26r0e506.js → SheetView-baaynkb4.js} +22 -22
- package/dist/client/static/js/{SvgPreview-2fk85jzz.js → SvgPreview-jzcqwwcc.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-fdka7pxr.js → abnfDiagram-O67JEVCF-grb1sfhr.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-9084jzwr.js +36 -0
- package/dist/client/static/js/{astro-rn2bvwpm.js → astro-m3fcq2sa.js} +1 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-vpcmd3vx.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +8 -8
- package/dist/client/static/js/c-ypdp030b.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-1rgpdnbq.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fbsejvb9.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +9 -9
- package/dist/client/static/js/cose-bilkent-JH36ORCC-744ekavk.js +1 -0
- package/dist/client/static/js/cpp-cxwev3gs.js +1 -0
- package/dist/client/static/js/css-6mxcqf8c.js +1 -0
- package/dist/client/static/js/css-9gak6bze.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-7ta5vbrw.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-b8gtt32x.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-7emepy7h.js → diagram-22UHCM2B-ky3ncyv8.js} +21 -21
- package/dist/client/static/js/diagram-3UASUU5V-zgg82bz9.js +24 -0
- package/dist/client/static/js/{diagram-ATOU4E4O-t113exk3.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-pyj3x97y.js → diagram-CDSNMT55-my21t0kq.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-183sgpjh.js → diagram-MLGK6HIB-pvt20jtj.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-fmbj4hcx.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
- package/dist/client/static/js/{dockerfile-qay672za.js → dockerfile-3b5caedj.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-eafvfws2.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
- package/dist/client/static/js/{elixir-t8bep87c.js → elixir-7q2k61zb.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-573f1vfs.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-4z1r88ej.js → erDiagram-OPXOYQCR-5jje7qrh.js} +12 -12
- package/dist/client/static/js/{erlang-261km7r1.js → erlang-tjsd7n4d.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-pdeqndnd.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-49jd7msz.js → ganttDiagram-FUAMR5RP-7hresycc.js} +6 -6
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-8m202jb7.js +106 -0
- package/dist/client/static/js/graphql-6rwdfcnf.js +1 -0
- package/dist/client/static/js/html-p76eszt9.js +1 -0
- package/dist/client/static/js/{index-0w4jqzqk.js → index-0prwdwyb.js} +2 -2
- package/dist/client/static/js/{index-3v8k8ms3.js → index-0y6tstk8.js} +1 -1
- package/dist/client/static/js/index-20hj80g4.js +4 -0
- package/dist/client/static/js/index-21421tq7.js +2 -0
- package/dist/client/static/js/{index-gg910gpv.js → index-254387vg.js} +2 -2
- package/dist/client/static/js/index-2y4gk5q5.js +2 -0
- package/dist/client/static/js/index-3fk8grhz.js +2 -0
- package/dist/client/static/js/index-3rrdmk9m.js +2 -0
- package/dist/client/static/js/{index-rz0tz4hg.js → index-3sz9cztk.js} +1 -1
- package/dist/client/static/js/index-4m2d73m3.css +1 -0
- package/dist/client/static/js/{index-2bf0txsp.js → index-4nvcwtvr.js} +2 -2
- package/dist/client/static/js/index-4ppap7vb.js +9 -0
- package/dist/client/static/js/{index-qs4n116g.js → index-4tbdws4r.js} +2 -2
- package/dist/client/static/js/index-56hy2hcy.js +1 -0
- package/dist/client/static/js/{index-7rmps91t.js → index-60g0e74a.js} +2 -2
- package/dist/client/static/js/{index-zp40g8ah.js → index-7ag37ghj.js} +12 -12
- package/dist/client/static/js/{index-z6y8j93w.js → index-7ehcjb3r.js} +7 -7
- package/dist/client/static/js/index-899yw6fh.js +2 -0
- package/dist/client/static/js/{index-2yzt8h3d.js → index-8pqx5n2p.js} +2 -2
- package/dist/client/static/js/{index-dh060b7r.js → index-91jm3ywm.js} +2 -2
- package/dist/client/static/js/{index-yg083mk0.js → index-9qf2h9jb.js} +6 -6
- package/dist/client/static/js/{index-tcfpzqb9.js → index-9rp7h1nv.js} +20 -20
- package/dist/client/static/js/index-9rr23e0e.js +2 -0
- package/dist/client/static/js/index-9wj4ma9g.js +3 -0
- package/dist/client/static/js/index-awtk0djy.js +1 -0
- package/dist/client/static/js/{index-4dnc1kys.js → index-awz6pyd0.js} +2 -2
- package/dist/client/static/js/index-cvx1vkrx.js +1 -0
- package/dist/client/static/js/{index-c3whkrwa.js → index-cwwg7k5f.js} +33 -33
- package/dist/client/static/js/{index-ykc14gez.js → index-dzatbdws.js} +6 -6
- package/dist/client/static/js/{index-j37m7pn9.js → index-e6ew77ph.js} +2 -2
- package/dist/client/static/js/{index-tb35a328.js → index-ej1va073.js} +2 -2
- package/dist/client/static/js/{index-4ccs971z.js → index-er7pj5k6.js} +2 -2
- package/dist/client/static/js/index-fm0t4pct.js +4 -0
- package/dist/client/static/js/{index-0857zpr0.js → index-g5wp6ksw.js} +2 -2
- package/dist/client/static/js/{index-nzvte8s5.js → index-gy4mtr2e.js} +2 -2
- package/dist/client/static/js/{index-1yq96wpa.js → index-j9y4tjk0.js} +2 -2
- package/dist/client/static/js/{index-7ff9scbm.js → index-kt7c42n7.js} +2 -2
- package/dist/client/static/js/index-ktmb341a.js +468 -0
- package/dist/client/static/js/{index-taev57jw.js → index-m6zncj00.js} +2 -2
- package/dist/client/static/js/{index-dmc82cxb.js → index-mpyd7qxj.js} +2 -2
- package/dist/client/static/js/{index-1p880x6e.js → index-ms80nne4.js} +2 -2
- package/dist/client/static/js/{index-yyjw1ty9.js → index-my856e49.js} +2 -2
- package/dist/client/static/js/{index-pygy21w5.js → index-nnqyew8n.js} +2 -2
- package/dist/client/static/js/{index-qwxawph7.js → index-nt17ejrm.js} +2 -2
- package/dist/client/static/js/index-pvv340b4.js +2 -0
- package/dist/client/static/js/{index-nbm5r9g1.js → index-pxr36neg.js} +2 -2
- package/dist/client/static/js/{index-5ztdqm1w.js → index-q0k1am0g.js} +2 -2
- package/dist/client/static/js/{index-tc6k8qt7.js → index-qrpx4sk1.js} +2 -2
- package/dist/client/static/js/{index-473hk8nb.js → index-r2zsw7nw.js} +9 -9
- package/dist/client/static/js/{index-gaqjrzdb.js → index-rbkvw2xs.js} +2 -2
- package/dist/client/static/js/{index-wbsvg1d9.js → index-scmtzcv1.js} +2 -2
- package/dist/client/static/js/{index-bmaktvm2.js → index-syvkpnc8.js} +1 -1
- package/dist/client/static/js/index-tfqqsj2g.js +1 -0
- package/dist/client/static/js/{index-4z5ram7g.js → index-tj7xr4ta.js} +1 -1
- package/dist/client/static/js/{index-h8hjcdj1.js → index-wvw70pgd.js} +2 -2
- package/dist/client/static/js/{index-5dn4159w.js → index-wxs0x3g1.js} +2 -2
- package/dist/client/static/js/index-x507ndnc.js +314 -0
- package/dist/client/static/js/{index-gr8sqjpz.js → index-x87scjpa.js} +1 -1
- package/dist/client/static/js/{index-s5vegk6q.js → index-xtrsvm0d.js} +2 -2
- package/dist/client/static/js/{index-e8mt8rag.js → index-y1j18rha.js} +2 -2
- package/dist/client/static/js/{index-7dqq7cjp.js → index-yv2ervdj.js} +5 -5
- package/dist/client/static/js/{index-gz7kvpnm.js → index-z2pmt1bc.js} +1 -1
- package/dist/client/static/js/{index-5p8dwr4y.js → index-z446edg9.js} +1 -1
- package/dist/client/static/js/{index-a4636gt1.js → index-zkgqa0c2.js} +2 -2
- package/dist/client/static/js/index-zwbw177x.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-xsar9j6v.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
- package/dist/client/static/js/ini-kjcpgebh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g2rvt9jp.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +2 -2
- package/dist/client/static/js/java-0bcyv1jt.js +1 -0
- package/dist/client/static/js/javascript-0mqgcvps.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-q95v18zc.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +6 -6
- package/dist/client/static/js/json-mb8k0b1n.js +1 -0
- package/dist/client/static/js/jsx-8p6dqgpq.js +1 -0
- package/dist/client/static/js/{julia-pe5vpc2m.js → julia-nwh5w343.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-2e7m7ds3.js → kanban-definition-PNTS6WVX-yp9rks4k.js} +7 -7
- package/dist/client/static/js/lua-nxnqww9z.js +1 -0
- package/dist/client/static/js/markdown-8gbyxxjd.js +1 -0
- package/dist/client/static/js/mermaid.core-kxsxr8ec.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-banecvf8.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +7 -7
- package/dist/client/static/js/one-dark-pro-wyegjr0d.js +1 -0
- package/dist/client/static/js/one-light-kp6c3eqh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-6erykm1c.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
- package/dist/client/static/js/{perl-cc2eqye8.js → perl-wb4wtc9x.js} +1 -1
- package/dist/client/static/js/{php-p9bvnpsv.js → php-9g594k9f.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-jn1d905q.js → pieDiagram-5QR66LMP-f3dvprbm.js} +3 -3
- package/dist/client/static/js/properties-d5bwhgwz.js +1 -0
- package/dist/client/static/js/python-fdwwjjhh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-sz4afnp1.js → quadrantDiagram-O4NWA36T-qsghd295.js} +6 -6
- package/dist/client/static/js/r-4d2ygtfj.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ewzhhth2.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-fcs3xd42.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +6 -6
- package/dist/client/static/js/{ruby-65s2ca5d.js → ruby-c4hxsegh.js} +1 -1
- package/dist/client/static/js/{rust-ec1j2hwy.js → rust-e4whdswc.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2r829rjf.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +5 -5
- package/dist/client/static/js/{sass-p6cssgq8.js → sass-6yxywx7t.js} +1 -1
- package/dist/client/static/js/{scss-qfx8wt3b.js → scss-9wz47c6t.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3mnte9tv.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +13 -13
- package/dist/client/static/js/{sizeCapture-INFHLROL-r6hf9265.js → sizeCapture-INFHLROL-3b4nsa4s.js} +1 -1
- package/dist/client/static/js/sql-sd00wgem.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-hm2f0wdb.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +6 -6
- package/dist/client/static/js/{svelte-jz3a190v.js → svelte-mm3jfpje.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-s58xzqhw.js → swimlanes-2SLR337P-eezd46ps.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-h78096xp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-ezm1c4pz.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +12 -12
- package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +1 -0
- package/dist/client/static/js/tsx-dk8rpgtw.js +1 -0
- package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ryvgs5ac.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +82 -82
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-rd5prsf1.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
- package/dist/client/static/js/{vue-rv4pea8r.js → vue-rcdqpz7q.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1kt8q8a4.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +4 -4
- package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-q39bbgq4.js → xychartDiagram-PMCCYNJV-h48448cm.js} +4 -4
- package/dist/client/static/js/yaml-6k1tmwtm.js +1 -0
- package/package.json +2 -1
- package/src/client/components/common/MarkdownRenderer.tsx +31 -34
- package/src/client/components/common/ViewportSelector.tsx +4 -0
- package/src/client/components/common/command-palette/index.tsx +5 -2
- package/src/client/components/common/header-button/index.tsx +10 -2
- package/src/client/components/common/markdown-inline-file.test.tsx +131 -0
- package/src/client/components/common/search-select/OptionList.tsx +164 -0
- package/src/client/components/common/search-select/index.tsx +159 -136
- package/src/client/components/common/search-select/option.ts +16 -0
- package/src/client/components/common/search-select/search-select.test.tsx +61 -2
- package/src/client/components/common/sort-menu/index.tsx +9 -4
- package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +26 -6
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +45 -49
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +31 -25
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +40 -101
- package/src/client/components/settings/apply-side-effects.test.ts +16 -0
- package/src/client/components/settings/apply-side-effects.ts +8 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/HarnessSettings.tsx +8 -0
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +26 -3
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.test.tsx +97 -0
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.tsx +94 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +4 -3
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +13 -18
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +8 -9
- package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +224 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.test.tsx +139 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +349 -0
- package/src/client/components/settings/categories/harness-settings/AddAccountForm.tsx +58 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +33 -0
- package/src/client/components/settings/categories/keyboard-settings/ComposerKeys.tsx +10 -10
- package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +21 -18
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +12 -7
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +11 -11
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +14 -11
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +17 -16
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +11 -9
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +10 -9
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +10 -8
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +40 -24
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +13 -9
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +22 -17
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +79 -50
- package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +14 -7
- package/src/client/components/settings/categories/token-usage-settings/HarnessFilter.tsx +59 -0
- package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +37 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.test.ts +10 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.ts +4 -1
- package/src/client/components/settings/categories/usage-settings/providers.ts +28 -0
- package/src/client/components/settings/categories/usage-settings/usage-visibility.test.ts +60 -0
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +147 -5
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +11 -3
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +32 -2
- package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +277 -0
- package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +2 -1
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +123 -50
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +20 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +35 -6
- package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +111 -36
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +21 -6
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +7 -4
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +22 -6
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +8 -65
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +12 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +35 -218
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +40 -177
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.test.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.tsx +86 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +25 -16
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +4 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +11 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.plugin.test.ts +3 -1
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +15 -15
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +30 -5
- package/src/client/components/workspace/usage-panel/index.test.tsx +92 -12
- package/src/client/components/workspace/usage-panel/index.tsx +48 -12
- package/src/client/data/mock/chat.ts +17 -0
- package/src/client/data/mock/token-usage.ts +53 -10
- package/src/client/data/samples/tools-session.ts +8 -5
- package/src/client/hooks/chat/timeline/reader-input.ts +53 -1
- package/src/client/hooks/chat/timeline/scroll-activity.test.ts +103 -0
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +9 -4
- package/src/client/hooks/chat/timeline/scroll.ts +19 -2
- package/src/client/hooks/editor/font.test.ts +21 -0
- package/src/client/hooks/editor/font.ts +12 -9
- package/src/client/hooks/models/harness-accounts.ts +143 -0
- package/src/client/hooks/models/harness-catalog.ts +9 -2
- package/src/client/hooks/models/use-harnesses-controller.ts +12 -0
- package/src/client/hooks/models/use-harnesses.ts +14 -0
- package/src/client/hooks/settings/hide-empty-providers.test.ts +132 -0
- package/src/client/hooks/settings/hide-empty-providers.ts +49 -0
- package/src/client/hooks/settings/local-tts-models.ts +164 -0
- package/src/client/hooks/settings/useTokenUsage.ts +7 -2
- package/src/client/hooks/tts/tts-context.ts +6 -0
- package/src/client/hooks/tts/use-tts-player.ts +10 -0
- package/src/client/hooks/ui/markdown-render.ts +9 -1
- package/src/client/hooks/ui/markdown-scoped-links.ts +77 -0
- package/src/client/hooks/ui/open-inline-file.test.ts +144 -0
- package/src/client/hooks/ui/open-inline-file.ts +71 -0
- package/src/client/hooks/workspace/panel-tabs.ts +1 -1
- package/src/client/hooks/workspace/right-side.test.ts +75 -1
- package/src/client/hooks/workspace/right-side.ts +71 -10
- package/src/client/lib/commands/overlays.ts +16 -2
- package/src/client/lib/tts/player.test.ts +61 -0
- package/src/client/lib/tts/player.ts +120 -41
- package/src/client/tailwind.css +16 -0
- package/src/server/lib/antigravity/home.server.ts +27 -0
- package/src/server/lib/chat/normalize-tools.server.test.ts +79 -0
- package/src/server/lib/chat/normalize-tools.server.ts +87 -0
- package/src/server/lib/db/schema.ts +5 -1
- package/src/server/lib/harness/account-identity.server.ts +163 -0
- package/src/server/lib/harness/account-login.server.test.ts +151 -0
- package/src/server/lib/harness/account-login.server.ts +232 -0
- package/src/server/lib/harness/accounts.server.ts +339 -0
- package/src/server/lib/harness/accounts.test.ts +147 -0
- package/src/server/lib/harness/acp/background-probe.test.ts +314 -0
- package/src/server/lib/harness/acp/background-probe.ts +288 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +37 -1
- package/src/server/lib/harness/acp/background-replay.ts +8 -3
- package/src/server/lib/harness/acp/background-work.test.ts +4 -194
- package/src/server/lib/harness/acp/background-work.ts +4 -207
- package/src/server/lib/harness/acp/client.ts +3 -0
- package/src/server/lib/harness/acp/commands.ts +2 -2
- package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +41 -13
- package/src/server/lib/harness/acp/frames-vendor-names.test.ts +209 -0
- package/src/server/lib/harness/acp/frames.test.ts +11 -20
- package/src/server/lib/harness/acp/frames.ts +5 -3
- package/src/server/lib/harness/acp/mapper.ts +5 -41
- package/src/server/lib/harness/acp/one-shot.server.ts +4 -2
- package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
- package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
- package/src/server/lib/harness/acp/session-background.test.ts +2 -1
- package/src/server/lib/harness/acp/session-intake.test.ts +8 -0
- package/src/server/lib/harness/acp/session-intake.ts +12 -3
- package/src/server/lib/harness/acp/session-options.ts +2 -0
- package/src/server/lib/harness/acp/session-process.ts +1 -0
- package/src/server/lib/harness/acp/session-wiring.test.ts +2 -0
- package/src/server/lib/harness/acp/session-wiring.ts +22 -0
- package/src/server/lib/harness/acp/session.ts +3 -3
- package/src/server/lib/harness/acp/stdio.test.ts +52 -0
- package/src/server/lib/harness/acp/stdio.ts +7 -1
- package/src/server/lib/harness/acp/subagent-frames.test.ts +1 -1
- package/src/server/lib/harness/acp/subagent-frames.ts +0 -2
- package/src/server/lib/harness/acp/tool-calls.ts +5 -16
- package/src/server/lib/harness/acp/tool-identity.test.ts +69 -8
- package/src/server/lib/harness/acp/tool-identity.ts +58 -10
- package/src/server/lib/harness/acp/tool-shape.ts +5 -3
- package/src/server/lib/harness/auto-probe.server.ts +2 -2
- package/src/server/lib/harness/codex/transcript.server.test.ts +3 -1
- package/src/server/lib/harness/codex/transcript.server.ts +8 -15
- package/src/server/lib/harness/launch-table.ts +6 -1
- package/src/server/lib/harness/launch.ts +1 -0
- package/src/server/lib/harness/schema.server.ts +37 -0
- package/src/server/lib/harness/session-delete.server.ts +4 -2
- package/src/server/lib/harness/session-import.server.ts +21 -7
- package/src/server/lib/harness/session-store.server.test.ts +12 -0
- package/src/server/lib/harness/session-store.server.ts +21 -6
- package/src/server/lib/harness/session-transcript.server.ts +2 -1
- package/src/server/lib/harness/spawn.server.ts +27 -6
- package/src/server/lib/lifecycle/paths.ts +12 -0
- package/src/server/lib/models/provider-icon-fetch.test.ts +57 -3
- package/src/server/lib/models/provider-icon-fetch.ts +9 -1
- package/src/server/lib/models/provider-icon-store.server.ts +61 -0
- package/src/server/lib/models/provider-icon-store.test.ts +55 -0
- package/src/server/lib/models/provider-icon-svg.ts +57 -0
- package/src/server/lib/omp/session/messages.ts +5 -1
- package/src/server/lib/realtime/topics/peer-relay.server.ts +9 -1
- package/src/server/lib/realtime/topics/session.server.ts +5 -1
- package/src/server/lib/schedule/runtime.server.ts +4 -1
- package/src/server/lib/sessions/dispatch.server.ts +4 -1
- package/src/server/lib/sessions/fork.server.ts +2 -0
- package/src/server/lib/sessions/resolve.server.ts +4 -0
- package/src/server/lib/sessions/spawn.server.ts +4 -2
- package/src/server/lib/tts/engines/adapters.test.ts +50 -8
- package/src/server/lib/tts/engines/deepgram.ts +30 -9
- package/src/server/lib/tts/engines/elevenlabs.ts +6 -0
- package/src/server/lib/tts/engines/gemini.ts +116 -0
- package/src/server/lib/tts/engines/index.ts +14 -0
- package/src/server/lib/tts/engines/local.ts +53 -0
- package/src/server/lib/tts/engines/openai.ts +21 -4
- package/src/server/lib/tts/engines/sherpa-onnx-node.d.ts +38 -0
- package/src/server/lib/tts/engines/sherpa.test.ts +53 -0
- package/src/server/lib/tts/engines/sherpa.ts +287 -0
- package/src/server/lib/tts/local-models.server.ts +257 -0
- package/src/server/lib/tts/local-request.test.ts +66 -0
- package/src/server/lib/tts/local-request.ts +59 -0
- package/src/server/lib/tts/model-manifest.server.test.ts +71 -0
- package/src/server/lib/tts/model-manifest.server.ts +154 -0
- package/src/server/lib/tts/settings.server.ts +7 -4
- package/src/server/lib/tts/wav.test.ts +37 -0
- package/src/server/lib/tts/wav.ts +43 -0
- package/src/server/lib/usage/antigravity-quota.test.ts +249 -0
- package/src/server/lib/usage/antigravity-quota.ts +197 -0
- package/src/server/lib/usage/antigravity.test.ts +20 -0
- package/src/server/lib/usage/antigravity.ts +267 -0
- package/src/server/lib/usage/index-harness.test.ts +162 -0
- package/src/server/lib/usage/index-parse.test.ts +1 -0
- package/src/server/lib/usage/index-parse.ts +12 -4
- package/src/server/lib/usage/index-query.server.ts +64 -2
- package/src/server/lib/usage/index-scan.server.ts +68 -152
- package/src/server/lib/usage/index-schema.server.ts +24 -8
- package/src/server/lib/usage/index-schema.test.ts +54 -0
- package/src/server/lib/usage/index-sources.server.ts +54 -0
- package/src/server/lib/usage/providers.server.test.ts +67 -1
- package/src/server/lib/usage/providers.server.ts +82 -3
- package/src/server/lib/usage/sources/claude.server.ts +187 -0
- package/src/server/lib/usage/sources/claude.test.ts +86 -0
- package/src/server/lib/usage/sources/codex.server.ts +155 -0
- package/src/server/lib/usage/sources/codex.test.ts +53 -0
- package/src/server/lib/usage/sources/dsh.server.ts +120 -0
- package/src/server/lib/usage/sources/dsh.test.ts +49 -0
- package/src/server/lib/usage/sources/helpers.ts +191 -0
- package/src/server/lib/usage/sources/jsonl.server.ts +78 -0
- package/src/server/lib/usage/sources/jsonl.test.ts +72 -0
- package/src/server/lib/usage/sources/omp.server.ts +124 -0
- package/src/server/lib/usage/sources/opencode.server.ts +203 -0
- package/src/server/lib/usage/sources/opencode.test.ts +104 -0
- package/src/server/lib/usage/sources/qwen.server.ts +122 -0
- package/src/server/lib/usage/sources/qwen.test.ts +62 -0
- package/src/server/lib/usage/sources/types.ts +53 -0
- package/src/server/lib/usage/sources/zcode.server.ts +131 -0
- package/src/server/lib/usage/sources/zcode.test.ts +87 -0
- package/src/server/routes/agent/harness-command.ts +2 -0
- package/src/server/routes/agent/prewarm.ts +7 -2
- package/src/server/routes/chat/session-legacy-tools.test.ts +132 -0
- package/src/server/routes/chat/session.ts +10 -4
- package/src/server/routes/harness/accounts.test.ts +99 -0
- package/src/server/routes/harness/accounts.ts +106 -0
- package/src/server/routes/harness/root.ts +13 -1
- package/src/server/routes/sessions/local-image.ts +2 -2
- package/src/server/routes/telemetry/tokens.test.ts +20 -0
- package/src/server/routes/telemetry/tokens.ts +12 -3
- package/src/server/routes/tts/index.ts +2 -0
- package/src/server/routes/tts/models.test.ts +148 -0
- package/src/server/routes/tts/models.ts +89 -0
- package/src/server/routes/tts/speak.test.ts +40 -0
- package/src/shared/lib/chat/tool/normalize.ts +67 -0
- package/src/shared/lib/chat/tool/render-key.test.ts +167 -0
- package/src/shared/lib/chat/tool/render-key.ts +247 -0
- package/src/shared/lib/chat/tool/tool-aliases.test.ts +42 -0
- package/src/shared/lib/chat/tool/tool-aliases.ts +59 -12
- package/src/shared/lib/fs/open-reference.test.ts +64 -0
- package/src/shared/lib/fs/open-reference.ts +74 -0
- package/src/shared/lib/harness/accounts.test.ts +41 -0
- package/src/shared/lib/harness/accounts.ts +175 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +26 -25
- package/src/shared/lib/markdown/ascii-art.test.ts +154 -0
- package/src/shared/lib/markdown/ascii-art.ts +158 -0
- package/src/shared/lib/markdown/inline-file.test.ts +100 -0
- package/src/shared/lib/markdown/inline-file.ts +213 -0
- package/src/shared/lib/markdown/marked.ts +24 -2
- package/src/shared/lib/models/provider/identity.test.ts +34 -0
- package/src/shared/lib/models/provider/identity.ts +28 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +2 -1
- package/src/shared/lib/omp/session/messages-parse.ts +3 -2
- package/src/shared/lib/omp/session/parse-message-blocks.ts +14 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +5 -1
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/tts/engines.test.ts +39 -2
- package/src/shared/lib/tts/engines.ts +87 -61
- package/src/shared/lib/tts/local-models.test.ts +69 -0
- package/src/shared/lib/tts/local-models.ts +200 -0
- package/src/shared/lib/tts/settings.ts +1 -1
- package/src/shared/lib/tts/speakable.test.ts +21 -1
- package/src/shared/lib/tts/speakable.ts +66 -33
- package/src/shared/lib/tts/voices.ts +204 -0
- package/src/shared/lib/workspace/right-side-hidden.ts +57 -0
- package/src/shared/lib/workspace/session-state/store.ts +7 -5
- package/src/shared/types/chat.ts +3 -0
- package/src/shared/types/harness.ts +5 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +12 -0
- package/src/shared/types/tokenUsage.ts +21 -0
- package/src/shared/types/tool-render.ts +37 -0
- package/src/test-support/preload.ts +9 -0
- package/dist/client/static/js/ImageView-g50pk5pt.js +0 -1
- package/dist/client/static/js/LayoutWrapper-tag0qpts.js +0 -2
- package/dist/client/static/js/MergeDiffView-c4mb8m1w.js +0 -1
- package/dist/client/static/js/Modal-pf9p6m1k.js +0 -59
- package/dist/client/static/js/SessionsView-2r1grxxs.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-ee9wjsht.js +0 -1
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-278nx8rt.js +0 -36
- package/dist/client/static/js/bash-36shcpcw.js +0 -1
- package/dist/client/static/js/c-kxeqssf9.js +0 -1
- package/dist/client/static/js/cose-bilkent-JH36ORCC-ydq7mvy0.js +0 -1
- package/dist/client/static/js/cpp-wtk1s3d7.js +0 -1
- package/dist/client/static/js/css-0a0r6rp3.js +0 -1
- package/dist/client/static/js/css-xhnrhg4e.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-gs16zjqa.js +0 -1
- package/dist/client/static/js/diagram-3UASUU5V-06nptkzc.js +0 -24
- package/dist/client/static/js/eventmodeling-NTZA5JFV-ftz7zrz5.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-ax0qfmp3.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-3rtkds4s.js +0 -1
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-5p9mgq7n.js +0 -106
- package/dist/client/static/js/graphql-w9ajhndp.js +0 -1
- package/dist/client/static/js/html-krfbq5wp.js +0 -1
- package/dist/client/static/js/index-05n22cg9.js +0 -4
- package/dist/client/static/js/index-14dgbjsm.js +0 -2
- package/dist/client/static/js/index-2jgx68m0.js +0 -1
- package/dist/client/static/js/index-333rq9yy.js +0 -1
- package/dist/client/static/js/index-38g2eevc.js +0 -314
- package/dist/client/static/js/index-80fjn77c.js +0 -2
- package/dist/client/static/js/index-9wc36am3.css +0 -1
- package/dist/client/static/js/index-bvpzzhn2.js +0 -4
- package/dist/client/static/js/index-e19dbqd3.js +0 -2
- package/dist/client/static/js/index-epzvftkq.js +0 -1
- package/dist/client/static/js/index-fbg5vhhw.js +0 -2
- package/dist/client/static/js/index-mbtenbyc.js +0 -9
- package/dist/client/static/js/index-pv4z2mp2.js +0 -463
- package/dist/client/static/js/index-t522tpxt.js +0 -3
- package/dist/client/static/js/index-xw1bptp5.js +0 -2
- package/dist/client/static/js/index-yr3exz70.js +0 -2
- package/dist/client/static/js/index-zdw8bd5t.js +0 -2
- package/dist/client/static/js/index-zyefab6q.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-vr5mxm6f.js +0 -1
- package/dist/client/static/js/ini-zx7x1jj1.js +0 -1
- package/dist/client/static/js/java-bbw6kdcr.js +0 -1
- package/dist/client/static/js/javascript-p2a8rbpw.js +0 -1
- package/dist/client/static/js/json-zh7m2fyg.js +0 -1
- package/dist/client/static/js/jsx-3zyyt0eh.js +0 -1
- package/dist/client/static/js/lua-d656k76a.js +0 -1
- package/dist/client/static/js/markdown-b5w681mm.js +0 -1
- package/dist/client/static/js/mermaid.core-dzajkp0g.js +0 -12
- package/dist/client/static/js/one-dark-pro-z965dedc.js +0 -1
- package/dist/client/static/js/one-light-capdx801.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ncb5xxtn.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-ff8fpvc4.js +0 -1
- package/dist/client/static/js/properties-3c6rmnqp.js +0 -1
- package/dist/client/static/js/python-a3x3zpv1.js +0 -1
- package/dist/client/static/js/r-7h3gwype.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-gbj4b1hf.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-ndv5tqgr.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-yjzj09s1.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e6pw7e5z.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9734dxy4.js +0 -1
- package/dist/client/static/js/sql-7a5vavm0.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-z4pt2kn1.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-rs10d4p5.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-ey6c5x9f.js +0 -1
- package/dist/client/static/js/tsx-4a9b8tqf.js +0 -1
- package/dist/client/static/js/typescript-kas107wb.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-kd9swrdr.js +0 -1
- package/dist/client/static/js/xml-3g4bdtpa.js +0 -1
- package/dist/client/static/js/yaml-ktxjn917.js +0 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import{t,l,
|
|
2
|
-
`)){if(c!==void 0){let A=o.length-o.trimStart().length;if(o.trim()===""||A>c){d.push(o);continue}c=void 0}let
|
|
3
|
-
`)}t(_1,"stripLineTrailingCommas");var U1=class{constructor(){this.vertexCounter=0,this.config=m(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=O,this.setAccDescription=z,this.setDiagramTitle=
|
|
1
|
+
import{t,l,bt,ya,w,M,O,G,z,j,q,H,m,va,Ji,b,Ar,hr,V,Mn,yt,ct,ut,ar,xc,Pt,Ot,Hn,$t,vt}from"./index-x507ndnc.js";import{Ht}from"./index-ktmb341a.js";import{Za}from"./index-m6zncj00.js";var pt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},y1=new Set([pt.SHAPE_UNSUPPORTED,pt.SHAPE_REMOVED,pt.CONTAINMENT_VIOLATION]),ms=new Set(Object.values(pt).filter((e)=>!y1.has(e))),w1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),N1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),R1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),dt="roundedRect";function ht(e){if(!e)return e;return w1.get(e)??e}t(ht,"resolveShapeAlias");function E1(e,r){for(let n of e){if(n.isGroup)continue;if(!n.shape||n.shape==="squareRect"||n.shape==="rect")n.shape=dt;if(N1.has(n.shape)){let a=`shape "${n.shape}" was removed in v0.8.1, using "${dt}"`;if(r?.emitError)r.emitError("SHAPE_REMOVED",a,{nodeId:n.id});else l.warn(`agentflow: ${a}`);n.shape=dt;continue}if(!R1.has(n.shape)){let a=`shape "${n.shape}" is not supported, using "${dt}"`;if(r?.emitWarning)r.emitWarning("SHAPE_UNSUPPORTED",a,{nodeId:n.id});else l.warn(`agentflow: ${a}`);n.shape=dt}}}t(E1,"normaliseNodeShapes");var Xt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),C1=Xt.size,S1=t((e)=>`af-kind-${e}`,"kindClass"),O1=[...Xt.keys()],x1=t((e)=>Math.max(1,e-C1),"containerSlotCount"),T1=t((e,r)=>{let n=C1+e%x1(r);return r>0?n%r:n},"containerSlot");function D1(e,r,n){let a=m().themeVariables?.borderColorArray,c=Array.isArray(a)?a.length:0,d=n.size;for(let o of e??[]){if(o.isGroup||o.shape==="collapsedGroup"){let k=n.get(String(o.id))??d++;o.colorIndex=T1(k,c);continue}let h=r(String(o.id));if(h&&Xt.has(h))o.cssClasses=`${o.cssClasses??""} ${S1(h)}`.replace(/\s+/g," ").trim()}}t(D1,"assignColorSlots");var A1="agentflow-",i1=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),P1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),G1={flow:"flowGroup"};function qt(e){if(Array.isArray(e))return e.map((n)=>qt(n));if(e===null||typeof e!=="object")return e;let r={};for(let n of Object.keys(e)){if(n==="__proto__"||n==="constructor"||n==="prototype")continue;r[n]=qt(e[n])}return r}t(qt,"stripPrototypeKeys");function _1(e){let r=!1,n=!1,a=0,c,d=[];for(let o of e.split(`
|
|
2
|
+
`)){if(c!==void 0){let A=o.length-o.trimStart().length;if(o.trim()===""||A>c){d.push(o);continue}c=void 0}let h=-1;for(let A=0;A<o.length;A++){let C=o[A];if(n){if(C==="\\")A++;else if(C==='"')n=!1}else if(r){if(C==="'")r=!1}else if(C==='"')n=!0;else if(C==="'")r=!0;else if(C==="#"&&(A===0||o[A-1]===" "||o[A-1]==="\t")){h=A;break}else if(C==="["||C==="{")a++;else if(C==="]"||C==="}")a=Math.max(0,a-1)}if(r||n||a>0){d.push(o);continue}let k=h>=0?o.slice(0,h):o,g=h>=0?o.slice(h):"";if(/:\s*[>|][\d+-]*\s*$/.test(k)){c=o.length-o.trimStart().length,d.push(o);continue}d.push(k.replace(/,([\t ]*)$/,"$1")+g)}return d.join(`
|
|
3
|
+
`)}t(_1,"stripLineTrailingCommas");var U1=class{constructor(){this.vertexCounter=0,this.config=m(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=O,this.setAccDescription=z,this.setDiagramTitle=q,this.getAccTitle=G,this.getAccDescription=j,this.getDiagramTitle=H,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"AgentFlowDB")}sanitizeText(e){return w.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,n,a,c,d,o={},h,k){if(!e||e.trim().length===0)return;let g;if(h!==void 0){let E;if(!h.includes(`
|
|
4
4
|
`))E=`{
|
|
5
|
-
`+
|
|
6
|
-
}`;else E=
|
|
7
|
-
`;try{
|
|
8
|
-
`)?_1(
|
|
9
|
-
`,{schema:
|
|
5
|
+
`+h+`
|
|
6
|
+
}`;else E=h+`
|
|
7
|
+
`;try{g=hr(E,{schema:Ar})??{}}catch(p){let f=h.includes(`
|
|
8
|
+
`)?_1(h):h;if(f!==h)try{g=hr(f+`
|
|
9
|
+
`,{schema:Ar})??{}}catch{this.rethrowMetadataYamlError(p,h,k)}else this.rethrowMetadataYamlError(p,h,k)}g=qt(g)}let A;if(g&&typeof g.shape==="string"){let E=g;A=E.shape;let p=ht(A);if(p&&p!==A)E.shape=p}let C=this.subGraphLookup.get(e);if(C&&g){C.metadata={...C.metadata,...g};return}let L=this.connectors.get(e);if(L&&g){L.metadata={...L.metadata,...g};return}if(e==="connectors")return;let D=this.edges.find((E)=>E.id===e);if(D){let E=g;if(E?.animate!==void 0)D.animate=E.animate;if(E?.animation!==void 0)D.animation=E.animation;if(E?.curve!==void 0)D.interpolate=E.curve;if(g)D.metadata={...D.metadata,...g};return}let P,v=this.vertices.get(e);if(v===void 0)v={id:e,labelType:"text",domId:A1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,v);if(this.vertexCounter++,r!==void 0){if(this.config=m(),P=this.sanitizeText(r.text.trim()),v.labelType=r.type,P.startsWith('"')&&P.endsWith('"'))P=P.substring(1,P.length-1);v.text=P}else if(v.text===void 0)v.text=e;if(n!==void 0)v.type=n;if(a!==void 0&&a!==null)a.forEach((E)=>{v.styles.push(E)});if(c!==void 0&&c!==null)c.forEach((E)=>{v.classes.push(E)});if(d!==void 0)v.dir=d;if(v.props===void 0)v.props=o;else if(o!==void 0)Object.assign(v.props,o);if(g){if(v.metadata={...v.metadata,...g},g.shape){let E=A??g.shape;if(typeof E!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(E)}.`,k);if(E!==E.toLowerCase()||E.includes("_"))throw this.positionedShapeError(`No such shape: ${E}. Shape names should be lowercase.`,k);else if(!xc(g.shape))throw this.positionedShapeError(`No such shape: ${g.shape}.`,k);v.type=g?.shape}if(g?.label)v.text=this.sanitizeText(g.label),v.labelType=this.sanitizeNodeLabelType(g?.labelType)}}positionedShapeError(e,r){let n=Error(e);if(!r)return n;let a=r.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:"",token:null,line:a-1,loc:{first_line:a,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),n}rethrowMetadataYamlError(e,r,n){let a=e;if(!a||a.name!=="YAMLException"||!a.mark||!n)throw e;let c;try{let d=!r.includes(`
|
|
10
10
|
`),o=d?`{
|
|
11
11
|
`+r+`
|
|
12
12
|
}`:r+`
|
|
13
|
-
`,
|
|
13
|
+
`,h=n.first_line+this.frontmatterLineOffset,k=n.first_column+2,g=t((E,p)=>{if(d)return{line:h,column:k+(E===1?p:0)};return{line:h+E,column:E===0?k+p:p}},"toSource"),A=g(a.mark.line,a.mark.column),C=a.reason??(a.message??"").split(`
|
|
14
14
|
`)[0].replace(/\s*\(\d+:\d+\)\s*$/,""),L=o.split(`
|
|
15
|
-
`),D=[];if(d)D.push(1);else for(let E=a.mark.line-1;E<=a.mark.line+1;E++){if(E<0||E>=L.length)continue;if(E===L.length-1&&L[E]===""&&E!==a.mark.line)continue;D.push(E)}let P=Math.max(...D.map((E)=>String(
|
|
15
|
+
`),D=[];if(d)D.push(1);else for(let E=a.mark.line-1;E<=a.mark.line+1;E++){if(E<0||E>=L.length)continue;if(E===L.length-1&&L[E]===""&&E!==a.mark.line)continue;D.push(E)}let P=Math.max(...D.map((E)=>String(g(E,0).line).length)),v=[];for(let E of D){let p=g(E,0).line,f=` ${String(p).padStart(P)} | `;if(v.push(f+L[E].replace(/\t/g,"→")),E===a.mark.line)v.push("-".repeat(f.length+a.mark.column)+"^")}c={message:`${C} (${A.line}:${A.column+1})
|
|
16
16
|
|
|
17
17
|
${v.join(`
|
|
18
|
-
`)}`,markLine:A.line-1,markColumn:A.column,hash:{text:"",token:null,line:A.line-1,loc:{first_line:A.line,last_line:A.line,first_column:A.column,last_column:A.column+1},expected:[]}}}catch{}if(c)a.message=c.message,a.mark.line=c.markLine,a.mark.column=c.markColumn,a.hash=c.hash;throw a}addSingleLink(e,r,n,a){let o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",o);let
|
|
18
|
+
`)}`,markLine:A.line-1,markColumn:A.column,hash:{text:"",token:null,line:A.line-1,loc:{first_line:A.line,last_line:A.line,first_column:A.column,last_column:A.column+1},expected:[]}}}catch{}if(c)a.message=c.message,a.mark.line=c.markLine,a.mark.column=c.markColumn,a.hash=c.hash;throw a}addSingleLink(e,r,n,a){let o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",o);let h=n.text;if(h!==void 0){if(o.text=this.sanitizeText(h.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"'))o.text=o.text.substring(1,o.text.length-1);o.labelType=this.sanitizeNodeLabelType(h.type)}if(n!==void 0){if(o.type=n.type,o.stroke=n.stroke,o.length=n.length>10?10:n.length,n.edgeSemantic)o.edgeSemantic=n.edgeSemantic}if(a&&!this.edges.some((k)=>k.id===a))o.id=a,o.isUserDefinedId=!0;else{let k=this.edges.filter((g)=>g.start===o.start&&g.end===o.end);if(k.length===0)o.id=Mn(o.start,o.end,{counter:0,prefix:"L"});else o.id=Mn(o.start,o.end,{counter:k.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(o);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
19
19
|
|
|
20
20
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
21
21
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
22
|
-
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,n){let a=this.isLinkData(n)?n.id.replace("@",""):void 0;l.info("addLink",e,r,a);for(let c of e)for(let d of r){let o=c===e[e.length-1],p=d===r[0];if(o&&p)this.addSingleLink(c,d,n,a);else this.addSingleLink(c,d,n,void 0)}}updateLinkInterpolate(e,r){e.forEach((n)=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(e,r){e.forEach((n)=>{if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(n==="default")this.edges.defaultStyle=r;else if(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some((a)=>a?.startsWith("fill")))this.edges[n]?.style?.push("fill:none")})}addClass(e,r){let n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((a)=>{let c=this.classes.get(a);if(c===void 0)c={id:a,styles:[],textStyles:[]},this.classes.set(a,c);if(n!==void 0&&n!==null)n.forEach((d)=>{if(/color/.exec(d)){let o=d.replace("fill","bgFill");c.textStyles.push(o)}c.styles.push(d)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let n of e.split(",")){let a=this.vertices.get(n);if(a)a.classes.push(r);let c=this.edges.find((o)=>o.id===n);if(c)c.classes.push(r);let d=this.subGraphLookup.get(n);if(d)d.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}setClickFun(e,r,n){if(m().securityLevel!=="loose")return;if(r===void 0)return;let a=[];if(typeof n==="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let d=0;d<a.length;d++){let o=a[d].trim();if(o.startsWith('"')&&o.endsWith('"'))o=o.substr(1,o.length-2);a[d]=o}}if(a.length===0)a.push(e);let c=this.vertices.get(e);if(c)c.haveCallback=!0,this.funs.push(()=>{let d=this.lookUpDomId(e),o=document.querySelector(`[id="${d}"]`);if(o!==null)o.addEventListener("click",()=>{V.runFunc(r,...a)},!1)})}setLink(e,r,n){e.split(",").forEach((a)=>{let c=this.vertices.get(a);if(c!==void 0)c.link=V.formatUrl(r,this.config),c.linkTarget=n}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach((a)=>{this.setClickFun(a,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(e){return P1.has(e.type)}getTools(){let e=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))e.push(r);return e}getClasses(){return this.classes}setupToolTips(e){let r=Ka();h(e).select("svg").selectAll("g.node").on("mouseover",(c)=>{let d=h(c.currentTarget),o=d.attr("title");if(o===null)return;let p=c.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(d.attr("title")).style("left",window.scrollX+p.left+(p.right-p.left)/2+"px").style("top",window.scrollY+p.bottom+"px"),r.html(Gt.sanitize(o)),d.classed("hover",!0)}).on("mouseout",(c)=>{r.transition().duration(500).style("opacity",0),h(c.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,M()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n,a){let c=e?.text?.trim(),d=n?.text;if(e===n&&n?.text&&/\s/.exec(n.text))c=void 0;let p=t((D)=>{let P={boolean:{},number:{},string:{}},v=[],E;return{nodeList:D.filter(function(g){let _=typeof g;if(g.stmt&&g.stmt==="dir")return E=g.value,!1;if(g.trim()==="")return!1;if(_ in P)return P[_].hasOwnProperty(g)?!1:P[_][g]=!0;else return v.includes(g)?!1:v.push(g)}),dir:E}},"uniq")(r.flat()),{nodeList:k,dir:b}=p,A=m().flowchart??{};if(b=b??(A.inheritDir?this.getDirection()??m().direction??void 0:void 0),this.version==="gen-1")for(let D=0;D<k.length;D++)k[D]=this.lookUpDomId(k[D]);c=c??"subGraph"+this.subCount,d=d||"",d=this.sanitizeText(d),this.subCount=this.subCount+1;let C={id:c,nodes:k.filter((D)=>D!==c&&!this.globalNodes.has(D)),title:d.trim(),classes:[],dir:b,labelType:this.sanitizeNodeLabelType(n?.type),type:a??"flow"};l.info("Adding",C.id,C.nodes,C.dir),C.nodes=this.makeUniq(C,this.subGraphs).nodes;let L=this.getPosForId(c);if(L!==-1){let D=this.subGraphs[L];for(let P of C.nodes)if(!D.nodes.includes(P))D.nodes.push(P);if(C.title)D.title=C.title;if(C.dir)D.dir=C.dir;if(C.type)D.type=C.type;this.subGraphLookup.set(c,D)}else this.subGraphs.push(C),this.subGraphLookup.set(c,C);return c}addGlobal(e){for(let r of e.flat()){if(typeof r!=="string")continue;let n=r.trim();if(n!=="")this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((n)=>!this.globalNodes.has(n))}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let a=0,c=1;while(a<n.length){let d=this.getPosForId(n[a]);if(d>=0){let o=this.indexNodes2(e,d);if(o.result)return{result:!0,count:c+o.count};else c=c+o.count}a=a+1}return{result:!1,count:c}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(e,r){let n=e?.text?.trim();if(!n)return"";let a=r?.text?.trim()??"",c=a.length>0?this.sanitizeText(a):n,d=this.connectors.get(n);if(!d)d={id:n,labelType:"text",domId:A1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:c},this.connectors.set(n,d),this.vertices.set(n,d),this.vertexCounter++;else if(a.length>0)d.text=c;return n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(e,r){if(e==="arrow_point"&&r==="normal")return"sequence";if(e==="arrow_cross"&&r==="normal")return"failure";if(e==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(e){let r=e.trim(),n="arrow_open",a="normal";if(r.includes("."))a="dotted";return{type:"arrow_open",stroke:a}}countChar(e,r){let n=r.length,a=0;for(let c=0;c<n;++c)if(r[c]===e)++a;return a}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross";break;case">":a="arrow_point";break;case"-":case".":a="arrow_open",n=r;break}let c="normal",d=n.length-1,o=this.countChar(".",n);if(o>0)c="dotted",d=o;return{type:a,stroke:c,length:d}}destructLink(e,r){let n=this.destructEndLink(e),a;if(r){if(a=this.destructStartLink(r),a.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};return a.type=n.type,a.length=n.length,{...a,edgeSemantic:this.computeEdgeSemantic(a.type,a.stroke)}}return{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((a,c)=>{if(!this.exists(r,a))n.push(e.nodes[c])}),{nodes:n}}getTypeFromVertex(e){let r=typeof e.type==="string"?pt(e.type):e.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(e,r){return e.find((n)=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,a,c,d){let o=n.get(e.id),p=a.get(e.id)??!1,k=this.findNode(r,e.id);if(k)k.cssStyles=e.styles,k.cssCompiledStyles=this.getCompiledStyles(e.classes),k.cssClasses=e.classes.join(" ");else{let b={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:o,padding:c.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),metadata:e.metadata};if(p)r.push({...b,isGroup:!0,shape:"rect"});else r.push({...b,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:c.agentflow?.wrappingWidth,minWidth:c.agentflow?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let n of e){let a=this.classes.get(n);if(a?.styles)r=[...r,...a.styles??[]].map((c)=>c.trim());if(a?.textStyles)r=[...r,...a.textStyles??[]].map((c)=>c.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let e=m(),r=[],n=[],a=this.getSubGraphs(),c=new Map,d=new Map,o=new Set,p=new Map,k=t((f,g,_=new Set)=>{if(_.has(f))return;_.add(f);let Y=this.subGraphLookup.get(f);if(!Y)return;for(let fe of Y.nodes){if(fe===g||_.has(fe))continue;o.add(fe),p.set(fe,g),k(fe,g,_)}},"collectDescendants");for(let f of a)if(f.metadata?.view==="collapsed"&&!o.has(f.id))k(f.id,f.id);let b=t((f,g)=>{let _=new Set,Y=g;while(Y!==void 0&&!_.has(Y)){if(Y===f)return!0;_.add(Y),Y=c.get(Y)}return!1},"wouldCloseContainmentCycle");for(let f=a.length-1;f>=0;f--){let g=a[f];if(o.has(g.id))continue;if(g.nodes.length>0)d.set(g.id,!0);for(let _ of g.nodes){if(b(_,g.id)){this.emitWarning(ft.CONTAINMENT_VIOLATION,`Container "${g.id}" cannot contain "${_}" because "${_}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:_});continue}c.set(_,g.id)}}for(let f=a.length-1;f>=0;f--){let g=a[f];if(o.has(g.id))continue;if(g.metadata?.view==="collapsed"){let Y={...g.metadata,containerType:g.type};r.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:c.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssClasses:g.classes.join(" "),shape:"collapsedGroup",dir:g.dir,isGroup:!1,look:e.look,metadata:Y})}else r.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:c.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssClasses:g.classes.join(" "),shape:G1[g.type??"flow"],dir:g.dir,isGroup:!0,look:e.look,metadata:g.metadata})}this.getVertices().forEach((f)=>{if(o.has(f.id))return;this.addNodeFromVertex(f,r,c,d,e,e.look||"classic")});let C=this.getEdges();C.forEach((f,g)=>{let _=p.get(f.start)??f.start,Y=p.get(f.end)??f.end;if(_===Y&&f.start!==f.end)return;let{arrowTypeStart:fe,arrowTypeEnd:Se}=this.destructEdgeType(f.type),Ee=[...C.defaultStyle??[]];if(f.style)Ee.push(...f.style);let xe={id:Rn(_,Y,{counter:g,prefix:"L"},f.id),isUserDefinedId:f.isUserDefinedId,start:_,end:Y,type:f.type??"normal",label:f.text,labelType:f.labelType,labelpos:"c",thickness:f.stroke,minlen:f.length,classes:f?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:f?.stroke==="invisible"||f?.type==="arrow_open"?"none":fe,arrowTypeEnd:f?.stroke==="invisible"||f?.type==="arrow_open"?"none":Se,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(f.classes),labelStyle:Ee,style:Ee,pattern:f.stroke,look:e.look,animate:f.animate,animation:f.animation,curve:f.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:f.metadata};n.push(xe)}),E1(r,this);let L=new Map,D=new Map;for(let f of a){let g=c.get(f.id);if(g!==void 0)D.set(g,[...D.get(g)??[],f.id])}let P=0,v=t((f)=>{if(L.has(f))return;L.set(f,P++);for(let g of D.get(f)??[])v(g)},"walkContainers");for(let f of a)if(c.get(f.id)===void 0)v(f.id);let E=new Set(this.getConnectors().map((f)=>f.id));return D1(r,(f)=>{if(E.has(f))return"connector";let g=this.vertices.get(f);return g?this.deriveVertexKind(g,pt(g.type)):void 0},L),{nodes:r,edges:n,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return Ki.flowchart}deriveVertexKind(e,r){if(this.isToolDefinition(e))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map((o)=>o.id)),r=[],n=[];for(let[o,p]of this.vertices){if(e.has(o))continue;if(p.isConnector){let A={id:o};if(p.text!==void 0&&p.text!==o)A.title=p.text;if(p.metadata&&Object.keys(p.metadata).length>0){let C={};for(let[L,D]of Object.entries(p.metadata)){if(i1.has(L))continue;C[L]=D}if(Object.keys(C).length>0)A.metadata=C}n.push(A);continue}let k={id:o};if(p.text!==void 0)k.label=p.text;let b=typeof p.type==="string"?pt(p.type):p.type;if(b!==void 0)k.shape=b;if(k.vertexKind=this.deriveVertexKind(p,b),p.metadata&&Object.keys(p.metadata).length>0){let A={};for(let[C,L]of Object.entries(p.metadata)){if(i1.has(C))continue;A[C]=L}if(Object.keys(A).length>0)k.metadata=A}r.push(k)}let a=this.edges.map((o)=>{let p={start:o.start,end:o.end};if(o.id!==void 0)p.id=o.id;if(typeof o.text==="string"&&o.text.length>0)p.label=o.text;if(o.type!==void 0)p.type=o.type;if(o.stroke!==void 0)p.stroke=o.stroke;if(o.edgeSemantic!==void 0)p.edgeSemantic=o.edgeSemantic;if(o.length!==void 0)p.length=o.length;if(o.metadata&&Object.keys(o.metadata).length>0)p.metadata={...o.metadata};return p}),c=this.subGraphs.map((o)=>{let p={id:o.id,nodes:[...o.nodes]};if(o.type!==void 0)p.type=o.type;if(o.title!==void 0)p.title=o.title;if(o.dir!==void 0)p.direction=o.dir;if(o.metadata&&Object.keys(o.metadata).length>0){let k={};for(let[b,A]of Object.entries(o.metadata)){if(i1.has(b))continue;k[b]=A}if(Object.keys(k).length>0)p.metadata=k}return p}),d={vertices:r,edges:a,subGraphs:c,connectors:n,diagnostics:this.diagnostics};if(this.direction!==void 0)d.direction=this.direction;return d}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let r=e?.first_line??0,n=e?.first_column??0,a=e?.last_line??r,c=e?.last_column??n,[d,o]=e?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:a+this.frontmatterLineOffset,endColumn:c,startIndex:d,endIndex:o}}pushMapping(e,r,n){if(!e)return;let a={id:e,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(a),a}addVertexMapping(e,r,n,a){let c=this.pushMapping(e,"vertex",a);if(c&&n==null)this.bareVertexMappings.add(c)}extendVertexMapping(e,r){if(!e||!r)return;let n=this.toElementPosition(r);for(let a=this.elementMappings.length-1;a>=0;a--){let c=this.elementMappings[a];if(c.type==="vertex"&&c.id===e){if(this.bareVertexMappings.has(c))c.type="attachment",this.bareVertexMappings.delete(c);if(n.endLine>c.position.endLine||n.endLine===c.position.endLine&&n.endColumn>c.position.endColumn)c.position.endLine=n.endLine,c.position.endColumn=n.endColumn,c.position.endIndex=n.endIndex;return}}this.pushMapping(e,"attachment",r)}addEdgeMapping(e,r,n,a){let c=Array.isArray(r)?r.map((o)=>typeof o==="string"?o:o?.id??"").filter(Boolean):[],d=c.length>0?c.join(">"):"edge";this.pushMapping(d,"edge",a)}addSubgraphMapping(e,r,n,a){let c=(typeof e==="string"?e:e?.text)??"",d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;if(!c)return;this.elementMappings.push({id:c,type:"subgraph",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}addConnectorMapping(e,r,n,a){let c=e?.text?.trim()??"";if(!c)return;let d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;this.elementMappings.push({id:c,type:"connector",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find((r)=>r.id===e)}getElementsOnLine(e){return this.elementMappings.filter((r)=>e>=r.position.startLine&&e<=r.position.endLine)}getElementAtPosition(e,r){let n=this.elementMappings.filter((c)=>{let{startLine:d,startColumn:o,endLine:p,endColumn:k}=c.position;if(e<d||e>p)return!1;if(e===d&&r<o)return!1;if(e===p&&r>k)return!1;return!0});if(n.length===0)return;let a=t(({position:c})=>[c.endLine-c.startLine,c.endColumn-c.startColumn],"span");return n.reduce((c,d)=>{let[o,p]=a(c),[k,b]=a(d);if(k!==o)return k<o?d:c;return b<p?d:c})}getMappingStats(){let e=0,r=0,n=0,a=0,c=0;for(let d of this.elementMappings)if(d.type==="vertex")e++;else if(d.type==="edge")r++;else if(d.type==="subgraph")n++;else if(d.type==="connector")a++;else if(d.type==="attachment")c++;return{vertices:e,edges:r,subgraphs:n,connectors:a,attachments:c,totalElements:this.elementMappings.length}}emitDiagnostic(e,r,n,a){let c=a?.nodeId??a?.edgeId,d=c?this.getElementById(c):void 0,o={id:e,severity:r,message:n,...a?.nodeId?{nodeId:a.nodeId}:{},...a?.edgeId&&!a?.nodeId?{edgeId:a.edgeId}:{},...d?{position:d.position}:{}};if(this.diagnostics.some((b)=>b.id===o.id&&b.severity===o.severity&&b.message===o.message&&b.nodeId===o.nodeId&&b.edgeId===o.edgeId))return;this.diagnostics.push(o);let k=`agentflow[${e}]: ${n}`;if(r==="error")l.error(k);else l.warn(k)}emitWarning(e,r,n){this.emitDiagnostic(e,"warning",r,n)}emitError(e,r,n){this.emitDiagnostic(e,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},j1=t(function(e,r){return r.db.getClasses()},"getClasses"),z1=t(async function(e,r,n,a){l.debug("Drawing agentflow diagram",r);let{securityLevel:c,agentflow:d,layout:o}=m();a.db.setDiagramId(r),l.debug("Before getData: ");let p=a.db.getData();l.debug("Data: ",p);let k=Ot(r,c),b=a.db.getDirection();if(p.type=a.type,p.layoutAlgorithm=Pt(o),p.layoutAlgorithm==="dagre"&&o==="elk")l.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");p.direction=b,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,p.markers=["point","circle","cross","hierarchy"],p.diagramId=r,l.debug("REF1:",p),await Ft(p,k);let A=d?.diagramPadding??8;V.insertTitle(k,"agentflowTitleText",d?.titleTopMargin??0,a.db.getDiagramTitle()),bt(k,A,"agentflow",d?.useMaxWidth??!0)},"draw"),W1={getClasses:j1,draw:z1},r1=function(){var e=t(function(we,S,x,T){for(x=x||{},T=we.length;T--;x[we[T]]=S);return x},"o"),r=[1,5],n=[1,4],a=[1,3],c=[1,6],d=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],p=[1,15],k=[1,16],b=[1,17],A=[1,18],C=[1,19],L=[1,26],D=[1,27],P=[1,28],v=[1,30],E=[1,31],f=[1,32],g=[1,55],_=[1,54],Y=[1,34],fe=[1,35],Se=[1,36],Ee=[1,37],xe=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],Ne=[1,39],Re=[1,40],Oe=[1,41],Pe=[1,42],Ge=[1,43],Me=[1,64],F=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ce=[1,70],de=[1,68],he=[1,67],pe=[1,69],We=[8,9,10,12,78,80,81],Ke=[1,88],He=[1,101],Ye=[1,106],qe=[1,105],Xe=[1,102],Qe=[1,98],Je=[1,104],Ze=[1,100],$e=[1,107],et=[1,103],tt=[1,108],rt=[1,99],Ue=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],be=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],n1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],nt=[47,63,92,105,108,109,112,114,117,118,119],a1=[1,131],o1=[1,132],gt=[1,134],kt=[1,133],u1=[47,63,65,77,92,105,108,109,112,114,117,118,119],mt=[1,143],Et=[1,157],Ct=[1,158],St=[1,159],xt=[1,162],Tt=[1,161],Dt=[1,160],_t=[1,145],vt=[1,147],Vt=[1,151],l1=[1,139],c1=[1,140],It=[1,152],Lt=[1,153],Bt=[1,154],Mt=[1,155],yt=[1,156],wt=[1,163],Nt=[1,164],Rt=[1,141],Ut=[1,142],jt=[1,149],zt=[1,144],Wt=[1,148],Kt=[1,146],at=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],d1=[1,168],ot=[1,170],X=[8,9,10,12],ke=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],B=[1,190],ue=[1,186],le=[1,187],y=[1,191],N=[1,188],R=[1,189],ut=[80,119,122],U=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],h1=[11,109],ye=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Te=[1,269],De=[1,267],_e=[1,271],ve=[1,265],Fe=[1,266],Ve=[1,268],Ie=[1,270],Le=[1,272],lt=[1,292],p1=[8,9,10,12,109],Ce=[8,9,10,11,12,63,87,108,109,112,113,114,115],Jt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(function(S,x,T,u,W,s,I){var i=s.length-1;switch(W){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:u.setDirection("TB"),this.$="TB";break;case 14:u.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-6],s[i-4],I[i-8],I[i]);break;case 39:if(this.$=u.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],I[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-7],s[i-5],I[i-9],I[i]);break;case 40:if(this.$=u.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-3],{text:"",type:"text"},I[i-5],I[i]);break;case 41:if(this.$=u.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],I[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-4],{text:"",type:"text"},I[i-6],I[i]);break;case 42:if(this.$=u.addSubGraph(void 0,s[i-1],void 0,"flow"),u.addSubgraphMapping)u.addSubgraphMapping(void 0,void 0,I[i-3],I[i]);break;case 43:u.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=u.addConnector(s[i-4],s[i-2]),u.addConnectorMapping)u.addConnectorMapping(s[i-4],s[i-2],I[i-6],I[i]);break;case 45:if(this.$=u.addConnector(s[i-5],s[i-3]),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],I[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-5],s[i-3],I[i-7],I[i]);break;case 46:if(this.$=u.addConnector(s[i-1],{text:"",type:"text"}),u.addConnectorMapping)u.addConnectorMapping(s[i-1],{text:"",type:"text"},I[i-3],I[i]);break;case 47:if(this.$=u.addConnector(s[i-2],{text:"",type:"text"}),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],I[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-2],{text:"",type:"text"},I[i-4],I[i]);break;case 49:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],I[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],I[i]);if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(u.addLink(s[i-2].stmt,s[i],s[i-1]),u.addEdgeMapping)u.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],I[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],I[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],I[i-4]),u.extendVertexMapping)u.extendVertexMapping(s[i-5][s[i-5].length-1],I[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),u.addVertexMapping)u.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],u.addVertex(s[i]),u.addVertexMapping)u.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1]};break;case 91:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic};break;case 97:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:n,11:a,13:c},{1:[3]},e(d,o,{5:7}),{4:8,8:r,10:n,11:a,13:c},{4:9,8:r,10:n,11:a,13:c},{4:10,8:r,10:n,11:a,13:c},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(d,[2,10]),e(d,[2,11]),e(d,[2,12]),e(d,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:Me,16:59,19:62},e(F,[2,3]),e(F,[2,4]),e(F,[2,5]),e(F,[2,6]),e(F,[2,7]),e(F,[2,8]),e(F,[2,9]),{8:ce,9:de,10:he,12:pe,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ce,9:de,10:he,12:pe,22:75},{8:ce,9:de,10:he,12:pe,22:76},{8:ce,9:de,10:he,12:pe,22:77},{8:ce,9:de,10:he,12:pe,22:78},{8:ce,9:de,10:he,12:pe,22:79},{8:ce,9:de,10:he,11:[1,80],12:pe,22:81},{8:ce,9:de,10:he,12:pe,22:82},{11:[1,83]},e(F,[2,48]),{39:[1,84]},{41:[1,85]},e(F,[2,51]),e(We,[2,63],{19:86,34:87,11:Me,43:Ke}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:He,47:Ye,63:qe,83:[1,96],92:Xe,98:[1,93],100:[1,94],104:95,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:rt,123:97},e(F,[2,200]),e(F,[2,201]),e(F,[2,202]),e(F,[2,203]),e(F,[2,204]),e(Ue,[2,64]),e(Ue,[2,67],{49:[1,109]}),e(oe,[2,85],{116:122,30:[1,110],47:g,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:_,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(be,[2,196]),e(be,[2,157]),e(be,[2,158]),e(be,[2,159]),e(be,[2,160]),e(be,[2,161]),e(be,[2,162]),e(be,[2,163]),e(be,[2,164]),e(be,[2,165]),e(be,[2,166]),e(be,[2,167]),e(d,[2,14]),e(d,[2,20]),e(d,[2,21]),{10:[1,123]},e(d,[2,23]),e(n1,[2,31],{19:124,11:Me}),e(F,[2,32]),{45:125,46:44,47:g,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(F,[2,52]),e(F,[2,53]),e(F,[2,54]),e(F,[2,55]),e(nt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:a1,84:o1,119:gt,122:kt},{78:[1,135],80:[1,136]},e(u1,[2,96]),e(F,[2,33]),e(F,[2,34]),e(F,[2,35]),e(F,[2,36]),e(F,[2,37]),{11:mt,13:Et,15:Ct,28:St,29:137,33:xt,35:Tt,36:Dt,47:_t,63:vt,78:Vt,83:l1,84:c1,86:150,87:It,88:Lt,89:Bt,90:Mt,91:yt,92:wt,93:Nt,94:138,108:Rt,112:Ut,114:jt,117:zt,118:Wt,119:Kt},e(at,o,{5:165}),e(at,o,{5:166}),{11:mt,13:Et,15:Ct,28:St,29:167,33:xt,35:Tt,36:Dt,47:_t,63:vt,78:Vt,83:l1,84:c1,86:150,87:It,88:Lt,89:Bt,90:Mt,91:yt,92:wt,93:Nt,94:138,108:Rt,112:Ut,114:jt,117:zt,118:Wt,119:Kt},e(F,[2,49]),e(F,[2,50]),e(We,[2,61],{47:d1}),e(We,[2,62],{19:169,11:Me,43:ot}),e(Ue,[2,57]),{47:g,50:171,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:g,50:175,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:g,50:176,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(X,[2,130],{123:181,11:[1,180],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:rt}),e(X,[2,132],{11:[1,182]}),e(ke,[2,198]),e(ke,[2,185]),e(ke,[2,186]),e(ke,[2,187]),e(ke,[2,188]),e(ke,[2,189]),e(ke,[2,190]),e(ke,[2,191]),e(ke,[2,192]),e(ke,[2,193]),e(ke,[2,194]),e(ke,[2,195]),{47:g,50:183,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:192,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:194,53:[1,193],70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:195,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:196,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:197,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{112:[1,198]},{31:199,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:200,68:[1,201],70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:202,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:203,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:204,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(be,[2,197]),e(d,[2,22]),e(n1,[2,30]),e(We,[2,59],{34:205,19:206,11:Me,43:Ke}),e(nt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{80:[1,210],82:211,119:gt,122:kt},e(ut,[2,92]),e(ut,[2,94]),e(ut,[2,95]),e(ut,[2,183]),e(ut,[2,184]),{79:212,82:130,83:a1,84:o1,119:gt,122:kt},e(u1,[2,97]),{8:ce,9:de,10:he,11:mt,12:pe,13:Et,15:Ct,22:214,28:St,30:[1,213],33:xt,34:215,35:Tt,36:Dt,43:Ke,47:_t,63:vt,78:Vt,86:150,87:It,88:Lt,89:Bt,90:Mt,91:yt,92:wt,93:Nt,94:216,108:Rt,112:Ut,114:jt,117:zt,118:Wt,119:Kt},e(U,[2,116]),e(U,[2,118]),e(U,[2,119]),e(U,[2,172]),e(U,[2,173]),e(U,[2,174]),e(U,[2,175]),e(U,[2,176]),e(U,[2,177]),e(U,[2,178]),e(U,[2,179]),e(U,[2,180]),e(U,[2,181]),e(U,[2,182]),e(U,[2,103]),e(U,[2,104]),e(U,[2,105]),e(U,[2,106]),e(U,[2,107]),e(U,[2,108]),e(U,[2,109]),e(U,[2,110]),e(U,[2,111]),e(U,[2,112]),e(U,[2,113]),e(U,[2,114]),e(U,[2,115]),{6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,217],35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,218],35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,11:mt,12:pe,13:Et,15:Ct,22:220,28:St,30:[1,219],33:xt,34:221,35:Tt,36:Dt,43:Ke,47:_t,63:vt,78:Vt,86:150,87:It,88:Lt,89:Bt,90:Mt,91:yt,92:wt,93:Nt,94:216,108:Rt,112:Ut,114:jt,117:zt,118:Wt,119:Kt},{11:Me,19:222},{47:[1,223]},e(Ue,[2,56]),{11:[1,224],47:g,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},e(h1,[2,143]),{11:[1,228],47:g,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:g,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},e(X,[2,124],{11:[1,231]}),e(X,[2,126],{11:[1,232]}),{83:[1,233]},e(ke,[2,199]),{83:[1,234],101:[1,235]},e(Ue,[2,68],{116:122,47:g,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:B,85:237,119:y,120:N,121:R},e(ye,[2,99]),e(ye,[2,101]),e(ye,[2,102]),e(ye,[2,168]),e(ye,[2,169]),e(ye,[2,170]),e(ye,[2,171]),{52:[1,238],70:B,85:237,119:y,120:N,121:R},{31:239,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{54:[1,240],70:B,85:237,119:y,120:N,121:R},{56:[1,241],70:B,85:237,119:y,120:N,121:R},{58:[1,242],70:B,85:237,119:y,120:N,121:R},{60:[1,243],70:B,85:237,119:y,120:N,121:R},{63:[1,244]},{67:[1,245],70:B,85:237,119:y,120:N,121:R},{69:[1,246],70:B,85:237,119:y,120:N,121:R},{31:247,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{32:[1,248],70:B,85:237,119:y,120:N,121:R},{70:B,72:[1,249],74:[1,250],85:237,119:y,120:N,121:R},{70:B,72:[1,252],74:[1,251],85:237,119:y,120:N,121:R},e(We,[2,58],{19:169,11:Me,43:ot}),e(We,[2,60],{47:d1}),e(nt,[2,88]),e(nt,[2,87]),{65:[1,253],70:B,85:237,119:y,120:N,121:R},e(nt,[2,90]),e(ut,[2,93]),{80:[1,254],82:211,119:gt,122:kt},{31:255,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(at,o,{5:256}),{8:ce,9:de,10:he,12:pe,22:257,43:ot},e(U,[2,117]),e(F,[2,42]),e(F,[2,43]),{31:258,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(F,[2,46]),{8:ce,9:de,10:he,12:pe,22:259,43:ot},{46:260,47:g,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:Me,19:261},{11:Te,63:De,87:_e,95:262,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:273,107:[1,274],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:275,107:[1,276],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{108:[1,277]},{11:Te,63:De,87:_e,95:278,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{47:g,50:279,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(X,[2,131]),e(X,[2,133],{11:[1,283]}),e(X,[2,134]),e(oe,[2,69]),e(ye,[2,100]),e(oe,[2,70]),{54:[1,284],70:B,85:237,119:y,120:N,121:R},e(oe,[2,77]),e(oe,[2,72]),e(oe,[2,73]),e(oe,[2,74]),{112:[1,285]},e(oe,[2,76]),e(oe,[2,78]),{69:[1,286],70:B,85:237,119:y,120:N,121:R},e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,83]),e(oe,[2,82]),e(oe,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(nt,[2,91]),{32:[1,287],70:B,85:237,119:y,120:N,121:R},{6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,288],35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(at,o,{5:289}),{32:[1,290],70:B,85:237,119:y,120:N,121:R},e(F,[2,47]),e(Ue,[2,66]),{46:291,47:g,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,136],{109:lt}),e(p1,[2,145],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(Ce,[2,147]),e(Ce,[2,149]),e(Ce,[2,150]),e(Ce,[2,151]),e(Ce,[2,152]),e(Ce,[2,153]),e(Ce,[2,154]),e(Ce,[2,155]),e(Ce,[2,156]),e(X,[2,137],{109:lt}),{11:[1,294]},e(X,[2,138],{109:lt}),{11:[1,295]},e(h1,[2,144]),e(X,[2,120],{109:lt}),e(X,[2,121],{116:122,47:g,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(X,[2,125]),e(X,[2,127],{11:[1,296]}),e(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ce,9:de,10:he,12:pe,22:301,34:302,43:Ke},e(F,[2,40]),{6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,303],35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,12:pe,22:304,34:305,43:Ke},e(Ue,[2,65]),{11:Te,63:De,87:_e,108:ve,110:306,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(Ce,[2,148]),{15:He,47:Ye,63:qe,92:Xe,104:307,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:rt,123:97},{15:He,47:Ye,63:qe,92:Xe,104:308,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:rt,123:97},{101:[1,309]},e(X,[2,135]),e(oe,[2,71]),{31:310,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(oe,[2,79]),e(at,o,{5:311}),{8:ce,9:de,10:he,12:pe,22:312,43:ot},e(F,[2,41]),e(F,[2,44]),{8:ce,9:de,10:he,12:pe,22:313,43:ot},e(p1,[2,146],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(X,[2,141],{123:181,11:[1,314],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:rt}),e(X,[2,142],{123:181,11:[1,315],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:rt}),e(X,[2,129]),{32:[1,316],70:B,85:237,119:y,120:N,121:R},{6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,317],35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(at,o,{5:318}),e(F,[2,45]),{11:Te,63:De,87:_e,95:319,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:320,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(oe,[2,75]),e(F,[2,38]),{6:13,7:14,8:p,9:k,10:b,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,321],35:D,36:P,37:29,38:v,40:E,42:f,45:33,46:44,47:g,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(X,[2,139],{109:lt}),e(X,[2,140],{109:lt}),e(F,[2,39])],defaultActions:{},parseError:t(function(S,x){if(x.recoverable)this.trace(S);else{var T=Error(S);throw T.hash=x,T}},"parseError"),parse:t(function(S){var x=this,T=[0],u=[],W=[null],s=[],I=this.table,i="",K=0,f1=0,g1=0,I1=2,b1=1,L1=s.slice.call(arguments,1),ae=Object.create(this.lexer),je={yy:{}};for(var Zt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Zt))je.yy[Zt]=this.yy[Zt];if(ae.setInput(S,je.yy),je.yy.lexer=ae,je.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var $t=ae.yylloc;s.push($t);var B1=ae.options&&ae.options.ranges;if(typeof je.yy.parseError==="function")this.parseError=je.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function M1(Ae){T.length=T.length-2*Ae,W.length=W.length-Ae,s.length=s.length-Ae}t(M1,"popStack");function k1(){var Ae=u.pop()||ae.lex()||b1;if(typeof Ae!=="number"){if(Ae instanceof Array)u=Ae,Ae=u.pop();Ae=x.symbols_[Ae]||Ae}return Ae}t(k1,"lex");var ge,e1,ze,me,Q1,t1,ct={},Yt,Be,m1,qt;while(!0){if(ze=T[T.length-1],this.defaultActions[ze])me=this.defaultActions[ze];else{if(ge===null||typeof ge>"u")ge=k1();me=I[ze]&&I[ze][ge]}if(typeof me>"u"||!me.length||!me[0]){var s1="";qt=[];for(Yt in I[ze])if(this.terminals_[Yt]&&Yt>I1)qt.push("'"+this.terminals_[Yt]+"'");if(ae.showPosition)s1="Parse error on line "+(K+1)+`:
|
|
22
|
+
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,n){let a=this.isLinkData(n)?n.id.replace("@",""):void 0;l.info("addLink",e,r,a);for(let c of e)for(let d of r){let o=c===e[e.length-1],h=d===r[0];if(o&&h)this.addSingleLink(c,d,n,a);else this.addSingleLink(c,d,n,void 0)}}updateLinkInterpolate(e,r){e.forEach((n)=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(e,r){e.forEach((n)=>{if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(n==="default")this.edges.defaultStyle=r;else if(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some((a)=>a?.startsWith("fill")))this.edges[n]?.style?.push("fill:none")})}addClass(e,r){let n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((a)=>{let c=this.classes.get(a);if(c===void 0)c={id:a,styles:[],textStyles:[]},this.classes.set(a,c);if(n!==void 0&&n!==null)n.forEach((d)=>{if(/color/.exec(d)){let o=d.replace("fill","bgFill");c.textStyles.push(o)}c.styles.push(d)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let n of e.split(",")){let a=this.vertices.get(n);if(a)a.classes.push(r);let c=this.edges.find((o)=>o.id===n);if(c)c.classes.push(r);let d=this.subGraphLookup.get(n);if(d)d.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}setClickFun(e,r,n){if(m().securityLevel!=="loose")return;if(r===void 0)return;let a=[];if(typeof n==="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let d=0;d<a.length;d++){let o=a[d].trim();if(o.startsWith('"')&&o.endsWith('"'))o=o.substr(1,o.length-2);a[d]=o}}if(a.length===0)a.push(e);let c=this.vertices.get(e);if(c)c.haveCallback=!0,this.funs.push(()=>{let d=this.lookUpDomId(e),o=document.querySelector(`[id="${d}"]`);if(o!==null)o.addEventListener("click",()=>{V.runFunc(r,...a)},!1)})}setLink(e,r,n){e.split(",").forEach((a)=>{let c=this.vertices.get(a);if(c!==void 0)c.link=V.formatUrl(r,this.config),c.linkTarget=n}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach((a)=>{this.setClickFun(a,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(e){return P1.has(e.type)}getTools(){let e=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))e.push(r);return e}getClasses(){return this.classes}setupToolTips(e){let r=Za();b(e).select("svg").selectAll("g.node").on("mouseover",(c)=>{let d=b(c.currentTarget),o=d.attr("title");if(o===null)return;let h=c.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(d.attr("title")).style("left",window.scrollX+h.left+(h.right-h.left)/2+"px").style("top",window.scrollY+h.bottom+"px"),r.html(Ht.sanitize(o)),d.classed("hover",!0)}).on("mouseout",(c)=>{r.transition().duration(500).style("opacity",0),b(c.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,M()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n,a){let c=e?.text?.trim(),d=n?.text;if(e===n&&n?.text&&/\s/.exec(n.text))c=void 0;let h=t((D)=>{let P={boolean:{},number:{},string:{}},v=[],E;return{nodeList:D.filter(function(f){let _=typeof f;if(f.stmt&&f.stmt==="dir")return E=f.value,!1;if(f.trim()==="")return!1;if(_ in P)return P[_].hasOwnProperty(f)?!1:P[_][f]=!0;else return v.includes(f)?!1:v.push(f)}),dir:E}},"uniq")(r.flat()),{nodeList:k,dir:g}=h,A=m().flowchart??{};if(g=g??(A.inheritDir?this.getDirection()??m().direction??void 0:void 0),this.version==="gen-1")for(let D=0;D<k.length;D++)k[D]=this.lookUpDomId(k[D]);c=c??"subGraph"+this.subCount,d=d||"",d=this.sanitizeText(d),this.subCount=this.subCount+1;let C={id:c,nodes:k.filter((D)=>D!==c&&!this.globalNodes.has(D)),title:d.trim(),classes:[],dir:g,labelType:this.sanitizeNodeLabelType(n?.type),type:a??"flow"};l.info("Adding",C.id,C.nodes,C.dir),C.nodes=this.makeUniq(C,this.subGraphs).nodes;let L=this.getPosForId(c);if(L!==-1){let D=this.subGraphs[L];for(let P of C.nodes)if(!D.nodes.includes(P))D.nodes.push(P);if(C.title)D.title=C.title;if(C.dir)D.dir=C.dir;if(C.type)D.type=C.type;this.subGraphLookup.set(c,D)}else this.subGraphs.push(C),this.subGraphLookup.set(c,C);return c}addGlobal(e){for(let r of e.flat()){if(typeof r!=="string")continue;let n=r.trim();if(n!=="")this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((n)=>!this.globalNodes.has(n))}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let a=0,c=1;while(a<n.length){let d=this.getPosForId(n[a]);if(d>=0){let o=this.indexNodes2(e,d);if(o.result)return{result:!0,count:c+o.count};else c=c+o.count}a=a+1}return{result:!1,count:c}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(e,r){let n=e?.text?.trim();if(!n)return"";let a=r?.text?.trim()??"",c=a.length>0?this.sanitizeText(a):n,d=this.connectors.get(n);if(!d)d={id:n,labelType:"text",domId:A1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:c},this.connectors.set(n,d),this.vertices.set(n,d),this.vertexCounter++;else if(a.length>0)d.text=c;return n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(e,r){if(e==="arrow_point"&&r==="normal")return"sequence";if(e==="arrow_cross"&&r==="normal")return"failure";if(e==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(e){let r=e.trim(),n="arrow_open",a="normal";if(r.includes("."))a="dotted";return{type:"arrow_open",stroke:a}}countChar(e,r){let n=r.length,a=0;for(let c=0;c<n;++c)if(r[c]===e)++a;return a}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross";break;case">":a="arrow_point";break;case"-":case".":a="arrow_open",n=r;break}let c="normal",d=n.length-1,o=this.countChar(".",n);if(o>0)c="dotted",d=o;return{type:a,stroke:c,length:d}}destructLink(e,r){let n=this.destructEndLink(e),a;if(r){if(a=this.destructStartLink(r),a.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};return a.type=n.type,a.length=n.length,{...a,edgeSemantic:this.computeEdgeSemantic(a.type,a.stroke)}}return{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((a,c)=>{if(!this.exists(r,a))n.push(e.nodes[c])}),{nodes:n}}getTypeFromVertex(e){let r=typeof e.type==="string"?ht(e.type):e.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(e,r){return e.find((n)=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,a,c,d){let o=n.get(e.id),h=a.get(e.id)??!1,k=this.findNode(r,e.id);if(k)k.cssStyles=e.styles,k.cssCompiledStyles=this.getCompiledStyles(e.classes),k.cssClasses=e.classes.join(" ");else{let g={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:o,padding:c.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),metadata:e.metadata};if(h)r.push({...g,isGroup:!0,shape:"rect"});else r.push({...g,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:c.agentflow?.wrappingWidth,minWidth:c.agentflow?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let n of e){let a=this.classes.get(n);if(a?.styles)r=[...r,...a.styles??[]].map((c)=>c.trim());if(a?.textStyles)r=[...r,...a.textStyles??[]].map((c)=>c.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let e=m(),r=[],n=[],a=this.getSubGraphs(),c=new Map,d=new Map,o=new Set,h=new Map,k=t((p,f,_=new Set)=>{if(_.has(p))return;_.add(p);let Y=this.subGraphLookup.get(p);if(!Y)return;for(let fe of Y.nodes){if(fe===f||_.has(fe))continue;o.add(fe),h.set(fe,f),k(fe,f,_)}},"collectDescendants");for(let p of a)if(p.metadata?.view==="collapsed"&&!o.has(p.id))k(p.id,p.id);let g=t((p,f)=>{let _=new Set,Y=f;while(Y!==void 0&&!_.has(Y)){if(Y===p)return!0;_.add(Y),Y=c.get(Y)}return!1},"wouldCloseContainmentCycle");for(let p=a.length-1;p>=0;p--){let f=a[p];if(o.has(f.id))continue;if(f.nodes.length>0)d.set(f.id,!0);for(let _ of f.nodes){if(g(_,f.id)){this.emitWarning(pt.CONTAINMENT_VIOLATION,`Container "${f.id}" cannot contain "${_}" because "${_}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:_});continue}c.set(_,f.id)}}for(let p=a.length-1;p>=0;p--){let f=a[p];if(o.has(f.id))continue;if(f.metadata?.view==="collapsed"){let Y={...f.metadata,containerType:f.type};r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:c.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"collapsedGroup",dir:f.dir,isGroup:!1,look:e.look,metadata:Y})}else r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:c.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:G1[f.type??"flow"],dir:f.dir,isGroup:!0,look:e.look,metadata:f.metadata})}this.getVertices().forEach((p)=>{if(o.has(p.id))return;this.addNodeFromVertex(p,r,c,d,e,e.look||"classic")});let C=this.getEdges();C.forEach((p,f)=>{let _=h.get(p.start)??p.start,Y=h.get(p.end)??p.end;if(_===Y&&p.start!==p.end)return;let{arrowTypeStart:fe,arrowTypeEnd:Se}=this.destructEdgeType(p.type),Ee=[...C.defaultStyle??[]];if(p.style)Ee.push(...p.style);let xe={id:Mn(_,Y,{counter:f,prefix:"L"},p.id),isUserDefinedId:p.isUserDefinedId,start:_,end:Y,type:p.type??"normal",label:p.text,labelType:p.labelType,labelpos:"c",thickness:p.stroke,minlen:p.length,classes:p?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":fe,arrowTypeEnd:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":Se,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(p.classes),labelStyle:Ee,style:Ee,pattern:p.stroke,look:e.look,animate:p.animate,animation:p.animation,curve:p.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:p.metadata};n.push(xe)}),E1(r,this);let L=new Map,D=new Map;for(let p of a){let f=c.get(p.id);if(f!==void 0)D.set(f,[...D.get(f)??[],p.id])}let P=0,v=t((p)=>{if(L.has(p))return;L.set(p,P++);for(let f of D.get(p)??[])v(f)},"walkContainers");for(let p of a)if(c.get(p.id)===void 0)v(p.id);let E=new Set(this.getConnectors().map((p)=>p.id));return D1(r,(p)=>{if(E.has(p))return"connector";let f=this.vertices.get(p);return f?this.deriveVertexKind(f,ht(f.type)):void 0},L),{nodes:r,edges:n,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return Ji.flowchart}deriveVertexKind(e,r){if(this.isToolDefinition(e))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map((o)=>o.id)),r=[],n=[];for(let[o,h]of this.vertices){if(e.has(o))continue;if(h.isConnector){let A={id:o};if(h.text!==void 0&&h.text!==o)A.title=h.text;if(h.metadata&&Object.keys(h.metadata).length>0){let C={};for(let[L,D]of Object.entries(h.metadata)){if(i1.has(L))continue;C[L]=D}if(Object.keys(C).length>0)A.metadata=C}n.push(A);continue}let k={id:o};if(h.text!==void 0)k.label=h.text;let g=typeof h.type==="string"?ht(h.type):h.type;if(g!==void 0)k.shape=g;if(k.vertexKind=this.deriveVertexKind(h,g),h.metadata&&Object.keys(h.metadata).length>0){let A={};for(let[C,L]of Object.entries(h.metadata)){if(i1.has(C))continue;A[C]=L}if(Object.keys(A).length>0)k.metadata=A}r.push(k)}let a=this.edges.map((o)=>{let h={start:o.start,end:o.end};if(o.id!==void 0)h.id=o.id;if(typeof o.text==="string"&&o.text.length>0)h.label=o.text;if(o.type!==void 0)h.type=o.type;if(o.stroke!==void 0)h.stroke=o.stroke;if(o.edgeSemantic!==void 0)h.edgeSemantic=o.edgeSemantic;if(o.length!==void 0)h.length=o.length;if(o.metadata&&Object.keys(o.metadata).length>0)h.metadata={...o.metadata};return h}),c=this.subGraphs.map((o)=>{let h={id:o.id,nodes:[...o.nodes]};if(o.type!==void 0)h.type=o.type;if(o.title!==void 0)h.title=o.title;if(o.dir!==void 0)h.direction=o.dir;if(o.metadata&&Object.keys(o.metadata).length>0){let k={};for(let[g,A]of Object.entries(o.metadata)){if(i1.has(g))continue;k[g]=A}if(Object.keys(k).length>0)h.metadata=k}return h}),d={vertices:r,edges:a,subGraphs:c,connectors:n,diagnostics:this.diagnostics};if(this.direction!==void 0)d.direction=this.direction;return d}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let r=e?.first_line??0,n=e?.first_column??0,a=e?.last_line??r,c=e?.last_column??n,[d,o]=e?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:a+this.frontmatterLineOffset,endColumn:c,startIndex:d,endIndex:o}}pushMapping(e,r,n){if(!e)return;let a={id:e,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(a),a}addVertexMapping(e,r,n,a){let c=this.pushMapping(e,"vertex",a);if(c&&n==null)this.bareVertexMappings.add(c)}extendVertexMapping(e,r){if(!e||!r)return;let n=this.toElementPosition(r);for(let a=this.elementMappings.length-1;a>=0;a--){let c=this.elementMappings[a];if(c.type==="vertex"&&c.id===e){if(this.bareVertexMappings.has(c))c.type="attachment",this.bareVertexMappings.delete(c);if(n.endLine>c.position.endLine||n.endLine===c.position.endLine&&n.endColumn>c.position.endColumn)c.position.endLine=n.endLine,c.position.endColumn=n.endColumn,c.position.endIndex=n.endIndex;return}}this.pushMapping(e,"attachment",r)}addEdgeMapping(e,r,n,a){let c=Array.isArray(r)?r.map((o)=>typeof o==="string"?o:o?.id??"").filter(Boolean):[],d=c.length>0?c.join(">"):"edge";this.pushMapping(d,"edge",a)}addSubgraphMapping(e,r,n,a){let c=(typeof e==="string"?e:e?.text)??"",d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;if(!c)return;this.elementMappings.push({id:c,type:"subgraph",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}addConnectorMapping(e,r,n,a){let c=e?.text?.trim()??"";if(!c)return;let d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;this.elementMappings.push({id:c,type:"connector",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find((r)=>r.id===e)}getElementsOnLine(e){return this.elementMappings.filter((r)=>e>=r.position.startLine&&e<=r.position.endLine)}getElementAtPosition(e,r){let n=this.elementMappings.filter((c)=>{let{startLine:d,startColumn:o,endLine:h,endColumn:k}=c.position;if(e<d||e>h)return!1;if(e===d&&r<o)return!1;if(e===h&&r>k)return!1;return!0});if(n.length===0)return;let a=t(({position:c})=>[c.endLine-c.startLine,c.endColumn-c.startColumn],"span");return n.reduce((c,d)=>{let[o,h]=a(c),[k,g]=a(d);if(k!==o)return k<o?d:c;return g<h?d:c})}getMappingStats(){let e=0,r=0,n=0,a=0,c=0;for(let d of this.elementMappings)if(d.type==="vertex")e++;else if(d.type==="edge")r++;else if(d.type==="subgraph")n++;else if(d.type==="connector")a++;else if(d.type==="attachment")c++;return{vertices:e,edges:r,subgraphs:n,connectors:a,attachments:c,totalElements:this.elementMappings.length}}emitDiagnostic(e,r,n,a){let c=a?.nodeId??a?.edgeId,d=c?this.getElementById(c):void 0,o={id:e,severity:r,message:n,...a?.nodeId?{nodeId:a.nodeId}:{},...a?.edgeId&&!a?.nodeId?{edgeId:a.edgeId}:{},...d?{position:d.position}:{}};if(this.diagnostics.some((g)=>g.id===o.id&&g.severity===o.severity&&g.message===o.message&&g.nodeId===o.nodeId&&g.edgeId===o.edgeId))return;this.diagnostics.push(o);let k=`agentflow[${e}]: ${n}`;if(r==="error")l.error(k);else l.warn(k)}emitWarning(e,r,n){this.emitDiagnostic(e,"warning",r,n)}emitError(e,r,n){this.emitDiagnostic(e,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},j1=t(function(e,r){return r.db.getClasses()},"getClasses"),z1=t(async function(e,r,n,a){l.debug("Drawing agentflow diagram",r);let{securityLevel:c,agentflow:d,layout:o}=m();a.db.setDiagramId(r),l.debug("Before getData: ");let h=a.db.getData();l.debug("Data: ",h);let k=$t(r,c),g=a.db.getDirection();if(h.type=a.type,h.layoutAlgorithm=Ot(o),h.layoutAlgorithm==="dagre"&&o==="elk")l.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");h.direction=g,h.nodeSpacing=d?.nodeSpacing||50,h.rankSpacing=d?.rankSpacing||50,h.markers=["point","circle","cross","hierarchy"],h.diagramId=r,l.debug("REF1:",h),await Pt(h,k);let A=d?.diagramPadding??8;V.insertTitle(k,"agentflowTitleText",d?.titleTopMargin??0,a.db.getDiagramTitle()),vt(k,A,"agentflow",d?.useMaxWidth??!0)},"draw"),W1={getClasses:j1,draw:z1},r1=function(){var e=t(function(we,S,x,T){for(x=x||{},T=we.length;T--;x[we[T]]=S);return x},"o"),r=[1,5],n=[1,4],a=[1,3],c=[1,6],d=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],h=[1,15],k=[1,16],g=[1,17],A=[1,18],C=[1,19],L=[1,26],D=[1,27],P=[1,28],v=[1,30],E=[1,31],p=[1,32],f=[1,55],_=[1,54],Y=[1,34],fe=[1,35],Se=[1,36],Ee=[1,37],xe=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],Ne=[1,39],Re=[1,40],Oe=[1,41],Pe=[1,42],Ge=[1,43],Me=[1,64],F=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ce=[1,70],de=[1,68],he=[1,67],pe=[1,69],We=[8,9,10,12,78,80,81],Ke=[1,88],He=[1,101],Ye=[1,106],qe=[1,105],Xe=[1,102],Qe=[1,98],Je=[1,104],Ze=[1,100],$e=[1,107],et=[1,103],tt=[1,108],st=[1,99],Ue=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],be=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],n1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],it=[47,63,92,105,108,109,112,114,117,118,119],a1=[1,131],o1=[1,132],ft=[1,134],gt=[1,133],u1=[47,63,65,77,92,105,108,109,112,114,117,118,119],kt=[1,143],mt=[1,157],At=[1,158],Et=[1,159],Ct=[1,162],St=[1,161],xt=[1,160],Tt=[1,145],Dt=[1,147],_t=[1,151],l1=[1,139],c1=[1,140],Ft=[1,152],Vt=[1,153],It=[1,154],Lt=[1,155],Bt=[1,156],Mt=[1,163],wt=[1,164],Nt=[1,141],Rt=[1,142],Gt=[1,149],Ut=[1,144],jt=[1,148],zt=[1,146],rt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],d1=[1,168],nt=[1,170],X=[8,9,10,12],ke=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],B=[1,190],ue=[1,186],le=[1,187],y=[1,191],N=[1,188],R=[1,189],at=[80,119,122],U=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],h1=[11,109],ye=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Te=[1,269],De=[1,267],_e=[1,271],ve=[1,265],Fe=[1,266],Ve=[1,268],Ie=[1,270],Le=[1,272],ot=[1,292],p1=[8,9,10,12,109],Ce=[8,9,10,11,12,63,87,108,109,112,113,114,115],Qt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(function(S,x,T,u,W,s,I){var i=s.length-1;switch(W){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:u.setDirection("TB"),this.$="TB";break;case 14:u.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-6],s[i-4],I[i-8],I[i]);break;case 39:if(this.$=u.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],I[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-7],s[i-5],I[i-9],I[i]);break;case 40:if(this.$=u.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-3],{text:"",type:"text"},I[i-5],I[i]);break;case 41:if(this.$=u.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],I[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-4],{text:"",type:"text"},I[i-6],I[i]);break;case 42:if(this.$=u.addSubGraph(void 0,s[i-1],void 0,"flow"),u.addSubgraphMapping)u.addSubgraphMapping(void 0,void 0,I[i-3],I[i]);break;case 43:u.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=u.addConnector(s[i-4],s[i-2]),u.addConnectorMapping)u.addConnectorMapping(s[i-4],s[i-2],I[i-6],I[i]);break;case 45:if(this.$=u.addConnector(s[i-5],s[i-3]),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],I[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-5],s[i-3],I[i-7],I[i]);break;case 46:if(this.$=u.addConnector(s[i-1],{text:"",type:"text"}),u.addConnectorMapping)u.addConnectorMapping(s[i-1],{text:"",type:"text"},I[i-3],I[i]);break;case 47:if(this.$=u.addConnector(s[i-2],{text:"",type:"text"}),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],I[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-2],{text:"",type:"text"},I[i-4],I[i]);break;case 49:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],I[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],I[i]);if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(u.addLink(s[i-2].stmt,s[i],s[i-1]),u.addEdgeMapping)u.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],I[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],I[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],I[i-4]),u.extendVertexMapping)u.extendVertexMapping(s[i-5][s[i-5].length-1],I[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),u.addVertexMapping)u.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],u.addVertex(s[i]),u.addVertexMapping)u.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1]};break;case 91:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic};break;case 97:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:n,11:a,13:c},{1:[3]},e(d,o,{5:7}),{4:8,8:r,10:n,11:a,13:c},{4:9,8:r,10:n,11:a,13:c},{4:10,8:r,10:n,11:a,13:c},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(d,[2,10]),e(d,[2,11]),e(d,[2,12]),e(d,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:Me,16:59,19:62},e(F,[2,3]),e(F,[2,4]),e(F,[2,5]),e(F,[2,6]),e(F,[2,7]),e(F,[2,8]),e(F,[2,9]),{8:ce,9:de,10:he,12:pe,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ce,9:de,10:he,12:pe,22:75},{8:ce,9:de,10:he,12:pe,22:76},{8:ce,9:de,10:he,12:pe,22:77},{8:ce,9:de,10:he,12:pe,22:78},{8:ce,9:de,10:he,12:pe,22:79},{8:ce,9:de,10:he,11:[1,80],12:pe,22:81},{8:ce,9:de,10:he,12:pe,22:82},{11:[1,83]},e(F,[2,48]),{39:[1,84]},{41:[1,85]},e(F,[2,51]),e(We,[2,63],{19:86,34:87,11:Me,43:Ke}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:He,47:Ye,63:qe,83:[1,96],92:Xe,98:[1,93],100:[1,94],104:95,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},e(F,[2,200]),e(F,[2,201]),e(F,[2,202]),e(F,[2,203]),e(F,[2,204]),e(Ue,[2,64]),e(Ue,[2,67],{49:[1,109]}),e(oe,[2,85],{116:122,30:[1,110],47:f,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:_,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(be,[2,196]),e(be,[2,157]),e(be,[2,158]),e(be,[2,159]),e(be,[2,160]),e(be,[2,161]),e(be,[2,162]),e(be,[2,163]),e(be,[2,164]),e(be,[2,165]),e(be,[2,166]),e(be,[2,167]),e(d,[2,14]),e(d,[2,20]),e(d,[2,21]),{10:[1,123]},e(d,[2,23]),e(n1,[2,31],{19:124,11:Me}),e(F,[2,32]),{45:125,46:44,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(F,[2,52]),e(F,[2,53]),e(F,[2,54]),e(F,[2,55]),e(it,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:a1,84:o1,119:ft,122:gt},{78:[1,135],80:[1,136]},e(u1,[2,96]),e(F,[2,33]),e(F,[2,34]),e(F,[2,35]),e(F,[2,36]),e(F,[2,37]),{11:kt,13:mt,15:At,28:Et,29:137,33:Ct,35:St,36:xt,47:Tt,63:Dt,78:_t,83:l1,84:c1,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:138,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},e(rt,o,{5:165}),e(rt,o,{5:166}),{11:kt,13:mt,15:At,28:Et,29:167,33:Ct,35:St,36:xt,47:Tt,63:Dt,78:_t,83:l1,84:c1,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:138,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},e(F,[2,49]),e(F,[2,50]),e(We,[2,61],{47:d1}),e(We,[2,62],{19:169,11:Me,43:nt}),e(Ue,[2,57]),{47:f,50:171,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:f,50:175,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:f,50:176,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(X,[2,130],{123:181,11:[1,180],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,132],{11:[1,182]}),e(ke,[2,198]),e(ke,[2,185]),e(ke,[2,186]),e(ke,[2,187]),e(ke,[2,188]),e(ke,[2,189]),e(ke,[2,190]),e(ke,[2,191]),e(ke,[2,192]),e(ke,[2,193]),e(ke,[2,194]),e(ke,[2,195]),{47:f,50:183,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:192,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:194,53:[1,193],70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:195,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:196,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:197,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{112:[1,198]},{31:199,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:200,68:[1,201],70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:202,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:203,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{31:204,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(be,[2,197]),e(d,[2,22]),e(n1,[2,30]),e(We,[2,59],{34:205,19:206,11:Me,43:Ke}),e(it,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{80:[1,210],82:211,119:ft,122:gt},e(at,[2,92]),e(at,[2,94]),e(at,[2,95]),e(at,[2,183]),e(at,[2,184]),{79:212,82:130,83:a1,84:o1,119:ft,122:gt},e(u1,[2,97]),{8:ce,9:de,10:he,11:kt,12:pe,13:mt,15:At,22:214,28:Et,30:[1,213],33:Ct,34:215,35:St,36:xt,43:Ke,47:Tt,63:Dt,78:_t,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:216,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},e(U,[2,116]),e(U,[2,118]),e(U,[2,119]),e(U,[2,172]),e(U,[2,173]),e(U,[2,174]),e(U,[2,175]),e(U,[2,176]),e(U,[2,177]),e(U,[2,178]),e(U,[2,179]),e(U,[2,180]),e(U,[2,181]),e(U,[2,182]),e(U,[2,103]),e(U,[2,104]),e(U,[2,105]),e(U,[2,106]),e(U,[2,107]),e(U,[2,108]),e(U,[2,109]),e(U,[2,110]),e(U,[2,111]),e(U,[2,112]),e(U,[2,113]),e(U,[2,114]),e(U,[2,115]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,217],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,218],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,11:kt,12:pe,13:mt,15:At,22:220,28:Et,30:[1,219],33:Ct,34:221,35:St,36:xt,43:Ke,47:Tt,63:Dt,78:_t,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:216,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},{11:Me,19:222},{47:[1,223]},e(Ue,[2,56]),{11:[1,224],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},e(h1,[2,143]),{11:[1,228],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},e(X,[2,124],{11:[1,231]}),e(X,[2,126],{11:[1,232]}),{83:[1,233]},e(ke,[2,199]),{83:[1,234],101:[1,235]},e(Ue,[2,68],{116:122,47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:B,85:237,119:y,120:N,121:R},e(ye,[2,99]),e(ye,[2,101]),e(ye,[2,102]),e(ye,[2,168]),e(ye,[2,169]),e(ye,[2,170]),e(ye,[2,171]),{52:[1,238],70:B,85:237,119:y,120:N,121:R},{31:239,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{54:[1,240],70:B,85:237,119:y,120:N,121:R},{56:[1,241],70:B,85:237,119:y,120:N,121:R},{58:[1,242],70:B,85:237,119:y,120:N,121:R},{60:[1,243],70:B,85:237,119:y,120:N,121:R},{63:[1,244]},{67:[1,245],70:B,85:237,119:y,120:N,121:R},{69:[1,246],70:B,85:237,119:y,120:N,121:R},{31:247,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},{32:[1,248],70:B,85:237,119:y,120:N,121:R},{70:B,72:[1,249],74:[1,250],85:237,119:y,120:N,121:R},{70:B,72:[1,252],74:[1,251],85:237,119:y,120:N,121:R},e(We,[2,58],{19:169,11:Me,43:nt}),e(We,[2,60],{47:d1}),e(it,[2,88]),e(it,[2,87]),{65:[1,253],70:B,85:237,119:y,120:N,121:R},e(it,[2,90]),e(at,[2,93]),{80:[1,254],82:211,119:ft,122:gt},{31:255,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(rt,o,{5:256}),{8:ce,9:de,10:he,12:pe,22:257,43:nt},e(U,[2,117]),e(F,[2,42]),e(F,[2,43]),{31:258,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(F,[2,46]),{8:ce,9:de,10:he,12:pe,22:259,43:nt},{46:260,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:Me,19:261},{11:Te,63:De,87:_e,95:262,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:273,107:[1,274],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:275,107:[1,276],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{108:[1,277]},{11:Te,63:De,87:_e,95:278,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{47:f,50:279,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(X,[2,131]),e(X,[2,133],{11:[1,283]}),e(X,[2,134]),e(oe,[2,69]),e(ye,[2,100]),e(oe,[2,70]),{54:[1,284],70:B,85:237,119:y,120:N,121:R},e(oe,[2,77]),e(oe,[2,72]),e(oe,[2,73]),e(oe,[2,74]),{112:[1,285]},e(oe,[2,76]),e(oe,[2,78]),{69:[1,286],70:B,85:237,119:y,120:N,121:R},e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,83]),e(oe,[2,82]),e(oe,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(it,[2,91]),{32:[1,287],70:B,85:237,119:y,120:N,121:R},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,288],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(rt,o,{5:289}),{32:[1,290],70:B,85:237,119:y,120:N,121:R},e(F,[2,47]),e(Ue,[2,66]),{46:291,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,136],{109:ot}),e(p1,[2,145],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(Ce,[2,147]),e(Ce,[2,149]),e(Ce,[2,150]),e(Ce,[2,151]),e(Ce,[2,152]),e(Ce,[2,153]),e(Ce,[2,154]),e(Ce,[2,155]),e(Ce,[2,156]),e(X,[2,137],{109:ot}),{11:[1,294]},e(X,[2,138],{109:ot}),{11:[1,295]},e(h1,[2,144]),e(X,[2,120],{109:ot}),e(X,[2,121],{116:122,47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(X,[2,125]),e(X,[2,127],{11:[1,296]}),e(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ce,9:de,10:he,12:pe,22:301,34:302,43:Ke},e(F,[2,40]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,303],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,12:pe,22:304,34:305,43:Ke},e(Ue,[2,65]),{11:Te,63:De,87:_e,108:ve,110:306,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(Ce,[2,148]),{15:He,47:Ye,63:qe,92:Xe,104:307,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},{15:He,47:Ye,63:qe,92:Xe,104:308,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},{101:[1,309]},e(X,[2,135]),e(oe,[2,71]),{31:310,70:B,83:ue,84:le,85:185,119:y,120:N,121:R},e(oe,[2,79]),e(rt,o,{5:311}),{8:ce,9:de,10:he,12:pe,22:312,43:nt},e(F,[2,41]),e(F,[2,44]),{8:ce,9:de,10:he,12:pe,22:313,43:nt},e(p1,[2,146],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(X,[2,141],{123:181,11:[1,314],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,142],{123:181,11:[1,315],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,129]),{32:[1,316],70:B,85:237,119:y,120:N,121:R},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,317],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(rt,o,{5:318}),e(F,[2,45]),{11:Te,63:De,87:_e,95:319,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:320,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(oe,[2,75]),e(F,[2,38]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:L,33:[1,321],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(X,[2,139],{109:ot}),e(X,[2,140],{109:ot}),e(F,[2,39])],defaultActions:{},parseError:t(function(S,x){if(x.recoverable)this.trace(S);else{var T=Error(S);throw T.hash=x,T}},"parseError"),parse:t(function(S){var x=this,T=[0],u=[],W=[null],s=[],I=this.table,i="",K=0,f1=0,g1=0,I1=2,b1=1,L1=s.slice.call(arguments,1),ae=Object.create(this.lexer),je={yy:{}};for(var Jt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Jt))je.yy[Jt]=this.yy[Jt];if(ae.setInput(S,je.yy),je.yy.lexer=ae,je.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var Zt=ae.yylloc;s.push(Zt);var B1=ae.options&&ae.options.ranges;if(typeof je.yy.parseError==="function")this.parseError=je.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function M1(Ae){T.length=T.length-2*Ae,W.length=W.length-Ae,s.length=s.length-Ae}t(M1,"popStack");function k1(){var Ae=u.pop()||ae.lex()||b1;if(typeof Ae!=="number"){if(Ae instanceof Array)u=Ae,Ae=u.pop();Ae=x.symbols_[Ae]||Ae}return Ae}t(k1,"lex");var ge,e1,ze,me,Q1,t1,lt={},Kt,Be,m1,Yt;while(!0){if(ze=T[T.length-1],this.defaultActions[ze])me=this.defaultActions[ze];else{if(ge===null||typeof ge>"u")ge=k1();me=I[ze]&&I[ze][ge]}if(typeof me>"u"||!me.length||!me[0]){var s1="";Yt=[];for(Kt in I[ze])if(this.terminals_[Kt]&&Kt>I1)Yt.push("'"+this.terminals_[Kt]+"'");if(ae.showPosition)s1="Parse error on line "+(K+1)+`:
|
|
23
23
|
`+ae.showPosition()+`
|
|
24
|
-
Expecting `+
|
|
24
|
+
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse error on line "+(K+1)+": Unexpected "+(ge==b1?"end of input":"'"+(this.terminals_[ge]||ge)+"'");this.parseError(s1,{text:ae.match,token:this.terminals_[ge]||ge,line:ae.yylineno,loc:Zt,expected:Yt})}if(me[0]instanceof Array&&me.length>1)throw Error("Parse Error: multiple actions possible at state: "+ze+", token: "+ge);switch(me[0]){case 1:if(T.push(ge),W.push(ae.yytext),s.push(ae.yylloc),T.push(me[1]),ge=null,!e1){if(f1=ae.yyleng,i=ae.yytext,K=ae.yylineno,Zt=ae.yylloc,g1>0)g1--}else ge=e1,e1=null;break;case 2:if(Be=this.productions_[me[1]][1],lt.$=W[W.length-Be],lt._$={first_line:s[s.length-(Be||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Be||1)].first_column,last_column:s[s.length-1].last_column},B1)lt._$.range=[s[s.length-(Be||1)].range[0],s[s.length-1].range[1]];if(t1=this.performAction.apply(lt,[i,f1,K,je.yy,me[1],W,s].concat(L1)),typeof t1<"u")return t1;if(Be)T=T.slice(0,-1*Be*2),W=W.slice(0,-1*Be),s=s.slice(0,-1*Be);T.push(this.productions_[me[1]][0]),W.push(lt.$),s.push(lt._$),m1=I[T[T.length-2]][T[T.length-1]],T.push(m1);break;case 3:return!0}}return!0},"parse")},V1=function(){var we={EOF:1,parseError:t(function(x,T){if(this.yy.parser)this.yy.parser.parseError(x,T);else throw Error(x)},"parseError"),setInput:t(function(S,x){if(this.yy=x||this.yy||{},this._input=S,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];return this.offset=0,this},"setInput"),input:t(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var x=S.match(/(?:\r\n?|\n).*/g);if(x)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),S},"input"),unput:t(function(S){var x=S.length,T=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var u=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1)this.yylineno-=T.length-1;var W=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===u.length?this.yylloc.first_column:0)+u[u.length-T.length].length-T[0].length:this.yylloc.first_column-x},this.options.ranges)this.yylloc.range=[W[0],W[0]+this.yyleng-x];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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).
|
|
25
25
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(S){this.unput(this.match.slice(S))},"less"),pastInput:t(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var S=this.match;if(S.length<20)S+=this._input.substr(0,20-S.length);return(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var S=this.pastInput(),x=Array(S.length+1).join("-");return S+this.upcomingInput()+`
|
|
26
26
|
`+x+"^"},"showPosition"),test_match:t(function(S,x){var T,u,W;if(this.options.backtrack_lexer){if(W={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)W.yylloc.range=this.yylloc.range.slice(0)}if(u=S[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(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+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],T=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(T)return T;else if(this._backtrack){for(var s in W)this[s]=W[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,x,T,u;if(!this._more)this.yytext="",this.match="";var W=this._currentRules();for(var s=0;s<W.length;s++)if(T=this._input.match(this.rules[W[s]]),T&&(!x||T[0].length>x[0].length)){if(x=T,u=s,this.options.backtrack_lexer)if(S=this.test_match(T,W[s]),S!==!1)return S;else if(this._backtrack){x=!1;continue}else return!1;else if(!this.options.flex)break}if(x){if(S=this.test_match(x,W[u]),S!==!1)return S;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
27
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var x=this.next();if(x)return x;else return this.lex()},"lex"),begin:t(function(x){this.conditionStack.push(x)},"begin"),popState:t(function(){var x=this.conditionStack.length-1;if(x>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(x){if(x=this.conditionStack.length-1-Math.abs(x||0),x>=0)return this.conditionStack[x];else return"INITIAL"},"topState"),pushState:t(function(x){this.begin(x)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(x,T,u,W){var s=W;switch(u){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),T.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let I=/\n\s*/g;return T.yytext=T.yytext.replace(I,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:if(x.lex.firstGraph())this.begin("dir");return 13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;break;case 45:return this.popState(),15;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;break;case 70:return this.pushState("edgeText"),78;break;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;break;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;break;case 77:return this.popState(),58;break;case 78:return this.pushState("text"),57;break;case 79:return this.popState(),60;break;case 80:return this.pushState("text"),59;break;case 81:return 61;case 82:return this.pushState("text"),70;break;case 83:return this.popState(),67;break;case 84:return this.pushState("text"),66;break;case 85:return this.popState(),52;break;case 86:return this.pushState("text"),51;break;case 87:break;case 88:return this.popState(),72;break;case 89:return this.popState(),74;break;case 90:return 120;case 91:return this.pushState("trapText"),71;break;case 92:return this.pushState("trapText"),73;break;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;break;case 106:return this.pushState("text"),65;break;case 107:return this.popState(),54;break;case 108:return this.pushState("text"),53;break;case 109:return this.popState(),32;break;case 110:return this.pushState("text"),30;break;case 111:return this.popState(),69;break;case 112:return this.pushState("text"),68;break;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return we}();Jt.lexer=V1;function Ht(){this.yy={}}return t(Ht,"Parser"),Ht.prototype=Jt,Jt.Parser=Ht,new Ht}();r1.parser=r1;var v1=r1,F1=Object.assign({},v1);F1.parse=(e)=>{let r=e.replace(/}[^\S\n]*\n/g,`}
|
|
28
|
-
`);return v1.parse(r)};var K1=F1,H1=t((e)=>{let{theme:r,bkgColorArray:n,borderColorArray:a}=e;if(!
|
|
27
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var x=this.next();if(x)return x;else return this.lex()},"lex"),begin:t(function(x){this.conditionStack.push(x)},"begin"),popState:t(function(){var x=this.conditionStack.length-1;if(x>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(x){if(x=this.conditionStack.length-1-Math.abs(x||0),x>=0)return this.conditionStack[x];else return"INITIAL"},"topState"),pushState:t(function(x){this.begin(x)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(x,T,u,W){var s=W;switch(u){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),T.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let I=/\n\s*/g;return T.yytext=T.yytext.replace(I,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:if(x.lex.firstGraph())this.begin("dir");return 13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;break;case 45:return this.popState(),15;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;break;case 70:return this.pushState("edgeText"),78;break;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;break;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;break;case 77:return this.popState(),58;break;case 78:return this.pushState("text"),57;break;case 79:return this.popState(),60;break;case 80:return this.pushState("text"),59;break;case 81:return 61;case 82:return this.pushState("text"),70;break;case 83:return this.popState(),67;break;case 84:return this.pushState("text"),66;break;case 85:return this.popState(),52;break;case 86:return this.pushState("text"),51;break;case 87:break;case 88:return this.popState(),72;break;case 89:return this.popState(),74;break;case 90:return 120;case 91:return this.pushState("trapText"),71;break;case 92:return this.pushState("trapText"),73;break;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;break;case 106:return this.pushState("text"),65;break;case 107:return this.popState(),54;break;case 108:return this.pushState("text"),53;break;case 109:return this.popState(),32;break;case 110:return this.pushState("text"),30;break;case 111:return this.popState(),69;break;case 112:return this.pushState("text"),68;break;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return we}();Qt.lexer=V1;function Wt(){this.yy={}}return t(Wt,"Parser"),Wt.prototype=Qt,Qt.Parser=Wt,new Wt}();r1.parser=r1;var v1=r1,F1=Object.assign({},v1);F1.parse=(e)=>{let r=e.replace(/}[^\S\n]*\n/g,`}
|
|
28
|
+
`);return v1.parse(r)};var K1=F1,H1=t((e)=>{let{theme:r,bkgColorArray:n,borderColorArray:a}=e;if(!ct(r,a))return"";let c=ut(e.look),d=yt(n),o=ar(e.THEME_COLOR_LIMIT,a),h=t((A)=>a[A%a.length],"border"),k=t((A)=>d?`fill: ${n[A%n.length]};`:"","fill"),g="";for(let A of O1){let C=Xt.get(A),L=`[data-look="${c}"].node.${S1(A)}`;g+=`
|
|
29
29
|
|
|
30
30
|
${L} rect,
|
|
31
31
|
${L} path,
|
|
32
32
|
${L} polygon {
|
|
33
|
-
stroke: ${
|
|
33
|
+
stroke: ${h(C)};
|
|
34
34
|
${k(C)}
|
|
35
35
|
}
|
|
36
|
-
`}for(let A=0;A<x1(o);A++){let C=T1(A,o),L=`[data-look="${c}"][data-color-id="color-${C}"].cluster`,D=`[data-look="${c}"][data-color-id="color-${C}"].node`,P=t((v)=>`${L} ${v}, ${D} ${v}`,"rule");
|
|
36
|
+
`}for(let A=0;A<x1(o);A++){let C=T1(A,o),L=`[data-look="${c}"][data-color-id="color-${C}"].cluster`,D=`[data-look="${c}"][data-color-id="color-${C}"].node`,P=t((v)=>`${L} ${v}, ${D} ${v}`,"rule");g+=`
|
|
37
37
|
|
|
38
38
|
${P("rect")},
|
|
39
39
|
${P("path")} {
|
|
40
|
-
stroke: ${
|
|
40
|
+
stroke: ${h(C)};
|
|
41
41
|
${k(C)}
|
|
42
42
|
}
|
|
43
|
-
`}return
|
|
43
|
+
`}return g},"genColor"),Y1=t((e,r)=>{let n=ya,a=n(e,"r"),c=n(e,"g"),d=n(e,"b");return bt(a,c,d,r)},"fade"),q1=t((e)=>`${H1(e)}
|
|
44
44
|
.label {
|
|
45
45
|
font-family: ${e.fontFamily};
|
|
46
46
|
color: ${e.nodeTextColor||e.textColor};
|
|
@@ -196,5 +196,5 @@ Expecting `+qt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse
|
|
|
196
196
|
}
|
|
197
197
|
text-align: center;
|
|
198
198
|
}
|
|
199
|
-
${
|
|
200
|
-
`,"getStyles"),X1=q1,Es={parser:K1,get db(){return new U1},renderer:W1,styles:X1,init:t((e)=>{if(e.agentflow??={},e.layout)
|
|
199
|
+
${Hn()}
|
|
200
|
+
`,"getStyles"),X1=q1,Es={parser:K1,get db(){return new U1},renderer:W1,styles:X1,init:t((e)=>{if(e.agentflow??={},e.layout)va({layout:e.layout});e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,va({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")};export{Es as diagram};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{xe}from"./index-zwbw177x.js";import{t,l,Yt,Y,C,ne,M,O,G,z,j,q,H,b,nr,Ae,md,L,le,vt}from"./index-x507ndnc.js";import{yo}from"./index-pxr36neg.js";import{$e}from"./index-cwwg7k5f.js";function Ge(e){var r=0,n=e.children,o=n&&n.length;if(!o)r=1;else while(--o>=0)r+=n[o].value;e.value=r}function ue(){return this.eachAfter(Ge)}function fe(e,r){let n=-1;for(let o of this)e.call(r,o,++n,this);return this}function he(e,r){var n=this,o=[n],s,p,u=-1;while(n=o.pop())if(e.call(r,n,++u,this),s=n.children)for(p=s.length-1;p>=0;--p)o.push(s[p]);return this}function me(e,r){var n=this,o=[n],s=[],p,u,f,x=-1;while(n=o.pop())if(s.push(n),p=n.children)for(u=0,f=p.length;u<f;++u)o.push(p[u]);while(n=s.pop())e.call(r,n,++x,this);return this}function ge(e,r){let n=-1;for(let o of this)if(e.call(r,o,++n,this))return o}function ye(e){return this.eachAfter(function(r){var n=+e(r.data)||0,o=r.children,s=o&&o.length;while(--s>=0)n+=o[s].value;r.value=n})}function Se(e){return this.eachBefore(function(r){if(r.children)r.children.sort(e)})}function ve(e){var r=this,n=Xe(r,e),o=[r];while(r!==n)r=r.parent,o.push(r);var s=o.length;while(e!==n)o.splice(s,0,e),e=e.parent;return o}function Xe(e,r){if(e===r)return e;var n=e.ancestors(),o=r.ancestors(),s=null;e=n.pop(),r=o.pop();while(e===r)s=e,e=n.pop(),r=o.pop();return s}function be(){var e=this,r=[e];while(e=e.parent)r.push(e);return r}function we(){return Array.from(this)}function Ce(){var e=[];return this.eachBefore(function(r){if(!r.children)e.push(r)}),e}function Te(){var e=this,r=[];return e.each(function(n){if(n!==e)r.push({source:n.parent,target:n})}),r}function*Le(){var e=this,r,n=[e],o,s,p;do{r=n.reverse(),n=[];while(e=r.pop())if(yield e,o=e.children)for(s=0,p=o.length;s<p;++s)n.push(o[s])}while(n.length)}function K(e,r){if(e instanceof Map){if(e=[void 0,e],r===void 0)r=Ze}else if(r===void 0)r=je;var n=new re(e),o,s=[n],p,u,f,x;while(o=s.pop())if((u=r(o.data))&&(x=(u=Array.from(u)).length)){o.children=u;for(f=x-1;f>=0;--f)s.push(p=u[f]=new re(u[f])),p.parent=o,p.depth=o.depth+1}return n.eachBefore(Je)}function Ye(){return K(this).eachBefore(Ue)}function je(e){return e.children}function Ze(e){return Array.isArray(e)?e[1]:null}function Ue(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function Je(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function re(e){this.data=e,this.depth=this.height=0,this.parent=null}re.prototype=K.prototype={constructor:re,count:ue,each:fe,eachAfter:me,eachBefore:he,find:ge,sum:ye,sort:Se,path:ve,ancestors:be,descendants:we,leaves:Ce,links:Te,copy:Ye,[Symbol.iterator]:Le};function Ve(e){if(typeof e!=="function")throw Error();return e}function Q(){return 0}function X(e){return function(){return e}}function Fe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ne(e,r,n,o,s){var p=e.children,u,f=-1,x=p.length,d=e.value&&(o-r)/e.value;while(++f<x)u=p[f],u.y0=n,u.y1=s,u.x0=r,u.x1=r+=u.value*d}function ke(e,r,n,o,s){var p=e.children,u,f=-1,x=p.length,d=e.value&&(s-n)/e.value;while(++f<x)u=p[f],u.x0=r,u.x1=o,u.y0=n,u.y1=n+=u.value*d}var Ke=(1+Math.sqrt(5))/2;function Qe(e,r,n,o,s,p){var u=[],f=r.children,x,d,h=0,A=0,i=f.length,T,v,w=r.value,m,S,B,V,Z,te,E;while(h<i){T=s-n,v=p-o;do m=f[A++].value;while(!m&&A<i);S=B=m,te=Math.max(v/T,T/v)/(w*e),E=m*m*te,Z=Math.max(B/E,E/S);for(;A<i;++A){if(m+=d=f[A].value,d<S)S=d;if(d>B)B=d;if(E=m*m*te,V=Math.max(B/E,E/S),V>Z){m-=d;break}Z=V}if(u.push(x={value:m,dice:T<v,children:f.slice(h,A)}),x.dice)Ne(x,n,o,s,w?o+=v*m/w:p);else ke(x,n,o,w?n+=T*m/w:s,p);w-=m,h=A}return u}var Pe=function e(r){function n(o,s,p,u,f){Qe(r,o,s,p,u,f)}return n.ratio=function(o){return e((o=+o)>1?o:1)},n}(Ke);function ce(){var e=Pe,r=!1,n=1,o=1,s=[0],p=Q,u=Q,f=Q,x=Q,d=Q;function h(i){if(i.x0=i.y0=0,i.x1=n,i.y1=o,i.eachBefore(A),s=[0],r)i.eachBefore(Fe);return i}function A(i){var T=s[i.depth],v=i.x0+T,w=i.y0+T,m=i.x1-T,S=i.y1-T;if(m<v)v=m=(v+m)/2;if(S<w)w=S=(w+S)/2;if(i.x0=v,i.y0=w,i.x1=m,i.y1=S,i.children){if(T=s[i.depth+1]=p(i)/2,v+=d(i)-T,w+=u(i)-T,m-=f(i)-T,S-=x(i)-T,m<v)v=m=(v+m)/2;if(S<w)w=S=(w+S)/2;e(i,v,w,m,S)}}return h.round=function(i){return arguments.length?(r=!!i,h):r},h.size=function(i){return arguments.length?(n=+i[0],o=+i[1],h):[n,o]},h.tile=function(i){return arguments.length?(e=Ve(i),h):e},h.padding=function(i){return arguments.length?h.paddingInner(i).paddingOuter(i):h.paddingInner()},h.paddingInner=function(i){return arguments.length?(p=typeof i==="function"?i:X(+i),h):p},h.paddingOuter=function(i){return arguments.length?h.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):h.paddingTop()},h.paddingTop=function(i){return arguments.length?(u=typeof i==="function"?i:X(+i),h):u},h.paddingRight=function(i){return arguments.length?(f=typeof i==="function"?i:X(+i),h):f},h.paddingBottom=function(i){return arguments.length?(x=typeof i==="function"?i:X(+i),h):x},h.paddingLeft=function(i){return arguments.length?(d=typeof i==="function"?i:X(+i),h):d},h}var Be=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=O,this.getAccTitle=G,this.setDiagramTitle=q,this.getDiagramTitle=H,this.getAccDescription=j,this.setAccDescription=z}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=Y,r=C();return le({...e.treemap,...r.treemap??{}})}addNode(e,r){if(this.nodes.push(e),this.levels.set(e,r),r===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,r){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=r.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(md(s))if(n?.textStyles)n.textStyles.push(s);else n.textStyles=[s];if(n?.styles)n.styles.push(s);else n.styles=[s]});this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){M(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Ee(e){if(!e.length)return[];let r=[],n=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(n.length>0&&n[n.length-1].level>=o.level)n.pop();if(n.length===0)r.push(s);else{let p=n[n.length-1].node;if(p.children)p.children.push(s);else p.children=[s]}if(o.type!=="Leaf")n.push({node:s,level:o.level})}),r}t(Ee,"buildHierarchy");var et=t((e,r)=>{xe(e,r);let n=[];for(let p of e.TreemapRows??[])if(p.$type==="ClassDefStatement")r.addClass(p.className??"",p.styleText??"");for(let p of e.TreemapRows??[]){let u=p.item;if(!u)continue;let f=p.indent?parseInt(p.indent):0,x=tt(u),d=u.classSelector?r.getStylesForClass(u.classSelector):[],h=d.length>0?d:void 0,A={level:f,name:x,type:u.$type,value:u.value,classSelector:u.classSelector,cssCompiledStyles:h};n.push(A)}let o=Ee(n),s=t((p,u)=>{for(let f of p)if(r.addNode(f,u),f.children&&f.children.length>0)s(f.children,u+1)},"addNodesRecursively");s(o,0)},"populate"),tt=t((e)=>e.name?String(e.name):"","getItemName"),Re={parser:{yy:void 0},parse:t(async(e)=>{try{let n=await $e("treemap",e);l.debug("Treemap AST:",n);let o=Re.parser?.yy;if(!(o instanceof Be))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,o)}catch(r){throw l.error("Error parsing treemap:",r),r}},"parse")},at=10,ee=10,oe=25,rt=t((e,r,n,o)=>{let s=o.db,p=s.getConfig(),u=p.padding??at,f=s.getDiagramTitle(),x=s.getRoot(),{themeVariables:d}=C();if(!x)return;let h=f?30:0,A=Ae(r),i=p.nodeWidth?p.nodeWidth*ee:960,T=p.nodeHeight?p.nodeHeight*ee:500,v=i,w=T+h;A.attr("viewBox",`0 0 ${v} ${w}`),ne(A,w,v,p.useMaxWidth);let m;try{let a=p.valueFormat||",";if(a==="$0,0")m=t((c)=>"$"+yo(",")(c),"valueFormat");else if(a.startsWith("$")&&a.includes(",")){let c=/\.\d+/.exec(a),g=c?c[0]:"";m=t((F)=>"$"+yo(","+g)(F),"valueFormat")}else if(a.startsWith("$")){let c=a.substring(1);m=t((g)=>"$"+yo(c||"")(g),"valueFormat")}else m=yo(a)}catch(a){l.error("Error creating format function:",a),m=yo(",")}let S=nr().range(["transparent",d.cScale0,d.cScale1,d.cScale2,d.cScale3,d.cScale4,d.cScale5,d.cScale6,d.cScale7,d.cScale8,d.cScale9,d.cScale10,d.cScale11]),B=nr().range(["transparent",d.cScalePeer0,d.cScalePeer1,d.cScalePeer2,d.cScalePeer3,d.cScalePeer4,d.cScalePeer5,d.cScalePeer6,d.cScalePeer7,d.cScalePeer8,d.cScalePeer9,d.cScalePeer10,d.cScalePeer11]),V=nr().range([d.cScaleLabel0,d.cScaleLabel1,d.cScaleLabel2,d.cScaleLabel3,d.cScaleLabel4,d.cScaleLabel5,d.cScaleLabel6,d.cScaleLabel7,d.cScaleLabel8,d.cScaleLabel9,d.cScaleLabel10,d.cScaleLabel11]);if(f)A.append("text").attr("x",v/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);let Z=A.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),te=K(x).sum((a)=>a.value??0).sort((a,c)=>(c.value??0)-(a.value??0)),Me=ce().size([i,T]).paddingTop((a)=>a.children&&a.children.length>0?oe+ee:0).paddingInner(u).paddingLeft((a)=>a.children&&a.children.length>0?ee:0).paddingRight((a)=>a.children&&a.children.length>0?ee:0).paddingBottom((a)=>a.children&&a.children.length>0?ee:0).round(!0)(te),We=Me.descendants().filter((a)=>a.children&&a.children.length>0),ae=Z.selectAll(".treemapSection").data(We).enter().append("g").attr("class","treemapSection").attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(ae.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",oe).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(a)=>{if(a.depth===0)return"display: none;";return""}),ae.append("clipPath").attr("id",(a,c)=>`clip-section-${r}-${c}`).append("rect").attr("width",(a)=>Math.max(0,a.x1-a.x0-12)).attr("height",oe),ae.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",(a)=>a.y1-a.y0).attr("class",(a,c)=>`treemapSection section${c}`).attr("fill",(a)=>S(a.data.name)).attr("fill-opacity",0.6).attr("stroke",(a)=>B(a.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(a)=>{if(a.depth===0)return"display: none;";let c=L({cssCompiledStyles:a.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ae.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",oe/2).attr("dominant-baseline","middle").text((a)=>a.depth===0?"":a.data.name).attr("font-weight","bold").attr("clip-path",(a,c)=>`url(#clip-section-${r}-${c})`).attr("style",(a)=>{if(a.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+V(a.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=L({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).each(function(a){if(a.depth===0)return;let c=b(this),g=a.data.name;c.text(g);let F=a.x1-a.x0,k=6,N;if(p.showValues!==!1&&a.value){let D=F-10,I=30,Oe=10;N=D-30-10-k}else N=F-k-6;let y=Math.max(15,N),W=c.node();if(W.getComputedTextLength()>y){let I=g;while(I.length>0){if(I=g.substring(0,I.length-1),I.length===0){if(c.text("..."),W.getComputedTextLength()>y)c.text("");break}if(c.text(I+"..."),W.getComputedTextLength()<=y)break}}}),p.showValues!==!1)ae.append("text").attr("class","treemapSectionValue").attr("x",(a)=>a.x1-a.x0-10).attr("y",oe/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((a)=>a.value?m(a.value):"").attr("font-style","italic").attr("style",(a)=>{if(a.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+V(a.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=L({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")});let _e=Me.leaves(),P=_e.length>20,He=P?16:38,se=P?14:28,U=P?4:8,J=P?4:6,pe=P?2:4,ze=P?8:10,de=P?1:2,ie=Z.selectAll(".treemapLeafGroup").data(_e).enter().append("g").attr("class",(a,c)=>`treemapNode treemapLeafGroup leaf${c}${a.data.classSelector?` ${a.data.classSelector}`:""}x`).attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(ie.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",(a)=>a.y1-a.y0).attr("class","treemapLeaf").attr("fill",(a)=>a.parent?S(a.parent.data.name):S(a.data.name)).attr("style",(a)=>L({cssCompiledStyles:a.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(a)=>a.parent?S(a.parent.data.name):S(a.data.name)).attr("stroke-width",3),ie.append("clipPath").attr("id",(a,c)=>`clip-${r}-${c}`).append("rect").attr("width",(a)=>Math.max(0,a.x1-a.x0-4)).attr("height",(a)=>Math.max(0,a.y1-a.y0-4)),ie.append("text").attr("class","treemapLabel").attr("x",(a)=>(a.x1-a.x0)/2).attr("y",(a)=>(a.y1-a.y0)/2).attr("style",(a)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${He}px;fill:`+V(a.data.name)+";",g=L({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(a,c)=>`url(#clip-${r}-${c})`).text((a)=>a.data.name).each(function(a){let c=b(this),g=a.x1-a.x0,F=a.y1-a.y0,k=c.node(),N=g-2*pe,R=F-2*pe;if(N<ze||R<ze){c.style("display","none");return}let y=parseInt(c.style("font-size"),10),W=0.6;while(k.getComputedTextLength()>N&&y>U)y--,c.style("font-size",`${y}px`);let _=Math.max(J,Math.min(se,Math.round(y*W))),D=y+de+_;while(D>R&&y>U){if(y--,_=Math.max(J,Math.min(se,Math.round(y*W))),_<J&&y===U)break;if(c.style("font-size",`${y}px`),D=y+de+_,_<=J&&D>R);}if(c.style("font-size",`${y}px`),P){if(y<U||R<U)c.style("display","none")}else if(k.getComputedTextLength()>N||y<U||R<y)c.style("display","none")}),p.showValues!==!1)ie.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${se}px;fill:`+V(c.data.name)+";",F=L({cssCompiledStyles:c.data.cssCompiledStyles});return g+F.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,g)=>`url(#clip-${r}-${g})`).text((c)=>c.value?m(c.value):"").each(function(c){let g=b(this),F=this.parentNode;if(!F){g.style("display","none");return}let k=b(F).select(".treemapLabel");if(k.empty()||k.style("display")==="none"){g.style("display","none");return}let N=parseFloat(k.style("font-size")),y=Math.max(J,Math.min(se,Math.round(N*0.6)));g.style("font-size",`${y}px`);let _=(c.y1-c.y0)/2+N/2+de;g.attr("y",_);let D=c.x1-c.x0,De=c.y1-c.y0-4,qe=D-2*pe;if(g.node().getComputedTextLength()>qe||_+y>De||y<J)g.style("display","none");else g.style("display",null)});let Ie=p.diagramPadding??8;vt(A,Ie,"flowchart",p?.useMaxWidth||!1)},"draw"),nt=t(function(e,r){return r.db.getClasses()},"getClasses"),lt={draw:rt,getClasses:nt},ot={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},st=t(({treemap:e}={})=>{let r=Yt(),n=C(),o=le(r,n.themeVariables),s=le(ot,e),p=s.titleColor??o.titleColor,u=s.labelColor??o.textColor,f=s.valueColor??o.textColor;return`
|
|
2
|
+
.treemapNode.section {
|
|
3
|
+
stroke: ${s.sectionStrokeColor};
|
|
4
|
+
stroke-width: ${s.sectionStrokeWidth};
|
|
5
|
+
fill: ${s.sectionFillColor};
|
|
6
|
+
}
|
|
7
|
+
.treemapNode.leaf {
|
|
8
|
+
stroke: ${s.leafStrokeColor};
|
|
9
|
+
stroke-width: ${s.leafStrokeWidth};
|
|
10
|
+
fill: ${s.leafFillColor};
|
|
11
|
+
}
|
|
12
|
+
.treemapLabel {
|
|
13
|
+
fill: ${u};
|
|
14
|
+
font-size: ${s.labelFontSize};
|
|
15
|
+
}
|
|
16
|
+
.treemapValue {
|
|
17
|
+
fill: ${f};
|
|
18
|
+
font-size: ${s.valueFontSize};
|
|
19
|
+
}
|
|
20
|
+
.treemapTitle {
|
|
21
|
+
fill: ${p};
|
|
22
|
+
font-size: ${s.titleFontSize};
|
|
23
|
+
}
|
|
24
|
+
`},"getStyles"),it=st,da={parser:Re,get db(){return new Be},renderer:lt,styles:it};export{da as diagram};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)+2),o=o.substring(0,o.lastIndexOf("}")-1),o=
|
|
3
|
-
`,"id:",i,n),!
|
|
1
|
+
import{xe}from"./index-zwbw177x.js";import{t,l,Y,C,te,M,O,G,z,j,q,H,m,pc,b,ns,Ad,le}from"./index-x507ndnc.js";import{ad,$e}from"./index-cwwg7k5f.js";var T="position frame",D="frame positioned",S="position relation",N="relation positioned",he=t(function(e){l.debug("options str",e)},"setOptions"),pe=t(function(){return{}},"getOptions"),be=t(function(){I(),M()},"clear");function I(){B={}}t(I,"reset");var ve=Y.eventmodeling,we=t(()=>le({...ve,...C().eventmodeling}),"getConfig"),B={};function W(){let e=ye,{ast:i}=B,n=E();if(!i)throw Error("No data for EventModel");return i.frames.forEach((r,a)=>{let o=J(r,i.dataEntities,n);e=y(e,{$kind:T,index:a,frame:r,textProps:o});let d=void 0;if(re(r))l.debug("source frame",r.sourceFrames),d=i.frames.filter((c)=>r.sourceFrames.some((u)=>u.$refText===c.name)),d.forEach((c)=>{e=y(e,{$kind:S,index:a,frame:r,sourceFrame:c})});else e=y(e,{$kind:S,index:a,frame:r})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}t(W,"getState");function U(e){B.ast=e}t(U,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}t(E,"getDiagramProps");var ye={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function _(e){let i=e.split(".");if(i.length===2)return i[0];return}t(_,"extractNamespace");function L(e){let i=e.split(".");if(i.length===2)return i[1];return e}t(L,"extractName");function V(e,i){if(!i||i.length===0)return;return Object.values(e).find((n)=>n.namespace===i)}t(V,"findSwimlaneByNamespace");function w(e,i,n){return Math.max(i,...Object.keys(e).filter((r)=>{let a=Number.parseInt(r);return a>i&&a<n}).map((r)=>Number.parseInt(r)))+1}t(w,"findNextAvailableIndex");function X(e,i){let n=_(e.entityIdentifier),r=V(i,n);switch(e.modelEntityType){case"ui":case"pcr":case"processor":if(r)return{index:r.index,label:r.namespace||s.labelUiAutomation};else if(n)return{index:w(i,0,100),label:s.labelUiAutomationPrefix+n};return{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(r)return{index:r.index,label:r.namespace||s.labelCommandReadModel};else if(n)return{index:w(i,100,200),label:s.labelCommandReadModelPrefix+n};return{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:if(r)return{index:r.index,label:r.namespace||s.labelEvents};else if(n)return{index:w(i,200,300),label:s.labelEventsPrefix+n};return{index:200,label:s.labelEvents}}}t(X,"calculateSwimlaneProps");function K(e){let{themeVariables:i}=C();switch(e.modelEntityType){case"ui":return{fill:i.emUiFill??"white",stroke:i.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:i.emProcessorFill??"#edb3f6",stroke:i.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:i.emReadModelFill??"#d3f1a2",stroke:i.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:i.emCommandFill??"#bcd6fe",stroke:i.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:i.emEventFill??"#ffb778",stroke:i.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}t(K,"calculateEntityVisualProps");function J(e,i,n){let r=C(),a=te(L(e.entityIdentifier)??"",r),o,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${ns(a,n.textMaxWidth,d)}</b>`;if(e.dataInlineValue)o=e.dataInlineValue,o=o.substring(o.indexOf("{")+1),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=ns(o,n.textMaxWidth,d),o=o.replaceAll(" "," ");if(e.dataReference){let v=i.find((P)=>P.name===e.dataReference?.$refText);if(v)o=v.dataBlockValue,o=o.substring(o.indexOf(`{
|
|
2
|
+
`)+2),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=ns(o,n.textMaxWidth,d),o=o.replaceAll(" "," "),o+="<br/>"}let x=o!==void 0;if(x)u+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${o}</code>`;let g={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},f=Ad(u,g),p=x?f.width/3:f.width,h={content:u,width:p,height:f.height};return l.debug(`[${e.name}] ${e.entityIdentifier} text`,h),h}t(J,"calculateTextProps");function Q(e,i){let n=i,r=K(n.frame),a={width:n.textProps.width+2*s.boxTextPadding,height:n.textProps.height+2*s.boxTextPadding};return[{$kind:D,frame:n.frame,index:n.index,visual:r,dimension:a,textProps:n.textProps}]}t(Q,"decidePositionFrame");function Z(e,i,n){if(i===void 0)return s.contentStartX;if(i.index===e.index&&e.r)return e.r+s.boxPadding;if(n===void 0)return s.contentStartX;return n.r-s.boxOverlap+s.boxPadding}t(Z,"calculateX");function ee(e,i){let n=[...e.map((r)=>r.r),i];return Math.max(...n)}t(ee,"calculateMaxRight");function A(e){return Object.values(e).sort((i,n)=>i.index-n.index)}t(A,"sortedSwimlanesArray");function ne(e,i){let n=i,r=X(n.frame,e.swimlanes),a;if(r.index in e.swimlanes)a=e.swimlanes[r.index];else a={index:r.index,label:r.label,r:0,y:r.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};let o=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,c={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,n.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,n.dimension.height))+2*s.boxPadding},u=Z(a,d,o),x=u+c.width+s.boxPadding,g=ee(Object.values(e.swimlanes),x);a.r=u+c.width,a.maxHeight=Math.max(a.maxHeight,c.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;let f={x:u,y:s.swimlanePadding+a.y,r:x,dimension:c,leftSibling:!1,swimlane:a,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},p={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:g},h=A(p.swimlanes);if(h.length>0)h[0].y=0;for(let v=1;v<h.length;v++){let P=h[v],R=h[v-1];P.y=R.y+R.height+s.swimlaneGap}return p}t(ne,"evolveFramePositioned");function ie(e,i){if(e===0&&i.sourceFrames.length===0)return!0;return!1}t(ie,"isFirstFrame");function re(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}t(re,"hasSourceFrame");function k(e,i){if(i===void 0||i===null)return;return e.find((n)=>n.frame.name===i.name)}t(k,"findBoxByFrame");function ae(e,i,n){if(n<0)return;for(let r=n;r>=0;r--){let a=e[r];if(a.swimlane.index!==i)return a}return}t(ae,"findBoxByLineIndex");function oe(e,i){let n=i;if(ad(n.frame)||ie(n.index,n.frame))return[];let r=k(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let a;if(n.sourceFrame)a=k(e.boxes,n.sourceFrame);else a=ae(e.boxes,r.swimlane.index,n.index-1);if(a===void 0)return[];return[{$kind:N,frame:n.frame,index:n.index,sourceBox:a,targetBox:r}]}t(oe,"decidePositionRelation");function se(e,i){let n=i,r={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(se,"evolveRelationPositioned");var Pe={[T]:Q,[S]:oe},Se={[D]:ne,[N]:se};function de(e,i){let n=Pe[i.$kind];if(n===void 0||n===null)return[];let r=n(e,i);return l.debug("decided events",r),r}t(de,"decide");function ce(e,i){let n=i.reduce((r,a)=>{let o=Se[a.$kind];if(o===void 0||o===null)return r;return o(r,a)},e);return l.debug("evolve events",{state:e,newState:n,events:i}),n}t(ce,"evolve");function y(e,i){let n=de(e,i);return ce(e,n)}t(y,"dispatch");var F={getConfig:we,setOptions:he,getOptions:pe,clear:be,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H,setAst:U,getDiagramProps:E,getState:W},Me={parse:t(async(e)=>{let i=await $e("eventmodeling",e);l.debug(i),F.setAst(i),xe(i,F)},"parse")},ke=m(),Fe=ke?.eventmodeling;function me(e,i){return(n)=>{let r=n.swimlane.y+i.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",n.x).attr("y",r).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill),a.append("foreignObject").attr("x",n.x+i.boxPadding).attr("y",r+10).attr("width",n.dimension.width-2*i.boxPadding).attr("height",n.dimension.height-2*i.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}t(me,"renderD3Box");function ue(e,i){return e>i}t(ue,"dirUpwards");function fe(e,i,n,r){return(a)=>{let o=a.sourceBox.swimlane.y+i.swimlanePadding,d=a.targetBox.swimlane.y+i.swimlanePadding,c=ue(o,d),u=a.sourceBox.x+a.sourceBox.dimension.width*2/3,x=a.targetBox.x+a.targetBox.dimension.width/3,g,f;if(l.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c)g=o,f=d+a.targetBox.dimension.height;else g=o+a.sourceBox.dimension.height,f=d;let p=r.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${u} ${g} L${x} ${f}`)}}t(fe,"renderD3Relation");function ge(e,i,n,r){return(a)=>{let o=e.append("g").attr("class","em-swimlane"),d=r.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=r.emSwimlaneBackgroundStroke??"rgb(240,240,240)";o.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",i+n.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",c),o.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}t(ge,"renderD3Swimlane");var Be=t(function(e,i,n,r){if(l.debug("in eventmodeling renderer",e+`
|
|
3
|
+
`,"id:",i,n),!Fe)throw Error("EventModeling config not found");let a=r.db,{themeVariables:o,eventmodeling:d}=m(),c=b(`[id="${i}"]`),u=a.getDiagramProps(),x=a.getState(),g=`em-arrowhead-${i}`,f=o.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(ge(c,x.maxR,u,o)),x.boxes.forEach(me(c,u)),x.relations.forEach(fe(c,u,g,o)),c.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),pc(void 0,c,d?.padding??30,d?.useMaxWidth)},"draw"),Ee={draw:Be},Ae=t((e)=>"","getStyles"),Re=Ae,Ue={parser:Me,db:F,renderer:Ee,styles:Re};export{Ue as diagram};
|