@maggioli-rd/aicore-agent-chat 1.1.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -14
- package/dist/aicore-agent-chat.js +59 -38
- package/dist/aicore-agent-chat.js.map +1 -1
- package/dist/bundle/a2ui-C3GhjTrJ.js +113 -0
- package/dist/bundle/abnfDiagram-S7VZAUFO-DxkzIS8G.js +1 -0
- package/dist/bundle/architecture-WOLXFQ4H-BXMyXdT1.js +1 -0
- package/dist/bundle/architectureDiagram-YGSQEFNW-BmsDn6Ho.js +36 -0
- package/dist/bundle/blockDiagram-APKKGZFW-bG_MVPzT.js +140 -0
- package/dist/bundle/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
- package/dist/bundle/c4Diagram-KJ2TOQU5-BVad-wQe.js +38 -0
- package/dist/bundle/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/bundle/chunk-5VM5RSS4-CwNG0iBi.js +15 -0
- package/dist/bundle/chunk-6MUBBAK2-CeH4cZO-.js +2 -0
- package/dist/bundle/chunk-AXFCVDMN-D0Vqm50X.js +62 -0
- package/dist/bundle/chunk-BG4553SI-DUBI9JbR.js +127 -0
- package/dist/bundle/chunk-DQASFODM-DBWVlIjs.js +10 -0
- package/dist/bundle/chunk-DUW6YSOI-ChybIQ82.js +1 -0
- package/dist/bundle/chunk-HFQBQIA3-D2xPptW8.js +1 -0
- package/dist/bundle/chunk-J5ZVWO5B-DHB__t6z.js +1 -0
- package/dist/bundle/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/bundle/chunk-KQLB2F66-BRGnyo9e.js +1 -0
- package/dist/bundle/chunk-KS47KZWR-DV3Gxewa.js +1 -0
- package/dist/bundle/chunk-LEVMRMFU-BdDTT4pw.js +1 -0
- package/dist/bundle/chunk-M57EVK23-BRqFqW5o.js +1 -0
- package/dist/bundle/chunk-NGNAAXSQ-DreF1ykJ.js +214 -0
- package/dist/bundle/chunk-OY52VR5R-BamrP8d_.js +88 -0
- package/dist/bundle/chunk-QB3YPZ4I-BqUUL29j.js +213 -0
- package/dist/bundle/chunk-R3KSYZAL-gmtEjdKU.js +1 -0
- package/dist/bundle/chunk-STOXU5M4-DdqxXfKq.js +72 -0
- package/dist/bundle/chunk-TU62E6Q5-B4GgWjUW.js +1 -0
- package/dist/bundle/chunk-X4PVCEUW-BcN5Aq5G.js +1 -0
- package/dist/bundle/chunk-XXDRQBXY-BIvjAdC_.js +1 -0
- package/dist/bundle/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/bundle/classDiagram-v2-L25IHNXF-Dw7so3mk.js +217 -0
- package/dist/bundle/cose-bilkent-JH36ORCC-DUvnuVrm.js +1 -0
- package/dist/bundle/cynefin-EF2NZ3EQ-CcVPiRLN.js +1 -0
- package/dist/bundle/cynefinDiagram-L36ESFBY-eO6Z3Kvn.js +62 -0
- package/dist/bundle/cytoscape.esm-CsT4DLSP.js +321 -0
- package/dist/bundle/d3-hierarchy-i5r04UUG.js +1 -0
- package/dist/bundle/d3-scale-BEO6F4Sh.js +1 -0
- package/dist/bundle/d3-scale-chromatic-DhHjp77O.js +1 -0
- package/dist/bundle/d3-selection-CBFxn8wf.js +1 -0
- package/dist/bundle/d3-shape-v1Y4qR5e.js +1 -0
- package/dist/bundle/dagre-SPEB5RXH-ByBZqBaT.js +4 -0
- package/dist/bundle/diagram-3B7GL73J-BkQkIpxz.js +200 -0
- package/dist/bundle/diagram-DNEMPZML-DYthXzRv.js +24 -0
- package/dist/bundle/diagram-L3MUGCDN-D4DIzfHH.js +41 -0
- package/dist/bundle/diagram-LA4NIPWU-C2P-hZD1.js +24 -0
- package/dist/bundle/diagram-MHCOC4E2-BwauFnTV.js +3 -0
- package/dist/bundle/diagram-XPFHEONP-DC_v3Llc.js +30 -0
- package/dist/bundle/dist-CwuaKeLF.js +1 -0
- package/dist/bundle/ebnfDiagram-UZSYDL2S-CmwGlC8L.js +1 -0
- package/dist/bundle/elk-XV6XMXQE-CTlty3p3.js +27 -0
- package/dist/bundle/erDiagram-EYBAPDEH-Bu6phvJH.js +99 -0
- package/dist/bundle/eventmodeling-K75KTNOO-B1q0nOJE.js +1 -0
- package/dist/bundle/flowDiagram-MALGAFMO-D9D_AzXh.js +1 -0
- package/dist/bundle/ganttDiagram-23REXITY-COK7rxO4.js +292 -0
- package/dist/bundle/gitGraph-VSP46ZUC-DS7S_jKI.js +1 -0
- package/dist/bundle/gitGraphDiagram-STJD7YCW-DhVK8Hqh.js +106 -0
- package/dist/bundle/graphlib-Bgy7WbC7.js +1 -0
- package/dist/bundle/info-OHQRW6UA-BjEWvFlW.js +1 -0
- package/dist/bundle/infoDiagram-KBXO4MBG-Dg3zWdHP.js +2 -0
- package/dist/bundle/ishikawaDiagram-M35NCXHK-C2g8ghrV.js +70 -0
- package/dist/bundle/journeyDiagram-OPLOXDXO-DMZkL-i1.js +139 -0
- package/dist/bundle/kanban-definition-BZKZHSQY-Dr43IiJD.js +89 -0
- package/dist/bundle/katex-rAoShGnF.js +257 -0
- package/dist/bundle/math-Cx-Q-b8s.js +262 -0
- package/dist/bundle/mermaid-DaDuEHir.js +43 -0
- package/dist/bundle/mermaid-parser.core-Bv_Zx_ZE.js +6 -0
- package/dist/bundle/mindmap-definition-I2QAS2VK-BXCWJ_1R.js +98 -0
- package/dist/bundle/packet-JDAUHWVQ-CgB2qE5t.js +1 -0
- package/dist/bundle/pegDiagram-FD4XPPHP-CR58gOgF.js +1 -0
- package/dist/bundle/pie-XZMESJXO-CvXWTfIG.js +1 -0
- package/dist/bundle/pieDiagram-J4AKIIQI-D0GhbNJg.js +39 -0
- package/dist/bundle/quadrantDiagram-XTYBLID2-BKBEdwvC.js +7 -0
- package/dist/bundle/radar-ABXABTNO-8V_xx_AB.js +1 -0
- package/dist/bundle/railroad-I3PHUGI6-Bvb0GUva.js +1 -0
- package/dist/bundle/railroad-abnf-LNEFI6M7-D8xGcObq.js +1 -0
- package/dist/bundle/railroad-ebnf-DWYD2UWJ-Ch8wBawI.js +1 -0
- package/dist/bundle/railroad-peg-JR7BVNR7-CGndbjed.js +1 -0
- package/dist/bundle/railroadDiagram-MRQ6NCDL-DvqHkO2C.js +1 -0
- package/dist/bundle/requirementDiagram-Y7LWUY3S-bCLAM9sl.js +84 -0
- package/dist/bundle/rolldown-runtime-BNaE-Ejt.js +1 -0
- package/dist/bundle/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/bundle/sankeyDiagram-WGJFYUXA-8ehuPvHQ.js +40 -0
- package/dist/bundle/sequenceDiagram-5NDRBG5M-Cdg1YzMw.js +169 -0
- package/dist/bundle/sizeCapture-INFHLROL-Ct7XApxm.js +1 -0
- package/dist/bundle/stateDiagram-v2-FJ4FJNEA-B69v2YYC.js +291 -0
- package/dist/bundle/swimlanes-UMQ2AFYF-C_qI6rnK.js +1 -0
- package/dist/bundle/swimlanesDiagram-OMPLPG4O-CS11qSCX.js +8 -0
- package/dist/bundle/timeline-definition-SEUHKTQE-BCU0-H8D.js +120 -0
- package/dist/bundle/treeView-D4JQ5SDB-CpjURS-c.js +1 -0
- package/dist/bundle/treemap-SAJKECNS-CFFTaiIN.js +1 -0
- package/dist/bundle/usecaseDiagram-AFA6YXN4-46V1jsea.js +476 -0
- package/dist/bundle/vega-eBn1AexV.js +33 -0
- package/dist/bundle/vennDiagram-NNMJR3RB-q4Q4x2Q6.js +34 -0
- package/dist/bundle/wardley-7MLQ67FV-DhnATL7b.js +1 -0
- package/dist/bundle/wardleyDiagram-S7YFUSEH-BHIufnZW.js +78 -0
- package/dist/bundle/xychartDiagram-GGNKY7IX-CxAjpN3O.js +7 -0
- package/dist/chunks/a2ui-BLaPxJ9N.js +961 -0
- package/dist/chunks/a2ui-BLaPxJ9N.js.map +1 -0
- package/dist/chunks/math-D5IXRTov.js +86 -0
- package/dist/chunks/math-D5IXRTov.js.map +1 -0
- package/dist/chunks/mermaid-j9RNkOnL.js +197 -0
- package/dist/chunks/mermaid-j9RNkOnL.js.map +1 -0
- package/dist/chunks/rich-C2iN_5zh.js +156 -0
- package/dist/chunks/rich-C2iN_5zh.js.map +1 -0
- package/dist/chunks/sanitize-COLQzplk.js +240 -0
- package/dist/chunks/sanitize-COLQzplk.js.map +1 -0
- package/dist/chunks/{src-DPfU5Bd2.js → src-Blgo9nVC.js} +387 -73
- package/dist/chunks/src-Blgo9nVC.js.map +1 -0
- package/dist/chunks/vega-BkX1Fjq6.js +301 -0
- package/dist/chunks/vega-BkX1Fjq6.js.map +1 -0
- package/dist/define.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/element/i18n.d.ts +21 -2
- package/dist/types/element/index.d.ts +11 -2
- package/dist/types/element/markdown.d.ts +6 -3
- package/dist/types/element/rich/a2ui-format.d.ts +45 -0
- package/dist/types/element/rich/a2ui-icons.d.ts +1 -0
- package/dist/types/element/rich/a2ui-views.d.ts +37 -0
- package/dist/types/element/rich/a2ui.d.ts +2 -0
- package/dist/types/element/rich/index.d.ts +66 -0
- package/dist/types/element/rich/math.d.ts +4 -0
- package/dist/types/element/rich/mermaid.d.ts +2 -0
- package/dist/types/element/rich/vega.d.ts +2 -0
- package/dist/types/element/sanitize.d.ts +34 -0
- package/dist/types/element/styles.d.ts +1 -1
- package/dist/types/jsx.d.ts +2 -0
- package/package.json +12 -6
- package/dist/chunks/src-DPfU5Bd2.js.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import{t as e}from"./chunk-5VM5RSS4-CwNG0iBi.js";import{t}from"./chunk-DUW6YSOI-ChybIQ82.js";import{a as n,f as r,h as i,o as a,u as o}from"./chunk-DQASFODM-DBWVlIjs.js";import{i as s,r as c}from"./chunk-LEVMRMFU-BdDTT4pw.js";import"./chunk-AXFCVDMN-D0Vqm50X.js";import"./chunk-X4PVCEUW-BcN5Aq5G.js";import"./chunk-STOXU5M4-DdqxXfKq.js";import"./chunk-R3KSYZAL-gmtEjdKU.js";import{i as l,n as u,o as d,r as f,s as p}from"./chunk-J5ZVWO5B-DHB__t6z.js";import{A as m,B as h,C as g,D as _,E as v,F as ee,G as y,H as b,I as x,K as S,L as C,M as w,N as T,O as E,P as D,R as O,S as k,T as A,U as te,V as ne,W as re,b as ie,j as ae,k as oe,u as se,w as ce,z as le}from"./chunk-6MUBBAK2-CeH4cZO-.js";import{a as ue,b as de,c as fe,it as pe,s as me,y as j}from"./chunk-BG4553SI-DUBI9JbR.js";import{n as M,t as N}from"./d3-selection-CBFxn8wf.js";import{n as P}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as he}from"./graphlib-Bgy7WbC7.js";function ge(e){return Array.isArray(e)}function _e(e){if(y(e))return e;let t=re(e);if(!ve(e))return{};if(ge(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&S(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ie(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?be(r,e):F(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=/* @__PURE__ */ new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=/* @__PURE__ */ new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return F(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return xe(n,e),F(n,e),ye(n,e),n}function ve(e){switch(re(e)){case k:case ce:case g:case v:case A:case _:case E:case oe:case w:case m:case ae:case T:case D:case ee:case x:case C:case O:case le:case b:case te:case h:case ne:return!0;default:return!1}}function F(e,t){for(let n in t)S(t,n)&&(e[n]=t[n])}function ye(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function be(e,t){let n=t.valueOf().length;for(let r in t)S(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function xe(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var I=(function(){var e=/* @__PURE__ */ P(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],a=[1,19],o=[1,16],s=[1,17],c=[1,18],l=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],f=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],h=[1,49],g={trace:/* @__PURE__ */ P(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:/* @__PURE__ */ P(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{8:[1,20]},e(l,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:a,39:o,43:s,46:c}),e(u,[2,16],{14:22,15:d,16:f}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(p,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(l,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(p,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:f,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{36:[1,47]},{33:48,34:h},{15:[1,50]},e(u,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:h,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:/* @__PURE__ */ P(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:/* @__PURE__ */ P(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(e,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var _=m.yylloc;a.push(_);var v=m.options&&m.options.ranges;this.parseError=typeof h.yy.parseError==`function`?h.yy.parseError:Object.getPrototypeOf(this).parseError;function ee(e){n.length-=2*e,i.length-=e,a.length-=e}P(ee,`popStack`);function y(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}P(y,`lex`);for(var b,x,S,C,w,T={},E,D,O,k;;){if(S=n[n.length-1],this.defaultActions[S]?C=this.defaultActions[S]:(b??=y(),C=o[S]&&o[S][b]),C===void 0||!C.length||!C[0]){var A=``;for(E in k=[],o[S])this.terminals_[E]&&E>d&&k.push(`'`+this.terminals_[E]+`'`);A=m.showPosition?`Parse error on line `+(c+1)+`:
|
|
2
|
+
`+m.showPosition()+`
|
|
3
|
+
Expecting `+k.join(`, `)+`, got '`+(this.terminals_[b]||b)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(b==f?`end of input`:`'`+(this.terminals_[b]||b)+`'`),this.parseError(A,{text:m.match,token:this.terminals_[b]||b,line:m.yylineno,loc:_,expected:k})}if(C[0]instanceof Array&&C.length>1)throw Error(`Parse Error: multiple actions possible at state: `+S+`, token: `+b);switch(C[0]){case 1:n.push(b),i.push(m.yytext),a.push(m.yylloc),n.push(C[1]),b=null,x?(b=x,x=null):(l=m.yyleng,s=m.yytext,c=m.yylineno,_=m.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[C[1]][1],T.$=i[i.length-D],T._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(T._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(T,[s,l,c,h.yy,C[1],i,a].concat(p)),w!==void 0)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[C[1]][0]),i.push(T.$),a.push(T._$),O=o[n[n.length-2]][n[n.length-1]],n.push(O);break;case 3:return!0}}return!0},`parse`)};g.lexer=/* @__PURE__ */ (function(){return{EOF:1,parseError:/* @__PURE__ */ P(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:/* @__PURE__ */ P(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:/* @__PURE__ */ P(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:/* @__PURE__ */ P(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:/* @__PURE__ */ P(function(){return this._more=!0,this},`more`),reject:/* @__PURE__ */ P(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:/* @__PURE__ */ P(function(e){this.unput(this.match.slice(e))},`less`),pastInput:/* @__PURE__ */ P(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:/* @__PURE__ */ P(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:/* @__PURE__ */ P(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:/* @__PURE__ */ P(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:/* @__PURE__ */ P(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.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:/* @__PURE__ */ P(function(){return this.next()||this.lex()},`lex`),begin:/* @__PURE__ */ P(function(e){this.conditionStack.push(e)},`begin`),popState:/* @__PURE__ */ P(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:/* @__PURE__ */ P(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:/* @__PURE__ */ P(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:/* @__PURE__ */ P(function(e){this.begin(e)},`pushState`),stateStackSize:/* @__PURE__ */ P(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:/* @__PURE__ */ P(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function _(){this.yy={}}return P(_,`Parser`),_.prototype=g,g.Parser=_,new _})();I.parser=I;var Se=I,L=/* @__PURE__ */ new Map,R=[],z=/* @__PURE__ */ new Map,B=`color`,Ce=`fill`,we=`bgFill`,Te=`,`,V=/* @__PURE__ */ new Map,H=``,Ee=/* @__PURE__ */ P(e=>me.sanitizeText(e,de()),`sanitizeText`),De=/* @__PURE__ */ P(function(e,t=``){let n=V.get(e);n||(n={id:e,styles:[],textStyles:[]},V.set(e,n)),t?.split(Te).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(B).exec(e)){let e=t.replace(Ce,we).replace(B,Ce);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),Oe=/* @__PURE__ */ P(function(e,t=``){let n=L.get(e);t!=null&&(n.styles=t.split(Te))},`addStyle2Node`),ke=/* @__PURE__ */ P(function(e,t){e.split(`,`).forEach(function(e){let n=L.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},L.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),Ae=0,je=/* @__PURE__ */ P((e,t)=>{let n=e.flat(),r=[],i=n.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of n)if(typeof i==`number`&&i>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>i&&M.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${i}`),e.label&&=Ee(e.label),e.type===`classDef`)De(e.id,e.css);else if(e.type===`applyClass`)ke(e.id,e?.styleClass??``);else if(e.type===`applyStyles`)e?.stylesStr&&Oe(e.id,e?.stylesStr);else if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(z.get(e.id)??0)+1;z.set(e.id,t),e.id=t+`-`+e.id,R.push(e)}else{e.label||=e.type===`composite`?``:e.id;let t=L.get(e.id);if(t===void 0?(e.type===`composite`&&(e.colorIndex=Ae++),L.set(e.id,e)):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&je(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n<t;n++){let t=_e(e);t.id=t.id+`-`+n,L.set(t.id,t),r.push(t)}}else t===void 0&&r.push(e)}t.children=r},`populateBlockDatabase`),U=[],W={id:`root`,type:`composite`,children:[],columns:-1},Me=/* @__PURE__ */ P(()=>{M.debug(`Clear called`),ue(),W={id:`root`,type:`composite`,children:[],columns:-1},L=/* @__PURE__ */ new Map([[`root`,W]]),U=[],V=/* @__PURE__ */ new Map,R=[],z=/* @__PURE__ */ new Map,H=``,Ae=0},`clear`);function Ne(e){switch(M.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return M.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}P(Ne,`typeStr2Type`);function Pe(e){switch(M.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}P(Pe,`edgeTypeStr2Type`);function Fe(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}P(Fe,`edgeStrToEdgeData`);function Ie(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}P(Ie,`edgeStrToEdgeStartData`);function Le(e){return e.includes(`==`)?`thick`:`normal`}P(Le,`edgeStrToThickness`);function Re(e){return e.includes(`.-`)?`dotted`:`solid`}P(Re,`edgeStrToPattern`);var G=0,ze={getConfig:/* @__PURE__ */ P(()=>j().block,`getConfig`),typeStr2Type:Ne,edgeTypeStr2Type:Pe,edgeStrToEdgeData:Fe,edgeStrToEdgeStartData:Ie,edgeStrToThickness:Le,edgeStrToPattern:Re,getLogger:/* @__PURE__ */ P(()=>M,`getLogger`),getBlocksFlat:/* @__PURE__ */ P(()=>[...L.values()],`getBlocksFlat`),getBlocks:/* @__PURE__ */ P(()=>U||[],`getBlocks`),getEdges:/* @__PURE__ */ P(()=>R,`getEdges`),setHierarchy:/* @__PURE__ */ P(e=>{W.children=e,je(e,W),U=W.children},`setHierarchy`),getBlock:/* @__PURE__ */ P(e=>L.get(e),`getBlock`),setBlock:/* @__PURE__ */ P(e=>{L.set(e.id,e)},`setBlock`),getColumns:/* @__PURE__ */ P(e=>{let t=L.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:/* @__PURE__ */ P(function(){return V},`getClasses`),clear:Me,generateId:/* @__PURE__ */ P(()=>(G++,`id-`+Math.random().toString(36).substr(2,12)+`-`+G),`generateId`),setDiagramId:/* @__PURE__ */ P(e=>{H=e},`setDiagramId`),getDiagramId:/* @__PURE__ */ P(()=>H,`getDiagramId`)},Be=/* @__PURE__ */ P(e=>{let{theme:t,bkgColorArray:n,borderColorArray:r}=e;if(!l(t,r))return``;let i=d(e.look),a=f(n),o=``;for(let t=0;t<u(e.THEME_COLOR_LIMIT,r);t++){let e=r[t%r.length],s=a?`fill: ${n[t%n.length]};`:``,c=`[data-look="${i}"][data-color-id="color-${t}"]`;o+=`
|
|
7
|
+
|
|
8
|
+
${c}.node rect.composite {
|
|
9
|
+
stroke: ${e};
|
|
10
|
+
${s}
|
|
11
|
+
}
|
|
12
|
+
`}return o},`genColor`),K=/* @__PURE__ */ P((e,t)=>{let n=i,r=n(e,`r`),a=n(e,`g`),o=n(e,`b`);return pe(r,a,o,t)},`fade`),Ve=/* @__PURE__ */ P(t=>`${Be(t)}
|
|
13
|
+
.label {
|
|
14
|
+
font-family: ${t.fontFamily};
|
|
15
|
+
color: ${t.nodeTextColor||t.textColor};
|
|
16
|
+
}
|
|
17
|
+
.cluster-label text {
|
|
18
|
+
fill: ${t.titleColor};
|
|
19
|
+
}
|
|
20
|
+
.cluster-label span {
|
|
21
|
+
color: ${t.titleColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
.label text,span {
|
|
27
|
+
fill: ${t.nodeTextColor||t.textColor};
|
|
28
|
+
color: ${t.nodeTextColor||t.textColor};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.node rect,
|
|
32
|
+
.node circle,
|
|
33
|
+
.node ellipse,
|
|
34
|
+
.node polygon,
|
|
35
|
+
.node path {
|
|
36
|
+
fill: ${t.mainBkg};
|
|
37
|
+
stroke: ${t.nodeBorder};
|
|
38
|
+
/* From the theme, as every other diagram does. Pinned at 1px here, so block drew a
|
|
39
|
+
thinner border than an identical flowchart node under any theme asking for more --
|
|
40
|
+
the neo theme asks for 2. Nothing downstream corrected it: the neo rules set stroke
|
|
41
|
+
and filter, never stroke-width. */
|
|
42
|
+
stroke-width: ${t.strokeWidth??1}px;
|
|
43
|
+
}
|
|
44
|
+
.flowchart-label text {
|
|
45
|
+
text-anchor: middle;
|
|
46
|
+
}
|
|
47
|
+
// .flowchart-label .text-outer-tspan {
|
|
48
|
+
// text-anchor: middle;
|
|
49
|
+
// }
|
|
50
|
+
// .flowchart-label .text-inner-tspan {
|
|
51
|
+
// text-anchor: start;
|
|
52
|
+
// }
|
|
53
|
+
|
|
54
|
+
.node .label {
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
.node.clickable {
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.arrowheadPath {
|
|
62
|
+
fill: ${t.arrowheadColor};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.edgePaths .path {
|
|
66
|
+
stroke: ${t.lineColor};
|
|
67
|
+
stroke-width: 2.0px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.flowchart-link {
|
|
71
|
+
stroke: ${t.lineColor};
|
|
72
|
+
fill: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.edgeLabel {
|
|
76
|
+
background-color: ${t.edgeLabelBackground};
|
|
77
|
+
/*
|
|
78
|
+
* This is for backward compatibility with existing code that didn't
|
|
79
|
+
* add a \`<p>\` around edge labels.
|
|
80
|
+
*
|
|
81
|
+
* TODO: We should probably remove this in a future release.
|
|
82
|
+
*/
|
|
83
|
+
p {
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 0;
|
|
86
|
+
display: inline;
|
|
87
|
+
}
|
|
88
|
+
rect {
|
|
89
|
+
opacity: 0.5;
|
|
90
|
+
background-color: ${t.edgeLabelBackground};
|
|
91
|
+
fill: ${t.edgeLabelBackground};
|
|
92
|
+
}
|
|
93
|
+
text-align: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* For html labels only */
|
|
97
|
+
.labelBkg {
|
|
98
|
+
background-color: ${t.edgeLabelBackground};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.node .cluster {
|
|
102
|
+
// fill: ${K(t.mainBkg,.5)};
|
|
103
|
+
fill: ${K(t.clusterBkg,.5)};
|
|
104
|
+
stroke: ${K(t.clusterBorder,.2)};
|
|
105
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
106
|
+
stroke-width: 1px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.cluster text {
|
|
110
|
+
fill: ${t.titleColor};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.cluster span {
|
|
114
|
+
color: ${t.titleColor};
|
|
115
|
+
}
|
|
116
|
+
/* .cluster div {
|
|
117
|
+
color: ${t.titleColor};
|
|
118
|
+
} */
|
|
119
|
+
|
|
120
|
+
div.mermaidTooltip {
|
|
121
|
+
position: absolute;
|
|
122
|
+
text-align: center;
|
|
123
|
+
max-width: 200px;
|
|
124
|
+
padding: 2px;
|
|
125
|
+
font-family: ${t.fontFamily};
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
background: ${t.tertiaryColor};
|
|
128
|
+
border: 1px solid ${t.border2};
|
|
129
|
+
border-radius: 2px;
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
z-index: 100;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.flowchartTitleText {
|
|
135
|
+
text-anchor: middle;
|
|
136
|
+
font-size: 18px;
|
|
137
|
+
fill: ${t.textColor};
|
|
138
|
+
}
|
|
139
|
+
${e()}
|
|
140
|
+
`,`getStyles`);function q(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}P(q,`calculateBlockPosition`);var He=/* @__PURE__ */ P(e=>{let t=0,n=0;for(let r of e.children){let{width:e,height:i,x:a,y:o}=r.size??{width:0,height:0,x:0,y:0};if(M.debug(`getMaxChildSize abc95 child:`,r.id,`width:`,e,`height:`,i,`x:`,a,`y:`,o,r.type),r.type===`space`)continue;let s=e/(r.widthInColumns??1);s>t&&(t=s),i>n&&(n=i)}return{width:t,height:n}},`getMaxChildSize`);function J(e,t,n=0,r=0,i=8){M.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,n),e?.size?.width||(e.size={width:n,height:r,x:0,y:0});let a=0,o=0;if(e.children?.length>0){for(let n of e.children)J(n,t,0,0,i);let s=He(e);a=s.width,o=s.height,M.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,a,o);for(let t of e.children)t.size&&(M.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${a} ${o} ${JSON.stringify(t.size)}`),t.size.width=a*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=o,t.size.x=0,t.size.y=0,M.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${a} maxHeight:${o}`));for(let n of e.children)J(n,t,a,o,i);let c=e.columns??-1,l=0;for(let t of e.children)l+=t.widthInColumns??1;let u=e.children.length;c>0&&c<l&&(u=c);let d=Math.ceil(l/u),f=u*(a+i)+i,p=d*(o+i)+i;if(f<n){M.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`),f=n,p=r;let t=(n-u*i-i)/u,s=(r-d*i-i)/d;M.debug(`Size indata abc88`,e.id,`childWidth`,t,`maxWidth`,a),M.debug(`Size indata abc88`,e.id,`childHeight`,s,`maxHeight`,o),M.debug(`Size indata abc88 xSize`,u,`padding`,i);for(let n of e.children)n.size&&(n.size.width=t,n.size.height=s,n.size.x=0,n.size.y=0)}if(M.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${d} columns ${c}${e.children.length} width=${Math.max(f,e.size?.width||0)}`),f<(e?.size?.width||0)){f=e?.size?.width||0;let t=c>0?Math.min(e.children.length,c):e.children.length;if(t>0){let n=(f-t*i-i)/t;M.debug(`abc95 (growing to fit) width`,e.id,f,e.size?.width,n);for(let t of e.children)t.size&&(t.size.width=n)}}e.size={width:f,height:p,x:0,y:0}}M.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}P(J,`setBlockSizes`);function Y(e,t,n=8){M.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let r=e.columns??-1;if(M.debug(`layoutBlocks columns abc95`,e.id,`=>`,r,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,a=e.children.length*i+(e.children.length-1)*n;M.debug(`widthOfChildren 88`,a,`posX`);let o=/* @__PURE__ */ new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=q(r,t),i=o.get(e)??0;n.size.height>i&&o.set(e,n.size.height);let a=n?.widthInColumns??1;r>0&&(a=Math.min(a,r-t%r)),t+=a}}let s=/* @__PURE__ */ new Map;{let e=0,t=[...o.keys()].sort((e,t)=>e-t);for(let r of t)s.set(r,e),e+=(o.get(r)??0)+n}let c=0;M.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,u=0;for(let i of e.children){let a=e;if(!i.size)continue;let{width:d,height:f}=i.size,{px:p,py:m}=q(r,c);if(m!=u&&(u=m,l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,M.debug(`New row in layout for block`,e.id,` and child `,i.id,u)),M.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${c} (px, py) ${p},${m} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${d}${n}`),a.size){let e=d/2;i.size.x=l+n+e,M.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${l} new startingPosX${i.size.x} ${e} padding=${n} width=${d} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${d*(i?.widthInColumns??1)/2}`),l=i.size.x+e;let t=s.get(m)??0,r=o.get(m)??f;i.size.y=a.size.y-a.size.height/2+t+r/2+n,M.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${l}${n}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${d*(i?.widthInColumns??1)/2}`)}i.children&&Y(i,t,n);let h=i?.widthInColumns??1;r>0&&(h=Math.min(h,r-c%r)),c+=h,M.debug(`abc88 columnsPos`,i,c)}}M.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}P(Y,`layoutBlocks`);function X(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2<t&&(t=a-s/2),o-c/2<n&&(n=o-c/2),a+s/2>r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=X(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}P(X,`findBounds`);function Ue(e){let t=e.getBlock(`root`);if(!t)return;let n=de()?.block?.padding??8;J(t,e,0,0,n),Y(t,e,n),M.debug(`getBlocks`,JSON.stringify(t,null,2));let{minX:r,minY:i,maxX:a,maxY:o}=X(t),s=o-i;return{x:r,y:i,width:a-r,height:s}}P(Ue,`layout`);function Z(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=(r?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),o=0,s=`rect`,c;switch(r.type){case`round`:o=5,s=`rect`;break;case`composite`:o=0,s=`composite`,c=0;break;case`square`:s=`rect`;break;case`diamond`:s=`question`;break;case`hexagon`:s=`hexagon`;break;case`block_arrow`:s=`block_arrow`;break;case`odd`:s=`rect_left_inv_arrow`;break;case`lean_right`:s=`lean_right`;break;case`lean_left`:s=`lean_left`;break;case`trapezoid`:s=`trapezoid`;break;case`inv_trapezoid`:s=`inv_trapezoid`;break;case`rect_left_inv_arrow`:s=`rect_left_inv_arrow`;break;case`circle`:s=`circle`;break;case`ellipse`:s=`ellipse`;break;case`stadium`:s=`stadium`;break;case`subroutine`:s=`subroutine`;break;case`cylinder`:s=`cylinder`;break;case`group`:s=`rect`;break;case`doublecircle`:s=`doublecircle`;break;default:s=`rect`}let l=se(r?.styles??[]),u=r.label,d=r.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:l.labelStyle,shape:s,label:u,labelText:u,rx:o,ry:o,class:i,cssClasses:i,cssStyles:r?.styles??[],cssCompiledStyles:a,style:l.style,id:r.id,domId:f?`${f}-${r.id}`:r.id,isGroup:!1,directions:r.directions,width:d.width||void 0,height:d.height||void 0,wrappingWidth:d.width||1/0,x:d.x,y:d.y,positioned:n,intersect:void 0,padding:c??j()?.block?.padding??0,widthInColumns:r.widthInColumns??1,colorIndex:r.colorIndex,look:j().look}}P(Z,`getNodeFromBlock`);async function We(e,t,n){let r=Z(t,n,!1);if(t.type===`group`)return;let i=j(),a=await c(e,r,{config:i}),o=a.node()?.getBBox()??{width:0,height:0},s=n.getBlock(r.id);s.size={width:o.width,height:o.height,x:0,y:0,node:a},n.setBlock(s),a.remove()}P(We,`calculateBlockSize`);async function Ge(e,t,n){let r=Z(t,n,!0);if(n.getBlock(r.id).type!==`space`){let n=j(),i=await c(e,r,{config:n});r.colorIndex!==void 0&&p(i,r.colorIndex,n.theme,n.themeVariables?.borderColorArray),t.intersect=r?.intersect,s(r)}}P(Ge,`insertBlockPositioned`);async function Q(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await Q(e,i.children,n,r)}P(Q,`performOperations`);async function Ke(e,t,n){await Q(e,t,n,We)}P(Ke,`calculateBlockSizes`);async function qe(e,t,n){await Q(e,t,n,Ge)}P(qe,`insertBlocks`);async function $(e,t,i,o,s){let c=new he({multigraph:!0,compound:!0});c.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of i)e.size&&c.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let i of t)if(i.start&&i.end){let t=o.getBlock(i.start),l=o.getBlock(i.end);if(t?.size&&l?.size){let o=t.size,u=l.size,d=[{x:o.x,y:o.y},{x:o.x+(u.x-o.x)/2,y:o.y+(u.y-o.y)/2},{x:u.x,y:u.y}],f=s?`${s}-${i.id}`:i.id,p=`${i.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${i.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;n(e,{...i,id:f,arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:d,classes:p},{},`block`,c.node(i.start),c.node(i.end),s),i.label&&(await a(e,{...i,label:i.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:d,classes:p}),r({...i,x:d[1].x,y:d[1].y},{originalPath:d}))}}}P($,`insertEdges`);var Je={parser:Se,db:ze,renderer:{draw:/* @__PURE__ */ P(async function(e,n,r,i){let{securityLevel:a,block:s}=j(),c=i.db;c.setDiagramId(n);let l;a===`sandbox`&&(l=N(`#i`+n));let u=N(a===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=a===`sandbox`?u.select(`[id="${n}"]`):N(`[id="${n}"]`);t(d,j()),o(d,[`point`,`circle`,`cross`],i.type,n);let f=c.getBlocks(),p=c.getBlocksFlat(),m=c.getEdges(),h=d.insert(`g`).attr(`class`,`block`);await Ke(h,f,c);let g=Ue(c);await qe(h,f,c),await $(h,m,p,c,n);let _=h.node()?.getBBox(),v=_&&Number.isFinite(_.width)&&Number.isFinite(_.height)?_:g;if(v){let e=Math.max(1,Math.round(.125*(v.width/v.height))),t=v.height+e+10,n=v.width+10,{useMaxWidth:r}=s;fe(d,t,n,!!r),M.debug(`Here Bounds`,g,v),d.attr(`viewBox`,`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},`draw`),getClasses:/* @__PURE__ */ P(function(e,t){return t.db.getClasses()},`getClasses`)},styles:Ve};export{Je as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={prefix:`bpmn`,height:24,width:24,icons:{message:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" d="M3 6h18v12H3z"/><path class="bpmn-glyph-fold" fill="none" stroke="currentColor" stroke-width="1.6" d="m3 6 9 7 9-7"/>`},timer:{body:`<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.6"/><path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" d="M12 7v5l3.5 2.5"/><path stroke="currentColor" stroke-width="1.2" d="M12 3v1.5M21 12h-1.5M12 21v-1.5M3 12h1.5"/>`},error:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" d="M4 21 9.5 6 13 12.5 20 4 14.5 19 11 12.5Z"/>`},escalation:{body:`<path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round" d="m12 3 8 18-8-7-8 7z"/>`},signal:{body:`<path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round" d="M12 4 22 20H2z"/>`},conditional:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" d="M4 4h16v16H4z"/><path stroke="currentColor" stroke-width="1.6" stroke-linecap="round" d="M7 9h10M7 12.5h10M7 16h10"/>`},link:{body:`<path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round" d="M3 9h10V5l8 7-8 7v-4H3z"/>`},compensation:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" d="M11 6 3 12l8 6zM21 6l-8 6 8 6z"/>`},cancel:{body:`<path stroke="currentColor" stroke-width="2.2" stroke-linecap="round" d="m5 5 14 14M19 5 5 19"/>`},terminate:{body:`<circle cx="12" cy="12" r="9" fill="currentColor"/>`},multiple:{body:`<path fill="none" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round" d="m12 3 8.5 6.2-3.2 10H6.7l-3.2-10z"/>`},user:{body:`<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="1.7"/><path fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" d="M4.5 21a7.5 7.5 0 0 1 15 0"/>`},service:{body:`<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" d="m20.2 14.3-2 .6a6.6 6.6 0 0 1-1 1.7l.6 2-2.4 1.4-1.5-1.5a6.6 6.6 0 0 1-2 0l-1.5 1.5-2.4-1.4.6-2a6.6 6.6 0 0 1-1-1.7l-2-.6v-2.8l2-.6a6.6 6.6 0 0 1 1-1.7l-.6-2 2.4-1.4 1.5 1.5a6.6 6.6 0 0 1 2 0l1.5-1.5 2.4 1.4-.6 2a6.6 6.6 0 0 1 1 1.7l2 .6z"/><circle cx="12" cy="12.9" r="2.6" fill="none" stroke="currentColor" stroke-width="1.5"/>`},script:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" d="M8 3h9a2.5 2.5 0 0 0-2.5 2.5v13A2.5 2.5 0 0 1 12 21H3a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 1 8 3Z"/><path stroke="currentColor" stroke-width="1.4" stroke-linecap="round" d="M6.5 8h6M6.5 11.5h6M6.5 15h4"/>`},manual:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" d="M8 11V5.5a1.8 1.8 0 0 1 3.5 0V10m0-.5a1.8 1.8 0 0 1 3.5 0V11m0-.5a1.8 1.8 0 0 1 3.5 0V16a5 5 0 0 1-5 5h-2a5 5 0 0 1-5-5v-4.5a1.8 1.8 0 0 1 1.5-1.8z"/>`},receive:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" d="M3 6h18v12H3z"/><path fill="none" stroke="currentColor" stroke-width="1.6" d="m3 6 9 7 9-7"/>`},send:{body:`<path fill="currentColor" d="M3 6h18v12H3z" opacity=".18"/><path fill="none" stroke="currentColor" stroke-width="1.6" d="M3 6h18v12H3z"/><path fill="none" stroke="currentColor" stroke-width="1.6" d="m3 6 9 7 9-7"/>`},rule:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" d="M3 5h18v14H3z"/><path stroke="currentColor" stroke-width="1.4" d="M3 9h18M3 13h18M8 9v10"/>`},loop:{body:`<path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" d="M20 12a8 8 0 1 1-2.7-6"/><path fill="currentColor" d="M20 3.2v5.4h-5.4z"/>`},parallel:{body:`<path stroke="currentColor" stroke-width="2.4" stroke-linecap="round" d="M6 4v16M12 4v16M18 4v16"/>`},sequential:{body:`<path stroke="currentColor" stroke-width="2.4" stroke-linecap="round" d="M4 6h16M4 12h16M4 18h16"/>`},"ad-hoc":{body:`<path fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" d="M3 15c2.5-6 6-6 8.5 0S18 21 21 15"/>`},subprocess:{body:`<path fill="none" stroke="currentColor" stroke-width="1.6" d="M3 3h18v18H3z"/><path stroke="currentColor" stroke-width="1.8" stroke-linecap="round" d="M12 7v10M7 12h10"/>`},exclusive:{body:`<path stroke="currentColor" stroke-width="2.6" stroke-linecap="round" d="m6 6 12 12M18 6 6 18"/>`},"parallel-multiple":{body:`<path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" d="M12 5v14M5 12h14"/>`},inclusive:{body:`<circle cx="12" cy="12" r="7.5" fill="none" stroke="currentColor" stroke-width="2.4"/>`},"parallel-gateway":{body:`<path stroke="currentColor" stroke-width="2.6" stroke-linecap="round" d="M12 4v16M4 12h16"/>`},"event-based":{body:`<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="12" cy="12" r="6.8" fill="none" stroke="currentColor" stroke-width="1.3"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" d="m12 7.4 4 2.9-1.5 4.7h-5L8 10.3z"/>`},complex:{body:`<path stroke="currentColor" stroke-width="2.2" stroke-linecap="round" d="M12 3v18M3 12h18M5.6 5.6l12.8 12.8M18.4 5.6 5.6 18.4"/>`}}};export{e as bpmnIcons};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import{a as e}from"./chunk-HFQBQIA3-D2xPptW8.js";import{r as t,s as n}from"./chunk-AXFCVDMN-D0Vqm50X.js";import"./chunk-X4PVCEUW-BcN5Aq5G.js";import"./chunk-STOXU5M4-DdqxXfKq.js";import"./chunk-R3KSYZAL-gmtEjdKU.js";import{n as r,r as i,v as a}from"./chunk-6MUBBAK2-CeH4cZO-.js";import{H as o,U as s,_ as l,b as u,c as d,r as f,s as p,v as m,z as h}from"./chunk-BG4553SI-DUBI9JbR.js";import{n as g,t as _}from"./d3-selection-CBFxn8wf.js";import{n as v}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var y=(function(){var e=/* @__PURE__ */ v(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],o=[1,63],s=[1,64],l=[1,65],u=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],h=[1,30],g=[1,31],_=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],Z=[12,33],ae=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],oe={trace:/* @__PURE__ */ v(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:/* @__PURE__ */ v(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},e(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ee,[2,14]),e(te,[2,16],{12:[1,76]}),e(ee,[2,36],{12:[1,77]}),e(ne,[2,19]),e(ne,[2,20]),{25:[1,78]},{27:[1,79]},e(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},e(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ee,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:n,24:r,26:i,28:a}),e(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:r,26:i,28:a,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ne,[2,21]),e(ne,[2,22]),e(X,[2,39]),e(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),e(ie,[2,73]),{78:[1,133]},e(ie,[2,75]),e(ie,[2,76]),e(X,[2,40]),e(X,[2,41]),e(X,[2,42]),e(X,[2,43]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),e(X,[2,57]),e(X,[2,58]),e(X,[2,60]),e(X,[2,61]),e(X,[2,62]),e(X,[2,63]),e(X,[2,64]),e(X,[2,65]),e(X,[2,66]),e(X,[2,67]),e(X,[2,68]),e(X,[2,69]),e(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(Z,[2,28]),e(Z,[2,29]),e(Z,[2,30]),e(Z,[2,31]),e(Z,[2,32]),e(Z,[2,33]),e(Z,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(ee,[2,38]),e(re,[2,72]),e(ie,[2,74]),e(X,[2,24]),e(X,[2,35]),e(ae,[2,25]),e(ae,[2,26],{12:[1,138]}),e(ae,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:/* @__PURE__ */ v(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:/* @__PURE__ */ v(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var y=h.yylloc;a.push(y);var b=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}v(x,`popStack`);function S(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}v(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==p?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:h.match,token:this.terminals_[C]||C,line:h.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(h.yytext),a.push(h.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,y=h.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,g.yy,E[1],i,a].concat(m)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};oe.lexer=/* @__PURE__ */ (function(){return{EOF:1,parseError:/* @__PURE__ */ v(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:/* @__PURE__ */ v(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:/* @__PURE__ */ v(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:/* @__PURE__ */ v(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:/* @__PURE__ */ v(function(){return this._more=!0,this},`more`),reject:/* @__PURE__ */ v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:/* @__PURE__ */ v(function(e){this.unput(this.match.slice(e))},`less`),pastInput:/* @__PURE__ */ v(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:/* @__PURE__ */ v(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:/* @__PURE__ */ v(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:/* @__PURE__ */ v(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:/* @__PURE__ */ v(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.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:/* @__PURE__ */ v(function(){return this.next()||this.lex()},`lex`),begin:/* @__PURE__ */ v(function(e){this.conditionStack.push(e)},`begin`),popState:/* @__PURE__ */ v(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:/* @__PURE__ */ v(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:/* @__PURE__ */ v(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:/* @__PURE__ */ v(function(e){this.begin(e)},`pushState`),stateStackSize:/* @__PURE__ */ v(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:/* @__PURE__ */ v(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin(`acc_title`),24;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),26;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin(`person_ext`),45;case 23:return this.begin(`person`),44;case 24:return this.begin(`system_ext_queue`),51;case 25:return this.begin(`system_ext_db`),50;case 26:return this.begin(`system_ext`),49;case 27:return this.begin(`system_queue`),48;case 28:return this.begin(`system_db`),47;case 29:return this.begin(`system`),46;case 30:return this.begin(`boundary`),37;case 31:return this.begin(`enterprise_boundary`),34;case 32:return this.begin(`system_boundary`),36;case 33:return this.begin(`container_ext_queue`),57;case 34:return this.begin(`container_ext_db`),56;case 35:return this.begin(`container_ext`),55;case 36:return this.begin(`container_queue`),54;case 37:return this.begin(`container_db`),53;case 38:return this.begin(`container`),52;case 39:return this.begin(`container_boundary`),38;case 40:return this.begin(`component_ext_queue`),63;case 41:return this.begin(`component_ext_db`),62;case 42:return this.begin(`component_ext`),61;case 43:return this.begin(`component_queue`),60;case 44:return this.begin(`component_db`),59;case 45:return this.begin(`component`),58;case 46:return this.begin(`node`),39;case 47:return this.begin(`node`),39;case 48:return this.begin(`node_l`),40;case 49:return this.begin(`node_r`),41;case 50:return this.begin(`rel`),64;case 51:return this.begin(`birel`),65;case 52:return this.begin(`rel_u`),66;case 53:return this.begin(`rel_u`),66;case 54:return this.begin(`rel_d`),67;case 55:return this.begin(`rel_d`),67;case 56:return this.begin(`rel_l`),68;case 57:return this.begin(`rel_l`),68;case 58:return this.begin(`rel_r`),69;case 59:return this.begin(`rel_r`),69;case 60:return this.begin(`rel_b`),70;case 61:return this.begin(`rel_index`),71;case 62:return this.begin(`update_el_style`),72;case 63:return this.begin(`update_rel_style`),73;case 64:return this.begin(`update_layout_config`),74;case 65:return`EOF_IN_STRUCT`;case 66:return this.begin(`attribute`),`ATTRIBUTE_EMPTY`;case 67:this.begin(`attribute`);break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin(`string`);break;case 73:this.popState();break;case 74:return`STR`;case 75:this.begin(`string_kv`);break;case 76:return this.begin(`string_kv_key`),`STR_KEY`;case 77:this.popState(),this.begin(`string_kv_value`);break;case 78:return`STR_VALUE`;case 79:this.popState(),this.popState();break;case 80:return`STR`;case 81:return`LBRACE`;case 82:return`RBRACE`;case 83:return`SPACE`;case 84:return`EOL`;case 85:return 14}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}})();function se(){this.yy={}}return v(se,`Parser`),se.prototype=oe,oe.Parser=se,new se})();y.parser=y;var b=y,x=/* @__PURE__ */ v(e=>u()[e],`getRequiredConfig`),S=/* @__PURE__ */ new Set([`label`,`descr`,`techn`,`type`]),C=/* @__PURE__ */ v((e,t)=>{for(let[n,r]of Object.entries(t))if(r!==void 0){if(typeof r==`object`){let[t,n]=Object.entries(r)[0];e[t]=S.has(t)?{text:n}:n}else e[n]=r}},`assignAttributes`),w=/* @__PURE__ */ v(()=>({alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}),`createGlobalBoundary`),T=[],E=[``],D=`global`,O=``,k=[w()],A=[],j=``,M=!1,N=4,P=2,F,I=/* @__PURE__ */ v(function(){return F},`getC4Type`),L=/* @__PURE__ */ v(function(e){F=h(e,u())},`setC4Type`),R=/* @__PURE__ */ v(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=A.find(e=>e.from===t&&e.to===n);if(d?u=d:A.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn??={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]=S.has(e)?{text:t}:t}else u.techn={text:i};if(a==null)u.descr??={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]=S.has(e)?{text:t}:t}else u.descr={text:a};C(u,{sprite:o,tags:s,link:l}),u.wrap=le()},`addRel`),z=/* @__PURE__ */ v(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=T.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,T.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr??={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=S.has(e)?{text:t}:t}else s.descr={text:r};C(s,{sprite:i,tags:a,link:o}),s.typeC4Shape={text:e},s.parentBoundary=D,s.wrap=le()},`addPersonOrSystem`),B=/* @__PURE__ */ v(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=T.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,T.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn??={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]=S.has(e)?{text:t}:t}else l.techn={text:r};if(i==null)l.descr??={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]=S.has(e)?{text:t}:t}else l.descr={text:i};C(l,{sprite:a,tags:o,link:s}),l.wrap=le(),l.typeC4Shape={text:e},l.parentBoundary=D},`addContainer`),V=/* @__PURE__ */ v(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=T.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,T.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn??={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]=S.has(e)?{text:t}:t}else l.techn={text:r};if(i==null)l.descr??={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]=S.has(e)?{text:t}:t}else l.descr={text:i};C(l,{sprite:a,tags:o,link:s}),l.wrap=le(),l.typeC4Shape={text:e},l.parentBoundary=D},`addComponent`),H=/* @__PURE__ */ v(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=k.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,k.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]=S.has(e)?{text:t}:t}else a.type={text:n};C(a,{tags:r,link:i}),a.parentBoundary=D,a.wrap=le(),O=D,D=e,E.push(O)},`addPersonOrSystemBoundary`),U=/* @__PURE__ */ v(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=k.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,k.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]=S.has(e)?{text:t}:t}else a.type={text:n};C(a,{tags:r,link:i}),a.parentBoundary=D,a.wrap=le(),O=D,D=e,E.push(O)},`addContainerBoundary`),W=/* @__PURE__ */ v(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=k.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,k.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]=S.has(e)?{text:t}:t}else l.type={text:r};if(i==null)l.descr??={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]=S.has(e)?{text:t}:t}else l.descr={text:i};C(l,{tags:o,link:s}),l.nodeType=e,l.parentBoundary=D,l.wrap=le(),O=D,D=t,E.push(O)},`addDeploymentNode`),G=/* @__PURE__ */ v(function(){D=O,E.pop(),O=E.pop(),E.push(O)},`popBoundaryParseStack`),ee=/* @__PURE__ */ v(function(e,t,n,r,i,a,o,s,l,u,d){let f=T.find(e=>e.alias===t);if(!(f===void 0&&(f=k.find(e=>e.alias===t),f===void 0))){if(n!=null){if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n}if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o}if(s!=null){if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s}if(l!=null){if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l}if(u!=null){if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u}if(d!=null){if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}}},`updateElStyle`),te=/* @__PURE__ */ v(function(e,t,n,r,i,a,o){let s=A.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a)}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}}},`updateRelStyle`),ne=/* @__PURE__ */ v(function(e,t,n){let r=N,i=P;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(N=r),i>=1&&(P=i)},`updateLayoutConfig`),K=/* @__PURE__ */ v(function(){return N},`getC4ShapeInRow`),q=/* @__PURE__ */ v(function(){return P},`getC4BoundaryInRow`),J=/* @__PURE__ */ v(function(){return D},`getCurrentBoundaryParse`),Y=/* @__PURE__ */ v(function(){return O},`getParentBoundaryParse`),X=/* @__PURE__ */ v(function(e){return e==null?T:T.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),re=/* @__PURE__ */ v(function(e){return T.find(t=>t.alias===e)??k.find(t=>t.alias===e)},`getC4Shape`),ie=/* @__PURE__ */ v(function(e){return Object.keys(X(e))},`getC4ShapeKeys`),Z=/* @__PURE__ */ v(function(e){return e==null?k:k.filter(t=>t.parentBoundary===e)},`getBoundaries`),ae=Z,oe=/* @__PURE__ */ v(function(){return A},`getRels`),se=/* @__PURE__ */ v(function(){return j},`getTitle`),ce=/* @__PURE__ */ v(function(e){M=e},`setWrap`),le=/* @__PURE__ */ v(function(){return M},`autoWrap`),ue={addPersonOrSystem:z,addPersonOrSystemBoundary:H,addContainer:B,addContainerBoundary:U,addComponent:V,addDeploymentNode:W,popBoundaryParseStack:G,addRel:R,updateElStyle:ee,updateRelStyle:te,updateLayoutConfig:ne,autoWrap:le,setWrap:ce,getC4ShapeArray:X,getC4Shape:re,getC4ShapeKeys:ie,getBoundaries:Z,getBoundarys:ae,getCurrentBoundaryParse:J,getParentBoundaryParse:Y,getRels:oe,getTitle:se,getC4Type:I,getC4ShapeInRow:K,getC4BoundaryInRow:q,setAccTitle:s,getAccTitle:m,getAccDescription:l,setAccDescription:o,getConfig:/* @__PURE__ */ v(()=>x(`c4`),`getConfig`),clear:/* @__PURE__ */ v(function(){T=[],k=[w()],O=``,D=`global`,E=[``],A=[],E=[``],j=``,M=!1,N=4,P=2},`clear`),LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:/* @__PURE__ */ v(function(e){j=h(e,u())},`setTitle`),setC4Type:L},de=/* @__PURE__ */ v(function(t,n){return e(t,n)},`drawRect`),fe=/* @__PURE__ */ v((e,t,n,r)=>{let i=e.append(`g`),a=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,o=e.lineColor?e.lineColor:`#444444`,s=e.offsetX?parseInt(String(e.offsetX)):0,l=e.offsetY?parseInt(String(e.offsetY)):0;if(a===0){let t=i.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,o),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`),a=-1}else{let t=i.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,o).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`)}let u=e.label.width,d=n.messageFont();xe(n)(e.label.text,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+l,u,e.label.height,{fill:t},d),e.techn&&e.techn.text!==``&&(d=n.messageFont(),xe(n)(`[`+e.techn.text+`]`,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+l,Math.max(u,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},d))}},`drawRels`),pe=/* @__PURE__ */ v(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),de(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,xe(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,xe(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,xe(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),me=/* @__PURE__ */ v(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),he=/* @__PURE__ */ v(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),ge=/* @__PURE__ */ v(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),_e=/* @__PURE__ */ v(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`)},`insertArrowHead`),ve=/* @__PURE__ */ v(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowend`).attr(`refX`,1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`)},`insertArrowEnd`),ye=/* @__PURE__ */ v(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),be=/* @__PURE__ */ v(function(e,t){let n=e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);n.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),n.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),xe=/* @__PURE__ */ (function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`text-anchor`,`middle`).text(e),s)}v(e,`byText`);function t(e,t,n,i,a,o,s,l){let{fontSize:u,fontFamily:d,fontWeight:f}=l,m=e.split(p.lineBreakRegex);for(let e=0;e<m.length;e++){let o=e*u-u*(m.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,i).style(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).style(`font-size`,u).style(`font-weight`,f).style(`font-family`,d);l.append(`tspan`).attr(`dy`,o).text(m[e]).attr(`alignment-baseline`,`mathematical`),r(l,s)}}v(t,`byTspan`);function n(e,n,i,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,i,a,o,s,l,u),r(f,l)}v(n,`byFo`);function r(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return v(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),Q={drawRect:de,drawBoundary:pe,drawRels:fe,insertArrowHead:_e,insertArrowEnd:ve,insertArrowFilledHead:ye,insertArrowCrossHead:be,insertDatabaseIcon:me,insertComputerIcon:he,insertClockIcon:ge},Se=/* @__PURE__ */ v((e,t)=>{if(t===`sandbox`){let t=_(`#i`+e).node()?.contentDocument;if(!t)throw Error(`Sandbox iframe #i${e} is missing its content document`);return{root:_(t.body),doc:t}}return{root:_(`body`),doc:document}},`getDiagramRoot`),Ce=/* @__PURE__ */ new Set([`system_queue`,`external_system_queue`,`container_queue`,`external_container_queue`,`component_queue`,`external_component_queue`]),we=/* @__PURE__ */ new Set([`system_db`,`external_system_db`,`container_db`,`external_container_db`,`component_db`,`external_component_db`]),Te={person:`person`,box:`rounded`,rounded:`rounded`,cylinder:`cylinder`,database:`cylinder`,db:`cylinder`,queue:`h-cyl`,pipe:`h-cyl`,component:`fr-rect`},Ee=/* @__PURE__ */ v(e=>e?Te[e.toLowerCase()]:void 0,`keywordShape`),De=/* @__PURE__ */ v(e=>{let t=Ee(e.shape)??Ee(e.sprite);if(t)return t;if(e.tags)for(let t of e.tags.split(`,`)){let e=Ee(t.trim());if(e)return e}let n=e.typeC4Shape.text;return n===`person`||n===`external_person`?`person`:we.has(n)?`cylinder`:Ce.has(n)?`h-cyl`:`rounded`},`resolveNodeShape`),Oe={person:`Person`,system:`Software System`,container:`Container`,component:`Component`},ke=/* @__PURE__ */ v(e=>{let t=e.replace(/^external_/,``).replace(/_(db|queue)$/,``);return Oe[t]??t.replace(/_/g,` `)},`stereotypeLabel`),Ae=/* @__PURE__ */ v(e=>e.startsWith(`external_`),`isExternal`),je=/* @__PURE__ */ v(e=>{let t=ke(e.typeC4Shape.text);return e.techn?.text?`[${t}: ${e.techn.text}]`:`[${t}]`},`stereotypeText`),Me=[`person`,`system`,`system_db`,`system_queue`,`container`,`container_db`,`container_queue`,`component`,`component_db`,`component_queue`].flatMap(e=>[e,`external_${e}`]),Ne=new Set(Me),Pe=/* @__PURE__ */ v(e=>Ne.has(e),`isC4ElementType`),Fe=/* @__PURE__ */ v((e,t)=>{let n=e.typeC4Shape.text,r=e.bgColor??(Pe(n)&&t[`${n}_bg_color`]),i=e.borderColor??(Pe(n)&&t[`${n}_border_color`]),a=[];return r&&a.push(`fill:${r}`),i&&a.push(`stroke:${i}`),a.push(`color:${e.fontColor??`#FFFFFF`}`),a},`elementCssStyles`),Ie=/* @__PURE__ */ v((e,t,n,r,i)=>{let a=e.typeC4Shape.text,o=[`c4-shape`,`c4-${a}`];Ae(a)&&o.push(`c4-external`);let s=De(e),l=Fe(e,t);return(s===`rounded`||s===`fr-rect`)&&l.push(`rx:12px`,`ry:12px`),{id:e.alias,label:e.label.text,stereotype:je(e),description:e.descr?.text?[e.descr.text]:void 0,labelType:`string`,isGroup:!1,shape:s,cssClasses:o.join(` `),cssStyles:l,padding:n,look:r,useHtmlLabels:!1,width:i}},`buildC4Node`),Le=0,Re=0,ze=4,Be=2;y.yy=ue;var $={},Ve=class{static{v(this,`Bounds`)}constructor(e){this.name=``,this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,He(e.db.getConfig())}setData(e,t,n,r){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.stopx,n=this.data.widthLimit,r=this.nextData.startx===this.nextData.stopx?t+e.margin:t+e.margin*2,i=r+e.width,a=this.nextData.starty+e.margin*2,o=a+e.height;(r>=n||i>=n||this.nextData.cnt>ze)&&(r=this.nextData.startx+e.margin+$.nextLinePaddingX,a=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=o=a+e.height,this.nextData.cnt=1),e.x=r,e.y=a,this.updateVal(this.data,`startx`,r,Math.min),this.updateVal(this.data,`starty`,a,Math.min),this.updateVal(this.data,`stopx`,i,Math.max),this.updateVal(this.data,`stopy`,o,Math.max),this.updateVal(this.nextData,`startx`,r,Math.min),this.updateVal(this.nextData,`starty`,a,Math.min),this.updateVal(this.nextData,`stopx`,i,Math.max),this.updateVal(this.nextData,`stopy`,o,Math.max)}init(e){this.name=``,this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},He(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},He=/* @__PURE__ */ v(function(e){f($,e),e?.fontFamily&&($.personFontFamily=$.systemFontFamily=$.messageFontFamily=e.fontFamily),e?.fontSize&&($.personFontSize=$.systemFontSize=$.messageFontSize=e.fontSize),e?.fontWeight&&($.personFontWeight=$.systemFontWeight=$.messageFontWeight=e.fontWeight)},`setConf`),Ue=/* @__PURE__ */ v(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),We=/* @__PURE__ */ v(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`);function Ge(e,t,n,o,s){let l=t[e];if(!l.width){if(n)l.text=a(l.text,s,o),l.textLines=l.text.split(p.lineBreakRegex).length,l.width=s,l.height=r(l.text,o);else{let e=l.text.split(p.lineBreakRegex);l.textLines=e.length;let t=0;l.height=0,l.width=0;for(let n of e)l.width=Math.max(i(n,o),l.width),t=r(n,o),l.height+=t}}return l}v(Ge,`calcC4ShapeTextWH`);var Ke=/* @__PURE__ */ v(function(e,n,r){let a=r.data.startx,o=r.data.starty;n.x=a,n.y=o,n.width=r.data.stopx-a,n.height=r.data.stopy-o,n.intersect=e=>t.rect({x:n.x+n.width/2,y:n.y+n.height/2,width:n.width,height:n.height},e),n.label.y=$.c4ShapeMargin-35;let s=n.wrap&&$.wrap,l=Ue($);l.fontSize+=2,l.fontWeight=`bold`,Ge(`label`,n,s,l,i(n.label.text,l)),Q.drawBoundary(e,n,$)},`drawBoundary`),qe=/* @__PURE__ */ v(async function(e,t,r,i){let a=u(),o=a.look??`classic`,s={config:a},l=t.attr(`id`)??``,d=i.map(e=>r[Number(e)]),f=/* @__PURE__ */ v(e=>{let t=e.shape?n[e.shape]:void 0;if(!t)throw Error(`C4: no shape handler for "${e.shape}"`);return t},`shapeHandlerFor`);await Promise.all(d.map(async e=>{let n=Ie(e,$,$.c4ShapePadding,o,$.width);n.domId=`${l}-${n.id}`;let r=await f(n)(t,n,s);e.width=n.width??$.width,e.height=n.height??$.height,e.margin=$.c4ShapeMargin,r.remove()}));for(let t of d)e.insert(t);await Promise.all(d.map(async e=>{let n=Ie(e,$,$.c4ShapePadding,o,$.width);n.domId=`${l}-${n.id}`,n.x=e.x+e.width/2,n.y=e.y+e.height/2;let r=t.append(`g`).attr(`transform`,`translate(${e.x+e.width/2}, ${e.y+e.height/2})`);await f(n)(r,n,s),e.intersect=n.intersect})),e.bumpLastMargin($.c4ShapeMargin)},`drawC4ShapeArray`),Je=class{static{v(this,`Point`)}constructor(e,t){this.x=e,this.y=t}},Ye=/* @__PURE__ */ v(function(e,t){if(!e.intersect)throw Error(`C4 element "${e.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);let{x:n,y:r}=e.intersect(t);return new Je(n,r)},`getIntersectPoint`),Xe=/* @__PURE__ */ v(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=Ye(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:Ye(t,n)}},`getIntersectPoints`),Ze=/* @__PURE__ */ v(function(e,t,n,r,a){let o=r.db.getC4Type(),s=0;for(let e of t){s+=1;let t=e.wrap&&$.wrap,r=We($);o===`C4Dynamic`&&(e.label.text=s+`: `+e.label.text);let a=i(e.label.text,r);Ge(`label`,e,t,r,a),e.techn&&e.techn.text!==``&&(a=i(e.techn.text,r),Ge(`techn`,e,t,r,a)),e.descr&&e.descr.text!==``&&(a=i(e.descr.text,r),Ge(`descr`,e,t,r,a));let l=n(e.from),u=n(e.to);if(!l||!u)throw Error(`C4 rel "${e.from}" -> "${e.to}" references an unknown shape or boundary`);let d=Xe(l,u);if(!d.startPoint||!d.endPoint)throw Error(`Could not calculate intersection points for rel "${e.from}" -> "${e.to}"`);e.startPoint=d.startPoint,e.endPoint=d.endPoint}Q.drawRels(e,t,$,a)},`drawRels`);async function Qe(e,t,n,r,i){let a=i.db,o=new Ve(i);o.data.widthLimit=n.data.widthLimit/Math.min(Be,r.length);for(let[s,l]of r.entries()){let r=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=r,r=l.image.Y+l.image.height);let u=l.wrap&&$.wrap,d=Ue($);d.fontSize+=2,d.fontWeight=`bold`;let f=Ge(`label`,l,u,d,o.data.widthLimit);if(f.Y=r+8,r=f.Y+f.height,l.type&&l.type.text!==``){l.type.text=`[`+l.type.text+`]`;let e=Ge(`type`,l,u,Ue($),o.data.widthLimit);e.Y=r+5,r=e.Y+e.height}if(l.descr&&l.descr.text!==``){let e=Ue($);e.fontSize-=2;let t=Ge(`descr`,l,u,e,o.data.widthLimit);t.Y=r+20,r=t.Y+t.height}if(s==0||s%Be===0){let e=n.data.startx+$.diagramMarginX,t=n.data.stopy+$.diagramMarginY+r;o.setData(e,e,t,t)}else{let e=o.data.stopx===o.data.startx?o.data.startx:o.data.stopx+$.diagramMarginX,t=o.data.starty;o.setData(e,e,t,t)}o.name=l.alias;let p=a.getC4ShapeArray(l.alias),m=a.getC4ShapeKeys(l.alias);m.length>0&&await qe(o,e,p,m),t=l.alias;let h=a.getBoundaries(t);h.length>0&&await Qe(e,t,o,h,i),l.alias!==`global`&&Ke(e,l,o),n.data.stopy=Math.max(o.data.stopy+$.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+$.c4ShapeMargin,n.data.stopx),Le=Math.max(Le,n.data.stopx),Re=Math.max(Re,n.data.stopy)}}v(Qe,`drawInsideBoundary`);var $e={drawPersonOrSystemArray:qe,drawBoundary:Ke,setConf:He,draw:/* @__PURE__ */ v(async function(e,t,n,r){$=x(`c4`);let i=u().securityLevel,{root:a}=Se(t,i),o=r.db;o.setWrap($.wrap),ze=o.getC4ShapeInRow(),Be=o.getC4BoundaryInRow(),g.debug(`C:${JSON.stringify($,null,2)}`);let s=a.select(`[id="${t}"]`);Q.insertComputerIcon(s,t),Q.insertDatabaseIcon(s,t),Q.insertClockIcon(s,t);let l=new Ve(r);l.setData($.diagramMarginX,$.diagramMarginX,$.diagramMarginY,$.diagramMarginY),l.data.widthLimit=screen.availWidth,Le=$.diagramMarginX,Re=$.diagramMarginY;let f=o.getTitle();await Qe(s,``,l,o.getBoundaries(``),r),Q.insertArrowHead(s,t),Q.insertArrowEnd(s,t),Q.insertArrowCrossHead(s,t),Q.insertArrowFilledHead(s,t),Ze(s,o.getRels(),o.getC4Shape,r,t),l.data.stopx=Le,l.data.stopy=Re;let p=l.data,m=p.startx,h=p.starty,_=Re-h+2*$.diagramMarginY,v=Le-m,y=v+2*$.diagramMarginX;f&&s.append(`text`).text(f).attr(`x`,v/2-4*$.diagramMarginX).attr(`y`,h+$.diagramMarginY),d(s,_,y,$.useMaxWidth);let b=f?60:0;s.attr(`viewBox`,m-$.diagramMarginX+` -`+($.diagramMarginY+b)+` `+y+` `+(_+b)),g.debug(`models:`,p)},`draw`)},et=/* @__PURE__ */ v(()=>{let e=u().c4??{},t=new CSSStyleSheet;for(let n of Me){let r=t.cssRules[t.insertRule(`.c4-shape.c4-${n} .label {}`,t.cssRules.length)],i=e[`${n}FontFamily`],a=e[`${n}FontSize`],o=e[`${n}FontWeight`];i&&r.style.setProperty(`font-family`,i),a&&r.style.setProperty(`font-size`,typeof a==`number`?`${a}px`:a),o&&r.style.setProperty(`font-weight`,String(o))}return[...t.cssRules].filter(e=>e.style.length>0).map(e=>` ${e.cssText}`).join(`
|
|
7
|
+
`)},`elementFontStyles`),tt={parser:b,db:ue,renderer:$e,styles:/* @__PURE__ */ v(e=>`.person {
|
|
8
|
+
stroke: ${e.personBorder};
|
|
9
|
+
fill: ${e.personBkg};
|
|
10
|
+
}
|
|
11
|
+
${et()}
|
|
12
|
+
|
|
13
|
+
/* The element font colour is set inline per element (default white); the
|
|
14
|
+
label text takes it via currentColor. */
|
|
15
|
+
.c4-shape .label,
|
|
16
|
+
.c4-shape .label text {
|
|
17
|
+
color: inherit;
|
|
18
|
+
fill: currentColor;
|
|
19
|
+
}
|
|
20
|
+
/* Structurizr typography: bold name, smaller stereotype/type and description lines. */
|
|
21
|
+
.c4-shape .label .c4-name {
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
}
|
|
24
|
+
.c4-shape .label .c4-type {
|
|
25
|
+
font-size: 0.75em;
|
|
26
|
+
}
|
|
27
|
+
.c4-shape .label .c4-descr {
|
|
28
|
+
font-size: 0.82em;
|
|
29
|
+
}
|
|
30
|
+
.c4-shape .basic,
|
|
31
|
+
.c4-shape rect,
|
|
32
|
+
.c4-shape path,
|
|
33
|
+
.c4-shape circle,
|
|
34
|
+
.c4-shape ellipse,
|
|
35
|
+
.c4-shape line {
|
|
36
|
+
stroke-width: 2px;
|
|
37
|
+
}
|
|
38
|
+
`,`getStyles`),init:/* @__PURE__ */ v(({c4:e,wrap:t})=>{$e.setConf(e),ue.setWrap(t)},`init`)};export{tt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var t=/* @__PURE__ */ e(()=>`
|
|
2
|
+
/* Font Awesome icon styling - consolidated */
|
|
3
|
+
.label-icon {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
height: 1em;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
vertical-align: -0.125em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.node .label-icon path {
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
stroke: revert;
|
|
13
|
+
stroke-width: revert;
|
|
14
|
+
}
|
|
15
|
+
`,`getIconStyles`);export{t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{R as e,h as t,p as n,r,s as i}from"./chunk-BG4553SI-DUBI9JbR.js";import{n as a,t as o}from"./d3-selection-CBFxn8wf.js";import{n as s}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as c}from"./dist-CwuaKeLF.js";import{C as l,T as u,a as d,b as f,c as ee,d as te,f as ne,g as re,h as ie,i as ae,l as oe,m as se,o as ce,p as le,s as ue,u as de,v as fe,w as pe,x as me,y as he}from"./d3-shape-v1Y4qR5e.js";function p(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ge(e){return Number.isSafeInteger(e)&&e>=0}function m(e){return e!=null&&typeof e!=`function`&&ge(e.length)}function _e(e){return e===`__proto__`}var ve=Object.prototype.hasOwnProperty;function h(e,t){return ve.call(e,t)}function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var v=`[object RegExp]`,y=`[object String]`,b=`[object Number]`,x=`[object Boolean]`,S=`[object Arguments]`,C=`[object Symbol]`,ye=`[object Date]`,be=`[object Map]`,xe=`[object Set]`,Se=`[object Array]`,Ce=`[object ArrayBuffer]`,we=`[object Object]`,Te=`[object DataView]`,Ee=`[object Uint8Array]`,De=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`,E=`[object Int8Array]`,D=`[object Int16Array]`,O=`[object Int32Array]`,k=`[object Float32Array]`,A=`[object Float64Array]`,j=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function M(e){return j.Buffer!==void 0&&j.Buffer.isBuffer(e)}function Oe(e){return M(e)}function N(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function P(e){return N(e)}function F(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ke(e,t){return I(e,void 0,e,/* @__PURE__ */ new Map,t)}function I(e,t,n,r,i){if(i!=null){let a=i(e,t,n,r);if(a!==void 0)return a}if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return h(e,`index`)&&(t.index=e.index),h(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=/* @__PURE__ */ new Map;return r.set(e,t),e.forEach((e,a)=>{t.set(a,I(e,a,n,r,i))}),t}if(e instanceof Set){let t=/* @__PURE__ */ new Set;return r.set(e,t),e.forEach(e=>{t.add(I(e,void 0,n,r,i))}),t}if(Oe(e))return e.subarray();if(P(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),L(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}let a=_(e);if(a===`[object Error]`)return e===n?{}:e;switch(a){case b:case y:case x:{let t=new e.constructor(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}case S:{let t={};return r.set(e,t),L(t,e,n,r,i),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}}if(typeof e==`object`&&Ae(a)){let t=a===`[object Object]`&&typeof e.constructor!=`function`?{}:Object.create(Object.getPrototypeOf(e));return r.set(e,t),L(t,e,n,r,i),t}return e}function L(e,t,n,r,i){let a=[...Object.keys(t),...F(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=I(t[s],s,n,r,i))}}function Ae(e){switch(e){case S:case Se:case Ce:case Te:case x:case ye:case k:case A:case E:case D:case O:case be:case b:case we:case v:case xe:case y:case C:case Ee:case De:case w:case T:return!0;default:return!1}}function R(e){return ke(e)}function z(e){return typeof e==`object`&&!!e&&_(e)===`[object Arguments]`}function B(e){return typeof e==`object`&&!!e}function je(e){return B(e)&&m(e)}function V(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(V.Cache||Map),n}V.Cache=Map;function Me(e){if(g(e))return e;if(Array.isArray(e)||N(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=typeof AggregateError<`u`&&e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}if(typeof File<`u`&&e instanceof File)return new n([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e==`object`){let n=Object.create(t);return Object.assign(n,e)}return e}function Ne(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,/* @__PURE__ */ new Map)}return i}function H(e,t,n,r){if(g(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return Me(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)e in t||(t[e]=void 0)}let i=[...Object.keys(t),...F(t)];for(let a=0;a<i.length;a++){let o=i[a];if(_e(o))continue;let s=t[o],c=e[o];if(z(s)&&(s=Object.assign({},s)),z(c)&&(c=Object.assign({},c)),M(s)&&(s=R(s)),Array.isArray(s)){if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(je(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[]}let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||B(c)&&B(s)&&(p(c)||p(s)||P(c)||P(s))?e[o]=H(c,s,n,r):c==null&&p(s)?e[o]=H({},s,n,r):c==null&&P(s)?e[o]=R(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Pe(){}function Fe(e,...t){return Ne(e,...t,Pe)}var Ie=c(),Le={curveBasis:ae,curveBasisClosed:d,curveBasisOpen:ce,curveBumpX:ue,curveBumpY:ee,curveBundle:oe,curveCardinalClosed:te,curveCardinalOpen:ne,curveCardinal:de,curveCatmullRomClosed:se,curveCatmullRomOpen:ie,curveCatmullRom:le,curveLinear:re,curveLinearClosed:fe,curveMonotoneX:he,curveMonotoneY:f,curveNatural:me,curveStep:l,curveStepAfter:pe,curveStepBefore:u},Re=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ze=/* @__PURE__ */ s(function(t,i){let a=Be(t,/(?:init\b)|(?:initialize\b)/),o={};if(Array.isArray(a)){let t=a.map(e=>e.args);e(t),o=r(o,[...t])}else o=a.args;if(!o)return;let s=n(t,i),c=`config`;return o[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),o[s]=o[c],delete o[c]),o},`detectInit`),Be=/* @__PURE__ */ s(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${Re.source})(?=[}][%]{2}).*
|
|
2
|
+
`,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),a.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let i,o=[];for(;(i=t.exec(e))!==null;)if(i.index===t.lastIndex&&t.lastIndex++,i&&!n||n&&i[1]?.match(n)||n&&i[2]?.match(n)){let e=i[1]?i[1]:i[2],t=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(t){return a.error(`ERROR: ${t.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),Ve=/* @__PURE__ */ s(function(e){return e.replace(t,``)},`removeDirectives`),He=/* @__PURE__ */ s(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?Le[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}s(U,`interpolateToCurve`);function Ue(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Ie.sanitizeUrl)(n)}s(Ue,`formatUrl`);var We=/* @__PURE__ */ s((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],o=window;for(let t=0;t<r;t++)if(o=o[n[t]],!o){a.error(`Function name: ${e} not found in window`);return}o[i](...t)},`runFunc`);function W(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}s(W,`distance`);function Ge(e){let t,n=0;return e.forEach(e=>{n+=W(e,t),t=e}),G(e,n/2)}s(Ge,`traverseEdge`);function Ke(e){return e.length===1?e[0]:Ge(e)}s(Ke,`calcLabelPosition`);var qe=/* @__PURE__ */ s((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=/* @__PURE__ */ s((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:qe((1-i)*n.x+i*t.x,5),y:qe((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),Je=/* @__PURE__ */ s((e,t,n)=>{a.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=G(t,25),i=e?10:5,o=Math.atan2(t[0].y-r.y,t[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(o)*i+(t[0].x+r.x)/2,s.y=-Math.cos(o)*i+(t[0].y+r.y)/2,s},`calcCardinalityPosition`);function Ye(e,t,n){let r=structuredClone(n);a.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=G(r,25+e),o=10+e*.5,s=Math.atan2(r[0].y-i.y,r[0].x-i.x),c={x:0,y:0};return t===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(r[0].x+i.x)/2,c.y=-Math.cos(s+Math.PI)*o+(r[0].y+i.y)/2):t===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(r[0].x+i.x)/2,c.y=-Math.cos(s-Math.PI)*o+(r[0].y+i.y)/2):(c.x=Math.sin(s)*o+(r[0].x+i.x)/2,c.y=-Math.cos(s)*o+(r[0].y+i.y)/2),c}s(Ye,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}s(K,`getStylesFromArray`);var Xe=0,Ze=/* @__PURE__ */ s(()=>(Xe++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Xe),`generateId`);function Qe(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}s(Qe,`makeRandomHex`);var $e=/* @__PURE__ */ s(e=>Qe(e.length),`random`),et=/* @__PURE__ */ s(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),tt=/* @__PURE__ */ s(function(e,t){let n=t.text.replace(i.lineBreakRegex,` `),[,r]=Z(t.fontSize),a=e.append(`text`);a.attr(`x`,t.x),a.attr(`y`,t.y),a.style(`text-anchor`,t.anchor),a.style(`font-family`,t.fontFamily),a.style(`font-size`,r),a.style(`font-weight`,t.fontWeight),a.attr(`fill`,t.fill),t.class!==void 0&&a.attr(`class`,t.class);let o=a.append(`tspan`);return o.attr(`x`,t.x+t.textMargin*2),o.attr(`fill`,t.fill),o.text(n),a},`drawSimpleText`),nt=V((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),i.hasBreaks(e)))return e;let r=e.split(` `).filter(Boolean),a=[],o=``;return r.forEach((e,i)=>{let s=J(`${e} `,n),c=J(o,n);if(s>t){let{hyphenatedStrings:r,remainingWord:i}=rt(e,t,`-`,n);a.push(o,...r),o=i}else c+s>=t?(a.push(o),o=e):o=[o,e].filter(Boolean).join(` `);i+1===r.length&&a.push(o)}),a.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),rt=V((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}s(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}s(J,`calculateTextWidth`);var Y=V((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,s]=Z(n),c=[`sans-serif`,r],l=e.split(i.lineBreakRegex),u=[],d=o(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let i=et();i.text=r||``;let o=tt(f,i).style(`font-size`,s).style(`font-weight`,a).style(`font-family`,e),c=(o._groups||o)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),it=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{s(this,`InitIDGenerator`)}},X,at=/* @__PURE__ */ s(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function ot(e){return`str`in e}s(ot,`isDetailedError`);function st(e){return e instanceof Error?e.message:String(e)}s(st,`getErrorMessage`);var ct=/* @__PURE__ */ s((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=/* @__PURE__ */ s(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return Fe({},e,t)}s(Q,`cleanAndMerge`);var lt={assignWithDepth:r,wrapLabel:nt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:ze,detectDirective:Be,isSubstringInArray:He,interpolateToCurve:U,calcLabelPosition:Ke,calcCardinalityPosition:Je,calcTerminalLabelPosition:Ye,formatUrl:Ue,getStylesFromArray:K,generateId:Ze,random:$e,runFunc:We,entityDecode:at,insertTitle:ct,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:it},ut=/* @__PURE__ */ s(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),dt=/* @__PURE__ */ s(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),ft=/* @__PURE__ */ s((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function pt(e){return e??null}s(pt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}s($,`isLabelCoordinateInPath`);export{D as A,w as B,Ce as C,ye as D,Te as E,we as F,g as G,Ee as H,v as I,h as K,xe as L,E as M,be as N,k as O,b as P,y as R,S,x as T,De as U,T as V,_ as W,lt as _,dt as a,P as b,ft as c,pt as d,U as f,Ve as g,$e as h,Q as i,O as j,A as k,st as l,Z as m,q as n,ut as o,ot as p,m as q,J as r,Ze as s,Y as t,K as u,nt as v,Se as w,M as x,z as y,C as z};
|