"use strict";exports.id=4715,exports.ids=[4715],exports.modules={20709:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(98059),e=c(36990);let f=(a,b)=>d.A.lang.round(e.A.parse(a)[b])},58736:(a,b,c)=>{c.d(b,{o:()=>d});var d=(0,c(98828).K2)(()=>`
  /* Font Awesome icon styling - consolidated */
  .label-icon {
    display: inline-block;
    height: 1em;
    overflow: visible;
    vertical-align: -0.125em;
  }
  
  .node .label-icon path {
    fill: currentColor;
    stroke: revert;
    stroke-width: revert;
  }
`,"getIconStyles")},78870:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(56473);let e=function(a){return(0,d.A)(a,4)}},94715:(a,b,c)=>{c.d(b,{diagram:()=>bj});var d=c(58736),e=c(74999),f=c(63040),g=c(56669),h=c(77147),i=c(30345),j=c(98828),k=c(78870),l=c(20709),m=c(92974),n=c(25826),o=c(70773),p=function(){var a=(0,j.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,15],c=[1,7],d=[1,13],e=[1,14],f=[1,19],g=[1,16],h=[1,17],i=[1,18],k=[8,30],l=[8,10,21,28,29,30,31,39,43,46],m=[1,23],n=[1,24],o=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],q=[1,49],r={trace:(0,j.K2)(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:(0,j.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 4:d.getLogger().debug("Rule: separator (NL) ");break;case 5:d.getLogger().debug("Rule: separator (Space) ");break;case 6:d.getLogger().debug("Rule: separator (EOF) ");break;case 7:d.getLogger().debug("Rule: hierarchy: ",f[h-1]),d.setHierarchy(f[h-1]);break;case 8:d.getLogger().debug("Stop NL ");break;case 9:d.getLogger().debug("Stop EOF ");break;case 10:d.getLogger().debug("Stop NL2 ");break;case 11:d.getLogger().debug("Stop EOF2 ");break;case 12:d.getLogger().debug("Rule: statement: ",f[h]),"number"==typeof f[h].length?this.$=f[h]:this.$=[f[h]];break;case 13:d.getLogger().debug("Rule: statement #2: ",f[h-1]),this.$=[f[h-1]].concat(f[h]);break;case 14:d.getLogger().debug("Rule: link: ",f[h],a),this.$={edgeTypeStr:f[h],label:""};break;case 15:d.getLogger().debug("Rule: LABEL link: ",f[h-3],f[h-1],f[h]),this.$={edgeTypeStr:f[h],label:f[h-1]};break;case 18:let i=parseInt(f[h]),j=d.generateId();this.$={id:j,type:"space",label:"",width:i,children:[]};break;case 23:d.getLogger().debug("Rule: (nodeStatement link node) ",f[h-2],f[h-1],f[h]," typestr: ",f[h-1].edgeTypeStr);let k=d.edgeStrToEdgeData(f[h-1].edgeTypeStr);this.$=[{id:f[h-2].id,label:f[h-2].label,type:f[h-2].type,directions:f[h-2].directions},{id:f[h-2].id+"-"+f[h].id,start:f[h-2].id,end:f[h].id,label:f[h-1].label,type:"edge",directions:f[h].directions,arrowTypeEnd:k,arrowTypeStart:"arrow_open"},{id:f[h].id,label:f[h].label,type:d.typeStr2Type(f[h].typeStr),directions:f[h].directions}];break;case 24:d.getLogger().debug("Rule: nodeStatement (abc88 node size) ",f[h-1],f[h]),this.$={id:f[h-1].id,label:f[h-1].label,type:d.typeStr2Type(f[h-1].typeStr),directions:f[h-1].directions,widthInColumns:parseInt(f[h],10)};break;case 25:d.getLogger().debug("Rule: nodeStatement (node) ",f[h]),this.$={id:f[h].id,label:f[h].label,type:d.typeStr2Type(f[h].typeStr),directions:f[h].directions,widthInColumns:1};break;case 26:d.getLogger().debug("APA123",this?this:"na"),d.getLogger().debug("COLUMNS: ",f[h]),this.$={type:"column-setting",columns:"auto"===f[h]?-1:parseInt(f[h])};break;case 27:d.getLogger().debug("Rule: id-block statement : ",f[h-2],f[h-1]),d.generateId(),this.$={...f[h-2],type:"composite",children:f[h-1]};break;case 28:d.getLogger().debug("Rule: blockStatement : ",f[h-2],f[h-1],f[h]);let l=d.generateId();this.$={id:l,type:"composite",label:"",children:f[h-1]};break;case 29:d.getLogger().debug("Rule: node (NODE_ID separator): ",f[h]),this.$={id:f[h]};break;case 30:d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",f[h-1],f[h]),this.$={id:f[h-1],label:f[h].label,typeStr:f[h].typeStr,directions:f[h].directions};break;case 31:d.getLogger().debug("Rule: dirList: ",f[h]),this.$=[f[h]];break;case 32:d.getLogger().debug("Rule: dirList: ",f[h-1],f[h]),this.$=[f[h-1]].concat(f[h]);break;case 33:d.getLogger().debug("Rule: nodeShapeNLabel: ",f[h-2],f[h-1],f[h]),this.$={typeStr:f[h-2]+f[h],label:f[h-1]};break;case 34:d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",f[h-3],f[h-2]," #3:",f[h-1],f[h]),this.$={typeStr:f[h-3]+f[h],label:f[h-2],directions:f[h-1]};break;case 35:case 36:this.$={type:"classDef",id:f[h-1].trim(),css:f[h].trim()};break;case 37:this.$={type:"applyClass",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 38:this.$={type:"applyStyles",id:f[h-1].trim(),stylesStr:f[h].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:b,11:3,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{8:[1,20]},a(k,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:b,21:c,28:d,29:e,31:f,39:g,43:h,46:i}),a(l,[2,16],{14:22,15:m,16:n}),a(l,[2,17]),a(l,[2,18]),a(l,[2,19]),a(l,[2,20]),a(l,[2,21]),a(l,[2,22]),a(o,[2,25],{27:[1,25]}),a(l,[2,26]),{19:26,26:12,31:f},{10:b,11:27,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},a(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},a(k,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},a(o,[2,24]),{10:b,11:37,13:4,14:22,15:m,16:n,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},a(p,[2,30]),{18:[1,43]},{18:[1,44]},a(o,[2,23]),{18:[1,45]},{30:[1,46]},a(l,[2,28]),a(l,[2,35]),a(l,[2,36]),a(l,[2,37]),a(l,[2,38]),{36:[1,47]},{33:48,34:q},{15:[1,50]},a(l,[2,27]),a(p,[2,33]),{38:[1,51]},{33:52,34:q,38:[2,31]},{31:[2,15]},a(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,j.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function s(){this.yy={}}return r.lexer={EOF:1,parseError:(0,j.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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:(0,j.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,j.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K2)(function(){return this._more=!0,this},"more"),reject:(0,j.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,j.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,j.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.K2)(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:(0,j.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,j.K2)(function(a,b,c,d){switch(c){case 0:return a.getLogger().debug("Found block-beta"),10;case 1:return a.getLogger().debug("Found id-block"),29;case 2:return a.getLogger().debug("Found block"),10;case 3:a.getLogger().debug(".",b.yytext);break;case 4:a.getLogger().debug("_",b.yytext);break;case 5:return 5;case 6:return b.yytext=-1,28;case 7:return b.yytext=b.yytext.replace(/columns\s+/,""),a.getLogger().debug("COLUMNS (LEX)",b.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:a.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 13:return a.getLogger().debug("LEX: STR end:",b.yytext),"STR";case 14:return b.yytext=b.yytext.replace(/space\:/,""),a.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;case 15:return b.yytext="1",a.getLogger().debug("COLUMNS (LEX)",b.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 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),a.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),a.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),a.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),a.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),a.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),a.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),a.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),a.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),a.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),a.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),a.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return a.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return a.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return a.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return a.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return a.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return a.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return a.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),a.getLogger().debug("LEX ARR START"),37;case 74:return a.getLogger().debug("Lex: NODE_ID",b.yytext),31;case 75:return a.getLogger().debug("Lex: EOF",b.yytext),8;case 78:return"NODE_DESCR";case 80:a.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:a.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return a.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";case 83:a.getLogger().debug("LEX POPPING"),this.popState();break;case 84:a.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (left):",b.yytext),"DIR";case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (x):",b.yytext),"DIR";case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (y):",b.yytext),"DIR";case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (up):",b.yytext),"DIR";case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (down):",b.yytext),"DIR";case 91:return b.yytext="]>",a.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 93:case 94:case 95:return a.getLogger().debug("Lex: LINK",b.yytext),15;case 96:case 97:case 98:return a.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 100:return a.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 102:case 103:return this.popState(),a.getLogger().debug("Lex: LINK",b.yytext),15;case 104:return a.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.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}}},(0,j.K2)(s,"Parser"),s.prototype=r,r.Parser=s,new s}();p.parser=p;var q=new Map,r=[],s=new Map,t="color",u="fill",v=(0,i.D7)(),w=new Map,x=(0,j.K2)(a=>i.Y2.sanitizeText(a,v),"sanitizeText"),y=(0,j.K2)(function(a,b=""){let c=w.get(a);c||(c={id:a,styles:[],textStyles:[]},w.set(a,c)),null!=b&&b.split(",").forEach(a=>{let b=a.replace(/([^;]*);/,"$1").trim();if(RegExp(t).exec(a)){let a=b.replace(u,"bgFill").replace(t,u);c.textStyles.push(a)}c.styles.push(b)})},"addStyleClass"),z=(0,j.K2)(function(a,b=""){let c=q.get(a);null!=b&&(c.styles=b.split(","))},"addStyle2Node"),A=(0,j.K2)(function(a,b){a.split(",").forEach(function(a){let c=q.get(a);if(void 0===c){let b=a.trim();c={id:b,type:"na",children:[]},q.set(b,c)}c.classes||(c.classes=[]),c.classes.push(b)})},"setCssClass"),B=(0,j.K2)((a,b)=>{let c=a.flat(),d=[],e=c.find(a=>a?.type==="column-setting"),f=e?.columns??-1;for(let a of c){if("number"==typeof f&&f>0&&"column-setting"!==a.type&&"number"==typeof a.widthInColumns&&a.widthInColumns>f&&j.Rm.warn(`Block ${a.id} width ${a.widthInColumns} exceeds configured column width ${f}`),a.label&&(a.label=x(a.label)),"classDef"===a.type){y(a.id,a.css);continue}if("applyClass"===a.type){A(a.id,a?.styleClass??"");continue}if("applyStyles"===a.type){a?.stylesStr&&z(a.id,a?.stylesStr);continue}if("column-setting"===a.type)b.columns=a.columns??-1;else if("edge"===a.type){let b=(s.get(a.id)??0)+1;s.set(a.id,b),a.id=b+"-"+a.id,r.push(a)}else{a.label||("composite"===a.type?a.label="":a.label=a.id);let b=q.get(a.id);if(void 0===b?q.set(a.id,a):("na"!==a.type&&(b.type=a.type),a.label!==a.id&&(b.label=a.label)),a.children&&B(a.children,a),"space"===a.type){let b=a.width??1;for(let c=0;c<b;c++){let b=(0,k.A)(a);b.id=b.id+"-"+c,q.set(b.id,b),d.push(b)}}else void 0===b&&d.push(a)}}b.children=d},"populateBlockDatabase"),C=[],D={id:"root",type:"composite",children:[],columns:-1},E=(0,j.K2)(()=>{j.Rm.debug("Clear called"),(0,i.IU)(),q=new Map([["root",D={id:"root",type:"composite",children:[],columns:-1}]]),C=[],w=new Map,r=[],s=new Map},"clear");function F(a){switch(j.Rm.debug("typeStr2Type",a),a){case"[]":return"square";case"()":return j.Rm.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"}}function G(a){return(j.Rm.debug("typeStr2Type",a),"=="===a)?"thick":"normal"}function H(a){switch(a.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,j.K2)(F,"typeStr2Type"),(0,j.K2)(G,"edgeTypeStr2Type"),(0,j.K2)(H,"edgeStrToEdgeData");var I=0,J=(0,j.K2)(()=>(I++,"id-"+Math.random().toString(36).substr(2,12)+"-"+I),"generateId"),K=(0,j.K2)(a=>{D.children=a,B(a,D),C=D.children},"setHierarchy"),L=(0,j.K2)(a=>{let b=q.get(a);return b?b.columns?b.columns:b.children?b.children.length:-1:-1},"getColumns"),M=(0,j.K2)(()=>[...q.values()],"getBlocksFlat"),N=(0,j.K2)(()=>C||[],"getBlocks"),O=(0,j.K2)(()=>r,"getEdges"),P=(0,j.K2)(a=>q.get(a),"getBlock"),Q=(0,j.K2)(a=>{q.set(a.id,a)},"setBlock"),R=(0,j.K2)(()=>j.Rm,"getLogger"),S=(0,j.K2)(function(){return w},"getClasses"),T={getConfig:(0,j.K2)(()=>(0,i.zj)().block,"getConfig"),typeStr2Type:F,edgeTypeStr2Type:G,edgeStrToEdgeData:H,getLogger:R,getBlocksFlat:M,getBlocks:N,getEdges:O,setHierarchy:K,getBlock:P,setBlock:Q,getColumns:L,getClasses:S,clear:E,generateId:J},U=(0,j.K2)((a,b)=>{let c=l.A,d=c(a,"r"),e=c(a,"g"),f=c(a,"b");return m.A(d,e,f,b)},"fade"),V=(0,j.K2)(a=>`.label {
    font-family: ${a.fontFamily};
    color: ${a.nodeTextColor||a.textColor};
  }
  .cluster-label text {
    fill: ${a.titleColor};
  }
  .cluster-label span,p {
    color: ${a.titleColor};
  }



  .label text,span,p {
    fill: ${a.nodeTextColor||a.textColor};
    color: ${a.nodeTextColor||a.textColor};
  }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${a.mainBkg};
    stroke: ${a.nodeBorder};
    stroke-width: 1px;
  }
  .flowchart-label text {
    text-anchor: middle;
  }
  // .flowchart-label .text-outer-tspan {
  //   text-anchor: middle;
  // }
  // .flowchart-label .text-inner-tspan {
  //   text-anchor: start;
  // }

  .node .label {
    text-align: center;
  }
  .node.clickable {
    cursor: pointer;
  }

  .arrowheadPath {
    fill: ${a.arrowheadColor};
  }

  .edgePath .path {
    stroke: ${a.lineColor};
    stroke-width: 2.0px;
  }

  .flowchart-link {
    stroke: ${a.lineColor};
    fill: none;
  }

  .edgeLabel {
    background-color: ${a.edgeLabelBackground};
    rect {
      opacity: 0.5;
      background-color: ${a.edgeLabelBackground};
      fill: ${a.edgeLabelBackground};
    }
    text-align: center;
  }

  /* For html labels only */
  .labelBkg {
    background-color: ${U(a.edgeLabelBackground,.5)};
    // background-color:
  }

  .node .cluster {
    // fill: ${U(a.mainBkg,.5)};
    fill: ${U(a.clusterBkg,.5)};
    stroke: ${U(a.clusterBorder,.2)};
    box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
    stroke-width: 1px;
  }

  .cluster text {
    fill: ${a.titleColor};
  }

  .cluster span,p {
    color: ${a.titleColor};
  }
  /* .cluster div {
    color: ${a.titleColor};
  } */

  div.mermaidTooltip {
    position: absolute;
    text-align: center;
    max-width: 200px;
    padding: 2px;
    font-family: ${a.fontFamily};
    font-size: 12px;
    background: ${a.tertiaryColor};
    border: 1px solid ${a.border2};
    border-radius: 2px;
    pointer-events: none;
    z-index: 100;
  }

  .flowchartTitleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${a.textColor};
  }
  ${(0,d.o)()}
