@softistx/pulsarix-widget 0.7.2 → 0.8.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.
Files changed (97) hide show
  1. package/README.md +15 -8
  2. package/dist/chunks/abnfDiagram-XWFEHMT6.jcqkp43e.js +1 -0
  3. package/dist/chunks/architecture-WOLXFQ4H.6qa86taq.js +1 -0
  4. package/dist/chunks/architectureDiagram-CSQXQB3N.pk9dxdfb.js +36 -0
  5. package/dist/chunks/blockDiagram-BEDRHYPZ.ehefn7dt.js +140 -0
  6. package/dist/chunks/bpmnIcons-APHXDYXF.whh96nc8.js +1 -0
  7. package/dist/chunks/c4Diagram-M2UUVUY5.knj3as6x.js +38 -0
  8. package/dist/chunks/chat-markdown-DLDNLXM9.tvekh9sm.js +301 -0
  9. package/dist/chunks/classDiagram-v2-KXABOMEV.vtb7vjzn.js +217 -0
  10. package/dist/chunks/cose-bilkent-JH36ORCC.gb18dr42.js +1 -0
  11. package/dist/chunks/cynefin-EF2NZ3EQ.e86yfa9w.js +1 -0
  12. package/dist/chunks/cynefinDiagram-NJNITYFG.akmr90zk.js +62 -0
  13. package/dist/chunks/dagre-KIHZ2IZ3.7n7s7vq2.js +4 -0
  14. package/dist/chunks/diagram-7YQZDPLS.d3sdv0py.js +41 -0
  15. package/dist/chunks/diagram-QBROCOUO.2v08zs42.js +200 -0
  16. package/dist/chunks/diagram-RJJCUUZO.tpnwa621.js +30 -0
  17. package/dist/chunks/diagram-WERXNKYE.hz7tgbtr.js +24 -0
  18. package/dist/chunks/diagram-YHHI257C.9gge9ecb.js +3 -0
  19. package/dist/chunks/diagram-YR4HJLHV.bajpx75b.js +24 -0
  20. package/dist/chunks/ebnfDiagram-N527522P.hxbbq671.js +1 -0
  21. package/dist/chunks/editor-shortcuts-dialog-I77EAez1.0s00eh53.js +1 -0
  22. package/dist/chunks/editor.h5bxwyxn.js +4 -0
  23. package/dist/chunks/elk-O5DQBFGD.vy7cdqps.js +27 -0
  24. package/dist/chunks/emoji-picker-BofyuTmK.qf287fk6.js +4 -0
  25. package/dist/chunks/erDiagram-K3K3BIDK.kzs3v0ts.js +99 -0
  26. package/dist/chunks/eventmodeling-K75KTNOO.9yb5zf47.js +1 -0
  27. package/dist/chunks/flow-diagram-OPO1ep57.5006stqg.js +7 -0
  28. package/dist/chunks/flowDiagram-Z6JWZHQI.zf0kndsp.js +1 -0
  29. package/dist/chunks/ganttDiagram-3PRQTZWP.qkcp8pvg.js +292 -0
  30. package/dist/chunks/gitGraph-VSP46ZUC.txpj8e6d.js +1 -0
  31. package/dist/chunks/gitGraphDiagram-VXDFKS5L.ry9dejxm.js +106 -0
  32. package/dist/chunks/grid-E2QIVN74.q51enfx7.js +1 -0
  33. package/dist/chunks/illustration-BoOzuxNg.h0gnxa4s.js +1 -0
  34. package/dist/chunks/index.0hrfbrja.js +44 -0
  35. package/dist/chunks/index.153rcscj.js +2 -0
  36. package/dist/chunks/index.20dvswea.js +2 -0
  37. package/dist/chunks/index.23p1k2rx.js +2 -0
  38. package/dist/chunks/index.3k4gyba0.js +2 -0
  39. package/dist/chunks/index.51yk4ene.js +2 -0
  40. package/dist/chunks/index.9zhger75.js +142 -0
  41. package/dist/chunks/index.bfeafb22.js +1 -0
  42. package/dist/chunks/index.cf9nd6xy.js +2 -0
  43. package/dist/chunks/index.eec12m3n.js +16 -0
  44. package/dist/chunks/index.fab58nn0.js +2 -0
  45. package/dist/chunks/index.fgsp5qqn.js +303 -0
  46. package/dist/chunks/index.fv9af3wd.js +333 -0
  47. package/dist/chunks/index.fvh2m60c.js +2 -0
  48. package/dist/chunks/index.gqa9s37g.js +2 -0
  49. package/dist/chunks/index.h6120080.js +2 -0
  50. package/dist/chunks/index.q9dsw4bt.js +2 -0
  51. package/dist/chunks/index.vnhefjwh.js +2 -0
  52. package/dist/chunks/index.x163xe9c.js +89 -0
  53. package/dist/chunks/index.x1xqs5m5.js +214 -0
  54. package/dist/chunks/index.yf0h5qnv.js +2 -0
  55. package/dist/chunks/info-OHQRW6UA.xea9bh7d.js +1 -0
  56. package/dist/chunks/infoDiagram-EZ3ZOAHP.r2yygqw8.js +2 -0
  57. package/dist/chunks/ishikawaDiagram-S3EKX5GW.gwqtdvb2.js +70 -0
  58. package/dist/chunks/journeyDiagram-POQNLL5X.rp31qkq5.js +139 -0
  59. package/dist/chunks/kanban-definition-BH5XI6FM.ymsqx6en.js +89 -0
  60. package/dist/chunks/katex.n08hp8fc.js +257 -0
  61. package/dist/chunks/markup-color-chrome-ykGNUl8y.06cy435c.js +1 -0
  62. package/dist/chunks/markup-custom-color-C8Xc6JxB.an2wngns.js +1 -0
  63. package/dist/chunks/mention-list-Dhq70jL5.1k61f24q.js +1 -0
  64. package/dist/chunks/mermaid.core.x45crg0h.js +12 -0
  65. package/dist/chunks/mindmap-definition-WVAN44T4.5cbd4rg2.js +98 -0
  66. package/dist/chunks/packet-JDAUHWVQ.c7dmae11.js +1 -0
  67. package/dist/chunks/panel.rzp4q8s3.js +7 -0
  68. package/dist/chunks/pegDiagram-D4NLKWP3.fsryts4r.js +1 -0
  69. package/dist/chunks/pie-XZMESJXO.6rv4kzjx.js +1 -0
  70. package/dist/chunks/pieDiagram-36ENHN4W.k4k2gvg0.js +39 -0
  71. package/dist/chunks/plated-illustration-BzxADkoZ.wtc9psry.js +1 -0
  72. package/dist/chunks/quadrantDiagram-ZQUDMS73.j7nj12w0.js +7 -0
  73. package/dist/chunks/radar-ABXABTNO.58dfc8ba.js +1 -0
  74. package/dist/chunks/railroad-I3PHUGI6.00fqbahv.js +1 -0
  75. package/dist/chunks/railroad-abnf-LNEFI6M7.gt1x50q5.js +1 -0
  76. package/dist/chunks/railroad-ebnf-DWYD2UWJ.qr5qfkga.js +1 -0
  77. package/dist/chunks/railroad-peg-JR7BVNR7.m61rq7hj.js +1 -0
  78. package/dist/chunks/railroadDiagram-JIZHGYPL.a681wt3b.js +1 -0
  79. package/dist/chunks/render-VIF2ZAQL.rn9hpsbx.js +1 -0
  80. package/dist/chunks/requirementDiagram-AXW2TVFA.shapgy39.js +84 -0
  81. package/dist/chunks/sankeyDiagram-FBCJTAIF.2syz1e2b.js +40 -0
  82. package/dist/chunks/sequenceDiagram-3LA2ROMG.jq1w12a6.js +169 -0
  83. package/dist/chunks/sizeCapture-2Q2CQKSF.jtv53a6j.js +1 -0
  84. package/dist/chunks/stateDiagram-v2-ATKHQDJO.x0g2rngz.js +291 -0
  85. package/dist/chunks/swimlanes-YQL5WMAO.j7j7c6ex.js +1 -0
  86. package/dist/chunks/swimlanesDiagram-UCCPES4V.tzqcsrmd.js +8 -0
  87. package/dist/chunks/timeline-definition-7Z437IG3.s5bvn8dr.js +120 -0
  88. package/dist/chunks/treeView-D4JQ5SDB.0x1grm2t.js +1 -0
  89. package/dist/chunks/treemap-SAJKECNS.1te19jsm.js +1 -0
  90. package/dist/chunks/usecaseDiagram-RDK6N6HP.9k4r423e.js +370 -0
  91. package/dist/chunks/vennDiagram-SHRQU5PJ.82q5dzm6.js +34 -0
  92. package/dist/chunks/wardley-7MLQ67FV.zp6gykk3.js +1 -0
  93. package/dist/chunks/wardleyDiagram-F3OXNVQS.fm4tw2nc.js +78 -0
  94. package/dist/chunks/xychartDiagram-GDYJKCDI.57vqn2zd.js +7 -0
  95. package/dist/index.js +23 -4695
  96. package/docs/integration.md +146 -33
  97. package/package.json +7 -6
