slateboard 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +33 -192
  2. package/dist/arch-3JZTL2DJ.js +1842 -0
  3. package/dist/bin.js +93 -17
  4. package/dist/{chunk-ONZFKR4I.js → chunk-6CR2V7P7.js} +172 -22
  5. package/dist/chunk-6YTKJKSG.js +129 -0
  6. package/dist/{chunk-SQHGMBUM.js → chunk-KA7Z72FC.js} +3 -2
  7. package/dist/{chunk-WXM4BB4D.js → chunk-OJOVDYIZ.js} +1400 -873
  8. package/dist/{chunk-BWNUX4FT.js → chunk-WREOGLK6.js} +4 -4
  9. package/dist/{chunk-FMO5B2KJ.js → chunk-ZCFHR5VG.js} +5 -5
  10. package/dist/{client-JHI2EG6J.js → client-BFKANUSM.js} +4 -4
  11. package/dist/{commands-ONES545N.js → commands-IB76RJGP.js} +1 -1
  12. package/dist/{doctor-H5Y5L2JZ.js → doctor-RPN73UNG.js} +3 -3
  13. package/dist/{hooks-2TI5OLAU.js → hooks-QJ4XG42C.js} +13 -1
  14. package/dist/{lifecycle-ZB5HEO5P.js → lifecycle-O7LDC735.js} +4 -4
  15. package/dist/{service-command-26BPMBK3.js → service-command-WG4TAU2T.js} +5 -5
  16. package/dist/shipped-7D2LNTAK.js +153 -0
  17. package/dist/{src-QZIVUACM.js → src-2MHSOXLY.js} +12 -2
  18. package/dist/{src-YVFB3ZLM.js → src-QB7VJHQH.js} +21 -1
  19. package/dist/ui/assets/abnfDiagram-XWFEHMT6-DAC8TnbO.js +1 -0
  20. package/dist/ui/assets/architecture-WOLXFQ4H-X8k0-LVf.js +1 -0
  21. package/dist/ui/assets/architectureDiagram-CSQXQB3N-CVoxvA0s.js +36 -0
  22. package/dist/ui/assets/blockDiagram-BEDRHYPZ-DGf5VAwB.js +140 -0
  23. package/dist/ui/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
  24. package/dist/ui/assets/c4Diagram-M2UUVUY5-PB5quCOl.js +38 -0
  25. package/dist/ui/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  26. package/dist/ui/assets/chunk-3GCGMST5-RRiusQp9.js +1 -0
  27. package/dist/ui/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  28. package/dist/ui/assets/chunk-7U7NFRK5-CSOOpKZT.js +88 -0
  29. package/dist/ui/assets/chunk-CNRTWJTD-DJuDnaYn.js +1 -0
  30. package/dist/ui/assets/chunk-D5HYT7QG-imLQxbAy.js +1 -0
  31. package/dist/ui/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
  32. package/dist/ui/assets/chunk-DZSZGQHW-BCXsfFfT.js +1 -0
  33. package/dist/ui/assets/chunk-EBZ3SEQC-CdDips7b.js +2 -0
  34. package/dist/ui/assets/chunk-F3AE6A5H-DTVcMSk7.js +1 -0
  35. package/dist/ui/assets/chunk-FGVZ23HU-BEVs0fgA.js +213 -0
  36. package/dist/ui/assets/chunk-GZTWQ64R-CKGVWw4I.js +62 -0
  37. package/dist/ui/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
  38. package/dist/ui/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  39. package/dist/ui/assets/chunk-KTR4FSNJ-DSr3q0Xy.js +1 -0
  40. package/dist/ui/assets/chunk-MDAHDJXZ-YMIkXJ0O.js +10 -0
  41. package/dist/ui/assets/chunk-MPYPSXSE-C-CxVwa7.js +1 -0
  42. package/dist/ui/assets/chunk-ND7LMLKX-lfusdDHU.js +72 -0
  43. package/dist/ui/assets/chunk-NGNAAXSQ-DqoPQk1a.js +136 -0
  44. package/dist/ui/assets/chunk-OWCVCYLK-4-W-ynqW.js +2 -0
  45. package/dist/ui/assets/chunk-QDWOWVBQ-Du0KmhW4.js +129 -0
  46. package/dist/ui/assets/chunk-T47YP6PS-CKli33QU.js +1 -0
  47. package/dist/ui/assets/chunk-XXDRQBXY-DSL17ZTh.js +1 -0
  48. package/dist/ui/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  49. package/dist/ui/assets/classDiagram-v2-KXABOMEV-CYc2BZ2y.js +217 -0
  50. package/dist/ui/assets/cose-bilkent-JH36ORCC-81nUs0at.js +1 -0
  51. package/dist/ui/assets/cynefin-EF2NZ3EQ-Clvwy422.js +1 -0
  52. package/dist/ui/assets/cynefinDiagram-NJNITYFG-CsgTQqAC.js +62 -0
  53. package/dist/ui/assets/cytoscape.esm-BPveszXl.js +321 -0
  54. package/dist/ui/assets/d3-scale-lXtN6-Od.js +1 -0
  55. package/dist/ui/assets/d3-selection-BFzs9NTX.js +1 -0
  56. package/dist/ui/assets/dagre-KIHZ2IZ3--BpWd3hW.js +4 -0
  57. package/dist/ui/assets/diagram-7YQZDPLS-Dp_m-C1a.js +41 -0
  58. package/dist/ui/assets/diagram-QBROCOUO-Bt-Lp7vq.js +200 -0
  59. package/dist/ui/assets/diagram-RJJCUUZO-DLsG2Tej.js +30 -0
  60. package/dist/ui/assets/diagram-WERXNKYE-D31SLp70.js +24 -0
  61. package/dist/ui/assets/diagram-YHHI257C-CVMeUILe.js +3 -0
  62. package/dist/ui/assets/diagram-YR4HJLHV-Bz9qvIhJ.js +24 -0
  63. package/dist/ui/assets/dist-YCovsM_S.js +1 -0
  64. package/dist/ui/assets/ebnfDiagram-N527522P-_FIZSf8P.js +1 -0
  65. package/dist/ui/assets/elk-O5DQBFGD-BK3qD3UW.js +27 -0
  66. package/dist/ui/assets/erDiagram-K3K3BIDK-Dmpdi5Ob.js +99 -0
  67. package/dist/ui/assets/eventmodeling-K75KTNOO-Dt-51L4s.js +1 -0
  68. package/dist/ui/assets/flowDiagram-Z6JWZHQI-Cn2ZVzvO.js +1 -0
  69. package/dist/ui/assets/ganttDiagram-3PRQTZWP-BaZof7eT.js +292 -0
  70. package/dist/ui/assets/gitGraph-VSP46ZUC-ezyaB0jQ.js +1 -0
  71. package/dist/ui/assets/gitGraphDiagram-VXDFKS5L-DRNdClPw.js +106 -0
  72. package/dist/ui/assets/graphlib-DS17s2tU.js +1 -0
  73. package/dist/ui/assets/grid-E2QIVN74--djCUwdI.js +1 -0
  74. package/dist/ui/assets/index-Bly281F6.css +1 -0
  75. package/dist/ui/assets/index-CXK8WmR8.js +45 -0
  76. package/dist/ui/assets/info-OHQRW6UA-DsFXrFWI.js +1 -0
  77. package/dist/ui/assets/infoDiagram-EZ3ZOAHP-e8qx3eqc.js +2 -0
  78. package/dist/ui/assets/ishikawaDiagram-S3EKX5GW-CuKExPKN.js +70 -0
  79. package/dist/ui/assets/journeyDiagram-POQNLL5X-D0GE8iji.js +139 -0
  80. package/dist/ui/assets/kanban-definition-BH5XI6FM-NL5dOF_0.js +89 -0
  81. package/dist/ui/assets/katex-BXIx1Jgr.js +257 -0
  82. package/dist/ui/assets/mermaid-parser.core-0pE4JCc_.js +7 -0
  83. package/dist/ui/assets/mermaid.core-BVgUieVU.js +44 -0
  84. package/dist/ui/assets/mindmap-definition-WVAN44T4-BLTtjuVH.js +98 -0
  85. package/dist/ui/assets/packet-JDAUHWVQ-C-7DeilZ.js +1 -0
  86. package/dist/ui/assets/pegDiagram-D4NLKWP3-F2SSXiqv.js +1 -0
  87. package/dist/ui/assets/pie-XZMESJXO-B4BkiWTy.js +1 -0
  88. package/dist/ui/assets/pieDiagram-36ENHN4W-BB5uEdtB.js +39 -0
  89. package/dist/ui/assets/quadrantDiagram-ZQUDMS73-B5iPooYO.js +7 -0
  90. package/dist/ui/assets/radar-ABXABTNO-Dx3jkQdr.js +1 -0
  91. package/dist/ui/assets/railroad-I3PHUGI6-BSh47OT_.js +1 -0
  92. package/dist/ui/assets/railroad-abnf-LNEFI6M7-BWFvDxOj.js +1 -0
  93. package/dist/ui/assets/railroad-ebnf-DWYD2UWJ-GBoLzumA.js +1 -0
  94. package/dist/ui/assets/railroad-peg-JR7BVNR7-DByw5Orh.js +1 -0
  95. package/dist/ui/assets/railroadDiagram-JIZHGYPL--ptGd2NR.js +1 -0
  96. package/dist/ui/assets/render-VIF2ZAQL-CzNp-J42.js +2 -0
  97. package/dist/ui/assets/requirementDiagram-AXW2TVFA-DBh9Dt63.js +84 -0
  98. package/dist/ui/assets/rough.esm-Dy-Kn_BL.js +1 -0
  99. package/dist/ui/assets/sankeyDiagram-FBCJTAIF-CjJtGyu8.js +40 -0
  100. package/dist/ui/assets/sequenceDiagram-3LA2ROMG-BzeMVuzG.js +169 -0
  101. package/dist/ui/assets/sizeCapture-2Q2CQKSF-DSY_W0YL.js +1 -0
  102. package/dist/ui/assets/stateDiagram-v2-ATKHQDJO-DYavre2v.js +291 -0
  103. package/dist/ui/assets/swimlanes-YQL5WMAO-CUTCsfPM.js +1 -0
  104. package/dist/ui/assets/swimlanesDiagram-UCCPES4V-B7bXxKVr.js +8 -0
  105. package/dist/ui/assets/timeline-definition-7Z437IG3-HWrtH0QT.js +120 -0
  106. package/dist/ui/assets/treeView-D4JQ5SDB-B5lbyI_M.js +1 -0
  107. package/dist/ui/assets/treemap-SAJKECNS-Ckfi-DGc.js +1 -0
  108. package/dist/ui/assets/usecaseDiagram-RDK6N6HP-BuKN2NAW.js +328 -0
  109. package/dist/ui/assets/vennDiagram-SHRQU5PJ-s2gljkjP.js +34 -0
  110. package/dist/ui/assets/wardley-7MLQ67FV-CjAqYBcP.js +1 -0
  111. package/dist/ui/assets/wardleyDiagram-F3OXNVQS-Ba_SoMTx.js +78 -0
  112. package/dist/ui/assets/xychartDiagram-GDYJKCDI-FsxUUoqL.js +7 -0
  113. package/dist/ui/index.html +2 -2
  114. package/dist/{upgrade-FND3UBJR.js → upgrade-M6TR3IBW.js} +15 -15
  115. package/migrations/0006_arch_auto.sql +8 -0
  116. package/package.json +1 -1
  117. package/dist/chunk-3ZLMW2RI.js +0 -74
  118. package/dist/ui/assets/index-4WzXlYHs.css +0 -1
  119. package/dist/ui/assets/index-ZKfByx7Q.js +0 -42
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sizeCapture-2Q2CQKSF-DSY_W0YL.js","./chunk-Y2CYZVJY-DsF7k-Jl.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./index-CXK8WmR8.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n}from"./d3-selection-BFzs9NTX.js";import{b as r,y as i}from"./chunk-QDWOWVBQ-Du0KmhW4.js";import{c as a,i as o,l as s,m as c,s as l,t as u,v as d,y as f}from"./chunk-MDAHDJXZ-YMIkXJ0O.js";import{_ as p}from"./chunk-OWCVCYLK-4-W-ynqW.js";import{o as m}from"./chunk-GZTWQ64R-CKGVWw4I.js";import{i as h,n as g,r as _,t as ee}from"./chunk-MPYPSXSE-C-CxVwa7.js";import{t as v}from"./graphlib-DS17s2tU.js";import{r as y,t as b}from"./chunk-F3AE6A5H-DTVcMSk7.js";function x(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(x,`createLayoutElementGroups`);async function S(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await m(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}t(S,`measureGroupLabel`);async function C(e,t,n){let r=await _(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(C,`insertMeasuredNode`);function w(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}t(w,`resolveNodeDir`);async function T(t,n,i={}){let a=new v({multigraph:!0,compound:!0}),o=[...n.edges],c=r(),u=x(t),{edgeLabels:d,nodes:f}=u,p=new Map,m=new Map(n.nodes.map(e=>[e.id,e])),h=n.direction,g=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup){if(g){let t=i.unwrapGroupLabels&&e.labelType!==`markdown`;await S(f,e,t?1/0:void 0)}a.setNode(e.id,{...e})}else{if(g){let t=await C(f,e,{config:c,dir:w(e,m,h)});p.set(e.id,t)}a.setNode(e.id,{...e})}}));for(let e of o)g&&l(e)&&await s(d,e),a.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-2Q2CQKSF-DSY_W0YL.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]),import.meta.url);r(t,n)}return{graph:a,groups:u,nodeElements:p}}t(T,`createGraphWithElements`);var E=new Map,D=new Map,O=new Map,k=t(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=t((e,t)=>{let r=D.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),j=t((e,t)=>{let r=D.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||A(e.v,t)||A(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),M=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)M(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{j(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),N=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),F=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=F(e,t,r),i=P(t,r,n);if(n){if(i.length>0)a=n;else return n}}return a},`findNonClusterChild`),I=t(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,F(t,e,t)),D.set(t,N(t,e)),E.set(t,{id:F(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,D),i.forEach(e=>{A(e.v,t)^A(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,D.get(t)),E.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,D)});for(let t of E.keys()){let n=E.get(t).id,r=e.parent(n);r!==t&&E.has(r)&&!E.get(r).externalConnections&&(E.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&E.get(t)?.externalConnections&&i&&B(e,n,t)){let r=ne(e,t,e.parent(n));r&&(E.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,E,`ids:`,t.v,t.w,`Translating: `,E.get(t.v),` --- `,E.get(t.w)),E.get(t.v)||E.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=I(t.v),a=I(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);E.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);E.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),R(e,0),n.trace(E)},`adjustClustersAndEdges`),R=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!E.has(i))n.debug(`Not a cluster`,i,t);else if(!E.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,n.debug(`Fixing dir`,E.get(i).clusterData.dir,r));let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(E);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&R(r.graph,t+1)}},`extractor`),z=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),te=t(e=>z(e,e.children()),`sortNodesByHierarchy`),B=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=E.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),ne=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||A(i,n))continue;let r=F(i,e,t);if(r&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function V({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??U;return t(async function(t,n,l,u){let d=n.select(`g`);(l?.insertMarkers??c)(d,t.markers,t.type,t.diagramId),H();let f={element:d,helpers:l,options:u};f.preparedLayout=await e?.(t,f);let p=await s(t,f),m=await r(t,f),h={...f,measure:p};i?await i(t,h,m):await W(t,h,o),await a?.(t,h,m)},`render`)}t(V,`createCommonLayoutRenderer`);function H(){ee(),u(),b(),k()}t(H,`clearLayoutRenderState`);async function U(e,{element:t},n){return await T(t,e,n)}t(U,`defaultMeasureLayout`);async function W(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await G(i,r,t,n);let a=q(e.nodes);for(let r of e.edges)J(r,n)||await Y(i,r,a,e,n,t)}t(W,`paintLayoutData`);async function G(e,t,n,r){t.clusterNode?h(t):K(t,n,r)?await y(e.clusters,t):h(t)}t(G,`paintLayoutNode`);function K(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(K,`shouldPaintAsCluster`);function q(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(q,`buildNodeLookup`);function J(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(J,`shouldSkipPaintEdge`);async function Y(e,t,n,r,i,c){let u=a(e.edgePaths,{...t},i.clusterDb??new Map,r.type,X(t.start,t,n,c,i),X(t.end,t,n,c,i),r.diagramId,Z(t,i),r.layoutAlgorithm);l(t)&&(o.has(t.id)||await s(e.edgeLabels,t),Q(t,u))}t(Y,`paintLayoutEdge`);function X(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(X,`getRenderedNode`);function Z(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Z,`shouldSkipIntersect`);function Q(e,t){let n=t?.updatedPath??t?.originalPath,r=i(),{subGraphTitleTotalMargin:a}=g({flowchart:r.flowchart??{}});if(e.label){let n=o.get(e.id),{x:r,y:i}=d(e,t);n.attr(`transform`,`translate(${r}, ${i+a/2})`)}for(let[t,r]of[[`startLeft`,e.startLabelLeft],[`startRight`,e.startLabelRight],[`endLeft`,e.endLabelLeft],[`endRight`,e.endLabelRight]])if(r){let{x:r,y:i}=$(e,t,n);f.get(e.id)[t].attr(`transform`,`translate(${r}, ${i})`)}}t(Q,`positionRenderedEdgeLabel`);var re={startLeft:`start_left`,startRight:`start_right`,endLeft:`end_left`,endRight:`end_right`};function $(e,t,n){let r=e.terminalLabelCenters?.[t];if(r)return{...r};if(!n)return{x:e.x,y:e.y};let i=t.startsWith(`start`)?e.arrowTypeStart:e.arrowTypeEnd;return p.calcTerminalLabelPosition(i?10:0,re[t],n)}t($,`terminalLabelTranslate`);export{x as a,C as c,V as i,te as l,H as n,U as o,E as r,F as s,L as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-BFzs9NTX.js";import{b as r,g as i,w as a}from"./chunk-QDWOWVBQ-Du0KmhW4.js";import{n as o}from"./chunk-ND7LMLKX-lfusdDHU.js";import{a as s,i as c,t as l}from"./chunk-DZSZGQHW-BCXsfFfT.js";import{s as u}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{t as d}from"./rough.esm-Dy-Kn_BL.js";import{i as f,n as p,t as m}from"./chunk-GZTWQ64R-CKGVWw4I.js";import{n as h}from"./chunk-MPYPSXSE-C-CxVwa7.js";var g=e(async(e,a,{variant:l=`swimlane`}={})=>{let p=l===`pool`,m=p?`pool swimlane`:`swimlane`,h=p?`pool-label swimlane-label`:`swimlane-label`,g=p?`pool-title swimlane-title`:`swimlane-title`,_=p?`pool-body swimlane-body`:`swimlane-body`,v=r(),{theme:y,themeVariables:b,handDrawnSeed:x}=v,{clusterBkg:S,clusterBorder:C,borderColorArray:w}=b,T=C,{labelStyles:E,nodeStyles:D,borderStyles:O,backgroundStyles:k}=c(a),A=e.insert(`g`).attr(`class`,`cluster `+m+` `+(a.cssClasses||``)).attr(`id`,a.domId??a.id).attr(`data-id`,a.id).attr(`data-et`,`cluster`).attr(`data-look`,a.look);u(A,a.colorIndex,y,w);let j=i(v.flowchart.htmlLabels),M=a.direction===`LR`,N=A.insert(`g`).attr(`class`,`cluster-label `+h),P=await o(N,a.label,{style:a.labelStyle,useHtmlLabels:j,isNode:!0,width:a.width}),F=P.getBBox();if(j){let e=P.children[0],t=n(P);F=e.getBoundingClientRect(),t.attr(`width`,F.width),t.attr(`height`,F.height)}let I=a.padding??0,L=a.width<=F.width+I?F.width+I:a.width;a.diff=a.width<=F.width+I?(L-a.width)/2-I:-I;let R=a.height,z=a.y-R/2,B=a.y+R/2,V=a.x-L/2,H=a.swimlaneContentTop===void 0?z+R/3:a.swimlaneContentTop,U=M?4:0,W=F.height+2*U,G,K;if(M){let e=Math.max(W,F.height+2*U),t=V+e,n=Math.max(0,L-e);if(a.look===`handDrawn`){let r=d.svg(A),i=s(a,{roughness:.7,fill:S,stroke:T,seed:x}),o=s(a,{roughness:.7,fill:`none`,stroke:T,seed:x}),c=r.rectangle(V,z,e,R,i);G=A.insert(()=>c,`:first-child`).attr(`class`,g);let l=r.rectangle(t,z,n,R,o);K=A.insert(()=>l,`:first-child`).attr(`class`,_),G.select(`path:nth-child(2)`).attr(`style`,O.join(`;`)),G.select(`path`).attr(`style`,k.join(`;`).replace(`fill`,`stroke`))}else G=A.insert(`rect`,`:first-child`),K=A.insert(`rect`,`:first-child`),G.attr(`class`,g).attr(`style`,D).attr(`x`,V).attr(`y`,z).attr(`width`,e).attr(`height`,R).attr(`fill`,S).attr(`stroke`,T),K.attr(`class`,_).attr(`style`,D).attr(`x`,t).attr(`y`,z).attr(`width`,n).attr(`height`,R).attr(`fill`,`none`).attr(`stroke`,T);let r=V+e/2,i=a.y;N.attr(`transform`,`translate(${r}, ${i}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let e=Math.max(0,H-z),t=Math.min(W,e),n=z+t,r=Math.max(0,B-n),i=a.x-L/2;if(a.look===`handDrawn`){let e=d.svg(A),o=s(a,{roughness:.7,fill:S,stroke:T,fillWeight:3,seed:x}),c=s(a,{roughness:.7,fill:`none`,stroke:T,seed:x}),l=e.rectangle(i,z,L,t,o);G=A.insert(()=>l,`:first-child`).attr(`class`,g);let u=e.rectangle(i,n,L,r,c);K=A.insert(()=>u,`:first-child`).attr(`class`,_),G.select(`path:nth-child(2)`).attr(`style`,O.join(`;`)),G.select(`path`).attr(`style`,k.join(`;`).replace(`fill`,`stroke`))}else G=A.insert(`rect`,`:first-child`),K=A.insert(`rect`,`:first-child`),G.attr(`class`,g).attr(`style`,D).attr(`x`,i).attr(`y`,z).attr(`width`,L).attr(`height`,t).attr(`fill`,S).attr(`stroke`,T),K.attr(`class`,_).attr(`style`,D).attr(`x`,i).attr(`y`,n).attr(`width`,L).attr(`height`,r).attr(`fill`,`none`).attr(`stroke`,T);let o=a.x-F.width/2,c=z+(t-F.height)/2;N.attr(`transform`,`translate(${o}, ${c})`)}if(t.trace(`Swimlane data `,a,JSON.stringify(a)),E){let e=N.select(`span`);e&&e.attr(`style`,E)}return a.offsetX=0,a.width=L,a.height=R,a.offsetY=F.height-I/2,a.intersect=function(e){return f(a,e)},{cluster:A,labelBBox:F}},`swimlane`),_=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=r(),{theme:g,themeVariables:_,handDrawnSeed:v}=l,{clusterBkg:y,clusterBorder:b,borderColorArray:x}=_,{labelStyles:S,nodeStyles:C,borderStyles:w,backgroundStyles:T}=c(i),E=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look);u(E,i.colorIndex,g,x);let D=a(l),O=E.insert(`g`).attr(`class`,`cluster-label `),k;k=i.labelType===`markdown`?await o(O,i.label,{style:i.labelStyle,useHtmlLabels:D,isNode:!0,width:i.width}):await m(O,i.label,i.labelStyle||``,!1,!0);let A=k.getBBox();if(a(l)){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let j=i.width<=A.width+i.padding?A.width+i.padding:i.width;i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let M=i.height,N=i.x-j/2,P=i.y-M/2;t.trace(`Data `,i,JSON.stringify(i));let F;if(i.look===`handDrawn`){let e=d.svg(E),n=s(i,{roughness:.7,fill:y,stroke:b,fillWeight:3,seed:v}),r=e.path(p(N,P,j,M,0),n);F=E.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),F.select(`path:nth-child(2)`).attr(`style`,w.join(`;`)),F.select(`path`).attr(`style`,T.join(`;`).replace(`fill`,`stroke`))}else F=E.insert(`rect`,`:first-child`),F.attr(`style`,C).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,N).attr(`y`,P).attr(`width`,j).attr(`height`,M);let{subGraphTitleTopMargin:I}=h(l);if(O.attr(`transform`,`translate(${i.x-A.width/2}, ${i.y-i.height/2+I})`),S){let e=O.select(`span`);e&&e.attr(`style`,S)}let L=F.node().getBBox();return i.offsetX=0,i.width=L.width,i.height=L.height,i.offsetY=A.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`rect`),v=e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),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 f(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),y=e(async(e,t)=>{let i=r(),{theme:o,themeVariables:s,handDrawnSeed:c}=i,{altBackground:l,borderColorArray:h,compositeBackground:g,compositeTitleBackground:_,nodeBorder:v}=s,y=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look);u(y,t.colorIndex,o,h);let b=y.insert(`g`,`:first-child`),x=y.insert(`g`).attr(`class`,`cluster-label`),S=y.append(`rect`),C=await m(x,t.label,t.labelStyle,void 0,!0),w=C.getBBox();if(a(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=0*t.padding,E=T/2,D=(t.width<=w.width+t.padding?w.width+t.padding:t.width)+T;t.diff=t.width<=w.width+t.padding?(D-t.width)/2-t.padding:-t.padding;let O=t.height+T,k=t.height+T-w.height-6,A=t.x-D/2,j=t.y-O/2;t.width=D;let M=t.y-t.height/2-E+w.height+2,N;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=d.svg(y),r=t.rx||t.ry?n.path(p(A,j,D,O,10),{roughness:.7,fill:_,fillStyle:`solid`,stroke:v,seed:c}):n.rectangle(A,j,D,O,{seed:c});N=y.insert(()=>r,`:first-child`);let i=n.rectangle(A,M,D,k,{fill:e?l:g,fillStyle:e?`hachure`:`solid`,stroke:v,seed:c});N=y.insert(()=>r,`:first-child`),S=y.insert(()=>i),N.attr(`class`,`outer`),S.attr(`class`,`inner`)}else N=b.insert(`rect`,`:first-child`),N.attr(`class`,`outer`).attr(`x`,A).attr(`y`,j).attr(`width`,D).attr(`height`,O).attr(`data-look`,t.look),S.attr(`class`,`inner`).attr(`x`,A).attr(`y`,M).attr(`width`,D).attr(`height`,k);return x.attr(`transform`,`translate(${t.x-w.width/2}, ${j+1-(a(i)?0:3)})`),t.height=N.node().getBBox().height,t.offsetX=0,t.offsetY=w.height-t.padding/2,t.labelBBox=w,t.intersect=function(e){return f(t,e)},{cluster:y,labelBBox:w}},`roundedWithTitle`),b=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let l=r(),{themeVariables:u,handDrawnSeed:m}=l,{clusterBkg:g,clusterBorder:_}=u,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=c(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=a(l),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await o(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(a(l)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=d.svg(S),n=s(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:m}),r=e.path(p(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=h(l);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),x=e((e,t)=>{let{theme:n,themeVariables:i,handDrawnSeed:a}=r(),{altBackground:o,nodeBorder:s,borderColorArray:c}=i,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look);u(l,t.colorIndex,n,c);let p=l.insert(`g`,`:first-child`),m=0*t.padding,h=t.width+m;t.diff=-t.padding;let g=t.height+m,_=t.x-h/2,v=t.y-g/2;t.width=h;let y;if(t.look===`handDrawn`){let e=d.svg(l).rectangle(_,v,h,g,{fill:o??`#efefef`,fillStyle:`solid`,roughness:.5,strokeLineDash:[5],stroke:s,seed:a});y=l.insert(()=>e,`:first-child`).attr(`class`,`divider`)}else{y=p.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),y.attr(`class`,e).attr(`x`,_).attr(`y`,v).attr(`width`,h).attr(`height`,g).attr(`data-look`,t.look)}return t.height=y.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return f(t,e)},{cluster:l,labelBBox:{}}},`divider`),S=e(async(e,i,l)=>{t.info(`Creating ${l.cssClass} for `,i.id,i);let g=r(),{theme:_,themeVariables:v,handDrawnSeed:y}=g,{borderColorArray:b}=v,{labelStyles:x,borderStyles:S}=c(i),C=e.insert(`g`).attr(`class`,`cluster `+l.cssClass+` `+i.cssClasses).attr(`id`,i.domId??i.id).attr(`data-look`,i.look);u(C,i.colorIndex,_,b);let w=a(g),T=C.insert(`g`).attr(`class`,`cluster-label`),E={width:0,height:0},D=i.label?.trim();if(D){let e;if(e=i.labelType===`markdown`?await o(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await m(T,i.label,i.labelStyle||``,!1,!0),E=e.getBBox(),w){let t=e.children[0],r=n(e);E=t.getBoundingClientRect(),r.attr(`width`,E.width),r.attr(`height`,E.height)}}let O=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2,M;if(i.look===`handDrawn`){let e=d.svg(C),t=s(i,{roughness:l.roughness,fill:l.fill,stroke:l.stroke,strokeWidth:l.strokeWidth,seed:y,...l.fill===`none`?{fillWeight:0}:{fillStyle:`solid`},...l.strokeDash?{strokeLineDash:l.strokeDash}:{}}),n=e.path(p(A,j,O,k,l.rx),t);M=C.insert(()=>n,`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,S.join(`;`))}else M=C.insert(`rect`,`:first-child`),M.attr(`rx`,l.rx).attr(`ry`,l.rx).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k).attr(`fill`,l.fill).attr(`stroke`,l.stroke).attr(`stroke-width`,l.strokeWidth+`px`),l.strokeDash&&M.attr(`stroke-dasharray`,l.strokeDash.join(`, `));if(D){let{subGraphTitleTopMargin:e}=h(g);if(T.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+e})`),x){let e=T.select(`span`);e&&e.attr(`style`,x)}}let N=M.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return f(i,e)},{cluster:C,labelBBox:E}},`createContainerGroup`),C=e(async(e,t)=>{let{themeVariables:n}=r();return S(e,t,{cssClass:`flow-cluster`,rx:10,fill:`none`,stroke:n.flowContainerStroke||n.secondaryBorderColor,strokeWidth:.75,roughness:.7})},`flowGroup`),w=e((e,t)=>{let n=e.boundaryType||`rect`,r=n===`package`?20:e.padding,i=n===`package`?t.height+10:0,a=Math.max(e.width,t.width+r),o=n===`package`?Math.max(e.height,i+e.padding*2):e.height,s=e.x-a/2,c=e.y-o/2;return{boundaryType:n,width:a,height:o,x:s,y:c,bodyY:c+i,bodyHeight:o-i,tabHeight:i,tabWidth:n===`package`?Math.min(a,Math.max(80,t.width+20)):0}},`getUsecaseSystemBoundaryGeometry`),T={rect:_,squareRect:_,roundedWithTitle:y,noteGroup:v,divider:x,kanbanSection:b,flowGroup:C,usecaseSystemBoundary:e(async(e,i)=>{t.info(`Creating usecase system boundary for `,i.id,i);let p=r(),{theme:m,themeVariables:g,handDrawnSeed:_}=p,{clusterBkg:v,clusterBorder:y,borderColorArray:b}=g,{labelStyles:x,nodeStyles:S}=c(i),{stylesMap:C}=l(i),T=i.boundaryType||`rect`,E=e.insert(`g`).attr(`class`,`cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr(`id`,typeof i.domId==`string`?i.domId:i.id).attr(`data-boundary-type`,T).attr(`data-look`,i.look);u(E,i.colorIndex,m,b);let D=a(p),O=E.insert(`g`).attr(`class`,`cluster-label system-boundary-title`),k=await o(O,i.label,{style:x,useHtmlLabels:D,isNode:!0}),A=k.getBBox();if(D){let e=k.children[0],t=n(k);A=e.getBoundingClientRect(),t.attr(`width`,A.width),t.attr(`height`,A.height)}let{width:j,height:M,x:N,y:P,bodyY:F,bodyHeight:I,tabHeight:L,tabWidth:R}=w(i,A);i.diff=i.width<=A.width+i.padding?(j-i.width)/2-i.padding:-i.padding;let z=s(i,{fill:C.get(`fill`)||v,stroke:C.get(`stroke`)||y,strokeWidth:C.get(`stroke-width`)?.replace(`px`,``)||1,seed:_});if(i.look===`handDrawn`){let e=d.svg(E),t=e.rectangle(N,F,j,I,z);if(E.insert(()=>t,`:first-child`).attr(`class`,`boundary-body label-container`),T===`package`){let t=e.rectangle(N,P,R,L,z);E.insert(()=>t,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`)}}else E.insert(`rect`,`:first-child`).attr(`class`,`boundary-body label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,F).attr(`width`,j).attr(`height`,I),T===`package`&&E.insert(`rect`,`:first-child`).attr(`class`,`boundary-tab system-boundary-package-tab label-container`).attr(`style`,S).attr(`x`,N).attr(`y`,P).attr(`width`,R).attr(`height`,L);let{subGraphTitleTopMargin:B}=h(p);return T===`package`?O.attr(`transform`,`translate(${N+(R-A.width)/2}, ${P+(L-A.height)/2})`):O.attr(`transform`,`translate(${i.x-A.width/2}, ${P+B})`),x&&(O.attr(`style`,x),O.select(`span`).attr(`style`,x)),i.offsetX=0,i.width=j,i.height=M,i.offsetY=A.height-i.padding/2,i.labelBBox=A,i.intersect=function(e){return f(i,e)},{cluster:E,labelBBox:A}},`usecaseSystemBoundary`),swimlane:g,pool:e((e,t)=>g(e,t,{variant:`pool`}),`pool`)},E=new Set([`noteGroup`,`divider`]),D=e(e=>!E.has(e??`rect`),`clusterPaintsTitle`),O=new Map,k=e(async(e,t)=>{let n=await T[t.shape||`rect`](e,t);return O.set(t.id,n),n},`insertCluster`),A=e(()=>{O=new Map},`clear`);export{D as n,k as r,A as t};
@@ -0,0 +1,213 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-BFzs9NTX.js";import{C as r,G as i,W as a,Y as o,_ as s,a as c,b as l,d as u,it as d,lt as f,q as p,rt as m,s as h,v as g}from"./chunk-QDWOWVBQ-Du0KmhW4.js";import{b as _,d as v,o as ee}from"./chunk-MDAHDJXZ-YMIkXJ0O.js";import{_ as y,c as b}from"./chunk-OWCVCYLK-4-W-ynqW.js";import{t as x}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{i as S,n as C,o as w,r as T}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{a as E}from"./chunk-GZTWQ64R-CKGVWw4I.js";import{t as D}from"./chunk-D5HYT7QG-imLQxbAy.js";import{t as O}from"./chunk-XXDRQBXY-DSL17ZTh.js";import{t as k}from"./chunk-CNRTWJTD-DJuDnaYn.js";import{t as A}from"./chunk-KTR4FSNJ-DSr3q0Xy.js";import{i as te,n as ne,r as re,t as ie}from"./mermaid.core-BVgUieVU.js";var ae=`flowchart-`,j=[`row`,`column`,`horizontalAlign`,`verticalAlign`],M=new Set([`shape`,`label`,`icon`,`form`,`pos`,`img`,`w`,`h`,`constraint`,`priority`,`assigned`,`ticket`,`labelType`,`view`,...j]);function N(e,t=!1){if(!e)return;let n=e,r={};for(let e of j)Object.hasOwn(n,e)&&(r[e]=n[e]);return t&&Object.hasOwn(n,`algorithm`)&&(r.algorithm=n.algorithm),Object.keys(r).length>0?r:void 0}e(N,`pickFlowchartLayoutMetadata`);var P=[`laneRole`,`laneIndex`,`drawnExtent`];function F(e){if(!e||typeof e!=`object`)return e;let t={...e};for(let e of P)Reflect.deleteProperty(t,e);return t}e(F,`withoutInternalKeys`);var oe=class{constructor(){this.vertexCounter=0,this.config=l(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i,this.setAccDescription=a,this.setDiagramTitle=o,this.getAccTitle=g,this.getAccDescription=s,this.getDiagramTitle=r,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return h.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let u;if(c!==void 0){let e;e=c.includes(`
2
+ `)?c+`
3
+ `:`{
4
+ `+c+`
5
+ }`,u=F(A(ne(e,{schema:ie})))}let d=this.subGraphLookup.get(e);if(d&&u){Object.keys(u).length>0&&(d.metadata={...d.metadata,...u});return}let f=this.edges.find(t=>t.id===e);if(f){let n=u;n?.animate!==void 0&&(f.animate=n.animate),n?.animation!==void 0&&(f.animation=n.animation),n?.curve!==void 0&&(f.interpolate=n.curve),n?.step!==void 0&&(v(n)?f.step=n.step:t.warn(`Ignoring step on edge ${e}: expected a positive integer`,n.step));return}let p,m=this.vertices.get(e);if(m===void 0&&(n===void 0&&r===void 0&&i!=null&&t.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),m={id:e,labelType:`text`,domId:ae+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,m)),this.vertexCounter++,n===void 0?m.text===void 0&&(m.text=e):(this.config=l(),p=this.sanitizeText(n.text.trim()),m.labelType=n.type,p.startsWith(`"`)&&p.endsWith(`"`)&&(p=p.substring(1,p.length-1)),m.text=p),r!==void 0&&(m.type=r),i?.forEach(e=>{m.styles.push(e)}),a?.forEach(e=>{m.classes.push(e)}),o!==void 0&&(m.dir=o),m.props===void 0?m.props=s:s!==void 0&&Object.assign(m.props,s),u!==void 0){if(m.metadata={...m.metadata,...u},u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes(`_`))throw Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!E(u.shape))throw Error(`No such shape: ${u.shape}.`);m.type=u?.shape}u?.label&&(m.text=u?.label,m.labelType=this.sanitizeNodeLabelType(u?.labelType)),u?.icon&&(m.icon=u?.icon,!u.label?.trim()&&m.text===e&&(m.text=``)),u?.form&&(m.form=u?.form),u?.pos&&(m.pos=u?.pos),u?.img&&(m.img=u?.img,!u.label?.trim()&&m.text===e&&(m.text=``)),u?.constraint&&(m.constraint=u.constraint),u.w&&(m.assetWidth=Number(u.w)),u.h&&(m.assetHeight=Number(u.h))}}addSingleLink(e,n,r,i){let a={start:e,end:n,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};t.info(`abc78 Got edge...`,a);let o=r.text;if(o!==void 0&&(a.text=this.sanitizeText(o.text.trim()),a.text.startsWith(`"`)&&a.text.endsWith(`"`)&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),i&&!this.edges.some(e=>e.id===i))a.id=i,a.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===a.start&&e.end===a.end);a.id=e.length===0?b(a.start,a.end,{counter:0,prefix:`L`}):b(a.start,a.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))t.info(`Pushing edge...`),this.edges.push(a);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
6
+
7
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
8
+ You cannot set this config via configuration inside the diagram as it is a secure config.
9
+ You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,n,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;t.info(`addLink`,e,n,i);for(let t of e)for(let a of n){let o=t===e[e.length-1],s=a===n[0];o&&s?this.addSingleLink(t,a,r,i):this.addSingleLink(t,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e==="default"?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);e==="default"?this.edges.defaultStyle=t:(this.edges[e].style=t,(this.edges[e]?.style?.length??0)>0&&!this.edges[e]?.style?.some(e=>e?.startsWith(`fill`))&&this.edges[e]?.style?.push(`fill:none`))})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n?.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction=`RL`),/.*\^/.exec(this.direction)&&(this.direction=`BT`),/.*>/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(l().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith(`"`)&&t.endsWith(`"`)&&(t=t.substr(1,t.length-2)),r[e]=t}}r.length===0&&r.push(e);let i=this.vertices.get(e);i&&(i.haveCallback=!0,this.funs.push(()=>{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{y.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=y.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=D();n(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{let r=n(e.currentTarget),i=r.attr(`title`);if(i===null)return;let a=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.text(r.attr(`title`)).style(`left`,window.scrollX+a.left+(a.right-a.left)/2+`px`).style(`top`,window.scrollY+a.bottom+`px`),t.html(d.sanitize(i)),r.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=l(),c()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(n,r,i){let a=n.text.trim(),o=i.text;n===i&&/\s/.exec(i.text)&&(a=void 0);let s=e(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i].hasOwnProperty(e)?!1:t[i][e]=!0:!n.includes(e)&&n.push(e)}),dir:r}},`uniq`)(r.flat()),c=s.nodeList,u=s.dir,d=l().flowchart??{};if(u??=d.inheritDir?this.getDirection()??l().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;e<c.length;e++)c[e]=this.lookUpDomId(c[e]);a??=`subGraph`+this.subCount,o||=``,o=this.sanitizeText(o),this.subCount+=1;let f={id:a,nodes:c,title:o.trim(),classes:[],dir:u,labelType:this.sanitizeNodeLabelType(i?.type)};t.info(`Adding`,f.id,f.nodes,f.dir);let p=this.makeUniq(f,this.subGraphs).nodes;this.recordDroppedMembers(f,p),f.nodes=p.filter(e=>e!==a);let m=this.subGraphs.find(e=>e.id===a);return m?m.nodes.push(...f.nodes):this.subGraphs.push(f),this.subGraphLookup.set(a,m??f),a}recordDroppedMembers(e,t){let n=new Set(t);for(let t of e.nodes){if(n.has(t)||t===e.id)continue;let r=this.subGraphs.find(e=>e.nodes.includes(t));r&&r.id!==e.id&&!this.isNestedIn(r.id,e)&&this.droppedSubGraphMembers.push({node:t,keptBy:r.id,droppedFrom:e.id})}}isNestedIn(e,t){let n=new Set,r=e;for(;r!==void 0&&!n.has(r);){if(t.nodes.includes(r))return!0;n.add(r);let e=r;r=this.subGraphs.find(t=>t.nodes.includes(e))?.id}return!1}getPosForId(e){for(let[t,n]of this.subGraphs.entries())if(n.id===e)return t;return-1}indexNodes2(e,t){let n=this.subGraphs[t].nodes;if(this.secCount+=1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let r=0,i=1;for(;r<n.length;){let t=this.getPosForId(n[r]);if(t>=0){let n=this.indexNodes2(e,t);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2(`none`,this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}countChar(e,t){let n=t.length,r=0;for(let i=0;i<n;++i)t[i]===e&&++r;return r}destructEndLink(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`,t.startsWith(`x`)&&(r=`double_`+r,n=n.slice(1));break;case`>`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=this.countChar(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;if(t){if(r=this.destructStartLink(t),r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}return n}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=[];return e.nodes.forEach((r,i)=>{this.exists(t,r)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t=`none`,n=`arrow_point`;switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:n=e;break;case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:t=e.replace(`double_`,``),n=t}return{arrowTypeStart:t,arrowTypeEnd:n}}addNodeFromVertex(e,t,n,r,i,a){let o=n.get(e.id),s=r.get(e.id)??!1,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.cssClasses=e.classes.join(` `);else{let n={id:e.id,label:e.text,labelType:e.labelType,labelStyle:``,parentId:o,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles([`default`,`node`,...e.classes]),cssClasses:`default `+e.classes.join(` `),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint,metadata:N(e.metadata)};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:i.flowchart?.minNodeWidth})}}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}getData(){let t=l(),n=[],r=[],i=this.getSubGraphs(),a=new Map,o=new Map,s=new Map;for(let e of i)for(let t of e.nodes)this.subGraphLookup.has(t)&&s.set(t,e.id);let c=new Map,u=new Map;for(let e of i){let t=s.get(e.id);t!==void 0&&u.set(t,[...u.get(t)??[],e.id])}let d=0,f=e(e=>{c.set(e,d++);for(let t of u.get(e)??[])f(t)},`walk`);for(let e of i)s.has(e.id)||f(e.id);let p=e(e=>this.subGraphLookup.get(e)?.metadata?.view===`collapsed`,`isCollapsed`),m=e(e=>{let t,n=new Set,r=e;for(;r!==void 0&&!n.has(r);)n.add(r),p(r)&&(t=r),r=s.get(r);return t},`outermostCollapsed`),h=new Set,g=new Map;for(let e of i){let t=m(e.id);if(t!==void 0){e.id!==t&&(h.add(e.id),g.set(e.id,t));for(let n of e.nodes)n!==t&&(h.add(n),g.set(n,t))}}for(let e=i.length-1;e>=0;e--){let t=i[e];if(!h.has(t.id)){t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes)a.set(e,t.id)}}for(let e=i.length-1;e>=0;e--){let r=i[e];h.has(r.id)||(r.metadata?.view===`collapsed`?n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`collapsedGroup`,dir:r.dir,isGroup:!1,look:t.look,colorIndex:c.get(r.id)}):n.push({id:r.id,label:r.title,labelStyle:``,labelType:r.labelType,parentId:a.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(` `),shape:`rect`,dir:r.dir,isGroup:!0,look:t.look,colorIndex:c.get(r.id),metadata:N(r.metadata,!0)}))}this.getVertices().forEach(e=>{h.has(e.id)||this.addNodeFromVertex(e,n,a,o,t,t.look||`classic`)});let _=this.getEdges(),y=_.reduce((e,t)=>v(t)?Math.max(e,t.step):e,0),x=ee(t.flowchart?.stepDuration),S=t.flowchart?.stepNumbers===!0?{showStepNumber:!0}:{};return _.forEach((e,n)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(e.type),o=[..._.defaultStyle??[]],s=g.get(e.start)??e.start,c=g.get(e.end)??e.end;if(s===c&&(g.has(e.start)||g.has(e.end)))return;e.style&&o.push(...e.style);let l={id:b(s,c,{counter:n,prefix:`L`},e.id),isUserDefinedId:e.isUserDefinedId,start:s,end:c,type:e.type??`normal`,label:e.text,labelType:e.labelType,labelpos:`c`,thickness:e.stroke,minlen:e.length,classes:e?.stroke===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:e?.stroke===`invisible`||e?.type===`arrow_open`?`none`:i,arrowTypeEnd:e?.stroke===`invisible`||e?.type===`arrow_open`?`none`:a,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:o,style:o,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,...v(e)?{step:e.step,stepCount:y,stepDuration:x,...S}:{},curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};r.push(l)}),{nodes:n,edges:r,other:this.droppedSubGraphMembers.length>0?{droppedSubGraphMembers:[...this.droppedSubGraphMembers]}:{},config:t}}validate(){if(l().layout!==`grid`)return;let e=[...this.vertices.values(),...this.subGraphs];m(void 0,e);for(let n of e){let e=this.subGraphLookup.has(n.id);for(let r of Object.keys(n.metadata??{}))M.has(r)||e&&r===`algorithm`||t.warn(`Unknown metadata key "${r}" on ${e?`subgraph`:`node`} "${n.id}" with grid layout.`)}}defaultConfig(){return u.flowchart}},se={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing state diagram (v2)`,n);let{securityLevel:a,flowchart:o,layout:s}=l();i.db.setDiagramId(n),t.debug(`Before getData: `);let c=i.db.getData();t.debug(`Data: `,c);let u=O(n,a),d=i.db.getDirection();c.type=i.type,c.layoutAlgorithm=re(s),c.direction=d,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`point`,`circle`,`cross`],c.diagramId=n,t.debug(`REF1:`,c),await te(c,u);let f=c.config.flowchart?.diagramPadding??8;y.insertTitle(u,`flowchartTitleText`,o?.titleTopMargin||0,i.db.getDiagramTitle()),k(u,f,`flowchart`,o?.useMaxWidth||!1)},`draw`)},I=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,27,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],o=[2,2],s=[1,13],c=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],h=[1,51],g=[1,50],_=[1,30],v=[1,31],ee=[1,32],y=[1,33],b=[1,34],x=[1,46],S=[1,48],C=[1,44],w=[1,49],T=[1,45],E=[1,52],D=[1,47],O=[1,53],k=[1,54],A=[1,35],te=[1,36],ne=[1,37],re=[1,38],ie=[1,39],ae=[1,59],j=[1,8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],M=[1,63],N=[1,62],P=[1,64],F=[8,9,11,76,78,79],oe=[1,80],se=[1,81],I=[1,95],ce=[1,100],le=[1,99],ue=[1,96],de=[1,92],fe=[1,98],pe=[1,94],me=[1,101],he=[1,97],ge=[1,102],_e=[1,93],ve=[8,9,10,11,40,76,78,79],L=[8,9,10,11,40,47,76,78,79],R=[8,9,10,11,29,40,45,47,49,51,53,55,57,59,61,64,66,68,69,71,76,78,79,90,103,106,107,110,112,115,116,117],ye=[8,9,11,45,61,76,78,79,90,103,106,107,110,112,115,116,117],be=[2,26],xe=[45,61,90,103,106,107,110,112,115,116,117],Se=[1,126],Ce=[1,127],we=[1,129],Te=[1,128],Ee=[45,61,63,75,90,103,106,107,110,112,115,116,117],De=[1,138],Oe=[1,152],ke=[1,153],Ae=[1,154],je=[1,155],Me=[1,140],Ne=[1,142],Pe=[1,146],Fe=[1,147],Ie=[1,148],Le=[1,149],Re=[1,150],ze=[1,151],Be=[1,156],Ve=[1,157],He=[1,136],Ue=[1,137],We=[1,144],Ge=[1,139],Ke=[1,143],qe=[1,141],Je=[8,9,10,11,27,32,34,36,38,45,61,85,86,87,88,89,90,103,106,107,110,112,115,116,117,122,123,124,125,126],Ye=[1,159],Xe=[8,9,10,11,76,78,79],Ze=[1,160],Qe=[1,162],z=[8,9,11],B=[8,9,10,11,14,45,61,90,106,107,110,112,115,116,117],V=[1,182],H=[1,178],U=[1,179],W=[1,183],G=[1,180],K=[1,181],$e=[78,117,120],q=[8,9,10,11,12,14,27,29,32,45,61,76,85,86,87,88,89,90,91,106,110,112,115,116,117],et=[10,107],tt=[31,50,52,54,56,58,63,65,67,68,70,72,117,118,119],J=[1,253],Y=[1,251],X=[1,255],Z=[1,249],nt=[1,250],rt=[1,252],it=[1,254],Q=[1,256],at=[1,273],ot=[8,9,11,107],$=[8,9,10,11,61,85,106,107,110,111,112,113],st={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,withShape:41,node:42,link:43,styledVertex:44,AMP:45,vertex:46,STYLE_SEPARATOR:47,idString:48,DOUBLECIRCLESTART:49,DOUBLECIRCLEEND:50,PS:51,PE:52,"(-":53,"-)":54,STADIUMSTART:55,STADIUMEND:56,SUBROUTINESTART:57,SUBROUTINEEND:58,VERTEX_WITH_PROPS_START:59,"NODE_STRING[field]":60,COLON:61,"NODE_STRING[value]":62,PIPE:63,CYLINDERSTART:64,CYLINDEREND:65,DIAMOND_START:66,DIAMOND_STOP:67,TAGEND:68,TRAPSTART:69,TRAPEND:70,INVTRAPSTART:71,INVTRAPEND:72,linkStatement:73,arrowText:74,TESTSTR:75,START_LINK:76,edgeText:77,LINK:78,LINK_ID:79,edgeTextToken:80,STR:81,MD_STR:82,textToken:83,keywords:84,STYLE:85,LINKSTYLE:86,CLASSDEF:87,CLASS:88,CLICK:89,DOWN:90,UP:91,textNoTagsToken:92,stylesOpt:93,"idString[vertex]":94,"idString[class]":95,CALLBACKNAME:96,CALLBACKARGS:97,HREF:98,LINK_TARGET:99,"STR[link]":100,"STR[tooltip]":101,alphaNum:102,DEFAULT:103,numList:104,INTERPOLATE:105,NUM:106,COMMA:107,style:108,styleComponent:109,NODE_STRING:110,UNIT:111,BRKT:112,PCT:113,idStringToken:114,MINUS:115,MULT:116,UNICODE_TEXT:117,TEXT:118,TAGSTART:119,EDGE_TEXT:120,alphaNumToken:121,direction_tb:122,direction_bt:123,direction_rl:124,direction_lr:125,direction_td:126,$accept:0,$end:1},terminals_:{2:`error`,8:`SEMI`,9:`NEWLINE`,10:`SPACE`,11:`EOF`,12:`GRAPH`,13:`NODIR`,14:`DIR`,27:`subgraph`,29:`SQS`,31:`SQE`,32:`end`,34:`acc_title`,35:`acc_title_value`,36:`acc_descr`,37:`acc_descr_value`,38:`acc_descr_multiline_value`,40:`SHAPE_DATA`,45:`AMP`,47:`STYLE_SEPARATOR`,49:`DOUBLECIRCLESTART`,50:`DOUBLECIRCLEEND`,51:`PS`,52:`PE`,53:`(-`,54:`-)`,55:`STADIUMSTART`,56:`STADIUMEND`,57:`SUBROUTINESTART`,58:`SUBROUTINEEND`,59:`VERTEX_WITH_PROPS_START`,60:`NODE_STRING[field]`,61:`COLON`,62:`NODE_STRING[value]`,63:`PIPE`,64:`CYLINDERSTART`,65:`CYLINDEREND`,66:`DIAMOND_START`,67:`DIAMOND_STOP`,68:`TAGEND`,69:`TRAPSTART`,70:`TRAPEND`,71:`INVTRAPSTART`,72:`INVTRAPEND`,75:`TESTSTR`,76:`START_LINK`,78:`LINK`,79:`LINK_ID`,81:`STR`,82:`MD_STR`,85:`STYLE`,86:`LINKSTYLE`,87:`CLASSDEF`,88:`CLASS`,89:`CLICK`,90:`DOWN`,91:`UP`,94:`idString[vertex]`,95:`idString[class]`,96:`CALLBACKNAME`,97:`CALLBACKARGS`,98:`HREF`,99:`LINK_TARGET`,100:`STR[link]`,101:`STR[tooltip]`,103:`DEFAULT`,105:`INTERPOLATE`,106:`NUM`,107:`COMMA`,110:`NODE_STRING`,111:`UNIT`,112:`BRKT`,113:`PCT`,115:`MINUS`,116:`MULT`,117:`UNICODE_TEXT`,118:`TEXT`,119:`TAGSTART`,120:`EDGE_TEXT`,122:`direction_tb`,123:`direction_bt`,124:`direction_rl`,125:`direction_lr`,126:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[41,2],[41,3],[20,3],[20,4],[20,3],[20,4],[20,2],[20,1],[20,2],[20,1],[42,1],[42,5],[42,5],[44,1],[44,3],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,8],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[43,2],[43,3],[43,3],[43,1],[43,3],[43,4],[77,1],[77,2],[77,1],[77,1],[73,1],[73,2],[74,3],[30,1],[30,2],[30,1],[30,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[104,1],[104,3],[93,1],[93,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[114,1],[83,1],[83,1],[83,1],[83,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[80,1],[80,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[48,1],[48,2],[102,1],[102,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 187:this.$=a[s];break;case 11:r.setDirection(`TB`),this.$=`TB`;break;case 12:r.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 43:this.$=a[s-1]+a[s];break;case 44:this.$=a[s];break;case 45:this.$={nodes:a[s-1],shapeData:a[s]};break;case 46:this.$={nodes:a[s-2],shapeData:a[s]};break;case 47:r.addVertex(a[s].nodes[a[s].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s].shapeData),r.addLink(a[s-2].stmt,a[s].nodes,a[s-1]),this.$={stmt:a[s].nodes,nodes:a[s].nodes.concat(a[s-2].nodes)};break;case 48:r.addVertex(a[s-1].nodes[a[s-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-1].shapeData),r.addLink(a[s-3].stmt,a[s-1].nodes,a[s-2]),this.$={stmt:a[s-1].nodes,nodes:a[s-1].nodes.concat(a[s-3].nodes)};break;case 49:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 50:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 51:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 52:r.addVertex(a[s].nodes[a[s].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s].shapeData),this.$={stmt:a[s].nodes,nodes:a[s].nodes,shapeData:a[s].shapeData};break;case 53:r.addVertex(a[s-1].nodes[a[s-1].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-1].shapeData),this.$={stmt:a[s-1].nodes,nodes:a[s-1].nodes,shapeData:a[s-1].shapeData};break;case 54:this.$={stmt:a[s],nodes:a[s]};break;case 55:this.$=[a[s]];break;case 56:r.addVertex(a[s-4].nodes[a[s-4].nodes.length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4].shapeData),this.$=a[s-4].nodes.concat(a[s]);break;case 57:this.$=a[s-4].concat(a[s]);break;case 58:this.$=a[s];break;case 59:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`);break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`);break;case 62:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`);break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`);break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`);break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`);break;case 66:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],`rect`,void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`);break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`);break;case 70:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`);break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`);break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`);break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`);break;case 74:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`);break;case 75:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`);break;case 76:this.$=a[s],r.addVertex(a[s]);break;case 77:a[s-1].text=a[s],this.$=a[s-1];break;case 78:case 79:a[s-2].text=a[s-1],this.$=a[s-2];break;case 80:this.$=a[s];break;case 81:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 82:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1],id:a[s-3]};break;case 83:this.$={text:a[s],type:`text`};break;case 84:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 85:this.$={text:a[s],type:`string`};break;case 86:this.$={text:a[s],type:`markdown`};break;case 87:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 88:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,id:a[s-1]};break;case 89:this.$=a[s-1];break;case 90:this.$={text:a[s],type:`text`};break;case 91:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 92:this.$={text:a[s],type:`string`};break;case 93:case 108:this.$={text:a[s],type:`markdown`};break;case 105:this.$={text:a[s],type:`text`};break;case 106:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 107:this.$={text:a[s],type:`text`};break;case 109:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 110:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 111:case 119:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 112:case 120:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 113:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 114:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 115:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 116:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 117:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 118:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 121:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 122:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 123:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 124:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 125:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 126:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 127:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 128:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 129:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 130:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 131:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 132:case 134:this.$=[a[s]];break;case 133:case 135:a[s-2].push(a[s]),this.$=a[s-2];break;case 137:this.$=a[s-1]+a[s];break;case 185:this.$=a[s];break;case 186:this.$=a[s-1]+``+a[s];break;case 188:this.$=a[s-1]+``+a[s];break;case 189:this.$={stmt:`dir`,value:`TB`};break;case 190:this.$={stmt:`dir`,value:`BT`};break;case 191:this.$={stmt:`dir`,value:`RL`};break;case 192:this.$={stmt:`dir`,value:`LR`};break;case 193:this.$={stmt:`dir`,value:`TD`}}},`anonymous`),table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},t(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,41:29,42:28,44:40,45:h,46:41,48:42,61:g,85:_,86:v,87:ee,88:y,89:b,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k,122:A,123:te,124:ne,125:re,126:ie},t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),{8:[1,56],9:[1,57],10:ae,15:55,18:58},t(j,[2,3]),t(j,[2,4]),t(j,[2,5]),t(j,[2,6]),t(j,[2,7]),t(j,[2,8]),{8:M,9:N,11:P,21:60,43:61,73:65,76:[1,66],78:[1,68],79:[1,67]},{8:M,9:N,11:P,21:69},{8:M,9:N,11:P,21:70},{8:M,9:N,11:P,21:71},{8:M,9:N,11:P,21:72},{8:M,9:N,11:P,21:73},{8:M,9:N,10:[1,74],11:P,21:75},t(j,[2,36]),{35:[1,76]},{37:[1,77]},t(j,[2,39]),t(F,[2,54],{18:78,39:79,10:oe,40:se}),t(F,[2,52],{18:82,10:ae}),{10:[1,83]},{10:[1,84]},{10:[1,85]},{10:[1,86]},{14:I,45:ce,61:le,81:[1,90],90:ue,96:[1,87],98:[1,88],102:89,106:de,107:fe,110:pe,112:me,115:he,116:ge,117:_e,121:91},t(j,[2,189]),t(j,[2,190]),t(j,[2,191]),t(j,[2,192]),t(j,[2,193]),t(ve,[2,55]),t(ve,[2,58],{47:[1,103]}),t(L,[2,76],{114:116,29:[1,104],45:h,49:[1,105],51:[1,106],53:[1,107],55:[1,108],57:[1,109],59:[1,110],61:g,64:[1,111],66:[1,112],68:[1,113],69:[1,114],71:[1,115],90:x,103:S,106:C,107:w,110:T,112:E,115:D,116:O,117:k}),t(R,[2,185]),t(R,[2,146]),t(R,[2,147]),t(R,[2,148]),t(R,[2,149]),t(R,[2,150]),t(R,[2,151]),t(R,[2,152]),t(R,[2,153]),t(R,[2,154]),t(R,[2,155]),t(R,[2,156]),t(a,[2,12]),t(a,[2,18]),t(a,[2,19]),{9:[1,117]},t(ye,be,{18:118,10:ae}),t(j,[2,27]),{41:119,42:120,44:40,45:h,46:41,48:42,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},t(j,[2,40]),t(j,[2,41]),t(j,[2,42]),t(xe,[2,80],{74:121,63:[1,123],75:[1,122]}),{77:124,80:125,81:Se,82:Ce,117:we,120:Te},{76:[1,130],78:[1,131]},t(Ee,[2,87]),t(j,[2,28]),t(j,[2,29]),t(j,[2,30]),t(j,[2,31]),t(j,[2,32]),{10:De,12:Oe,14:ke,27:Ae,28:132,32:je,45:Me,61:Ne,76:Pe,81:[1,134],82:[1,135],84:145,85:Fe,86:Ie,87:Le,88:Re,89:ze,90:Be,91:Ve,92:133,106:He,110:Ue,112:We,115:Ge,116:Ke,117:qe},t(Je,o,{5:158}),t(j,[2,37]),t(j,[2,38]),t(F,[2,51],{45:Ye}),t(Xe,[2,45],{40:Ze}),t([8,9,11,45,76,78,79],be,{18:118,39:161,10:ae,40:se}),t(ve,[2,44]),t(F,[2,53],{45:Qe}),{45:h,48:163,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},{103:[1,164],104:165,106:[1,166]},{45:h,48:167,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},{45:h,48:168,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},t(z,[2,111],{10:[1,169],97:[1,170]}),{81:[1,171]},t(z,[2,119],{121:173,10:[1,172],14:I,45:ce,61:le,90:ue,106:de,107:fe,110:pe,112:me,115:he,116:ge,117:_e}),t(z,[2,121],{10:[1,174]}),t(B,[2,187]),t(B,[2,174]),t(B,[2,175]),t(B,[2,176]),t(B,[2,177]),t(B,[2,178]),t(B,[2,179]),t(B,[2,180]),t(B,[2,181]),t(B,[2,182]),t(B,[2,183]),t(B,[2,184]),{45:h,48:175,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},{30:176,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:184,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:186,51:[1,185],68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:187,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:188,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:189,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{110:[1,190]},{30:191,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:192,66:[1,193],68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:194,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:195,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{30:196,68:V,81:H,82:U,83:177,117:W,118:G,119:K},t(R,[2,186]),t(a,[2,20]),t(ye,[2,25]),t(F,[2,47],{18:197,10:ae}),t(F,[2,49],{39:79,18:198,10:oe,40:se}),t(xe,[2,77],{10:[1,199]}),{10:[1,200]},{30:201,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{78:[1,202],80:203,117:we,120:Te},t($e,[2,83]),t($e,[2,85]),t($e,[2,86]),t($e,[2,172]),t($e,[2,173]),{77:204,80:125,81:Se,82:Ce,117:we,120:Te},t(Ee,[2,88]),{8:M,9:N,10:De,11:P,12:Oe,14:ke,21:206,27:Ae,29:[1,205],32:je,45:Me,61:Ne,76:Pe,84:145,85:Fe,86:Ie,87:Le,88:Re,89:ze,90:Be,91:Ve,92:207,106:He,110:Ue,112:We,115:Ge,116:Ke,117:qe},t(q,[2,105]),t(q,[2,107]),t(q,[2,108]),t(q,[2,161]),t(q,[2,162]),t(q,[2,163]),t(q,[2,164]),t(q,[2,165]),t(q,[2,166]),t(q,[2,167]),t(q,[2,168]),t(q,[2,169]),t(q,[2,170]),t(q,[2,171]),t(q,[2,94]),t(q,[2,95]),t(q,[2,96]),t(q,[2,97]),t(q,[2,98]),t(q,[2,99]),t(q,[2,100]),t(q,[2,101]),t(q,[2,102]),t(q,[2,103]),t(q,[2,104]),{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,208],33:24,34:f,36:p,38:m,41:29,42:28,44:40,45:h,46:41,48:42,61:g,85:_,86:v,87:ee,88:y,89:b,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k,122:A,123:te,124:ne,125:re,126:ie},{10:ae,18:209},t(ve,[2,43]),t(Xe,[2,46],{40:Ze}),{10:ae,18:210},{10:[1,211],45:h,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:116,115:D,116:O,117:k},{10:[1,212]},{10:[1,213],107:[1,214]},t(et,[2,132]),{10:[1,215],45:h,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:116,115:D,116:O,117:k},{10:[1,216],45:h,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:116,115:D,116:O,117:k},{81:[1,217]},t(z,[2,113],{10:[1,218]}),t(z,[2,115],{10:[1,219]}),{81:[1,220]},t(B,[2,188]),{81:[1,221],99:[1,222]},t(ve,[2,59],{114:116,45:h,61:g,90:x,103:S,106:C,107:w,110:T,112:E,115:D,116:O,117:k}),{31:[1,223],68:V,83:224,117:W,118:G,119:K},t(tt,[2,90]),t(tt,[2,92]),t(tt,[2,93]),t(tt,[2,157]),t(tt,[2,158]),t(tt,[2,159]),t(tt,[2,160]),{50:[1,225],68:V,83:224,117:W,118:G,119:K},{30:226,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{52:[1,227],68:V,83:224,117:W,118:G,119:K},{54:[1,228],68:V,83:224,117:W,118:G,119:K},{56:[1,229],68:V,83:224,117:W,118:G,119:K},{58:[1,230],68:V,83:224,117:W,118:G,119:K},{61:[1,231]},{65:[1,232],68:V,83:224,117:W,118:G,119:K},{67:[1,233],68:V,83:224,117:W,118:G,119:K},{30:234,68:V,81:H,82:U,83:177,117:W,118:G,119:K},{31:[1,235],68:V,83:224,117:W,118:G,119:K},{68:V,70:[1,236],72:[1,237],83:224,117:W,118:G,119:K},{68:V,70:[1,239],72:[1,238],83:224,117:W,118:G,119:K},t(F,[2,48],{45:Qe}),t(F,[2,50],{45:Ye}),t(xe,[2,79]),t(xe,[2,78]),{63:[1,240],68:V,83:224,117:W,118:G,119:K},t(xe,[2,81]),t($e,[2,84]),{78:[1,241],80:203,117:we,120:Te},{30:242,68:V,81:H,82:U,83:177,117:W,118:G,119:K},t(Je,o,{5:243}),t(q,[2,106]),t(j,[2,35]),{44:244,45:h,46:41,48:42,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},{44:245,45:h,46:41,48:42,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},{10:J,61:Y,85:X,93:246,106:Z,108:247,109:248,110:nt,111:rt,112:it,113:Q},{10:J,61:Y,85:X,93:257,105:[1,258],106:Z,108:247,109:248,110:nt,111:rt,112:it,113:Q},{10:J,61:Y,85:X,93:259,105:[1,260],106:Z,108:247,109:248,110:nt,111:rt,112:it,113:Q},{106:[1,261]},{10:J,61:Y,85:X,93:262,106:Z,108:247,109:248,110:nt,111:rt,112:it,113:Q},{45:h,48:263,61:g,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k},t(z,[2,112]),{81:[1,264]},{81:[1,265],99:[1,266]},t(z,[2,120]),t(z,[2,122],{10:[1,267]}),t(z,[2,123]),t(L,[2,60]),t(tt,[2,91]),t(L,[2,61]),{52:[1,268],68:V,83:224,117:W,118:G,119:K},t(L,[2,68]),t(L,[2,63]),t(L,[2,64]),t(L,[2,65]),{110:[1,269]},t(L,[2,67]),t(L,[2,69]),{67:[1,270],68:V,83:224,117:W,118:G,119:K},t(L,[2,71]),t(L,[2,72]),t(L,[2,74]),t(L,[2,73]),t(L,[2,75]),t([10,45,61,90,103,106,107,110,112,115,116,117],[2,89]),t(xe,[2,82]),{31:[1,271],68:V,83:224,117:W,118:G,119:K},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,272],33:24,34:f,36:p,38:m,41:29,42:28,44:40,45:h,46:41,48:42,61:g,85:_,86:v,87:ee,88:y,89:b,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k,122:A,123:te,124:ne,125:re,126:ie},t(ve,[2,57]),t(ve,[2,56]),t(z,[2,125],{107:at}),t(ot,[2,134],{109:274,10:J,61:Y,85:X,106:Z,110:nt,111:rt,112:it,113:Q}),t($,[2,136]),t($,[2,138]),t($,[2,139]),t($,[2,140]),t($,[2,141]),t($,[2,142]),t($,[2,143]),t($,[2,144]),t($,[2,145]),t(z,[2,126],{107:at}),{10:[1,275]},t(z,[2,127],{107:at}),{10:[1,276]},t(et,[2,133]),t(z,[2,109],{107:at}),t(z,[2,110],{114:116,45:h,61:g,90:x,103:S,106:C,107:w,110:T,112:E,115:D,116:O,117:k}),t(z,[2,114]),t(z,[2,116],{10:[1,277]}),t(z,[2,117]),{99:[1,278]},{52:[1,279]},{63:[1,280]},{67:[1,281]},{8:M,9:N,11:P,21:282},t(j,[2,34]),{10:J,61:Y,85:X,106:Z,108:283,109:248,110:nt,111:rt,112:it,113:Q},t($,[2,137]),{14:I,45:ce,61:le,90:ue,102:284,106:de,107:fe,110:pe,112:me,115:he,116:ge,117:_e,121:91},{14:I,45:ce,61:le,90:ue,102:285,106:de,107:fe,110:pe,112:me,115:he,116:ge,117:_e,121:91},{99:[1,286]},t(z,[2,124]),t(L,[2,62]),{30:287,68:V,81:H,82:U,83:177,117:W,118:G,119:K},t(L,[2,70]),t(Je,o,{5:288}),t(ot,[2,135],{109:274,10:J,61:Y,85:X,106:Z,110:nt,111:rt,112:it,113:Q}),t(z,[2,130],{121:173,10:[1,289],14:I,45:ce,61:le,90:ue,106:de,107:fe,110:pe,112:me,115:he,116:ge,117:_e}),t(z,[2,131],{121:173,10:[1,290],14:I,45:ce,61:le,90:ue,106:de,107:fe,110:pe,112:me,115:he,116:ge,117:_e}),t(z,[2,118]),{31:[1,291],68:V,83:224,117:W,118:G,119:K},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,292],33:24,34:f,36:p,38:m,41:29,42:28,44:40,45:h,46:41,48:42,61:g,85:_,86:v,87:ee,88:y,89:b,90:x,103:S,106:C,107:w,110:T,112:E,114:43,115:D,116:O,117:k,122:A,123:te,124:ne,125:re,126:ie},{10:J,61:Y,85:X,93:293,106:Z,108:247,109:248,110:nt,111:rt,112:it,113:Q},{10:J,61:Y,85:X,93:294,106:Z,108:247,109:248,110:nt,111:rt,112:it,113:Q},t(L,[2,66]),t(j,[2,33]),t(z,[2,128],{107:at}),t(z,[2,129],{107:at})],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var ee=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function y(e){r.length-=2*e,a.length-=e,o.length-=e}e(y,`popStack`);function b(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(b,`lex`);for(var x,S,C,w,T,E={},D,O,k,A;;){if(C=r[r.length-1],this.defaultActions[C]?w=this.defaultActions[C]:(x??=b(),w=s[C]&&s[C][x]),w===void 0||!w.length||!w[0]){var te=``;for(D in A=[],s[C])this.terminals_[D]&&D>f&&A.push(`'`+this.terminals_[D]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
10
+ `+h.showPosition()+`
11
+ Expecting `+A.join(`, `)+`, got '`+(this.terminals_[x]||x)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(x==p?`end of input`:`'`+(this.terminals_[x]||x)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[x]||x,line:h.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw Error(`Parse Error: multiple actions possible at state: `+C+`, token: `+x);switch(w[0]){case 1:r.push(x),a.push(h.yytext),o.push(h.yylloc),r.push(w[1]),x=null,S?(x=S,S=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(O=this.productions_[w[1]][1],E.$=a[a.length-O],E._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},ee&&(E._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),T=this.performAction.apply(E,[c,u,l,g.yy,w[1],a,o].concat(m)),T!==void 0)return T;O&&(r=r.slice(0,-1*O*2),a=a.slice(0,-1*O),o=o.slice(0,-1*O)),r.push(this.productions_[w[1]][0]),a.push(E.$),o.push(E._$),k=s[r[r.length-2]][r[r.length-1]],r.push(k);break;case 3:return!0}}return!0},`parse`)};st.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
12
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
13
+ `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
14
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 96;case 17:this.popState();break;case 18:return 97;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 85;case 26:return 103;case 27:return 86;case 28:return 105;case 29:return 87;case 30:return 88;case 31:return 98;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 89;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return e.lex.firstGraph()&&this.begin(`dir`),12;case 39:return 27;case 40:return 32;case 41:return 99;case 42:return 99;case 43:return 99;case 44:return 99;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 126;case 61:return 79;case 62:return 106;case 63:return 112;case 64:return 47;case 65:return 61;case 66:return 45;case 67:return 8;case 68:return 107;case 69:return 116;case 70:return this.popState(),78;case 71:return this.pushState(`edgeText`),76;case 72:return 120;case 73:return this.popState(),78;case 74:return this.pushState(`thickEdgeText`),76;case 75:return 120;case 76:return this.popState(),78;case 77:return this.pushState(`dottedEdgeText`),76;case 78:return 120;case 79:return 78;case 80:return this.popState(),54;case 81:return`TEXT`;case 82:return this.pushState(`ellipseText`),53;case 83:return this.popState(),56;case 84:return this.pushState(`text`),55;case 85:return this.popState(),58;case 86:return this.pushState(`text`),57;case 87:return 59;case 88:return this.pushState(`text`),68;case 89:return this.popState(),65;case 90:return this.pushState(`text`),64;case 91:return this.popState(),50;case 92:return this.pushState(`text`),49;case 93:return this.popState(),70;case 94:return this.popState(),72;case 95:return 118;case 96:return this.pushState(`trapText`),69;case 97:return this.pushState(`trapText`),71;case 98:return 119;case 99:return 68;case 100:return 91;case 101:return`SEP`;case 102:return 90;case 103:return 116;case 104:return 112;case 105:return 45;case 106:return 110;case 107:return 115;case 108:return 117;case 109:return this.popState(),63;case 110:return this.pushState(`text`),63;case 111:return this.popState(),52;case 112:return this.pushState(`text`),51;case 113:return this.popState(),31;case 114:return this.pushState(`text`),29;case 115:return this.popState(),67;case 116:return this.pushState(`text`),66;case 117:return`TEXT`;case 118:return`QUOTE`;case 119:return 9;case 120:return 10;case 121:return 11}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"\[\]\(\)\{\}\|]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}})();function ct(){this.yy={}}return e(ct,`Parser`),ct.prototype=st,st.Parser=ct,new ct})();I.parser=I;var ce=I,le=Object.assign({},ce);le.parse=e=>{let t=e.replace(/}\s*\n/g,`}
15
+ `);return ce.parse(t)};var ue=le,de=e(t=>{let{theme:n,bkgColorArray:r,borderColorArray:i}=t;if(!S(n,i))return``;let a=w(t.look),o=T(r),s=``;for(let n=0;n<C(t.THEME_COLOR_LIMIT,i);n++){let t=i[n%i.length],c=o?`fill: ${r[n%r.length]};`:``,l=`[data-look="${a}"][data-color-id="color-${n}"]`,u=e(e=>`${l}.node ${e}, ${l}.rough-node ${e}`,`collapsedRule`),d=e(e=>`${l}.swimlane.cluster .swimlane-title${e}, ${l}.swimlane.cluster .swimlane-body${e}`,`laneRule`);s+=`
16
+
17
+ ${l}.cluster:not(.swimlane) rect {
18
+ stroke: ${t};
19
+ ${c}
20
+ }
21
+
22
+ ${l}.cluster:not(.swimlane) path {
23
+ stroke: ${t};
24
+ ${c}
25
+ }
26
+
27
+ /* Lane, classic and neo. */
28
+ ${l}.swimlane.cluster rect.swimlane-title,
29
+ ${l}.swimlane.cluster rect.swimlane-body {
30
+ stroke: ${t};
31
+ ${c}
32
+ }
33
+
34
+ /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
35
+ ${d(` path:nth-of-type(2)`)} {
36
+ stroke: ${t};
37
+ }
38
+ ${o?`
39
+ /* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */
40
+ ${d(` path:first-of-type`)} {
41
+ stroke: ${r[n%r.length]};
42
+ }
43
+ `:``}
44
+ ${u(`.collapsed-group`)},
45
+ ${u(`.collapsed-group path`)} {
46
+ stroke: ${t};
47
+ ${c}
48
+ }
49
+
50
+ /* The ellipsis dots and the separator take clusterBorder further down, so without
51
+ these the container is palette-coloured while its own markers are not. */
52
+ ${u(`.collapsed-indicator`)} {
53
+ fill: ${t};
54
+ }
55
+
56
+ ${u(`.collapsed-separator`)} {
57
+ stroke: ${t};
58
+ }
59
+ `}return s},`genColor`),fe=e((e,t)=>{let n=_,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return f(r,i,a,t)},`fade`),pe=e(e=>`${de(e)}
60
+ .label {
61
+ font-family: ${e.fontFamily};
62
+ color: ${e.nodeTextColor||e.textColor};
63
+ }
64
+ .cluster-label text {
65
+ fill: ${e.titleColor};
66
+ }
67
+ .cluster-label span {
68
+ color: ${e.titleColor};
69
+ }
70
+ .cluster-label span p {
71
+ background-color: transparent;
72
+ }
73
+
74
+ .label text,span {
75
+ fill: ${e.nodeTextColor||e.textColor};
76
+ color: ${e.nodeTextColor||e.textColor};
77
+ }
78
+
79
+ .node rect,
80
+ .node circle,
81
+ .node ellipse,
82
+ .node polygon,
83
+ .node path {
84
+ fill: ${e.mainBkg};
85
+ stroke: ${e.nodeBorder};
86
+ stroke-width: ${e.strokeWidth??1}px;
87
+ }
88
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
89
+ text-anchor: middle;
90
+ }
91
+
92
+ .node .katex path {
93
+ fill: #000;
94
+ stroke: #000;
95
+ stroke-width: 1px;
96
+ }
97
+
98
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
99
+ text-align: center;
100
+ }
101
+ .node.clickable {
102
+ cursor: pointer;
103
+ }
104
+
105
+
106
+ .root .anchor path {
107
+ fill: ${e.lineColor} !important;
108
+ stroke-width: 0;
109
+ stroke: ${e.lineColor};
110
+ }
111
+
112
+ .arrowheadPath {
113
+ fill: ${e.arrowheadColor};
114
+ }
115
+
116
+ .edgePaths .path {
117
+ stroke: ${e.lineColor};
118
+ stroke-width: ${e.strokeWidth??2}px;
119
+ }
120
+
121
+ .flowchart-link {
122
+ stroke: ${e.lineColor};
123
+ fill: none;
124
+ }
125
+
126
+ .edgeLabel {
127
+ background-color: ${e.edgeLabelBackground};
128
+ p {
129
+ background-color: ${e.edgeLabelBackground};
130
+ }
131
+ rect {
132
+ opacity: 0.5;
133
+ background-color: ${e.edgeLabelBackground};
134
+ fill: ${e.edgeLabelBackground};
135
+ }
136
+ text-align: center;
137
+ }
138
+
139
+ /* For html labels only */
140
+ .labelBkg {
141
+ background-color: ${fe(e.edgeLabelBackground,.5)};
142
+ // background-color:
143
+ }
144
+
145
+ .cluster rect {
146
+ fill: ${e.clusterBkg};
147
+ stroke: ${e.clusterBorder};
148
+ stroke-width: 1px;
149
+ }
150
+
151
+ .cluster text {
152
+ fill: ${e.titleColor};
153
+ }
154
+
155
+ .cluster span {
156
+ color: ${e.titleColor};
157
+ }
158
+ /* .cluster div {
159
+ color: ${e.titleColor};
160
+ } */
161
+
162
+ /* Collapsed subgraph node (@{ view: collapsed }) */
163
+ .node .collapsed-indicator {
164
+ fill: ${e.clusterBorder};
165
+ stroke: none;
166
+ opacity: 0.6;
167
+ }
168
+
169
+ .node .collapsed-separator {
170
+ stroke: ${e.clusterBorder};
171
+ stroke-width: 0.75px;
172
+ }
173
+
174
+ div.mermaidTooltip {
175
+ position: absolute;
176
+ text-align: center;
177
+ max-width: 200px;
178
+ padding: 2px;
179
+ font-family: ${e.fontFamily};
180
+ font-size: 12px;
181
+ background: ${e.tertiaryColor};
182
+ border: 1px solid ${e.border2};
183
+ border-radius: 2px;
184
+ pointer-events: none;
185
+ z-index: 100;
186
+ }
187
+
188
+ .flowchartTitleText {
189
+ text-anchor: middle;
190
+ font-size: 18px;
191
+ fill: ${e.textColor};
192
+ }
193
+
194
+ rect.text {
195
+ fill: none;
196
+ stroke-width: 0;
197
+ }
198
+
199
+ .icon-shape, .image-shape {
200
+ background-color: ${e.edgeLabelBackground};
201
+ p {
202
+ background-color: ${e.edgeLabelBackground};
203
+ padding: 2px;
204
+ }
205
+ .label rect {
206
+ opacity: 0.5;
207
+ background-color: ${e.edgeLabelBackground};
208
+ fill: ${e.edgeLabelBackground};
209
+ }
210
+ text-align: center;
211
+ }
212
+ ${x()}
213
+ `,`getStyles`),me=e(({styles:t=pe}={})=>({parser:ue,get db(){return new oe},renderer:se,styles:t,init:e(e=>{e.flowchart||={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,p({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)}),`createFlowDiagram`),he=me();export{he as n,pe as r,me as t};