`,"getStyles"),W=(0,j.K2)((a,b,c,d)=>{b.forEach(b=>{ac[b](a,c,d)})},"insertMarkers"),X=(0,j.K2)((a,b,c)=>{j.Rm.trace("Making markers for ",c),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionStart").attr("class","marker extension "+b).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"),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionEnd").attr("class","marker extension "+b).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"),Y=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionStart").attr("class","marker composition "+b).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"),a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionEnd").attr("class","marker composition "+b).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"),Z=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationStart").attr("class","marker aggregation "+b).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"),a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationEnd").attr("class","marker aggregation "+b).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"),$=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyStart").attr("class","marker dependency "+b).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"),a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyEnd").attr("class","marker dependency "+b).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"),_=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopStart").attr("class","marker lollipop "+b).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),a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopEnd").attr("class","marker lollipop "+b).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"),aa=(0,j.K2)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-pointEnd").attr("class","marker "+b).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"),a.append("marker").attr("id",c+"_"+b+"-pointStart").attr("class","marker "+b).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"),ab=(0,j.K2)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-circleEnd").attr("class","marker "+b).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"),a.append("marker").attr("id",c+"_"+b+"-circleStart").attr("class","marker "+b).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"),ac={extension:X,composition:Y,aggregation:Z,dependency:$,lollipop:_,point:aa,circle:ab,cross:(0,j.K2)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-crossEnd").attr("class","marker cross "+b).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"),a.append("marker").attr("id",c+"_"+b+"-crossStart").attr("class","marker cross "+b).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-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")},ad=(0,i.D7)()?.block?.padding??8;function ae(a,b){if(0===a||!Number.isInteger(a))throw Error("Columns must be an integer !== 0.");if(b<0||!Number.isInteger(b))throw Error("Position must be a non-negative integer."+b);return a<0?{px:b,py:0}:1===a?{px:0,py:b}:{px:b%a,py:Math.floor(b/a)}}(0,j.K2)(ae,"calculateBlockPosition");var af=(0,j.K2)(a=>{let b=0,c=0;for(let d of a.children){let{width:e,height:f,x:g,y:h}=d.size??{width:0,height:0,x:0,y:0};j.Rm.debug("getMaxChildSize abc95 child:",d.id,"width:",e,"height:",f,"x:",g,"y:",h,d.type),"space"!==d.type&&(e>b&&(b=e/(a.widthInColumns??1)),f>c&&(c=f))}return{width:b,height:c}},"getMaxChildSize");function ag(a,b,c=0,d=0){j.Rm.debug("setBlockSizes abc95 (start)",a.id,a?.size?.x,"block width =",a?.size,"siblingWidth",c),a?.size?.width||(a.size={width:c,height:d,x:0,y:0});let e=0,f=0;if(a.children?.length>0){for(let c of a.children)ag(c,b);let g=af(a);for(let b of(e=g.width,f=g.height,j.Rm.debug("setBlockSizes abc95 maxWidth of",a.id,":s children is ",e,f),a.children))b.size&&(j.Rm.debug(`abc95 Setting size of children of ${a.id} id=${b.id} ${e} ${f} ${JSON.stringify(b.size)}`),b.size.width=e*(b.widthInColumns??1)+ad*((b.widthInColumns??1)-1),b.size.height=f,b.size.x=0,b.size.y=0,j.Rm.debug(`abc95 updating size of ${a.id} children child:${b.id} maxWidth:${e} maxHeight:${f}`));for(let c of a.children)ag(c,b,e,f);let h=a.columns??-1,i=0;for(let b of a.children)i+=b.widthInColumns??1;let k=a.children.length;h>0&&h<i&&(k=h);let l=Math.ceil(i/k),m=k*(e+ad)+ad,n=l*(f+ad)+ad;if(m<c){j.Rm.debug(`Detected to small sibling: abc95 ${a.id} siblingWidth ${c} siblingHeight ${d} width ${m}`),m=c,n=d;let b=(c-k*ad-ad)/k,g=(d-l*ad-ad)/l;for(let c of(j.Rm.debug("Size indata abc88",a.id,"childWidth",b,"maxWidth",e),j.Rm.debug("Size indata abc88",a.id,"childHeight",g,"maxHeight",f),j.Rm.debug("Size indata abc88 xSize",k,"padding",ad),a.children))c.size&&(c.size.width=b,c.size.height=g,c.size.x=0,c.size.y=0)}if(j.Rm.debug(`abc95 (finale calc) ${a.id} xSize ${k} ySize ${l} columns ${h}${a.children.length} width=${Math.max(m,a.size?.width||0)}`),m<(a?.size?.width||0)){m=a?.size?.width||0;let b=h>0?Math.min(a.children.length,h):a.children.length;if(b>0){let c=(m-b*ad-ad)/b;for(let b of(j.Rm.debug("abc95 (growing to fit) width",a.id,m,a.size?.width,c),a.children))b.size&&(b.size.width=c)}}a.size={width:m,height:n,x:0,y:0}}j.Rm.debug("setBlockSizes abc94 (done)",a.id,a?.size?.x,a?.size?.width,a?.size?.y,a?.size?.height)}function ah(a,b){j.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`);let c=a.columns??-1;if(j.Rm.debug("layoutBlocks columns abc95",a.id,"=>",c,a),a.children&&a.children.length>0){let d=a?.children[0]?.size?.width??0,e=a.children.length*d+(a.children.length-1)*ad;j.Rm.debug("widthOfChildren 88",e,"posX");let f=0;j.Rm.debug("abc91 block?.size?.x",a.id,a?.size?.x);let g=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-ad,h=0;for(let d of a.children){if(!d.size)continue;let{width:e,height:i}=d.size,{px:k,py:l}=ae(c,f);if(l!=h&&(h=l,g=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-ad,j.Rm.debug("New row in layout for block",a.id," and child ",d.id,h)),j.Rm.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${f} (px, py) ${k},${l} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${e}${ad}`),a.size){let b=e/2;d.size.x=g+ad+b,j.Rm.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${g} new startingPosX${d.size.x} ${b} padding=${ad} width=${e} halfWidth=${b} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${e*(d?.widthInColumns??1)/2}`),g=d.size.x+b,d.size.y=a.size.y-a.size.height/2+l*(i+ad)+i/2+ad,j.Rm.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${g}${ad}${b}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${e*(d?.widthInColumns??1)/2}`)}d.children&&ah(d,b);let m=d?.widthInColumns??1;c>0&&(m=Math.min(m,c-f%c)),f+=m,j.Rm.debug("abc88 columnsPos",d,f)}}j.Rm.debug(`layout blocks (<==layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`)}function ai(a,{minX:b,minY:c,maxX:d,maxY:e}={minX:0,minY:0,maxX:0,maxY:0}){if(a.size&&"root"!==a.id){let{x:f,y:g,width:h,height:i}=a.size;f-h/2<b&&(b=f-h/2),g-i/2<c&&(c=g-i/2),f+h/2>d&&(d=f+h/2),g+i/2>e&&(e=g+i/2)}if(a.children)for(let f of a.children)({minX:b,minY:c,maxX:d,maxY:e}=ai(f,{minX:b,minY:c,maxX:d,maxY:e}));return{minX:b,minY:c,maxX:d,maxY:e}}function aj(a){let b=a.getBlock("root");if(!b)return;ag(b,a,0,0),ah(b,a),j.Rm.debug("getBlocks",JSON.stringify(b,null,2));let{minX:c,minY:d,maxX:e,maxY:f}=ai(b);return{x:c,y:d,width:e-c,height:f-d}}function ak(a,b){b&&a.attr("style",b)}function al(a,b){let c=(0,n.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),d=c.append("xhtml:div"),e=a.label,f=a.isNode?"nodeLabel":"edgeLabel",g=d.append("span");return g.html((0,i.jZ)(e,b)),ak(g,a.labelStyle),g.attr("class",f),ak(d,a.labelStyle),d.style("display","inline-block"),d.style("white-space","nowrap"),d.attr("xmlns","http://www.w3.org/1999/xhtml"),c.node()}(0,j.K2)(ag,"setBlockSizes"),(0,j.K2)(ah,"layoutBlocks"),(0,j.K2)(ai,"findBounds"),(0,j.K2)(aj,"layout"),(0,j.K2)(ak,"applyStyle"),(0,j.K2)(al,"addHtmlLabel");var am=(0,j.K2)(async(a,b,c,d)=>{let e=a||"";"object"==typeof e&&(e=e[0]);let f=(0,i.D7)();if((0,i._3)(f.flowchart.htmlLabels))return e=e.replace(/\\n|\n/g,"<br />"),j.Rm.debug("vertexText"+e),al({isNode:d,label:await (0,g.hE)((0,h.Sm)(e)),labelStyle:b.replace("fill:","color:")},f);{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",b.replace("color:","fill:"));for(let b of"string"==typeof e?e.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(e)?e:[]){let d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","0"),c?d.setAttribute("class","title-row"):d.setAttribute("class","row"),d.textContent=b.trim(),a.appendChild(d)}return a}},"createLabel"),an=(0,j.K2)((a,b,c,d,e)=>{b.arrowTypeStart&&ap(a,"start",b.arrowTypeStart,c,d,e),b.arrowTypeEnd&&ap(a,"end",b.arrowTypeEnd,c,d,e)},"addEdgeMarkers"),ao={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ap=(0,j.K2)((a,b,c,d,e,f)=>{let g=ao[c];g?a.attr(`marker-${b}`,`url(${d}#${e}_${f}-${g}${"start"===b?"Start":"End"})`):j.Rm.warn(`Unknown arrow type: ${c}`)},"addEdgeMarker"),aq={},ar={},as=(0,j.K2)(async(a,b)=>{let c,d=(0,i.D7)(),e=(0,i._3)(d.flowchart.htmlLabels),f="markdown"===b.labelType?(0,g.GZ)(a,b.label,{style:b.labelStyle,useHtmlLabels:e,addSvgBackground:!0},d):await am(b.label,b.labelStyle),h=a.insert("g").attr("class","edgeLabel"),j=h.insert("g").attr("class","label");j.node().appendChild(f);let k=f.getBBox();if(e){let a=f.children[0],b=(0,n.Ltv)(f);k=a.getBoundingClientRect(),b.attr("width",k.width),b.attr("height",k.height)}if(j.attr("transform","translate("+-k.width/2+", "+-k.height/2+")"),aq[b.id]=h,b.width=k.width,b.height=k.height,b.startLabelLeft){let d=await am(b.startLabelLeft,b.labelStyle),e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner");c=f.node().appendChild(d);let g=d.getBBox();f.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),ar[b.id]||(ar[b.id]={}),ar[b.id].startLeft=e,at(c,b.startLabelLeft)}if(b.startLabelRight){let d=await am(b.startLabelRight,b.labelStyle),e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner");c=e.node().appendChild(d),f.node().appendChild(d);let g=d.getBBox();f.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),ar[b.id]||(ar[b.id]={}),ar[b.id].startRight=e,at(c,b.startLabelRight)}if(b.endLabelLeft){let d=await am(b.endLabelLeft,b.labelStyle),e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner");c=f.node().appendChild(d);let g=d.getBBox();f.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),e.node().appendChild(d),ar[b.id]||(ar[b.id]={}),ar[b.id].endLeft=e,at(c,b.endLabelLeft)}if(b.endLabelRight){let d=await am(b.endLabelRight,b.labelStyle),e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner");c=f.node().appendChild(d);let g=d.getBBox();f.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),e.node().appendChild(d),ar[b.id]||(ar[b.id]={}),ar[b.id].endRight=e,at(c,b.endLabelRight)}return f},"insertEdgeLabel");function at(a,b){(0,i.D7)().flowchart.htmlLabels&&a&&(a.style.width=9*b.length+"px",a.style.height="12px")}(0,j.K2)(at,"setTerminalWidth");var au=(0,j.K2)((a,b)=>{j.Rm.debug("Moving label abc88 ",a.id,a.label,aq[a.id],b);let c=b.updatedPath?b.updatedPath:b.originalPath,d=(0,i.D7)(),{subGraphTitleTotalMargin:e}=(0,f.O)(d);if(a.label){let d=aq[a.id],f=a.x,g=a.y;if(c){let d=h._K.calcLabelPosition(c);j.Rm.debug("Moving label "+a.label+" from (",f,",",g,") to (",d.x,",",d.y,") abc88"),b.updatedPath&&(f=d.x,g=d.y)}d.attr("transform",`translate(${f}, ${g+e/2})`)}if(a.startLabelLeft){let b=ar[a.id].startLeft,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.startLabelRight){let b=ar[a.id].startRight,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelLeft){let b=ar[a.id].endLeft,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelRight){let b=ar[a.id].endRight,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}},"positionEdgeLabel"),av=(0,j.K2)((a,b)=>{let c=a.x,d=a.y,e=Math.abs(b.x-c),f=Math.abs(b.y-d),g=a.width/2,h=a.height/2;return!!(e>=g)||!!(f>=h)},"outsideNode"),aw=(0,j.K2)((a,b,c)=>{j.Rm.debug(`intersection calc abc89:
  outsidePoint: ${JSON.stringify(b)}
  insidePoint : ${JSON.stringify(c)}
  node        : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);let d=a.x,e=a.y,f=Math.abs(d-c.x),g=a.width/2,h=c.x<b.x?g-f:g+f,i=a.height/2,k=Math.abs(b.y-c.y),l=Math.abs(b.x-c.x);if(Math.abs(e-b.y)*g>Math.abs(d-b.x)*i){let a=c.y<b.y?b.y-i-e:e-i-b.y;h=l*a/k;let d={x:c.x<b.x?c.x+h:c.x-l+h,y:c.y<b.y?c.y+k-a:c.y-k+a};return 0===h&&(d.x=b.x,d.y=b.y),0===l&&(d.x=b.x),0===k&&(d.y=b.y),j.Rm.debug(`abc89 topp/bott calc, Q ${k}, q ${a}, R ${l}, r ${h}`,d),d}{let a=k*(h=c.x<b.x?b.x-g-d:d-g-b.x)/l,e=c.x<b.x?c.x+l-h:c.x-l+h,f=c.y<b.y?c.y+a:c.y-a;return j.Rm.debug(`sides calc abc89, Q ${k}, q ${a}, R ${l}, r ${h}`,{_x:e,_y:f}),0===h&&(e=b.x,f=b.y),0===l&&(e=b.x),0===k&&(f=b.y),{x:e,y:f}}},"intersection"),ax=(0,j.K2)((a,b)=>{j.Rm.debug("abc88 cutPathAtIntersect",a,b);let c=[],d=a[0],e=!1;return a.forEach(a=>{if(av(b,a)||e)d=a,e||c.push(a);else{let f=aw(b,d,a),g=!1;c.forEach(a=>{g=g||a.x===f.x&&a.y===f.y}),c.some(a=>a.x===f.x&&a.y===f.y)||c.push(f),e=!0}}),c},"cutPathAtIntersect"),ay=(0,j.K2)(function(a,b,c,d,f,g,h){let k,l=c.points;j.Rm.debug("abc88 InsertEdge: edge=",c,"e=",b);let m=!1,o=g.node(b.v);var p=g.node(b.w);p?.intersect&&o?.intersect&&((l=l.slice(1,c.points.length-1)).unshift(o.intersect(l[0])),l.push(p.intersect(l[l.length-1]))),c.toCluster&&(j.Rm.debug("to cluster abc88",d[c.toCluster]),l=ax(c.points,d[c.toCluster].node),m=!0),c.fromCluster&&(j.Rm.debug("from cluster abc88",d[c.fromCluster]),l=ax(l.reverse(),d[c.fromCluster].node).reverse(),m=!0);let q=l.filter(a=>!Number.isNaN(a.y)),r=n.qrM;c.curve&&("graph"===f||"flowchart"===f)&&(r=c.curve);let{x:s,y:t}=(0,e.RI)(c),u=(0,n.n8j)().x(s).y(t).curve(r);switch(c.thickness){case"normal":k="edge-thickness-normal";break;case"thick":case"invisible":k="edge-thickness-thick";break;default:k=""}switch(c.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed"}let v=a.append("path").attr("d",u(q)).attr("id",c.id).attr("class"," "+k+(c.classes?" "+c.classes:"")).attr("style",c.style),w="";((0,i.D7)().flowchart.arrowMarkerAbsolute||(0,i.D7)().state.arrowMarkerAbsolute)&&(w=(0,i.ID)(!0)),an(v,c,w,h,f);let x={};return m&&(x.updatedPath=l),x.originalPath=c.points,x},"insertEdge"),az=(0,j.K2)(a=>{let b=new Set;for(let c of a)switch(c){case"x":b.add("right"),b.add("left");break;case"y":b.add("up"),b.add("down");break;default:b.add(c)}return b},"expandAndDeduplicateDirections"),aA=(0,j.K2)((a,b,c)=>{let d=az(a),e=b.height+2*c.padding,f=e/2,g=b.width+2*f+c.padding,h=c.padding/2;return d.has("right")&&d.has("left")&&d.has("up")&&d.has("down")?[{x:0,y:0},{x:f,y:0},{x:g/2,y:2*h},{x:g-f,y:0},{x:g,y:0},{x:g,y:-e/3},{x:g+2*h,y:-e/2},{x:g,y:-2*e/3},{x:g,y:-e},{x:g-f,y:-e},{x:g/2,y:-e-2*h},{x:f,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*h,y:-e/2},{x:0,y:-e/3}]:d.has("right")&&d.has("left")&&d.has("up")?[{x:f,y:0},{x:g-f,y:0},{x:g,y:-e/2},{x:g-f,y:-e},{x:f,y:-e},{x:0,y:-e/2}]:d.has("right")&&d.has("left")&&d.has("down")?[{x:0,y:0},{x:f,y:-e},{x:g-f,y:-e},{x:g,y:0}]:d.has("right")&&d.has("up")&&d.has("down")?[{x:0,y:0},{x:g,y:-f},{x:g,y:-e+f},{x:0,y:-e}]:d.has("left")&&d.has("up")&&d.has("down")?[{x:g,y:0},{x:0,y:-f},{x:0,y:-e+f},{x:g,y:-e}]:d.has("right")&&d.has("left")?[{x:f,y:0},{x:f,y:-h},{x:g-f,y:-h},{x:g-f,y:0},{x:g,y:-e/2},{x:g-f,y:-e},{x:g-f,y:-e+h},{x:f,y:-e+h},{x:f,y:-e},{x:0,y:-e/2}]:d.has("up")&&d.has("down")?[{x:g/2,y:0},{x:0,y:-h},{x:f,y:-h},{x:f,y:-e+h},{x:0,y:-e+h},{x:g/2,y:-e},{x:g,y:-e+h},{x:g-f,y:-e+h},{x:g-f,y:-h},{x:g,y:-h}]:d.has("right")&&d.has("up")?[{x:0,y:0},{x:g,y:-f},{x:0,y:-e}]:d.has("right")&&d.has("down")?[{x:0,y:0},{x:g,y:0},{x:0,y:-e}]:d.has("left")&&d.has("up")?[{x:g,y:0},{x:0,y:-f},{x:g,y:-e}]:d.has("left")&&d.has("down")?[{x:g,y:0},{x:0,y:0},{x:g,y:-e}]:d.has("right")?[{x:f,y:-h},{x:f,y:-h},{x:g-f,y:-h},{x:g-f,y:0},{x:g,y:-e/2},{x:g-f,y:-e},{x:g-f,y:-e+h},{x:f,y:-e+h},{x:f,y:-e+h}]:d.has("left")?[{x:f,y:0},{x:f,y:-h},{x:g-f,y:-h},{x:g-f,y:-e+h},{x:f,y:-e+h},{x:f,y:-e},{x:0,y:-e/2}]:d.has("up")?[{x:f,y:-h},{x:f,y:-e+h},{x:0,y:-e+h},{x:g/2,y:-e},{x:g,y:-e+h},{x:g-f,y:-e+h},{x:g-f,y:-h}]:d.has("down")?[{x:g/2,y:0},{x:0,y:-h},{x:f,y:-h},{x:f,y:-e+h},{x:g-f,y:-e+h},{x:g-f,y:-h},{x:g,y:-h}]:[{x:0,y:0}]},"getArrowPoints");function aB(a,b,c,d){var e=a.x,f=a.y,g=e-d.x,h=f-d.y,i=Math.sqrt(b*b*h*h+c*c*g*g),j=Math.abs(b*c*g/i);d.x<e&&(j=-j);var k=Math.abs(b*c*h/i);return d.y<f&&(k=-k),{x:e+j,y:f+k}}function aC(a,b,c){return aB(a,b,b,c)}function aD(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;if(e=b.y-a.y,g=a.x-b.x,i=b.x*a.y-a.x*b.y,m=e*c.x+g*c.y+i,n=e*d.x+g*d.y+i,!(0!==m&&0!==n&&aE(m,n))){if((f=d.y-c.y,h=c.x-d.x,j=d.x*c.y-c.x*d.y,k=f*a.x+h*a.y+j,l=f*b.x+h*b.y+j,!(0!==k&&0!==l&&aE(k,l)))&&0!=(o=e*h-f*g))return p=Math.abs(o/2),{x:(q=g*j-h*i)<0?(q-p)/o:(q+p)/o,y:(q=f*i-e*j)<0?(q-p)/o:(q+p)/o}}}function aE(a,b){return a*b>0}function aF(a,b,c){var d=a.x,e=a.y,f=[],g=1/0,h=1/0;"function"==typeof b.forEach?b.forEach(function(a){g=Math.min(g,a.x),h=Math.min(h,a.y)}):(g=Math.min(g,b.x),h=Math.min(h,b.y));for(var i=d-a.width/2-g,j=e-a.height/2-h,k=0;k<b.length;k++){var l=b[k],m=b[k<b.length-1?k+1:0],n=aD(a,c,{x:i+l.x,y:j+l.y},{x:i+m.x,y:j+m.y});n&&f.push(n)}return f.length?(f.length>1&&f.sort(function(a,b){var d=a.x-c.x,e=a.y-c.y,f=Math.sqrt(d*d+e*e),g=b.x-c.x,h=b.y-c.y,i=Math.sqrt(g*g+h*h);return f<i?-1:+(f!==i)}),f[0]):a}(0,j.K2)(function(a,b){return a.intersect(b)},"intersectNode"),(0,j.K2)(aB,"intersectEllipse"),(0,j.K2)(aC,"intersectCircle"),(0,j.K2)(aD,"intersectLine"),(0,j.K2)(aE,"sameSign"),(0,j.K2)(aF,"intersectPolygon");var aG=(0,j.K2)((a,b)=>{var c,d,e=a.x,f=a.y,g=b.x-e,h=b.y-f,i=a.width/2,j=a.height/2;return Math.abs(h)*i>Math.abs(g)*j?(h<0&&(j=-j),c=0===h?0:j*g/h,d=j):(g<0&&(i=-i),c=i,d=0===g?0:i*h/g),{x:e+c,y:f+d}},"intersectRect"),aH=(0,j.K2)(async(a,b,c,d)=>{let e,f,k=(0,i.D7)(),l=b.useHtmlLabels||(0,i._3)(k.flowchart.htmlLabels),m=a.insert("g").attr("class",c||"node default").attr("id",b.domId||b.id),o=m.insert("g").attr("class","label").attr("style",b.labelStyle);e=void 0===b.labelText?"":"string"==typeof b.labelText?b.labelText:b.labelText[0];let p=o.node(),q=(f="markdown"===b.labelType?(0,g.GZ)(o,(0,i.jZ)((0,h.Sm)(e),k),{useHtmlLabels:l,width:b.width||k.flowchart.wrappingWidth,classes:"markdown-node-label"},k):p.appendChild(await am((0,i.jZ)((0,h.Sm)(e),k),b.labelStyle,!1,d))).getBBox(),r=b.padding/2;if((0,i._3)(k.flowchart.htmlLabels)){let a=f.children[0],b=(0,n.Ltv)(f),c=a.getElementsByTagName("img");if(c){let a=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...c].map(b=>new Promise(c=>{function d(){if(b.style.display="flex",b.style.flexDirection="column",a){let a=5*parseInt(k.fontSize?k.fontSize:window.getComputedStyle(document.body).fontSize,10)+"px";b.style.minWidth=a,b.style.maxWidth=a}else b.style.width="100%";c(b)}(0,j.K2)(d,"setupImage"),setTimeout(()=>{b.complete&&d()}),b.addEventListener("error",d),b.addEventListener("load",d)})))}q=a.getBoundingClientRect(),b.attr("width",q.width),b.attr("height",q.height)}return l?o.attr("transform","translate("+-q.width/2+", "+-q.height/2+")"):o.attr("transform","translate(0, "+-q.height/2+")"),b.centerLabel&&o.attr("transform","translate("+-q.width/2+", "+-q.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:m,bbox:q,halfPadding:r,label:o}},"labelHelper"),aI=(0,j.K2)((a,b)=>{let c=b.node().getBBox();a.width=c.width,a.height=c.height},"updateNodeBounds");function aJ(a,b,c,d){return a.insert("polygon",":first-child").attr("points",d.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-b/2+","+c/2+")")}(0,j.K2)(aJ,"insertPolygonShape");var aK=(0,j.K2)(async(a,b)=>{b.useHtmlLabels||(0,i.D7)().flowchart.htmlLabels||(b.centerLabel=!0);let{shapeSvg:c,bbox:d,halfPadding:e}=await aH(a,b,"node "+b.classes,!0);j.Rm.info("Classes = ",b.classes);let f=c.insert("rect",":first-child");return f.attr("rx",b.rx).attr("ry",b.ry).attr("x",-d.width/2-e).attr("y",-d.height/2-e).attr("width",d.width+b.padding).attr("height",d.height+b.padding),aI(b,f),b.intersect=function(a){return aG(b,a)},c},"note"),aL=(0,j.K2)(a=>a?" "+a:"","formatClass"),aM=(0,j.K2)((a,b)=>`${b||"node default"}${aL(a.classes)} ${aL(a.class)}`,"getClassesFromNode"),aN=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding+(d.height+b.padding),f=[{x:e/2,y:0},{x:e,y:-e/2},{x:e/2,y:-e},{x:0,y:-e/2}];j.Rm.info("Question main (Circle)");let g=aJ(c,e,e,f);return g.attr("style",b.style),aI(b,g),b.intersect=function(a){return j.Rm.warn("Intersect called"),aF(b,f,a)},c},"question"),aO=(0,j.K2)((a,b)=>{let c=a.insert("g").attr("class","node default").attr("id",b.domId||b.id);return c.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),b.width=28,b.height=28,b.intersect=function(a){return aC(b,14,a)},c},"choice"),aP=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.height+b.padding,f=e/4,g=d.width+2*f+b.padding,h=[{x:f,y:0},{x:g-f,y:0},{x:g,y:-e/2},{x:g-f,y:-e},{x:f,y:-e},{x:0,y:-e/2}],i=aJ(c,g,e,h);return i.attr("style",b.style),aI(b,i),b.intersect=function(a){return aF(b,h,a)},c},"hexagon"),aQ=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,void 0,!0),e=d.height+2*b.padding,f=e/2,g=d.width+2*f+b.padding,h=aA(b.directions,d,b),i=aJ(c,g,e,h);return i.attr("style",b.style),aI(b,i),b.intersect=function(a){return aF(b,h,a)},c},"block_arrow"),aR=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:-f/2,y:0},{x:e,y:0},{x:e,y:-f},{x:-f/2,y:-f},{x:0,y:-f/2}];return aJ(c,e,f,g).attr("style",b.style),b.width=e+f,b.height=f,b.intersect=function(a){return aF(b,g,a)},c},"rect_left_inv_arrow"),aS=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:-2*f/6,y:0},{x:e-f/6,y:0},{x:e+2*f/6,y:-f},{x:f/6,y:-f}],h=aJ(c,e,f,g);return h.attr("style",b.style),aI(b,h),b.intersect=function(a){return aF(b,g,a)},c},"lean_right"),aT=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:2*f/6,y:0},{x:e+f/6,y:0},{x:e-2*f/6,y:-f},{x:-f/6,y:-f}],h=aJ(c,e,f,g);return h.attr("style",b.style),aI(b,h),b.intersect=function(a){return aF(b,g,a)},c},"lean_left"),aU=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:-2*f/6,y:0},{x:e+2*f/6,y:0},{x:e-f/6,y:-f},{x:f/6,y:-f}],h=aJ(c,e,f,g);return h.attr("style",b.style),aI(b,h),b.intersect=function(a){return aF(b,g,a)},c},"trapezoid"),aV=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:f/6,y:0},{x:e-f/6,y:0},{x:e+2*f/6,y:-f},{x:-2*f/6,y:-f}],h=aJ(c,e,f,g);return h.attr("style",b.style),aI(b,h),b.intersect=function(a){return aF(b,g,a)},c},"inv_trapezoid"),aW=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:0,y:0},{x:e+f/2,y:0},{x:e,y:-f/2},{x:e+f/2,y:-f},{x:0,y:-f}],h=aJ(c,e,f,g);return h.attr("style",b.style),aI(b,h),b.intersect=function(a){return aF(b,g,a)},c},"rect_right_inv_arrow"),aX=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=e/2,g=f/(2.5+e/50),h=d.height+g+b.padding,i="M 0,"+g+" a "+f+","+g+" 0,0,0 "+e+" 0 a "+f+","+g+" 0,0,0 "+-e+" 0 l 0,"+h+" a "+f+","+g+" 0,0,0 "+e+" 0 l 0,"+-h,j=c.attr("label-offset-y",g).insert("path",":first-child").attr("style",b.style).attr("d",i).attr("transform","translate("+-e/2+","+-(h/2+g)+")");return aI(b,j),b.intersect=function(a){let c=aG(b,a),d=c.x-b.x;if(0!=f&&(Math.abs(d)<b.width/2||Math.abs(d)==b.width/2&&Math.abs(c.y-b.y)>b.height/2-g)){let e=g*g*(1-d*d/(f*f));0!=e&&(e=Math.sqrt(e)),e=g-e,a.y-b.y>0&&(e=-e),c.y+=e}return c},c},"cylinder"),aY=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aH(a,b,"node "+b.classes+" "+b.class,!0),f=c.insert("rect",":first-child"),g=b.positioned?b.width:d.width+b.padding,h=b.positioned?b.height:d.height+b.padding,i=b.positioned?-g/2:-d.width/2-e,k=b.positioned?-h/2:-d.height/2-e;if(f.attr("class","basic label-container").attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("x",i).attr("y",k).attr("width",g).attr("height",h),b.props){let a=new Set(Object.keys(b.props));b.props.borders&&(a_(f,b.props.borders,g,h),a.delete("borders")),a.forEach(a=>{j.Rm.warn(`Unknown node property ${a}`)})}return aI(b,f),b.intersect=function(a){return aG(b,a)},c},"rect"),aZ=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aH(a,b,"node "+b.classes,!0),f=c.insert("rect",":first-child"),g=b.positioned?b.width:d.width+b.padding,h=b.positioned?b.height:d.height+b.padding,i=b.positioned?-g/2:-d.width/2-e,k=b.positioned?-h/2:-d.height/2-e;if(f.attr("class","basic cluster composite label-container").attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("x",i).attr("y",k).attr("width",g).attr("height",h),b.props){let a=new Set(Object.keys(b.props));b.props.borders&&(a_(f,b.props.borders,g,h),a.delete("borders")),a.forEach(a=>{j.Rm.warn(`Unknown node property ${a}`)})}return aI(b,f),b.intersect=function(a){return aG(b,a)},c},"composite"),a$=(0,j.K2)(async(a,b)=>{let{shapeSvg:c}=await aH(a,b,"label",!0);j.Rm.trace("Classes = ",b.class);let d=c.insert("rect",":first-child");if(d.attr("width",0).attr("height",0),c.attr("class","label edgeLabel"),b.props){let a=new Set(Object.keys(b.props));b.props.borders&&(a_(d,b.props.borders,0,0),a.delete("borders")),a.forEach(a=>{j.Rm.warn(`Unknown node property ${a}`)})}return aI(b,d),b.intersect=function(a){return aG(b,a)},c},"labelRect");function a_(a,b,c,d){let e=[],f=(0,j.K2)(a=>{e.push(a,0)},"addBorder"),g=(0,j.K2)(a=>{e.push(0,a)},"skipBorder");b.includes("t")?(j.Rm.debug("add top border"),f(c)):g(c),b.includes("r")?(j.Rm.debug("add right border"),f(d)):g(d),b.includes("b")?(j.Rm.debug("add bottom border"),f(c)):g(c),b.includes("l")?(j.Rm.debug("add left border"),f(d)):g(d),a.attr("stroke-dasharray",e.join(" "))}(0,j.K2)(a_,"applyNodePropertyBorders");var a0=(0,j.K2)(async(a,b)=>{let c;c=b.classes?"node "+b.classes:"node default";let d=a.insert("g").attr("class",c).attr("id",b.domId||b.id),e=d.insert("rect",":first-child"),f=d.insert("line"),g=d.insert("g").attr("class","label"),h=b.labelText.flat?b.labelText.flat():b.labelText,k="";k="object"==typeof h?h[0]:h,j.Rm.info("Label text abc79",k,h,"object"==typeof h);let l=g.node().appendChild(await am(k,b.labelStyle,!0,!0)),m={width:0,height:0};if((0,i._3)((0,i.D7)().flowchart.htmlLabels)){let a=l.children[0],b=(0,n.Ltv)(l);m=a.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}j.Rm.info("Text 2",h);let o=h.slice(1,h.length),p=l.getBBox(),q=g.node().appendChild(await am(o.join?o.join("<br/>"):o,b.labelStyle,!0,!0));if((0,i._3)((0,i.D7)().flowchart.htmlLabels)){let a=q.children[0],b=(0,n.Ltv)(q);m=a.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}let r=b.padding/2;return(0,n.Ltv)(q).attr("transform","translate( "+(m.width>p.width?0:(p.width-m.width)/2)+", "+(p.height+r+5)+")"),(0,n.Ltv)(l).attr("transform","translate( "+(m.width<p.width?0:-(p.width-m.width)/2)+", 0)"),m=g.node().getBBox(),g.attr("transform","translate("+-m.width/2+", "+(-m.height/2-r+3)+")"),e.attr("class","outer title-state").attr("x",-m.width/2-r).attr("y",-m.height/2-r).attr("width",m.width+b.padding).attr("height",m.height+b.padding),f.attr("class","divider").attr("x1",-m.width/2-r).attr("x2",m.width/2+r).attr("y1",-m.height/2-r+p.height+r).attr("y2",-m.height/2-r+p.height+r),aI(b,e),b.intersect=function(a){return aG(b,a)},d},"rectWithTitle"),a1=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.height+b.padding,f=d.width+e/4+b.padding,g=c.insert("rect",":first-child").attr("style",b.style).attr("rx",e/2).attr("ry",e/2).attr("x",-f/2).attr("y",-e/2).attr("width",f).attr("height",e);return aI(b,g),b.intersect=function(a){return aG(b,a)},c},"stadium"),a2=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aH(a,b,aM(b,void 0),!0),f=c.insert("circle",":first-child");return f.attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("r",d.width/2+e).attr("width",d.width+b.padding).attr("height",d.height+b.padding),j.Rm.info("Circle main"),aI(b,f),b.intersect=function(a){return j.Rm.info("Circle intersect",b,d.width/2+e,a),aC(b,d.width/2+e,a)},c},"circle"),a3=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aH(a,b,aM(b,void 0),!0),f=c.insert("g",":first-child"),g=f.insert("circle"),h=f.insert("circle");return f.attr("class",b.class),g.attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("r",d.width/2+e+5).attr("width",d.width+b.padding+10).attr("height",d.height+b.padding+10),h.attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("r",d.width/2+e).attr("width",d.width+b.padding).attr("height",d.height+b.padding),j.Rm.info("DoubleCircle main"),aI(b,g),b.intersect=function(a){return j.Rm.info("DoubleCircle intersect",b,d.width/2+e+5,a),aC(b,d.width/2+e+5,a)},c},"doublecircle"),a4=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aH(a,b,aM(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:0,y:0},{x:e,y:0},{x:e,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:e+8,y:0},{x:e+8,y:-f},{x:-8,y:-f},{x:-8,y:0}],h=aJ(c,e,f,g);return h.attr("style",b.style),aI(b,h),b.intersect=function(a){return aF(b,g,a)},c},"subroutine"),a5=(0,j.K2)((a,b)=>{let c=a.insert("g").attr("class","node default").attr("id",b.domId||b.id),d=c.insert("circle",":first-child");return d.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),aI(b,d),b.intersect=function(a){return aC(b,7,a)},c},"start"),a6=(0,j.K2)((a,b,c)=>{let d=a.insert("g").attr("class","node default").attr("id",b.domId||b.id),e=70,f=10;return"LR"===c&&(e=10,f=70),aI(b,d.append("rect").attr("x",-1*e/2).attr("y",-1*f/2).attr("width",e).attr("height",f).attr("class","fork-join")),b.height=b.height+b.padding/2,b.width=b.width+b.padding/2,b.intersect=function(a){return aG(b,a)},d},"forkJoin"),a7={rhombus:aN,composite:aZ,question:aN,rect:aY,labelRect:a$,rectWithTitle:a0,choice:aO,circle:a2,doublecircle:a3,stadium:a1,hexagon:aP,block_arrow:aQ,rect_left_inv_arrow:aR,lean_right:aS,lean_left:aT,trapezoid:aU,inv_trapezoid:aV,rect_right_inv_arrow:aW,cylinder:aX,start:a5,end:(0,j.K2)((a,b)=>{let c=a.insert("g").attr("class","node default").attr("id",b.domId||b.id),d=c.insert("circle",":first-child"),e=c.insert("circle",":first-child");return e.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),d.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),aI(b,e),b.intersect=function(a){return aC(b,7,a)},c},"end"),note:aK,subroutine:a4,fork:a6,join:a6,class_box:(0,j.K2)(async(a,b)=>{let c,d=b.padding/2;c=b.classes?"node "+b.classes:"node default";let e=a.insert("g").attr("class",c).attr("id",b.domId||b.id),f=e.insert("rect",":first-child"),g=e.insert("line"),h=e.insert("line"),j=0,k=4,l=e.insert("g").attr("class","label"),m=0,o=b.classData.annotations?.[0],p=b.classData.annotations[0]?"\xab"+b.classData.annotations[0]+"\xbb":"",q=l.node().appendChild(await am(p,b.labelStyle,!0,!0)),r=q.getBBox();if((0,i._3)((0,i.D7)().flowchart.htmlLabels)){let a=q.children[0],b=(0,n.Ltv)(q);r=a.getBoundingClientRect(),b.attr("width",r.width),b.attr("height",r.height)}b.classData.annotations[0]&&(k+=r.height+4,j+=r.width);let s=b.classData.label;void 0!==b.classData.type&&""!==b.classData.type&&((0,i.D7)().flowchart.htmlLabels?s+="&lt;"+b.classData.type+"&gt;":s+="<"+b.classData.type+">");let t=l.node().appendChild(await am(s,b.labelStyle,!0,!0));(0,n.Ltv)(t).attr("class","classTitle");let u=t.getBBox();if((0,i._3)((0,i.D7)().flowchart.htmlLabels)){let a=t.children[0],b=(0,n.Ltv)(t);u=a.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height)}k+=u.height+4,u.width>j&&(j=u.width);let v=[];b.classData.members.forEach(async a=>{let c=a.getDisplayDetails(),d=c.displayText;(0,i.D7)().flowchart.htmlLabels&&(d=d.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let e=l.node().appendChild(await am(d,c.cssStyle?c.cssStyle:b.labelStyle,!0,!0)),f=e.getBBox();if((0,i._3)((0,i.D7)().flowchart.htmlLabels)){let a=e.children[0],b=(0,n.Ltv)(e);f=a.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}f.width>j&&(j=f.width),k+=f.height+4,v.push(e)}),k+=8;let w=[];if(b.classData.methods.forEach(async a=>{let c=a.getDisplayDetails(),d=c.displayText;(0,i.D7)().flowchart.htmlLabels&&(d=d.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let e=l.node().appendChild(await am(d,c.cssStyle?c.cssStyle:b.labelStyle,!0,!0)),f=e.getBBox();if((0,i._3)((0,i.D7)().flowchart.htmlLabels)){let a=e.children[0],b=(0,n.Ltv)(e);f=a.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}f.width>j&&(j=f.width),k+=f.height+4,w.push(e)}),k+=8,o){let a=(j-r.width)/2;(0,n.Ltv)(q).attr("transform","translate( "+(-1*j/2+a)+", "+-1*k/2+")"),m=r.height+4}let x=(j-u.width)/2;return(0,n.Ltv)(t).attr("transform","translate( "+(-1*j/2+x)+", "+(-1*k/2+m)+")"),m+=u.height+4,g.attr("class","divider").attr("x1",-j/2-d).attr("x2",j/2+d).attr("y1",-k/2-d+8+m).attr("y2",-k/2-d+8+m),m+=8,v.forEach(a=>{(0,n.Ltv)(a).attr("transform","translate( "+-j/2+", "+(-1*k/2+m+4)+")");let b=a?.getBBox();m+=(b?.height??0)+4}),m+=8,h.attr("class","divider").attr("x1",-j/2-d).attr("x2",j/2+d).attr("y1",-k/2-d+8+m).attr("y2",-k/2-d+8+m),m+=8,w.forEach(a=>{(0,n.Ltv)(a).attr("transform","translate( "+-j/2+", "+(-1*k/2+m)+")");let b=a?.getBBox();m+=(b?.height??0)+4}),f.attr("style",b.style).attr("class","outer title-state").attr("x",-j/2-d).attr("y",-(k/2)-d).attr("width",j+b.padding).attr("height",k+b.padding),aI(b,f),b.intersect=function(a){return aG(b,a)},e},"class_box")},a8={},a9=(0,j.K2)(async(a,b,c)=>{let d,e;if(b.link){let f;"sandbox"===(0,i.D7)().securityLevel?f="_top":b.linkTarget&&(f=b.linkTarget||"_blank"),d=a.insert("svg:a").attr("xlink:href",b.link).attr("target",f),e=await a7[b.shape](d,b,c)}else d=e=await a7[b.shape](a,b,c);return b.tooltip&&e.attr("title",b.tooltip),b.class&&e.attr("class","node default "+b.class),a8[b.id]=d,b.haveCallback&&a8[b.id].attr("class",a8[b.id].attr("class")+" clickable"),d},"insertNode"),ba=(0,j.K2)(a=>{let b=a8[a.id];j.Rm.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");let c=a.diff||0;return a.clusterNode?b.attr("transform","translate("+(a.x+c-a.width/2)+", "+(a.y-a.height/2-8)+")"):b.attr("transform","translate("+a.x+", "+a.y+")"),c},"positionNode");function bb(a,b,c=!1){let d,e="default";(a?.classes?.length||0)>0&&(e=(a?.classes??[]).join(" ")),e+=" flowchart-label";let f=0,g="";switch(a.type){case"round":f=5,g="rect";break;case"composite":f=0,g="composite",d=0;break;case"square":case"group":default:g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"block_arrow":g="block_arrow";break;case"odd":case"rect_left_inv_arrow":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"doublecircle":g="doublecircle"}let j=(0,h.sM)(a?.styles??[]),k=a.label,l=a.size??{width:0,height:0,x:0,y:0};return{labelStyle:j.labelStyle,shape:g,labelText:k,rx:f,ry:f,class:e,style:j.style,id:a.id,directions:a.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:c,intersect:void 0,type:a.type,padding:d??(0,i.zj)()?.block?.padding??0}}async function bc(a,b,c){let d=bb(b,c,!1);if("group"===d.type)return;let e=(0,i.zj)(),f=await a9(a,d,{config:e}),g=f.node().getBBox(),h=c.getBlock(d.id);h.size={width:g.width,height:g.height,x:0,y:0,node:f},c.setBlock(h),f.remove()}async function bd(a,b,c){let d=bb(b,c,!0);if("space"!==c.getBlock(d.id).type){let c=(0,i.zj)();await a9(a,d,{config:c}),b.intersect=d?.intersect,ba(d)}}async function be(a,b,c,d){for(let e of b)await d(a,e,c),e.children&&await be(a,e.children,c,d)}async function bf(a,b,c){await be(a,b,c,bc)}async function bg(a,b,c){await be(a,b,c,bd)}async function bh(a,b,c,d,e){let f=new o.T({multigraph:!0,compound:!0});for(let a of(f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),c))a.size&&f.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(let c of b)if(c.start&&c.end){let b=d.getBlock(c.start),g=d.getBlock(c.end);if(b?.size&&g?.size){let d=b.size,h=g.size,i=[{x:d.x,y:d.y},{x:d.x+(h.x-d.x)/2,y:d.y+(h.y-d.y)/2},{x:h.x,y:h.y}];ay(a,{v:c.start,w:c.end,name:c.id},{...c,arrowTypeEnd:c.arrowTypeEnd,arrowTypeStart:c.arrowTypeStart,points:i,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",f,e),c.label&&(await as(a,{...c,label:c.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:c.arrowTypeEnd,arrowTypeStart:c.arrowTypeStart,points:i,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),au({...c,x:i[1].x,y:i[1].y},{originalPath:i}))}}}(0,j.K2)(bb,"getNodeFromBlock"),(0,j.K2)(bc,"calculateBlockSize"),(0,j.K2)(bd,"insertBlockPositioned"),(0,j.K2)(be,"performOperations"),(0,j.K2)(bf,"calculateBlockSizes"),(0,j.K2)(bg,"insertBlocks"),(0,j.K2)(bh,"insertEdges");var bi=(0,j.K2)(function(a,b){return b.db.getClasses()},"getClasses"),bj={parser:p,db:T,renderer:{draw:(0,j.K2)(async function(a,b,c,d){let e,{securityLevel:f,block:g}=(0,i.zj)(),h=d.db;"sandbox"===f&&(e=(0,n.Ltv)("#i"+b));let k="sandbox"===f?(0,n.Ltv)(e.nodes()[0].contentDocument.body):(0,n.Ltv)("body"),l="sandbox"===f?k.select(`[id="${b}"]`):(0,n.Ltv)(`[id="${b}"]`);W(l,["point","circle","cross"],d.type,b);let m=h.getBlocks(),o=h.getBlocksFlat(),p=h.getEdges(),q=l.insert("g").attr("class","block");await bf(q,m,h);let r=aj(h);if(await bg(q,m,h),await bh(q,p,o,h,b),r){let a=Math.max(1,Math.round(.125*(r.width/r.height))),b=r.height+a+10,c=r.width+10,{useMaxWidth:d}=g;(0,i.a$)(l,b,c,!!d),j.Rm.debug("Here Bounds",r,r),l.attr("viewBox",`${r.x-5} ${r.y-5} ${r.width+10} ${r.height+10}`)}},"draw"),getClasses:bi},styles:V}}};