spatial-views 0.1.0 → 0.2.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/README.md +201 -19
- package/dist/app/assets/{abnfDiagram-S7VZAUFO-BVgtb0Hw.js → abnfDiagram-S7VZAUFO-CFbb_Sz2.js} +1 -1
- package/dist/app/assets/{architecture-WOLXFQ4H-DxylGHqT.js → architecture-WOLXFQ4H-CsBD__5a.js} +1 -1
- package/dist/app/assets/architectureDiagram-YGSQEFNW-C0ic4ib1.js +36 -0
- package/dist/app/assets/{blockDiagram-APKKGZFW-C7fb3MCE.js → blockDiagram-APKKGZFW-BZDPbzAG.js} +1 -1
- package/dist/app/assets/{c4Diagram-KJ2TOQU5-Bkb_0fbd.js → c4Diagram-KJ2TOQU5-BilBWuq5.js} +1 -1
- package/dist/app/assets/{chunk-6MUBBAK2-DU4vZ03M.js → chunk-6MUBBAK2-BBl-4tQr.js} +1 -1
- package/dist/app/assets/{chunk-AXFCVDMN-De96BVTB.js → chunk-AXFCVDMN-BhsttQ-k.js} +1 -1
- package/dist/app/assets/{chunk-BG4553SI-J33jsRLV.js → chunk-BG4553SI-mWcPcFZr.js} +2 -2
- package/dist/app/assets/{chunk-DQASFODM-Bh85SSGO.js → chunk-DQASFODM-7FKe2gLt.js} +1 -1
- package/dist/app/assets/{chunk-HFQBQIA3-CCklgplR.js → chunk-HFQBQIA3-nXrQ08BL.js} +1 -1
- package/dist/app/assets/{chunk-KQLB2F66-B04qR8ED.js → chunk-KQLB2F66-swukhFmZ.js} +1 -1
- package/dist/app/assets/{chunk-KS47KZWR-BsqDyyAt.js → chunk-KS47KZWR-DkDkwO82.js} +1 -1
- package/dist/app/assets/{chunk-LEVMRMFU-DwxrBz2u.js → chunk-LEVMRMFU-DXH6iXv3.js} +1 -1
- package/dist/app/assets/{chunk-M57EVK23-D9YIHjps.js → chunk-M57EVK23-B-kEyOJF.js} +1 -1
- package/dist/app/assets/{chunk-OY52VR5R-WB63DeTA.js → chunk-OY52VR5R-DweG7qYw.js} +1 -1
- package/dist/app/assets/{chunk-QB3YPZ4I-cHzzKdtb.js → chunk-QB3YPZ4I-DyozK3lV.js} +1 -1
- package/dist/app/assets/{chunk-R3KSYZAL-C7rDagaa.js → chunk-R3KSYZAL-BEXCUN6J.js} +1 -1
- package/dist/app/assets/{chunk-STOXU5M4-CG6pnJtH.js → chunk-STOXU5M4-BaTlty4O.js} +1 -1
- package/dist/app/assets/{chunk-TU62E6Q5-BbcGYfy_.js → chunk-TU62E6Q5-_rcUP1Fh.js} +1 -1
- package/dist/app/assets/chunk-X3CZISLH-NOpCnvgE.js +1 -0
- package/dist/app/assets/{chunk-X4PVCEUW-BUI1Oi3q.js → chunk-X4PVCEUW-DGxTL3kB.js} +1 -1
- package/dist/app/assets/{chunk-XXDRQBXY-DYhK5YW-.js → chunk-XXDRQBXY-C02Gpej2.js} +1 -1
- package/dist/app/assets/{classDiagram-v2-L25IHNXF-K-k5GTUn.js → classDiagram-v2-L25IHNXF-DLEBwpvk.js} +1 -1
- package/dist/app/assets/cose-bilkent-JH36ORCC-kNCXOm8k.js +1 -0
- package/dist/app/assets/cynefin-EF2NZ3EQ-6MWNLbuF.js +1 -0
- package/dist/app/assets/{cynefinDiagram-L36ESFBY-mkV33_Xx.js → cynefinDiagram-L36ESFBY-CLFstukD.js} +1 -1
- package/dist/app/assets/{d3-scale-ygdFCUH8.js → d3-scale-CaJQQYkF.js} +1 -1
- package/dist/app/assets/{dagre-SPEB5RXH-BNIymLsu.js → dagre-SPEB5RXH-BaSAny1T.js} +1 -1
- package/dist/app/assets/{diagram-3B7GL73J-CGOiolFW.js → diagram-3B7GL73J-DJNlt5Sg.js} +1 -1
- package/dist/app/assets/{diagram-DNEMPZML-DZFkHNly.js → diagram-DNEMPZML-DEHeuILB.js} +1 -1
- package/dist/app/assets/{diagram-L3MUGCDN-B42GAYLq.js → diagram-L3MUGCDN-ob5Ka2Xc.js} +1 -1
- package/dist/app/assets/{diagram-LA4NIPWU-BYuLRYId.js → diagram-LA4NIPWU-DNESzFAc.js} +1 -1
- package/dist/app/assets/{diagram-MHCOC4E2-DGzI6TJG.js → diagram-MHCOC4E2-CVi9zKjG.js} +1 -1
- package/dist/app/assets/{diagram-XPFHEONP-CTBEgDQ8.js → diagram-XPFHEONP-DInT4C7e.js} +1 -1
- package/dist/app/assets/dist-CjvHN74u.js +1 -0
- package/dist/app/assets/{ebnfDiagram-UZSYDL2S-GuMdOCvL.js → ebnfDiagram-UZSYDL2S-CRCZNsji.js} +1 -1
- package/dist/app/assets/{elk-XV6XMXQE-BpY3loT5.js → elk-XV6XMXQE-D4fsWI2l.js} +1 -1
- package/dist/app/assets/{erDiagram-EYBAPDEH-nDZ2PMGl.js → erDiagram-EYBAPDEH-YQNM5StV.js} +1 -1
- package/dist/app/assets/{eventmodeling-K75KTNOO-BN42Mgwh.js → eventmodeling-K75KTNOO-Bev08J2F.js} +1 -1
- package/dist/app/assets/flowDiagram-MALGAFMO-BhJ554DH.js +1 -0
- package/dist/app/assets/ganttDiagram-23REXITY-CkaBMYM4.js +292 -0
- package/dist/app/assets/gitGraph-VSP46ZUC-CtbZ0sIS.js +1 -0
- package/dist/app/assets/{gitGraphDiagram-STJD7YCW-CDkKLrvO.js → gitGraphDiagram-STJD7YCW-D15ZdQ-Z.js} +1 -1
- package/dist/app/assets/index-Bn6_wHEp.js +98 -0
- package/dist/app/assets/index-H-Z7MFhZ.css +1 -0
- package/dist/app/assets/info-OHQRW6UA-CfUW1XFR.js +1 -0
- package/dist/app/assets/{infoDiagram-KBXO4MBG-B92P8pjY.js → infoDiagram-KBXO4MBG-DT7LbBRQ.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-M35NCXHK-BRZsbCvK.js → ishikawaDiagram-M35NCXHK-CF51lhjB.js} +1 -1
- package/dist/app/assets/{journeyDiagram-OPLOXDXO-Bppwb1oF.js → journeyDiagram-OPLOXDXO-_36FonKk.js} +1 -1
- package/dist/app/assets/{kanban-definition-BZKZHSQY-ByD_x5cm.js → kanban-definition-BZKZHSQY-tLk_OlQ-.js} +1 -1
- package/dist/app/assets/{mermaid-parser.core-CKmnV0Md.js → mermaid-parser.core-_3Vo8x6b.js} +3 -3
- package/dist/app/assets/mermaid.core-y-x1CYxC.js +44 -0
- package/dist/app/assets/{mindmap-definition-I2QAS2VK-fRbUh23C.js → mindmap-definition-I2QAS2VK-BCI4HRX3.js} +1 -1
- package/dist/app/assets/packet-JDAUHWVQ-Cco3UoaI.js +1 -0
- package/dist/app/assets/{pegDiagram-FD4XPPHP-qIABf6H8.js → pegDiagram-FD4XPPHP-BOzSoNji.js} +1 -1
- package/dist/app/assets/pie-XZMESJXO-reOB2GXn.js +1 -0
- package/dist/app/assets/{pieDiagram-J4AKIIQI-Bb4RBdrc.js → pieDiagram-J4AKIIQI-PlHpwT_c.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-XTYBLID2-B0CpcVWE.js → quadrantDiagram-XTYBLID2-CdxZ0ael.js} +1 -1
- package/dist/app/assets/radar-ABXABTNO-DfCl8uV2.js +1 -0
- package/dist/app/assets/railroad-I3PHUGI6-4s14UyW1.js +1 -0
- package/dist/app/assets/{railroad-abnf-LNEFI6M7-BUhw7Iuo.js → railroad-abnf-LNEFI6M7-C49jJE4Y.js} +1 -1
- package/dist/app/assets/{railroad-ebnf-DWYD2UWJ-nQNF56LJ.js → railroad-ebnf-DWYD2UWJ-Bx-pcPc7.js} +1 -1
- package/dist/app/assets/{railroad-peg-JR7BVNR7-CwvbVIo6.js → railroad-peg-JR7BVNR7-DjBPSCKV.js} +1 -1
- package/dist/app/assets/{railroadDiagram-MRQ6NCDL-Dwr-mPZL.js → railroadDiagram-MRQ6NCDL-wGcmIMqq.js} +1 -1
- package/dist/app/assets/{requirementDiagram-Y7LWUY3S-Ctv2DKJM.js → requirementDiagram-Y7LWUY3S-DprFI03z.js} +1 -1
- package/dist/app/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/app/assets/{sankeyDiagram-WGJFYUXA-BvKX0eIe.js → sankeyDiagram-WGJFYUXA-DygYWLTR.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-5NDRBG5M-Y4YqU2Xt.js → sequenceDiagram-5NDRBG5M-BzIr2DBO.js} +1 -1
- package/dist/app/assets/{stateDiagram-v2-FJ4FJNEA-DmjIjn4u.js → stateDiagram-v2-FJ4FJNEA-MGCqKnm_.js} +1 -1
- package/dist/app/assets/{swimlanes-UMQ2AFYF-B2O5JCjs.js → swimlanes-UMQ2AFYF-CIEH82Zt.js} +1 -1
- package/dist/app/assets/swimlanesDiagram-OMPLPG4O-YWNJjl0g.js +8 -0
- package/dist/app/assets/{timeline-definition-SEUHKTQE-DJJdixAI.js → timeline-definition-SEUHKTQE-BGYSqup2.js} +1 -1
- package/dist/app/assets/treeView-D4JQ5SDB-B39o1sJo.js +1 -0
- package/dist/app/assets/treemap-SAJKECNS-BoGxrUH4.js +1 -0
- package/dist/app/assets/{usecaseDiagram-AFA6YXN4-Bp8pXgvR.js → usecaseDiagram-AFA6YXN4-dy6oVOke.js} +1 -1
- package/dist/app/assets/{vennDiagram-NNMJR3RB-DYSfZMWT.js → vennDiagram-NNMJR3RB-CUyuhcAk.js} +1 -1
- package/dist/app/assets/wardley-7MLQ67FV-sYPAvQ06.js +1 -0
- package/dist/app/assets/{wardleyDiagram-S7YFUSEH-CGJ8qg76.js → wardleyDiagram-S7YFUSEH-DYtxYUHe.js} +1 -1
- package/dist/app/assets/{xychartDiagram-GGNKY7IX-CRSvraFc.js → xychartDiagram-GGNKY7IX-ClR06AlB.js} +1 -1
- package/dist/app/index.html +3 -2
- package/dist/cli/index.js +281 -53
- package/dist/core/api.js +262 -51
- package/dist/core/approvals.js +426 -0
- package/dist/core/context.js +68 -3
- package/dist/core/diff.js +156 -0
- package/dist/core/docs.js +9 -3
- package/dist/core/doctor.js +152 -0
- package/dist/core/doctypes.js +79 -0
- package/dist/core/edit.js +25 -0
- package/dist/core/flags.js +13 -0
- package/dist/core/gaps.js +7 -2
- package/dist/core/heading.js +4 -0
- package/dist/core/history.js +36 -5
- package/dist/core/home.js +345 -0
- package/dist/core/lanes.js +134 -0
- package/dist/core/launch.js +34 -0
- package/dist/core/layout.js +362 -0
- package/dist/core/newdoc.js +66 -0
- package/dist/core/open-folder.js +30 -0
- package/dist/core/openspec.js +6 -6
- package/dist/core/paths.js +71 -4
- package/dist/core/project.js +392 -0
- package/dist/core/route.js +420 -0
- package/dist/core/scan.js +514 -0
- package/dist/core/schema.js +170 -1
- package/dist/core/scope.js +126 -0
- package/dist/core/setup.js +134 -0
- package/dist/core/skills.js +92 -14
- package/dist/core/storage/config.js +74 -0
- package/dist/core/storage/events.js +54 -0
- package/dist/core/storage/folder-watch.js +147 -0
- package/dist/core/storage/folder.js +469 -0
- package/dist/core/storage/index.js +8 -0
- package/dist/core/storage/local.js +22 -0
- package/dist/core/storage/migrate.js +48 -0
- package/dist/core/storage/postgres.js +290 -0
- package/dist/core/storage/types.js +101 -0
- package/dist/core/storage.js +483 -77
- package/dist/core/suggest.js +283 -0
- package/dist/core/tree.js +254 -0
- package/dist/core/types.js +583 -0
- package/dist/core/version.js +1 -1
- package/dist/core/versions.js +245 -0
- package/dist/core/watch.js +2 -136
- package/dist/core/xml.js +23 -5
- package/dist/demo/args.js +58 -0
- package/dist/demo/browser.js +301 -0
- package/dist/demo/platform.js +147 -0
- package/dist/demo/run.js +198 -0
- package/dist/demo/steps.js +328 -0
- package/dist/mcp/project-tools.js +193 -0
- package/dist/mcp/server.js +493 -65
- package/examples/platform/README.md +33 -0
- package/examples/platform/api/package.json +8 -0
- package/examples/platform/api/src/auth-middleware.js +16 -0
- package/examples/platform/api/src/proxy.js +7 -0
- package/examples/platform/api/src/rate-limit.js +13 -0
- package/examples/platform/api/src/server.js +40 -0
- package/examples/platform/auth/package.json +9 -0
- package/examples/platform/auth/src/server.js +24 -0
- package/examples/platform/auth/src/tokens.js +19 -0
- package/examples/platform/auth/src/users.js +16 -0
- package/examples/platform/docs/api/PRD.md +10 -0
- package/examples/platform/docs/api/SDD.md +15 -0
- package/examples/platform/docs/auth/PRD.md +10 -0
- package/examples/platform/docs/auth/SDD.md +8 -0
- package/examples/platform/docs/frontend/PRD.md +18 -0
- package/examples/platform/docs/frontend/SDD.md +13 -0
- package/examples/platform/docs/pricing/PRD.md +9 -0
- package/examples/platform/docs/pricing/SDD.md +8 -0
- package/examples/platform/docs/products/PRD.md +9 -0
- package/examples/platform/docs/products/SDD.md +8 -0
- package/examples/platform/frontend/package.json +8 -0
- package/examples/platform/frontend/src/api-client.js +21 -0
- package/examples/platform/frontend/src/main.js +21 -0
- package/examples/platform/frontend/src/pages/products.js +12 -0
- package/examples/platform/frontend/src/pages/sign-in.js +14 -0
- package/examples/platform/frontend/src/session.js +11 -0
- package/examples/platform/pricing/package.json +9 -0
- package/examples/platform/pricing/src/cache.js +19 -0
- package/examples/platform/pricing/src/product-events.js +17 -0
- package/examples/platform/pricing/src/rules.js +19 -0
- package/examples/platform/pricing/src/server.js +32 -0
- package/examples/platform/products/package.json +9 -0
- package/examples/platform/products/src/catalog.js +20 -0
- package/examples/platform/products/src/events.js +11 -0
- package/examples/platform/products/src/search.js +9 -0
- package/examples/platform/products/src/server.js +31 -0
- package/migrations/postgres/001_init.sql +55 -0
- package/migrations/postgres/002_view_versions.sql +18 -0
- package/package.json +18 -2
- package/schema/approval.schema.json +173 -0
- package/schema/gap.schema.json +3 -0
- package/schema/project.schema.json +93 -0
- package/schema/settings.schema.json +86 -0
- package/schema/toolbox.schema.json +206 -0
- package/schema/type.schema.json +121 -0
- package/schema/view.schema.json +106 -0
- package/skills/claude/build-gap/SKILL.md +7 -0
- package/skills/claude/check-ui/SKILL.md +40 -0
- package/skills/claude/draw-system/SKILL.md +24 -9
- package/skills/claude/gap-from-view/SKILL.md +7 -0
- package/skills/claude/post-audit/SKILL.md +58 -0
- package/skills/claude/pre-audit/SKILL.md +82 -0
- package/skills/claude/update-state/SKILL.md +56 -0
- package/skills/cursor/check-ui.mdc +40 -0
- package/skills/cursor/draw-system.mdc +24 -9
- package/skills/cursor/post-audit.mdc +44 -0
- package/skills/cursor/pre-audit.mdc +49 -0
- package/skills/cursor/update-state.mdc +45 -0
- package/skills/windsurf/spatial-views.md +182 -36
- package/toolboxes/aws.yaml +43 -0
- package/toolboxes/azure.yaml +41 -0
- package/toolboxes/cloud.yaml +95 -0
- package/toolboxes/docs.yaml +111 -0
- package/toolboxes/software.yaml +114 -0
- package/toolboxes/types/docs/gap.yaml +15 -0
- package/toolboxes/types/docs/mdd.yaml +19 -0
- package/toolboxes/types/docs/plain.yaml +7 -0
- package/toolboxes/types/docs/prd.yaml +17 -0
- package/dist/app/assets/architectureDiagram-YGSQEFNW-BrBCHqUH.js +0 -36
- package/dist/app/assets/chunk-X3CZISLH-FMl4PpWt.js +0 -1
- package/dist/app/assets/cose-bilkent-JH36ORCC-BJmLLpaN.js +0 -1
- package/dist/app/assets/cynefin-EF2NZ3EQ-DrzwMKdm.js +0 -1
- package/dist/app/assets/dist-1Q8ng3tu.js +0 -1
- package/dist/app/assets/flowDiagram-MALGAFMO-BCwwiLzb.js +0 -1
- package/dist/app/assets/ganttDiagram-23REXITY-xMRHaU3y.js +0 -292
- package/dist/app/assets/gitGraph-VSP46ZUC-DyGq5mdd.js +0 -1
- package/dist/app/assets/index-BY66fc8Q.js +0 -95
- package/dist/app/assets/index-ByetEVbs.css +0 -1
- package/dist/app/assets/info-OHQRW6UA-DOBf-fQH.js +0 -1
- package/dist/app/assets/mermaid.core-BoRvk1Q-.js +0 -44
- package/dist/app/assets/packet-JDAUHWVQ-CgHq03Zj.js +0 -1
- package/dist/app/assets/pie-XZMESJXO-DtNh3cDE.js +0 -1
- package/dist/app/assets/radar-ABXABTNO-BS0FcsIX.js +0 -1
- package/dist/app/assets/railroad-I3PHUGI6-lO8vfGdI.js +0 -1
- package/dist/app/assets/swimlanesDiagram-OMPLPG4O-DhCl-Cjg.js +0 -8
- package/dist/app/assets/treeView-D4JQ5SDB-Dd1no4eE.js +0 -1
- package/dist/app/assets/treemap-SAJKECNS-t6wtsaki.js +0 -1
- package/dist/app/assets/wardley-7MLQ67FV-Bx60QTuu.js +0 -1
- package/skills/cursor/build-gap.mdc +0 -21
- package/skills/cursor/gap-from-view.mdc +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-LEVMRMFU-DwxrBz2u.js";import{t}from"./chunk-AXFCVDMN-De96BVTB.js";import{i as n,n as r}from"./chunk-X4PVCEUW-BUI1Oi3q.js";import{n as i,r as a}from"./chunk-STOXU5M4-CG6pnJtH.js";import{_ as o,d as s}from"./chunk-6MUBBAK2-DU4vZ03M.js";import{at as c,b as l,ot as u,w as d,y as f}from"./chunk-BG4553SI-J33jsRLV.js";import{t as p}from"./chunk-X3CZISLH-FMl4PpWt.js";import{n as m}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as h}from"./index-BY66fc8Q.js";import{C as g,S as _,b as v,f as y,g as ee,h as b,l as te,o as ne,r as re,s as ie,v as ae,w as oe,y as se}from"./dist-1Q8ng3tu.js";import{t as ce}from"./rough.esm-Dy-Kn_BL.js";var x=(e,t)=>u.lang.round(c.parse(e)[t]),S=m((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),C={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},w={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5,arrow_open_head:4,arrow_hollow_circle:8};function T(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=E(e),t=E(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}m(T,`calculateDeltaAndAngle`);var E=m(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),le=m(e=>({x:m(function(t,n,r){let i=0,a=E(r[0]).x<E(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(C,e.arrowTypeStart)){let{angle:t,deltaX:n}=T(r[0],r[1]);i=C[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(C,e.arrowTypeEnd)){let{angle:t,deltaX:n}=T(r[r.length-1],r[r.length-2]);i=C[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(E(t).x-E(r[r.length-1]).x),s=Math.abs(E(t).y-E(r[r.length-1]).y),c=Math.abs(E(t).x-E(r[0]).x),l=Math.abs(E(t).y-E(r[0]).y),u=C[e.arrowTypeStart],d=C[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`right`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`right`?-1:1,i+=e}return E(t).x+i},`x`),y:m(function(t,n,r){let i=0,a=E(r[0]).y<E(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(C,e.arrowTypeStart)){let{angle:t,deltaY:n}=T(r[0],r[1]);i=C[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(C,e.arrowTypeEnd)){let{angle:t,deltaY:n}=T(r[r.length-1],r[r.length-2]);i=C[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(E(t).y-E(r[r.length-1]).y),s=Math.abs(E(t).x-E(r[r.length-1]).x),c=Math.abs(E(t).y-E(r[0]).y),l=Math.abs(E(t).x-E(r[0]).x),u=C[e.arrowTypeStart],d=C[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`up`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`up`?-1:1,i+=e}return E(t).y+i},`y`)}),`getLineFunctionsWithOffset`),D=1,O=m(e=>typeof e==`number`&&Number.isFinite(e)&&e>0?e:D,`getStepDuration`),k=m(e=>typeof e.step==`number`&&Number.isInteger(e.step)&&e.step>0,`isStepEdge`),A=[.25,.35,.15,.65,.75,.5,.85,.1,.9],j=9,M=11,ue=2,de=`#333333`,N=12,P=6,F=14,I=.01,L=4.5,R=/translate\(\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i,z=4,B=.6,V=4,fe=m((e,t,n=D)=>{let r=Math.max(t,e);return{begin:(e-1)*n,dur:n,gap:(r-1)*n}},`getEdgeStepTiming`),pe=m(e=>`step_${Array.from(e,e=>/[\dA-Za-z]/.test(e)?e:`_${(e.codePointAt(0)??0).toString(16)}_`).join(``)}`,`toAnimationId`),me=m(e=>{let t=/^m\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i.exec(e.trim());return t?`translate(${t[1]},${t[2]}) `:``},`pathStartTranslate`),H=m(e=>Array.from(e,(t,n)=>{let r=t.codePointAt(0)??0;if(r===0)return`�`;let i=r<=31||r===127,a=/\d/.test(t)&&(n===0||n===1&&e.startsWith(`-`));return i||a?`\\${r.toString(16)} `:e===`-`?`\\-`:r>=128||/[\w-]/.test(t)?t:`\\${t}`}).join(``),`escapeCssIdentifierFallback`),he=m(e=>typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):H(e),`escapeCssIdentifier`),ge=m((e,t)=>{let n=e.node(),r=n?.ownerSVGElement??n?.closest?.(`svg`)??n,i=t||r?.getAttribute(`id`);if(!r||!i||r.querySelector(`style.edge-step-style`))return;let a=`#${he(i)} `,o=r.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`style`);o.setAttribute(`class`,`edge-step-style`),o.textContent=`@media (prefers-reduced-motion: reduce) { ${a}.edge-step-dot, ${a}.edge-step-highlight { display: none; } }`,r.appendChild(o)},`ensureReducedMotionStyle`),_e=m((e,t)=>{let n=e.filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y));if(n.length===0)return;let r=n.slice(1).map((e,t)=>Math.hypot(e.x-n[t].x,e.y-n[t].y)),i=r.reduce((e,t)=>e+t,0)*t;for(let[e,t]of r.entries()){if(i<=t&&t>0){let r=i/t,a=n[e],o=n[e+1];return{x:a.x+(o.x-a.x)*r,y:a.y+(o.y-a.y)*r}}i-=t}return n[n.length-1]},`pointAlongPolyline`),ve=m((e,t)=>{let n=typeof t?.getTotalLength==`function`?t.getTotalLength():0,r=t?.getPointAtLength?.bind(t);return n>0&&r?e=>{let{x:t,y:i}=r(n*e);return{x:t,y:i}}:t=>_e(e,t)},`createPathSampler`),ye=m((e,t)=>Math.min(1/0,...t.map(t=>{let n=Math.max(Math.abs(e.x-t.x)-t.halfWidth,0),r=Math.max(Math.abs(e.y-t.y)-t.halfHeight,0);return Math.hypot(n,r)-j})),`roomAround`),be=m((e,t)=>{let n=e(t),r=e(Math.max(t-I,0)),i=e(Math.min(t+I,1));if(!n||!r||!i)return[];let a=Math.hypot(i.x-r.x,i.y-r.y);if(a===0)return[];let o={x:-(i.y-r.y)/a,y:(i.x-r.x)/a};return[1,-1].map(e=>({x:n.x+o.x*F*e,y:n.y+o.y*F*e}))},`besideThePath`),xe=m((e,t)=>{let n=[...A.map(e),...A.flatMap(t=>be(e,t))],r,i=-1/0;for(let e of n){if(!e||!Number.isFinite(e.x)||!Number.isFinite(e.y))continue;let n=ye(e,t);if(n>=ue)return e;n>i&&(r=e,i=n)}return r},`chooseBadgePosition`),Se=m((e,t)=>({...e,halfWidth:t,halfHeight:t}),`square`),Ce=m(e=>{let t=R.exec(e.getAttribute(`transform`)??``);return t?{x:Number(t[1]),y:Number(t[2])}:{x:0,y:0}},`translationOf`),U=m(e=>{let t={x:0,y:0};for(let n=e;n&&n.localName!==`svg`;n=n.parentElement){let{x:e,y:r}=Ce(n);t.x+=e,t.y+=r}return t},`offsetInSvg`),we=m((e,t)=>{if(!R.test(e.getAttribute(`transform`)??``))return;let n=U(e),r=n.x-t.x,i=n.y-t.y,a=e.getBBox?.();if(a)return{x:r+a.x+a.width/2,y:i+a.y+a.height/2,halfWidth:a.width/2,halfHeight:a.height/2}},`boxedObstacle`),Te=m(e=>{try{let t=JSON.parse(atob(e.getAttribute(`data-points`)??``));return Array.isArray(t)?t:[]}catch{return[]}},`readPoints`),Ee=m((e,t)=>{let n=Math.hypot(e.x-t.x,e.y-t.y);if(n===0)return Se(e,N);let r={x:(e.x-t.x)/n,y:(e.y-t.y)/n},i=N/2;return{x:e.x-r.x*i,y:e.y-r.y*i,halfWidth:Math.abs(r.x)*i+Math.abs(r.y)*P,halfHeight:Math.abs(r.y)*i+Math.abs(r.x)*P}},`arrowheadObstacle`),De=m((e,t)=>{let n=e.getAttribute(t);return!!n&&n!==`none`},`hasMarker`),Oe=m((e,t)=>{let n=Te(e).filter(e=>Number.isFinite(e?.x)&&Number.isFinite(e?.y));if(n.length===0)return[];let r=U(e),i=m(e=>({x:e.x+r.x-t.x,y:e.y+r.y-t.y}),`toSvg`),a=n.length-1,o=[];return De(e,`marker-start`)&&o.push(Ee(i(n[0]),i(n[Math.min(1,a)]))),De(e,`marker-end`)&&o.push(Ee(i(n[a]),i(n[Math.max(a-1,0)]))),o},`arrowheadObstacles`),ke=m(e=>{let t={x:0,y:0},n=[...e?.querySelectorAll(`.edgeLabel, .node`)??[]].map(e=>we(e,t)).filter(e=>e!==void 0),r=[...e?.querySelectorAll(`path[data-edge="true"]`)??[]].flatMap(e=>Oe(e,t));return[...n,...r]},`collectBadgeObstacles`),Ae=m((e,t)=>{if(!e.label||t.length===0)return[];let{x:n,y:r}=o.calcLabelPosition(t);return[{x:n,y:r,halfWidth:(e.width??0)/2,halfHeight:(e.height??0)/2}]},`edgeLabelObstacles`),je=m(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},`linearChannel`),Me=m(e=>{try{let[t,n,r]=[`r`,`g`,`b`].map(t=>je(x(e,t)));return .2126*t+.7152*n+.0722*r}catch{return}},`relativeLuminance`),Ne=m((e,t)=>{let n=Me(e),r=Me(t);return n===void 0||r===void 0?0:(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},`contrastRatio`),Pe=m((e,t)=>{let n=[...t.filter(e=>!!e),`#ffffff`,`#000000`].map(t=>({color:t,ratio:Ne(e,t)}));return(n.find(({ratio:e})=>e>=L)??n.reduce((e,t)=>t.ratio>e.ratio?t:e)).color},`pickBadgeTextColor`),Fe=m(e=>{let t=e?.replace(/^stroke:\s*/,``).trim();return t===``?void 0:t},`bareColor`),Ie=m((e,t,n,r=ke(e.node()?.closest(`svg`)))=>{if(!k(t)||!t.showStepNumber)return;let i=U(e.node()),a=r.map(e=>({...e,x:e.x-i.x,y:e.y-i.y})),o=xe(ve(n.points,n.pathNode),[...a,...Ae(t,n.points)]);if(!o)return;let s=Fe(n.color)??de,c=e.append(`g`).attr(`class`,`edge-step-badge`).attr(`transform`,`translate(${o.x},${o.y})`).attr(`pointer-events`,`none`).attr(`data-step`,t.step);return c.append(`circle`).attr(`r`,j).attr(`fill`,s),c.append(`text`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,M).attr(`fill`,Pe(s,n.textColors??[])).text(String(t.step)),Se({x:o.x+i.x,y:o.y+i.y},j)},`insertEdgeStepBadge`),Le=m((e,t,n)=>{e.append(`animateTransform`).attr(`attributeName`,`transform`).attr(`type`,`scale`).attr(`values`,`1;1`).attr(`dur`,`${n}s`).attr(`begin`,`${t}.begin`).attr(`fill`,`remove`)},`showWhileStepPlays`),Re=m((e,t,n,r,i)=>{if(!k(t)||!n)return;let{begin:a,dur:o,gap:s}=fe(t.step,t.stepCount??t.step,O(t.stepDuration)),c=pe(`${r}-${t.id}-step`),l=`${me(n)}scale(0)`,u=i?.replace(/^stroke:\s*/,``);Le(e.append(`path`).attr(`class`,`edge-step-highlight`).attr(`aria-hidden`,`true`).attr(`d`,n).attr(`fill`,`none`).attr(`stroke`,u??`currentColor`).attr(`stroke-width`,z).attr(`stroke-linecap`,`round`).attr(`stroke-opacity`,B).attr(`pointer-events`,`none`).attr(`transform`,l).attr(`data-step`,t.step),c,o);let d=e.append(`circle`).attr(`class`,`edge-step-dot`).attr(`r`,V).attr(`aria-hidden`,`true`).attr(`transform`,l).attr(`data-step`,t.step);u&&d.attr(`fill`,u).attr(`stroke`,`none`),d.append(`animateMotion`).attr(`id`,c).attr(`path`,n).attr(`dur`,`${o}s`).attr(`begin`,`${a}s;${c}.end+${s}s`).attr(`fill`,`remove`),Le(d,c,o),ge(e,r)},`insertEdgeStepDot`),W=new WeakMap,ze=m(e=>{let t=e.querySelector(`:scope > g.edge-step-badges`);if(t)return t;let n=e.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`g`);return n.setAttribute(`class`,`edge-step-badges`),e.appendChild(n)},`badgeLayer`),Be=m(e=>{let t=e?W.get(e):void 0;if(!e||!t)return;W.delete(e);let n=ke(e);for(let{elem:e,edge:r,options:i}of t){let t=e.node()?.parentElement;if(!t)continue;let a=Ie(h(ze(t)),r,i,n);a&&n.push(a)}},`placeQueuedStepBadges`),Ve=m((e,t,n,r,i)=>{Re(e,t,n,r,i.color);let a=e.node(),o=a?.ownerSVGElement??a;o&&k(t)&&t.showStepNumber&&W.set(o,[...W.get(o)??[],{elem:e,edge:t,options:i}])},`insertEdgeStepMarks`),He=m((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&Ge(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&Ge(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),Ue={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},arrow_open_head:{type:`openArrow`,fill:!1},arrow_hollow_circle:{type:`hollowCircle`,fill:!1},arrow_hierarchy:{type:`hierarchy`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},We=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],Ge=m((e,t,n,r,i,a,o=!1,s)=>{if(!n||n===`none`)return;let c=Ue[n],l=c&&We.includes(c.type);if(!c){p.warn(`Unknown arrow type: ${n}`);return}let u=`${i}_${a}-${c.type}${t===`start`?`Start`:`End`}${o&&l?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${u}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(u);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${u})`)},`addEdgeMarker`),Ke=m(e=>typeof e==`string`?e:l()?.flowchart?.curve,`resolveEdgeCurveType`),G=new Map,K=new Map,qe=m(()=>{G.clear(),K.clear()},`clear`),Je=m(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),q=m(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),Ye=m(async(e,r)=>{let o=l(),s=d(o),{labelStyles:c}=n(r);r.labelStyle=c;let u=e.insert(`g`).attr(`class`,`edgeLabel`),f=u.insert(`g`).attr(`class`,`label`).attr(`data-id`,r.id),m=r.labelType===`markdown`,g=await i(e,r.label,{style:q(r.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:m,width:void 0},o);f.node().appendChild(g),p.info(`abc82`,r,r.labelType);let _,v;if(s){let e=g.children[0],t=h(g);_=await a.measure(()=>e.getBoundingClientRect()),v=_,t.attr(`width`,_.width),t.attr(`height`,_.height)}else{let e=h(g).select(`text`).node();await a.measure(()=>{_=g.getBBox(),v=e&&typeof e.getBBox==`function`?e.getBBox():_})}f.attr(`transform`,S(v,s)),G.set(r.id,u),r.width=_.width,r.height=_.height;let y;if(r.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.startLabelLeft,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).startLeft=n,Y(y,r.startLabelLeft,o),J(r,`startLeft`,o)}if(r.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.startLabelRight,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).startRight=n,Y(y,r.startLabelRight,o),J(r,`startRight`,o)}if(r.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.endLabelLeft,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).endLeft=n,Y(y,r.endLabelLeft,o),J(r,`endLeft`,o)}if(r.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.endLabelRight,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).endRight=n,Y(y,r.endLabelRight,o),J(r,`endRight`,o)}return g},`insertEdgeLabel`);function J(e,t,n){e.terminalLabelSizes??={},e.terminalLabelSizes[t]={width:n.width,height:n.height}}m(J,`recordTerminalLabelSize`);function Y(e,t,n){d(l())&&e&&(e.style.width=Math.max(t.length*9,n.width)+`px`,e.style.height=n.height+`px`)}m(Y,`setTerminalWidth`);var Xe=m((e,t)=>{let n=e.x,r=e.y;if(t?.updatedPath){let i=o.calcLabelPosition(t.updatedPath);if(t.originalPath){let a=o.calcLabelPosition(t.originalPath);n=e.x+(i.x-a.x),r=e.y+(i.y-a.y)}else n=i.x,r=i.y}return{x:n,y:r}},`resolveEdgeLabelPosition`),Ze=m((t,n)=>{p.debug(`Moving label abc88 `,t.id,t.label,G.get(t.id),n);let r=l(),{subGraphTitleTotalMargin:i}=e(r);if(t.label){let e=G.get(t.id),{x:r,y:a}=Xe(t,n);p.debug(`Moving label `+t.label+` from (`,t.x,`,`,t.y,`) to (`,r,`,`,a,`) abc88`),e.attr(`transform`,`translate(${r}, ${a+i/2})`)}let a=n.updatedPath?n.updatedPath:n.originalPath;if(t.startLabelLeft){let e=K.get(t.id).startLeft,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_left`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}if(t.startLabelRight){let e=K.get(t.id).startRight,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_right`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}if(t.endLabelLeft){let e=K.get(t.id).endLeft,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_left`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}if(t.endLabelRight){let e=K.get(t.id).endRight,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_right`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}},`positionEdgeLabel`),X=.5,Z=m((e,t)=>Math.abs(e.x-t.x)<X,`sharesColumn`),Q=m((e,t)=>Math.abs(e.y-t.y)<X,`sharesRow`),Qe=m((e,t)=>Z(e,t)&&Q(e,t),`coincides`);function $e(e,t,n){return Z(e,t)&&!Q(e,t)?Z(n,t):Q(e,t)&&!Z(e,t)?Q(n,t):Z(n,t)||Q(n,t)}m($e,`keepsArrivalAxis`);function et(e,t,n){return Qe(e,t)?{heading:t,from:n}:{heading:e,from:t}}m(et,`arrivalSegment`);function tt({heading:e,from:t},n,r){return(e.x-t.x)*(r.x-n.x)+(e.y-t.y)*(r.y-n.y)<0}m(tt,`runsAgainstHeading`);function nt({heading:e,from:t},n,r){return Q(e,t)&&!Z(e,t)?{x:r.x,y:n.y}:Z(e,t)&&!Q(e,t)?{x:n.x,y:r.y}:r}m(nt,`snapToArrivalAxis`);function rt(e,t,n,r){if((Z(e,t)||Q(e,t))&&!$e(e,t,r))return e;let i=et(e,t,n);return tt(i,t,r)?t:nt(i,t,r)}m(rt,`dockFinalPoint`);function it(e){let t=Object.hasOwn(C,e)?C[e]:0;return Number.isFinite(t)?t:0}m(it,`markerPullBack`);function at({originalLast:e,lastInner:t,newLast:n,minLength:r}){let i=!Qe(e,t),a=Math.hypot(n.x-t.x,n.y-t.y);return a>=Math.max(X,r)?n:i&&a>=X?e:void 0}m(at,`finalDockPoint`);var ot=m((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),st=m((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),ct=m((e,t,n)=>{p.debug(`intersection calc abc89:
|
|
1
|
+
import{n as e}from"./chunk-LEVMRMFU-DXH6iXv3.js";import{t}from"./chunk-AXFCVDMN-BhsttQ-k.js";import{i as n,n as r}from"./chunk-X4PVCEUW-DGxTL3kB.js";import{n as i,r as a}from"./chunk-STOXU5M4-BaTlty4O.js";import{_ as o,d as s}from"./chunk-6MUBBAK2-BBl-4tQr.js";import{at as c,b as l,ot as u,w as d,y as f}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as p}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as m}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as h}from"./index-Bn6_wHEp.js";import{C as g,S as _,b as v,f as y,g as ee,h as b,l as te,o as ne,r as re,s as ie,v as ae,w as oe,y as se}from"./dist-CjvHN74u.js";import{t as ce}from"./rough.esm-Dy-Kn_BL.js";var x=(e,t)=>u.lang.round(c.parse(e)[t]),S=m((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),C={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},w={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5,arrow_open_head:4,arrow_hollow_circle:8};function T(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=E(e),t=E(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}m(T,`calculateDeltaAndAngle`);var E=m(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),le=m(e=>({x:m(function(t,n,r){let i=0,a=E(r[0]).x<E(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(C,e.arrowTypeStart)){let{angle:t,deltaX:n}=T(r[0],r[1]);i=C[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(C,e.arrowTypeEnd)){let{angle:t,deltaX:n}=T(r[r.length-1],r[r.length-2]);i=C[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(E(t).x-E(r[r.length-1]).x),s=Math.abs(E(t).y-E(r[r.length-1]).y),c=Math.abs(E(t).x-E(r[0]).x),l=Math.abs(E(t).y-E(r[0]).y),u=C[e.arrowTypeStart],d=C[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`right`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`right`?-1:1,i+=e}return E(t).x+i},`x`),y:m(function(t,n,r){let i=0,a=E(r[0]).y<E(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(C,e.arrowTypeStart)){let{angle:t,deltaY:n}=T(r[0],r[1]);i=C[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(C,e.arrowTypeEnd)){let{angle:t,deltaY:n}=T(r[r.length-1],r[r.length-2]);i=C[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(E(t).y-E(r[r.length-1]).y),s=Math.abs(E(t).x-E(r[r.length-1]).x),c=Math.abs(E(t).y-E(r[0]).y),l=Math.abs(E(t).x-E(r[0]).x),u=C[e.arrowTypeStart],d=C[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`up`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`up`?-1:1,i+=e}return E(t).y+i},`y`)}),`getLineFunctionsWithOffset`),D=1,O=m(e=>typeof e==`number`&&Number.isFinite(e)&&e>0?e:D,`getStepDuration`),k=m(e=>typeof e.step==`number`&&Number.isInteger(e.step)&&e.step>0,`isStepEdge`),A=[.25,.35,.15,.65,.75,.5,.85,.1,.9],j=9,M=11,ue=2,de=`#333333`,N=12,P=6,F=14,I=.01,L=4.5,R=/translate\(\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i,z=4,B=.6,V=4,fe=m((e,t,n=D)=>{let r=Math.max(t,e);return{begin:(e-1)*n,dur:n,gap:(r-1)*n}},`getEdgeStepTiming`),pe=m(e=>`step_${Array.from(e,e=>/[\dA-Za-z]/.test(e)?e:`_${(e.codePointAt(0)??0).toString(16)}_`).join(``)}`,`toAnimationId`),me=m(e=>{let t=/^m\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i.exec(e.trim());return t?`translate(${t[1]},${t[2]}) `:``},`pathStartTranslate`),H=m(e=>Array.from(e,(t,n)=>{let r=t.codePointAt(0)??0;if(r===0)return`�`;let i=r<=31||r===127,a=/\d/.test(t)&&(n===0||n===1&&e.startsWith(`-`));return i||a?`\\${r.toString(16)} `:e===`-`?`\\-`:r>=128||/[\w-]/.test(t)?t:`\\${t}`}).join(``),`escapeCssIdentifierFallback`),he=m(e=>typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):H(e),`escapeCssIdentifier`),ge=m((e,t)=>{let n=e.node(),r=n?.ownerSVGElement??n?.closest?.(`svg`)??n,i=t||r?.getAttribute(`id`);if(!r||!i||r.querySelector(`style.edge-step-style`))return;let a=`#${he(i)} `,o=r.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`style`);o.setAttribute(`class`,`edge-step-style`),o.textContent=`@media (prefers-reduced-motion: reduce) { ${a}.edge-step-dot, ${a}.edge-step-highlight { display: none; } }`,r.appendChild(o)},`ensureReducedMotionStyle`),_e=m((e,t)=>{let n=e.filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y));if(n.length===0)return;let r=n.slice(1).map((e,t)=>Math.hypot(e.x-n[t].x,e.y-n[t].y)),i=r.reduce((e,t)=>e+t,0)*t;for(let[e,t]of r.entries()){if(i<=t&&t>0){let r=i/t,a=n[e],o=n[e+1];return{x:a.x+(o.x-a.x)*r,y:a.y+(o.y-a.y)*r}}i-=t}return n[n.length-1]},`pointAlongPolyline`),ve=m((e,t)=>{let n=typeof t?.getTotalLength==`function`?t.getTotalLength():0,r=t?.getPointAtLength?.bind(t);return n>0&&r?e=>{let{x:t,y:i}=r(n*e);return{x:t,y:i}}:t=>_e(e,t)},`createPathSampler`),ye=m((e,t)=>Math.min(1/0,...t.map(t=>{let n=Math.max(Math.abs(e.x-t.x)-t.halfWidth,0),r=Math.max(Math.abs(e.y-t.y)-t.halfHeight,0);return Math.hypot(n,r)-j})),`roomAround`),be=m((e,t)=>{let n=e(t),r=e(Math.max(t-I,0)),i=e(Math.min(t+I,1));if(!n||!r||!i)return[];let a=Math.hypot(i.x-r.x,i.y-r.y);if(a===0)return[];let o={x:-(i.y-r.y)/a,y:(i.x-r.x)/a};return[1,-1].map(e=>({x:n.x+o.x*F*e,y:n.y+o.y*F*e}))},`besideThePath`),xe=m((e,t)=>{let n=[...A.map(e),...A.flatMap(t=>be(e,t))],r,i=-1/0;for(let e of n){if(!e||!Number.isFinite(e.x)||!Number.isFinite(e.y))continue;let n=ye(e,t);if(n>=ue)return e;n>i&&(r=e,i=n)}return r},`chooseBadgePosition`),Se=m((e,t)=>({...e,halfWidth:t,halfHeight:t}),`square`),Ce=m(e=>{let t=R.exec(e.getAttribute(`transform`)??``);return t?{x:Number(t[1]),y:Number(t[2])}:{x:0,y:0}},`translationOf`),U=m(e=>{let t={x:0,y:0};for(let n=e;n&&n.localName!==`svg`;n=n.parentElement){let{x:e,y:r}=Ce(n);t.x+=e,t.y+=r}return t},`offsetInSvg`),we=m((e,t)=>{if(!R.test(e.getAttribute(`transform`)??``))return;let n=U(e),r=n.x-t.x,i=n.y-t.y,a=e.getBBox?.();if(a)return{x:r+a.x+a.width/2,y:i+a.y+a.height/2,halfWidth:a.width/2,halfHeight:a.height/2}},`boxedObstacle`),Te=m(e=>{try{let t=JSON.parse(atob(e.getAttribute(`data-points`)??``));return Array.isArray(t)?t:[]}catch{return[]}},`readPoints`),Ee=m((e,t)=>{let n=Math.hypot(e.x-t.x,e.y-t.y);if(n===0)return Se(e,N);let r={x:(e.x-t.x)/n,y:(e.y-t.y)/n},i=N/2;return{x:e.x-r.x*i,y:e.y-r.y*i,halfWidth:Math.abs(r.x)*i+Math.abs(r.y)*P,halfHeight:Math.abs(r.y)*i+Math.abs(r.x)*P}},`arrowheadObstacle`),De=m((e,t)=>{let n=e.getAttribute(t);return!!n&&n!==`none`},`hasMarker`),Oe=m((e,t)=>{let n=Te(e).filter(e=>Number.isFinite(e?.x)&&Number.isFinite(e?.y));if(n.length===0)return[];let r=U(e),i=m(e=>({x:e.x+r.x-t.x,y:e.y+r.y-t.y}),`toSvg`),a=n.length-1,o=[];return De(e,`marker-start`)&&o.push(Ee(i(n[0]),i(n[Math.min(1,a)]))),De(e,`marker-end`)&&o.push(Ee(i(n[a]),i(n[Math.max(a-1,0)]))),o},`arrowheadObstacles`),ke=m(e=>{let t={x:0,y:0},n=[...e?.querySelectorAll(`.edgeLabel, .node`)??[]].map(e=>we(e,t)).filter(e=>e!==void 0),r=[...e?.querySelectorAll(`path[data-edge="true"]`)??[]].flatMap(e=>Oe(e,t));return[...n,...r]},`collectBadgeObstacles`),Ae=m((e,t)=>{if(!e.label||t.length===0)return[];let{x:n,y:r}=o.calcLabelPosition(t);return[{x:n,y:r,halfWidth:(e.width??0)/2,halfHeight:(e.height??0)/2}]},`edgeLabelObstacles`),je=m(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},`linearChannel`),Me=m(e=>{try{let[t,n,r]=[`r`,`g`,`b`].map(t=>je(x(e,t)));return .2126*t+.7152*n+.0722*r}catch{return}},`relativeLuminance`),Ne=m((e,t)=>{let n=Me(e),r=Me(t);return n===void 0||r===void 0?0:(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},`contrastRatio`),Pe=m((e,t)=>{let n=[...t.filter(e=>!!e),`#ffffff`,`#000000`].map(t=>({color:t,ratio:Ne(e,t)}));return(n.find(({ratio:e})=>e>=L)??n.reduce((e,t)=>t.ratio>e.ratio?t:e)).color},`pickBadgeTextColor`),Fe=m(e=>{let t=e?.replace(/^stroke:\s*/,``).trim();return t===``?void 0:t},`bareColor`),Ie=m((e,t,n,r=ke(e.node()?.closest(`svg`)))=>{if(!k(t)||!t.showStepNumber)return;let i=U(e.node()),a=r.map(e=>({...e,x:e.x-i.x,y:e.y-i.y})),o=xe(ve(n.points,n.pathNode),[...a,...Ae(t,n.points)]);if(!o)return;let s=Fe(n.color)??de,c=e.append(`g`).attr(`class`,`edge-step-badge`).attr(`transform`,`translate(${o.x},${o.y})`).attr(`pointer-events`,`none`).attr(`data-step`,t.step);return c.append(`circle`).attr(`r`,j).attr(`fill`,s),c.append(`text`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,M).attr(`fill`,Pe(s,n.textColors??[])).text(String(t.step)),Se({x:o.x+i.x,y:o.y+i.y},j)},`insertEdgeStepBadge`),Le=m((e,t,n)=>{e.append(`animateTransform`).attr(`attributeName`,`transform`).attr(`type`,`scale`).attr(`values`,`1;1`).attr(`dur`,`${n}s`).attr(`begin`,`${t}.begin`).attr(`fill`,`remove`)},`showWhileStepPlays`),Re=m((e,t,n,r,i)=>{if(!k(t)||!n)return;let{begin:a,dur:o,gap:s}=fe(t.step,t.stepCount??t.step,O(t.stepDuration)),c=pe(`${r}-${t.id}-step`),l=`${me(n)}scale(0)`,u=i?.replace(/^stroke:\s*/,``);Le(e.append(`path`).attr(`class`,`edge-step-highlight`).attr(`aria-hidden`,`true`).attr(`d`,n).attr(`fill`,`none`).attr(`stroke`,u??`currentColor`).attr(`stroke-width`,z).attr(`stroke-linecap`,`round`).attr(`stroke-opacity`,B).attr(`pointer-events`,`none`).attr(`transform`,l).attr(`data-step`,t.step),c,o);let d=e.append(`circle`).attr(`class`,`edge-step-dot`).attr(`r`,V).attr(`aria-hidden`,`true`).attr(`transform`,l).attr(`data-step`,t.step);u&&d.attr(`fill`,u).attr(`stroke`,`none`),d.append(`animateMotion`).attr(`id`,c).attr(`path`,n).attr(`dur`,`${o}s`).attr(`begin`,`${a}s;${c}.end+${s}s`).attr(`fill`,`remove`),Le(d,c,o),ge(e,r)},`insertEdgeStepDot`),W=new WeakMap,ze=m(e=>{let t=e.querySelector(`:scope > g.edge-step-badges`);if(t)return t;let n=e.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`g`);return n.setAttribute(`class`,`edge-step-badges`),e.appendChild(n)},`badgeLayer`),Be=m(e=>{let t=e?W.get(e):void 0;if(!e||!t)return;W.delete(e);let n=ke(e);for(let{elem:e,edge:r,options:i}of t){let t=e.node()?.parentElement;if(!t)continue;let a=Ie(h(ze(t)),r,i,n);a&&n.push(a)}},`placeQueuedStepBadges`),Ve=m((e,t,n,r,i)=>{Re(e,t,n,r,i.color);let a=e.node(),o=a?.ownerSVGElement??a;o&&k(t)&&t.showStepNumber&&W.set(o,[...W.get(o)??[],{elem:e,edge:t,options:i}])},`insertEdgeStepMarks`),He=m((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&Ge(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&Ge(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),Ue={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},arrow_open_head:{type:`openArrow`,fill:!1},arrow_hollow_circle:{type:`hollowCircle`,fill:!1},arrow_hierarchy:{type:`hierarchy`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},We=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],Ge=m((e,t,n,r,i,a,o=!1,s)=>{if(!n||n===`none`)return;let c=Ue[n],l=c&&We.includes(c.type);if(!c){p.warn(`Unknown arrow type: ${n}`);return}let u=`${i}_${a}-${c.type}${t===`start`?`Start`:`End`}${o&&l?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${u}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(u);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${u})`)},`addEdgeMarker`),Ke=m(e=>typeof e==`string`?e:l()?.flowchart?.curve,`resolveEdgeCurveType`),G=new Map,K=new Map,qe=m(()=>{G.clear(),K.clear()},`clear`),Je=m(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),q=m(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),Ye=m(async(e,r)=>{let o=l(),s=d(o),{labelStyles:c}=n(r);r.labelStyle=c;let u=e.insert(`g`).attr(`class`,`edgeLabel`),f=u.insert(`g`).attr(`class`,`label`).attr(`data-id`,r.id),m=r.labelType===`markdown`,g=await i(e,r.label,{style:q(r.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:m,width:void 0},o);f.node().appendChild(g),p.info(`abc82`,r,r.labelType);let _,v;if(s){let e=g.children[0],t=h(g);_=await a.measure(()=>e.getBoundingClientRect()),v=_,t.attr(`width`,_.width),t.attr(`height`,_.height)}else{let e=h(g).select(`text`).node();await a.measure(()=>{_=g.getBBox(),v=e&&typeof e.getBBox==`function`?e.getBBox():_})}f.attr(`transform`,S(v,s)),G.set(r.id,u),r.width=_.width,r.height=_.height;let y;if(r.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.startLabelLeft,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).startLeft=n,Y(y,r.startLabelLeft,o),J(r,`startLeft`,o)}if(r.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.startLabelRight,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).startRight=n,Y(y,r.startLabelRight,o),J(r,`startRight`,o)}if(r.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.endLabelLeft,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).endLeft=n,Y(y,r.endLabelLeft,o),J(r,`endLeft`,o)}if(r.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await t(i,r.endLabelRight,q(r.labelStyle)||``,!1,!1);y=a;let o=a.getBBox();if(s){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,S(o,s)),K.get(r.id)||K.set(r.id,{}),K.get(r.id).endRight=n,Y(y,r.endLabelRight,o),J(r,`endRight`,o)}return g},`insertEdgeLabel`);function J(e,t,n){e.terminalLabelSizes??={},e.terminalLabelSizes[t]={width:n.width,height:n.height}}m(J,`recordTerminalLabelSize`);function Y(e,t,n){d(l())&&e&&(e.style.width=Math.max(t.length*9,n.width)+`px`,e.style.height=n.height+`px`)}m(Y,`setTerminalWidth`);var Xe=m((e,t)=>{let n=e.x,r=e.y;if(t?.updatedPath){let i=o.calcLabelPosition(t.updatedPath);if(t.originalPath){let a=o.calcLabelPosition(t.originalPath);n=e.x+(i.x-a.x),r=e.y+(i.y-a.y)}else n=i.x,r=i.y}return{x:n,y:r}},`resolveEdgeLabelPosition`),Ze=m((t,n)=>{p.debug(`Moving label abc88 `,t.id,t.label,G.get(t.id),n);let r=l(),{subGraphTitleTotalMargin:i}=e(r);if(t.label){let e=G.get(t.id),{x:r,y:a}=Xe(t,n);p.debug(`Moving label `+t.label+` from (`,t.x,`,`,t.y,`) to (`,r,`,`,a,`) abc88`),e.attr(`transform`,`translate(${r}, ${a+i/2})`)}let a=n.updatedPath?n.updatedPath:n.originalPath;if(t.startLabelLeft){let e=K.get(t.id).startLeft,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_left`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}if(t.startLabelRight){let e=K.get(t.id).startRight,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_right`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}if(t.endLabelLeft){let e=K.get(t.id).endLeft,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_left`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}if(t.endLabelRight){let e=K.get(t.id).endRight,n=t.x,r=t.y;if(a){let e=o.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_right`,a);n=e.x,r=e.y}e.attr(`transform`,`translate(${n}, ${r})`)}},`positionEdgeLabel`),X=.5,Z=m((e,t)=>Math.abs(e.x-t.x)<X,`sharesColumn`),Q=m((e,t)=>Math.abs(e.y-t.y)<X,`sharesRow`),Qe=m((e,t)=>Z(e,t)&&Q(e,t),`coincides`);function $e(e,t,n){return Z(e,t)&&!Q(e,t)?Z(n,t):Q(e,t)&&!Z(e,t)?Q(n,t):Z(n,t)||Q(n,t)}m($e,`keepsArrivalAxis`);function et(e,t,n){return Qe(e,t)?{heading:t,from:n}:{heading:e,from:t}}m(et,`arrivalSegment`);function tt({heading:e,from:t},n,r){return(e.x-t.x)*(r.x-n.x)+(e.y-t.y)*(r.y-n.y)<0}m(tt,`runsAgainstHeading`);function nt({heading:e,from:t},n,r){return Q(e,t)&&!Z(e,t)?{x:r.x,y:n.y}:Z(e,t)&&!Q(e,t)?{x:n.x,y:r.y}:r}m(nt,`snapToArrivalAxis`);function rt(e,t,n,r){if((Z(e,t)||Q(e,t))&&!$e(e,t,r))return e;let i=et(e,t,n);return tt(i,t,r)?t:nt(i,t,r)}m(rt,`dockFinalPoint`);function it(e){let t=Object.hasOwn(C,e)?C[e]:0;return Number.isFinite(t)?t:0}m(it,`markerPullBack`);function at({originalLast:e,lastInner:t,newLast:n,minLength:r}){let i=!Qe(e,t),a=Math.hypot(n.x-t.x,n.y-t.y);return a>=Math.max(X,r)?n:i&&a>=X?e:void 0}m(at,`finalDockPoint`);var ot=m((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),st=m((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),ct=m((e,t,n)=>{p.debug(`intersection calc abc89:
|
|
2
2
|
outsidePoint: ${JSON.stringify(t)}
|
|
3
3
|
insidePoint : ${JSON.stringify(n)}
|
|
4
4
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.x<t.x?o-a:o+a,c=e.height/2,l=Math.abs(t.y-n.y),u=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*o>Math.abs(r-t.x)*c){let e=n.y<t.y?t.y-c-i:i-c-t.y;s=u*e/l;let r={x:n.x<t.x?n.x+s:n.x-u+s,y:n.y<t.y?n.y+l-e:n.y-l+e};return s===0&&(r.x=t.x,r.y=t.y),u===0&&(r.x=t.x),l===0&&(r.y=t.y),p.debug(`abc89 top/bottom calc, Q ${l}, q ${e}, R ${u}, r ${s}`,r),r}{s=n.x<t.x?t.x-o-r:r-o-t.x;let e=l*s/u,i=n.x<t.x?n.x+u-s:n.x-u+s,a=n.y<t.y?n.y+e:n.y-e;return p.debug(`sides calc abc89, Q ${l}, q ${e}, R ${u}, r ${s}`,{_x:i,_y:a}),s===0&&(i=t.x,a=t.y),u===0&&(i=t.x),l===0&&(a=t.y),{x:i,y:a}}},`intersection`),lt=m((e,t)=>{p.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(p.info(`abc88 checking point`,e,t),!st(t,e)&&!i){let a=ct(t,r,e);p.debug(`abc88 inside`,e,r,a),p.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?p.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else p.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),p.debug(`returning points`,n),n},`cutPathAtIntersect`);function ut(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}m(ut,`extractCornerPoints`);var dt=m(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),ft=m(function(e){let{cornerPointPositions:t}=ut(e),n=[];for(let r=0;r<e.length;r++)if(t.includes(r)){let t=e[r-1],i=e[r+1],a=e[r],o=dt(t,a,5),s=dt(i,a,5),c=s.x-o.x,l=s.y-o.y;n.push(o);let u=Math.sqrt(2)*2,d={x:a.x,y:a.y};Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10?(p.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),d=a.x===o.x?{x:c<0?o.x-5+u:o.x+5-u,y:l<0?o.y-u:o.y+u}:{x:c<0?o.x-u:o.x+u,y:l<0?o.y-5+u:o.y+5-u}):p.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(d,s)}else n.push(e[r]);return n},`fixCorners`),pt=m((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),mt=m(function(e,t,n,i,a,c,u,d=!1,f=void 0){if(!u)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:m,layout:x}=l(),S=f??x,C=t.points,T=!1,E=a;var D=c;let O=[];for(let e in t.cssCompiledStyles)r(e)||O.push(t.cssCompiledStyles[e]);if(S===`swimlane`){if(!d&&D.intersect&&E.intersect&&Array.isArray(C)&&C.length>=2){if(C.length===2){let[e,t]=C;C=Z(e,t)||Q(e,t)?[E.intersect(e),D.intersect(t)]:[E.intersect(t),D.intersect(e)]}else{let e=C.slice(1,-1),n=e[0],r=e[e.length-1],i=E.intersect(n),a=C[C.length-1],o=D.intersect(r),s=at({originalLast:a,lastInner:r,newLast:rt(a,r,e.at(-2)??C[0],o),minLength:it(t.arrowTypeEnd)}),c=Math.abs(i.x-n.x)<X&&Math.abs(i.y-n.y)<X?[]:[i],l=s?[s]:[];C=[...c,...e,...l]}}C=ot(t,C)}else D.intersect&&E.intersect&&!d&&(C=C.slice(1,t.points.length-1),C.unshift(E.intersect(C[0])),C.push(D.intersect(C[C.length-1])));let k=btoa(JSON.stringify(C));t.toCluster&&(p.info(`to cluster abc88`,n.get(t.toCluster)),C=lt(t.points,n.get(t.toCluster).node),T=!0),t.fromCluster&&(p.debug(`from cluster abc88`,n.get(t.fromCluster),JSON.stringify(C,null,2)),C=lt(C.reverse(),n.get(t.fromCluster).node).reverse(),T=!0);let A=C.filter(e=>!Number.isNaN(e.y)),j=Ke(t.curve);j!==`rounded`&&(A=ft(A));let M=b;switch(j){case`linear`:M=b;break;case`basis`:M=re;break;case`cardinal`:M=te;break;case`bumpX`:M=ne;break;case`bumpY`:M=ie;break;case`catmullRom`:M=y;break;case`monotoneX`:M=ae;break;case`monotoneY`:M=se;break;case`natural`:M=v;break;case`step`:M=_;break;case`stepAfter`:M=g;break;case`stepBefore`:M=oe;break;case`rounded`:M=b;break;default:M=re}let{x:ue,y:de}=le(t),N=ee().x(ue).y(de).curve(M),P;switch(t.thickness){case`normal`:P=`edge-thickness-normal`;break;case`thick`:P=`edge-thickness-thick`;break;case`invisible`:P=`edge-thickness-invisible`;break;default:P=`edge-thickness-normal`}switch(t.pattern){case`solid`:P+=` edge-pattern-solid`;break;case`dotted`:P+=` edge-pattern-dotted`;break;case`dashed`:P+=` edge-pattern-dashed`;break;default:P+=` edge-pattern-solid`}let F,I=j===`rounded`?ht(gt(A,t),5):N(A),L=Array.isArray(t.style)?t.style:[t.style],R=L.find(e=>e?.startsWith(`stroke:`)),z=``;t.animate&&(z=`edge-animation-fast`),t.animation&&(z=`edge-animation-`+t.animation);let B=!1;if(t.look===`handDrawn`){let n=ce.svg(e);Object.assign([],A);let r=n.path(I,{roughness:.3,seed:m});P+=` transition`,F=h(r).select(`path`).attr(`id`,`${u}-${t.id}`).attr(`class`,` `+P+(t.classes?` `+t.classes:``)+(z?` `+z:``)).attr(`style`,L?L.reduce((e,t)=>e+`;`+t,``):``);let i=F.attr(`d`);F.attr(`d`,i),e.node().appendChild(F.node())}else{let n=O.join(`;`),r=L?L.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(L?L.reduce((e,t)=>e+`;`+t,``):``);F=e.append(`path`).attr(`d`,I).attr(`id`,`${u}-${t.id}`).attr(`class`,` `+P+(t.classes?` `+t.classes:``)+(z?` `+z:``)).attr(`style`,i),R=i.match(/stroke:([^;]+)/)?.[1],B=t.animate===!0||!!t.animation||n.includes(`animation`);let a=F.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=w[t.arrowTypeStart]||0,c=w[t.arrowTypeEnd]||0;if(t.look===`neo`&&!B){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?pt(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;F.attr(`style`,e+F.attr(`style`))}}if(F.attr(`data-edge`,!0),F.attr(`data-et`,`edge`),F.attr(`data-id`,t.id),F.attr(`data-points`,k),F.attr(`data-look`,s(t.look)),t.step!==void 0){let{themeVariables:n}=l(),r=R??n?.lineColor;Ve(e,t,I,u,{points:A,pathNode:F.node(),color:r,textColors:[n?.background,n?.primaryTextColor]})}t.showPoints&&A.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let V=``;(l().flowchart.arrowMarkerAbsolute||l().state.arrowMarkerAbsolute)&&(V=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,V=V.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),p.info(`arrowTypeStart`,t.arrowTypeStart),p.info(`arrowTypeEnd`,t.arrowTypeEnd);let fe=!B&&t?.look===`neo`;He(F,t,V,u,i,fe,R);let pe=Math.floor(C.length/2),me=C[pe];o.isLabelCoordinateInPath(me,F.attr(`d`))||(T=!0);let H={};return T&&(H.updatedPath=C),H.originalPath=t.points,H},`insertEdge`);function ht(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,ee=o.y-p*v,b=o.x+m*v,te=o.y+h*v;n+=`L${y},${ee}`,n+=`Q${o.x},${o.y} ${b},${te}`}}return n}m(ht,`generateRoundedPath`);function $(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}m($,`calculateDeltaAndAngle`);function gt(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&C[t.arrowTypeStart]){let r=C[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=$(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&C[t.arrowTypeEnd]){let i=C[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=$(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}m(gt,`applyMarkerOffsetsToPoints`);var _t=m((e,t,n,r)=>{t.forEach(t=>{vt[t](e,n,r)})},`insertMarkers`),vt={extension:m((e,t,n)=>{p.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:m((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:m((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:m((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:m((e,t,n)=>{let{themeVariables:r}=f(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),hierarchy:m((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-hierarchyEnd`).attr(`class`,`marker hierarchy `+t).attr(`viewBox`,`0 0 12 10`).attr(`refX`,10).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,10).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`).style(`fill`,`none`),e.append(`marker`).attr(`id`,n+`_`+t+`-hierarchyStart`).attr(`class`,`marker hierarchy `+t).attr(`viewBox`,`0 0 12 10`).attr(`refX`,2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,10).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`).style(`fill`,`none`)},`hierarchy`),only_one:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:m((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:m((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:m((e,t,n)=>{let{themeVariables:r}=f(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:m((e,t,n)=>{let{themeVariables:r}=f(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:m((e,t,n)=>{let{themeVariables:r}=f(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:m((e,t,n)=>{let{themeVariables:r}=f(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:m((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e}from"./chunk-BG4553SI-
|
|
1
|
+
import{A as e}from"./chunk-BG4553SI-mWcPcFZr.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./dist-CjvHN74u.js";import{d as r}from"./index-Bn6_wHEp.js";var i=n(),a=t((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=t((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=t((t,n)=>{let r=n.text.replace(e,` `),i=t.append(`text`);i.attr(`x`,n.x),i.attr(`y`,n.y),i.attr(`class`,`legend`),i.style(`text-anchor`,n.anchor),n.class&&i.attr(`class`,n.class);let a=i.append(`tspan`);return a.attr(`x`,n.x+n.textMargin*2),a.text(r),i},`drawText`),c=t((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=t((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=t(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=t(()=>{let e=r(`.mermaidTooltip`);return e.empty()&&(e=r(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-3uHXrFqA.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e,t}from"./chunk-M57EVK23-D9YIHjps.js";import{a as n,i as r,m as i,n as a,o,p as s,t as c,u as l}from"./chunk-DQASFODM-Bh85SSGO.js";import{i as u,n as d,r as f,t as p}from"./chunk-LEVMRMFU-DwxrBz2u.js";import{o as m}from"./chunk-AXFCVDMN-De96BVTB.js";import{_ as h}from"./chunk-6MUBBAK2-DU4vZ03M.js";import{b as g,y as _}from"./chunk-BG4553SI-J33jsRLV.js";import{t as v}from"./chunk-X3CZISLH-FMl4PpWt.js";import{n as y}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as b}from"./graphlib-DS17s2tU.js";import{t as x}from"./index-BY66fc8Q.js";function S(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}y(S,`createLayoutElementGroups`);async function C(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await m(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}y(C,`measureGroupLabel`);async function w(e,t,n){let r=await f(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}y(w,`insertMeasuredNode`);function T(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}y(T,`resolveNodeDir`);async function E(e,t,n={}){let i=new b({multigraph:!0,compound:!0}),a=[...t.edges],s=g(),c=S(e),{edgeLabels:l,nodes:u}=c,d=new Map,f=new Map(t.nodes.map(e=>[e.id,e])),p=t.direction,m=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup){if(m){let t=n.unwrapGroupLabels&&e.labelType!==`markdown`;await C(u,e,t?1/0:void 0)}i.setNode(e.id,{...e})}else{if(m){let t=await w(u,e,{config:s,dir:T(e,f,p)});d.set(e.id,t)}i.setNode(e.id,{...e})}}));for(let e of a)m&&r(e)&&await o(l,e),i.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await x(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-3uHXrFqA.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));n(e,t)}return{graph:i,groups:c,nodeElements:d}}y(E,`createGraphWithElements`);var D=new Map,O=new Map,k=new Map,A=y(()=>{O.clear(),k.clear(),D.clear()},`clear`),j=y((e,t)=>{let n=O.get(t)||[];return v.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),M=y((e,t)=>{let n=O.get(t)||[];return v.info(`Descendants of `,t,` is `,n),v.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||j(e.v,t)||j(e.w,t)||n.includes(e.w):(v.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),N=y((e,t,n,r)=>{v.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),v.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)N(i,t,n,r);else{let a=t.node(i);v.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(v.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(v.debug(`Setting parent`,i,e),n.setParent(i,e)):(v.info(`In copy `,e,`root`,r,`data`,t.node(e),r),v.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);v.debug(`Copying Edges`,o),o.forEach(i=>{v.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);v.info(`Edge data`,a,r);try{M(i,r)?(v.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),v.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):v.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){v.error(e)}})}v.debug(`Removing node`,i),t.removeNode(i)})},`copy`),P=y((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)k.set(i,e),r=[...r,...P(i,t)];return r},`extractDescendants`),F=y((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),I=y((e,t,n)=>{let r=t.children(e);if(v.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=I(e,t,n),a=F(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),L=y(e=>!D.has(e)||!D.get(e).externalConnections?e:D.has(e)?D.get(e).id:e,`getAnchorId`),ee=y((e,t)=>{if(!e||t>10)v.debug(`Opting out, no graph `);else{v.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(v.debug(`Cluster identified`,t,` Replacement id in edges: `,I(t,e,t)),O.set(t,P(t,e)),D.set(t,{id:I(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(v.debug(`Cluster identified`,t,O),r.forEach(e=>{j(e.v,t)^j(e.w,t)&&(v.debug(`Edge: `,e,` leaves cluster `,t),v.debug(`Descendants of XXX `,t,`: `,O.get(t)),D.get(t).externalConnections=!0)})):v.debug(`Not a cluster `,t,O)});for(let t of D.keys()){let n=D.get(t).id,r=e.parent(n);r!==t&&D.has(r)&&!D.get(r).externalConnections&&(D.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&D.get(t)?.externalConnections&&i&&B(e,n,t)){let r=ne(e,t,e.parent(n));r&&(D.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);v.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),v.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(v.debug(`Fix XXX`,D,`ids:`,t.v,t.w,`Translating: `,D.get(t.v),` --- `,D.get(t.w)),D.get(t.v)||D.get(t.w)){if(v.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=L(t.v),i=L(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);D.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);D.get(r).externalConnections=!0,n.toCluster=t.w}v.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),R(e,0),v.trace(D)}},`adjustClustersAndEdges`),R=y((e,t)=>{if(t>10){v.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r)v.debug(`Done, no node has children`,e.nodes());else{v.debug(`Nodes = `,n,t);for(let r of n)if(v.debug(`Extracting node`,r,D,D.has(r)&&!D.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!D.has(r))v.debug(`Not a cluster`,r,t);else if(!D.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){v.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;D.get(r)?.clusterData?.dir&&(n=D.get(r).clusterData.dir,v.debug(`Fixing dir`,D.get(r).clusterData.dir,n));let i=new b({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});N(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:D.get(r).clusterData,label:D.get(r).label,graph:i})}else v.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!D.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),v.debug(D);n=e.nodes(),v.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);v.debug(` Now next level`,r,n),n?.clusterNode&&R(n.graph,t+1)}}},`extractor`),z=y((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),te=y(e=>z(e,e.children()),`sortNodesByHierarchy`),B=y((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=D.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),ne=y((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||j(i,n))continue;let r=I(i,e,t);if(r&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function V({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??U;return y(async function(t,s,c,u){let d=s.select(`g`);(c?.insertMarkers??l)(d,t.markers,t.type,t.diagramId),H();let f={element:d,helpers:c,options:u};f.preparedLayout=await e?.(t,f);let p=await o(t,f),m=await n(t,f),h={...f,measure:p};r?await r(t,h,m):await W(t,h,a),await i?.(t,h,m)},`render`)}y(V,`createCommonLayoutRenderer`);function H(){p(),c(),t(),A()}y(H,`clearLayoutRenderState`);async function U(e,{element:t},n){return await E(t,e,n)}y(U,`defaultMeasureLayout`);async function W(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await G(i,r,t,n);let a=q(e.nodes);for(let r of e.edges)J(r,n)||await Y(i,r,a,e,n,t)}y(W,`paintLayoutData`);async function G(t,n,r,i){n.clusterNode?u(n):K(n,r,i)?await e(t.clusters,n):u(n)}y(G,`paintLayoutNode`);function K(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}y(K,`shouldPaintAsCluster`);function q(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}y(q,`buildNodeLookup`);function J(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}y(J,`shouldSkipPaintEdge`);async function Y(e,t,i,s,c,l){let u=n(e.edgePaths,{...t},c.clusterDb??new Map,s.type,X(t.start,t,i,l,c),X(t.end,t,i,l,c),s.diagramId,Z(t,c),s.layoutAlgorithm);r(t)&&(a.has(t.id)||await o(e.edgeLabels,t),Q(t,u))}y(Y,`paintLayoutEdge`);function X(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}y(X,`getRenderedNode`);function Z(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}y(Z,`shouldSkipIntersect`);function Q(e,t){let n=t?.updatedPath??t?.originalPath,r=_(),{subGraphTitleTotalMargin:o}=d({flowchart:r.flowchart??{}});if(e.label){let n=a.get(e.id),{x:r,y:i}=s(e,t);n.attr(`transform`,`translate(${r}, ${i+o/2})`)}for(let[t,r]of[[`startLeft`,e.startLabelLeft],[`startRight`,e.startLabelRight],[`endLeft`,e.endLabelLeft],[`endRight`,e.endLabelRight]])if(r){let{x:r,y:a}=$(e,t,n);i.get(e.id)[t].attr(`transform`,`translate(${r}, ${a})`)}}y(Q,`positionRenderedEdgeLabel`);var re={startLeft:`start_left`,startRight:`start_right`,endLeft:`end_left`,endRight:`end_right`};function $(e,t,n){let r=e.terminalLabelCenters?.[t];if(r)return{...r};if(!n)return{x:e.x,y:e.y};let i=t.startsWith(`start`)?e.arrowTypeStart:e.arrowTypeEnd;return h.calcTerminalLabelPosition(i?10:0,re[t],n)}y($,`terminalLabelTranslate`);export{U as a,te as c,S as i,D as n,I as o,V as r,w as s,ee as t};
|
|
2
|
+
import{r as e,t}from"./chunk-M57EVK23-B-kEyOJF.js";import{a as n,i as r,m as i,n as a,o,p as s,t as c,u as l}from"./chunk-DQASFODM-7FKe2gLt.js";import{i as u,n as d,r as f,t as p}from"./chunk-LEVMRMFU-DXH6iXv3.js";import{o as m}from"./chunk-AXFCVDMN-BhsttQ-k.js";import{_ as h}from"./chunk-6MUBBAK2-BBl-4tQr.js";import{b as g,y as _}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as v}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as y}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as b}from"./graphlib-DS17s2tU.js";import{n as x}from"./index-Bn6_wHEp.js";function S(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}y(S,`createLayoutElementGroups`);async function C(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await m(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}y(C,`measureGroupLabel`);async function w(e,t,n){let r=await f(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}y(w,`insertMeasuredNode`);function T(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}y(T,`resolveNodeDir`);async function E(e,t,n={}){let i=new b({multigraph:!0,compound:!0}),a=[...t.edges],s=g(),c=S(e),{edgeLabels:l,nodes:u}=c,d=new Map,f=new Map(t.nodes.map(e=>[e.id,e])),p=t.direction,m=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup){if(m){let t=n.unwrapGroupLabels&&e.labelType!==`markdown`;await C(u,e,t?1/0:void 0)}i.setNode(e.id,{...e})}else{if(m){let t=await w(u,e,{config:s,dir:T(e,f,p)});d.set(e.id,t)}i.setNode(e.id,{...e})}}));for(let e of a)m&&r(e)&&await o(l,e),i.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await x(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-3uHXrFqA.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));n(e,t)}return{graph:i,groups:c,nodeElements:d}}y(E,`createGraphWithElements`);var D=new Map,O=new Map,k=new Map,A=y(()=>{O.clear(),k.clear(),D.clear()},`clear`),j=y((e,t)=>{let n=O.get(t)||[];return v.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),M=y((e,t)=>{let n=O.get(t)||[];return v.info(`Descendants of `,t,` is `,n),v.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||j(e.v,t)||j(e.w,t)||n.includes(e.w):(v.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),N=y((e,t,n,r)=>{v.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),v.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)N(i,t,n,r);else{let a=t.node(i);v.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(v.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(v.debug(`Setting parent`,i,e),n.setParent(i,e)):(v.info(`In copy `,e,`root`,r,`data`,t.node(e),r),v.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);v.debug(`Copying Edges`,o),o.forEach(i=>{v.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);v.info(`Edge data`,a,r);try{M(i,r)?(v.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),v.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):v.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){v.error(e)}})}v.debug(`Removing node`,i),t.removeNode(i)})},`copy`),P=y((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)k.set(i,e),r=[...r,...P(i,t)];return r},`extractDescendants`),F=y((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),I=y((e,t,n)=>{let r=t.children(e);if(v.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=I(e,t,n),a=F(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),L=y(e=>!D.has(e)||!D.get(e).externalConnections?e:D.has(e)?D.get(e).id:e,`getAnchorId`),ee=y((e,t)=>{if(!e||t>10)v.debug(`Opting out, no graph `);else{v.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(v.debug(`Cluster identified`,t,` Replacement id in edges: `,I(t,e,t)),O.set(t,P(t,e)),D.set(t,{id:I(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(v.debug(`Cluster identified`,t,O),r.forEach(e=>{j(e.v,t)^j(e.w,t)&&(v.debug(`Edge: `,e,` leaves cluster `,t),v.debug(`Descendants of XXX `,t,`: `,O.get(t)),D.get(t).externalConnections=!0)})):v.debug(`Not a cluster `,t,O)});for(let t of D.keys()){let n=D.get(t).id,r=e.parent(n);r!==t&&D.has(r)&&!D.get(r).externalConnections&&(D.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&D.get(t)?.externalConnections&&i&&B(e,n,t)){let r=ne(e,t,e.parent(n));r&&(D.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);v.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),v.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(v.debug(`Fix XXX`,D,`ids:`,t.v,t.w,`Translating: `,D.get(t.v),` --- `,D.get(t.w)),D.get(t.v)||D.get(t.w)){if(v.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=L(t.v),i=L(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);D.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);D.get(r).externalConnections=!0,n.toCluster=t.w}v.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),R(e,0),v.trace(D)}},`adjustClustersAndEdges`),R=y((e,t)=>{if(t>10){v.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r)v.debug(`Done, no node has children`,e.nodes());else{v.debug(`Nodes = `,n,t);for(let r of n)if(v.debug(`Extracting node`,r,D,D.has(r)&&!D.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!D.has(r))v.debug(`Not a cluster`,r,t);else if(!D.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){v.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;D.get(r)?.clusterData?.dir&&(n=D.get(r).clusterData.dir,v.debug(`Fixing dir`,D.get(r).clusterData.dir,n));let i=new b({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});N(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:D.get(r).clusterData,label:D.get(r).label,graph:i})}else v.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!D.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),v.debug(D);n=e.nodes(),v.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);v.debug(` Now next level`,r,n),n?.clusterNode&&R(n.graph,t+1)}}},`extractor`),z=y((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),te=y(e=>z(e,e.children()),`sortNodesByHierarchy`),B=y((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=D.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),ne=y((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||j(i,n))continue;let r=I(i,e,t);if(r&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function V({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??U;return y(async function(t,s,c,u){let d=s.select(`g`);(c?.insertMarkers??l)(d,t.markers,t.type,t.diagramId),H();let f={element:d,helpers:c,options:u};f.preparedLayout=await e?.(t,f);let p=await o(t,f),m=await n(t,f),h={...f,measure:p};r?await r(t,h,m):await W(t,h,a),await i?.(t,h,m)},`render`)}y(V,`createCommonLayoutRenderer`);function H(){p(),c(),t(),A()}y(H,`clearLayoutRenderState`);async function U(e,{element:t},n){return await E(t,e,n)}y(U,`defaultMeasureLayout`);async function W(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await G(i,r,t,n);let a=q(e.nodes);for(let r of e.edges)J(r,n)||await Y(i,r,a,e,n,t)}y(W,`paintLayoutData`);async function G(t,n,r,i){n.clusterNode?u(n):K(n,r,i)?await e(t.clusters,n):u(n)}y(G,`paintLayoutNode`);function K(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}y(K,`shouldPaintAsCluster`);function q(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}y(q,`buildNodeLookup`);function J(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}y(J,`shouldSkipPaintEdge`);async function Y(e,t,i,s,c,l){let u=n(e.edgePaths,{...t},c.clusterDb??new Map,s.type,X(t.start,t,i,l,c),X(t.end,t,i,l,c),s.diagramId,Z(t,c),s.layoutAlgorithm);r(t)&&(a.has(t.id)||await o(e.edgeLabels,t),Q(t,u))}y(Y,`paintLayoutEdge`);function X(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}y(X,`getRenderedNode`);function Z(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}y(Z,`shouldSkipIntersect`);function Q(e,t){let n=t?.updatedPath??t?.originalPath,r=_(),{subGraphTitleTotalMargin:o}=d({flowchart:r.flowchart??{}});if(e.label){let n=a.get(e.id),{x:r,y:i}=s(e,t);n.attr(`transform`,`translate(${r}, ${i+o/2})`)}for(let[t,r]of[[`startLeft`,e.startLabelLeft],[`startRight`,e.startLabelRight],[`endLeft`,e.endLabelLeft],[`endRight`,e.endLabelRight]])if(r){let{x:r,y:a}=$(e,t,n);i.get(e.id)[t].attr(`transform`,`translate(${r}, ${a})`)}}y(Q,`positionRenderedEdgeLabel`);var re={startLeft:`start_left`,startRight:`start_right`,endLeft:`end_left`,endRight:`end_right`};function $(e,t,n){let r=e.terminalLabelCenters?.[t];if(r)return{...r};if(!n)return{x:e.x,y:e.y};let i=t.startsWith(`start`)?e.arrowTypeStart:e.arrowTypeEnd;return h.calcTerminalLabelPosition(i?10:0,re[t],n)}y($,`terminalLabelTranslate`);export{U as a,te as c,S as i,D as n,I as o,V as r,w as s,ee as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./chunk-DQASFODM-
|
|
1
|
+
import{c as e}from"./chunk-DQASFODM-7FKe2gLt.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var n=5,r=1e-5,i=2,a=.6,o=1e-6;function s(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}t(s,`buildSegmentList`);function c(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,s=r.x-n.x,c=r.y-n.y,l=i*c-a*s;if(l===0)return null;let u=n.x-e.x,d=n.y-e.y,f=(u*c-d*s)/l,p=(u*a-d*i)/l;return f<=o||f>=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}t(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}t(l,`isHorizontalSeg`);function u(e,t,r){if(e.curve!==`rounded`)return!1;let i=e.points,a=i[t],o=i[t+1];if(!a||!o)return!1;let s=Math.hypot(o.x-a.x,o.y-a.y),c=r*s,l=t>0?_(i[t-1],a,o,n):null;if(l&&c<l.cutLen)return!0;let u=t+2<i.length?_(a,o,i[t+2],n):null;return u!==null&&s-c<u.cutLen}t(u,`crossingSitsInRoundedCorner`);function d(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=s(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=s(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=c(a.a,a.b,s.a,s.b);if(!o||u(r,e,o.tA)||u(n,i,o.tB))continue;let d=l(a);d!==l(s)&&d?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}t(d,`findEdgeIntersections`);function f(e){return`${Math.round(e*1e3)/1e3}`}t(f,`fmt`);function p(e){return`${f(e.x)},${f(e.y)}`}t(p,`pointToString`);function m(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}t(m,`getArcSweepFlag`);function h(t,n){if(t.length<2)return t.map(e=>({...e}));let r=t.map(e=>({...e})),i=n.arrowTypeStart&&e[n.arrowTypeStart];if(i){let e=t[0],n=t[1],a=Math.atan2(n.y-e.y,n.x-e.x);r[0].x=e.x+i*Math.cos(a),r[0].y=e.y+i*Math.sin(a)}let a=n.arrowTypeEnd&&e[n.arrowTypeEnd];if(a){let e=t.length,n=t[e-2],i=t[e-1],o=Math.atan2(i.y-n.y,i.x-n.x);r[e-1].x=i.x-a*Math.cos(o),r[e-1].y=i.y-a*Math.sin(o)}return r}t(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${p(s)}`];return i===`arc`?l.push(`A${f(e.r)},${f(e.r)} 0 0 ${r} ${p(c)}`):l.push(`M${p(c)}`),l}t(g,`emitJump`);function _(e,t,n,i){let a=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(a,o),u=Math.hypot(s,c);if(l<r||u<r)return null;let d=a/l,f=o/l,p=s/u,m=c/u,h=d*p+f*m,g=Math.acos(Math.max(-1,Math.min(1,h)));if(g<r||Math.abs(Math.PI-g)<r)return null;let _=Math.min(i/Math.sin(g/2),l/2,u/2);return{startX:t.x-d*_,startY:t.y-f*_,endX:t.x+p*_,endY:t.y+m*_,ctrlX:t.x,ctrlY:t.y,cutLen:_}}t(_,`computeRoundedCorner`);function v(e,t,r){let o=e.points;if(o.length<2)return``;let c=h(o,e),l=e.curve===`rounded`,u=s(c),d=new Map;for(let e of t){let t=u[e.segIndex];if(!t)continue;let n=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=d.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*n,r:r.jumpRadius}),d.set(e.segIndex,i)}let v=[`M${p(c[0])}`];for(let e=0;e<u.length;e++){let t=u[e],o=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),s=o===0?0:(t.b.x-t.a.x)/o,h=o===0?0:(t.b.y-t.a.y)/o,y=m(t),b=0;if(l&&e>0){let t=_(c[e-1],c[e],c[e+1]??c[e],n);t&&(b=t.cutLen)}let x=o,S=null;l&&e<u.length-1&&(S=_(c[e],c[e+1],c[e+2]??c[e+1],n),S&&(x=o-S.cutLen));let C=r.jumpRadius*a,w=[...d.get(e)??[]].sort((e,t)=>e.t-t.t).filter(e=>{let t=Math.min(e.d-b,x-e.d)-i;return e.r=Math.min(e.r,t),e.r>=C});for(let e=0;e<w.length-1;e++){let t=w[e+1].d-w[e].d;if(w[e].r+w[e+1].r>t){let n=t/2;w[e].r=Math.min(w[e].r,n),w[e+1].r=Math.min(w[e+1].r,n)}}for(let e of w)e.r<C||v.push(...g(e,s,h,y,r.jumpStyle));l&&S?(v.push(`L${f(S.startX)},${f(S.startY)}`),v.push(`Q${f(S.ctrlX)},${f(S.ctrlY)} ${f(S.endX)},${f(S.endY)}`)):v.push(`L${p(t.b)}`)}return v.join(` `)}t(v,`rewriteEdgePath`);function y(e){return/^[\d\s+,.LMelm-]*$/.test(e)}t(y,`isStraightPath`);function b(e){return!e||e===`linear`||e===`rounded`||e===`step`||e===`stepBefore`||e===`stepAfter`}t(b,`curveSupportsLineHops`);function x(e){if(!e)return null;try{let t=typeof atob==`function`?atob(e):Buffer.from(e,`base64`).toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&typeof e.x==`number`&&typeof e.y==`number`&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}t(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=new Map;for(let e of r.querySelectorAll(`path[data-id]`)){let t=e.getAttribute(`data-id`);t!==null&&!a.has(t)&&a.set(t,e)}let o=[];for(let e of t){let t=a.get(e.id);if(!t)continue;let n=x(t.getAttribute(`data-points`))??e.points;o.push({...e,points:n})}let s=d(o);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of o){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let o=a.get(e.id);if(!o||r===void 0&&!y(o.getAttribute(`d`)??``))continue;let s=o.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(o.setAttribute(`d`,f),u!==null&&d!==null&&typeof o.getTotalLength==`function`){let e=o.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);o.setAttribute(`style`,n)}}}t(S,`applyLineJumpsToSvg`);export{S as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./chunk-AXFCVDMN-
|
|
1
|
+
import{s as e}from"./chunk-AXFCVDMN-BhsttQ-k.js";import{d as t}from"./chunk-6MUBBAK2-BBl-4tQr.js";import{t as n}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var i=r(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(n,r,i){let o,s;r.shape===`rect`&&(r.shape=r.rx&&r.ry?`roundedRect`:`squareRect`);let c=r.shape?e[r.shape]:void 0;if(!c)throw Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;i.config.securityLevel===`sandbox`?e=`_top`:r.linkTarget&&(e=r.linkTarget||`_blank`),o=n.insert(`svg:a`).attr(`xlink:href`,r.link).attr(`target`,e??null),s=await c(o,r,i)}else s=await c(n,r,i),o=s;return o.attr(`data-look`,t(r.look)),r.tooltip&&s.attr(`title`,r.tooltip),a.set(r.id,o),r.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}r(o,`insertNode`);var s=r((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=r(()=>{a.clear()},`clear`),l=r(e=>{let t=a.get(e.id);n.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-LEVMRMFU-DwxrBz2u.js";import{i as t,n,t as r}from"./chunk-AXFCVDMN-De96BVTB.js";import{a as i,i as a,t as o}from"./chunk-X4PVCEUW-BUI1Oi3q.js";import{n as s}from"./chunk-STOXU5M4-CG6pnJtH.js";import{s as c}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{b as l,g as u,w as d}from"./chunk-BG4553SI-J33jsRLV.js";import{t as f}from"./chunk-X3CZISLH-FMl4PpWt.js";import{n as p}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as m}from"./index-BY66fc8Q.js";import{t as h}from"./rough.esm-Dy-Kn_BL.js";var g=p(async(e,n,{variant:r=`swimlane`}={})=>{let o=r===`pool`,d=o?`pool swimlane`:`swimlane`,p=o?`pool-label swimlane-label`:`swimlane-label`,g=o?`pool-title swimlane-title`:`swimlane-title`,_=o?`pool-body swimlane-body`:`swimlane-body`,v=l(),{theme:y,themeVariables:b,handDrawnSeed:x}=v,{clusterBkg:S,clusterBorder:C,borderColorArray:w}=b,T=C,{labelStyles:E,nodeStyles:D,borderStyles:O,backgroundStyles:k}=a(n),A=e.insert(`g`).attr(`class`,`cluster `+d+` `+(n.cssClasses||``)).attr(`id`,n.domId??n.id).attr(`data-id`,n.id).attr(`data-et`,`cluster`).attr(`data-look`,n.look);c(A,n.colorIndex,y,w);let j=u(v.flowchart.htmlLabels),M=n.direction===`LR`,N=A.insert(`g`).attr(`class`,`cluster-label `+p),P=await s(N,n.label,{style:n.labelStyle,useHtmlLabels:j,isNode:!0,width:n.width}),F=P.getBBox();if(j){let e=P.children[0],t=m(P);F=e.getBoundingClientRect(),t.attr(`width`,F.width),t.attr(`height`,F.height)}let I=n.padding??0,L=n.width<=F.width+I?F.width+I:n.width;n.diff=n.width<=F.width+I?(L-n.width)/2-I:-I;let R=n.height,z=n.y-R/2,B=n.y+R/2,V=n.x-L/2,H=n.swimlaneContentTop===void 0?z+R/3:n.swimlaneContentTop,U=M?4:0,W=F.height+2*U,G,K;if(M){let e=Math.max(W,F.height+2*U),t=V+e,r=Math.max(0,L-e);if(n.look===`handDrawn`){let a=h.svg(A),o=i(n,{roughness:.7,fill:S,stroke:T,seed:x}),s=i(n,{roughness:.7,fill:`none`,stroke:T,seed:x}),c=a.rectangle(V,z,e,R,o);G=A.insert(()=>c,`:first-child`).attr(`class`,g);let l=a.rectangle(t,z,r,R,s);K=A.insert(()=>l,`:first-child`).attr(`class`,_),G.select(`path:nth-child(2)`).attr(`style`,O.join(`;`)),G.select(`path`).attr(`style`,k.join(`;`).replace(`fill`,`stroke`))}else G=A.insert(`rect`,`:first-child`),K=A.insert(`rect`,`:first-child`),G.attr(`class`,g).attr(`style`,D).attr(`x`,V).attr(`y`,z).attr(`width`,e).attr(`height`,R).attr(`fill`,S).attr(`stroke`,T),K.attr(`class`,_).attr(`style`,D).attr(`x`,t).attr(`y`,z).attr(`width`,r).attr(`height`,R).attr(`fill`,`none`).attr(`stroke`,T);let a=V+e/2,o=n.y;N.attr(`transform`,`translate(${a}, ${o}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let e=Math.max(0,H-z),t=Math.min(W,e),r=z+t,a=Math.max(0,B-r),o=n.x-L/2;if(n.look===`handDrawn`){let e=h.svg(A),s=i(n,{roughness:.7,fill:S,stroke:T,fillWeight:3,seed:x}),c=i(n,{roughness:.7,fill:`none`,stroke:T,seed:x}),l=e.rectangle(o,z,L,t,s);G=A.insert(()=>l,`:first-child`).attr(`class`,g);let u=e.rectangle(o,r,L,a,c);K=A.insert(()=>u,`:first-child`).attr(`class`,_),G.select(`path:nth-child(2)`).attr(`style`,O.join(`;`)),G.select(`path`).attr(`style`,k.join(`;`).replace(`fill`,`stroke`))}else G=A.insert(`rect`,`:first-child`),K=A.insert(`rect`,`:first-child`),G.attr(`class`,g).attr(`style`,D).attr(`x`,o).attr(`y`,z).attr(`width`,L).attr(`height`,t).attr(`fill`,S).attr(`stroke`,T),K.attr(`class`,_).attr(`style`,D).attr(`x`,o).attr(`y`,r).attr(`width`,L).attr(`height`,a).attr(`fill`,`none`).attr(`stroke`,T);let s=n.x-F.width/2,c=z+(t-F.height)/2;N.attr(`transform`,`translate(${s}, ${c})`)}if(f.trace(`Swimlane data `,n,JSON.stringify(n)),E){let e=N.select(`span`);e&&e.attr(`style`,E)}return n.offsetX=0,n.width=L,n.height=R,n.offsetY=F.height-I/2,n.intersect=function(e){return t(n,e)},{cluster:A,labelBBox:F}},`swimlane`),_=p(async(o,u)=>{f.info(`Creating subgraph rect for `,u.id,u);let p=l(),{theme:g,themeVariables:_,handDrawnSeed:v}=p,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=a(u),E=o.insert(`g`).attr(`class`,`cluster `+u.cssClasses).attr(`id`,u.domId).attr(`data-look`,u.look);c(E,u.colorIndex,g,x);let D=d(p),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=u.labelType===`markdown`?await s(O,u.label,{style:u.labelStyle,useHtmlLabels:D,isNode:!0,width:u.width}):await r(O,u.label,u.labelStyle||``,!1,!0);let A=k.getBBox();if(d(p)){let e=k.children[0],t=m(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=u.width<=A.width+u.padding?A.width+u.padding:u.width;u.diff=u.width<=A.width+u.padding?(j-u.width)/2-u.padding:-u.padding;let M=u.height,N=u.x-j/2,P=u.y-M/2;f.trace(`Data `,u,JSON.stringify(u));let F;if(u.look===`handDrawn`){let e=h.svg(E),t=i(u,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(n(N,P,j,M,0),t);F=E.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,u.rx).attr(`ry`,u.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=e(p);if(O.attr(`transform`,`translate(${u.x-A.width/2}, ${u.y-u.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return u.offsetX=0,u.width=L.width,u.height=L.height,u.offsetY=A.height-u.padding/2,u.intersect=function(e){return t(u,e)},{cluster:E,labelBBox:A}},`rect`),v=p((e,n)=>{let r=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,n.domId),i=r.insert(`rect`,`:first-child`),a=0*n.padding,o=a/2;i.attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,n.x-n.width/2-o).attr(`y`,n.y-n.height/2-o).attr(`width`,n.width+a).attr(`height`,n.height+a).attr(`fill`,`none`);let s=i.node().getBBox();return n.width=s.width,n.height=s.height,n.intersect=function(e){return t(n,e)},{cluster:r,labelBBox:{width:0,height:0}}},`noteGroup`),y=p(async(e,i)=>{let a=l(),{theme:o,themeVariables:s,handDrawnSeed:u}=a,{altBackground:f,borderColorArray:p,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,i.cssClasses).attr(`id`,i.domId).attr(`data-id`,i.id).attr(`data-look`,i.look);c(y,i.colorIndex,o,p);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await r(x,i.label,i.labelStyle,void 0,!0),w=C.getBBox();if(d(a)){let e=C.children[0],t=m(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*i.padding,E=T/2,D=(i.width<=w.width+i.padding?w.width+i.padding:i.width)+T;i.diff=i.width<=w.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height+T,k=i.height+T-w.height-6,A=i.x-D/2,j=i.y-O/2;i.width=D;let M=i.y-i.height/2-E+w.height+2,N;if(i.look===`handDrawn`){let e=i.cssClasses.includes(`statediagram-cluster-alt`),t=h.svg(y),r=i.rx||i.ry?t.path(n(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:u}):t.rectangle(A,j,D,O,{seed:u});N=y.insert(()=>r,`:first-child`);let a=t.rectangle(A,M,D,k,{fill:e?f:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:u});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>a),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,i.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${i.x-w.width/2}, ${j+1-(d(a)?0:3)})`),i.height=N.node().getBBox().height,i.offsetX=0,i.offsetY=w.height-i.padding/2,i.labelBBox=w,i.intersect=function(e){return t(i,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=p(async(r,o)=>{f.info(`Creating subgraph rect for `,o.id,o);let c=l(),{themeVariables:u,handDrawnSeed:p}=c,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=a(o),S=r.insert(`g`).attr(`class`,`cluster `+o.cssClasses).attr(`id`,o.domId).attr(`data-look`,o.look),C=d(c),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await s(w,o.label,{style:o.labelStyle,useHtmlLabels:C,isNode:!0,width:o.width}),E=T.getBBox();if(d(c)){let e=T.children[0],t=m(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=o.width<=E.width+o.padding?E.width+o.padding:o.width;o.diff=o.width<=E.width+o.padding?(D-o.width)/2-o.padding:-o.padding;let O=o.height,k=o.x-D/2,A=o.y-O/2;f.trace(`Data `,o,JSON.stringify(o));let j;if(o.look===`handDrawn`){let e=h.svg(S),t=i(o,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:p}),r=e.path(n(k,A,D,O,o.rx),t);j=S.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,o.rx).attr(`ry`,o.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=e(c);if(w.attr(`transform`,`translate(${o.x-E.width/2}, ${o.y-o.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return o.offsetX=0,o.width=N.width,o.height=N.height,o.offsetY=E.height-o.padding/2,o.intersect=function(e){return t(o,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=p((e,n)=>{let{theme:r,themeVariables:i,handDrawnSeed:a}=l(),{altBackground:o,nodeBorder:s,borderColorArray:u}=i,d=e.insert(`g`).attr(`class`,n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look);c(d,n.colorIndex,r,u);let f=d.insert(`g`,`:first-child`),p=0*n.padding,m=n.width+p;n.diff=-n.padding;let g=n.height+p,_=n.x-m/2,v=n.y-g/2;n.width=m;let y;if(n.look===`handDrawn`){let e=h.svg(d).rectangle(_,v,m,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:a});y=d.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=f.insert(`rect`,`:first-child`);let e=`outer`;e=(n.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,m).attr(`height`,g).attr(`data-look`,n.look)}return n.height=y.node().getBBox().height,n.offsetX=0,n.offsetY=0,n.intersect=function(e){return t(n,e)},{cluster:d,labelBBox:{}}},`divider`),S=p(async(o,u,p)=>{f.info(`Creating ${p.cssClass} for `,u.id,u);let g=l(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=a(u),C=o.insert(`g`).attr(`class`,`cluster `+p.cssClass+` `+u.cssClasses).attr(`id`,u.domId??u.id).attr(`data-look`,u.look);c(C,u.colorIndex,_,b);let w=d(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=u.label?.trim();if(D){let e;if(e=u.labelType===`markdown`?await s(T,u.label,{style:u.labelStyle,useHtmlLabels:w,isNode:!0,width:u.width}):await r(T,u.label,u.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],n=m(e);E=t.getBoundingClientRect(),n.attr(`width`,E.width),n.attr(`height`,E.height)}}let O=u.width<=E.width+u.padding?E.width+u.padding:u.width;u.diff=u.width<=E.width+u.padding?(O-u.width)/2-u.padding:-u.padding;let k=u.height,A=u.x-O/2,j=u.y-k/2,M;if(u.look===`handDrawn`){let e=h.svg(C),t=i(u,{roughness:p.roughness,fill:p.fill,stroke:p.stroke,strokeWidth:p.strokeWidth,seed:y,...p.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...p.strokeDash?{strokeLineDash:p.strokeDash}:{}}),r=e.path(n(A,j,O,k,p.rx),t);M=C.insert(()=>r,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,p.rx).attr(`ry`,p.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,p.fill).attr(`stroke`,p.stroke).attr(`stroke-width`,p.strokeWidth+`px`),p.strokeDash&&M.attr(`stroke-dasharray`,p.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:t}=e(g);if(T.attr(`transform`,`translate(${u.x-E.width/2}, ${u.y-u.height/2+t})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return u.offsetX=0,u.width=N.width,u.height=N.height,u.offsetY=E.height-u.padding/2,u.intersect=function(e){return t(u,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=p(async(e,t)=>{let{themeVariables:n}=l();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=p((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:p(async(n,r)=>{f.info(`Creating usecase system boundary for `,r.id,r);let u=l(),{theme:p,themeVariables:g,handDrawnSeed:_}=u,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=a(r),{stylesMap:C}=o(r),T=r.boundaryType||`rect`,E=n.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${r.cssClasses}`).attr(`id`,typeof r.domId==`string`?r.domId:r.id).attr(`data-boundary-type`,T).attr(`data-look`,r.look);c(E,r.colorIndex,p,b);let D=d(u),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await s(O,r.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=m(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(r,A);r.diff=r.width<=A.width+r.padding?(j-r.width)/2-r.padding:-r.padding;let z=i(r,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(r.look===`handDrawn`){let e=h.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=e(u);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${r.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),r.offsetX=0,r.width=j,r.height=M,r.offsetY=A.height-r.padding/2,r.labelBBox=A,r.intersect=function(e){return t(r,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g,pool:p((e,t)=>g(e,t,{variant:`pool`}),`pool`)},E=new Set([`noteGroup`,`divider`]),D=p(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=p(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=p(()=>{O=new Map},`clear`);export{D as n,k as r,A as t};
|
|
1
|
+
import{n as e}from"./chunk-LEVMRMFU-DXH6iXv3.js";import{i as t,n,t as r}from"./chunk-AXFCVDMN-BhsttQ-k.js";import{a as i,i as a,t as o}from"./chunk-X4PVCEUW-DGxTL3kB.js";import{n as s}from"./chunk-STOXU5M4-BaTlty4O.js";import{s as c}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{b as l,g as u,w as d}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as f}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as p}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as m}from"./index-Bn6_wHEp.js";import{t as h}from"./rough.esm-Dy-Kn_BL.js";var g=p(async(e,n,{variant:r=`swimlane`}={})=>{let o=r===`pool`,d=o?`pool swimlane`:`swimlane`,p=o?`pool-label swimlane-label`:`swimlane-label`,g=o?`pool-title swimlane-title`:`swimlane-title`,_=o?`pool-body swimlane-body`:`swimlane-body`,v=l(),{theme:y,themeVariables:b,handDrawnSeed:x}=v,{clusterBkg:S,clusterBorder:C,borderColorArray:w}=b,T=C,{labelStyles:E,nodeStyles:D,borderStyles:O,backgroundStyles:k}=a(n),A=e.insert(`g`).attr(`class`,`cluster `+d+` `+(n.cssClasses||``)).attr(`id`,n.domId??n.id).attr(`data-id`,n.id).attr(`data-et`,`cluster`).attr(`data-look`,n.look);c(A,n.colorIndex,y,w);let j=u(v.flowchart.htmlLabels),M=n.direction===`LR`,N=A.insert(`g`).attr(`class`,`cluster-label `+p),P=await s(N,n.label,{style:n.labelStyle,useHtmlLabels:j,isNode:!0,width:n.width}),F=P.getBBox();if(j){let e=P.children[0],t=m(P);F=e.getBoundingClientRect(),t.attr(`width`,F.width),t.attr(`height`,F.height)}let I=n.padding??0,L=n.width<=F.width+I?F.width+I:n.width;n.diff=n.width<=F.width+I?(L-n.width)/2-I:-I;let R=n.height,z=n.y-R/2,B=n.y+R/2,V=n.x-L/2,H=n.swimlaneContentTop===void 0?z+R/3:n.swimlaneContentTop,U=M?4:0,W=F.height+2*U,G,K;if(M){let e=Math.max(W,F.height+2*U),t=V+e,r=Math.max(0,L-e);if(n.look===`handDrawn`){let a=h.svg(A),o=i(n,{roughness:.7,fill:S,stroke:T,seed:x}),s=i(n,{roughness:.7,fill:`none`,stroke:T,seed:x}),c=a.rectangle(V,z,e,R,o);G=A.insert(()=>c,`:first-child`).attr(`class`,g);let l=a.rectangle(t,z,r,R,s);K=A.insert(()=>l,`:first-child`).attr(`class`,_),G.select(`path:nth-child(2)`).attr(`style`,O.join(`;`)),G.select(`path`).attr(`style`,k.join(`;`).replace(`fill`,`stroke`))}else G=A.insert(`rect`,`:first-child`),K=A.insert(`rect`,`:first-child`),G.attr(`class`,g).attr(`style`,D).attr(`x`,V).attr(`y`,z).attr(`width`,e).attr(`height`,R).attr(`fill`,S).attr(`stroke`,T),K.attr(`class`,_).attr(`style`,D).attr(`x`,t).attr(`y`,z).attr(`width`,r).attr(`height`,R).attr(`fill`,`none`).attr(`stroke`,T);let a=V+e/2,o=n.y;N.attr(`transform`,`translate(${a}, ${o}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let e=Math.max(0,H-z),t=Math.min(W,e),r=z+t,a=Math.max(0,B-r),o=n.x-L/2;if(n.look===`handDrawn`){let e=h.svg(A),s=i(n,{roughness:.7,fill:S,stroke:T,fillWeight:3,seed:x}),c=i(n,{roughness:.7,fill:`none`,stroke:T,seed:x}),l=e.rectangle(o,z,L,t,s);G=A.insert(()=>l,`:first-child`).attr(`class`,g);let u=e.rectangle(o,r,L,a,c);K=A.insert(()=>u,`:first-child`).attr(`class`,_),G.select(`path:nth-child(2)`).attr(`style`,O.join(`;`)),G.select(`path`).attr(`style`,k.join(`;`).replace(`fill`,`stroke`))}else G=A.insert(`rect`,`:first-child`),K=A.insert(`rect`,`:first-child`),G.attr(`class`,g).attr(`style`,D).attr(`x`,o).attr(`y`,z).attr(`width`,L).attr(`height`,t).attr(`fill`,S).attr(`stroke`,T),K.attr(`class`,_).attr(`style`,D).attr(`x`,o).attr(`y`,r).attr(`width`,L).attr(`height`,a).attr(`fill`,`none`).attr(`stroke`,T);let s=n.x-F.width/2,c=z+(t-F.height)/2;N.attr(`transform`,`translate(${s}, ${c})`)}if(f.trace(`Swimlane data `,n,JSON.stringify(n)),E){let e=N.select(`span`);e&&e.attr(`style`,E)}return n.offsetX=0,n.width=L,n.height=R,n.offsetY=F.height-I/2,n.intersect=function(e){return t(n,e)},{cluster:A,labelBBox:F}},`swimlane`),_=p(async(o,u)=>{f.info(`Creating subgraph rect for `,u.id,u);let p=l(),{theme:g,themeVariables:_,handDrawnSeed:v}=p,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=a(u),E=o.insert(`g`).attr(`class`,`cluster `+u.cssClasses).attr(`id`,u.domId).attr(`data-look`,u.look);c(E,u.colorIndex,g,x);let D=d(p),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=u.labelType===`markdown`?await s(O,u.label,{style:u.labelStyle,useHtmlLabels:D,isNode:!0,width:u.width}):await r(O,u.label,u.labelStyle||``,!1,!0);let A=k.getBBox();if(d(p)){let e=k.children[0],t=m(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=u.width<=A.width+u.padding?A.width+u.padding:u.width;u.diff=u.width<=A.width+u.padding?(j-u.width)/2-u.padding:-u.padding;let M=u.height,N=u.x-j/2,P=u.y-M/2;f.trace(`Data `,u,JSON.stringify(u));let F;if(u.look===`handDrawn`){let e=h.svg(E),t=i(u,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(n(N,P,j,M,0),t);F=E.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,u.rx).attr(`ry`,u.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=e(p);if(O.attr(`transform`,`translate(${u.x-A.width/2}, ${u.y-u.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return u.offsetX=0,u.width=L.width,u.height=L.height,u.offsetY=A.height-u.padding/2,u.intersect=function(e){return t(u,e)},{cluster:E,labelBBox:A}},`rect`),v=p((e,n)=>{let r=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,n.domId),i=r.insert(`rect`,`:first-child`),a=0*n.padding,o=a/2;i.attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,n.x-n.width/2-o).attr(`y`,n.y-n.height/2-o).attr(`width`,n.width+a).attr(`height`,n.height+a).attr(`fill`,`none`);let s=i.node().getBBox();return n.width=s.width,n.height=s.height,n.intersect=function(e){return t(n,e)},{cluster:r,labelBBox:{width:0,height:0}}},`noteGroup`),y=p(async(e,i)=>{let a=l(),{theme:o,themeVariables:s,handDrawnSeed:u}=a,{altBackground:f,borderColorArray:p,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,i.cssClasses).attr(`id`,i.domId).attr(`data-id`,i.id).attr(`data-look`,i.look);c(y,i.colorIndex,o,p);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await r(x,i.label,i.labelStyle,void 0,!0),w=C.getBBox();if(d(a)){let e=C.children[0],t=m(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*i.padding,E=T/2,D=(i.width<=w.width+i.padding?w.width+i.padding:i.width)+T;i.diff=i.width<=w.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height+T,k=i.height+T-w.height-6,A=i.x-D/2,j=i.y-O/2;i.width=D;let M=i.y-i.height/2-E+w.height+2,N;if(i.look===`handDrawn`){let e=i.cssClasses.includes(`statediagram-cluster-alt`),t=h.svg(y),r=i.rx||i.ry?t.path(n(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:u}):t.rectangle(A,j,D,O,{seed:u});N=y.insert(()=>r,`:first-child`);let a=t.rectangle(A,M,D,k,{fill:e?f:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:u});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>a),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,i.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${i.x-w.width/2}, ${j+1-(d(a)?0:3)})`),i.height=N.node().getBBox().height,i.offsetX=0,i.offsetY=w.height-i.padding/2,i.labelBBox=w,i.intersect=function(e){return t(i,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=p(async(r,o)=>{f.info(`Creating subgraph rect for `,o.id,o);let c=l(),{themeVariables:u,handDrawnSeed:p}=c,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=a(o),S=r.insert(`g`).attr(`class`,`cluster `+o.cssClasses).attr(`id`,o.domId).attr(`data-look`,o.look),C=d(c),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await s(w,o.label,{style:o.labelStyle,useHtmlLabels:C,isNode:!0,width:o.width}),E=T.getBBox();if(d(c)){let e=T.children[0],t=m(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=o.width<=E.width+o.padding?E.width+o.padding:o.width;o.diff=o.width<=E.width+o.padding?(D-o.width)/2-o.padding:-o.padding;let O=o.height,k=o.x-D/2,A=o.y-O/2;f.trace(`Data `,o,JSON.stringify(o));let j;if(o.look===`handDrawn`){let e=h.svg(S),t=i(o,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:p}),r=e.path(n(k,A,D,O,o.rx),t);j=S.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,o.rx).attr(`ry`,o.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=e(c);if(w.attr(`transform`,`translate(${o.x-E.width/2}, ${o.y-o.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return o.offsetX=0,o.width=N.width,o.height=N.height,o.offsetY=E.height-o.padding/2,o.intersect=function(e){return t(o,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=p((e,n)=>{let{theme:r,themeVariables:i,handDrawnSeed:a}=l(),{altBackground:o,nodeBorder:s,borderColorArray:u}=i,d=e.insert(`g`).attr(`class`,n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look);c(d,n.colorIndex,r,u);let f=d.insert(`g`,`:first-child`),p=0*n.padding,m=n.width+p;n.diff=-n.padding;let g=n.height+p,_=n.x-m/2,v=n.y-g/2;n.width=m;let y;if(n.look===`handDrawn`){let e=h.svg(d).rectangle(_,v,m,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:a});y=d.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=f.insert(`rect`,`:first-child`);let e=`outer`;e=(n.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,m).attr(`height`,g).attr(`data-look`,n.look)}return n.height=y.node().getBBox().height,n.offsetX=0,n.offsetY=0,n.intersect=function(e){return t(n,e)},{cluster:d,labelBBox:{}}},`divider`),S=p(async(o,u,p)=>{f.info(`Creating ${p.cssClass} for `,u.id,u);let g=l(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=a(u),C=o.insert(`g`).attr(`class`,`cluster `+p.cssClass+` `+u.cssClasses).attr(`id`,u.domId??u.id).attr(`data-look`,u.look);c(C,u.colorIndex,_,b);let w=d(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=u.label?.trim();if(D){let e;if(e=u.labelType===`markdown`?await s(T,u.label,{style:u.labelStyle,useHtmlLabels:w,isNode:!0,width:u.width}):await r(T,u.label,u.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],n=m(e);E=t.getBoundingClientRect(),n.attr(`width`,E.width),n.attr(`height`,E.height)}}let O=u.width<=E.width+u.padding?E.width+u.padding:u.width;u.diff=u.width<=E.width+u.padding?(O-u.width)/2-u.padding:-u.padding;let k=u.height,A=u.x-O/2,j=u.y-k/2,M;if(u.look===`handDrawn`){let e=h.svg(C),t=i(u,{roughness:p.roughness,fill:p.fill,stroke:p.stroke,strokeWidth:p.strokeWidth,seed:y,...p.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...p.strokeDash?{strokeLineDash:p.strokeDash}:{}}),r=e.path(n(A,j,O,k,p.rx),t);M=C.insert(()=>r,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,p.rx).attr(`ry`,p.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,p.fill).attr(`stroke`,p.stroke).attr(`stroke-width`,p.strokeWidth+`px`),p.strokeDash&&M.attr(`stroke-dasharray`,p.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:t}=e(g);if(T.attr(`transform`,`translate(${u.x-E.width/2}, ${u.y-u.height/2+t})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return u.offsetX=0,u.width=N.width,u.height=N.height,u.offsetY=E.height-u.padding/2,u.intersect=function(e){return t(u,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=p(async(e,t)=>{let{themeVariables:n}=l();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=p((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:p(async(n,r)=>{f.info(`Creating usecase system boundary for `,r.id,r);let u=l(),{theme:p,themeVariables:g,handDrawnSeed:_}=u,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=a(r),{stylesMap:C}=o(r),T=r.boundaryType||`rect`,E=n.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${r.cssClasses}`).attr(`id`,typeof r.domId==`string`?r.domId:r.id).attr(`data-boundary-type`,T).attr(`data-look`,r.look);c(E,r.colorIndex,p,b);let D=d(u),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await s(O,r.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=m(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(r,A);r.diff=r.width<=A.width+r.padding?(j-r.width)/2-r.padding:-r.padding;let z=i(r,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(r.look===`handDrawn`){let e=h.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=e(u);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${r.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),r.offsetX=0,r.width=j,r.height=M,r.offsetY=A.height-r.padding/2,r.labelBBox=A,r.intersect=function(e){return t(r,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g,pool:p((e,t)=>g(e,t,{variant:`pool`}),`pool`)},E=new Set([`noteGroup`,`divider`]),D=p(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=p(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=p(()=>{O=new Map},`clear`);export{D as n,k as r,A as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./mermaid.core-
|
|
1
|
+
import{a as e}from"./mermaid.core-y-x1CYxC.js";import{E as t,a as n,b as r,c as i,y as a,z as o}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as s}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as c}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var l=``,u=``,d=``,f=[],p=new Map,m=c(e=>o(e,r()),`sanitizeText`),h=c(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=c(()=>{l=``,u=``,d=``,f.length=0,p.clear(),n(),s.debug(`[Railroad] Database cleared`)},`clear`),_=c(e=>{l=m(e),s.debug(`[Railroad] Title set:`,e)},`setTitle`),v=c(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:c(e=>{let t={...e,name:m(e.name),definition:h(e.definition),comment:e.comment?m(e.comment):void 0};s.debug(`[Railroad] Adding rule:`,t.name),p.has(t.name)&&s.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),f.push(t),p.set(t.name,t)},`addRule`),getRules:c(()=>f,`getRules`),getRule:c(e=>p.get(e),`getRule`),setAccTitle:c(e=>{u=m(e).replace(/^\s+/g,``),s.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:c(()=>u,`getAccTitle`),setAccDescription:c(e=>{d=m(e).replace(/\n\s+/g,`
|
|
2
2
|
`),s.debug(`[Railroad] Accessibility description set:`,e)},`setAccDescription`),getAccDescription:c(()=>d,`getAccDescription`),setDiagramTitle:_,getDiagramTitle:v},b={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:`monospace`,terminalFill:`#FFFFC0`,terminalStroke:`#000000`,terminalTextColor:`#000000`,nonTerminalFill:`#FFFFFF`,nonTerminalStroke:`#000000`,nonTerminalTextColor:`#000000`,lineColor:`#000000`,strokeWidth:2,markerFill:`#000000`,commentFill:`#E8E8E8`,commentStroke:`#888888`,commentTextColor:`#666666`,specialFill:`#F0E0FF`,specialStroke:`#8800CC`,ruleNameColor:`#000066`,showMarkers:!0,markerRadius:5},x=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,S=/^[\w "',.-]+$/,C=new Set([`compactMode`,`padding`,`verticalSeparation`,`horizontalSeparation`,`arcRadius`,`fontSize`,`fontFamily`,`terminalFill`,`terminalStroke`,`terminalTextColor`,`nonTerminalFill`,`nonTerminalStroke`,`nonTerminalTextColor`,`lineColor`,`strokeWidth`,`markerFill`,`commentFill`,`commentStroke`,`commentTextColor`,`specialFill`,`specialStroke`,`ruleNameColor`,`showMarkers`,`markerRadius`]),w=c(e=>e?Object.keys(e).every(e=>e===`railroad`||C.has(e)):!1,`isRailroadStyleOptions`),T=c(e=>e?`railroad`in e&&e.railroad?e.railroad:w(e)?e:{}:{},`extractRailroadOverrides`),E=c(e=>{if(!e||w(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),D=c((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return x.test(n)?n:t},`sanitizeColorValue`),O=c((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return S.test(n)?n:t},`sanitizeFontFamilyValue`),k=c((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),A=c(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),j=c(e=>{let t=O(e.fontFamily,b.fontFamily),n=A(e.fontSize)??b.fontSize;return{...b,fontFamily:t,fontSize:n,terminalFill:D(e.secondBkg??e.secondaryColor,b.terminalFill),terminalStroke:D(e.secondaryBorderColor??e.lineColor,b.terminalStroke),terminalTextColor:D(e.secondaryTextColor??e.textColor,b.terminalTextColor),nonTerminalFill:D(e.mainBkg??e.background,b.nonTerminalFill),nonTerminalStroke:D(e.primaryBorderColor??e.lineColor,b.nonTerminalStroke),nonTerminalTextColor:D(e.primaryTextColor??e.textColor,b.nonTerminalTextColor),lineColor:D(e.lineColor,b.lineColor),markerFill:D(e.lineColor,b.markerFill),commentFill:D(e.labelBackground??e.tertiaryColor,b.commentFill),commentStroke:D(e.tertiaryBorderColor??e.lineColor,b.commentStroke),commentTextColor:D(e.tertiaryTextColor??e.textColor,b.commentTextColor),specialFill:D(e.tertiaryColor??e.secondaryColor,b.specialFill),specialStroke:D(e.tertiaryBorderColor??e.secondaryBorderColor,b.specialStroke),ruleNameColor:D(e.titleColor??e.textColor,b.ruleNameColor)}},`buildThemeDefaults`),M=c(e=>{let n=a(),r=j({...t(),...n.themeVariables??{},...E(e)}),i={...n.railroad??{},...T(e)};return{compactMode:i.compactMode??r.compactMode,padding:k(i.padding,r.padding),verticalSeparation:k(i.verticalSeparation,r.verticalSeparation),horizontalSeparation:k(i.horizontalSeparation,r.horizontalSeparation),arcRadius:k(i.arcRadius,r.arcRadius),fontSize:k(i.fontSize,r.fontSize),fontFamily:O(i.fontFamily,r.fontFamily),terminalFill:D(i.terminalFill,r.terminalFill),terminalStroke:D(i.terminalStroke,r.terminalStroke),terminalTextColor:D(i.terminalTextColor,r.terminalTextColor),nonTerminalFill:D(i.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:D(i.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:D(i.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:D(i.lineColor,r.lineColor),strokeWidth:k(i.strokeWidth,r.strokeWidth),markerFill:D(i.markerFill,r.markerFill),commentFill:D(i.commentFill,r.commentFill),commentStroke:D(i.commentStroke,r.commentStroke),commentTextColor:D(i.commentTextColor,r.commentTextColor),specialFill:D(i.specialFill,r.specialFill),specialStroke:D(i.specialStroke,r.specialStroke),ruleNameColor:D(i.ruleNameColor,r.ruleNameColor),showMarkers:i.showMarkers??r.showMarkers,markerRadius:k(i.markerRadius,r.markerRadius)}},`buildRailroadStyleOptions`),N=c(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:c,lineColor:l,strokeWidth:u,markerFill:d,commentFill:f,commentStroke:p,commentTextColor:m,specialFill:h,specialStroke:g,ruleNameColor:_}=M(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t}from"./chunk-XXDRQBXY-
|
|
1
|
+
import{t as e}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t}from"./chunk-XXDRQBXY-C02Gpej2.js";import{t as n}from"./chunk-TU62E6Q5-_rcUP1Fh.js";import{i as r,n as i,r as a,t as o}from"./mermaid.core-y-x1CYxC.js";import{t as s}from"./chunk-HFQBQIA3-nXrQ08BL.js";import{h as c,r as l,s as u}from"./chunk-DQASFODM-7FKe2gLt.js";import{a as d}from"./chunk-AXFCVDMN-BhsttQ-k.js";import{i as f,n as p,o as m,r as h}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{_ as g,c as _}from"./chunk-6MUBBAK2-BBl-4tQr.js";import{C as v,G as ee,H as te,U as y,_ as b,a as x,b as S,d as C,it as w,q as T,s as E,v as D}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as O}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as k}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as A,t as ne}from"./index-Bn6_wHEp.js";var re=`flowchart-`,ie=[`laneRole`,`laneIndex`,`drawnExtent`];function j(e){if(!e||typeof e!=`object`)return e;let t={...e};for(let e of ie)Reflect.deleteProperty(t,e);return t}k(j,`withoutInternalKeys`);var M=class{constructor(){this.vertexCounter=0,this.config=S(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=y,this.setAccDescription=te,this.setDiagramTitle=T,this.getAccTitle=D,this.getAccDescription=b,this.getDiagramTitle=v,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.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.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{k(this,`FlowDB`)}sanitizeText(e){return E.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 t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,n,r,a,s,c={},l){if(!e||e.trim().length===0)return;let f;if(l!==void 0){let e;e=l.includes(`
|
|
2
2
|
`)?l+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+l+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as e,z as t}from"./chunk-BG4553SI-
|
|
1
|
+
import{y as e,z as t}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as n}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?`<defs>`+e+`</defs>`+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}var C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}var T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var A={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},j=new Map,M=new Map,N=r(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(n.debug(`Registering icon pack:`,t.name),`loader`in t)M.set(t.name,t.loader);else if(`icons`in t)j.set(t.name,t.icons);else throw n.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=r(e=>j.has(e)||M.has(e),`isIconPackRegistered`),F=r(async(e,t)=>{let r=u(e,!0,t!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||t;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw n.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),I=r(async e=>{try{return await F(e),!0}catch{return!1}},`isIconAvailable`),L=r(async(r,i,a)=>{let o;try{o=await F(r,i?.fallbackPrefix)}catch(e){n.error(e),o=A}let s=w(o,i),c=k(O(s.body),{...s.attributes,...a});return t(c,e())},`getIconSVG`);export{A as a,N as i,I as n,P as r,L as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./chunk-R3KSYZAL-
|
|
1
|
+
import{n as e,t}from"./chunk-R3KSYZAL-BEXCUN6J.js";import{a as n}from"./chunk-6MUBBAK2-BBl-4tQr.js";import{F as r,k as i,s as a,y as o,z as s}from"./chunk-BG4553SI-mWcPcFZr.js";import{t as c}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n as l}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as u}from"./index-Bn6_wHEp.js";function d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var f=d();function p(e){f=e}var m={exec:()=>null};function h(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var g=(()=>{try{return!0}catch{return!1}})(),_={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},ee=/^(?:[ \t]*(?:\n|$))+/,te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ne=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,re=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,y=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ae=h(ie).replace(/bull/g,y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),oe=h(ie).replace(/bull/g,y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,se=/^[^\n]+/,x=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ce=h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,x).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),le=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y).getRegex(),S=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,C=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ue=h(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,C).replace(`tag`,S).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de=h(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex(),w={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,de).getRegex(),code:te,def:ce,fences:ne,heading:re,hr:v,html:ue,lheading:ae,list:le,newline:ee,paragraph:de,table:m,text:se},fe=h(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex(),pe={...w,lheading:oe,table:fe,paragraph:h(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,fe).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex()},me={...w,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,C).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(b).replace(`hr`,v).replace(`heading`,` *#{1,6} *[^
|
|
2
2
|
]`).replace(`lheading`,ae).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},he=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ge=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,E=/[\s\p{P}\p{S}]/u,ye=/[^\s\p{P}\p{S}]/u,be=h(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,E).getRegex(),xe=/(?!~)[\p{P}\p{S}]/u,Se=/(?!~)[\s\p{P}\p{S}]/u,Ce=/(?:[^\s\p{P}\p{S}]|~)/u,we=h(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,g?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Te=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ee=h(Te,`u`).replace(/punct/g,T).getRegex(),De=h(Te,`u`).replace(/punct/g,xe).getRegex(),Oe=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ke=h(Oe,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),Ae=h(Oe,`gu`).replace(/notPunctSpace/g,Ce).replace(/punctSpace/g,Se).replace(/punct/g,xe).getRegex(),je=h(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),Me=h(/\\(punct)/,`gu`).replace(/punct/g,T).getRegex(),Ne=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pe=h(C).replace(`(?:-->|$)`,`-->`).getRegex(),Fe=h(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Pe).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ie=h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,D).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=h(/^!?\[(label)\]\[(ref)\]/).replace(`label`,D).replace(`ref`,x).getRegex(),Re=h(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,x).getRegex(),ze=h(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Le).replace(`nolink`,Re).getRegex(),Be=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,O={_backpedal:m,anyPunctuation:Me,autolink:Ne,blockSkip:we,br:_e,code:ge,del:m,emStrongLDelim:Ee,emStrongRDelimAst:ke,emStrongRDelimUnd:je,escape:he,link:Ie,nolink:Re,punctuation:be,reflink:Le,reflinkSearch:ze,tag:Fe,text:ve,url:m},Ve={...O,link:h(/^!?\[(label)\]\((.*?)\)/).replace(`label`,D).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,D).getRegex()},k={...O,emStrongRDelimAst:Ae,emStrongLDelim:De,url:h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Be).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Be).getRegex()},He={...k,br:h(_e).replace(`{2,}`,`*`).getRegex(),text:h(k.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},A={normal:w,gfm:pe,pedantic:me},j={normal:O,gfm:k,breaks:He,pedantic:Ve},Ue={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},We=e=>Ue[e];function M(e,t){if(t){if(_.escapeTest.test(e))return e.replace(_.escapeReplace,We)}else if(_.escapeTestNoEncode.test(e))return e.replace(_.escapeReplaceNoEncode,We);return e}function Ge(e){try{e=encodeURI(e).replace(_.percentDecode,`%`)}catch{return null}return e}function Ke(e,t){let n=e.replace(_.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(_.slashPipe,`|`);return n}function N(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function qe(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Je(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Ye(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
3
3
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
4
4
|
`)}var P=class{options;rules;lexer;constructor(e){this.options=e||f}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:N(e,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./chunk-BG4553SI-
|
|
1
|
+
import{c as e}from"./chunk-BG4553SI-mWcPcFZr.js";import{t}from"./chunk-X3CZISLH-NOpCnvgE.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var r=n((n,r,o,s)=>{n.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(n,r);e(n,l,c,s);let f=a(u,d,c,l,r);n.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=n((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=n((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var r=t(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(n,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),i=e(r(),1),a={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},o={trace:n((...e)=>{},`trace`),debug:n((...e)=>{},`debug`),info:n((...e)=>{},`info`),warn:n((...e)=>{},`warn`),error:n((...e)=>{},`error`),fatal:n((...e)=>{},`fatal`)},s=n(function(e=`fatal`){let t=a.fatal;typeof e==`string`?e.toLowerCase()in a&&(t=a[e]):typeof e==`number`&&(t=e),o.trace=()=>{},o.debug=()=>{},o.info=()=>{},o.warn=()=>{},o.error=()=>{},o.fatal=()=>{},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,c(`FATAL`))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,c(`ERROR`))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,c(`WARN`))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,c(`INFO`))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`DEBUG`))),t<=a.trace&&(o.trace=console.debug?console.debug.bind(console,c(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`TRACE`)))},`setLogLevel`),c=n(e=>`%c${(0,i.default)().format(`ss.SSS`)} : ${e} : `,`format`);export{s as n,r,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk-BG4553SI-
|
|
1
|
+
import{b as e}from"./chunk-BG4553SI-mWcPcFZr.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var n=t(t=>{let{handDrawnSeed:n}=e();return{fill:t,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:t,seed:n}},`solidStateFill`),r=t(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),i=t(e=>{let t=a([...e.cssCompiledStyles||[],...e.cssStyles||[],...r(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),a=t(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),o=t(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),s=t(e=>{let{stylesArray:t}=i(e),n=[],r=[],a=[],s=[];return t.forEach(e=>{let t=e[0];o(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&a.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:a,backgroundStyles:s}},`styles2String`),c=t((t,n)=>{let{themeVariables:r,handDrawnSeed:a}=e(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:c}=i(t);return Object.assign({roughness:.7,fill:c.get(`fill`)||s,fillStyle:`hachure`,fillWeight:1.5,hachureGap:1.5,stroke:c.get(`stroke`)||o,seed:a,strokeWidth:c.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:l(c.get(`stroke-dasharray`))},n)},`userNodeOverrides`),l=t(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{c as a,s as i,o as n,n as r,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as t}from"./index-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{d as t}from"./index-Bn6_wHEp.js";var n=e((e,n)=>{let r;return n===`sandbox`&&(r=t(`#i`+e)),t(n===`sandbox`?r.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`);export{n as t};
|