@hienlh/ppm 0.9.93 → 0.9.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/web/assets/ai-settings-section-LMO_cfIW.js +1 -0
- package/dist/web/assets/api-client-o_6TmLGC.js +1 -0
- package/dist/web/assets/api-settings-CoKe_BdR.js +1 -0
- package/dist/web/assets/architecture-PBZL5I3N-CUZIB1Vq.js +1 -0
- package/dist/web/assets/arrow-up-Dtrfv490.js +1 -0
- package/dist/web/assets/chat-tab-DQNdrUvL.js +10 -0
- package/dist/web/assets/chevron-right-BzAdxJRG.js +1 -0
- package/dist/web/assets/code-CuravVys.js +1 -0
- package/dist/web/assets/code-editor-B4XNYHnl.js +8 -0
- package/dist/web/assets/columns-2-4fQcE4PF.js +1 -0
- package/dist/web/assets/conflict-editor-BcsRDSCw.js +19 -0
- package/dist/web/assets/createLucideIcon-BjHrJDVb.js +1 -0
- package/dist/web/assets/{csv-preview-BZRICDP0.js → csv-preview-BizIVMyb.js} +2 -2
- package/dist/web/assets/database-D4DIhgi-.js +1 -0
- package/dist/web/assets/database-viewer-CfzAAtm3.js +2 -0
- package/dist/web/assets/diff-viewer-DgA9z9Ux.js +4 -0
- package/dist/web/assets/dist-C5IgeqrV.js +1 -0
- package/dist/web/assets/dist-im4ynINo.js +11 -0
- package/dist/web/assets/esm-K1XIK4vc.js +2 -0
- package/dist/web/assets/extension-store-3yZYn07W.js +1 -0
- package/dist/web/assets/{extension-webview-C1d6fezE.js → extension-webview-gHGB2Nw2.js} +2 -2
- package/dist/web/assets/gitGraph-HDMCJU4V-CtOMUphQ.js +1 -0
- package/dist/web/assets/index-B4mGNywE.js +26 -0
- package/dist/web/assets/index-BZ4G-2BK.css +2 -0
- package/dist/web/assets/info-3K5VOQVL-BCrPCWGY.js +1 -0
- package/dist/web/assets/input-CHRMley8.js +1 -0
- package/dist/web/assets/keybindings-store-BAuymsWd.js +1 -0
- package/dist/web/assets/keybindings-store-BKyNIeFB.js +1 -0
- package/dist/web/assets/{lib-DSLzfeW0.js → lib-D_kRA9p6.js} +1 -1
- package/dist/web/assets/markdown-renderer-sIjU5LtB.js +3 -0
- package/dist/web/assets/packet-RMMSAZCW-D_OqB-zi.js +1 -0
- package/dist/web/assets/pie-UPGHQEXC-WUHpLNJz.js +1 -0
- package/dist/web/assets/plus-51UQ45rf.js +1 -0
- package/dist/web/assets/port-forwarding-tab-BMXnuRuI.js +1 -0
- package/dist/web/assets/postgres-viewer-B6Wj5xiN.js +3 -0
- package/dist/web/assets/project-store-Ciq-cK1O.js +1 -0
- package/dist/web/assets/radar-KQ55EAFF-HQIIecVM.js +1 -0
- package/dist/web/assets/react-GqWghJ-L.js +1 -0
- package/dist/web/assets/refresh-cw-CSFrDtiu.js +1 -0
- package/dist/web/assets/scroll-area-DwWF9FpN.js +1 -0
- package/dist/web/assets/settings-store-B470PCWf.js +2 -0
- package/dist/web/assets/settings-tab-BKQo79HU.js +1 -0
- package/dist/web/assets/{sql-query-editor-DaePHpQI.js → sql-query-editor-DZ9xskL8.js} +1 -1
- package/dist/web/assets/sqlite-viewer-CytNesG3.js +1 -0
- package/dist/web/assets/square-nsMa3iMk.js +1 -0
- package/dist/web/assets/tab-store-DZbiYk7y.js +1 -0
- package/dist/web/assets/table-Dq575bPF.js +1 -0
- package/dist/web/assets/terminal-tab-DjfxKMSB.js +1 -0
- package/dist/web/assets/text-wrap-Cn6BNQfq.js +1 -0
- package/dist/web/assets/trash-2-CJYoLw7Q.js +1 -0
- package/dist/web/assets/treemap-KZPCXAKY-0wLgUUTz.js +1 -0
- package/dist/web/assets/{use-monaco-theme-CM4IMROI.js → use-monaco-theme-OY18iXNi.js} +1 -1
- package/dist/web/assets/vendor-markdown-0Mxgxy0L.js +295 -0
- package/dist/web/assets/vendor-mermaid-B2SLgECS.js +2657 -0
- package/dist/web/assets/vendor-ui-B-T_damt.js +45 -0
- package/dist/web/assets/vendor-xterm-ejLe7-tK.js +36 -0
- package/dist/web/assets/x-DlFGzN8d.js +1 -0
- package/dist/web/index.html +26 -21
- package/dist/web/sw.js +1 -1
- package/docs/code-standards.md +56 -4
- package/docs/journals/260415-frontend-memory-optimization.md +73 -0
- package/docs/project-changelog.md +11 -1
- package/docs/system-architecture.md +36 -0
- package/package.json +1 -1
- package/src/web/components/chat/message-list.tsx +59 -22
- package/src/web/components/chat/tool-cards.tsx +11 -4
- package/src/web/components/database/data-grid.tsx +2 -1
- package/src/web/components/editor/code-editor.tsx +14 -8
- package/src/web/components/editor/conflict-editor.tsx +2 -1
- package/src/web/components/editor/diff-viewer.tsx +2 -1
- package/src/web/components/editor/editor-breadcrumb.tsx +2 -1
- package/src/web/components/explorer/file-tree.tsx +6 -5
- package/src/web/components/explorer/search-panel.tsx +2 -1
- package/src/web/components/git/git-status-panel.tsx +2 -1
- package/src/web/components/layout/add-project-form.tsx +2 -1
- package/src/web/components/layout/mobile-drawer.tsx +2 -1
- package/src/web/components/layout/mobile-nav.tsx +2 -1
- package/src/web/components/layout/panel-layout.tsx +3 -3
- package/src/web/components/layout/project-bar.tsx +7 -6
- package/src/web/components/layout/project-bottom-sheet.tsx +2 -1
- package/src/web/components/layout/sidebar.tsx +5 -4
- package/src/web/components/layout/status-bar.tsx +5 -4
- package/src/web/components/layout/tab-bar.tsx +3 -3
- package/src/web/components/layout/tab-content.tsx +2 -1
- package/src/web/components/postgres/postgres-viewer.tsx +7 -5
- package/src/web/components/settings/settings-tab.tsx +2 -1
- package/src/web/components/shared/markdown-code-block.tsx +10 -8
- package/src/web/components/terminal/terminal-tab.tsx +3 -3
- package/src/web/hooks/use-chat.ts +4 -1
- package/vite.config.ts +17 -0
- package/dist/web/assets/_basePickBy-Bj0dI1ei.js +0 -1
- package/dist/web/assets/_baseUniq-CyzdZeQH.js +0 -1
- package/dist/web/assets/ai-settings-section-Bo9lCaTd.js +0 -1
- package/dist/web/assets/api-client-BvxmRZUi.js +0 -1
- package/dist/web/assets/api-settings-CUxg9RE5.js +0 -1
- package/dist/web/assets/arc-CxgHJ7Z4.js +0 -1
- package/dist/web/assets/architecture-PBZL5I3N-DDFO_NKq.js +0 -1
- package/dist/web/assets/architectureDiagram-2XIMDMQ5-D16OotsC.js +0 -36
- package/dist/web/assets/array-BFDiaBgf.js +0 -1
- package/dist/web/assets/arrow-up-I9-21gkR.js +0 -1
- package/dist/web/assets/blockDiagram-WCTKOSBZ-Ct57Wtfk.js +0 -132
- package/dist/web/assets/c4Diagram-IC4MRINW-BIymcNsg.js +0 -10
- package/dist/web/assets/channel-wumTB1if.js +0 -1
- package/dist/web/assets/chat-tab-CC721_mQ.js +0 -10
- package/dist/web/assets/chevron-right-DY_wImxB.js +0 -1
- package/dist/web/assets/chunk-4BX2VUAB-CENmY7Kw.js +0 -1
- package/dist/web/assets/chunk-55IACEB6-DhZGI1l3.js +0 -1
- package/dist/web/assets/chunk-7E7YKBS2-DZcnC7Ow.js +0 -1
- package/dist/web/assets/chunk-7R4GIKGN-y8bfHEy-.js +0 -80
- package/dist/web/assets/chunk-C72U2L5F-BHPkfQj2.js +0 -1
- package/dist/web/assets/chunk-EGIJ26TM-nant2LXl.js +0 -1
- package/dist/web/assets/chunk-FMBD7UC4-Bog4cpN-.js +0 -15
- package/dist/web/assets/chunk-GEFDOKGD-86LFbsAC.js +0 -2
- package/dist/web/assets/chunk-GLR3WWYH-Re-5eSlQ.js +0 -2
- package/dist/web/assets/chunk-HHEYEP7N-C45i5G_3.js +0 -1
- package/dist/web/assets/chunk-JSJVCQXG-23eG9mgt.js +0 -1
- package/dist/web/assets/chunk-KX2RTZJC-CHj8TnTB.js +0 -1
- package/dist/web/assets/chunk-KYZI473N-gqRLpJ4w.js +0 -53
- package/dist/web/assets/chunk-L3YUKLVL-DnSMmNFC.js +0 -1
- package/dist/web/assets/chunk-MX3YWQON-B6g1ZH9X.js +0 -1
- package/dist/web/assets/chunk-NQ4KR5QH-DX32345Y.js +0 -220
- package/dist/web/assets/chunk-O4XLMI2P-Vp_V4P-b.js +0 -7
- package/dist/web/assets/chunk-OZEHJAEY-lKq2SWjA.js +0 -1
- package/dist/web/assets/chunk-PQ6SQG4A-Bik13fTV.js +0 -1
- package/dist/web/assets/chunk-PU5JKC2W-DD95Rx35.js +0 -70
- package/dist/web/assets/chunk-QZHKN3VN-N3VXx1VH.js +0 -1
- package/dist/web/assets/chunk-R5LLSJPH-dRhXRnrb.js +0 -1
- package/dist/web/assets/chunk-WL4C6EOR-B1iIvLOG.js +0 -189
- package/dist/web/assets/chunk-XIRO2GV7-DZBoNl1_.js +0 -1
- package/dist/web/assets/chunk-XPW4576I-CgLyyW03.js +0 -32
- package/dist/web/assets/chunk-XZSTWKYB-DjV8xl5A.js +0 -94
- package/dist/web/assets/chunk-YBOYWFTD-D_ILLe6_.js +0 -1
- package/dist/web/assets/classDiagram-VBA2DB6C-mr-Cb1me.js +0 -1
- package/dist/web/assets/classDiagram-v2-RAHNMMFH-BKe8_uda.js +0 -1
- package/dist/web/assets/clone--z5KLAuR.js +0 -1
- package/dist/web/assets/code-editor-BZ0xwZ4Z.js +0 -8
- package/dist/web/assets/columns-2-IeETSfON.js +0 -1
- package/dist/web/assets/conflict-editor-Bwls2-yk.js +0 -19
- package/dist/web/assets/cose-bilkent-S5V4N54A-BGNPFv3x.js +0 -1
- package/dist/web/assets/cytoscape.esm-C8i2jUzT.js +0 -321
- package/dist/web/assets/dagre-CkhlMHnx.js +0 -1
- package/dist/web/assets/dagre-KLK3FWXG-Cnp996VG.js +0 -4
- package/dist/web/assets/database-CgTomMxt.js +0 -1
- package/dist/web/assets/database-viewer-DiXWqOJH.js +0 -2
- package/dist/web/assets/defaultLocale-ZeknFqNe.js +0 -1
- package/dist/web/assets/diagram-E7M64L7V-BZF0tSOr.js +0 -24
- package/dist/web/assets/diagram-IFDJBPK2-nUcO8sN8.js +0 -43
- package/dist/web/assets/diagram-P4PSJMXO-CW0eCkwC.js +0 -24
- package/dist/web/assets/diff-viewer-CC-RmeV5.js +0 -4
- package/dist/web/assets/dist-CM0oD8tQ.js +0 -1
- package/dist/web/assets/dist-DZmJeHOA.js +0 -1
- package/dist/web/assets/erDiagram-INFDFZHY-DSkriYZ9.js +0 -70
- package/dist/web/assets/flowDiagram-PKNHOUZH-CFYAfZBx.js +0 -162
- package/dist/web/assets/ganttDiagram-A5KZAMGK-KSn4XAU4.js +0 -292
- package/dist/web/assets/gitGraph-HDMCJU4V-OkvBPi6H.js +0 -1
- package/dist/web/assets/gitGraphDiagram-K3NZZRJ6-BMgjjVys.js +0 -65
- package/dist/web/assets/graphlib-BWe1iK_s.js +0 -1
- package/dist/web/assets/index-BcIyrJiY.js +0 -26
- package/dist/web/assets/index-Chf0otez.css +0 -2
- package/dist/web/assets/info-3K5VOQVL-BDU2_bYD.js +0 -1
- package/dist/web/assets/infoDiagram-LFFYTUFH-Diq4Cyc3.js +0 -2
- package/dist/web/assets/init-0VJVrkRJ.js +0 -1
- package/dist/web/assets/input-BHj0veau.js +0 -45
- package/dist/web/assets/isArrayLikeObject-ClzWCpcm.js +0 -1
- package/dist/web/assets/isEmpty-BfLnxq-B.js +0 -1
- package/dist/web/assets/ishikawaDiagram-PHBUUO56-CiVEvp8o.js +0 -70
- package/dist/web/assets/journeyDiagram-4ABVD52K-CG_v5Aho.js +0 -139
- package/dist/web/assets/jsx-runtime-BRW_vwa9.js +0 -1
- package/dist/web/assets/kanban-definition-K7BYSVSG-miB0-_Zq.js +0 -89
- package/dist/web/assets/keybindings-store-BIufrOzJ.js +0 -1
- package/dist/web/assets/line-CSuSrJ9J.js +0 -1
- package/dist/web/assets/linear-DFN_MPsw.js +0 -1
- package/dist/web/assets/markdown-renderer-C5UPA1-7.js +0 -306
- package/dist/web/assets/math-CRc16Nj6.js +0 -1
- package/dist/web/assets/mermaid-parser.core-CFdP1Z5_.js +0 -4
- package/dist/web/assets/mindmap-definition-YRQLILUH-pYPWwASE.js +0 -68
- package/dist/web/assets/ordinal-DpFn432U.js +0 -1
- package/dist/web/assets/packet-RMMSAZCW-BwpIpYB3.js +0 -1
- package/dist/web/assets/path-INs8XTPH.js +0 -1
- package/dist/web/assets/pie-UPGHQEXC-BPgAfmes.js +0 -1
- package/dist/web/assets/pieDiagram-SKSYHLDU-Dovdlvhu.js +0 -30
- package/dist/web/assets/plus-DQGIb4mQ.js +0 -1
- package/dist/web/assets/port-forwarding-tab-DmifthYH.js +0 -1
- package/dist/web/assets/postgres-viewer-Bo7jEQfQ.js +0 -13
- package/dist/web/assets/preload-helper-mr3rCizq.js +0 -1
- package/dist/web/assets/quadrantDiagram-337W2JSQ-TXe6cU_F.js +0 -7
- package/dist/web/assets/radar-KQ55EAFF-TqxBkWx-.js +0 -1
- package/dist/web/assets/react-0tkk-ztn.js +0 -1
- package/dist/web/assets/react-dom-Bpkvzu3U.js +0 -1
- package/dist/web/assets/react-nm2Ru1Pt.js +0 -1
- package/dist/web/assets/refresh-cw-Clk8fdUD.js +0 -1
- package/dist/web/assets/requirementDiagram-Z7DCOOCP-CuiiuGS9.js +0 -73
- package/dist/web/assets/rough.esm-eLccZ4OJ.js +0 -1
- package/dist/web/assets/sankeyDiagram-WA2Y5GQK-BbRmhv0t.js +0 -10
- package/dist/web/assets/scroll-area-BpXCNme3.js +0 -1
- package/dist/web/assets/sequenceDiagram-2WXFIKYE-B2D8IQDb.js +0 -145
- package/dist/web/assets/settings-tab-D9GicyA9.js +0 -1
- package/dist/web/assets/sqlite-viewer-pacZlViY.js +0 -1
- package/dist/web/assets/square-vBdqj0bF.js +0 -1
- package/dist/web/assets/src-CqyWLlNZ.js +0 -1
- package/dist/web/assets/stateDiagram-RAJIS63D-ylr4HxPu.js +0 -1
- package/dist/web/assets/stateDiagram-v2-FVOUBMTO-D6zvxf3M.js +0 -1
- package/dist/web/assets/table-Bi27fEaN.js +0 -1
- package/dist/web/assets/terminal-tab-DpzE3yoD.js +0 -36
- package/dist/web/assets/text-wrap-D_OmSzhp.js +0 -1
- package/dist/web/assets/timeline-definition-YZTLITO2-pMv1grvM.js +0 -61
- package/dist/web/assets/trash-2-CNuB-htI.js +0 -1
- package/dist/web/assets/treemap-KZPCXAKY-Kck06FKU.js +0 -1
- package/dist/web/assets/vennDiagram-LZ73GAT5-C-rkIUbo.js +0 -34
- package/dist/web/assets/x-Dw3TjeY_.js +0 -1
- package/dist/web/assets/xychartDiagram-JWTSCODW-CtpjAakO.js +0 -7
- /package/dist/web/assets/{csv-parser-i7fjqP2H.js → csv-parser--2WJNgS7.js} +0 -0
- /package/dist/web/assets/{katex-DR0kdMDv.js → katex-CKoArbIw.js} +0 -0
- /package/dist/web/assets/{chunk-CFjPhJqf.js → rolldown-runtime-FhOqtrmT.js} +0 -0
- /package/dist/web/assets/{sql-completion-provider-B8uUWWej.js → sql-completion-provider-C3cq9j99.js} +0 -0
- /package/dist/web/assets/{utils-DX8jb5qv.js → utils-ChWX7pZv.js} +0 -0
- /package/dist/web/assets/{terminal-tab-BrP-ENHg.css → vendor-xterm-BrP-ENHg.css} +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import{i as e,l as t,n}from"./chunk-GEFDOKGD-86LFbsAC.js";import{g as r,h as i,p as a}from"./src-CqyWLlNZ.js";import{L as o,R as s,b as c,h as l,j as u,k as d,w as f,y as p}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{n as m,r as h}from"./chunk-PU5JKC2W-DD95Rx35.js";import{n as g,t as _}from"./chunk-YBOYWFTD-D_ILLe6_.js";import{a as v,i as y,r as b,t as x}from"./chunk-PQ6SQG4A-Bik13fTV.js";import{t as S}from"./rough.esm-eLccZ4OJ.js";var C=i(async(n,r,i)=>{let s,u=r.useHtmlLabels||l(c()?.htmlLabels);s=i||`node default`;let d=n.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),f=d.insert(`g`).attr(`class`,`label`).attr(`style`,t(r.labelStyle)),p;p=r.label===void 0?``:typeof r.label==`string`?r.label:r.label[0];let h=!!r.icon||!!r.img,g=r.labelType===`markdown`,v=await m(f,o(e(p),c()),{useHtmlLabels:u,width:r.width||c().flowchart?.wrappingWidth,cssClasses:g?`markdown-node-label`:void 0,style:r.labelStyle,addSvgBackground:h,markdown:g},c()),y=v.getBBox(),b=(r?.padding??0)/2;if(u){let e=v.children[0],t=a(v);await _(e,p),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return u?f.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):f.attr(`transform`,`translate(0, `+-y.height/2+`)`),r.centerLabel&&f.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),f.insert(`rect`,`:first-child`),{shapeSvg:d,bbox:y,halfPadding:b,label:f}},`labelHelper`),w=i(async(t,n,r)=>{let i=r.useHtmlLabels??f(c()),s=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),l=await m(s,o(e(n),c()),{useHtmlLabels:i,width:r.width||c()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),u=l.getBBox(),d=r.padding/2;if(f(c())){let e=l.children[0],t=a(l);u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}return i?s.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`):s.attr(`transform`,`translate(0, `+-u.height/2+`)`),r.centerLabel&&s.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:u,halfPadding:d,label:s}},`insertLabel`),T=i((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=i((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}i(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}i(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(k,`generateCirclePoints`);var A=i((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),j=i(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=c(),s=f(o);return await m(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),M=i((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),N=i(async(e,t)=>{r.info(`Creating subgraph rect for `,t.id,t);let n=c(),{themeVariables:i,handDrawnSeed:o}=n,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:u,nodeStyles:d,borderStyles:p,backgroundStyles:h}=y(t),_=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.id).attr(`data-look`,t.look),b=f(n),x=_.insert(`g`).attr(`class`,`cluster-label `),C;C=t.labelType===`markdown`?await m(x,t.label,{style:t.labelStyle,useHtmlLabels:b,isNode:!0,width:t.width}):await j(x,t.label,t.labelStyle||``,!1,!0);let w=C.getBBox();if(f(n)){let e=C.children[0],t=a(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=t.width<=w.width+t.padding?w.width+t.padding:t.width;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;r.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=S.svg(_),n=v(t,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),i=e.path(M(D,O,T,E,0),n);k=_.insert(()=>(r.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,d).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:N}=g(n);if(x.attr(`transform`,`translate(${t.x-w.width/2}, ${t.y-t.height/2+N})`),u){let e=x.select(`span`);e&&e.attr(`style`,u)}let P=k.node().getBBox();return t.offsetX=0,t.width=P.width,t.height=P.height,t.offsetY=w.height-t.padding/2,t.intersect=function(e){return A(t,e)},{cluster:_,labelBBox:w}},`rect`),P={rect:N,squareRect:N,roundedWithTitle:i(async(e,t)=>{let n=c(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:o,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=r,d=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.id).attr(`data-id`,t.id).attr(`data-look`,t.look),p=d.insert(`g`,`:first-child`),m=d.insert(`g`).attr(`class`,`cluster-label`),h=d.append(`rect`),g=await j(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(f(n)){let e=g.children[0],t=a(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,C=t.height+v-_.height-6,w=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=S.svg(d),r=t.rx||t.ry?n.path(M(w,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:u,seed:i}):n.rectangle(w,T,b,x,{seed:i});D=d.insert(()=>r,`:first-child`);let a=n.rectangle(w,E,b,C,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:u,seed:i});D=d.insert(()=>r,`:first-child`),h=d.insert(()=>a)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(f(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return A(t,e)},{cluster:d,labelBBox:_}},`roundedWithTitle`),noteGroup:i((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.id),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return A(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:i((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=c(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.id).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=S.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else p=o.insert(`rect`,`:first-child`),p.attr(`class`,`divider`).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look);return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return A(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:i(async(e,t)=>{r.info(`Creating subgraph rect for `,t.id,t);let n=c(),{themeVariables:i,handDrawnSeed:o}=n,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:u,nodeStyles:d,borderStyles:p,backgroundStyles:h}=y(t),_=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.id).attr(`data-look`,t.look),b=f(n),x=_.insert(`g`).attr(`class`,`cluster-label `),C=await m(x,t.label,{style:t.labelStyle,useHtmlLabels:b,isNode:!0,width:t.width}),w=C.getBBox();if(f(n)){let e=C.children[0],t=a(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=t.width<=w.width+t.padding?w.width+t.padding:t.width;t.width<=w.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let E=t.height,D=t.x-T/2,O=t.y-E/2;r.trace(`Data `,t,JSON.stringify(t));let k;if(t.look===`handDrawn`){let e=S.svg(_),n=v(t,{roughness:.7,fill:s,stroke:l,fillWeight:4,seed:o}),i=e.path(M(D,O,T,E,t.rx),n);k=_.insert(()=>(r.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,d).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:j}=g(n);if(x.attr(`transform`,`translate(${t.x-w.width/2}, ${t.y-t.height/2+j})`),u){let e=x.select(`span`);e&&e.attr(`style`,u)}let N=k.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=w.height-t.padding/2,t.intersect=function(e){return A(t,e)},{cluster:_,labelBBox:w}},`kanbanSection`)},F=new Map,I=i(async(e,t)=>{let n=await P[t.shape||`rect`](e,t);return F.set(t.id,n),n},`insertCluster`),L=i(()=>{F=new Map},`clear`);function R(e,t){return e.intersect(t)}i(R,`intersectNode`);var z=R;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}i(B,`intersectEllipse`);var V=B;function ee(e,t,n){return V(e,t,t,n)}i(ee,`intersectCircle`);var te=ee;function ne(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&H(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&H(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}i(ne,`intersectLine`);function H(e,t){return e*t>0}i(H,`sameSign`);var U=ne;function re(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=U(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}i(re,`intersectPolygon`);var W={node:z,circle:te,ellipse:V,polygon:re,rect:A};function ie(e,n){let{labelStyles:i}=y(n);n.labelStyle=i;let a=E(n),o=a;a||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),{cssStyles:c}=n,l=S.svg(s),u=v(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,t(c)),T(n,f),n.intersect=function(e){return r.info(`Circle intersect`,n,1,e),W.circle(n,1,e)},s}i(ie,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}i(ae,`generateArcPoints`);async function oe(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+t.padding+20,s=a.height+t.padding,c=s/2,l=c/(2.5+s/50),{cssStyles:u}=t,d=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...ae(-o/2,-s/2,-o/2,s/2,l,c,!1),{x:o/2,y:s/2},...ae(o/2,s/2,o/2,-s/2,l,c,!0)],f=S.svg(i),p=v(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=D(d),h=f.path(m,p),g=i.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container`),u&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,u),r&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,r),g.attr(`transform`,`translate(${l/2}, 0)`),T(t,g),t.intersect=function(e){return W.polygon(t,d,e)},i}i(oe,`bowTieRect`);function G(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}i(G,`insertPolygonShape`);async function se(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.height+t.padding,s=a.width+t.padding+12,c=s,l=-o,u=[{x:12,y:l},{x:c,y:l},{x:c,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}],d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=D(u),a=e.path(r,n);d=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-s/2}, ${o/2})`),f&&d.attr(`style`,f)}else d=G(i,s,o,u);return r&&d.attr(`style`,r),T(t,d),t.intersect=function(e){return W.polygon(t,u,e)},i}i(se,`card`);function ce(e,t){let{nodeStyles:n}=y(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=v(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return W.polygon(t,o,e)},r}i(ce,`choice`);async function le(e,n,i){let{labelStyles:a,nodeStyles:o}=y(n);n.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l}=await C(e,n,E(n)),u=i?.padding??l,d=c.width/2+u,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=S.svg(s),r=v(n,{}),i=e.circle(0,0,d*2,r);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,t(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return T(n,f),n.calcIntersect=function(e,t){let n=e.width/2;return W.circle(e,n,t)},n.intersect=function(e){return r.info(`Circle intersect`,n,d,e),W.circle(n,d,e)},s}i(le,`circle`);function ue(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
2
|
-
M ${i.x},${i.y} L ${o.x},${o.y}`}i(ue,`createLine`);function de(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.labelStyle=n,t.label=``;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=S.svg(a),l=v(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=ue(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(t,p),t.intersect=function(e){return r.info(`crossedCircle intersect`,t,{radius:o,point:e}),W.circle(t,o,e)},a}i(de,`crossedCircle`);function K(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(K,`generateCirclePoints`);async function fe(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:u}=t,d=[...K(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...K(s/2+l*2,-l,l,20,-180,-270),...K(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...K(s/2,c/2,l,20,0,90)],f=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...K(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...K(s/2+s*.1,-l,l,20,-180,-270),...K(s/2+s*.1,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...K(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2,y:c/2+l}],p=S.svg(i),m=v(t,{fill:`none`});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=D(d).replace(`Z`,``),g=p.path(h,m),_=D(f),b=p.path(_,{...m}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>g,`:first-child`),x.attr(`class`,`text`),u&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,u),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${l}, 0)`),o.attr(`transform`,`translate(${-s/2+l-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,x),t.intersect=function(e){return W.polygon(t,f,e)},i}i(fe,`curlyBraceLeft`);function q(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}i(q,`generateCirclePoints`);async function pe(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:u}=t,d=[...q(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...q(s/2+l*2,-l,l,20,-180,-270),...q(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...q(s/2,c/2,l,20,0,90)],f=[{x:-s/2,y:-c/2-l},{x:s/2,y:-c/2-l},...q(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...q(s/2+l*2,-l,l,20,-180,-270),...q(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...q(s/2,c/2,l,20,0,90),{x:s/2,y:c/2+l},{x:-s/2,y:c/2+l}],p=S.svg(i),m=v(t,{fill:`none`});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=D(d).replace(`Z`,``),g=p.path(h,m),_=D(f),b=p.path(_,{...m}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>g,`:first-child`),x.attr(`class`,`text`),u&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,u),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-l}, 0)`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,x),t.intersect=function(e){return W.polygon(t,f,e)},i}i(pe,`curlyBraceRight`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(J,`generateCirclePoints`);async function me(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:u}=t,d=[...J(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...J(s/2+l*2,-l,l,20,-180,-270),...J(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...J(s/2,c/2,l,20,0,90)],f=[...J(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...J(-s/2-l/2,-l,l,20,0,90),...J(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...J(-s/2+l+l/2,c/2,l,30,-180,-270)],p=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...J(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...J(s/2+l*2,-l,l,20,-180,-270),...J(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...J(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2-l-l/2,y:c/2+l},...J(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...J(-s/2-l/2,-l,l,20,0,90),...J(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...J(-s/2+l+l/2,c/2,l,30,-180,-270)],m=S.svg(i),h=v(t,{fill:`none`});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=D(d).replace(`Z`,``),_=m.path(g,h),b=D(f).replace(`Z`,``),x=m.path(b,h),w=D(p),O=m.path(w,{...h}),k=i.insert(`g`,`:first-child`);return k.insert(()=>O,`:first-child`).attr(`stroke-opacity`,0),k.insert(()=>_,`:first-child`),k.insert(()=>x,`:first-child`),k.attr(`class`,`text`),u&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,u),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),k.attr(`transform`,`translate(${l-l/4}, 0)`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,k),t.intersect=function(e){return W.polygon(t,p,e)},i}i(me,`curlyBraces`);async function he(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(80,(a.width+(t.padding??0)*2)*1.25,t?.width??0),s=Math.max(20,a.height+(t.padding??0)*2,t?.height??0),c=s/2,{cssStyles:l}=t,u=S.svg(i),d=v(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=o,p=s,m=f-c,h=p/4,g=[{x:m,y:0},{x:h,y:0},{x:0,y:p/2},{x:h,y:p},{x:m,y:p},...k(-m,-p/2,c,50,270,90)],_=D(g),b=u.path(_,d),x=i.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container`),l&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,l),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(t,x),t.intersect=function(e){return W.polygon(t,g,e)},i}i(he,`curvedTrapezoid`);var ge=i((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),_e=i((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),ve=i((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`);async function ye(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await C(e,n,E(n)),c=Math.max(o.width+n.padding,n.width??0),l=c/2,u=l/(2.5+c/50),d=Math.max(o.height+u+n.padding,n.height??0),f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=S.svg(a),t=_e(0,0,c,d,l,u),r=ve(0,u,c,d,l,u),i=e.path(t,v(n,{})),o=e.path(r,v(n,{fill:`none`}));f=a.insert(()=>o,`:first-child`),f=a.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`),p&&f.attr(`style`,p)}else{let e=ge(0,0,c,d,l,u);f=a.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,t(p)).attr(`style`,i)}return f.attr(`label-offset-y`,u),f.attr(`transform`,`translate(${-c/2}, ${-(d/2+u)})`),T(n,f),s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)+(n.padding??0)/1.5-(o.y-(o.top??0))})`),n.intersect=function(e){let t=W.rect(n,e),r=t.x-(n.x??0);if(l!=0&&(Math.abs(r)<(n.width??0)/2||Math.abs(r)==(n.width??0)/2&&Math.abs(t.y-(n.y??0))>(n.height??0)/2-u)){let i=u*u*(1-r*r/(l*l));i>0&&(i=Math.sqrt(i)),i=u-i,e.y-(n.y??0)>0&&(i=-i),t.y+=i}return t},a}i(ye,`cylinder`);async function be(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=a.width+t.padding,c=a.height+t.padding,l=c*.2,u=-s/2,d=-c/2-l/2,{cssStyles:f}=t,p=S.svg(i),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:u,y:d+l},{x:-u,y:d+l},{x:-u,y:-d},{x:u,y:-d},{x:u,y:d},{x:-u,y:d},{x:-u,y:d+l}],g=p.polygon(h.map(e=>[e.x,e.y]),m),_=i.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,r),o.attr(`transform`,`translate(${u+(t.padding??0)/2-(a.x-(a.left??0))}, ${d+l+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,_),t.intersect=function(e){return W.rect(t,e)},i}i(be,`dividedRectangle`);async function xe(e,n){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,n,E(n)),l=s.width/2+c+5,u=s.width/2+c,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=S.svg(o),r=v(n,{roughness:.2,strokeWidth:2.5}),i=v(n,{roughness:.2,strokeWidth:1.5}),a=e.circle(0,0,l*2,r),s=e.circle(0,0,u*2,i);d=o.insert(`g`,`:first-child`),d.attr(`class`,t(n.cssClasses)).attr(`style`,t(f)),d.node()?.appendChild(a),d.node()?.appendChild(s)}else{d=o.insert(`g`,`:first-child`);let e=d.insert(`circle`,`:first-child`),t=d.insert(`circle`);d.attr(`class`,`basic label-container`).attr(`style`,a),e.attr(`class`,`outer-circle`).attr(`style`,a).attr(`r`,l).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0)}return T(n,d),n.intersect=function(e){return r.info(`DoubleCircle intersect`,n,l,e),W.circle(n,l,e)},o}i(xe,`doublecircle`);function Se(e,t,{config:{themeVariables:n}}){let{labelStyles:i,nodeStyles:a}=y(t);t.label=``,t.labelStyle=i;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=S.svg(o),{nodeBorder:l}=n,u=v(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),T(t,f),t.intersect=function(e){return r.info(`filledCircle intersect`,t,{radius:7,point:e}),W.circle(t,7,e)},o}i(Se,`filledCircle`);async function Ce(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await C(e,t,E(t)),c=o.width+(t.padding??0),l=c+o.height,u=c+o.height,d=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=t,p=S.svg(a),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=D(d),g=p.path(h,m),_=a.insert(()=>g,`:first-child`).attr(`transform`,`translate(${-l/2}, ${l/2})`);return f&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,i),t.width=c,t.height=l,T(t,_),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-l/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(e){return r.info(`Triangle intersect`,t,d,e),W.polygon(t,d,e)},a}i(Ce,`flippedTriangle`);function we(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=y(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=S.svg(o),p=v(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),T(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return W.rect(t,e)},o}i(we,`forkJoin`);async function Te(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(80,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(50,o.height+(t.padding??0)*2,t?.height??0),l=c/2,{cssStyles:u}=t,d=S.svg(a),f=v(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=[{x:-s/2,y:-c/2},{x:s/2-l,y:-c/2},...k(-s/2+l,0,l,50,90,270),{x:s/2-l,y:c/2},{x:-s/2,y:c/2}],m=D(p),h=d.path(m,f),g=a.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container`),u&&t.look!==`handDrawn`&&g.selectChildren(`path`).attr(`style`,u),i&&t.look!==`handDrawn`&&g.selectChildren(`path`).attr(`style`,i),T(t,g),t.intersect=function(e){return r.info(`Pill intersect`,t,{radius:l,point:e}),W.polygon(t,p,e)},a}i(Te,`halfRoundedRectangle`);var Ee=i((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function De(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.height+t.padding,s=o/4,c=a.width+2*s+t.padding,l=[{x:s,y:0},{x:c-s,y:0},{x:c,y:-o/2},{x:c-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=Ee(0,0,c,o,s),a=e.path(r,n);u=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-c/2}, ${o/2})`),d&&u.attr(`style`,d)}else u=G(i,c,o,l);return r&&u.attr(`style`,r),t.width=c,t.height=o,T(t,u),t.intersect=function(e){return W.polygon(t,l,e)},i}i(De,`hexagon`);async function Oe(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.label=``,t.labelStyle=n;let{shapeSvg:a}=await C(e,t,E(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=S.svg(a),u=v(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=D(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(t,m),t.intersect=function(e){return r.info(`Pill intersect`,t,{points:d}),W.polygon(t,d,e)},a}i(Oe,`hourglass`);async function ke(e,t,{config:{themeVariables:n,flowchart:i}}){let{labelStyles:a}=y(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,t,`icon-shape default`),p=t.pos===`t`,m=c,g=c,{nodeBorder:_}=n,{stylesMap:b}=x(t),w=-g/2,E=-m/2,D=t.label?8:0,O=S.svg(u),k=v(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,g,m,k),j=Math.max(g,d.width),M=m+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+D/2:-d.height/2-D/2})`),T(t,F),t.intersect=function(e){if(r.info(`iconSquare intersect`,t,e),!t.label)return W.rect(t,e);let n=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=p?[{x:n-d.width/2,y:i-a/2},{x:n+d.width/2,y:i-a/2},{x:n+d.width/2,y:i-a/2+d.height+D},{x:n+g/2,y:i-a/2+d.height+D},{x:n+g/2,y:i+a/2},{x:n-g/2,y:i+a/2},{x:n-g/2,y:i-a/2+d.height+D},{x:n-d.width/2,y:i-a/2+d.height+D}]:[{x:n-g/2,y:i-a/2},{x:n+g/2,y:i-a/2},{x:n+g/2,y:i-a/2+m},{x:n+d.width/2,y:i-a/2+m},{x:n+d.width/2/2,y:i+a/2},{x:n-d.width/2,y:i+a/2},{x:n-d.width/2,y:i-a/2+m},{x:n-g/2,y:i-a/2+m}],W.polygon(t,o,e)},u}i(ke,`icon`);async function Ae(e,t,{config:{themeVariables:n,flowchart:i}}){let{labelStyles:a}=y(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:g,mainBkg:_}=n,{stylesMap:b}=x(t),w=S.svg(u),E=v(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=b.get(`fill`)??_;let D=u.append(`g`);t.icon&&D.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,d.width),I=N+d.height+p,L=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),R=u.insert(()=>P,`:first-child`),z=u.insert(()=>L);return D.attr(`transform`,`translate(${-k/2-j},${m?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),D.attr(`style`,`color: ${b.get(`stroke`)??g};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),R.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),T(t,z),t.intersect=function(e){return r.info(`iconSquare intersect`,t,e),W.rect(t,e)},u}i(Ae,`iconCircle`);async function je(e,t,{config:{themeVariables:n,flowchart:i}}){let{labelStyles:a}=y(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,t,`icon-shape default`),m=t.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=n,{stylesMap:E}=x(t),D=-_/2,O=-g/2,k=t.label?8:0,A=S.svg(u),j=v(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let N=A.path(M(D,O,_,g,5),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>N,`:first-child`).attr(`class`,`icon-shape2`),R=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),T(t,R),t.intersect=function(e){if(r.info(`iconSquare intersect`,t,e),!t.label)return W.rect(t,e);let n=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:i-a/2},{x:n+d.width/2,y:i-a/2},{x:n+d.width/2,y:i-a/2+d.height+k},{x:n+_/2,y:i-a/2+d.height+k},{x:n+_/2,y:i+a/2},{x:n-_/2,y:i+a/2},{x:n-_/2,y:i-a/2+d.height+k},{x:n-d.width/2,y:i-a/2+d.height+k}]:[{x:n-_/2,y:i-a/2},{x:n+_/2,y:i-a/2},{x:n+_/2,y:i-a/2+g},{x:n+d.width/2,y:i-a/2+g},{x:n+d.width/2/2,y:i+a/2},{x:n-d.width/2,y:i+a/2},{x:n-d.width/2,y:i-a/2+g},{x:n-_/2,y:i-a/2+g}],W.polygon(t,o,e)},u}i(je,`iconRounded`);async function Me(e,t,{config:{themeVariables:n,flowchart:i}}){let{labelStyles:a}=y(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,t,`icon-shape default`),m=t.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=n,{stylesMap:E}=x(t),D=-_/2,O=-g/2,k=t.label?8:0,A=S.svg(u),j=v(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let N=A.path(M(D,O,_,g,.1),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>N,`:first-child`),R=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),T(t,R),t.intersect=function(e){if(r.info(`iconSquare intersect`,t,e),!t.label)return W.rect(t,e);let n=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:i-a/2},{x:n+d.width/2,y:i-a/2},{x:n+d.width/2,y:i-a/2+d.height+k},{x:n+_/2,y:i-a/2+d.height+k},{x:n+_/2,y:i+a/2},{x:n-_/2,y:i+a/2},{x:n-_/2,y:i-a/2+d.height+k},{x:n-d.width/2,y:i-a/2+d.height+k}]:[{x:n-_/2,y:i-a/2},{x:n+_/2,y:i-a/2},{x:n+_/2,y:i-a/2+g},{x:n+d.width/2,y:i-a/2+g},{x:n+d.width/2/2,y:i+a/2},{x:n-d.width/2,y:i+a/2},{x:n-d.width/2,y:i-a/2+g},{x:n-_/2,y:i-a/2+g}],W.polygon(t,o,e)},u}i(Me,`iconSquare`);async function Ne(e,t,{config:{flowchart:n}}){let i=new Image;i.src=t?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=a/o;let{labelStyles:s}=y(t);t.labelStyle=s;let c=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??a),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await C(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,b=t.label?8:0,x=S.svg(f),w=v(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=x.rectangle(g,_,u,d,w),D=Math.max(u,p.width),O=d+p.height+b,k=x.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=f.insert(()=>E,`:first-child`),j=f.insert(()=>k);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),A.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),T(t,j),t.intersect=function(e){if(r.info(`iconSquare intersect`,t,e),!t.label)return W.rect(t,e);let n=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=h?[{x:n-p.width/2,y:i-a/2},{x:n+p.width/2,y:i-a/2},{x:n+p.width/2,y:i-a/2+p.height+b},{x:n+u/2,y:i-a/2+p.height+b},{x:n+u/2,y:i+a/2},{x:n-u/2,y:i+a/2},{x:n-u/2,y:i-a/2+p.height+b},{x:n-p.width/2,y:i-a/2+p.height+b}]:[{x:n-u/2,y:i-a/2},{x:n+u/2,y:i-a/2},{x:n+u/2,y:i-a/2+d},{x:n+p.width/2,y:i-a/2+d},{x:n+p.width/2/2,y:i+a/2},{x:n-p.width/2,y:i+a/2},{x:n-p.width/2,y:i-a/2+d},{x:n-u/2,y:i-a/2+d}],W.polygon(t,o,e)},f}i(Ne,`imageSquare`);async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=D(c),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2}, ${s/2})`),u&&l.attr(`style`,u)}else l=G(i,o,s,c);return r&&l.attr(`style`,r),t.width=o,t.height=s,T(t,l),t.intersect=function(e){return W.polygon(t,c,e)},i}i(Pe,`inv_trapezoid`);async function Y(e,n,r){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s}=await C(e,n,E(n)),c=Math.max(s.width+r.labelPaddingX*2,n?.width||0),l=Math.max(s.height+r.labelPaddingY*2,n?.height||0),u=-c/2,d=-l/2,f,{rx:p,ry:m}=n,{cssStyles:h}=n;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),n.look===`handDrawn`){let e=S.svg(o),r=v(n,{}),i=p||m?e.path(M(u,d,c,l,p||0),r):e.rectangle(u,d,c,l,r);f=o.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,t(h))}else f=o.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,a).attr(`rx`,t(p)).attr(`ry`,t(m)).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l);return T(n,f),n.calcIntersect=function(e,t){return W.rect(e,t)},n.intersect=function(e){return W.rect(n,e)},o}i(Y,`drawRect`);async function Fe(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return W.rect(t,e)},n}i(Fe,`labelRect`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),c=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=D(c),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2}, ${s/2})`),u&&l.attr(`style`,u)}else l=G(i,o,s,c);return r&&l.attr(`style`,r),t.width=o,t.height=s,T(t,l),t.intersect=function(e){return W.polygon(t,c,e)},i}i(Ie,`lean_left`);async function Le(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),c=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=D(c),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2}, ${s/2})`),u&&l.attr(`style`,u)}else l=G(i,o,s,c);return r&&l.attr(`style`,r),t.width=o,t.height=s,T(t,l),t.intersect=function(e){return W.polygon(t,c,e)},i}i(Le,`lean_right`);function Re(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.label=``,t.labelStyle=n;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=S.svg(a),d=v(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=D(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return o&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),T(t,m),t.intersect=function(e){return r.info(`lightningBolt intersect`,t,e),W.polygon(t,l,e)},a}i(Re,`lightningBolt`);var ze=i((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Be=i((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ve=i((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`);async function He(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await C(e,n,E(n)),c=Math.max(o.width+(n.padding??0),n.width??0),l=c/2,u=l/(2.5+c/50),d=Math.max(o.height+u+(n.padding??0),n.height??0),f=d*.1,p,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=S.svg(a),t=Be(0,0,c,d,l,u,f),r=Ve(0,u,c,d,l,u),i=v(n,{}),o=e.path(t,i),s=e.path(r,i);a.insert(()=>s,`:first-child`).attr(`class`,`line`),p=a.insert(()=>o,`:first-child`),p.attr(`class`,`basic label-container`),m&&p.attr(`style`,m)}else{let e=ze(0,0,c,d,l,u,f);p=a.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,t(m)).attr(`style`,i)}return p.attr(`label-offset-y`,u),p.attr(`transform`,`translate(${-c/2}, ${-(d/2+u)})`),T(n,p),s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)+u-(o.y-(o.top??0))})`),n.intersect=function(e){let t=W.rect(n,e),r=t.x-(n.x??0);if(l!=0&&(Math.abs(r)<(n.width??0)/2||Math.abs(r)==(n.width??0)/2&&Math.abs(t.y-(n.y??0))>(n.height??0)/2-u)){let i=u*u*(1-r*r/(l*l));i>0&&(i=Math.sqrt(i)),i=u-i,e.y-(n.y??0)>0&&(i=-i),t.y+=i}return t},a}i(He,`linedCylinder`);async function Ue(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/4,u=c+l,{cssStyles:d}=t,f=S.svg(i),p=v(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-s/2-s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:u/2},...O(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,l,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2},{x:-s/2,y:-u/2},{x:-s/2,y:u/2*1.1},{x:-s/2,y:-u/2}],h=f.polygon(m.map(e=>[e.x,e.y]),p),g=i.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container`),d&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,r),g.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,g),t.intersect=function(e){return W.polygon(t,m,e)},i}i(Ue,`linedWaveEdgedRect`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,u=-c/2,{cssStyles:d}=t,f=S.svg(i),p=v(t,{}),m=[{x:l-5,y:u+5},{x:l-5,y:u+c+5},{x:l+s-5,y:u+c+5},{x:l+s-5,y:u+c},{x:l+s,y:u+c},{x:l+s,y:u+c-5},{x:l+s+5,y:u+c-5},{x:l+s+5,y:u-5},{x:l+5,y:u-5},{x:l+5,y:u},{x:l,y:u},{x:l,y:u+5}],h=[{x:l,y:u+5},{x:l+s-5,y:u+5},{x:l+s-5,y:u+c},{x:l+s,y:u+c},{x:l+s,y:u},{x:l,y:u}];t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let g=D(m),_=f.path(g,p),b=D(h),x=f.path(b,{...p,fill:`none`}),w=i.insert(()=>x,`:first-child`);return w.insert(()=>_,`:first-child`),w.attr(`class`,`basic label-container`),d&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),o.attr(`transform`,`translate(${-(a.width/2)-5-(a.x-(a.left??0))}, ${-(a.height/2)+5-(a.y-(a.top??0))})`),T(t,w),t.intersect=function(e){return W.polygon(t,m,e)},i}i(We,`multiRect`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/4,u=c+l,d=-s/2,f=-u/2,{cssStyles:p}=t,m=O(d-5,f+u+5,d+s-5,f+u+5,l,.8),h=m?.[m.length-1],g=[{x:d-5,y:f+5},{x:d-5,y:f+u+5},...m,{x:d+s-5,y:h.y-5},{x:d+s,y:h.y-5},{x:d+s,y:h.y-10},{x:d+s+5,y:h.y-10},{x:d+s+5,y:f-5},{x:d+5,y:f-5},{x:d+5,y:f},{x:d,y:f},{x:d,y:f+5}],_=[{x:d,y:f+5},{x:d+s-5,y:f+5},{x:d+s-5,y:h.y-5},{x:d+s,y:h.y-5},{x:d+s,y:f},{x:d,y:f}],b=S.svg(i),x=v(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let w=D(g),k=b.path(w,x),A=D(_),j=b.path(A,x),M=i.insert(()=>k,`:first-child`);return M.insert(()=>j),M.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-(a.width/2)-5-(a.x-(a.left??0))}, ${-(a.height/2)+5-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return W.polygon(t,g,e)},i}i(Ge,`multiWaveEdgedRectangle`);async function Ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r,t.useHtmlLabels||f(p())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await C(e,t,E(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:m}=t,h=S.svg(a),g=v(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(u,d,c,l,g),b=a.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),T(t,b),t.intersect=function(e){return W.rect(t,e)},a}i(Ke,`note`);var qe=i((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function Je(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+t.padding+(a.height+t.padding),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=qe(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=G(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=W.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}i(Je,`question`);async function Ye(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),c=Math.max(a.height+(t.padding??0),t?.height??0),l=-s/2,u=-c/2,d=u/2,f=[{x:l+d,y:u},{x:l,y:0},{x:l+d,y:-u},{x:-l,y:-u},{x:-l,y:u}],{cssStyles:p}=t,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=D(f),_=m.path(g,h),b=i.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),b.attr(`transform`,`translate(${-d/2},0)`),o.attr(`transform`,`translate(${-d/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),T(t,b),t.intersect=function(e){return W.polygon(t,f,e)},i}i(Ye,`rect_left_inv_arrow`);async function Xe(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.labelStyle=n;let o;o=t.cssClasses?`node `+t.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),l=s.insert(`g`),u=s.insert(`g`).attr(`class`,`label`).attr(`style`,i),d=t.description,p=t.label,m=await j(u,p,t.labelStyle,!0,!0),h={width:0,height:0};if(f(c())){let e=m.children[0],t=a(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}r.info(`Text 2`,d);let g=d||[],_=m.getBBox(),b=await j(u,Array.isArray(g)?g.join(`<br/>`):g,t.labelStyle,!0,!0),x=b.children[0],C=a(b);h=x.getBoundingClientRect(),C.attr(`width`,h.width),C.attr(`height`,h.height);let w=(t.padding||0)/2;a(b).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),a(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=u.node().getBBox(),u.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let E=h.width+(t.padding||0),D=h.height+(t.padding||0),O=-h.width/2-w,k=-h.height/2-w,A,N;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),i=e.path(M(O,k,E,D,t.rx||0),n),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,n);N=s.insert(()=>(r.debug(`Rough node insert CXC`,i),a),`:first-child`),A=s.insert(()=>(r.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=l.insert(`rect`,`:first-child`),N=l.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,i).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(t.padding||0)).attr(`height`,h.height+(t.padding||0)),N.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return T(t,A),t.intersect=function(e){return W.rect(t,e)},s}i(Xe,`rectWithTitle`);async function Ze(e,t){return Y(e,t,{rx:5,ry:5,classes:``,labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1})}i(Ze,`roundedRect`);async function Qe(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await C(e,n,E(n)),c=n?.padding??0,l=Math.max(o.width+(n.padding??0)*2,n?.width??0),u=Math.max(o.height+(n.padding??0)*2,n?.height??0),d=-o.width/2-c,f=-o.height/2-c,{cssStyles:p}=n,m=S.svg(a),h=v(n,{});n.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:d,y:f},{x:d+l+8,y:f},{x:d+l+8,y:f+u},{x:d-8,y:f+u},{x:d-8,y:f},{x:d,y:f},{x:d,y:f+u}],_=m.polygon(g.map(e=>[e.x,e.y]),h),b=a.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container`).attr(`style`,t(p)),i&&n.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),p&&n.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-l/2+4+(n.padding??0)-(o.x-(o.left??0))},${-u/2+(n.padding??0)-(o.y-(o.top??0))})`),T(n,b),n.intersect=function(e){return W.rect(n,e)},a}i(Qe,`shadedProcess`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,u=-c/2,{cssStyles:d}=t,f=S.svg(i),p=v(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:l,y:u},{x:l,y:u+c},{x:l+s,y:u+c},{x:l+s,y:u-c/2}],h=D(m),g=f.path(h,p),_=i.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),_.attr(`transform`,`translate(0, ${c/4})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-c/4+(t.padding??0)-(a.y-(a.top??0))})`),T(t,_),t.intersect=function(e){return W.polygon(t,m,e)},i}i($e,`slopedRect`);async function et(e,t){return Y(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1})}i(et,`squareRect`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.height+t.padding,s=a.width+o/4+t.padding,c=o/2,{cssStyles:l}=t,u=S.svg(i),d=v(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=[{x:-s/2+c,y:-o/2},{x:s/2-c,y:-o/2},...k(-s/2+c,0,c,50,90,270),{x:s/2-c,y:o/2},...k(s/2-c,0,c,50,270,450)],p=D(f),m=u.path(p,d),h=i.insert(()=>m,`:first-child`);return h.attr(`class`,`basic label-container outer-path`),l&&t.look!==`handDrawn`&&h.selectChildren(`path`).attr(`style`,l),r&&t.look!==`handDrawn`&&h.selectChildren(`path`).attr(`style`,r),T(t,h),t.intersect=function(e){return W.polygon(t,f,e)},i}i(tt,`stadium`);async function nt(e,t){return Y(e,t,{rx:5,ry:5,classes:`flowchart-node`})}i(nt,`state`);function rt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c}=n,l=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),u=S.svg(l),d=v(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=u.circle(0,0,14,{...d,stroke:o,strokeWidth:2}),p=s??c,m=u.circle(0,0,5,{...d,fill:p,stroke:p,strokeWidth:2,fillStyle:`solid`}),h=l.insert(()=>f,`:first-child`);return h.insert(()=>m),a&&h.selectAll(`path`).attr(`style`,a),i&&h.selectAll(`path`).attr(`style`,i),T(t,h),t.intersect=function(e){return W.circle(t,7,e)},l}i(rt,`stateEnd`);function it(e,t,{config:{themeVariables:n}}){let{lineColor:r}=n,i=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),a;if(t.look===`handDrawn`){let e=S.svg(i).circle(0,0,14,b(r));a=i.insert(()=>e),a.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14)}else a=i.insert(`circle`,`:first-child`),a.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14);return T(t,a),t.intersect=function(e){return W.circle(t,7,e)},i}i(it,`stateStart`);async function at(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,n,E(n)),s=(n?.padding||0)/2,c=o.width+n.padding,l=o.height+n.padding,u=-o.width/2-s,d=-o.height/2-s,f=[{x:0,y:0},{x:c,y:0},{x:c,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(n.look===`handDrawn`){let e=S.svg(a),r=v(n,{}),i=e.rectangle(u-8,d,c+16,l,r),o=e.line(u,d,u,d+l,r),s=e.line(u+c,d,u+c,d+l,r);a.insert(()=>o,`:first-child`),a.insert(()=>s,`:first-child`);let f=a.insert(()=>i,`:first-child`),{cssStyles:p}=n;f.attr(`class`,`basic label-container`).attr(`style`,t(p)),T(n,f)}else{let e=G(a,c,l,f);i&&e.attr(`style`,i),T(n,e)}return n.intersect=function(e){return W.polygon(n,f,e)},a}i(at,`subroutine`);async function ot(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,l=-s/2,u=.2*s,d=.2*s,{cssStyles:f}=t,p=S.svg(i),m=v(t,{}),h=[{x:c-u/2,y:l},{x:c+o+u/2,y:l},{x:c+o+u/2,y:l+s},{x:c-u/2,y:l+s}],g=[{x:c+o-u/2,y:l+s},{x:c+o+u/2,y:l+s},{x:c+o+u/2,y:l+s-d}];t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let _=D(h),b=p.path(_,m),x=D(g),w=p.path(x,{...m,fillStyle:`solid`}),O=i.insert(()=>w,`:first-child`);return O.insert(()=>b,`:first-child`),O.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),T(t,O),t.intersect=function(e){return W.polygon(t,h,e)},i}i(ot,`taggedRect`);async function st(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/4,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...O(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:_+s-u,y:(b+c)*1.4},{x:_+s,y:b+c-d},{x:_+s,y:(b+c)*.9},...O(_+s,(b+c)*1.3,_+s-u,(b+c)*1.5,-c*.03,.5)],w=D(g),k=m.path(w,h),A=D(x),j=m.path(A,{...h,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return W.polygon(t,g,e)},i}i(st,`taggedWaveEdgedRectangle`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+t.padding,t?.width||0),s=Math.max(a.height+t.padding,t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return W.rect(t,e)},i}i(ct,`text`);var lt=i((e,t,n,r,i,a)=>`M${e},${t}
|
|
3
|
-
a${i},${a} 0,0,1 0,${-r}
|
|
4
|
-
l${n},0
|
|
5
|
-
a${i},${a} 0,0,1 0,${r}
|
|
6
|
-
M${n},${-r}
|
|
7
|
-
a${i},${a} 0,0,0 0,${r}
|
|
8
|
-
l${-n},0`,`createCylinderPathD`),ut=i((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),dt=i((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`);async function ft(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,label:s,halfPadding:c}=await C(e,n,E(n)),l=n.look===`neo`?c*2:c,u=o.height+l,d=u/2,f=d/(2.5+u/50),p=o.width+f+l,{cssStyles:m}=n,h;if(n.look===`handDrawn`){let e=S.svg(a),t=ut(0,0,p,u,f,d),r=dt(0,0,p,u,f,d),i=e.path(t,v(n,{})),o=e.path(r,v(n,{fill:`none`}));h=a.insert(()=>o,`:first-child`),h=a.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=lt(0,0,p,u,f,d);h=a.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,t(m)).attr(`style`,i),h.attr(`class`,`basic label-container`),m&&h.selectAll(`path`).attr(`style`,m),i&&h.selectAll(`path`).attr(`style`,i)}return h.attr(`label-offset-x`,f),h.attr(`transform`,`translate(${-p/2}, ${u/2} )`),s.attr(`transform`,`translate(${-(o.width/2)-f-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),T(n,h),n.intersect=function(e){let t=W.rect(n,e),r=t.y-(n.y??0);if(d!=0&&(Math.abs(r)<(n.height??0)/2||Math.abs(r)==(n.height??0)/2&&Math.abs(t.x-(n.x??0))>(n.width??0)/2-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(n.x??0)>0&&(i=-i),t.x+=i}return t},a}i(ft,`tiltedCylinder`);async function pt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+t.padding,s=a.height+t.padding,c=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=D(c),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2}, ${s/2})`),u&&l.attr(`style`,u)}else l=G(i,o,s,c);return r&&l.attr(`style`,r),t.width=o,t.height=s,T(t,l),t.intersect=function(e){return W.polygon(t,c,e)},i}i(pt,`trapezoid`);async function mt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(60,a.width+(t.padding??0)*2,t?.width??0),s=Math.max(20,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:c}=t,l=S.svg(i),u=v(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],f=D(d),p=l.path(f,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),T(t,m),t.intersect=function(e){return W.polygon(t,d,e)},i}i(mt,`trapezoidalPentagon`);async function ht(e,t){let{labelStyles:n,nodeStyles:i}=y(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await C(e,t,E(t)),l=t.useHtmlLabels||f(c()),u=o.width+(t.padding??0),d=u+o.height,p=u+o.height,m=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:h}=t,g=S.svg(a),_=v(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=D(m),x=g.path(b,_),w=a.insert(()=>x,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`);return h&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,h),i&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,i),t.width=u,t.height=d,T(t,w),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${d/2-(o.height+(t.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(e){return r.info(`Triangle intersect`,t,m,e),W.polygon(t,m,e)},a}i(ht,`triangle`);async function gt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=c+l,{cssStyles:d}=t,f=70-s,p=f>0?f/2:0,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-p,y:u/2},...O(-s/2-p,u/2,s/2+p,u/2,l,.8),{x:s/2+p,y:-u/2},{x:-s/2-p,y:-u/2}],_=D(g),b=m.path(_,h),x=i.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container`),d&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l-(a.y-(a.top??0))})`),T(t,x),t.intersect=function(e){return W.polygon(t,g,e)},i}i(gt,`waveEdgedRectangle`);async function _t(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=o/s,l=o,u=s;l>u*c?u=l/c:l=u*c,l=Math.max(l,100),u=Math.max(u,50);let d=Math.min(u*.2,u/4),f=u+d*2,{cssStyles:p}=t,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...O(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...O(l/2,-f/2,-l/2,-f/2,d,-1)],_=D(g),b=m.path(_,h),x=i.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),T(t,x),t.intersect=function(e){return W.polygon(t,g,e)},i}i(_t,`waveRectangle`);async function vt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,u=-c/2,{cssStyles:d}=t,f=S.svg(i),p=v(t,{}),m=[{x:l-5,y:u-5},{x:l-5,y:u+c},{x:l+s,y:u+c},{x:l+s,y:u-5}],h=`M${l-5},${u-5} L${l+s},${u-5} L${l+s},${u+c} L${l-5},${u+c} L${l-5},${u-5}
|
|
9
|
-
M${l-5},${u} L${l+s},${u}
|
|
10
|
-
M${l},${u-5} L${l},${u+c}`;t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let g=f.path(h,p),_=i.insert(()=>g,`:first-child`);return _.attr(`transform`,`translate(${5/2}, ${5/2})`),_.attr(`class`,`basic label-container`),d&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,r),o.attr(`transform`,`translate(${-(a.width/2)+5/2-(a.x-(a.left??0))}, ${-(a.height/2)+5/2-(a.y-(a.top??0))})`),T(t,_),t.intersect=function(e){return W.polygon(t,m,e)},i}i(vt,`windowPane`);async function yt(e,t){let r=t;if(r.alias&&(t.label=r.alias),t.look===`handDrawn`){let{themeVariables:n}=p(),{background:r}=n;await yt(e,{...t,id:t.id+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let i=p();t.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,s=i.er?.entityPadding??6,{cssStyles:c}=t,{labelStyles:u,nodeStyles:d}=y(t);if(r.attributes.length===0&&t.label){let r={rx:0,ry:0,labelPaddingX:o,labelPaddingY:o*1.5,classes:``};n(t.label,i)+r.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);let a=await Y(e,t,r);if(!l(i.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}i.htmlLabels||(o*=1.25,s*=1.25);let f=E(t);f||=`node default`;let m=e.insert(`g`).attr(`class`,f).attr(`id`,t.domId||t.id),h=await X(m,t.label??``,i,0,0,[`name`],u);h.height+=s;let g=0,_=[],b=[],x=0,C=0,w=0,D=0,O=!0,k=!0;for(let e of r.attributes){let t=await X(m,e.type,i,0,g,[`attribute-type`],u);x=Math.max(x,t.width+o);let n=await X(m,e.name,i,0,g,[`attribute-name`],u);C=Math.max(C,n.width+o);let r=await X(m,e.keys.join(),i,0,g,[`attribute-keys`],u);w=Math.max(w,r.width+o);let a=await X(m,e.comment,i,0,g,[`attribute-comment`],u);D=Math.max(D,a.width+o);let c=Math.max(t.height,n.height,r.height,a.height)+s;b.push({yOffset:g,rowHeight:c}),g+=c}let A=4;w<=o&&(O=!1,w=0,A--),D<=o&&(k=!1,D=0,A--);let j=m.node().getBBox();if(h.width+o*2-(x+C+w+D)>0){let e=h.width+o*2-(x+C+w+D);x+=e/A,C+=e/A,w>0&&(w+=e/A),D>0&&(D+=e/A)}let M=x+C+w+D,N=S.svg(m),P=v(t,{});t.look!==`handDrawn`&&(P.roughness=0,P.fillStyle=`solid`);let F=0;b.length>0&&(F=b.reduce((e,t)=>e+(t?.rowHeight??0),0));let I=Math.max(j.width+o*2,t?.width||0,M),L=Math.max((F??0)+h.height,t?.height||0),R=-I/2,z=-L/2;m.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=a(n[t]),i=r.attr(`transform`),c=0,l=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(c=parseFloat(e[1]),l=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?c+=x:r.attr(`class`).includes(`attribute-keys`)?c+=x+C:r.attr(`class`).includes(`attribute-comment`)&&(c+=x+C+w))}r.attr(`transform`,`translate(${R+o/2+c}, ${l+z+h.height+s/2})`)}),m.select(`.name`).attr(`transform`,`translate(`+-h.width/2+`, `+(z+s/2)+`)`);let B=N.rectangle(R,z,I,L,P),V=m.insert(()=>B,`:first-child`).attr(`style`,c.join(``)),{themeVariables:ee}=p(),{rowEven:te,rowOdd:ne,nodeBorder:H}=ee;_.push(0);for(let[e,t]of b.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=N.rectangle(R,h.height+z+t?.yOffset,I,t?.rowHeight,{...P,fill:n?te:ne,stroke:H});m.insert(()=>r,`g.label`).attr(`style`,c.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let U=N.line(R,h.height+z,I+R,h.height+z,P);m.insert(()=>U).attr(`class`,`divider`),U=N.line(x+R,h.height+z,x+R,L+z,P),m.insert(()=>U).attr(`class`,`divider`),O&&(U=N.line(x+C+R,h.height+z,x+C+R,L+z,P),m.insert(()=>U).attr(`class`,`divider`)),k&&(U=N.line(x+C+w+R,h.height+z,x+C+w+R,L+z,P),m.insert(()=>U).attr(`class`,`divider`));for(let e of _)U=N.line(R,h.height+z+e,I+R,h.height+z+e,P),m.insert(()=>U).attr(`class`,`divider`);if(T(t,V),d&&t.look!==`handDrawn`){let e=d.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);m.selectAll(`path`).attr(`style`,e??``),m.selectAll(`.row-rect-even path`).attr(`style`,d)}return t.intersect=function(e){return W.rect(t,e)},m}i(yt,`erBox`);async function X(e,t,r,i=0,o=0,s=[],c=``){let d=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${i}, ${o})`).attr(`style`,c);t!==u(t)&&(t=u(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let f=d.node().appendChild(await m(d,t,{width:n(t,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(t.includes(`<`)||t.includes(`>`)){let e=f.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let p=f.getBBox();if(l(r.htmlLabels)){let e=f.children[0];e.style.textAlign=`start`;let t=a(f);p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}return p}i(X,`addText`);async function bt(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Z(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Z(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Z(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Z(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}i(bt,`textHelper`);async function Z(t,r,o,c=[]){let u=t.insert(`g`).attr(`class`,`label`).attr(`style`,c.join(`; `)),f=p(),h=`useHtmlLabels`in r?r.useHtmlLabels:l(f.htmlLabels)??!0,g=``;g=`text`in r?r.text:r.label,!h&&g.startsWith(`\\`)&&(g=g.substring(1)),d(g)&&(h=!0);let _=await m(u,s(e(g)),{width:n(g,f)+50,classes:`markdown-node-label`,useHtmlLabels:h},f),v,y=1;if(h){let e=_.children[0],t=a(_);y=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(y+=e.innerHTML.split(`<mrow>`).length-1);let n=e.getElementsByTagName(`img`);if(n){let e=g.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...n].map(t=>new Promise(n=>{function r(){if(t.style.display=`flex`,t.style.flexDirection=`column`,e){let e=f.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=parseInt(e,10)*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}i(r,`setupImage`),setTimeout(()=>{t.complete&&r()}),t.addEventListener(`error`,r),t.addEventListener(`load`,r)})))}v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}else{c.includes(`font-weight: bolder`)&&a(_).selectAll(`tspan`).attr(`font-weight`,``),y=_.children.length;let e=_.children[0];(_.textContent===``||_.textContent.includes(`>`))&&(e.textContent=g[0]+g.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),g[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),v=_.getBBox()}return u.attr(`transform`,`translate(0,`+(-v.height/(2*y)+o)+`)`),v.height}i(Z,`addText`);async function xt(e,t){let n=c(),r=n.class.padding??12,i=r,o=t.useHtmlLabels??l(n.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:u,bbox:d}=await bt(e,t,n,o,i),{labelStyles:f,nodeStyles:p}=y(t);t.labelStyle=f,t.cssStyles=s.styles||``;let m=s.styles?.join(`;`)||p||``;t.cssStyles||=m.replaceAll(`!important`,``).split(`;`);let h=s.members.length===0&&s.methods.length===0&&!n.class?.hideEmptyMembersBox,g=S.svg(u),_=v(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=d.width,x=d.height;s.members.length===0&&s.methods.length===0?x+=i:s.members.length>0&&s.methods.length===0&&(x+=i*2);let C=-b/2,w=-x/2,E=g.rectangle(C-r,w-r-(h?r:s.members.length===0&&s.methods.length===0?-r/2:0),b+2*r,x+2*r+(h?r*2:s.members.length===0&&s.methods.length===0?-r:0),_),D=u.insert(()=>E,`:first-child`);D.attr(`class`,`basic label-container`);let O=D.node().getBBox();u.selectAll(`.text`).each((e,t,n)=>{let i=a(n[t]),c=i.attr(`transform`),l=0;if(c){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);e&&(l=parseFloat(e[2]))}let d=l+w+r-(h?r:s.members.length===0&&s.methods.length===0?-r/2:0);o||(d-=4);let f=C;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(f=-i.node()?.getBBox().width/2||0,u.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(f=0)})),i.attr(`transform`,`translate(${f}, ${d})`)});let k=u.select(`.annotation-group`).node().getBBox().height-(h?r/2:0)||0,A=u.select(`.label-group`).node().getBBox().height-(h?r/2:0)||0,j=u.select(`.members-group`).node().getBBox().height-(h?r/2:0)||0;if(s.members.length>0||s.methods.length>0||h){let e=g.line(O.x,k+A+w+r,O.x+O.width,k+A+w+r,_);u.insert(()=>e).attr(`class`,`divider`).attr(`style`,m)}if(h||s.members.length>0||s.methods.length>0){let e=g.line(O.x,k+A+j+w+i*2+r,O.x+O.width,k+A+j+w+r+i*2,_);u.insert(()=>e).attr(`class`,`divider`).attr(`style`,m)}if(s.look!==`handDrawn`&&u.selectAll(`path`).attr(`style`,m),D.select(`:nth-child(2)`).attr(`style`,m),u.selectAll(`.divider`).select(`path`).attr(`style`,m),t.labelStyle?u.selectAll(`span`).attr(`style`,t.labelStyle):u.selectAll(`span`).attr(`style`,m),!o){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(m);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}else if(f){let t=e.exec(f);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}}}return T(t,D),t.intersect=function(e){return W.rect(t,e)},u}i(xt,`classBox`);async function St(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t,o=t,s=`verifyMethod`in t,c=E(t),l=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId??t.id),u;u=s?await Q(l,`<<${i.type}>>`,0,t.labelStyle):await Q(l,`<<Element>>`,0,t.labelStyle);let d=u,f=await Q(l,i.name,d,t.labelStyle+`; font-weight: bold;`);if(d+=f+20,s){let e=await Q(l,`${i.requirementId?`ID: ${i.requirementId}`:``}`,d,t.labelStyle);d+=e;let n=await Q(l,`${i.text?`Text: ${i.text}`:``}`,d,t.labelStyle);d+=n;let r=await Q(l,`${i.risk?`Risk: ${i.risk}`:``}`,d,t.labelStyle);d+=r,await Q(l,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:``}`,d,t.labelStyle)}else{let e=await Q(l,`${o.type?`Type: ${o.type}`:``}`,d,t.labelStyle);d+=e,await Q(l,`${o.docRef?`Doc Ref: ${o.docRef}`:``}`,d,t.labelStyle)}let p=(l.node()?.getBBox().width??200)+20,m=(l.node()?.getBBox().height??200)+20,h=-p/2,g=-m/2,_=S.svg(l),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=_.rectangle(h,g,p,m,b),C=l.insert(()=>x,`:first-child`);if(C.attr(`class`,`basic label-container`).attr(`style`,r),l.selectAll(`.label`).each((e,t,n)=>{let r=a(n[t]),i=r.attr(`transform`),o=0,s=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-m/2,l=h+20/2;(t===0||t===1)&&(l=o),r.attr(`transform`,`translate(${l}, ${c+20})`)}),d>u+f+20){let e=_.line(h,g+u+f+20,h+p,g+u+f+20,b);l.insert(()=>e).attr(`style`,r)}return T(t,C),t.intersect=function(e){return W.rect(t,e)},l}i(St,`requirementBox`);async function Q(t,r,i,o=``){if(r===``)return 0;let l=t.insert(`g`).attr(`class`,`label`).attr(`style`,o),u=c(),d=u.htmlLabels??!0,f=await m(l,s(e(r)),{width:n(r,u)+50,classes:`markdown-node-label`,useHtmlLabels:d,style:o},u),p;if(d){let e=f.children[0],t=a(f);p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=f.children[0];for(let t of e.children)t.textContent=t.textContent.replaceAll(`>`,`>`).replaceAll(`<`,`<`),o&&t.setAttribute(`style`,o);p=f.getBBox(),p.height+=6}return l.attr(`transform`,`translate(${-p.width/2},${-p.height/2+i})`),p.height}i(Q,`addText`);var Ct=i(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`);async function wt(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await w(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await w(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await w(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,b=Math.max(m.height,g.height)/2,x=Math.max(s.height+20,t?.height||0)+b,D=-_/2,O=-x/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-b-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-b+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-b+s.height/2)+`)`);let k,{rx:A,ry:j}=t,{cssStyles:N}=t;if(t.look===`handDrawn`){let e=S.svg(o),n=v(t,{}),r=A||j?e.path(M(D,O,_,x,A||0),n):e.rectangle(D,O,_,x,n);k=o.insert(()=>r,`:first-child`),k.attr(`class`,`basic label-container`).attr(`style`,N||null)}else{k=o.insert(`rect`,`:first-child`),k.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,A??5).attr(`ry`,j??5).attr(`x`,D).attr(`y`,O).attr(`width`,_).attr(`height`,x);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=D+2,r=O+Math.floor((A??0)/2),i=O+x-Math.floor((A??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Ct(e))}}return T(t,k),t.height=x,t.intersect=function(e){return W.rect(t,e)},o}i(wt,`kanbanItem`);async function Tt(e,n){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c,label:l}=await C(e,n,E(n)),u=s.width+10*c,d=s.height+8*c,f=.15*u,{cssStyles:p}=n,m=s.width+20,h=s.height+20,g=Math.max(u,m),_=Math.max(d,h);l.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2})`);let b,x=`M0 0
|
|
11
|
-
a${f},${f} 1 0,0 ${g*.25},${-1*_*.1}
|
|
12
|
-
a${f},${f} 1 0,0 ${g*.25},0
|
|
13
|
-
a${f},${f} 1 0,0 ${g*.25},0
|
|
14
|
-
a${f},${f} 1 0,0 ${g*.25},${_*.1}
|
|
15
|
-
|
|
16
|
-
a${f},${f} 1 0,0 ${g*.15},${_*.33}
|
|
17
|
-
a${f*.8},${f*.8} 1 0,0 0,${_*.34}
|
|
18
|
-
a${f},${f} 1 0,0 ${-1*g*.15},${_*.33}
|
|
19
|
-
|
|
20
|
-
a${f},${f} 1 0,0 ${-1*g*.25},${_*.15}
|
|
21
|
-
a${f},${f} 1 0,0 ${-1*g*.25},0
|
|
22
|
-
a${f},${f} 1 0,0 ${-1*g*.25},0
|
|
23
|
-
a${f},${f} 1 0,0 ${-1*g*.25},${-1*_*.15}
|
|
24
|
-
|
|
25
|
-
a${f},${f} 1 0,0 ${-1*g*.1},${-1*_*.33}
|
|
26
|
-
a${f*.8},${f*.8} 1 0,0 0,${-1*_*.34}
|
|
27
|
-
a${f},${f} 1 0,0 ${g*.1},${-1*_*.33}
|
|
28
|
-
H0 V0 Z`;if(n.look===`handDrawn`){let e=S.svg(o),r=v(n,{}),i=e.path(x,r);b=o.insert(()=>i,`:first-child`),b.attr(`class`,`basic label-container`).attr(`style`,t(p))}else b=o.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`d`,x);return b.attr(`transform`,`translate(${-g/2}, ${-_/2})`),T(n,b),n.calcIntersect=function(e,t){return W.rect(e,t)},n.intersect=function(e){return r.info(`Bang intersect`,n,e),W.rect(n,e)},o}i(Tt,`bang`);async function Et(e,n){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c,label:l}=await C(e,n,E(n)),u=s.width+2*c,d=s.height+2*c,f=.15*u,p=.25*u,m=.35*u,h=.2*u,{cssStyles:g}=n,_,b=`M0 0
|
|
29
|
-
a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
|
|
30
|
-
a${m},${m} 1 0,1 ${u*.4},${-1*u*.1}
|
|
31
|
-
a${p},${p} 1 0,1 ${u*.35},${u*.2}
|
|
32
|
-
|
|
33
|
-
a${f},${f} 1 0,1 ${u*.15},${d*.35}
|
|
34
|
-
a${h},${h} 1 0,1 ${-1*u*.15},${d*.65}
|
|
35
|
-
|
|
36
|
-
a${p},${f} 1 0,1 ${-1*u*.25},${u*.15}
|
|
37
|
-
a${m},${m} 1 0,1 ${-1*u*.5},0
|
|
38
|
-
a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
39
|
-
|
|
40
|
-
a${f},${f} 1 0,1 ${-1*u*.1},${-1*d*.35}
|
|
41
|
-
a${h},${h} 1 0,1 ${u*.1},${-1*d*.65}
|
|
42
|
-
H0 V0 Z`;if(n.look===`handDrawn`){let e=S.svg(o),r=v(n,{}),i=e.path(b,r);_=o.insert(()=>i,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,t(g))}else _=o.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`d`,b);return l.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2})`),_.attr(`transform`,`translate(${-u/2}, ${-d/2})`),T(n,_),n.calcIntersect=function(e,t){return W.rect(e,t)},n.intersect=function(e){return r.info(`Cloud intersect`,n,e),W.rect(n,e)},o}i(Et,`cloud`);async function Dt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await C(e,t,E(t)),c=a.width+8*o,l=a.height+2*o,u=`
|
|
43
|
-
M${-c/2} ${l/2-5}
|
|
44
|
-
v${-l+10}
|
|
45
|
-
q0,-5 5,-5
|
|
46
|
-
h${c-10}
|
|
47
|
-
q5,0 5,5
|
|
48
|
-
v${l-10}
|
|
49
|
-
q0,5 -5,5
|
|
50
|
-
h${-c+10}
|
|
51
|
-
q-5,0 -5,-5
|
|
52
|
-
Z
|
|
53
|
-
`,d=i.append(`path`).attr(`id`,`node-`+t.id).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),T(t,d),t.calcIntersect=function(e,t){return W.rect(e,t)},t.intersect=function(e){return W.rect(t,e)},i}i(Dt,`defaultMindmapNode`);async function Ot(e,t){return le(e,t,{padding:t.padding??0})}i(Ot,`mindmapCircle`);var kt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:et},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:Ze},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:tt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:at},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:ye},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:le},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Tt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Et},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:Je},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:De},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Le},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:Ie},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:pt},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:Pe},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:xe},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:ct},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:se},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:Qe},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:it},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:rt},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:we},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Oe},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:fe},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:pe},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:me},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Re},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:gt},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Te},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:ft},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:He},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:he},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:be},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:ht},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:vt},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Se},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:mt},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Ce},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:$e},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:Ge},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:We},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:oe},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:de},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:st},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:ot},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:_t},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:Ye},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:Ue}],At=i(()=>{let e={state:nt,choice:ce,note:Ke,rectWithTitle:Xe,labelRect:Fe,iconSquare:Me,iconCircle:Ae,icon:ke,iconRounded:je,imageSquare:Ne,anchor:ie,kanbanItem:wt,mindmapCircle:Ot,defaultMindmapNode:Dt,classBox:xt,erBox:yt,requirementBox:St},t=[...Object.entries(e),...kt.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},`generateShapeMap`)();function jt(e){return e in At}i(jt,`isValidShape`);var $=new Map;async function Mt(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?At[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),$.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}i(Mt,`insertNode`);var Nt=i((e,t)=>{$.set(t.id,e)},`setNodeElem`),Pt=i(()=>{$.clear()},`clear`),Ft=i(e=>{let t=$.get(e.id);r.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`);export{Mt as a,Ft as c,I as i,Nt as l,Pt as n,jt as o,j as r,C as s,L as t,T as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,i as r,m as i,p as a,s as o,t as s,u as c}from"./chunk-XZSTWKYB-DjV8xl5A.js";var l=class extends s{static{e(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},u={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new r,`ValueConverter`)}};function d(e=a){let r=i(t(e),o),s=i(n({shared:r}),c,u);return r.ServiceRegistry.register(s),{shared:r,Radar:s}}e(d,`createRadarServices`);export{d as n,u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-CqyWLlNZ.js";var t=e((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`),n={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},r={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function i(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=a(e),t=a(t);let[n,r]=[e.x,e.y],[i,o]=[t.x,t.y],s=i-n,c=o-r;return{angle:Math.atan(c/s),deltaX:s,deltaY:c}}e(i,`calculateDeltaAndAngle`);var a=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),o=e(t=>({x:e(function(e,r,o){let s=0,c=a(o[0]).x<a(o[o.length-1]).x?`left`:`right`;if(r===0&&Object.hasOwn(n,t.arrowTypeStart)){let{angle:e,deltaX:r}=i(o[0],o[1]);s=n[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===o.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){let{angle:e,deltaX:r}=i(o[o.length-1],o[o.length-2]);s=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}let l=Math.abs(a(e).x-a(o[o.length-1]).x),u=Math.abs(a(e).y-a(o[o.length-1]).y),d=Math.abs(a(e).x-a(o[0]).x),f=Math.abs(a(e).y-a(o[0]).y),p=n[t.arrowTypeStart],m=n[t.arrowTypeEnd];if(l<m&&l>0&&u<m){let e=m+1-l;e*=c===`right`?-1:1,s-=e}if(d<p&&d>0&&f<p){let e=p+1-d;e*=c===`right`?-1:1,s+=e}return a(e).x+s},`x`),y:e(function(e,r,o){let s=0,c=a(o[0]).y<a(o[o.length-1]).y?`down`:`up`;if(r===0&&Object.hasOwn(n,t.arrowTypeStart)){let{angle:e,deltaY:r}=i(o[0],o[1]);s=n[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===o.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){let{angle:e,deltaY:r}=i(o[o.length-1],o[o.length-2]);s=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}let l=Math.abs(a(e).y-a(o[o.length-1]).y),u=Math.abs(a(e).x-a(o[o.length-1]).x),d=Math.abs(a(e).y-a(o[0]).y),f=Math.abs(a(e).x-a(o[0]).x),p=n[t.arrowTypeStart],m=n[t.arrowTypeEnd];if(l<m&&l>0&&u<m){let e=m+1-l;e*=c===`up`?-1:1,s-=e}if(d<p&&d>0&&f<p){let e=p+1-d;e*=c===`up`?-1:1,s+=e}return a(e).y+s},`y`)}),`getLineFunctionsWithOffset`);export{r as i,o as n,n as r,t};
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import{h as e,o as t}from"./chunk-GEFDOKGD-86LFbsAC.js";import{g as n,h as r}from"./src-CqyWLlNZ.js";import{B as i,C as a,V as o,W as s,_ as c,a as l,b as u,s as d,v as f}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as p}from"./chunk-55IACEB6-DhZGI1l3.js";import{t as m}from"./chunk-KX2RTZJC-CHj8TnTB.js";import{r as h}from"./chunk-GLR3WWYH-Re-5eSlQ.js";var g=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:t,5:n,6:i},{1:[3]},{3:5,4:t,5:n,6:i},{3:6,4:t,5:n,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:r(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:r(function(){return this.next()||this.lex()},`lex`),begin:r(function(e){this.conditionStack.push(e)},`begin`),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:r(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:r(function(e){this.begin(e)},`pushState`),stateStackSize:r(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:r(function(e,t,n,r){switch(n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState(`SCALE`),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin(`acc_title`),33;case 19:return this.popState(),`acc_title_value`;case 20:return this.begin(`acc_descr`),35;case 21:return this.popState(),`acc_descr_value`;case 22:this.begin(`acc_descr_multiline`);break;case 23:this.popState();break;case 24:return`acc_descr_multiline_value`;case 25:return this.pushState(`CLASSDEF`),41;case 26:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 27:return this.popState(),this.pushState(`CLASSDEFID`),42;case 28:return this.popState(),43;case 29:return this.pushState(`CLASS`),48;case 30:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 31:return this.popState(),50;case 32:return this.pushState(`STYLE`),45;case 33:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 34:return this.popState(),47;case 35:return this.pushState(`SCALE`),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState(`STATE`);break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState(`STATE_STRING`);break;case 50:return this.pushState(`STATE_ID`),`AS`;case 51:return this.popState(),`ID`;case 52:this.popState();break;case 53:return`STATE_DESCR`;case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState(`struct`),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin(`NOTE`),29;case 61:return this.popState(),this.pushState(`NOTE_ID`),59;case 62:return this.popState(),this.pushState(`NOTE_ID`),60;case 63:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 64:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 65:break;case 66:return`NOTE_TEXT`;case 67:return this.popState(),`ID`;case 68:return this.popState(),this.pushState(`NOTE_TEXT`),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}})();function P(){this.yy={}}return r(P,`Parser`),P.prototype=N,N.Parser=P,new P})();g.parser=g;var _=g,v=`TB`,y=`TB`,b=`dir`,x=`state`,S=`root`,C=`relation`,w=`classDef`,T=`style`,E=`applyClass`,D=`default`,O=`divider`,k=`fill:none`,A=`fill: #333`,j=`c`,M=`markdown`,N=`normal`,P=`rect`,F=`rectWithTitle`,ee=`stateStart`,te=`stateEnd`,I=`divider`,L=`roundedWithTitle`,ne=`note`,re=`noteGroup`,R=`statediagram`,ie=`${R}-state`,ae=`transition`,oe=`note`,se=`${ae} note-edge`,ce=`${R}-${oe}`,le=`${R}-cluster`,ue=`${R}-cluster-alt`,z=`parent`,B=`note`,de=`state`,V=`----`,fe=`${V}${B}`,H=`${V}${z}`,U=r((e,t=y)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),pe={getClasses:r(function(e,t){return t.db.getClasses()},`getClasses`),draw:r(async function(t,r,i,a){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,r);let{securityLevel:o,state:s,layout:c}=u();a.db.extract(a.db.getRootDocV2());let l=a.db.getData(),d=p(r,o);l.type=a.type,l.layoutAlgorithm=c,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=[`barb`],l.diagramId=r,await h(l,d);try{(typeof a.db.getLinks==`function`?a.db.getLinks():new Map).forEach((e,t)=>{let r=typeof t==`string`?t:typeof t?.id==`string`?t.id:``;if(!r){n.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let i=d.node()?.querySelectorAll(`g`),a;if(i?.forEach(e=>{e.textContent?.trim()===r&&(a=e)}),!a){n.warn(`⚠️ Could not find node matching text:`,r);return}let o=a.parentNode;if(!o){n.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),c=e.url.replace(/^"+|"+$/g,``);if(s.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,c),s.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);s.setAttribute(`title`,t)}o.replaceChild(s,a),s.appendChild(a),n.info(`🔗 Wrapped node in <a> tag for:`,r,e.url)})}catch(e){n.error(`❌ Error injecting clickable links:`,e)}e.insertTitle(d,`statediagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),m(d,8,R,s?.useMaxWidth??!0)},`draw`),getDir:U},W=new Map,G=0;function K(e=``,t=0,n=``,r=V){return`${de}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}r(K,`stateDomId`);var me=r((e,t,r,i,a,o,s,c)=>{n.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case x:X(e,t,r,i,a,o,s,c);break;case D:X(e,t,r,i,a,o,s,c);break;case C:{X(e,t.state1,r,i,a,o,s,c),X(e,t.state2,r,i,a,o,s,c);let n={id:`edge`+G,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:`arrow_barb`,style:k,labelStyle:``,label:d.sanitizeText(t.description??``,u()),arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,classes:ae,look:s};a.push(n),G++}break}})},`setupDoc`),q=r((e,t=y)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function J(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}r(J,`insertOrUpdateNode`);function Y(e){return e?.classes?.join(` `)??``}r(Y,`getClassesFromDbInfo`);function he(e){return e?.styles??[]}r(he,`getStylesFromDbInfo`);var X=r((e,t,r,i,a,o,s,c)=>{let l=t.id,f=r.get(l),p=Y(f),m=he(f),h=u();if(n.info(`dataFetcher parsedItem`,t,f,m),l!==`root`){let r=P;t.start===!0?r=ee:t.start===!1&&(r=te),t.type!==D&&(r=t.type),W.get(l)||W.set(l,{id:l,shape:r,description:d.sanitizeText(l,h),cssClasses:`${p} ${ie}`,cssStyles:m});let u=W.get(l);t.description&&(Array.isArray(u.description)?(u.shape=F,u.description.push(t.description)):u.description?.length&&u.description.length>0?(u.shape=F,u.description===l?u.description=[t.description]:u.description=[u.description,t.description]):(u.shape=P,u.description=t.description),u.description=d.sanitizeTextOrArray(u.description,h)),u.description?.length===1&&u.shape===F&&(u.type===`group`?u.shape=L:u.shape=P),!u.type&&t.doc&&(n.info(`Setting cluster for XCX`,l,q(t)),u.type=`group`,u.isGroup=!0,u.dir=q(t),u.shape=t.type===O?I:L,u.cssClasses=`${u.cssClasses} ${le} ${o?ue:``}`);let f={labelStyle:``,shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:l,dir:u.dir,domId:K(l,G),type:u.type,isGroup:u.type===`group`,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===I&&(f.label=``),e&&e.id!==`root`&&(n.trace(`Setting node `,l,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,t.note){let e={labelStyle:``,shape:ne,label:t.note.text,labelType:`markdown`,cssClasses:ce,cssStyles:[],cssCompiledStyles:[],id:l+fe+`-`+G,domId:K(l,G,B),type:u.type,isGroup:u.type===`group`,padding:h.flowchart?.padding,look:s,position:t.note.position},n=l+H,r={labelStyle:``,shape:re,label:t.note.text,cssClasses:u.cssClasses,cssStyles:[],id:l+H,domId:K(l,G,z),type:`group`,isGroup:!0,padding:16,look:s,position:t.note.position};G++,r.id=n,e.parentId=n,J(i,r,c),J(i,e,c),J(i,f,c);let o=l,d=e.id;t.note.position===`left of`&&(o=e.id,d=l),a.push({id:o+`-`+d,start:o,end:d,arrowhead:`none`,arrowTypeEnd:``,style:k,labelStyle:``,classes:se,arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,look:s})}else J(i,f,c)}t.doc&&(n.trace(`Adding nodes children `),me(t,t.doc,r,i,a,!o,s,c))},`dataFetcher`),ge=r(()=>{W.clear(),G=0},`reset`),Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},_e=r(()=>new Map,`newClassesList`),Q=r(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=r(e=>JSON.parse(JSON.stringify(e)),`clone`),ve=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=_e(),this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=f,this.setAccTitle=o,this.getAccDescription=c,this.setAccDescription=i,this.setDiagramTitle=s,this.getDiagramTitle=a,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{r(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case x:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case C:this.addRelation(t.state1,t.state2,t.description);break;case w:this.addStyleClass(t.id.trim(),t.classes);break;case T:this.handleStyleDef(t);break;case E:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=u();ge(),X(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){n.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,n,r){if(n.stmt===C){this.docTranslator(e,n.state1,!0),this.docTranslator(e,n.state2,!1);return}if(n.stmt===x&&(n.id===Z.START_NODE?(n.id=e.id+(r?`_start`:`_end`),n.start=r):n.id=n.id.trim()),n.stmt!==S&&n.stmt!==x||!n.doc)return;let i=[],a=[];for(let e of n.doc)if(e.type===O){let t=$(e);t.doc=$(a),i.push(t),a=[]}else a.push(e);if(i.length>0&&a.length>0){let e={stmt:x,id:t(),type:`divider`,doc:$(a)};i.push($(e)),n.doc=i}n.doc.forEach(e=>this.docTranslator(n,e,!0))}getRootDocV2(){return this.docTranslator({id:S,stmt:S},{id:S,stmt:S,doc:this.rootDoc},!0),{id:S,doc:this.rootDoc}}addState(e,t=D,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,c=void 0){let l=e?.trim();if(!this.currentDocument.states.has(l))n.info(`Adding state `,l,i),this.currentDocument.states.set(l,{stmt:x,id:l,descriptions:[],type:t,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.doc||=r,e.type||=t}if(i&&(n.info(`Setting state description`,l,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(l,e.trim()))),a){let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.note=a,e.note.text=d.sanitizeText(e.note.text,u())}o&&(n.info(`Setting state classes`,l,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(n.info(`Setting state styles`,l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),c&&(n.info(`Setting state styles`,l,s),(Array.isArray(c)?c:[c]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=_e(),e||(this.links=new Map,l())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){n.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),n.warn(`Adding link`,e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=D){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=D){return e===Z.END_NODE?Z.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:d.sanitizeText(n,u())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?d.sanitizeText(n,u()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(d.sanitizeText(r,u()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===b)}getDirection(){return this.getDirectionStatement()?.value??v}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:b,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=u();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:U(this.getRootDocV2())}}getConfig(){return u().state}},ye=r(e=>`
|
|
7
|
-
defs #statediagram-barbEnd {
|
|
8
|
-
fill: ${e.transitionColor};
|
|
9
|
-
stroke: ${e.transitionColor};
|
|
10
|
-
}
|
|
11
|
-
g.stateGroup text {
|
|
12
|
-
fill: ${e.nodeBorder};
|
|
13
|
-
stroke: none;
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
}
|
|
16
|
-
g.stateGroup text {
|
|
17
|
-
fill: ${e.textColor};
|
|
18
|
-
stroke: none;
|
|
19
|
-
font-size: 10px;
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
g.stateGroup .state-title {
|
|
23
|
-
font-weight: bolder;
|
|
24
|
-
fill: ${e.stateLabelColor};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
g.stateGroup rect {
|
|
28
|
-
fill: ${e.mainBkg};
|
|
29
|
-
stroke: ${e.nodeBorder};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
g.stateGroup line {
|
|
33
|
-
stroke: ${e.lineColor};
|
|
34
|
-
stroke-width: 1;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.transition {
|
|
38
|
-
stroke: ${e.transitionColor};
|
|
39
|
-
stroke-width: 1;
|
|
40
|
-
fill: none;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.stateGroup .composit {
|
|
44
|
-
fill: ${e.background};
|
|
45
|
-
border-bottom: 1px
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.stateGroup .alt-composit {
|
|
49
|
-
fill: #e0e0e0;
|
|
50
|
-
border-bottom: 1px
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.state-note {
|
|
54
|
-
stroke: ${e.noteBorderColor};
|
|
55
|
-
fill: ${e.noteBkgColor};
|
|
56
|
-
|
|
57
|
-
text {
|
|
58
|
-
fill: ${e.noteTextColor};
|
|
59
|
-
stroke: none;
|
|
60
|
-
font-size: 10px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.stateLabel .box {
|
|
65
|
-
stroke: none;
|
|
66
|
-
stroke-width: 0;
|
|
67
|
-
fill: ${e.mainBkg};
|
|
68
|
-
opacity: 0.5;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.edgeLabel .label rect {
|
|
72
|
-
fill: ${e.labelBackgroundColor};
|
|
73
|
-
opacity: 0.5;
|
|
74
|
-
}
|
|
75
|
-
.edgeLabel {
|
|
76
|
-
background-color: ${e.edgeLabelBackground};
|
|
77
|
-
p {
|
|
78
|
-
background-color: ${e.edgeLabelBackground};
|
|
79
|
-
}
|
|
80
|
-
rect {
|
|
81
|
-
opacity: 0.5;
|
|
82
|
-
background-color: ${e.edgeLabelBackground};
|
|
83
|
-
fill: ${e.edgeLabelBackground};
|
|
84
|
-
}
|
|
85
|
-
text-align: center;
|
|
86
|
-
}
|
|
87
|
-
.edgeLabel .label text {
|
|
88
|
-
fill: ${e.transitionLabelColor||e.tertiaryTextColor};
|
|
89
|
-
}
|
|
90
|
-
.label div .edgeLabel {
|
|
91
|
-
color: ${e.transitionLabelColor||e.tertiaryTextColor};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.stateLabel text {
|
|
95
|
-
fill: ${e.stateLabelColor};
|
|
96
|
-
font-size: 10px;
|
|
97
|
-
font-weight: bold;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.node circle.state-start {
|
|
101
|
-
fill: ${e.specialStateColor};
|
|
102
|
-
stroke: ${e.specialStateColor};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.node .fork-join {
|
|
106
|
-
fill: ${e.specialStateColor};
|
|
107
|
-
stroke: ${e.specialStateColor};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.node circle.state-end {
|
|
111
|
-
fill: ${e.innerEndBackground};
|
|
112
|
-
stroke: ${e.background};
|
|
113
|
-
stroke-width: 1.5
|
|
114
|
-
}
|
|
115
|
-
.end-state-inner {
|
|
116
|
-
fill: ${e.compositeBackground||e.background};
|
|
117
|
-
// stroke: ${e.background};
|
|
118
|
-
stroke-width: 1.5
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.node rect {
|
|
122
|
-
fill: ${e.stateBkg||e.mainBkg};
|
|
123
|
-
stroke: ${e.stateBorder||e.nodeBorder};
|
|
124
|
-
stroke-width: 1px;
|
|
125
|
-
}
|
|
126
|
-
.node polygon {
|
|
127
|
-
fill: ${e.mainBkg};
|
|
128
|
-
stroke: ${e.stateBorder||e.nodeBorder};;
|
|
129
|
-
stroke-width: 1px;
|
|
130
|
-
}
|
|
131
|
-
#statediagram-barbEnd {
|
|
132
|
-
fill: ${e.lineColor};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.statediagram-cluster rect {
|
|
136
|
-
fill: ${e.compositeTitleBackground};
|
|
137
|
-
stroke: ${e.stateBorder||e.nodeBorder};
|
|
138
|
-
stroke-width: 1px;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.cluster-label, .nodeLabel {
|
|
142
|
-
color: ${e.stateLabelColor};
|
|
143
|
-
// line-height: 1;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.statediagram-cluster rect.outer {
|
|
147
|
-
rx: 5px;
|
|
148
|
-
ry: 5px;
|
|
149
|
-
}
|
|
150
|
-
.statediagram-state .divider {
|
|
151
|
-
stroke: ${e.stateBorder||e.nodeBorder};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.statediagram-state .title-state {
|
|
155
|
-
rx: 5px;
|
|
156
|
-
ry: 5px;
|
|
157
|
-
}
|
|
158
|
-
.statediagram-cluster.statediagram-cluster .inner {
|
|
159
|
-
fill: ${e.compositeBackground||e.background};
|
|
160
|
-
}
|
|
161
|
-
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
162
|
-
fill: ${e.altBackground?e.altBackground:`#efefef`};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.statediagram-cluster .inner {
|
|
166
|
-
rx:0;
|
|
167
|
-
ry:0;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.statediagram-state rect.basic {
|
|
171
|
-
rx: 5px;
|
|
172
|
-
ry: 5px;
|
|
173
|
-
}
|
|
174
|
-
.statediagram-state rect.divider {
|
|
175
|
-
stroke-dasharray: 10,10;
|
|
176
|
-
fill: ${e.altBackground?e.altBackground:`#efefef`};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.note-edge {
|
|
180
|
-
stroke-dasharray: 5;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.statediagram-note rect {
|
|
184
|
-
fill: ${e.noteBkgColor};
|
|
185
|
-
stroke: ${e.noteBorderColor};
|
|
186
|
-
stroke-width: 1px;
|
|
187
|
-
rx: 0;
|
|
188
|
-
ry: 0;
|
|
189
|
-
}
|
|
190
|
-
.statediagram-note rect {
|
|
191
|
-
fill: ${e.noteBkgColor};
|
|
192
|
-
stroke: ${e.noteBorderColor};
|
|
193
|
-
stroke-width: 1px;
|
|
194
|
-
rx: 0;
|
|
195
|
-
ry: 0;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.statediagram-note text {
|
|
199
|
-
fill: ${e.noteTextColor};
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.statediagram-note .nodeLabel {
|
|
203
|
-
color: ${e.noteTextColor};
|
|
204
|
-
}
|
|
205
|
-
.statediagram .edgeLabel {
|
|
206
|
-
color: red; // ${e.noteTextColor};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
#dependencyStart, #dependencyEnd {
|
|
210
|
-
fill: ${e.lineColor};
|
|
211
|
-
stroke: ${e.lineColor};
|
|
212
|
-
stroke-width: 1;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.statediagramTitleText {
|
|
216
|
-
text-anchor: middle;
|
|
217
|
-
font-size: 18px;
|
|
218
|
-
fill: ${e.textColor};
|
|
219
|
-
}
|
|
220
|
-
`,`getStyles`);export{ye as i,_ as n,pe as r,ve as t};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,b as s,h as c,v as l,w as u,x as d,y as f}from"./chunk-GEFDOKGD-86LFbsAC.js";import{g as p,h as m,p as h}from"./src-CqyWLlNZ.js";import{b as g,w as _}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as v}from"./line-CSuSrJ9J.js";import{n as y}from"./chunk-PU5JKC2W-DD95Rx35.js";import{i as b,n as x,r as S,t as C}from"./chunk-MX3YWQON-B6g1ZH9X.js";import{n as w}from"./chunk-YBOYWFTD-D_ILLe6_.js";import{i as T,n as E}from"./chunk-PQ6SQG4A-Bik13fTV.js";import{t as ee}from"./rough.esm-eLccZ4OJ.js";import{r as D}from"./chunk-KYZI473N-gqRLpJ4w.js";var O=m((e,t,n,r,i,a)=>{t.arrowTypeStart&&A(e,`start`,t.arrowTypeStart,n,r,i,a),t.arrowTypeEnd&&A(e,`end`,t.arrowTypeEnd,n,r,i,a)},`addEdgeMarkers`),k={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,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}},A=m((e,t,n,r,i,a,o)=>{let s=k[n];if(!s){p.warn(`Unknown arrow type: ${n}`);return}let c=`${i}_${a}-${s.type}${t===`start`?`Start`:`End`}`;if(o&&o.trim()!==``){let n=`${c}_${o.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(c);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,o),s.fill&&e.setAttribute(`fill`,o)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${c})`)},`addEdgeMarker`),te=m(e=>typeof e==`string`?e:g()?.flowchart?.curve,`resolveEdgeCurveType`),j=new Map,M=new Map,N=m(()=>{j.clear(),M.clear()},`clear`),P=m(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),F=m(async(e,t)=>{let n=g(),r=_(n),{labelStyles:i}=T(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,c=await y(e,t.label,{style:P(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(c),p.info(`abc82`,t,t.labelType);let l=c.getBBox(),u=l;if(r){let e=c.children[0],t=h(c);l=e.getBoundingClientRect(),u=l,t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=h(c).select(`text`).node();e&&typeof e.getBBox==`function`&&(u=e.getBBox())}o.attr(`transform`,C(u,r)),j.set(t.id,a),t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await D(i,t.startLabelLeft,P(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),M.get(t.id)||M.set(t.id,{}),M.get(t.id).startLeft=n,I(d,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await D(i,t.startLabelRight,P(t.labelStyle)||``,!1,!1);d=a,i.node().appendChild(a);let o=a.getBBox();if(r){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),M.get(t.id)||M.set(t.id,{}),M.get(t.id).startRight=n,I(d,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await D(i,t.endLabelLeft,P(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),n.node().appendChild(a),M.get(t.id)||M.set(t.id,{}),M.get(t.id).endLeft=n,I(d,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await D(i,t.endLabelRight,P(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=h(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,C(o,r)),n.node().appendChild(a),M.get(t.id)||M.set(t.id,{}),M.get(t.id).endRight=n,I(d,t.endLabelRight)}return c},`insertEdgeLabel`);function I(e,t){_(g())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}m(I,`setTerminalWidth`);var L=m((e,t)=>{p.debug(`Moving label abc88 `,e.id,e.label,j.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:r}=w(g());if(e.label){let i=j.get(e.id),a=e.x,o=e.y;if(n){let r=c.calcLabelPosition(n);p.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e.startLabelLeft){let t=M.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=c.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=M.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=c.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=M.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=c.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=M.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=c.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),R=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`),z=m((e,t,n)=>{p.debug(`intersection calc abc89:
|
|
2
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
3
|
-
insidePoint : ${JSON.stringify(n)}
|
|
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}else{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`),B=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),!R(t,e)&&!i){let a=z(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 V(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(V,`extractCornerPoints`);var H=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`),ne=m(function(e){let{cornerPointPositions:t}=V(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=H(t,a,5),s=H(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`),re=m((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),U=m(function(m,_,y,S,C,w,T,D=!1){let{handDrawnSeed:k}=g(),A=_.points,j=!1,M=C;var N=w;let P=[];for(let e in _.cssCompiledStyles)E(e)||P.push(_.cssCompiledStyles[e]);p.debug(`UIO intersect check`,_.points,N.x,M.x),N.intersect&&M.intersect&&!D&&(A=A.slice(1,_.points.length-1),A.unshift(M.intersect(A[0])),p.debug(`Last point UIO`,_.start,`-->`,_.end,A[A.length-1],N,N.intersect(A[A.length-1])),A.push(N.intersect(A[A.length-1])));let F=btoa(JSON.stringify(A));_.toCluster&&(p.info(`to cluster abc88`,y.get(_.toCluster)),A=B(_.points,y.get(_.toCluster).node),j=!0),_.fromCluster&&(p.debug(`from cluster abc88`,y.get(_.fromCluster),JSON.stringify(A,null,2)),A=B(A.reverse(),y.get(_.fromCluster).node).reverse(),j=!0);let I=A.filter(e=>!Number.isNaN(e.y)),L=te(_.curve);L!==`rounded`&&(I=ne(I));let R=r;switch(L){case`linear`:R=r;break;case`basis`:R=a;break;case`cardinal`:R=u;break;case`bumpX`:R=n;break;case`bumpY`:R=t;break;case`catmullRom`:R=e;break;case`monotoneX`:R=d;break;case`monotoneY`:R=i;break;case`natural`:R=s;break;case`step`:R=f;break;case`stepAfter`:R=o;break;case`stepBefore`:R=l;break;case`rounded`:R=r;break;default:R=a}let{x:z,y:V}=x(_),H=v().x(z).y(V).curve(R),U;switch(_.thickness){case`normal`:U=`edge-thickness-normal`;break;case`thick`:U=`edge-thickness-thick`;break;case`invisible`:U=`edge-thickness-invisible`;break;default:U=`edge-thickness-normal`}switch(_.pattern){case`solid`:U+=` edge-pattern-solid`;break;case`dotted`:U+=` edge-pattern-dotted`;break;case`dashed`:U+=` edge-pattern-dashed`;break;default:U+=` edge-pattern-solid`}let G,q=L===`rounded`?W(K(I,_),5):H(I),J=Array.isArray(_.style)?_.style:[_.style],Y=J.find(e=>e?.startsWith(`stroke:`)),X=``;_.animate&&(X=`edge-animation-fast`),_.animation&&(X=`edge-animation-`+_.animation);let Z=!1;if(_.look===`handDrawn`){let e=ee.svg(m);Object.assign([],I);let t=e.path(q,{roughness:.3,seed:k});U+=` transition`,G=h(t).select(`path`).attr(`id`,_.id).attr(`class`,` `+U+(_.classes?` `+_.classes:``)+(X?` `+X:``)).attr(`style`,J?J.reduce((e,t)=>e+`;`+t,``):``);let n=G.attr(`d`);G.attr(`d`,n),m.node().appendChild(G.node())}else{let e=P.join(`;`),t=J?J.reduce((e,t)=>e+t+`;`,``):``,n=(e?e+`;`+t+`;`:t)+`;`+(J?J.reduce((e,t)=>e+`;`+t,``):``);G=m.append(`path`).attr(`d`,q).attr(`id`,_.id).attr(`class`,` `+U+(_.classes?` `+_.classes:``)+(X?` `+X:``)).attr(`style`,n),Y=n.match(/stroke:([^;]+)/)?.[1],Z=_.animate===!0||!!_.animation||e.includes(`animation`);let r=G.node(),i=typeof r.getTotalLength==`function`?r.getTotalLength():0,a=b[_.arrowTypeStart]||0,o=b[_.arrowTypeEnd]||0;if(_.look===`neo`&&!Z){let e=`stroke-dasharray: ${_.pattern===`dotted`||_.pattern===`dashed`?re(i,a,o):`0 ${a} ${i-a-o} ${o}`}; stroke-dashoffset: 0;`;G.attr(`style`,e+G.attr(`style`))}}G.attr(`data-edge`,!0),G.attr(`data-et`,`edge`),G.attr(`data-id`,_.id),G.attr(`data-points`,F),_.showPoints&&I.forEach(e=>{m.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,e.x).attr(`cy`,e.y)});let Q=``;(g().flowchart.arrowMarkerAbsolute||g().state.arrowMarkerAbsolute)&&(Q=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Q=Q.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),p.info(`arrowTypeStart`,_.arrowTypeStart),p.info(`arrowTypeEnd`,_.arrowTypeEnd),O(G,_,Q,T,S,Y);let ie=Math.floor(A.length/2),ae=A[ie];c.isLabelCoordinateInPath(ae,G.attr(`d`))||(j=!0);let $={};return j&&($.updatedPath=A),$.originalPath=_.points,$},`insertEdge`);function W(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.max(-1,Math.min(1,g)),v=Math.acos(_);if(v<i||Math.abs(Math.PI-v)<i){n+=`L${o.x},${o.y}`;continue}let y=Math.min(t/Math.sin(v/2),u/2,d/2),b=o.x-f*y,x=o.y-p*y,S=o.x+m*y,C=o.y+h*y;n+=`L${b},${x}`,n+=`Q${o.x},${o.y} ${S},${C}`}}return n}m(W,`generateRoundedPath`);function G(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(G,`calculateDeltaAndAngle`);function K(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&S[t.arrowTypeStart]){let r=S[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=G(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&&S[t.arrowTypeEnd]){let i=S[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=G(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(K,`applyMarkerOffsetsToPoints`);var q=m((e,t,n,r)=>{t.forEach(t=>{J[t](e,n,r)})},`insertMarkers`),J={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`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).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`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`)},`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`).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`).append(`path`).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`).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`).append(`path`).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`).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`).append(`path`).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`).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`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6)},`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`)},`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`)},`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`)},`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`),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`),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
|
|
5
|
-
L20,10
|
|
6
|
-
M20,10
|
|
7
|
-
L0,20`)},`requirement_arrow`),requirement_contains:m((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`)},Y=q;export{L as a,Y as i,U as n,F as r,N as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,f as t,g as n,h as r,m as i,n as a,p as o,s,t as c}from"./chunk-XZSTWKYB-DjV8xl5A.js";var l=class extends c{static{t(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends a{static{t(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}t(f,`registerValidationChecks`);var p=class{static{t(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},m={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new d,`ValueConverter`)},validation:{TreemapValidator:t(()=>new p,`TreemapValidator`)}};function h(t=o){let a=i(n(t),s),c=i(r({shared:a}),e,m);return a.ServiceRegistry.register(c),f(c),{shared:a,Treemap:c}}t(h,`createTreemapServices`);export{h as n,m as t};
|