@logan-jun/cd1-rag-chat 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/arc-scm8MMJs.js +1 -0
- package/dist/assets/architectureDiagram-3BPJPVTR-B4HnSePg.js +36 -0
- package/dist/assets/blockDiagram-GPEHLZMM-Br570MCp.js +132 -0
- package/dist/assets/c4Diagram-AAUBKEIU-DkTSnj0d.js +10 -0
- package/dist/assets/channel-DiZdOJ9B.js +1 -0
- package/dist/assets/chunk-2J33WTMH-CrTr9xzl.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-D0wgG8xH.js +1 -0
- package/dist/assets/chunk-55IACEB6-Duov_Htw.js +1 -0
- package/dist/assets/chunk-727SXJPM-DDvX-nhe.js +206 -0
- package/dist/assets/chunk-AQP2D5EJ-09XyW5jk.js +231 -0
- package/dist/assets/chunk-FMBD7UC4-C8_DpYrt.js +15 -0
- package/dist/assets/chunk-ND2GUHAM-BeN_xln2.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-vOMf7cyc.js +1 -0
- package/dist/assets/classDiagram-4FO5ZUOK-DDDJcc4H.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DDDJcc4H.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-pK2cAyHP.js +1 -0
- package/dist/assets/cytoscape.esm-C6a136cz.js +331 -0
- package/dist/assets/dagre-BM42HDAG-kL6GF6jg.js +4 -0
- package/dist/assets/defaultLocale-CrowFXzY.js +1 -0
- package/dist/assets/diagram-2AECGRRQ-dykDFI_K.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-WJvXRiuM.js +10 -0
- package/dist/assets/diagram-KO2AKTUF-D2favLYT.js +3 -0
- package/dist/assets/diagram-LMA3HP47-CXVuETL_.js +24 -0
- package/dist/assets/diagram-OG6HWLK6-BcJzKfoj.js +24 -0
- package/dist/assets/erDiagram-TEJ5UH35-thR4lGNd.js +85 -0
- package/dist/assets/flowDiagram-I6XJVG4X-BxfwGe_r.js +162 -0
- package/dist/assets/ganttDiagram-6RSMTGT7-fwLip5Nh.js +292 -0
- package/dist/assets/gitGraphDiagram-PVQCEYII-D-oFePm0.js +106 -0
- package/dist/assets/graph-BB0J4w4c.js +1 -0
- package/dist/assets/index-CbSmh0fl.js +86 -0
- package/dist/assets/index-DDQloFPo.css +1 -0
- package/dist/assets/infoDiagram-5YYISTIA-D4MiRb75.js +2 -0
- package/dist/assets/init-Gi6I4Gst.js +1 -0
- package/dist/assets/ishikawaDiagram-YF4QCWOH-BXo0XBC7.js +70 -0
- package/dist/assets/journeyDiagram-JHISSGLW-CqScJnKj.js +139 -0
- package/dist/assets/kanban-definition-UN3LZRKU-MV47OAPx.js +89 -0
- package/dist/assets/katex-DOa3rsiF.js +257 -0
- package/dist/assets/layout-X4aHIIHH.js +1 -0
- package/dist/assets/linear-DLYnUT7M.js +1 -0
- package/dist/assets/mermaid.core-DuagT3S2.js +307 -0
- package/dist/assets/mindmap-definition-RKZ34NQL-HJXV2iNz.js +96 -0
- package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/assets/pieDiagram-4H26LBE5-BVHq2F8U.js +30 -0
- package/dist/assets/quadrantDiagram-W4KKPZXB-BUPck4BP.js +7 -0
- package/dist/assets/requirementDiagram-4Y6WPE33-DQl89ON9.js +84 -0
- package/dist/assets/sankeyDiagram-5OEKKPKP-DD5N52ZQ.js +40 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-zctcDLCC.js +162 -0
- package/dist/assets/stateDiagram-AJRCARHV-Vyn0aDZv.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-BY6pmmBt.js +1 -0
- package/dist/assets/timeline-definition-PNZ67QCA-1XNXDgjy.js +120 -0
- package/dist/assets/vennDiagram-CIIHVFJN-DZ1fF_Rg.js +34 -0
- package/dist/assets/wardley-L42UT6IY-DsEWk1n9.js +173 -0
- package/dist/assets/wardleyDiagram-YWT4CUSO-CpQIM9KB.js +78 -0
- package/dist/assets/xychartDiagram-2RQKCTM6-CIryoW2U.js +7 -0
- package/dist/index.html +2 -2
- package/package.json +18 -4
- package/dist/assets/index-Bp_ymGdi.js +0 -89
- package/dist/assets/index-D4hGefa4.css +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import{g as De}from"./chunk-FMBD7UC4-C8_DpYrt.js";import{ax as Ne,ae as qt,ay as Ie,h as Jt,N as Qt,n as $t,aL as te,bb as Lt,O as ee,aT as re,bd as ae,aF as se,b6 as ie,f as ne,bg as Ce,bf as Be,bi as Oe,bh as Re,aM as Ae,aq as ze,ap as Me,ar as Pe,$ as Fe,Y as Ye,i as We,b as u,a3 as ut,a$ as O,F as He,aE as v,t as Ke,aY as Ue,aa as Xe,aB as Ve,L as Ze,a4 as Y,ag as Ge,a8 as Z,K as Dt,D as lt,ad as je,bl as ot,z as qe,ac as Je,aZ as zt,Q as Mt,E as Qe}from"./mermaid.core-DuagT3S2.js";import{G as $e}from"./graph-BB0J4w4c.js";import{c as tr}from"./channel-DiZdOJ9B.js";import"./index-CbSmh0fl.js";function er(e){return Array.isArray(e)}function rr(e){if(Ne(e))return e;const t=qt(e);if(!ar(e))return{};if(er(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Ie(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t===Jt)return new ArrayBuffer(e.byteLength);if(t===Qt){const s=e,i=s.buffer,n=s.byteOffset,a=s.byteLength,c=new ArrayBuffer(a),l=new Uint8Array(i,n,a);return new Uint8Array(c).set(l),new DataView(c)}if(t===$t||t===te||t===Lt){const s=e.constructor,i=new s(e.valueOf());return t===Lt?ir(i,e):mt(i,e),i}if(t===ee)return new Date(Number(e));if(t===re){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t===ae)return Object(Symbol.prototype.valueOf.call(e));if(t===se){const s=e,i=new Map;return s.forEach((n,a)=>{i.set(a,n)}),i}if(t===ie){const s=e,i=new Set;return s.forEach(n=>{i.add(n)}),i}if(t===ne){const s=e,i={};return mt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const r={};return nr(r,e),mt(r,e),sr(r,e),r}function ar(e){switch(qt(e)){case ne:case We:case Jt:case Qt:case $t:case ee:case Ye:case Fe:case Pe:case Me:case ze:case se:case te:case Ae:case re:case ie:case Lt:case ae:case Re:case Oe:case Be:case Ce:return!0;default:return!1}}function mt(e,t){for(const r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function sr(e,t){const r=Object.getOwnPropertySymbols(t);for(let s=0;s<r.length;s++){const i=r[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function ir(e,t){const r=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=r)&&(e[s]=t[s])}function nr(e,t){const r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}var vt=function(){var e=u(function(N,b,p,y){for(p=p||{},y=N.length;y--;p[N[y]]=b);return p},"o"),t=[1,15],r=[1,7],s=[1,13],i=[1,14],n=[1,19],a=[1,16],c=[1,17],l=[1,18],d=[8,30],g=[8,10,21,28,29,30,31,39,43,46],o=[1,23],w=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],E=[1,49],L={trace:u(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:u(function(b,p,y,S,T,h,k){var f=h.length-1;switch(T){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],b),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:const _=parseInt(h[f]),B=S.generateId();this.$={id:B,type:"space",label:"",width:_,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);const W=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),J=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),at=S.edgeStrToThickness(h[f-1].edgeTypeStr),A=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:at,pattern:A,directions:h[f].directions,arrowTypeEnd:W,arrowTypeStart:J},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]),S.generateId(),this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);const V=S.generateId();this.$={id:V,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,39:a,43:c,46:l},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:s,29:i,31:n,39:a,43:c,46:l}),e(g,[2,16],{14:22,15:o,16:w}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(x,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:n},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,39:a,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:o,16:w,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,39:a,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:E},{15:[1,50]},e(g,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:E,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(b,p){if(p.recoverable)this.trace(b);else{var y=new Error(b);throw y.hash=p,y}},"parseError"),parse:u(function(b){var p=this,y=[0],S=[],T=[null],h=[],k=this.table,f="",_=0,B=0,W=2,J=1,at=h.slice.call(arguments,1),A=Object.create(this.lexer),V={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(V.yy[st]=this.yy[st]);A.setInput(b,V.yy),V.yy.lexer=A,V.yy.parser=this,typeof A.yylloc=="undefined"&&(A.yylloc={});var it=A.yylloc;h.push(it);var D=A.options&&A.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M(j){y.length=y.length-2*j,T.length=T.length-j,h.length=h.length-j}u(M,"popStack");function U(){var j;return j=S.pop()||A.lex()||J,typeof j!="number"&&(j instanceof Array&&(S=j,j=S.pop()),j=p.symbols_[j]||j),j}u(U,"lex");for(var F,G,H,nt,Q={},ct,$,At,dt;;){if(G=y[y.length-1],this.defaultActions[G]?H=this.defaultActions[G]:((F===null||typeof F=="undefined")&&(F=U()),H=k[G]&&k[G][F]),typeof H=="undefined"||!H.length||!H[0]){var wt="";dt=[];for(ct in k[G])this.terminals_[ct]&&ct>W&&dt.push("'"+this.terminals_[ct]+"'");A.showPosition?wt="Parse error on line "+(_+1)+`:
|
|
2
|
+
`+A.showPosition()+`
|
|
3
|
+
Expecting `+dt.join(", ")+", got '"+(this.terminals_[F]||F)+"'":wt="Parse error on line "+(_+1)+": Unexpected "+(F==J?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(wt,{text:A.match,token:this.terminals_[F]||F,line:A.yylineno,loc:it,expected:dt})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+F);switch(H[0]){case 1:y.push(F),T.push(A.yytext),h.push(A.yylloc),y.push(H[1]),F=null,B=A.yyleng,f=A.yytext,_=A.yylineno,it=A.yylloc;break;case 2:if($=this.productions_[H[1]][1],Q.$=T[T.length-$],Q._$={first_line:h[h.length-($||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-($||1)].first_column,last_column:h[h.length-1].last_column},D&&(Q._$.range=[h[h.length-($||1)].range[0],h[h.length-1].range[1]]),nt=this.performAction.apply(Q,[f,B,_,V.yy,H[1],T,h].concat(at)),typeof nt!="undefined")return nt;$&&(y=y.slice(0,-1*$*2),T=T.slice(0,-1*$),h=h.slice(0,-1*$)),y.push(this.productions_[H[1]][0]),T.push(Q.$),h.push(Q._$),At=k[y[y.length-2]][y[y.length-1]],y.push(At);break;case 3:return!0}}return!0},"parse")},I=function(){var N={EOF:1,parseError:u(function(p,y){if(this.yy.parser)this.yy.parser.parseError(p,y);else throw new Error(p)},"parseError"),setInput:u(function(b,p){return this.yy=p||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var p=b.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},"input"),unput:u(function(b){var p=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===S.length?this.yylloc.first_column:0)+S[S.length-y.length].length-y[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(b){this.unput(this.match.slice(b))},"less"),pastInput:u(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var b=this.pastInput(),p=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
|
5
|
+
`+p+"^"},"showPosition"),test_match:u(function(b,p){var y,S,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),S=b[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var h in T)this[h]=T[h];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,p,y,S;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),h=0;h<T.length;h++)if(y=this._input.match(this.rules[T[h]]),y&&(!p||y[0].length>p[0].length)){if(p=y,S=h,this.options.backtrack_lexer){if(b=this.test_match(y,T[h]),b!==!1)return b;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(b=this.test_match(p,T[S]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var p=this.next();return p||this.lex()},"lex"),begin:u(function(p){this.conditionStack.push(p)},"begin"),popState:u(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:u(function(p){this.begin(p)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:u(function(p,y,S,T){switch(S){case 0:return p.getLogger().debug("Found block-beta"),10;case 1:return p.getLogger().debug("Found id-block"),29;case 2:return p.getLogger().debug("Found block"),10;case 3:p.getLogger().debug(".",y.yytext);break;case 4:p.getLogger().debug("_",y.yytext);break;case 5:return 5;case 6:return y.yytext=-1,28;case 7:return y.yytext=y.yytext.replace(/columns\s+/,""),p.getLogger().debug("COLUMNS (LEX)",y.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:p.getLogger().debug("LEX: POPPING STR:",y.yytext),this.popState();break;case 13:return p.getLogger().debug("LEX: STR end:",y.yytext),"STR";case 14:return y.yytext=y.yytext.replace(/space\:/,""),p.getLogger().debug("SPACE NUM (LEX)",y.yytext),21;case 15:return y.yytext="1",p.getLogger().debug("COLUMNS (LEX)",y.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),p.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),p.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),p.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),p.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),p.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),p.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),p.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),p.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),p.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),p.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),p.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),p.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return p.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return p.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return p.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return p.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return p.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return p.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return p.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),p.getLogger().debug("LEX ARR START"),37;case 74:return p.getLogger().debug("Lex: NODE_ID",y.yytext),31;case 75:return p.getLogger().debug("Lex: EOF",y.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:p.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:p.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return p.getLogger().debug("LEX: NODE_DESCR:",y.yytext),"NODE_DESCR";case 83:p.getLogger().debug("LEX POPPING"),this.popState();break;case 84:p.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return y.yytext=y.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (right): dir:",y.yytext),"DIR";case 86:return y.yytext=y.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (left):",y.yytext),"DIR";case 87:return y.yytext=y.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (x):",y.yytext),"DIR";case 88:return y.yytext=y.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (y):",y.yytext),"DIR";case 89:return y.yytext=y.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (up):",y.yytext),"DIR";case 90:return y.yytext=y.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (down):",y.yytext),"DIR";case 91:return y.yytext="]>",p.getLogger().debug("Lex (ARROW_DIR end):",y.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return p.getLogger().debug("Lex: LINK","#"+y.yytext+"#"),15;case 93:return p.getLogger().debug("Lex: LINK",y.yytext),15;case 94:return p.getLogger().debug("Lex: LINK",y.yytext),15;case 95:return p.getLogger().debug("Lex: LINK",y.yytext),15;case 96:return p.getLogger().debug("Lex: START_LINK",y.yytext),this.pushState("LLABEL"),16;case 97:return p.getLogger().debug("Lex: START_LINK",y.yytext),this.pushState("LLABEL"),16;case 98:return p.getLogger().debug("Lex: START_LINK",y.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return p.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),p.getLogger().debug("Lex: LINK","#"+y.yytext+"#"),15;case 102:return this.popState(),p.getLogger().debug("Lex: LINK",y.yytext),15;case 103:return this.popState(),p.getLogger().debug("Lex: LINK",y.yytext),15;case 104:return p.getLogger().debug("Lex: COLON",y.yytext),y.yytext=y.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return N}();L.lexer=I;function C(){this.yy={}}return u(C,"Parser"),C.prototype=L,L.Parser=C,new C}();vt.parser=vt;var cr=vt,et=new Map,Nt=[],Et=new Map,Pt="color",Ft="fill",lr="bgFill",ce=",",or=Y(),ft=new Map,It="",hr=u(e=>qe.sanitizeText(e,or),"sanitizeText"),gr=u(function(e,t=""){let r=ft.get(e);r||(r={id:e,styles:[],textStyles:[]},ft.set(e,r)),t!=null&&t.split(ce).forEach(s=>{const i=s.replace(/([^;]*);/,"$1").trim();if(RegExp(Pt).exec(s)){const a=i.replace(Ft,lr).replace(Pt,Ft);r.textStyles.push(a)}r.styles.push(i)})},"addStyleClass"),ur=u(function(e,t=""){const r=et.get(e);t!=null&&(r.styles=t.split(ce))},"addStyle2Node"),dr=u(function(e,t){e.split(",").forEach(function(r){let s=et.get(r);if(s===void 0){const i=r.trim();s={id:i,type:"na",children:[]},et.set(i,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),le=u((e,t)=>{var a,c,l,d,g;const r=e.flat(),s=[],i=r.find(o=>(o==null?void 0:o.type)==="column-setting"),n=(a=i==null?void 0:i.columns)!=null?a:-1;for(const o of r){if(typeof n=="number"&&n>0&&o.type!=="column-setting"&&typeof o.widthInColumns=="number"&&o.widthInColumns>n&&v.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${n}`),o.label&&(o.label=hr(o.label)),o.type==="classDef"){gr(o.id,o.css);continue}if(o.type==="applyClass"){dr(o.id,(c=o==null?void 0:o.styleClass)!=null?c:"");continue}if(o.type==="applyStyles"){o!=null&&o.stylesStr&&ur(o.id,o==null?void 0:o.stylesStr);continue}if(o.type==="column-setting")t.columns=(l=o.columns)!=null?l:-1;else if(o.type==="edge"){const w=((d=Et.get(o.id))!=null?d:0)+1;Et.set(o.id,w),o.id=w+"-"+o.id,Nt.push(o)}else{o.label||(o.type==="composite"?o.label="":o.label=o.id);const w=et.get(o.id);if(w===void 0?et.set(o.id,o):(o.type!=="na"&&(w.type=o.type),o.label!==o.id&&(w.label=o.label)),o.children&&le(o.children,o),o.type==="space"){const x=(g=o.width)!=null?g:1;for(let m=0;m<x;m++){const E=rr(o);E.id=E.id+"-"+m,et.set(E.id,E),s.push(E)}}else w===void 0&&s.push(o)}}t.children=s},"populateBlockDatabase"),Ct=[],gt={id:"root",type:"composite",children:[],columns:-1},pr=u(()=>{v.debug("Clear called"),Ke(),gt={id:"root",type:"composite",children:[],columns:-1},et=new Map([["root",gt]]),Ct=[],ft=new Map,Nt=[],Et=new Map,It=""},"clear");function oe(e){switch(v.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return v.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"}}u(oe,"typeStr2Type");function he(e){switch(v.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}u(he,"edgeTypeStr2Type");function ge(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}u(ge,"edgeStrToEdgeData");function ue(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}u(ue,"edgeStrToEdgeStartData");function de(e){return e.includes("==")?"thick":"normal"}u(de,"edgeStrToThickness");function pe(e){return e.includes(".-")?"dotted":"solid"}u(pe,"edgeStrToPattern");var Yt=0,fr=u(()=>(Yt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Yt),"generateId"),yr=u(e=>{gt.children=e,le(e,gt),Ct=gt.children},"setHierarchy"),xr=u(e=>{const t=et.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),br=u(()=>[...et.values()],"getBlocksFlat"),wr=u(()=>Ct||[],"getBlocks"),mr=u(()=>Nt,"getEdges"),Sr=u(e=>et.get(e),"getBlock"),Lr=u(e=>{et.set(e.id,e)},"setBlock"),vr=u(e=>{It=e},"setDiagramId"),Er=u(()=>It,"getDiagramId"),_r=u(()=>v,"getLogger"),kr=u(function(){return ft},"getClasses"),Tr={getConfig:u(()=>ut().block,"getConfig"),typeStr2Type:oe,edgeTypeStr2Type:he,edgeStrToEdgeData:ge,edgeStrToEdgeStartData:ue,edgeStrToThickness:de,edgeStrToPattern:pe,getLogger:_r,getBlocksFlat:br,getBlocks:wr,getEdges:mr,setHierarchy:yr,getBlock:Sr,setBlock:Lr,getColumns:xr,getClasses:kr,clear:pr,generateId:fr,setDiagramId:vr,getDiagramId:Er},Dr=Tr,St=u((e,t)=>{const r=tr,s=r(e,"r"),i=r(e,"g"),n=r(e,"b");return Ue(s,i,n,t)},"fade"),Nr=u(e=>`.label {
|
|
7
|
+
font-family: ${e.fontFamily};
|
|
8
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
9
|
+
}
|
|
10
|
+
.cluster-label text {
|
|
11
|
+
fill: ${e.titleColor};
|
|
12
|
+
}
|
|
13
|
+
.cluster-label span,p {
|
|
14
|
+
color: ${e.titleColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
.label text,span,p {
|
|
20
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
21
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.node rect,
|
|
25
|
+
.node circle,
|
|
26
|
+
.node ellipse,
|
|
27
|
+
.node polygon,
|
|
28
|
+
.node path {
|
|
29
|
+
fill: ${e.mainBkg};
|
|
30
|
+
stroke: ${e.nodeBorder};
|
|
31
|
+
stroke-width: 1px;
|
|
32
|
+
}
|
|
33
|
+
.flowchart-label text {
|
|
34
|
+
text-anchor: middle;
|
|
35
|
+
}
|
|
36
|
+
// .flowchart-label .text-outer-tspan {
|
|
37
|
+
// text-anchor: middle;
|
|
38
|
+
// }
|
|
39
|
+
// .flowchart-label .text-inner-tspan {
|
|
40
|
+
// text-anchor: start;
|
|
41
|
+
// }
|
|
42
|
+
|
|
43
|
+
.node .label {
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.node.clickable {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.arrowheadPath {
|
|
51
|
+
fill: ${e.arrowheadColor};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.edgePath .path {
|
|
55
|
+
stroke: ${e.lineColor};
|
|
56
|
+
stroke-width: 2.0px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.flowchart-link {
|
|
60
|
+
stroke: ${e.lineColor};
|
|
61
|
+
fill: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.edgeLabel {
|
|
65
|
+
background-color: ${e.edgeLabelBackground};
|
|
66
|
+
/*
|
|
67
|
+
* This is for backward compatibility with existing code that didn't
|
|
68
|
+
* add a \`<p>\` around edge labels.
|
|
69
|
+
*
|
|
70
|
+
* TODO: We should probably remove this in a future release.
|
|
71
|
+
*/
|
|
72
|
+
p {
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0;
|
|
75
|
+
display: inline;
|
|
76
|
+
}
|
|
77
|
+
rect {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
background-color: ${e.edgeLabelBackground};
|
|
80
|
+
fill: ${e.edgeLabelBackground};
|
|
81
|
+
}
|
|
82
|
+
text-align: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* For html labels only */
|
|
86
|
+
.labelBkg {
|
|
87
|
+
background-color: ${e.edgeLabelBackground};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.node .cluster {
|
|
91
|
+
// fill: ${St(e.mainBkg,.5)};
|
|
92
|
+
fill: ${St(e.clusterBkg,.5)};
|
|
93
|
+
stroke: ${St(e.clusterBorder,.2)};
|
|
94
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
95
|
+
stroke-width: 1px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.cluster text {
|
|
99
|
+
fill: ${e.titleColor};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cluster span,p {
|
|
103
|
+
color: ${e.titleColor};
|
|
104
|
+
}
|
|
105
|
+
/* .cluster div {
|
|
106
|
+
color: ${e.titleColor};
|
|
107
|
+
} */
|
|
108
|
+
|
|
109
|
+
div.mermaidTooltip {
|
|
110
|
+
position: absolute;
|
|
111
|
+
text-align: center;
|
|
112
|
+
max-width: 200px;
|
|
113
|
+
padding: 2px;
|
|
114
|
+
font-family: ${e.fontFamily};
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
background: ${e.tertiaryColor};
|
|
117
|
+
border: 1px solid ${e.border2};
|
|
118
|
+
border-radius: 2px;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
z-index: 100;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.flowchartTitleText {
|
|
124
|
+
text-anchor: middle;
|
|
125
|
+
font-size: 18px;
|
|
126
|
+
fill: ${e.textColor};
|
|
127
|
+
}
|
|
128
|
+
${De()}
|
|
129
|
+
`,"getStyles"),Ir=Nr,Cr=u((e,t,r,s)=>{t.forEach(i=>{Wr[i](e,r,s)})},"insertMarkers"),Br=u((e,t,r)=>{v.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Or=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Rr=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Ar=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),zr=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Mr=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).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").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Pr=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Fr=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Yr=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Wr={extension:Br,composition:Or,aggregation:Rr,dependency:Ar,lollipop:zr,point:Mr,circle:Pr,cross:Fr,barb:Yr},Hr=Cr,Zt,Gt,jt,P=(jt=(Gt=(Zt=Y())==null?void 0:Zt.block)==null?void 0:Gt.padding)!=null?jt:8;function _t(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,s=Math.floor(t/e);return{px:r,py:s}}u(_t,"calculateBlockPosition");var Kr=u(e=>{var s,i;let t=0,r=0;for(const n of e.children){const{width:a,height:c,x:l,y:d}=(s=n.size)!=null?s:{width:0,height:0,x:0,y:0};if(v.debug("getMaxChildSize abc95 child:",n.id,"width:",a,"height:",c,"x:",l,"y:",d,n.type),n.type==="space")continue;const g=a/((i=n.widthInColumns)!=null?i:1);g>t&&(t=g),c>r&&(r=c)}return{width:t,height:r}},"getMaxChildSize");function yt(e,t,r=0,s=0){var a,c,l,d,g,o,w,x,m,E,L,I,C,N,b;v.debug("setBlockSizes abc95 (start)",e.id,(a=e==null?void 0:e.size)==null?void 0:a.x,"block width =",e==null?void 0:e.size,"siblingWidth",r),(c=e==null?void 0:e.size)!=null&&c.width||(e.size={width:r,height:s,x:0,y:0});let i=0,n=0;if(((l=e.children)==null?void 0:l.length)>0){for(const _ of e.children)yt(_,t);const p=Kr(e);i=p.width,n=p.height,v.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,n);for(const _ of e.children)_.size&&(v.debug(`abc95 Setting size of children of ${e.id} id=${_.id} ${i} ${n} ${JSON.stringify(_.size)}`),_.size.width=i*((d=_.widthInColumns)!=null?d:1)+P*(((g=_.widthInColumns)!=null?g:1)-1),_.size.height=n,_.size.x=0,_.size.y=0,v.debug(`abc95 updating size of ${e.id} children child:${_.id} maxWidth:${i} maxHeight:${n}`));for(const _ of e.children)yt(_,t,i,n);const y=(o=e.columns)!=null?o:-1;let S=0;for(const _ of e.children)S+=(w=_.widthInColumns)!=null?w:1;let T=e.children.length;y>0&&y<S&&(T=y);const h=Math.ceil(S/T);let k=T*(i+P)+P,f=h*(n+P)+P;if(k<r){v.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${s} width ${k}`),k=r,f=s;const _=(r-T*P-P)/T,B=(s-h*P-P)/h;v.debug("Size indata abc88",e.id,"childWidth",_,"maxWidth",i),v.debug("Size indata abc88",e.id,"childHeight",B,"maxHeight",n),v.debug("Size indata abc88 xSize",T,"padding",P);for(const W of e.children)W.size&&(W.size.width=_,W.size.height=B,W.size.x=0,W.size.y=0)}if(v.debug(`abc95 (finale calc) ${e.id} xSize ${T} ySize ${h} columns ${y}${e.children.length} width=${Math.max(k,((x=e.size)==null?void 0:x.width)||0)}`),k<(((m=e==null?void 0:e.size)==null?void 0:m.width)||0)){k=((E=e==null?void 0:e.size)==null?void 0:E.width)||0;const _=y>0?Math.min(e.children.length,y):e.children.length;if(_>0){const B=(k-_*P-P)/_;v.debug("abc95 (growing to fit) width",e.id,k,(L=e.size)==null?void 0:L.width,B);for(const W of e.children)W.size&&(W.size.width=B)}}e.size={width:k,height:f,x:0,y:0}}v.debug("setBlockSizes abc94 (done)",e.id,(I=e==null?void 0:e.size)==null?void 0:I.x,(C=e==null?void 0:e.size)==null?void 0:C.width,(N=e==null?void 0:e.size)==null?void 0:N.y,(b=e==null?void 0:e.size)==null?void 0:b.height)}u(yt,"setBlockSizes");function Bt(e,t){var s,i,n,a,c,l,d,g,o,w,x,m,E,L,I,C,N,b,p,y,S,T,h,k,f,_,B;v.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(s=e==null?void 0:e.size)==null?void 0:s.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(n=e==null?void 0:e.size)==null?void 0:n.width}`);const r=(a=e.columns)!=null?a:-1;if(v.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const W=(d=(l=(c=e==null?void 0:e.children[0])==null?void 0:c.size)==null?void 0:l.width)!=null?d:0,J=e.children.length*W+(e.children.length-1)*P;v.debug("widthOfChildren 88",J,"posX");const at=new Map;{let D=0;for(const M of e.children){if(!M.size)continue;const{py:U}=_t(r,D),F=(g=at.get(U))!=null?g:0;M.size.height>F&&at.set(U,M.size.height);let G=(o=M==null?void 0:M.widthInColumns)!=null?o:1;r>0&&(G=Math.min(G,r-D%r)),D+=G}}const A=new Map;{let D=0;const M=[...at.keys()].sort((U,F)=>U-F);for(const U of M)A.set(U,D),D+=((w=at.get(U))!=null?w:0)+P}let V=0;v.debug("abc91 block?.size?.x",e.id,(x=e==null?void 0:e.size)==null?void 0:x.x);let st=(m=e==null?void 0:e.size)!=null&&m.x?((E=e==null?void 0:e.size)==null?void 0:E.x)+(-((L=e==null?void 0:e.size)==null?void 0:L.width)/2||0):-P,it=0;for(const D of e.children){const M=e;if(!D.size)continue;const{width:U,height:F}=D.size,{px:G,py:H}=_t(r,V);if(H!=it&&(it=H,st=(I=e==null?void 0:e.size)!=null&&I.x?((C=e==null?void 0:e.size)==null?void 0:C.x)+(-((N=e==null?void 0:e.size)==null?void 0:N.width)/2||0):-P,v.debug("New row in layout for block",e.id," and child ",D.id,it)),v.debug(`abc89 layout blocks (child) id: ${D.id} Pos: ${V} (px, py) ${G},${H} (${(b=M==null?void 0:M.size)==null?void 0:b.x},${(p=M==null?void 0:M.size)==null?void 0:p.y}) parent: ${M.id} width: ${U}${P}`),M.size){const Q=U/2;D.size.x=st+P+Q,v.debug(`abc91 layout blocks (calc) px, pyid:${D.id} startingPos=X${st} new startingPosX${D.size.x} ${Q} padding=${P} width=${U} halfWidth=${Q} => x:${D.size.x} y:${D.size.y} ${D.widthInColumns} (width * (child?.w || 1)) / 2 ${U*((y=D==null?void 0:D.widthInColumns)!=null?y:1)/2}`),st=D.size.x+Q;const ct=(S=A.get(H))!=null?S:0,$=(T=at.get(H))!=null?T:F;D.size.y=M.size.y-M.size.height/2+ct+$/2+P,v.debug(`abc88 layout blocks (calc) px, pyid:${D.id}startingPosX${st}${P}${Q}=>x:${D.size.x}y:${D.size.y}${D.widthInColumns}(width * (child?.w || 1)) / 2${U*((h=D==null?void 0:D.widthInColumns)!=null?h:1)/2}`)}D.children&&Bt(D);let nt=(k=D==null?void 0:D.widthInColumns)!=null?k:1;r>0&&(nt=Math.min(nt,r-V%r)),V+=nt,v.debug("abc88 columnsPos",D,V)}}v.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(f=e==null?void 0:e.size)==null?void 0:f.x} y: ${(_=e==null?void 0:e.size)==null?void 0:_.y} width: ${(B=e==null?void 0:e.size)==null?void 0:B.width}`)}u(Bt,"layoutBlocks");function Ot(e,{minX:t,minY:r,maxX:s,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:n,y:a,width:c,height:l}=e.size;n-c/2<t&&(t=n-c/2),a-l/2<r&&(r=a-l/2),n+c/2>s&&(s=n+c/2),a+l/2>i&&(i=a+l/2)}if(e.children)for(const n of e.children)({minX:t,minY:r,maxX:s,maxY:i}=Ot(n,{minX:t,minY:r,maxX:s,maxY:i}));return{minX:t,minY:r,maxX:s,maxY:i}}u(Ot,"findBounds");function fe(e){const t=e.getBlock("root");if(!t)return;yt(t,e,0,0),Bt(t),v.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:s,maxX:i,maxY:n}=Ot(t),a=n-s,c=i-r;return{x:r,y:s,width:c,height:a}}u(fe,"layout");var Ur=u(async(e,t,r,s=!1,i=!1)=>{let n=t||"";typeof n=="object"&&(n=n[0]);const a=Y(),c=Z(a);return await Dt(e,n,{style:r,isTitle:s,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},a)},"createLabel"),tt=Ur,Xr=u((e,t,r,s,i)=>{t.arrowTypeStart&&Wt(e,"start",t.arrowTypeStart,r,s,i),t.arrowTypeEnd&&Wt(e,"end",t.arrowTypeEnd,r,s,i)},"addEdgeMarkers"),Vr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Wt=u((e,t,r,s,i,n)=>{const a=Vr[r];if(!a){v.warn(`Unknown arrow type: ${r}`);return}const c=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${s}#${i}_${n}-${a}${c})`)},"addEdgeMarker"),kt={},X={},Zr=u(async(e,t)=>{const r=Y(),s=Z(r),i=e.insert("g").attr("class","edgeLabel"),n=i.insert("g").attr("class","label"),a=t.labelType==="markdown",c=await Dt(e,t.label,{style:t.labelStyle,useHtmlLabels:s,addSvgBackground:a,isNode:!1,markdown:a,width:a?void 0:Number.POSITIVE_INFINITY},r);n.node().appendChild(c);let l=c.getBBox(),d=l;if(s){const o=c.children[0],w=O(c);l=o.getBoundingClientRect(),d=l,w.attr("width",l.width),w.attr("height",l.height)}else{const o=O(c).select("text").node();o&&typeof o.getBBox=="function"&&(d=o.getBBox())}n.attr("transform",lt(d,s)),kt[t.id]=i,t.width=l.width,t.height=l.height;let g;if(t.startLabelLeft){const o=e.insert("g").attr("class","edgeTerminals"),w=o.insert("g").attr("class","inner"),x=await tt(w,t.startLabelLeft,t.labelStyle);g=x;let m=x.getBBox();if(s){const E=x.children[0],L=O(x);m=E.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",lt(m,s)),X[t.id]||(X[t.id]={}),X[t.id].startLeft=o,ht(g,t.startLabelLeft)}if(t.startLabelRight){const o=e.insert("g").attr("class","edgeTerminals"),w=o.insert("g").attr("class","inner"),x=await tt(w,t.startLabelRight,t.labelStyle);g=x;let m=x.getBBox();if(s){const E=x.children[0],L=O(x);m=E.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",lt(m,s)),X[t.id]||(X[t.id]={}),X[t.id].startRight=o,ht(g,t.startLabelRight)}if(t.endLabelLeft){const o=e.insert("g").attr("class","edgeTerminals"),w=o.insert("g").attr("class","inner"),x=await tt(o,t.endLabelLeft,t.labelStyle);g=x;let m=x.getBBox();if(s){const E=x.children[0],L=O(x);m=E.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",lt(m,s)),X[t.id]||(X[t.id]={}),X[t.id].endLeft=o,ht(g,t.endLabelLeft)}if(t.endLabelRight){const o=e.insert("g").attr("class","edgeTerminals"),w=o.insert("g").attr("class","inner"),x=await tt(o,t.endLabelRight,t.labelStyle);g=x;let m=x.getBBox();if(s){const E=x.children[0],L=O(x);m=E.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}w.attr("transform",lt(m,s)),X[t.id]||(X[t.id]={}),X[t.id].endRight=o,ht(g,t.endLabelRight)}return c},"insertEdgeLabel");function ht(e,t){Z(Y())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}u(ht,"setTerminalWidth");var Gr=u((e,t)=>{v.debug("Moving label abc88 ",e.id,e.label,kt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const s=Y(),{subGraphTitleTotalMargin:i}=je(s);if(e.label){const n=kt[e.id];let a=e.x,c=e.y;if(r){const l=ot.calcLabelPosition(r);v.debug("Moving label "+e.label+" from (",a,",",c,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,c=l.y)}n.attr("transform",`translate(${a}, ${c+i/2})`)}if(e.startLabelLeft){const n=X[e.id].startLeft;let a=e.x,c=e.y;if(r){const l=ot.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,c=l.y}n.attr("transform",`translate(${a}, ${c})`)}if(e.startLabelRight){const n=X[e.id].startRight;let a=e.x,c=e.y;if(r){const l=ot.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,c=l.y}n.attr("transform",`translate(${a}, ${c})`)}if(e.endLabelLeft){const n=X[e.id].endLeft;let a=e.x,c=e.y;if(r){const l=ot.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,c=l.y}n.attr("transform",`translate(${a}, ${c})`)}if(e.endLabelRight){const n=X[e.id].endRight;let a=e.x,c=e.y;if(r){const l=ot.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,c=l.y}n.attr("transform",`translate(${a}, ${c})`)}},"positionEdgeLabel"),jr=u((e,t)=>{const r=e.x,s=e.y,i=Math.abs(t.x-r),n=Math.abs(t.y-s),a=e.width/2,c=e.height/2;return i>=a||n>=c},"outsideNode"),qr=u((e,t,r)=>{v.debug(`intersection calc abc89:
|
|
130
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
131
|
+
insidePoint : ${JSON.stringify(r)}
|
|
132
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const s=e.x,i=e.y,n=Math.abs(s-r.x),a=e.width/2;let c=r.x<t.x?a-n:a+n;const l=e.height/2,d=Math.abs(t.y-r.y),g=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*a>Math.abs(s-t.x)*l){let o=r.y<t.y?t.y-l-i:i-l-t.y;c=g*o/d;const w={x:r.x<t.x?r.x+c:r.x-g+c,y:r.y<t.y?r.y+d-o:r.y-d+o};return c===0&&(w.x=t.x,w.y=t.y),g===0&&(w.x=t.x),d===0&&(w.y=t.y),v.debug(`abc89 topp/bott calc, Q ${d}, q ${o}, R ${g}, r ${c}`,w),w}else{r.x<t.x?c=t.x-a-s:c=s-a-t.x;let o=d*c/g,w=r.x<t.x?r.x+g-c:r.x-g+c,x=r.y<t.y?r.y+o:r.y-o;return v.debug(`sides calc abc89, Q ${d}, q ${o}, R ${g}, r ${c}`,{_x:w,_y:x}),c===0&&(w=t.x,x=t.y),g===0&&(w=t.x),d===0&&(x=t.y),{x:w,y:x}}},"intersection"),Ht=u((e,t)=>{v.debug("abc88 cutPathAtIntersect",e,t);let r=[],s=e[0],i=!1;return e.forEach(n=>{if(!jr(t,n)&&!i){const a=qr(t,s,n);let c=!1;r.forEach(l=>{c=c||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)||r.push(a),i=!0}else s=n,i||r.push(n)}),r},"cutPathAtIntersect"),Jr=u(function(e,t,r,s,i,n,a){let c=r.points;v.debug("abc88 InsertEdge: edge=",r,"e=",t);let l=!1;const d=n.node(t.v);var g=n.node(t.w);g!=null&&g.intersect&&(d!=null&&d.intersect)&&(c=c.slice(1,r.points.length-1),c.unshift(d.intersect(c[0])),c.push(g.intersect(c[c.length-1]))),r.toCluster&&(v.debug("to cluster abc88",s[r.toCluster]),c=Ht(r.points,s[r.toCluster].node),l=!0),r.fromCluster&&(v.debug("from cluster abc88",s[r.fromCluster]),c=Ht(c.reverse(),s[r.fromCluster].node).reverse(),l=!0);const o=c.filter(b=>!Number.isNaN(b.y));let w=Ze;r.curve&&(i==="graph"||i==="flowchart")&&(w=r.curve);const{x,y:m}=Xe(r),E=Ve().x(x).y(m).curve(w);let L;switch(r.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-thick";break;default:L=""}switch(r.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break}const I=e.append("path").attr("d",E(o)).attr("id",r.id).attr("class"," "+L+(r.classes?" "+r.classes:"")).attr("style",r.style);let C="";(Y().flowchart.arrowMarkerAbsolute||Y().state.arrowMarkerAbsolute)&&(C=Ge(!0)),Xr(I,r,C,a,i);let N={};return l&&(N.updatedPath=c),N.originalPath=r.points,N},"insertEdge"),Qr=u(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),$r=u((e,t,r,s)=>{const i=Qr(e),n=2,a=t.height+2*r.padding,c=a/n,l=s!=null?s:t.width+2*c+r.padding,d=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:c,y:0},{x:l/2,y:2*d},{x:l-c,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*d,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-c,y:-a},{x:l/2,y:-a-2*d},{x:c,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*d,y:-a/2},{x:0,y:-a/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:c,y:0},{x:l-c,y:0},{x:l,y:-a/2},{x:l-c,y:-a},{x:c,y:-a},{x:0,y:-a/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:c,y:-a},{x:l-c,y:-a},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-c},{x:l,y:-a+c},{x:0,y:-a}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-c},{x:0,y:-a+c},{x:l,y:-a}]:i.has("right")&&i.has("left")?[{x:c,y:0},{x:c,y:-d},{x:l-c,y:-d},{x:l-c,y:0},{x:l,y:-a/2},{x:l-c,y:-a},{x:l-c,y:-a+d},{x:c,y:-a+d},{x:c,y:-a},{x:0,y:-a/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-d},{x:c,y:-d},{x:c,y:-a+d},{x:0,y:-a+d},{x:l/2,y:-a},{x:l,y:-a+d},{x:l-c,y:-a+d},{x:l-c,y:-d},{x:l,y:-d}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-c},{x:0,y:-a}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-c},{x:l,y:-a}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:i.has("right")?[{x:c,y:-d},{x:c,y:-d},{x:l-c,y:-d},{x:l-c,y:0},{x:l,y:-a/2},{x:l-c,y:-a},{x:l-c,y:-a+d},{x:c,y:-a+d},{x:c,y:-a+d}]:i.has("left")?[{x:c,y:0},{x:c,y:-d},{x:l-c,y:-d},{x:l-c,y:-a+d},{x:c,y:-a+d},{x:c,y:-a},{x:0,y:-a/2}]:i.has("up")?[{x:c,y:-d},{x:c,y:-a+d},{x:0,y:-a+d},{x:l/2,y:-a},{x:l,y:-a+d},{x:l-c,y:-a+d},{x:l-c,y:-d}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-d},{x:c,y:-d},{x:c,y:-a+d},{x:l-c,y:-a+d},{x:l-c,y:-d},{x:l,y:-d}]:[{x:0,y:0}]},"getArrowPoints");function ye(e,t){return e.intersect(t)}u(ye,"intersectNode");var ta=ye;function xe(e,t,r,s){var i=e.x,n=e.y,a=i-s.x,c=n-s.y,l=Math.sqrt(t*t*c*c+r*r*a*a),d=Math.abs(t*r*a/l);s.x<i&&(d=-d);var g=Math.abs(t*r*c/l);return s.y<n&&(g=-g),{x:i+d,y:n+g}}u(xe,"intersectEllipse");var be=xe;function we(e,t,r){return be(e,t,t,r)}u(we,"intersectCircle");var ea=we;function me(e,t,r,s){var i,n,a,c,l,d,g,o,w,x,m,E,L,I,C;if(i=t.y-e.y,a=e.x-t.x,l=t.x*e.y-e.x*t.y,w=i*r.x+a*r.y+l,x=i*s.x+a*s.y+l,!(w!==0&&x!==0&&Tt(w,x))&&(n=s.y-r.y,c=r.x-s.x,d=s.x*r.y-r.x*s.y,g=n*e.x+c*e.y+d,o=n*t.x+c*t.y+d,!(g!==0&&o!==0&&Tt(g,o))&&(m=i*c-n*a,m!==0)))return E=Math.abs(m/2),L=a*d-c*l,I=L<0?(L-E)/m:(L+E)/m,L=n*l-i*d,C=L<0?(L-E)/m:(L+E)/m,{x:I,y:C}}u(me,"intersectLine");function Tt(e,t){return e*t>0}u(Tt,"sameSign");var ra=me,aa=Se;function Se(e,t,r){var s=e.x,i=e.y,n=[],a=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){a=Math.min(a,m.x),c=Math.min(c,m.y)}):(a=Math.min(a,t.x),c=Math.min(c,t.y));for(var l=s-e.width/2-a,d=i-e.height/2-c,g=0;g<t.length;g++){var o=t[g],w=t[g<t.length-1?g+1:0],x=ra(e,r,{x:l+o.x,y:d+o.y},{x:l+w.x,y:d+w.y});x&&n.push(x)}return n.length?(n.length>1&&n.sort(function(m,E){var L=m.x-r.x,I=m.y-r.y,C=Math.sqrt(L*L+I*I),N=E.x-r.x,b=E.y-r.y,p=Math.sqrt(N*N+b*b);return C<p?-1:C===p?0:1}),n[0]):e}u(Se,"intersectPolygon");var sa=u((e,t)=>{var r=e.x,s=e.y,i=t.x-r,n=t.y-s,a=e.width/2,c=e.height/2,l,d;return Math.abs(n)*a>Math.abs(i)*c?(n<0&&(c=-c),l=n===0?0:c*i/n,d=c):(i<0&&(a=-a),l=a,d=i===0?0:a*n/i),{x:r+l,y:s+d}},"intersectRect"),ia=sa,R={node:ta,circle:ea,ellipse:be,polygon:aa,rect:ia},K=u(async(e,t,r,s)=>{const i=Y();let n;const a=t.useHtmlLabels||Z(i);r?n=r:n="node default";const c=e.insert("g").attr("class",n).attr("id",t.domId||t.id),l=c.insert("g").attr("class","label").attr("style",t.labelStyle);let d;t.labelText===void 0?d="":d=typeof t.labelText=="string"?t.labelText:t.labelText[0];let g;t.labelType==="markdown"?g=Dt(l,zt(Mt(d),i),{useHtmlLabels:a,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):g=await tt(l,zt(Mt(d),i),t.labelStyle,!1,s);let o=g.getBBox();const w=t.padding/2;if(Z(i)){const x=g.children[0],m=O(g);await Qe(x,d),o=x.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return a?l.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):l.attr("transform","translate(0, "+-o.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:c,bbox:o,halfPadding:w,label:l}},"labelHelper"),z=u((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function rt(e,t,r,s){return e.insert("polygon",":first-child").attr("points",s.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}u(rt,"insertPolygonShape");var na=u(async(e,t)=>{t.useHtmlLabels||Z(Y())||(t.centerLabel=!0);const{shapeSvg:s,bbox:i,halfPadding:n}=await K(e,t,"node "+t.classes,!0);v.info("Classes = ",t.classes);const a=s.insert("rect",":first-child");return a.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),z(t,a),t.intersect=function(c){return R.rect(t,c)},s},"note"),ca=na,Kt=u(e=>e?" "+e:"","formatClass"),q=u((e,t)=>`${t||"node default"}${Kt(e.classes)} ${Kt(e.class)}`,"getClassesFromNode"),Ut=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=i+n,c=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];v.info("Question main (Circle)");const l=rt(r,a,a,c);return l.attr("style",t.style),z(t,l),t.intersect=function(d){return v.warn("Intersect called"),R.polygon(t,c,d)},r},"question"),la=u((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=28,i=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(a){return R.circle(t,14,a)},r},"choice"),oa=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=4,n=t.positioned?t.height:s.height+t.padding,a=n/i,c=t.positioned?t.width:s.width+2*a+t.padding,l=[{x:a,y:0},{x:c-a,y:0},{x:c,y:-n/2},{x:c-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],d=rt(r,c,n,l);return d.attr("style",t.style),z(t,d),t.intersect=function(g){return R.polygon(t,l,g)},r},"hexagon"),ha=u(async(e,t)=>{var w;const{shapeSvg:r,bbox:s}=await K(e,t,void 0,!0),i=2,n=s.height+2*t.padding,a=n/i,c=s.width+2*a+t.padding,d=t.positioned&&((w=t.widthInColumns)!=null?w:1)>1&&t.width>c?t.width:c,g=$r(t.directions,s,t,d),o=rt(r,d,n,g);return o.attr("style",t.style),z(t,o),t.intersect=function(x){return R.polygon(t,g,x)},r},"block_arrow"),ga=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return rt(r,i,n,a).attr("style",t.style),t.width=i+n,t.height=n,t.intersect=function(l){return R.polygon(t,a,l)},r},"rect_left_inv_arrow"),ua=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],c=rt(r,i,n,a);return c.attr("style",t.style),z(t,c),t.intersect=function(l){return R.polygon(t,a,l)},r},"lean_right"),da=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],c=rt(r,i,n,a);return c.attr("style",t.style),z(t,c),t.intersect=function(l){return R.polygon(t,a,l)},r},"lean_left"),pa=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],c=rt(r,i,n,a);return c.attr("style",t.style),z(t,c),t.intersect=function(l){return R.polygon(t,a,l)},r},"trapezoid"),fa=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],c=rt(r,i,n,a);return c.attr("style",t.style),z(t,c),t.intersect=function(l){return R.polygon(t,a,l)},r},"inv_trapezoid"),ya=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],c=rt(r,i,n,a);return c.attr("style",t.style),z(t,c),t.intersect=function(l){return R.polygon(t,a,l)},r},"rect_right_inv_arrow"),xa=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=i/2,a=n/(2.5+i/50),c=s.height+a+t.padding,l="M 0,"+a+" a "+n+","+a+" 0,0,0 "+i+" 0 a "+n+","+a+" 0,0,0 "+-i+" 0 l 0,"+c+" a "+n+","+a+" 0,0,0 "+i+" 0 l 0,"+-c,d=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-i/2+","+-(c/2+a)+")");return z(t,d),t.intersect=function(g){const o=R.rect(t,g),w=o.x-t.x;if(n!=0&&(Math.abs(w)<t.width/2||Math.abs(w)==t.width/2&&Math.abs(o.y-t.y)>t.height/2-a)){let x=a*a*(1-w*w/(n*n));x!=0&&(x=Math.sqrt(x)),x=a-x,g.y-t.y>0&&(x=-x),o.y+=x}return o},r},"cylinder"),ba=u(async(e,t)=>{const{shapeSvg:r,bbox:s,halfPadding:i}=await K(e,t,"node "+t.classes+" "+t.class,!0),n=r.insert("rect",":first-child"),a=t.positioned?t.width:s.width+t.padding,c=t.positioned?t.height:s.height+t.padding,l=t.positioned?-a/2:-s.width/2-i,d=t.positioned?-c/2:-s.height/2-i;if(n.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",d).attr("width",a).attr("height",c),t.props){const g=new Set(Object.keys(t.props));t.props.borders&&(xt(n,t.props.borders,a,c),g.delete("borders")),g.forEach(o=>{v.warn(`Unknown node property ${o}`)})}return z(t,n),t.intersect=function(g){return R.rect(t,g)},r},"rect"),wa=u(async(e,t)=>{const{shapeSvg:r,bbox:s,halfPadding:i}=await K(e,t,"node "+t.classes,!0),n=r.insert("rect",":first-child"),a=t.positioned?t.width:s.width+t.padding,c=t.positioned?t.height:s.height+t.padding,l=t.positioned?-a/2:-s.width/2-i,d=t.positioned?-c/2:-s.height/2-i;if(n.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",d).attr("width",a).attr("height",c),t.props){const g=new Set(Object.keys(t.props));t.props.borders&&(xt(n,t.props.borders,a,c),g.delete("borders")),g.forEach(o=>{v.warn(`Unknown node property ${o}`)})}return z(t,n),t.intersect=function(g){return R.rect(t,g)},r},"composite"),ma=u(async(e,t)=>{const{shapeSvg:r}=await K(e,t,"label",!0);v.trace("Classes = ",t.class);const s=r.insert("rect",":first-child"),i=0,n=0;if(s.attr("width",i).attr("height",n),r.attr("class","label edgeLabel"),t.props){const a=new Set(Object.keys(t.props));t.props.borders&&(xt(s,t.props.borders,i,n),a.delete("borders")),a.forEach(c=>{v.warn(`Unknown node property ${c}`)})}return z(t,s),t.intersect=function(a){return R.rect(t,a)},r},"labelRect");function xt(e,t,r,s){const i=[],n=u(c=>{i.push(c,0)},"addBorder"),a=u(c=>{i.push(0,c)},"skipBorder");t.includes("t")?(v.debug("add top border"),n(r)):a(r),t.includes("r")?(v.debug("add right border"),n(s)):a(s),t.includes("b")?(v.debug("add bottom border"),n(r)):a(r),t.includes("l")?(v.debug("add left border"),n(s)):a(s),e.attr("stroke-dasharray",i.join(" "))}u(xt,"applyNodePropertyBorders");var Sa=u(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const s=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=s.insert("rect",":first-child"),n=s.insert("line"),a=s.insert("g").attr("class","label"),c=t.labelText.flat?t.labelText.flat():t.labelText;let l="";typeof c=="object"?l=c[0]:l=c,v.info("Label text abc79",l,c,typeof c=="object");const d=await tt(a,l,t.labelStyle,!0,!0);let g={width:0,height:0};if(Z(Y())){const E=d.children[0],L=O(d);g=E.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}v.info("Text 2",c);const o=c.slice(1,c.length);let w=d.getBBox();const x=await tt(a,o.join?o.join("<br/>"):o,t.labelStyle,!0,!0);if(Z(Y())){const E=x.children[0],L=O(x);g=E.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const m=t.padding/2;return O(x).attr("transform","translate( "+(g.width>w.width?0:(w.width-g.width)/2)+", "+(w.height+m+5)+")"),O(d).attr("transform","translate( "+(g.width<w.width?0:-(w.width-g.width)/2)+", 0)"),g=a.node().getBBox(),a.attr("transform","translate("+-g.width/2+", "+(-g.height/2-m+3)+")"),i.attr("class","outer title-state").attr("x",-g.width/2-m).attr("y",-g.height/2-m).attr("width",g.width+t.padding).attr("height",g.height+t.padding),n.attr("class","divider").attr("x1",-g.width/2-m).attr("x2",g.width/2+m).attr("y1",-g.height/2-m+w.height+m).attr("y2",-g.height/2-m+w.height+m),z(t,i),t.intersect=function(E){return R.rect(t,E)},s},"rectWithTitle"),La=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.height+t.padding,n=s.width+i/4+t.padding,a=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return z(t,a),t.intersect=function(c){return R.rect(t,c)},r},"stadium"),va=u(async(e,t)=>{const{shapeSvg:r,bbox:s,halfPadding:i}=await K(e,t,q(t,void 0),!0),n=r.insert("circle",":first-child");return n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),v.info("Circle main"),z(t,n),t.intersect=function(a){return v.info("Circle intersect",t,s.width/2+i,a),R.circle(t,s.width/2+i,a)},r},"circle"),Ea=u(async(e,t)=>{const{shapeSvg:r,bbox:s,halfPadding:i}=await K(e,t,q(t,void 0),!0),n=5,a=r.insert("g",":first-child"),c=a.insert("circle"),l=a.insert("circle");return a.attr("class",t.class),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i+n).attr("width",s.width+t.padding+n*2).attr("height",s.height+t.padding+n*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),v.info("DoubleCircle main"),z(t,c),t.intersect=function(d){return v.info("DoubleCircle intersect",t,s.width/2+i+n,d),R.circle(t,s.width/2+i+n,d)},r},"doublecircle"),_a=u(async(e,t)=>{const{shapeSvg:r,bbox:s}=await K(e,t,q(t,void 0),!0),i=s.width+t.padding,n=s.height+t.padding,a=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],c=rt(r,i,n,a);return c.attr("style",t.style),z(t,c),t.intersect=function(l){return R.polygon(t,a,l)},r},"subroutine"),ka=u((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=r.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),z(t,s),t.intersect=function(i){return R.circle(t,7,i)},r},"start"),Xt=u((e,t,r)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,n=10;r==="LR"&&(i=10,n=70);const a=s.append("rect").attr("x",-1*i/2).attr("y",-1*n/2).attr("width",i).attr("height",n).attr("class","fork-join");return z(t,a),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(c){return R.rect(t,c)},s},"forkJoin"),Ta=u((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),z(t,i),t.intersect=function(n){return R.circle(t,7,n)},r},"end"),Da=u(async(e,t)=>{var T;const r=t.padding/2,s=4,i=8;let n;t.classes?n="node "+t.classes:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),c=a.insert("rect",":first-child"),l=a.insert("line"),d=a.insert("line");let g=0,o=s;const w=a.insert("g").attr("class","label");let x=0;const m=(T=t.classData.annotations)==null?void 0:T[0],E=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",L=await tt(w,E,t.labelStyle,!0,!0);let I=L.getBBox();if(Z(Y())){const h=L.children[0],k=O(L);I=h.getBoundingClientRect(),k.attr("width",I.width),k.attr("height",I.height)}t.classData.annotations[0]&&(o+=I.height+s,g+=I.width);let C=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(Z(Y())?C+="<"+t.classData.type+">":C+="<"+t.classData.type+">");const N=await tt(w,C,t.labelStyle,!0,!0);O(N).attr("class","classTitle");let b=N.getBBox();if(Z(Y())){const h=N.children[0],k=O(N);b=h.getBoundingClientRect(),k.attr("width",b.width),k.attr("height",b.height)}o+=b.height+s,b.width>g&&(g=b.width);const p=[];t.classData.members.forEach(async h=>{const k=h.getDisplayDetails();let f=k.displayText;Z(Y())&&(f=f.replace(/</g,"<").replace(/>/g,">"));const _=await tt(w,f,k.cssStyle?k.cssStyle:t.labelStyle,!0,!0);let B=_.getBBox();if(Z(Y())){const W=_.children[0],J=O(_);B=W.getBoundingClientRect(),J.attr("width",B.width),J.attr("height",B.height)}B.width>g&&(g=B.width),o+=B.height+s,p.push(_)}),o+=i;const y=[];if(t.classData.methods.forEach(async h=>{const k=h.getDisplayDetails();let f=k.displayText;Z(Y())&&(f=f.replace(/</g,"<").replace(/>/g,">"));const _=await tt(w,f,k.cssStyle?k.cssStyle:t.labelStyle,!0,!0);let B=_.getBBox();if(Z(Y())){const W=_.children[0],J=O(_);B=W.getBoundingClientRect(),J.attr("width",B.width),J.attr("height",B.height)}B.width>g&&(g=B.width),o+=B.height+s,y.push(_)}),o+=i,m){let h=(g-I.width)/2;O(L).attr("transform","translate( "+(-1*g/2+h)+", "+-1*o/2+")"),x=I.height+s}let S=(g-b.width)/2;return O(N).attr("transform","translate( "+(-1*g/2+S)+", "+(-1*o/2+x)+")"),x+=b.height+s,l.attr("class","divider").attr("x1",-g/2-r).attr("x2",g/2+r).attr("y1",-o/2-r+i+x).attr("y2",-o/2-r+i+x),x+=i,p.forEach(h=>{var f;O(h).attr("transform","translate( "+-g/2+", "+(-1*o/2+x+i/2)+")");const k=h==null?void 0:h.getBBox();x+=((f=k==null?void 0:k.height)!=null?f:0)+s}),x+=i,d.attr("class","divider").attr("x1",-g/2-r).attr("x2",g/2+r).attr("y1",-o/2-r+i+x).attr("y2",-o/2-r+i+x),x+=i,y.forEach(h=>{var f;O(h).attr("transform","translate( "+-g/2+", "+(-1*o/2+x)+")");const k=h==null?void 0:h.getBBox();x+=((f=k==null?void 0:k.height)!=null?f:0)+s}),c.attr("style",t.style).attr("class","outer title-state").attr("x",-g/2-r).attr("y",-(o/2)-r).attr("width",g+t.padding).attr("height",o+t.padding),z(t,c),t.intersect=function(h){return R.rect(t,h)},a},"class_box"),Vt={rhombus:Ut,composite:wa,question:Ut,rect:ba,labelRect:ma,rectWithTitle:Sa,choice:la,circle:va,doublecircle:Ea,stadium:La,hexagon:oa,block_arrow:ha,rect_left_inv_arrow:ga,lean_right:ua,lean_left:da,trapezoid:pa,inv_trapezoid:fa,rect_right_inv_arrow:ya,cylinder:xa,start:ka,end:Ta,note:ca,subroutine:_a,fork:Xt,join:Xt,class_box:Da},pt={},Le=u(async(e,t,r)=>{let s,i;if(t.link){let n;Y().securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),s=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n),i=await Vt[t.shape](s,t,r)}else i=await Vt[t.shape](e,t,r),s=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),pt[t.id]=s,t.haveCallback&&pt[t.id].attr("class",pt[t.id].attr("class")+" clickable"),s},"insertNode"),Na=u(e=>{const t=pt[e.id];v.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,s=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+s-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),s},"positionNode");function Rt(e,t,r=!1){var x,m,E,L,I,C,N,b;const s=e;let i="default";(((x=s==null?void 0:s.classes)==null?void 0:x.length)||0)>0&&(i=((m=s==null?void 0:s.classes)!=null?m:[]).join(" ")),i=i+" flowchart-label";let n=0,a="",c;switch(s.type){case"round":n=5,a="rect";break;case"composite":n=0,a="composite",c=0;break;case"square":a="rect";break;case"diamond":a="question";break;case"hexagon":a="hexagon";break;case"block_arrow":a="block_arrow";break;case"odd":a="rect_left_inv_arrow";break;case"lean_right":a="lean_right";break;case"lean_left":a="lean_left";break;case"trapezoid":a="trapezoid";break;case"inv_trapezoid":a="inv_trapezoid";break;case"rect_left_inv_arrow":a="rect_left_inv_arrow";break;case"circle":a="circle";break;case"ellipse":a="ellipse";break;case"stadium":a="stadium";break;case"subroutine":a="subroutine";break;case"cylinder":a="cylinder";break;case"group":a="rect";break;case"doublecircle":a="doublecircle";break;default:a="rect"}const l=Je((E=s==null?void 0:s.styles)!=null?E:[]),d=s.label,g=(L=s.size)!=null?L:{width:0,height:0,x:0,y:0},o=t.getDiagramId();return{labelStyle:l.labelStyle,shape:a,labelText:d,rx:n,ry:n,class:i,style:l.style,id:s.id,domId:o?`${o}-${s.id}`:s.id,directions:s.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:s.type,padding:(N=c!=null?c:(C=(I=ut())==null?void 0:I.block)==null?void 0:C.padding)!=null?N:0,widthInColumns:(b=s.widthInColumns)!=null?b:1}}u(Rt,"getNodeFromBlock");async function ve(e,t,r){const s=Rt(t,r,!1);if(s.type==="group")return;const i=ut(),n=await Le(e,s,{config:i}),a=n.node().getBBox(),c=r.getBlock(s.id);c.size={width:a.width,height:a.height,x:0,y:0,node:n},r.setBlock(c),n.remove()}u(ve,"calculateBlockSize");async function Ee(e,t,r){const s=Rt(t,r,!0);if(r.getBlock(s.id).type!=="space"){const n=ut();await Le(e,s,{config:n}),t.intersect=s==null?void 0:s.intersect,Na(s)}}u(Ee,"insertBlockPositioned");async function bt(e,t,r,s){for(const i of t)await s(e,i,r),i.children&&await bt(e,i.children,r,s)}u(bt,"performOperations");async function _e(e,t,r){await bt(e,t,r,ve)}u(_e,"calculateBlockSizes");async function ke(e,t,r){await bt(e,t,r,Ee)}u(ke,"insertBlocks");async function Te(e,t,r,s,i){const n=new $e({multigraph:!0,compound:!0});n.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const a of r)a.size&&n.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(const a of t)if(a.start&&a.end){const c=s.getBlock(a.start),l=s.getBlock(a.end);if(c!=null&&c.size&&(l!=null&&l.size)){const d=c.size,g=l.size,o=[{x:d.x,y:d.y},{x:d.x+(g.x-d.x)/2,y:d.y+(g.y-d.y)/2},{x:g.x,y:g.y}],w=i?`${i}-${a.id}`:a.id,x=a.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=a.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",E=`${x} ${m} flowchart-link LS-a1 LE-b1`;Jr(e,{v:a.start,w:a.end,name:w},{...a,id:w,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:o,classes:E},void 0,"block",n,i),a.label&&(await Zr(e,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:o,classes:E}),Gr({...a,x:o[1].x,y:o[1].y},{originalPath:o}))}}}u(Te,"insertEdges");var Ia=u(function(e,t){return t.db.getClasses()},"getClasses"),Ca=u(async function(e,t,r,s){const{securityLevel:i,block:n}=ut(),a=s.db;a.setDiagramId(t);let c;i==="sandbox"&&(c=O("#i"+t));const l=i==="sandbox"?O(c.nodes()[0].contentDocument.body):O("body"),d=i==="sandbox"?l.select(`[id="${t}"]`):O(`[id="${t}"]`);Hr(d,["point","circle","cross"],s.type,t);const o=a.getBlocks(),w=a.getBlocksFlat(),x=a.getEdges(),m=d.insert("g").attr("class","block");await _e(m,o,a);const E=fe(a);if(await ke(m,o,a),await Te(m,x,w,a,t),E){const L=E,I=Math.max(1,Math.round(.125*(L.width/L.height))),C=L.height+I+10,N=L.width+10,{useMaxWidth:b}=n;He(d,C,N,!!b),v.debug("Here Bounds",E,L),d.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}},"draw"),Ba={draw:Ca,getClasses:Ia},Pa={parser:cr,db:Dr,renderer:Ba,styles:Ir};export{Pa as diagram};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{g as Se,e as De}from"./chunk-ND2GUHAM-BeN_xln2.js";import{b1 as Pe,a1 as Be,a2 as Ie,b2 as Me,b as y,a4 as Bt,a$ as jt,aE as de,F as Le,k as Ne,r as Tt,aZ as ge,a_ as Ye,bn as je,z as $t,q as fe}from"./mermaid.core-DuagT3S2.js";import"./index-CbSmh0fl.js";var Ft=function(){var a=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],r=[1,27],l=[1,28],e=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[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],St=[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],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[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],qt={trace:y(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:y(function(x,v,E,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;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:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},a(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(Ct,[2,14]),a(Qt,[2,16],{12:[1,76]}),a(Ct,[2,36],{12:[1,77]}),a(St,[2,19]),a(St,[2,20]),{25:[1,78]},{27:[1,79]},a(St,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},a(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},a(Ct,[2,15]),a(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:r,28:l}),a(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:r,28:l,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(St,[2,21]),a(St,[2,22]),a(T,[2,39]),a(le,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),a(Mt,[2,73]),{78:[1,133]},a(Mt,[2,75]),a(Mt,[2,76]),a(T,[2,40]),a(T,[2,41]),a(T,[2,42]),a(T,[2,43]),a(T,[2,44]),a(T,[2,45]),a(T,[2,46]),a(T,[2,47]),a(T,[2,48]),a(T,[2,49]),a(T,[2,50]),a(T,[2,51]),a(T,[2,52]),a(T,[2,53]),a(T,[2,54]),a(T,[2,55]),a(T,[2,56]),a(T,[2,57]),a(T,[2,58]),a(T,[2,60]),a(T,[2,61]),a(T,[2,62]),a(T,[2,63]),a(T,[2,64]),a(T,[2,65]),a(T,[2,66]),a(T,[2,67]),a(T,[2,68]),a(T,[2,69]),a(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},a(vt,[2,28]),a(vt,[2,29]),a(vt,[2,30]),a(vt,[2,31]),a(vt,[2,32]),a(vt,[2,33]),a(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},a(Qt,[2,18]),a(Ct,[2,38]),a(le,[2,72]),a(Mt,[2,74]),a(T,[2,24]),a(T,[2,35]),a(Ht,[2,25]),a(Ht,[2,26],{12:[1,138]}),a(Ht,[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:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(At.yy[Gt]=this.yy[Gt]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc=="undefined"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(he,"lex");for(var I,kt,N,Jt,wt={},Nt,W,ue,Yt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I=="undefined")&&(I=he()),N=Dt[kt]&&Dt[kt][I]),typeof N=="undefined"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[kt])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
|
|
2
|
+
`+D.showPosition()+`
|
|
3
|
+
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,At.yy,N[1],R,h].concat(Te)),typeof Jt!="undefined")return Jt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[E[E.length-2]][E[E.length-1]],E.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
|
5
|
+
`+v+"^"},"showPosition"),test_match:y(function(x,v){var E,b,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),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+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],E=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:y(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,v,E,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;h<R.length;h++)if(E=this._input.match(this.rules[R[h]]),E&&(!v||E[0].length>v[0].length)){if(v=E,b=h,this.options.backtrack_lexer){if(x=this.test_match(E,R[h]),x!==!1)return x;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(x=this.test_match(v,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:y(function(){var v=this.next();return v||this.lex()},"lex"),begin:y(function(v){this.conditionStack.push(v)},"begin"),popState:y(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:y(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:y(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:y(function(v){this.begin(v)},"pushState"),stateStackSize:y(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:y(function(v,E,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return y(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=y(function(){return be},"getC4Type"),Ve=y(function(a){be=ge(a,Bt())},"setC4Type"),ze=y(function(a,t,s,o,r,l,e,n,i){if(a==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=a,u.from=t,u.to=s,u.label={text:o},r==null)u.techn={text:""};else if(typeof r=="object"){let[f,g]=Object.entries(r)[0];u[f]={text:g}}else u.techn={text:r};if(l==null)u.descr={text:""};else if(typeof l=="object"){let[f,g]=Object.entries(l)[0];u[f]={text:g}}else u.descr={text:l};if(typeof e=="object"){let[f,g]=Object.entries(e)[0];u[f]=g}else u.sprite=e;if(typeof n=="object"){let[f,g]=Object.entries(n)[0];u[f]=g}else u.tags=n;if(typeof i=="object"){let[f,g]=Object.entries(i)[0];u[f]=g}else u.link=i;u.wrap=mt()},"addRel"),Xe=y(function(a,t,s,o,r,l,e){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.sprite=r;if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.tags=l;if(typeof e=="object"){let[u,d]=Object.entries(e)[0];n[u]=d}else n.link=e;n.typeC4Shape={text:a},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=y(function(a,t,s,o,r,l,e,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(r==null)i.descr={text:""};else if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]={text:f}}else i.descr={text:r};if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]=f}else i.sprite=l;if(typeof e=="object"){let[d,f]=Object.entries(e)[0];i[d]=f}else i.tags=e;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:a},i.parentBoundary=B},"addContainer"),Qe=y(function(a,t,s,o,r,l,e,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(r==null)i.descr={text:""};else if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]={text:f}}else i.descr={text:r};if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]=f}else i.sprite=l;if(typeof e=="object"){let[d,f]=Object.entries(e)[0];i[d]=f}else i.tags=e;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:a},i.parentBoundary=B},"addComponent"),He=y(function(a,t,s,o,r){if(a===null||t===null)return;let l={};const e=X.find(n=>n.alias===a);if(e&&a===e.alias?l=e:(l.alias=a,X.push(l)),t==null?l.label={text:""}:l.label={text:t},s==null)l.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];l[n]={text:i}}else l.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];l[n]=i}else l.tags=o;if(typeof r=="object"){let[n,i]=Object.entries(r)[0];l[n]=i}else l.link=r;l.parentBoundary=B,l.wrap=mt(),F=B,B=a,xt.push(F)},"addPersonOrSystemBoundary"),qe=y(function(a,t,s,o,r){if(a===null||t===null)return;let l={};const e=X.find(n=>n.alias===a);if(e&&a===e.alias?l=e:(l.alias=a,X.push(l)),t==null?l.label={text:""}:l.label={text:t},s==null)l.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];l[n]={text:i}}else l.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];l[n]=i}else l.tags=o;if(typeof r=="object"){let[n,i]=Object.entries(r)[0];l[n]=i}else l.link=r;l.parentBoundary=B,l.wrap=mt(),F=B,B=a,xt.push(F)},"addContainerBoundary"),Ge=y(function(a,t,s,o,r,l,e,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(r==null)i.descr={text:""};else if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]={text:f}}else i.descr={text:r};if(typeof e=="object"){let[d,f]=Object.entries(e)[0];i[d]=f}else i.tags=e;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=a,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=y(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=y(function(a,t,s,o,r,l,e,n,i,u,d){let f=V.find(g=>g.alias===t);if(!(f===void 0&&(f=X.find(g=>g.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[g,m]=Object.entries(s)[0];f[g]=m}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[g,m]=Object.entries(o)[0];f[g]=m}else f.fontColor=o;if(r!=null)if(typeof r=="object"){let[g,m]=Object.entries(r)[0];f[g]=m}else f.borderColor=r;if(l!=null)if(typeof l=="object"){let[g,m]=Object.entries(l)[0];f[g]=m}else f.shadowing=l;if(e!=null)if(typeof e=="object"){let[g,m]=Object.entries(e)[0];f[g]=m}else f.shape=e;if(n!=null)if(typeof n=="object"){let[g,m]=Object.entries(n)[0];f[g]=m}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[g,m]=Object.entries(i)[0];f[g]=m}else f.techn=i;if(u!=null)if(typeof u=="object"){let[g,m]=Object.entries(u)[0];f[g]=m}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[g,m]=Object.entries(d)[0];f[g]=m}else f.legendSprite=d}},"updateElStyle"),Ze=y(function(a,t,s,o,r,l,e){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=u}else n.lineColor=r;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(l);if(e!=null)if(typeof e=="object"){let[i,u]=Object.entries(e)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(e)}},"updateRelStyle"),$e=y(function(a,t,s){let o=Vt,r=zt;if(typeof t=="object"){const l=Object.values(t)[0];o=parseInt(l)}else o=parseInt(t);if(typeof s=="object"){const l=Object.values(s)[0];r=parseInt(l)}else r=parseInt(s);o>=1&&(Vt=o),r>=1&&(zt=r)},"updateLayoutConfig"),t0=y(function(){return Vt},"getC4ShapeInRow"),e0=y(function(){return zt},"getC4BoundaryInRow"),a0=y(function(){return B},"getCurrentBoundaryParse"),i0=y(function(){return F},"getParentBoundaryParse"),_e=y(function(a){return a==null?V:V.filter(t=>t.parentBoundary===a)},"getC4ShapeArray"),n0=y(function(a){return V.find(t=>t.alias===a)},"getC4Shape"),s0=y(function(a){return Object.keys(_e(a))},"getC4ShapeKeys"),xe=y(function(a){return a==null?X:X.filter(t=>t.parentBoundary===a)},"getBoundaries"),r0=xe,l0=y(function(){return It},"getRels"),o0=y(function(){return ie},"getTitle"),c0=y(function(a){ne=a},"setWrap"),mt=y(function(){return ne},"autoWrap"),h0=y(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={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},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=y(function(a){ie=ge(a,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:s0,getBoundaries:xe,getBoundarys:r0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Me,getAccTitle:Ie,getAccDescription:Be,setAccDescription:Pe,getConfig:y(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},se=y(function(a,t){return De(a,t)},"drawRect"),me=y(function(a,t,s,o,r,l){const e=a.append("image");e.attr("width",t),e.attr("height",s),e.attr("x",o),e.attr("y",r);let n=l.startsWith("data:image/png;base64")?l:Ye(l);e.attr("xlink:href",n)},"drawImage"),y0=y((a,t,s,o)=>{const r=a.append("g");let l=0;for(let e of t){let n=e.textColor?e.textColor:"#444444",i=e.lineColor?e.lineColor:"#444444",u=e.offsetX?parseInt(e.offsetX):0,d=e.offsetY?parseInt(e.offsetY):0,f="";if(l===0){let m=r.append("line");m.attr("x1",e.startPoint.x),m.attr("y1",e.startPoint.y),m.attr("x2",e.endPoint.x),m.attr("y2",e.endPoint.y),m.attr("stroke-width","1"),m.attr("stroke",i),m.style("fill","none"),e.type!=="rel_b"&&m.attr("marker-end","url("+f+"#"+o+"-arrowhead)"),(e.type==="birel"||e.type==="rel_b")&&m.attr("marker-start","url("+f+"#"+o+"-arrowend)"),l=-1}else{let m=r.append("path");m.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",e.startPoint.x).replaceAll("starty",e.startPoint.y).replaceAll("controlx",e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll("controly",e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll("stopx",e.endPoint.x).replaceAll("stopy",e.endPoint.y)),e.type!=="rel_b"&&m.attr("marker-end","url("+f+"#"+o+"-arrowhead)"),(e.type==="birel"||e.type==="rel_b")&&m.attr("marker-start","url("+f+"#"+o+"-arrowend)")}let g=s.messageFont();Q(s)(e.label.text,r,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+u,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+d,e.label.width,e.label.height,{fill:n},g),e.techn&&e.techn.text!==""&&(g=s.messageFont(),Q(s)("["+e.techn.text+"]",r,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+u,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+s.messageFontSize+5+d,Math.max(e.label.width,e.techn.width),e.techn.height,{fill:n,"font-style":"italic"},g))}},"drawRels"),g0=y(function(a,t,s){const o=a.append("g");let r=t.bgColor?t.bgColor:"none",l=t.borderColor?t.borderColor:"#444444",e=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:r,stroke:l,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};se(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=e,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=e,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=e,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=y(function(a,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],r=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],l=t.fontColor?t.fontColor:"#FFFFFF",e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=a.append("g");n.attr("class","person-man");const i=Se();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=r,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},se(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=C0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",l).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,e);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=l,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:l},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=l,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:l,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:l,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=l,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:l},d)),t.height},"drawC4Shape"),_0=y(function(a,t){a.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=y(function(a,t){a.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=y(function(a,t){a.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=y(function(a,t){a.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=y(function(a,t){a.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),A0=y(function(a,t){a.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),k0=y(function(a,t){const o=a.append("defs").append("marker").attr("id",t+"-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"),C0=y((a,t)=>({fontFamily:a[t+"FontFamily"],fontSize:a[t+"FontSize"],fontWeight:a[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function a(r,l,e,n,i,u,d){const f=l.append("text").attr("x",e+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(r);o(f,d)}y(a,"byText");function t(r,l,e,n,i,u,d,f){const{fontSize:g,fontFamily:m,fontWeight:O}=f,S=r.split($t.lineBreakRegex);for(let P=0;P<S.length;P++){const M=P*g-g*(S.length-1)/2,U=l.append("text").attr("x",e+i/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",g).style("font-weight",O).style("font-family",m);U.append("tspan").attr("dy",M).text(S[P]).attr("alignment-baseline","mathematical"),o(U,d)}}y(t,"byTspan");function s(r,l,e,n,i,u,d,f){const g=l.append("switch"),O=g.append("foreignObject").attr("x",e).attr("y",n).attr("width",i).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");O.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,g,e,n,i,u,d,f),o(O,d)}y(s,"byFo");function o(r,l){for(const e in l)l.hasOwnProperty(e)&&r.attr(e,l[e])}return y(o,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?s:r.textPlacement==="old"?a:t}}(),z={drawRect:se,drawBoundary:g0,drawC4Shape:b0,drawRels:y0,drawImage:me,insertArrowHead:v0,insertArrowEnd:E0,insertArrowFilledHead:A0,insertArrowCrossHead:k0,insertDatabaseIcon:_0,insertComputerIcon:x0,insertClockIcon:m0},Xt=0,Wt=0,ve=4,ee=2;Ft.yy=te;var _={},Ot,Ee=(Ot=class{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,ae(t.db.getConfig())}setData(t,s,o,r){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=s,this.nextData.starty=this.data.starty=o,this.nextData.stopy=this.data.stopy=r}updateVal(t,s,o,r){t[s]===void 0?t[s]=o:t[s]=r(o,t[s])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let s=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,o=s+t.width,r=this.nextData.starty+t.margin*2,l=r+t.height;(s>=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,r=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=r+t.height,this.nextData.cnt=1),t.x=s,t.y=r,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",r,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",r,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",l,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},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},y(Ot,"Bounds"),Ot),ae=y(function(a){Ne(_,a),a.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=a.fontFamily),a.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=a.fontSize),a.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=a.fontWeight)},"setConf"),Pt=y((a,t)=>({fontFamily:a[t+"FontFamily"],fontSize:a[t+"FontSize"],fontWeight:a[t+"FontWeight"]}),"c4ShapeFont"),Ut=y(a=>({fontFamily:a.boundaryFontFamily,fontSize:a.boundaryFontSize,fontWeight:a.boundaryFontWeight}),"boundaryFont"),w0=y(a=>({fontFamily:a.messageFontFamily,fontSize:a.messageFontSize,fontWeight:a.messageFontWeight}),"messageFont");function j(a,t,s,o,r){if(!t[a].width)if(s)t[a].text=je(t[a].text,r,o),t[a].textLines=t[a].text.split($t.lineBreakRegex).length,t[a].width=r,t[a].height=fe(t[a].text,o);else{let l=t[a].text.split($t.lineBreakRegex);t[a].textLines=l.length;let e=0;t[a].height=0,t[a].width=0;for(const n of l)t[a].width=Math.max(Tt(n,o),t[a].width),e=fe(n,o),t[a].height=t[a].height+e}}y(j,"calcC4ShapeTextWH");var Ae=y(function(a,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,r=Ut(_);r.fontSize=r.fontSize+2,r.fontWeight="bold";let l=Tt(t.label.text,r);j("label",t,o,r,l),z.drawBoundary(a,t,_)},"drawBoundary"),ke=y(function(a,t,s,o){let r=0;for(const l of o){r=0;const e=s[l];let n=Pt(_,e.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,e.typeC4Shape.width=Tt("«"+e.typeC4Shape.text+"»",n),e.typeC4Shape.height=n.fontSize+2,e.typeC4Shape.Y=_.c4ShapePadding,r=e.typeC4Shape.Y+e.typeC4Shape.height-4,e.image={width:0,height:0,Y:0},e.typeC4Shape.text){case"person":case"external_person":e.image.width=48,e.image.height=48,e.image.Y=r,r=e.image.Y+e.image.height;break}e.sprite&&(e.image.width=48,e.image.height=48,e.image.Y=r,r=e.image.Y+e.image.height);let i=e.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,e.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",e,i,d,u),e.label.Y=r+8,r=e.label.Y+e.label.height,e.type&&e.type.text!==""){e.type.text="["+e.type.text+"]";let m=Pt(_,e.typeC4Shape.text);j("type",e,i,m,u),e.type.Y=r+5,r=e.type.Y+e.type.height}else if(e.techn&&e.techn.text!==""){e.techn.text="["+e.techn.text+"]";let m=Pt(_,e.techn.text);j("techn",e,i,m,u),e.techn.Y=r+5,r=e.techn.Y+e.techn.height}let f=r,g=e.label.width;if(e.descr&&e.descr.text!==""){let m=Pt(_,e.typeC4Shape.text);j("descr",e,i,m,u),e.descr.Y=r+20,r=e.descr.Y+e.descr.height,g=Math.max(e.label.width,e.descr.width),f=r-e.descr.textLines*5}g=g+_.c4ShapePadding,e.width=Math.max(e.width||_.width,g,_.width),e.height=Math.max(e.height||_.height,f,_.height),e.margin=e.margin||_.c4ShapeMargin,a.insert(e),z.drawC4Shape(t,e,_)}a.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},y(Rt,"Point"),Rt),pe=y(function(a,t){let s=a.x,o=a.y,r=t.x,l=t.y,e=s+a.width/2,n=o+a.height/2,i=Math.abs(s-r),u=Math.abs(o-l),d=u/i,f=a.height/a.width,g=null;return o==l&&s<r?g=new Y(s+a.width,n):o==l&&s>r?g=new Y(s,n):s==r&&o<l?g=new Y(e,o+a.height):s==r&&o>l&&(g=new Y(e,o)),s>r&&o<l?f>=d?g=new Y(s,n+d*a.width/2):g=new Y(e-i/u*a.height/2,o+a.height):s<r&&o<l?f>=d?g=new Y(s+a.width,n+d*a.width/2):g=new Y(e+i/u*a.height/2,o+a.height):s<r&&o>l?f>=d?g=new Y(s+a.width,n-d*a.width/2):g=new Y(e+a.height/2*i/u,o):s>r&&o>l&&(f>=d?g=new Y(s,n-a.width/2*d):g=new Y(e-a.height/2*i/u,o)),g},"getIntersectPoint"),T0=y(function(a,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(a,s);s.x=a.x+a.width/2,s.y=a.y+a.height/2;let r=pe(t,s);return{startPoint:o,endPoint:r}},"getIntersectPoints"),O0=y(function(a,t,s,o,r){let l=0;for(let e of t){l=l+1;let n=e.wrap&&_.wrap,i=w0(_);o.db.getC4Type()==="C4Dynamic"&&(e.label.text=l+": "+e.label.text);let d=Tt(e.label.text,i);j("label",e,n,i,d),e.techn&&e.techn.text!==""&&(d=Tt(e.techn.text,i),j("techn",e,n,i,d)),e.descr&&e.descr.text!==""&&(d=Tt(e.descr.text,i),j("descr",e,n,i,d));let f=s(e.from),g=s(e.to),m=T0(f,g);e.startPoint=m.startPoint,e.endPoint=m.endPoint}z.drawRels(a,t,_,r)},"drawRels");function re(a,t,s,o,r){let l=new Ee(r);l.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[e,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,l.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,l.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,l.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(e==0||e%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;l.setData(O,O,S,S)}else{let O=l.data.stopx!==l.data.startx?l.data.stopx+_.diagramMarginX:l.data.startx,S=l.data.starty;l.setData(O,O,S,S)}l.name=n.alias;let f=r.db.getC4ShapeArray(n.alias),g=r.db.getC4ShapeKeys(n.alias);g.length>0&&ke(l,a,f,g),t=n.alias;let m=r.db.getBoundaries(t);m.length>0&&re(a,t,l,m,r),n.alias!=="global"&&Ae(a,n,l),s.data.stopy=Math.max(l.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(l.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}y(re,"drawInsideBoundary");var R0=y(function(a,t,s,o){_=Bt().c4;const r=Bt().securityLevel;let l;r==="sandbox"&&(l=jt("#i"+t));const e=r==="sandbox"?jt(l.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(_,null,2)}`);const i=r==="sandbox"?e.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i,t),z.insertDatabaseIcon(i,t),z.insertClockIcon(i,t);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundaries("");re(i,"",u,f,o),z.insertArrowHead(i,t),z.insertArrowEnd(i,t),z.insertArrowCrossHead(i,t),z.insertArrowFilledHead(i,t),O0(i,o.db.getRels(),o.db.getC4Shape,o,t),u.data.stopx=Xt,u.data.stopy=Wt;const g=u.data;let O=g.stopy-g.starty+2*_.diagramMarginY;const P=g.stopx-g.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(g.stopx-g.startx)/2-4*_.diagramMarginX).attr("y",g.starty+_.diagramMarginY),Le(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",g.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),de.debug("models:",g)},"draw"),ye={drawPersonOrSystemArray:ke,drawBoundary:Ae,setConf:ae,draw:R0},S0=y(a=>`.person {
|
|
7
|
+
stroke: ${a.personBorder};
|
|
8
|
+
fill: ${a.personBkg};
|
|
9
|
+
}
|
|
10
|
+
`,"getStyles"),D0=S0,M0={parser:Ue,db:te,renderer:ye,styles:D0,init:y(({c4:a,wrap:t})=>{ye.setConf(a),te.setWrap(t)},"init")};export{M0 as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as a,C as n}from"./mermaid.core-DuagT3S2.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a,F as w,aE as x}from"./mermaid.core-DuagT3S2.js";var g=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=B(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{g as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as l}from"./mermaid.core-DuagT3S2.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a,a$ as o}from"./mermaid.core-DuagT3S2.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
|