@@ -0,0 +1,140 @@
1
+ import{e,n,be,gt,k,y,j,A,u,m,no,ve,he,pe,tt,rt,Yr,mn,ao,Ma,Na,Da,Oa,io,oo,so,lo,co,uo,fo,ho,po,mo,go,bo,vo,yo,xo,wo,ko,gn,Zt,Co,Ft,St,$t,yn,br,xn}from"./index.fgsp5qqn.js";import{ue}from"./index.20dvswea.js";import{Xe}from"./index.eec12m3n.js";function De(t){return Array.isArray(t)}function Te(t){if(Yr(t))return t;let o=mn(t);if(!Je(t))return{};if(De(t)){let i=Array.from(t);if(t.length>0&&typeof t[0]==="string"&&gn(t,"index"))i.index=t.index,i.input=t.input;return i}if(Zt(t)){let i=t;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(t.byteLength);if(o==="[object DataView]"){let i=t,{buffer:g,byteOffset:p,byteLength:r}=i,d=new ArrayBuffer(r),E=new Uint8Array(g,p,r);return new Uint8Array(d).set(E),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new t.constructor(t.valueOf());if(o==="[object String]")Qe(g,t);else ce(g,t);return g}if(o==="[object Date]")return new Date(Number(t));if(o==="[object RegExp]"){let i=t,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(t));if(o==="[object Map]"){let i=t,g=new Map;return i.forEach((p,r)=>{g.set(r,p)}),g}if(o==="[object Set]"){let i=t,g=new Set;return i.forEach((p)=>{g.add(p)}),g}if(o==="[object Arguments]"){let i=t,g={};return ce(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let c={};return $e(c,t),ce(c,t),Ze(c,t),c}function Je(t){switch(mn(t)){case Oa:case co:case uo:case ho:case Da:case oo:case wo:case ko:case vo:case yo:case xo:case so:case Na:case fo:case ao:case lo:case Ma:case io:case po:case mo:case go:case bo:return!0;default:return!1}}function ce(t,o){for(let c in o)if(gn(o,c))t[c]=o[c]}function Ze(t,o){let c=Object.getOwnPropertySymbols(o);for(let i=0;i<c.length;i++){let g=c[i];if(Object.prototype.propertyIsEnumerable.call(o,g))t[g]=o[g]}}function Qe(t,o){let c=o.valueOf().length;for(let i in o)if(gn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=c))t[i]=o[i]}function $e(t,o){let c=Object.getPrototypeOf(o);if(c!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(t,c)}}var de=function(){var t=e(function(B,f,a,h){for(a=a||{},h=B.length;h--;a[B[h]]=f);return a},"o"),o=[1,15],c=[1,7],i=[1,13],g=[1,14],p=[1,19],r=[1,16],d=[1,17],E=[1,18],w=[8,30],x=[8,10,21,28,29,30,31,39,43,46],S=[1,23],_=[1,24],T=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],I=[1,49],N={trace:e(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:e(function(f,a,h,b,D,s,U){var l=s.length-1;switch(D){case 4:b.getLogger().debug("Rule: separator (NL) ");break;case 5:b.getLogger().debug("Rule: separator (Space) ");break;case 6:b.getLogger().debug("Rule: separator (EOF) ");break;case 7:b.getLogger().debug("Rule: hierarchy: ",s[l-1]),b.setHierarchy(s[l-1]);break;case 8:b.getLogger().debug("Stop NL ");break;case 9:b.getLogger().debug("Stop EOF ");break;case 10:b.getLogger().debug("Stop NL2 ");break;case 11:b.getLogger().debug("Stop EOF2 ");break;case 12:b.getLogger().debug("Rule: statement: ",s[l]),typeof s[l].length==="number"?this.$=s[l]:this.$=[s[l]];break;case 13:b.getLogger().debug("Rule: statement #2: ",s[l-1]),this.$=[s[l-1]].concat(s[l]);break;case 14:b.getLogger().debug("Rule: link: ",s[l],f),this.$={edgeTypeStr:s[l],label:""};break;case 15:b.getLogger().debug("Rule: LABEL link: ",s[l-3],s[l-1],s[l]),this.$={edgeTypeStr:s[l],label:s[l-1]};break;case 18:let W=parseInt(s[l]),X=b.generateId();this.$={id:X,type:"space",label:"",width:W,children:[]};break;case 23:b.getLogger().debug("Rule: (nodeStatement link node) ",s[l-2],s[l-1],s[l]," typestr: ",s[l-1].edgeTypeStr);let G=b.edgeStrToEdgeData(s[l-1].edgeTypeStr),re=b.edgeStrToEdgeStartData(s[l-1].edgeTypeStr),q=b.edgeStrToThickness(s[l-1].edgeTypeStr),se=b.edgeStrToPattern(s[l-1].edgeTypeStr);this.$=[{id:s[l-2].id,label:s[l-2].label,type:s[l-2].type,directions:s[l-2].directions},{id:s[l-2].id+"-"+s[l].id,start:s[l-2].id,end:s[l].id,label:s[l-1].label,type:"edge",thickness:q,pattern:se,directions:s[l].directions,arrowTypeEnd:G,arrowTypeStart:re},{id:s[l].id,label:s[l].label,type:b.typeStr2Type(s[l].typeStr),directions:s[l].directions}];break;case 24:b.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[l-1],s[l]),this.$={id:s[l-1].id,label:s[l-1].label,type:b.typeStr2Type(s[l-1].typeStr),directions:s[l-1].directions,widthInColumns:parseInt(s[l],10)};break;case 25:b.getLogger().debug("Rule: nodeStatement (node) ",s[l]),this.$={id:s[l].id,label:s[l].label,type:b.typeStr2Type(s[l].typeStr),directions:s[l].directions,widthInColumns:1};break;case 26:b.getLogger().debug("APA123",this?this:"na"),b.getLogger().debug("COLUMNS: ",s[l]),this.$={type:"column-setting",columns:s[l]==="auto"?-1:parseInt(s[l])};break;case 27:b.getLogger().debug("Rule: id-block statement : ",s[l-2],s[l-1]);let C=b.generateId();this.$={...s[l-2],type:"composite",children:s[l-1]};break;case 28:b.getLogger().debug("Rule: blockStatement : ",s[l-2],s[l-1],s[l]);let M=b.generateId();this.$={id:M,type:"composite",label:"",children:s[l-1]};break;case 29:b.getLogger().debug("Rule: node (NODE_ID separator): ",s[l]),this.$={id:s[l]};break;case 30:b.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[l-1],s[l]),this.$={id:s[l-1],label:s[l].label,typeStr:s[l].typeStr,directions:s[l].directions};break;case 31:b.getLogger().debug("Rule: dirList: ",s[l]),this.$=[s[l]];break;case 32:b.getLogger().debug("Rule: dirList: ",s[l-1],s[l]),this.$=[s[l-1]].concat(s[l]);break;case 33:b.getLogger().debug("Rule: nodeShapeNLabel: ",s[l-2],s[l-1],s[l]),this.$={typeStr:s[l-2]+s[l],label:s[l-1]};break;case 34:b.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[l-3],s[l-2]," #3:",s[l-1],s[l]),this.$={typeStr:s[l-3]+s[l],label:s[l-2],directions:s[l-1]};break;case 35:case 36:this.$={type:"classDef",id:s[l-1].trim(),css:s[l].trim()};break;case 37:this.$={type:"applyClass",id:s[l-1].trim(),styleClass:s[l].trim()};break;case 38:this.$={type:"applyStyles",id:s[l-1].trim(),stylesStr:s[l].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:p,39:r,43:d,46:E},{8:[1,20]},t(w,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:c,28:i,29:g,31:p,39:r,43:d,46:E}),t(x,[2,16],{14:22,15:S,16:_}),t(x,[2,17]),t(x,[2,18]),t(x,[2,19]),t(x,[2,20]),t(x,[2,21]),t(x,[2,22]),t(T,[2,25],{27:[1,25]}),t(x,[2,26]),{19:26,26:12,31:p},{10:o,11:27,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:p,39:r,43:d,46:E},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(w,[2,13]),{26:35,31:p},{31:[2,14]},{17:[1,36]},t(T,[2,24]),{10:o,11:37,13:4,14:22,15:S,16:_,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:p,39:r,43:d,46:E},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(L,[2,30]),{18:[1,43]},{18:[1,44]},t(T,[2,23]),{18:[1,45]},{30:[1,46]},t(x,[2,28]),t(x,[2,35]),t(x,[2,36]),t(x,[2,37]),t(x,[2,38]),{36:[1,47]},{33:48,34:I},{15:[1,50]},t(x,[2,27]),t(L,[2,33]),{38:[1,51]},{33:52,34:I,38:[2,31]},{31:[2,15]},t(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(f,a){if(a.recoverable)this.trace(f);else{var h=Error(f);throw h.hash=a,h}},"parseError"),parse:e(function(f){var a=this,h=[0],b=[],D=[null],s=[],U=this.table,l="",W=0,X=0,G=0,re=2,q=1,se=s.slice.call(arguments,1),C=Object.create(this.lexer),M={yy:{}};for(var ie in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ie))M.yy[ie]=this.yy[ie];if(C.setInput(f,M.yy),M.yy.lexer=C,M.yy.parser=this,typeof C.yylloc>"u")C.yylloc={};var ae=C.yylloc;s.push(ae);var je=C.options&&C.options.ranges;if(typeof M.yy.parseError==="function")this.parseError=M.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function qe(P){h.length=h.length-2*P,D.length=D.length-P,s.length=s.length-P}e(qe,"popStack");function we(){var P=b.pop()||C.lex()||q;if(typeof P!=="number"){if(P instanceof Array)b=P,P=b.pop();P=a.symbols_[P]||P}return P}e(we,"lex");var O,ne,Y,R,Ot,oe,V={},J,K,_e,Z;while(!0){if(Y=h[h.length-1],this.defaultActions[Y])R=this.defaultActions[Y];else{if(O===null||typeof O>"u")O=we();R=U[Y]&&U[Y][O]}if(typeof R>"u"||!R.length||!R[0]){var le="";Z=[];for(J in U[Y])if(this.terminals_[J]&&J>re)Z.push("'"+this.terminals_[J]+"'");if(C.showPosition)le="Parse error on line "+(W+1)+`:
2
+ `+C.showPosition()+`
3
+ Expecting `+Z.join(", ")+", got '"+(this.terminals_[O]||O)+"'";else le="Parse error on line "+(W+1)+": Unexpected "+(O==q?"end of input":"'"+(this.terminals_[O]||O)+"'");this.parseError(le,{text:C.match,token:this.terminals_[O]||O,line:C.yylineno,loc:ae,expected:Z})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+Y+", token: "+O);switch(R[0]){case 1:if(h.push(O),D.push(C.yytext),s.push(C.yylloc),h.push(R[1]),O=null,!ne){if(X=C.yyleng,l=C.yytext,W=C.yylineno,ae=C.yylloc,G>0)G--}else O=ne,ne=null;break;case 2:if(K=this.productions_[R[1]][1],V.$=D[D.length-K],V._$={first_line:s[s.length-(K||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(K||1)].first_column,last_column:s[s.length-1].last_column},je)V._$.range=[s[s.length-(K||1)].range[0],s[s.length-1].range[1]];if(oe=this.performAction.apply(V,[l,X,W,M.yy,R[1],D,s].concat(se)),typeof oe<"u")return oe;if(K)h=h.slice(0,-1*K*2),D=D.slice(0,-1*K),s=s.slice(0,-1*K);h.push(this.productions_[R[1]][0]),D.push(V.$),s.push(V._$),_e=U[h[h.length-2]][h[h.length-1]],h.push(_e);break;case 3:return!0}}return!0},"parse")},v=function(){var B={EOF:1,parseError:e(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw Error(a)},"parseError"),setInput:e(function(f,a){if(this.yy=a||this.yy||{},this._input=f,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var a=f.match(/(?:\r\n?|\n).*/g);if(a)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),f},"input"),unput:e(function(f){var a=f.length,h=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var b=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var D=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===b.length?this.yylloc.first_column:0)+b[b.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges)this.yylloc.range=[D[0],D[0]+this.yyleng-a];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(f){this.unput(this.match.slice(f))},"less"),pastInput:e(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var f=this.match;if(f.length<20)f+=this._input.substr(0,20-f.length);return(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var f=this.pastInput(),a=Array(f.length+1).join("-");return f+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:e(function(f,a){var h,b,D;if(this.options.backtrack_lexer){if(D={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)D.yylloc.range=this.yylloc.range.slice(0)}if(b=f[0].match(/(?:\r\n?|\n).*/g),b)this.yylineno+=b.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(f[0].length),this.matched+=f[0],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in D)this[s]=D[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var f,a,h,b;if(!this._more)this.yytext="",this.match="";var D=this._currentRules();for(var s=0;s<D.length;s++)if(h=this._input.match(this.rules[D[s]]),h&&(!a||h[0].length>a[0].length)){if(a=h,b=s,this.options.backtrack_lexer)if(f=this.test_match(h,D[s]),f!==!1)return f;else if(this._backtrack){a=!1;continue}else return!1;else if(!this.options.flex)break}if(a){if(f=this.test_match(a,D[b]),f!==!1)return f;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var a=this.next();if(a)return a;else return this.lex()},"lex"),begin:e(function(a){this.conditionStack.push(a)},"begin"),popState:e(function(){var a=this.conditionStack.length-1;if(a>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(a){if(a=this.conditionStack.length-1-Math.abs(a||0),a>=0)return this.conditionStack[a];else return"INITIAL"},"topState"),pushState:e(function(a){this.begin(a)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(a,h,b,D){var s=D;switch(b){case 0:return a.getLogger().debug("Found block-beta"),10;break;case 1:return a.getLogger().debug("Found id-block"),29;break;case 2:return a.getLogger().debug("Found block"),10;break;case 3:a.getLogger().debug(".",h.yytext);break;case 4:a.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),a.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;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:a.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return a.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),a.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",a.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;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(),a.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),a.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),a.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),a.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),a.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),a.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),a.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),a.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),a.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),a.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),a.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),a.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),a.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return a.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return a.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return a.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return a.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return a.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return a.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return a.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),a.getLogger().debug("LEX ARR START"),37;break;case 74:return a.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return a.getLogger().debug("Lex: EOF",h.yytext),8;break;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:a.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:a.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return a.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:a.getLogger().debug("LEX POPPING"),this.popState();break;case 84:a.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",a.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return a.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return a.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return a.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return a.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return a.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return a.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return a.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return a.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),a.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),a.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),a.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return a.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"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}}};return B}();N.lexer=v;function z(){this.yy={}}return e(z,"Parser"),z.prototype=N,N.Parser=z,new z}();de.parser=de;var et=de,F=new Map,me=[],fe=new Map,Ne="color",Ie="fill",st="bgFill",Oe=",",Q=new Map,xe="",it=e((t)=>y.sanitizeText(t,u()),"sanitizeText"),at=e(function(t,o=""){let c=Q.get(t);if(!c)c={id:t,styles:[],textStyles:[]},Q.set(t,c);if(o!==void 0&&o!==null)o.split(Oe).forEach((i)=>{let g=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ne).exec(i)){let r=g.replace(Ie,st).replace(Ne,Ie);c.textStyles.push(r)}c.styles.push(g)})},"addStyleClass"),nt=e(function(t,o=""){let c=F.get(t);if(o!==void 0&&o!==null)c.styles=o.split(Oe)},"addStyle2Node"),ot=e(function(t,o){t.split(",").forEach(function(c){let i=F.get(c);if(i===void 0){let g=c.trim();i={id:g,type:"na",children:[]},F.set(g,i)}if(!i.classes)i.classes=[];i.classes.push(o)})},"setCssClass"),Ae=0,ze=e((t,o)=>{let c=t.flat(),i=[],p=c.find((r)=>r?.type==="column-setting")?.columns??-1;for(let r of c){if(typeof p==="number"&&p>0&&r.type!=="column-setting"&&typeof r.widthInColumns==="number"&&r.widthInColumns>p)n.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${p}`);if(r.label)r.label=it(r.label);if(r.type==="classDef"){at(r.id,r.css);continue}if(r.type==="applyClass"){ot(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){if(r?.stylesStr)nt(r.id,r?.stylesStr);continue}if(r.type==="column-setting")o.columns=r.columns??-1;else if(r.type==="edge"){let d=(fe.get(r.id)??0)+1;fe.set(r.id,d),r.id=d+"-"+r.id,me.push(r)}else{if(!r.label)if(r.type==="composite")r.label="";else r.label=r.id;let d=F.get(r.id);if(d===void 0){if(r.type==="composite")r.colorIndex=Ae++;F.set(r.id,r)}else{if(r.type!=="na")d.type=r.type;if(r.label!==r.id)d.label=r.label}if(r.children)ze(r.children,r);if(r.type==="space"){let E=r.width??1;for(let w=0;w<E;w++){let x=Te(r);x.id=x.id+"-"+w,F.set(x.id,x),i.push(x)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),Le=[],H={id:"root",type:"composite",children:[],columns:-1},lt=e(()=>{n.debug("Clear called"),A(),H={id:"root",type:"composite",children:[],columns:-1},F=new Map([["root",H]]),Le=[],Q=new Map,me=[],fe=new Map,xe="",Ae=0},"clear");function Be(t){switch(n.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return n.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"}}e(Be,"typeStr2Type");function Re(t){switch(n.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}e(Re,"edgeTypeStr2Type");function Pe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(Pe,"edgeStrToEdgeData");function Fe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}e(Fe,"edgeStrToEdgeStartData");function Me(t){return t.includes("==")?"thick":"normal"}e(Me,"edgeStrToThickness");function Ke(t){if(t.includes(".-"))return"dotted";return"solid"}e(Ke,"edgeStrToPattern");var Ce=0,ct=e(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=e((t)=>{H.children=t,ze(t,H),Le=H.children},"setHierarchy"),ht=e((t)=>{let o=F.get(t);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),dt=e(()=>[...F.values()],"getBlocksFlat"),pt=e(()=>Le||[],"getBlocks"),ft=e(()=>me,"getEdges"),bt=e((t)=>F.get(t),"getBlock"),mt=e((t)=>{F.set(t.id,t)},"setBlock"),xt=e((t)=>{xe=t},"setDiagramId"),Lt=e(()=>xe,"getDiagramId"),kt=e(()=>n,"getLogger"),yt=e(function(){return Q},"getClasses"),Et={getConfig:e(()=>k().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:kt,getBlocksFlat:dt,getBlocks:pt,getEdges:ft,setHierarchy:ut,getBlock:bt,setBlock:mt,getColumns:ht,getClasses:yt,clear:lt,generateId:ct,setDiagramId:xt,getDiagramId:Lt},wt=Et,_t=e((t)=>{let{theme:o,bkgColorArray:c,borderColorArray:i}=t;if(!he(o,i))return"";let g=pe(t.look),p=ve(c),r="";for(let d=0;d<tt(t.THEME_COLOR_LIMIT,i);d++){let E=i[d%i.length],w=p?`fill: ${c[d%c.length]};`:"",x=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
7
+
8
+ ${x}.node rect.composite {
9
+ stroke: ${E};
10
+ ${w}
11
+ }
12
+ `}return r},"genColor"),ge=e((t,o)=>{let c=gt,i=c(t,"r"),g=c(t,"g"),p=c(t,"b");return be(i,g,p,o)},"fade"),Dt=e((t)=>`${_t(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: ${ge(t.mainBkg,0.5)};
103
+ fill: ${ge(t.clusterBkg,0.5)};
104
+ stroke: ${ge(t.clusterBorder,0.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
+ ${Xe()}
140
+ `,"getStyles"),Tt=Dt;function Se(t,o){if(t===0||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw Error("Position must be a non-negative integer."+o);if(t<0)return{px:o,py:0};if(t===1)return{px:0,py:o};let c=o%t,i=Math.floor(o/t);return{px:c,py:i}}e(Se,"calculateBlockPosition");var Nt=e((t)=>{let o=0,c=0;for(let i of t.children){let{width:g,height:p,x:r,y:d}=i.size??{width:0,height:0,x:0,y:0};if(n.debug("getMaxChildSize abc95 child:",i.id,"width:",g,"height:",p,"x:",r,"y:",d,i.type),i.type==="space")continue;let E=g/(i.widthInColumns??1);if(E>o)o=E;if(p>c)c=p}return{width:o,height:c}},"getMaxChildSize");function ee(t,o,c=0,i=0,g=8){if(n.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",c),!t?.size?.width)t.size={width:c,height:i,x:0,y:0};let p=0,r=0;if(t.children?.length>0){for(let L of t.children)ee(L,o,0,0,g);let d=Nt(t);p=d.width,r=d.height,n.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",p,r);for(let L of t.children)if(L.size)n.debug(`abc95 Setting size of children of ${t.id} id=${L.id} ${p} ${r} ${JSON.stringify(L.size)}`),L.size.width=p*(L.widthInColumns??1)+g*((L.widthInColumns??1)-1),L.size.height=r,L.size.x=0,L.size.y=0,n.debug(`abc95 updating size of ${t.id} children child:${L.id} maxWidth:${p} maxHeight:${r}`);for(let L of t.children)ee(L,o,p,r,g);let E=t.columns??-1,w=0;for(let L of t.children)w+=L.widthInColumns??1;let x=t.children.length;if(E>0&&E<w)x=E;let S=Math.ceil(w/x),_=x*(p+g)+g,T=S*(r+g)+g;if(_<c){n.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${c} siblingHeight ${i} width ${_}`),_=c,T=i;let L=(c-x*g-g)/x,I=(i-S*g-g)/S;n.debug("Size indata abc88",t.id,"childWidth",L,"maxWidth",p),n.debug("Size indata abc88",t.id,"childHeight",I,"maxHeight",r),n.debug("Size indata abc88 xSize",x,"padding",g);for(let N of t.children)if(N.size)N.size.width=L,N.size.height=I,N.size.x=0,N.size.y=0}if(n.debug(`abc95 (finale calc) ${t.id} xSize ${x} ySize ${S} columns ${E}${t.children.length} width=${Math.max(_,t.size?.width||0)}`),_<(t?.size?.width||0)){_=t?.size?.width||0;let L=E>0?Math.min(t.children.length,E):t.children.length;if(L>0){let I=(_-L*g-g)/L;n.debug("abc95 (growing to fit) width",t.id,_,t.size?.width,I);for(let N of t.children)if(N.size)N.size.width=I}}t.size={width:_,height:T,x:0,y:0}}n.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}e(ee,"setBlockSizes");function ke(t,o,c=8){n.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let i=t.columns??-1;if(n.debug("layoutBlocks columns abc95",t.id,"=>",i,t),t.children&&t.children.length>0){let g=t?.children[0]?.size?.width??0,p=t.children.length*g+(t.children.length-1)*c;n.debug("widthOfChildren 88",p,"posX");let r=new Map;{let S=0;for(let _ of t.children){if(!_.size)continue;let{py:T}=Se(i,S),L=r.get(T)??0;if(_.size.height>L)r.set(T,_.size.height);let I=_?.widthInColumns??1;if(i>0)I=Math.min(I,i-S%i);S+=I}}let d=new Map;{let S=0,_=[...r.keys()].sort((T,L)=>T-L);for(let T of _)d.set(T,S),S+=(r.get(T)??0)+c}let E=0;n.debug("abc91 block?.size?.x",t.id,t?.size?.x);let w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-c,x=0;for(let S of t.children){let _=t;if(!S.size)continue;let{width:T,height:L}=S.size,{px:I,py:N}=Se(i,E);if(N!=x)x=N,w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-c,n.debug("New row in layout for block",t.id," and child ",S.id,x);if(n.debug(`abc89 layout blocks (child) id: ${S.id} Pos: ${E} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${c}`),_.size){let z=T/2;S.size.x=w+c+z,n.debug(`abc91 layout blocks (calc) px, pyid:${S.id} startingPos=X${w} new startingPosX${S.size.x} ${z} padding=${c} width=${T} halfWidth=${z} => x:${S.size.x} y:${S.size.y} ${S.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(S?.widthInColumns??1)/2}`),w=S.size.x+z;let B=d.get(N)??0,f=r.get(N)??L;S.size.y=_.size.y-_.size.height/2+B+f/2+c,n.debug(`abc88 layout blocks (calc) px, pyid:${S.id}startingPosX${w}${c}${z}=>x:${S.size.x}y:${S.size.y}${S.widthInColumns}(width * (child?.w || 1)) / 2${T*(S?.widthInColumns??1)/2}`)}if(S.children)ke(S,o,c);let v=S?.widthInColumns??1;if(i>0)v=Math.min(v,i-E%i);E+=v,n.debug("abc88 columnsPos",S,E)}}n.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}e(ke,"layoutBlocks");function ye(t,{minX:o,minY:c,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:p,y:r,width:d,height:E}=t.size;if(p-d/2<o)o=p-d/2;if(r-E/2<c)c=r-E/2;if(p+d/2>i)i=p+d/2;if(r+E/2>g)g=r+E/2}if(t.children)for(let p of t.children)({minX:o,minY:c,maxX:i,maxY:g}=ye(p,{minX:o,minY:c,maxX:i,maxY:g}));return{minX:o,minY:c,maxX:i,maxY:g}}e(ye,"findBounds");function Ye(t){let o=t.getBlock("root");if(!o)return;let c=u()?.block?.padding??8;ee(o,t,0,0,c),ke(o,t,c),n.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:p,maxY:r}=ye(o),d=r-g,E=p-i;return{x:i,y:g,width:E,height:d}}e(Ye,"layout");function Ee(t,o,c=!1){let i=t,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let p=(i?.classes??[]).flatMap((L)=>o.getClasses().get(L)?.styles??[]),r=0,d="rect",E;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",E=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let w=Co(i?.styles??[]),x=i.label,S=i.size??{width:0,height:0,x:0,y:0},_=o.getDiagramId();return{labelStyle:w.labelStyle,shape:d,label:x,labelText:x,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:p,style:w.style,id:i.id,domId:_?`${_}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:S.width||void 0,height:S.height||void 0,wrappingWidth:S.width||Number.POSITIVE_INFINITY,x:S.x,y:S.y,positioned:c,intersect:void 0,padding:E??k()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:k().look}}e(Ee,"getNodeFromBlock");async function We(t,o,c){let i=Ee(o,c,!1);if(o.type==="group")return;let g=k(),p=await Ft(t,i,{config:g}),r=p.node()?.getBBox()??{width:0,height:0},d=c.getBlock(i.id);d.size={width:r.width,height:r.height,x:0,y:0,node:p},c.setBlock(d),p.remove()}e(We,"calculateBlockSize");async function Ve(t,o,c){let i=Ee(o,c,!0);if(c.getBlock(i.id).type!=="space"){let p=k(),r=await Ft(t,i,{config:p});if(i.colorIndex!==void 0)rt(r,i.colorIndex,p.theme,p.themeVariables?.borderColorArray);o.intersect=i?.intersect,St(i)}}e(Ve,"insertBlockPositioned");async function te(t,o,c,i){for(let g of o)if(await i(t,g,c),g.children)await te(t,g.children,c,i)}e(te,"performOperations");async function Ue(t,o,c){await te(t,o,c,We)}e(Ue,"calculateBlockSizes");async function He(t,o,c){await te(t,o,c,Ve)}e(He,"insertBlocks");async function Ge(t,o,c,i,g){let p=new ue({multigraph:!0,compound:!0});p.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of c)if(r.size)p.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of o)if(r.start&&r.end){let d=i.getBlock(r.start),E=i.getBlock(r.end);if(d?.size&&E?.size){let w=d.size,x=E.size,S=[{x:w.x,y:w.y},{x:w.x+(x.x-w.x)/2,y:w.y+(x.y-w.y)/2},{x:x.x,y:x.y}],_=g?`${g}-${r.id}`:r.id,T=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",L=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${L} flowchart-link LS-a1 LE-b1`;if(br(t,{...r,id:_,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:S,classes:I},{},"block",p.node(r.start),p.node(r.end),g),r.label)await $t(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:S,classes:I}),yn({...r,x:S[1].x,y:S[1].y},{originalPath:S})}}}e(Ge,"insertEdges");var It=e(function(t,o){return o.db.getClasses()},"getClasses"),Ct=e(async function(t,o,c,i){let{securityLevel:g,block:p}=k(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=m("#i"+o);let E=g==="sandbox"?m(d.nodes()[0].contentDocument.body):m("body"),w=g==="sandbox"?E.select(`[id="${o}"]`):m(`[id="${o}"]`);no(w,k()),xn(w,["point","circle","cross"],i.type,o);let S=r.getBlocks(),_=r.getBlocksFlat(),T=r.getEdges(),L=w.insert("g").attr("class","block");await Ue(L,S,r);let I=Ye(r);await He(L,S,r),await Ge(L,T,_,r,o);let N=L.node()?.getBBox(),v=N&&Number.isFinite(N.width)&&Number.isFinite(N.height)?N:I;if(v){let z=Math.max(1,Math.round(0.125*(v.width/v.height))),B=v.height+z+10,f=v.width+10,{useMaxWidth:a}=p;j(w,B,f,!!a),n.debug("Here Bounds",I,v),w.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),vt={draw:Ct,getClasses:It},or={parser:et,db:wt,renderer:vt,styles:Tt};export{or as diagram};
@@ -0,0 +1 @@
1
+ var r={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{r as bpmnIcons};
@@ -0,0 +1,38 @@
1
+ import{e,n,fe,q,y,j,L,I,R,M,u,m,Xr,Ba,at,S,$a}from"./index.fgsp5qqn.js";import{_r}from"./index.23p1k2rx.js";var Jt=function(){var t=e(function(Ot,k,T,w){for(T=T||{},w=Ot.length;w--;T[Ot[w]]=k);return T},"o"),r=[1,24],i=[1,25],o=[1,26],p=[1,27],l=[1,28],s=[1,63],d=[1,64],a=[1,65],f=[1,66],g=[1,67],b=[1,68],v=[1,69],C=[1,29],B=[1,30],U=[1,31],V=[1,32],Y=[1,33],H=[1,34],rt=[1,35],st=[1,36],it=[1,37],ot=[1,38],lt=[1,39],ct=[1,40],ut=[1,41],ht=[1,42],dt=[1,43],pt=[1,44],ft=[1,45],yt=[1,46],_t=[1,47],bt=[1,48],mt=[1,50],gt=[1,51],xt=[1,52],vt=[1,53],kt=[1,54],Et=[1,55],St=[1,56],Tt=[1,57],Ct=[1,58],Rt=[1,59],wt=[1,60],Vt=[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],Ft=[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],O=[1,82],P=[1,83],D=[1,84],N=[1,85],A=[12,14,42],_e=[12,14,33,42],qt=[12,14,33,42,76,77,79,80],At=[12,33],ee=[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],ne={trace:e(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:e(function(k,T,w,x,F,h,Ut){var _=h.length-1;switch(F){case 3:x.setDirection("TB");break;case 4:x.setDirection("BT");break;case 5:x.setDirection("RL");break;case 6:x.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:x.setC4Type(h[_-3]);break;case 19:x.setTitle(h[_].substring(6)),this.$=h[_].substring(6);break;case 20:x.setAccDescription(h[_].substring(15)),this.$=h[_].substring(15);break;case 21:this.$=h[_].trim(),x.setTitle(this.$);break;case 22:case 23:this.$=h[_].trim(),x.setAccDescription(this.$);break;case 28:h[_].splice(2,0,"ENTERPRISE"),x.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 29:h[_].splice(2,0,"SYSTEM"),x.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 30:x.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 31:h[_].splice(2,0,"CONTAINER"),x.addContainerBoundary(...h[_]),this.$=h[_];break;case 32:x.addDeploymentNode("node",...h[_]),this.$=h[_];break;case 33:x.addDeploymentNode("nodeL",...h[_]),this.$=h[_];break;case 34:x.addDeploymentNode("nodeR",...h[_]),this.$=h[_];break;case 35:x.popBoundaryParseStack();break;case 39:x.addPersonOrSystem("person",...h[_]),this.$=h[_];break;case 40:x.addPersonOrSystem("external_person",...h[_]),this.$=h[_];break;case 41:x.addPersonOrSystem("system",...h[_]),this.$=h[_];break;case 42:x.addPersonOrSystem("system_db",...h[_]),this.$=h[_];break;case 43:x.addPersonOrSystem("system_queue",...h[_]),this.$=h[_];break;case 44:x.addPersonOrSystem("external_system",...h[_]),this.$=h[_];break;case 45:x.addPersonOrSystem("external_system_db",...h[_]),this.$=h[_];break;case 46:x.addPersonOrSystem("external_system_queue",...h[_]),this.$=h[_];break;case 47:x.addContainer("container",...h[_]),this.$=h[_];break;case 48:x.addContainer("container_db",...h[_]),this.$=h[_];break;case 49:x.addContainer("container_queue",...h[_]),this.$=h[_];break;case 50:x.addContainer("external_container",...h[_]),this.$=h[_];break;case 51:x.addContainer("external_container_db",...h[_]),this.$=h[_];break;case 52:x.addContainer("external_container_queue",...h[_]),this.$=h[_];break;case 53:x.addComponent("component",...h[_]),this.$=h[_];break;case 54:x.addComponent("component_db",...h[_]),this.$=h[_];break;case 55:x.addComponent("component_queue",...h[_]),this.$=h[_];break;case 56:x.addComponent("external_component",...h[_]),this.$=h[_];break;case 57:x.addComponent("external_component_db",...h[_]),this.$=h[_];break;case 58:x.addComponent("external_component_queue",...h[_]),this.$=h[_];break;case 60:x.addRel("rel",...h[_]),this.$=h[_];break;case 61:x.addRel("birel",...h[_]),this.$=h[_];break;case 62:x.addRel("rel_u",...h[_]),this.$=h[_];break;case 63:x.addRel("rel_d",...h[_]),this.$=h[_];break;case 64:x.addRel("rel_l",...h[_]),this.$=h[_];break;case 65:x.addRel("rel_r",...h[_]),this.$=h[_];break;case 66:x.addRel("rel_b",...h[_]),this.$=h[_];break;case 67:h[_].splice(0,1),x.addRel("rel",...h[_]),this.$=h[_];break;case 68:x.updateElStyle("update_el_style",...h[_]),this.$=h[_];break;case 69:x.updateRelStyle("update_rel_style",...h[_]),this.$=h[_];break;case 70:x.updateLayoutConfig("update_layout_config",...h[_]),this.$=h[_];break;case 71:this.$=[h[_]];break;case 72:h[_].unshift(h[_-1]),this.$=h[_];break;case 73:case 75:this.$=h[_].trim();break;case 74:let Lt={};Lt[h[_-1].trim()]=h[_].trim(),this.$=Lt;break;case 76:this.$="";break}},"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:r,23:i,24:o,26:p,28:l,29:49,30:61,32:62,34:s,36:d,37:a,38:f,39:g,40:b,41:v,43:23,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt},{13:70,19:20,20:21,21:22,22:r,23:i,24:o,26:p,28:l,29:49,30:61,32:62,34:s,36:d,37:a,38:f,39:g,40:b,41:v,43:23,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt},{13:71,19:20,20:21,21:22,22:r,23:i,24:o,26:p,28:l,29:49,30:61,32:62,34:s,36:d,37:a,38:f,39:g,40:b,41:v,43:23,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt},{13:72,19:20,20:21,21:22,22:r,23:i,24:o,26:p,28:l,29:49,30:61,32:62,34:s,36:d,37:a,38:f,39:g,40:b,41:v,43:23,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt},{13:73,19:20,20:21,21:22,22:r,23:i,24:o,26:p,28:l,29:49,30:61,32:62,34:s,36:d,37:a,38:f,39:g,40:b,41:v,43:23,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt},{14:[1,74]},t(Vt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:d,37:a,38:f,39:g,40:b,41:v,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt}),t(Vt,[2,14]),t(te,[2,16],{12:[1,76]}),t(Vt,[2,36],{12:[1,77]}),t(Ft,[2,19]),t(Ft,[2,20]),{25:[1,78]},{27:[1,79]},t(Ft,[2,23]),{35:80,75:81,76:O,77:P,79:D,80:N},{35:86,75:81,76:O,77:P,79:D,80:N},{35:87,75:81,76:O,77:P,79:D,80:N},{35:88,75:81,76:O,77:P,79:D,80:N},{35:89,75:81,76:O,77:P,79:D,80:N},{35:90,75:81,76:O,77:P,79:D,80:N},{35:91,75:81,76:O,77:P,79:D,80:N},{35:92,75:81,76:O,77:P,79:D,80:N},{35:93,75:81,76:O,77:P,79:D,80:N},{35:94,75:81,76:O,77:P,79:D,80:N},{35:95,75:81,76:O,77:P,79:D,80:N},{35:96,75:81,76:O,77:P,79:D,80:N},{35:97,75:81,76:O,77:P,79:D,80:N},{35:98,75:81,76:O,77:P,79:D,80:N},{35:99,75:81,76:O,77:P,79:D,80:N},{35:100,75:81,76:O,77:P,79:D,80:N},{35:101,75:81,76:O,77:P,79:D,80:N},{35:102,75:81,76:O,77:P,79:D,80:N},{35:103,75:81,76:O,77:P,79:D,80:N},{35:104,75:81,76:O,77:P,79:D,80:N},t(A,[2,59]),{35:105,75:81,76:O,77:P,79:D,80:N},{35:106,75:81,76:O,77:P,79:D,80:N},{35:107,75:81,76:O,77:P,79:D,80:N},{35:108,75:81,76:O,77:P,79:D,80:N},{35:109,75:81,76:O,77:P,79:D,80:N},{35:110,75:81,76:O,77:P,79:D,80:N},{35:111,75:81,76:O,77:P,79:D,80:N},{35:112,75:81,76:O,77:P,79:D,80:N},{35:113,75:81,76:O,77:P,79:D,80:N},{35:114,75:81,76:O,77:P,79:D,80:N},{35:115,75:81,76:O,77:P,79:D,80:N},{20:116,29:49,30:61,32:62,34:s,36:d,37:a,38:f,39:g,40:b,41:v,43:23,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt},{12:[1,118],33:[1,117]},{35:119,75:81,76:O,77:P,79:D,80:N},{35:120,75:81,76:O,77:P,79:D,80:N},{35:121,75:81,76:O,77:P,79:D,80:N},{35:122,75:81,76:O,77:P,79:D,80:N},{35:123,75:81,76:O,77:P,79:D,80:N},{35:124,75:81,76:O,77:P,79:D,80:N},{35:125,75:81,76:O,77:P,79:D,80:N},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Vt,[2,15]),t(te,[2,17],{21:22,19:130,22:r,23:i,24:o,26:p,28:l}),t(Vt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:r,23:i,24:o,26:p,28:l,34:s,36:d,37:a,38:f,39:g,40:b,41:v,44:C,45:B,46:U,47:V,48:Y,49:H,50:rt,51:st,52:it,53:ot,54:lt,55:ct,56:ut,57:ht,58:dt,59:pt,60:ft,61:yt,62:_t,63:bt,64:mt,65:gt,66:xt,67:vt,68:kt,69:Et,70:St,71:Tt,72:Ct,73:Rt,74:wt}),t(Ft,[2,21]),t(Ft,[2,22]),t(A,[2,39]),t(_e,[2,71],{75:81,35:132,76:O,77:P,79:D,80:N}),t(qt,[2,73]),{78:[1,133]},t(qt,[2,75]),t(qt,[2,76]),t(A,[2,40]),t(A,[2,41]),t(A,[2,42]),t(A,[2,43]),t(A,[2,44]),t(A,[2,45]),t(A,[2,46]),t(A,[2,47]),t(A,[2,48]),t(A,[2,49]),t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),t(A,[2,53]),t(A,[2,54]),t(A,[2,55]),t(A,[2,56]),t(A,[2,57]),t(A,[2,58]),t(A,[2,60]),t(A,[2,61]),t(A,[2,62]),t(A,[2,63]),t(A,[2,64]),t(A,[2,65]),t(A,[2,66]),t(A,[2,67]),t(A,[2,68]),t(A,[2,69]),t(A,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(At,[2,28]),t(At,[2,29]),t(At,[2,30]),t(At,[2,31]),t(At,[2,32]),t(At,[2,33]),t(At,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(Vt,[2,38]),t(_e,[2,72]),t(qt,[2,74]),t(A,[2,24]),t(A,[2,35]),t(ee,[2,25]),t(ee,[2,26],{12:[1,138]}),t(ee,[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:e(function(k,T){if(T.recoverable)this.trace(k);else{var w=Error(k);throw w.hash=T,w}},"parseError"),parse:e(function(k){var T=this,w=[0],x=[],F=[null],h=[],Ut=this.table,_="",Lt=0,be=0,me=0,Ve=2,ge=1,Ye=h.slice.call(arguments,1),z=Object.create(this.lexer),It={yy:{}};for(var re in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,re))It.yy[re]=this.yy[re];if(z.setInput(k,It.yy),It.yy.lexer=z,It.yy.parser=this,typeof z.yylloc>"u")z.yylloc={};var se=z.yylloc;h.push(se);var Fe=z.options&&z.options.ranges;if(typeof It.yy.parseError==="function")this.parseError=It.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ue(K){w.length=w.length-2*K,F.length=F.length-K,h.length=h.length-K}e(Ue,"popStack");function xe(){var K=x.pop()||z.lex()||ge;if(typeof K!=="number"){if(K instanceof Array)x=K,K=x.pop();K=T.symbols_[K]||K}return K}e(xe,"lex");var W,ae,Mt,Q,X0,ie,Yt={},Qt,et,ve,Kt;while(!0){if(Mt=w[w.length-1],this.defaultActions[Mt])Q=this.defaultActions[Mt];else{if(W===null||typeof W>"u")W=xe();Q=Ut[Mt]&&Ut[Mt][W]}if(typeof Q>"u"||!Q.length||!Q[0]){var oe="";Kt=[];for(Qt in Ut[Mt])if(this.terminals_[Qt]&&Qt>Ve)Kt.push("'"+this.terminals_[Qt]+"'");if(z.showPosition)oe="Parse error on line "+(Lt+1)+`:
2
+ `+z.showPosition()+`
3
+ Expecting `+Kt.join(", ")+", got '"+(this.terminals_[W]||W)+"'";else oe="Parse error on line "+(Lt+1)+": Unexpected "+(W==ge?"end of input":"'"+(this.terminals_[W]||W)+"'");this.parseError(oe,{text:z.match,token:this.terminals_[W]||W,line:z.yylineno,loc:se,expected:Kt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+Mt+", token: "+W);switch(Q[0]){case 1:if(w.push(W),F.push(z.yytext),h.push(z.yylloc),w.push(Q[1]),W=null,!ae){if(be=z.yyleng,_=z.yytext,Lt=z.yylineno,se=z.yylloc,me>0)me--}else W=ae,ae=null;break;case 2:if(et=this.productions_[Q[1]][1],Yt.$=F[F.length-et],Yt._$={first_line:h[h.length-(et||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(et||1)].first_column,last_column:h[h.length-1].last_column},Fe)Yt._$.range=[h[h.length-(et||1)].range[0],h[h.length-1].range[1]];if(ie=this.performAction.apply(Yt,[_,be,Lt,It.yy,Q[1],F,h].concat(Ye)),typeof ie<"u")return ie;if(et)w=w.slice(0,-1*et*2),F=F.slice(0,-1*et),h=h.slice(0,-1*et);w.push(this.productions_[Q[1]][0]),F.push(Yt.$),h.push(Yt._$),ve=Ut[w[w.length-2]][w[w.length-1]],w.push(ve);break;case 3:return!0}}return!0},"parse")},Be=function(){var Ot={EOF:1,parseError:e(function(T,w){if(this.yy.parser)this.yy.parser.parseError(T,w);else throw Error(T)},"parseError"),setInput:e(function(k,T){if(this.yy=T||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var T=k.match(/(?:\r\n?|\n).*/g);if(T)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),k},"input"),unput:e(function(k){var T=k.length,w=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var x=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1)this.yylineno-=w.length-1;var F=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:w?(w.length===x.length?this.yylloc.first_column:0)+x[x.length-w.length].length-w[0].length:this.yylloc.first_column-T},this.options.ranges)this.yylloc.range=[F[0],F[0]+this.yyleng-T];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(k){this.unput(this.match.slice(k))},"less"),pastInput:e(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var k=this.match;if(k.length<20)k+=this._input.substr(0,20-k.length);return(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var k=this.pastInput(),T=Array(k.length+1).join("-");return k+this.upcomingInput()+`
5
+ `+T+"^"},"showPosition"),test_match:e(function(k,T){var w,x,F;if(this.options.backtrack_lexer){if(F={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)F.yylloc.range=this.yylloc.range.slice(0)}if(x=k[0].match(/(?:\r\n?|\n).*/g),x)this.yylineno+=x.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(k[0].length),this.matched+=k[0],w=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(w)return w;else if(this._backtrack){for(var h in F)this[h]=F[h];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var k,T,w,x;if(!this._more)this.yytext="",this.match="";var F=this._currentRules();for(var h=0;h<F.length;h++)if(w=this._input.match(this.rules[F[h]]),w&&(!T||w[0].length>T[0].length)){if(T=w,x=h,this.options.backtrack_lexer)if(k=this.test_match(w,F[h]),k!==!1)return k;else if(this._backtrack){T=!1;continue}else return!1;else if(!this.options.flex)break}if(T){if(k=this.test_match(T,F[x]),k!==!1)return k;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var T=this.next();if(T)return T;else return this.lex()},"lex"),begin:e(function(T){this.conditionStack.push(T)},"begin"),popState:e(function(){var T=this.conditionStack.length-1;if(T>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(T){if(T=this.conditionStack.length-1-Math.abs(T||0),T>=0)return this.conditionStack[T];else return"INITIAL"},"topState"),pushState:e(function(T){this.begin(T)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(T,w,x,F){var h=F;switch(x){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;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;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;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;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";break;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}}};return Ot}();ne.lexer=Be;function Ht(){this.yy={}}return e(Ht,"Parser"),Ht.prototype=ne,ne.Parser=Ht,new Ht}();Jt.parser=Jt;var je=Jt,Ce=e((t)=>u()[t],"getRequiredConfig"),G=new Set(["label","descr","techn","type"]),Bt=e((t,r)=>{for(let[i,o]of Object.entries(r)){if(o===void 0)continue;if(typeof o==="object"){let[p,l]=Object.entries(o)[0];t[p]=G.has(p)?{text:l}:l}else t[i]=o}},"assignAttributes"),Re=e(()=>({alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}),"createGlobalBoundary"),Z=[],Pt=[""],X="global",J="",tt=[Re()],Xt=[],de="",pe=!1,Zt=4,$t=2,we,ze=e(function(){return we},"getC4Type"),We=e(function(t){we=q(t,u())},"setC4Type"),Xe=e(function(t,r,i,o,p,l,s,d,a){if(t===void 0||t===null||r===void 0||r===null||i===void 0||i===null||o===void 0||o===null)return;let f={},g=Xt.find((b)=>b.from===r&&b.to===i);if(g)f=g;else Xt.push(f);if(f.type=t,f.from=r,f.to=i,f.label={text:o},p===void 0||p===null)f.techn??={text:""};else if(typeof p==="object"){let[b,v]=Object.entries(p)[0];f[b]=G.has(b)?{text:v}:v}else f.techn={text:p};if(l===void 0||l===null)f.descr??={text:""};else if(typeof l==="object"){let[b,v]=Object.entries(l)[0];f[b]=G.has(b)?{text:v}:v}else f.descr={text:l};Bt(f,{sprite:s,tags:d,link:a}),f.wrap=Nt()},"addRel"),qe=e(function(t,r,i,o,p,l,s){if(r===null||i===null)return;let d={},a=Z.find((f)=>f.alias===r);if(a&&r===a.alias)d=a;else d.alias=r,Z.push(d);if(i===void 0||i===null)d.label={text:""};else d.label={text:i};if(o===void 0||o===null)d.descr??={text:""};else if(typeof o==="object"){let[f,g]=Object.entries(o)[0];d[f]=G.has(f)?{text:g}:g}else d.descr={text:o};Bt(d,{sprite:p,tags:l,link:s}),d.typeC4Shape={text:t},d.parentBoundary=X,d.wrap=Nt()},"addPersonOrSystem"),He=e(function(t,r,i,o,p,l,s,d){if(r===null||i===null)return;let a={},f=Z.find((g)=>g.alias===r);if(f&&r===f.alias)a=f;else a.alias=r,Z.push(a);if(i===void 0||i===null)a.label={text:""};else a.label={text:i};if(o===void 0||o===null)a.techn??={text:""};else if(typeof o==="object"){let[g,b]=Object.entries(o)[0];a[g]=G.has(g)?{text:b}:b}else a.techn={text:o};if(p===void 0||p===null)a.descr??={text:""};else if(typeof p==="object"){let[g,b]=Object.entries(p)[0];a[g]=G.has(g)?{text:b}:b}else a.descr={text:p};Bt(a,{sprite:l,tags:s,link:d}),a.wrap=Nt(),a.typeC4Shape={text:t},a.parentBoundary=X},"addContainer"),Qe=e(function(t,r,i,o,p,l,s,d){if(r===null||i===null)return;let a={},f=Z.find((g)=>g.alias===r);if(f&&r===f.alias)a=f;else a.alias=r,Z.push(a);if(i===void 0||i===null)a.label={text:""};else a.label={text:i};if(o===void 0||o===null)a.techn??={text:""};else if(typeof o==="object"){let[g,b]=Object.entries(o)[0];a[g]=G.has(g)?{text:b}:b}else a.techn={text:o};if(p===void 0||p===null)a.descr??={text:""};else if(typeof p==="object"){let[g,b]=Object.entries(p)[0];a[g]=G.has(g)?{text:b}:b}else a.descr={text:p};Bt(a,{sprite:l,tags:s,link:d}),a.wrap=Nt(),a.typeC4Shape={text:t},a.parentBoundary=X},"addComponent"),Ke=e(function(t,r,i,o,p){if(t===null||r===null)return;let l={},s=tt.find((d)=>d.alias===t);if(s&&t===s.alias)l=s;else l.alias=t,tt.push(l);if(r===void 0||r===null)l.label={text:""};else l.label={text:r};if(i===void 0||i===null)l.type={text:"system"};else if(typeof i==="object"){let[d,a]=Object.entries(i)[0];l[d]=G.has(d)?{text:a}:a}else l.type={text:i};Bt(l,{tags:o,link:p}),l.parentBoundary=X,l.wrap=Nt(),J=X,X=t,Pt.push(J)},"addPersonOrSystemBoundary"),Ge=e(function(t,r,i,o,p){if(t===null||r===null)return;let l={},s=tt.find((d)=>d.alias===t);if(s&&t===s.alias)l=s;else l.alias=t,tt.push(l);if(r===void 0||r===null)l.label={text:""};else l.label={text:r};if(i===void 0||i===null)l.type={text:"container"};else if(typeof i==="object"){let[d,a]=Object.entries(i)[0];l[d]=G.has(d)?{text:a}:a}else l.type={text:i};Bt(l,{tags:o,link:p}),l.parentBoundary=X,l.wrap=Nt(),J=X,X=t,Pt.push(J)},"addContainerBoundary"),Je=e(function(t,r,i,o,p,l,s,d){if(r===null||i===null)return;let a={},f=tt.find((g)=>g.alias===r);if(f&&r===f.alias)a=f;else a.alias=r,tt.push(a);if(i===void 0||i===null)a.label={text:""};else a.label={text:i};if(o===void 0||o===null)a.type={text:"node"};else if(typeof o==="object"){let[g,b]=Object.entries(o)[0];a[g]=G.has(g)?{text:b}:b}else a.type={text:o};if(p===void 0||p===null)a.descr??={text:""};else if(typeof p==="object"){let[g,b]=Object.entries(p)[0];a[g]=G.has(g)?{text:b}:b}else a.descr={text:p};Bt(a,{tags:s,link:d}),a.nodeType=t,a.parentBoundary=X,a.wrap=Nt(),J=X,X=r,Pt.push(J)},"addDeploymentNode"),Ze=e(function(){X=J,Pt.pop(),J=Pt.pop(),Pt.push(J)},"popBoundaryParseStack"),$e=e(function(t,r,i,o,p,l,s,d,a,f,g){let b=Z.find((v)=>v.alias===r);if(b===void 0){if(b=tt.find((v)=>v.alias===r),b===void 0)return}if(i!==void 0&&i!==null)if(typeof i==="object"){let[v,C]=Object.entries(i)[0];b[v]=C}else b.bgColor=i;if(o!==void 0&&o!==null)if(typeof o==="object"){let[v,C]=Object.entries(o)[0];b[v]=C}else b.fontColor=o;if(p!==void 0&&p!==null)if(typeof p==="object"){let[v,C]=Object.entries(p)[0];b[v]=C}else b.borderColor=p;if(l!==void 0&&l!==null)if(typeof l==="object"){let[v,C]=Object.entries(l)[0];b[v]=C}else b.shadowing=l;if(s!==void 0&&s!==null)if(typeof s==="object"){let[v,C]=Object.entries(s)[0];b[v]=C}else b.shape=s;if(d!==void 0&&d!==null)if(typeof d==="object"){let[v,C]=Object.entries(d)[0];b[v]=C}else b.sprite=d;if(a!==void 0&&a!==null)if(typeof a==="object"){let[v,C]=Object.entries(a)[0];b[v]=C}else b.techn=a;if(f!==void 0&&f!==null)if(typeof f==="object"){let[v,C]=Object.entries(f)[0];b[v]=C}else b.legendText=f;if(g!==void 0&&g!==null)if(typeof g==="object"){let[v,C]=Object.entries(g)[0];b[v]=C}else b.legendSprite=g},"updateElStyle"),t0=e(function(t,r,i,o,p,l,s){let d=Xt.find((a)=>a.from===r&&a.to===i);if(d===void 0)return;if(o!==void 0&&o!==null)if(typeof o==="object"){let[a,f]=Object.entries(o)[0];d[a]=f}else d.textColor=o;if(p!==void 0&&p!==null)if(typeof p==="object"){let[a,f]=Object.entries(p)[0];d[a]=f}else d.lineColor=p;if(l!==void 0&&l!==null)if(typeof l==="object"){let[a,f]=Object.entries(l)[0];d[a]=parseInt(f)}else d.offsetX=parseInt(l);if(s!==void 0&&s!==null)if(typeof s==="object"){let[a,f]=Object.entries(s)[0];d[a]=parseInt(f)}else d.offsetY=parseInt(s)},"updateRelStyle"),e0=e(function(t,r,i){let o=Zt,p=$t;if(typeof r==="object"){let l=Object.values(r)[0];o=parseInt(l)}else o=parseInt(r);if(typeof i==="object"){let l=Object.values(i)[0];p=parseInt(l)}else p=parseInt(i);if(o>=1)Zt=o;if(p>=1)$t=p},"updateLayoutConfig"),n0=e(function(){return Zt},"getC4ShapeInRow"),r0=e(function(){return $t},"getC4BoundaryInRow"),s0=e(function(){return X},"getCurrentBoundaryParse"),a0=e(function(){return J},"getParentBoundaryParse"),Oe=e(function(t){if(t===void 0||t===null)return Z;else return Z.filter((r)=>r.parentBoundary===t)},"getC4ShapeArray"),i0=e(function(t){return Z.find((r)=>r.alias===t)??tt.find((r)=>r.alias===t)},"getC4Shape"),o0=e(function(t){return Object.keys(Oe(t))},"getC4ShapeKeys"),Pe=e(function(t){if(t===void 0||t===null)return tt;else return tt.filter((r)=>r.parentBoundary===t)},"getBoundaries"),l0=Pe,c0=e(function(){return Xt},"getRels"),u0=e(function(){return de},"getTitle"),h0=e(function(t){pe=t},"setWrap"),Nt=e(function(){return pe},"autoWrap"),d0=e(function(){Z=[],tt=[Re()],J="",X="global",Pt=[""],Xt=[],Pt=[""],de="",pe=!1,Zt=4,$t=2},"clear"),p0={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},f0={FILLED:0,OPEN:1},y0={LEFTOF:0,RIGHTOF:1,OVER:2},_0=e(function(t){de=q(t,u())},"setTitle"),ce={addPersonOrSystem:qe,addPersonOrSystemBoundary:Ke,addContainer:He,addContainerBoundary:Ge,addComponent:Qe,addDeploymentNode:Je,popBoundaryParseStack:Ze,addRel:Xe,updateElStyle:$e,updateRelStyle:t0,updateLayoutConfig:e0,autoWrap:Nt,setWrap:h0,getC4ShapeArray:Oe,getC4Shape:i0,getC4ShapeKeys:o0,getBoundaries:Pe,getBoundarys:l0,getCurrentBoundaryParse:s0,getParentBoundaryParse:a0,getRels:c0,getTitle:u0,getC4Type:ze,getC4ShapeInRow:n0,getC4BoundaryInRow:r0,setAccTitle:L,getAccTitle:I,getAccDescription:M,setAccDescription:R,getConfig:e(()=>Ce("c4"),"getConfig"),clear:d0,LINETYPE:p0,ARROWTYPE:f0,PLACEMENT:y0,setTitle:_0,setC4Type:We},De=e(function(t,r){return _r(t,r)},"drawRect"),b0=e((t,r,i,o)=>{let p=t.append("g"),l=0;for(let s of r){let d=s.textColor?s.textColor:"#444444",a=s.lineColor?s.lineColor:"#444444",f=s.offsetX?parseInt(String(s.offsetX)):0,g=s.offsetY?parseInt(String(s.offsetY)):0,b="";if(l===0){let B=p.append("line");if(B.attr("x1",s.startPoint.x),B.attr("y1",s.startPoint.y),B.attr("x2",s.endPoint.x),B.attr("y2",s.endPoint.y),B.attr("stroke-width","1"),B.attr("stroke",a),B.style("fill","none"),s.type!=="rel_b")B.attr("marker-end","url(#"+o+"-arrowhead)");if(s.type==="birel"||s.type==="rel_b")B.attr("marker-start","url(#"+o+"-arrowend)");l=-1}else{let B=p.append("path");if(B.attr("fill","none").attr("stroke-width","1").attr("stroke",a).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b")B.attr("marker-end","url(#"+o+"-arrowhead)");if(s.type==="birel"||s.type==="rel_b")B.attr("marker-start","url(#"+o+"-arrowend)")}let v=s.label.width,C=i.messageFont();if(jt(i)(s.label.text,p,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+f,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+g,v,s.label.height,{fill:d},C),s.techn&&s.techn.text!=="")C=i.messageFont(),jt(i)("["+s.techn.text+"]",p,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+f,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+i.messageFontSize+5+g,Math.max(v,s.techn.width),s.techn.height,{fill:d,"font-style":"italic"},C)}},"drawRels"),m0=e(function(t,r,i){let o=t.append("g"),p=r.bgColor?r.bgColor:"none",l=r.borderColor?r.borderColor:"#444444",s=r.fontColor?r.fontColor:"black",d={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};if(r.nodeType)d={"stroke-width":1};let a={x:r.x,y:r.y,fill:p,stroke:l,width:r.width,height:r.height,rx:2.5,ry:2.5,attrs:d};De(o,a);let f=i.boundaryFont();if(f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=s,jt(i)(r.label.text,o,r.x,r.y+r.label.Y,r.width,r.height,{fill:"#444444"},f),r.type&&r.type.text!=="")f=i.boundaryFont(),f.fontColor=s,jt(i)(r.type.text,o,r.x,r.y+r.type.Y,r.width,r.height,{fill:"#444444"},f);if(r.descr&&r.descr.text!=="")f=i.boundaryFont(),f.fontSize=f.fontSize-2,f.fontColor=s,jt(i)(r.descr.text,o,r.x,r.y+r.descr.Y,r.width,r.height,{fill:"#444444"},f)},"drawBoundary"),g0=e(function(t,r){t.append("defs").append("symbol").attr("id",r+"-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"),x0=e(function(t,r){t.append("defs").append("symbol").attr("id",r+"-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"),v0=e(function(t,r){t.append("defs").append("symbol").attr("id",r+"-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"),k0=e(function(t,r){t.append("defs").append("marker").attr("id",r+"-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"),E0=e(function(t,r){t.append("defs").append("marker").attr("id",r+"-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"),S0=e(function(t,r){t.append("defs").append("marker").attr("id",r+"-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"),T0=e(function(t,r){let o=t.append("defs").append("marker").attr("id",r+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);o.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"),o.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"),jt=function(){function t(p,l,s,d,a,f,g){let b=l.append("text").attr("x",s+a/2).attr("y",d+f/2+5).style("text-anchor","middle").text(p);o(b,g)}e(t,"byText");function r(p,l,s,d,a,f,g,b){let{fontSize:v,fontFamily:C,fontWeight:B}=b,U=p.split(y.lineBreakRegex);for(let V=0;V<U.length;V++){let Y=V*v-v*(U.length-1)/2,H=l.append("text").attr("x",s+a/2).attr("y",d).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",v).style("font-weight",B).style("font-family",C);H.append("tspan").attr("dy",Y).text(U[V]).attr("alignment-baseline","mathematical"),o(H,g)}}e(r,"byTspan");function i(p,l,s,d,a,f,g,b){let v=l.append("switch"),B=v.append("foreignObject").attr("x",s).attr("y",d).attr("width",a).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");B.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(p),r(p,v,s,d,a,f,g,b),o(B,g)}e(i,"byFo");function o(p,l){for(let s in l)if(l.hasOwnProperty(s))p.attr(s,l[s])}return e(o,"_setTextAttrs"),function(p){return p.textPlacement==="fo"?i:p.textPlacement==="old"?t:r}}(),nt={drawRect:De,drawBoundary:m0,drawRels:b0,insertArrowHead:k0,insertArrowEnd:E0,insertArrowFilledHead:S0,insertArrowCrossHead:T0,insertDatabaseIcon:g0,insertComputerIcon:x0,insertClockIcon:v0},C0=e((t,r)=>{if(r==="sandbox"){let o=m("#i"+t).node()?.contentDocument;if(!o)throw Error(`Sandbox iframe #i${t} is missing its content document`);return{root:m(o.body),doc:o}}return{root:m("body"),doc:document}},"getDiagramRoot"),R0=new Set(["system_queue","external_system_queue","container_queue","external_container_queue","component_queue","external_component_queue"]),w0=new Set(["system_db","external_system_db","container_db","external_container_db","component_db","external_component_db"]),O0={person:"person",box:"rounded",rounded:"rounded",cylinder:"cylinder",database:"cylinder",db:"cylinder",queue:"h-cyl",pipe:"h-cyl",component:"fr-rect"},le=e((t)=>t?O0[t.toLowerCase()]:void 0,"keywordShape"),P0=e((t)=>{let r=le(t.shape)??le(t.sprite);if(r)return r;if(t.tags)for(let o of t.tags.split(",")){let p=le(o.trim());if(p)return p}let i=t.typeC4Shape.text;if(i==="person"||i==="external_person")return"person";if(w0.has(i))return"cylinder";if(R0.has(i))return"h-cyl";return"rounded"},"resolveNodeShape"),D0={person:"Person",system:"Software System",container:"Container",component:"Component"},N0=e((t)=>{let r=t.replace(/^external_/,"").replace(/_(db|queue)$/,"");return D0[r]??r.replace(/_/g," ")},"stereotypeLabel"),A0=e((t)=>t.startsWith("external_"),"isExternal"),L0=e((t)=>{let r=N0(t.typeC4Shape.text);return t.techn?.text?`[${r}: ${t.techn.text}]`:`[${r}]`},"stereotypeText"),Ne=["person","system","system_db","system_queue","container","container_db","container_queue","component","component_db","component_queue"].flatMap((t)=>[t,`external_${t}`]),I0=new Set(Ne),ke=e((t)=>I0.has(t),"isC4ElementType"),M0=e((t,r)=>{let i=t.typeC4Shape.text,o=t.bgColor??(ke(i)&&r[`${i}_bg_color`]),p=t.borderColor??(ke(i)&&r[`${i}_border_color`]),l=[];if(o)l.push(`fill:${o}`);if(p)l.push(`stroke:${p}`);return l.push(`color:${t.fontColor??"#FFFFFF"}`),l},"elementCssStyles"),Ee=e((t,r,i,o,p)=>{let l=t.typeC4Shape.text,s=["c4-shape",`c4-${l}`];if(A0(l))s.push("c4-external");let d=P0(t),a=M0(t,r);if(d==="rounded"||d==="fr-rect")a.push("rx:12px","ry:12px");return{id:t.alias,label:t.label.text,stereotype:L0(t),description:t.descr?.text?[t.descr.text]:void 0,labelType:"string",isGroup:!1,shape:d,cssClasses:s.join(" "),cssStyles:a,padding:i,look:o,useHtmlLabels:!1,width:p}},"buildC4Node"),zt=0,Wt=0,Ae=4,ue=2;Jt.yy=ce;var E={},Le=class{static{e(this,"Bounds")}constructor(t){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(t.db.getConfig())}setData(t,r,i,o){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=o}updateVal(t,r,i,o){if(t[r]===void 0)t[r]=i;else t[r]=o(i,t[r])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.stopx,i=this.data.widthLimit,o=this.nextData.startx===this.nextData.stopx?r+t.margin:r+t.margin*2,p=o+t.width,l=this.nextData.starty+t.margin*2,s=l+t.height;if(o>=i||p>=i||this.nextData.cnt>Ae)o=this.nextData.startx+t.margin+E.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=p=o+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=l+t.height,this.nextData.cnt=1;t.x=o,t.y=l,this.updateVal(this.data,"startx",o,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",p,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",o,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",p,Math.max),this.updateVal(this.nextData,"stopy",s,Math.max)}init(t){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(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},he=e(function(t){if(fe(E,t),t?.fontFamily)E.personFontFamily=E.systemFontFamily=E.messageFontFamily=t.fontFamily;if(t?.fontSize)E.personFontSize=E.systemFontSize=E.messageFontSize=t.fontSize;if(t?.fontWeight)E.personFontWeight=E.systemFontWeight=E.messageFontWeight=t.fontWeight},"setConf"),Gt=e((t)=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),B0=e((t)=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function Dt(t,r,i,o,p){let l=r[t];if(!l.width)if(i)l.text=Xr(l.text,p,o),l.textLines=l.text.split(y.lineBreakRegex).length,l.width=p,l.height=Ba(l.text,o);else{let s=l.text.split(y.lineBreakRegex);l.textLines=s.length;let d=0;l.height=0,l.width=0;for(let a of s)l.width=Math.max(at(a,o),l.width),d=Ba(a,o),l.height=l.height+d}return l}e(Dt,"calcC4ShapeTextWH");var Ie=e(function(t,r,i){let o=i.data.startx,p=i.data.starty;r.x=o,r.y=p,r.width=i.data.stopx-o,r.height=i.data.stopy-p,r.intersect=(a)=>S.rect({x:r.x+r.width/2,y:r.y+r.height/2,width:r.width,height:r.height},a),r.label.y=E.c4ShapeMargin-35;let l=r.wrap&&E.wrap,s=Gt(E);s.fontSize=s.fontSize+2,s.fontWeight="bold";let d=at(r.label.text,s);Dt("label",r,l,s,d),nt.drawBoundary(t,r,E)},"drawBoundary"),Me=e(async function(t,r,i,o){let p=u(),l=p.look??"classic",s={config:p},d=r.attr("id")??"",a=o.map((g)=>i[Number(g)]),f=e((g)=>{let b=g.shape?$a[g.shape]:void 0;if(!b)throw Error(`C4: no shape handler for "${g.shape}"`);return b},"shapeHandlerFor");await Promise.all(a.map(async(g)=>{let b=Ee(g,E,E.c4ShapePadding,l,E.width);b.domId=`${d}-${b.id}`;let v=await f(b)(r,b,s);g.width=b.width??E.width,g.height=b.height??E.height,g.margin=E.c4ShapeMargin,v.remove()}));for(let g of a)t.insert(g);await Promise.all(a.map(async(g)=>{let b=Ee(g,E,E.c4ShapePadding,l,E.width);b.domId=`${d}-${b.id}`,b.x=g.x+g.width/2,b.y=g.y+g.height/2;let v=r.append("g").attr("transform",`translate(${g.x+g.width/2}, ${g.y+g.height/2})`);await f(b)(v,b,s),g.intersect=b.intersect})),t.bumpLastMargin(E.c4ShapeMargin)},"drawC4ShapeArray"),V0=class{static{e(this,"Point")}constructor(t,r){this.x=t,this.y=r}},Se=e(function(t,r){if(!t.intersect)throw Error(`C4 element "${t.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);let{x:i,y:o}=t.intersect(r);return new V0(i,o)},"getIntersectPoint"),Y0=e(function(t,r){let i={x:0,y:0};i.x=r.x+r.width/2,i.y=r.y+r.height/2;let o=Se(t,i);i.x=t.x+t.width/2,i.y=t.y+t.height/2;let p=Se(r,i);return{startPoint:o,endPoint:p}},"getIntersectPoints"),F0=e(function(t,r,i,o,p){let l=o.db.getC4Type(),s=0;for(let d of r){s=s+1;let a=d.wrap&&E.wrap,f=B0(E);if(l==="C4Dynamic")d.label.text=s+": "+d.label.text;let g=at(d.label.text,f);if(Dt("label",d,a,f,g),d.techn&&d.techn.text!=="")g=at(d.techn.text,f),Dt("techn",d,a,f,g);if(d.descr&&d.descr.text!=="")g=at(d.descr.text,f),Dt("descr",d,a,f,g);let b=i(d.from),v=i(d.to);if(!b||!v)throw Error(`C4 rel "${d.from}" -> "${d.to}" references an unknown shape or boundary`);let C=Y0(b,v);if(!C.startPoint||!C.endPoint)throw Error(`Could not calculate intersection points for rel "${d.from}" -> "${d.to}"`);d.startPoint=C.startPoint,d.endPoint=C.endPoint}nt.drawRels(t,r,E,p)},"drawRels");async function ye(t,r,i,o,p){let l=p.db,s=new Le(p);s.data.widthLimit=i.data.widthLimit/Math.min(ue,o.length);for(let[d,a]of o.entries()){let f=0;if(a.image={width:0,height:0,Y:0},a.sprite)a.image.width=48,a.image.height=48,a.image.Y=f,f=a.image.Y+a.image.height;let g=a.wrap&&E.wrap,b=Gt(E);b.fontSize=b.fontSize+2,b.fontWeight="bold";let v=Dt("label",a,g,b,s.data.widthLimit);if(v.Y=f+8,f=v.Y+v.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let V=Gt(E),Y=Dt("type",a,g,V,s.data.widthLimit);Y.Y=f+5,f=Y.Y+Y.height}if(a.descr&&a.descr.text!==""){let V=Gt(E);V.fontSize=V.fontSize-2;let Y=Dt("descr",a,g,V,s.data.widthLimit);Y.Y=f+20,f=Y.Y+Y.height}if(d==0||d%ue===0){let V=i.data.startx+E.diagramMarginX,Y=i.data.stopy+E.diagramMarginY+f;s.setData(V,V,Y,Y)}else{let V=s.data.stopx!==s.data.startx?s.data.stopx+E.diagramMarginX:s.data.startx,Y=s.data.starty;s.setData(V,V,Y,Y)}s.name=a.alias;let C=l.getC4ShapeArray(a.alias),B=l.getC4ShapeKeys(a.alias);if(B.length>0)await Me(s,t,C,B);r=a.alias;let U=l.getBoundaries(r);if(U.length>0)await ye(t,r,s,U,p);if(a.alias!=="global")Ie(t,a,s);i.data.stopy=Math.max(s.data.stopy+E.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(s.data.stopx+E.c4ShapeMargin,i.data.stopx),zt=Math.max(zt,i.data.stopx),Wt=Math.max(Wt,i.data.stopy)}}e(ye,"drawInsideBoundary");var U0=e(async function(t,r,i,o){E=Ce("c4");let p=u().securityLevel,{root:l}=C0(r,p),s=o.db;s.setWrap(E.wrap),Ae=s.getC4ShapeInRow(),ue=s.getC4BoundaryInRow(),n.debug(`C:${JSON.stringify(E,null,2)}`);let d=l.select(`[id="${r}"]`);nt.insertComputerIcon(d,r),nt.insertDatabaseIcon(d,r),nt.insertClockIcon(d,r);let a=new Le(o);a.setData(E.diagramMarginX,E.diagramMarginX,E.diagramMarginY,E.diagramMarginY),a.data.widthLimit=screen.availWidth,zt=E.diagramMarginX,Wt=E.diagramMarginY;let f=s.getTitle(),g=s.getBoundaries("");await ye(d,"",a,g,o),nt.insertArrowHead(d,r),nt.insertArrowEnd(d,r),nt.insertArrowCrossHead(d,r),nt.insertArrowFilledHead(d,r),F0(d,s.getRels(),s.getC4Shape,o,r),a.data.stopx=zt,a.data.stopy=Wt;let b=a.data,{startx:v,starty:C}=b,U=Wt-C+2*E.diagramMarginY,V=zt-v,Y=V+2*E.diagramMarginX;if(f)d.append("text").text(f).attr("x",V/2-4*E.diagramMarginX).attr("y",C+E.diagramMarginY);j(d,U,Y,E.useMaxWidth);let H=f?60:0;d.attr("viewBox",v-E.diagramMarginX+" -"+(E.diagramMarginY+H)+" "+Y+" "+(U+H)),n.debug("models:",b)},"draw"),Te={drawPersonOrSystemArray:Me,drawBoundary:Ie,setConf:he,draw:U0},j0=e(()=>{let t=u().c4??{},r=new CSSStyleSheet;for(let i of Ne){let o=r.cssRules[r.insertRule(`.c4-shape.c4-${i} .label {}`,r.cssRules.length)],p=t[`${i}FontFamily`],l=t[`${i}FontSize`],s=t[`${i}FontWeight`];if(p)o.style.setProperty("font-family",p);if(l)o.style.setProperty("font-size",typeof l==="number"?`${l}px`:l);if(s)o.style.setProperty("font-weight",String(s))}return[...r.cssRules].filter((i)=>i.style.length>0).map((i)=>` ${i.cssText}`).join(`
7
+ `)},"elementFontStyles"),z0=e((t)=>`.person {
8
+ stroke: ${t.personBorder};
9
+ fill: ${t.personBkg};
10
+ }
11
+ ${j0()}
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"),W0=z0,r1={parser:je,db:ce,renderer:Te,styles:W0,init:e(({c4:t,wrap:r})=>{Te.setConf(t),ce.setWrap(r)},"init")};export{r1 as diagram};