@eventcatalogtest/studio
Version:
A drag and drop UI for distributed systems that keeps your diagrams where they belong – in your repo
117 lines (102 loc) • 77.3 kB
JavaScript
"use strict";exports.id=1963,exports.ids=[1963],exports.modules={17452:(a,b,c)=>{c.d(b,{A:()=>h});var d=c(41614),e=c(38890),f=c(74011),g=c(34849);let h=function(a,b){return((0,g.A)(a)?d.A:e.A)(a,(0,f.A)(b,3))}},38890:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(50424);let e=function(a,b){var c=[];return(0,d.A)(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}},51963:(a,b,c)=>{c.d(b,{diagram:()=>bi});var d=c(90248),e=c(96005),f=c(4740),g=c(7827),h=c(65299),i=c(32892),j=c(67645),k=c(81241),l=c(27170),m=c(38073),n=c(77275),o=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,7],c=[1,13],d=[1,14],e=[1,15],f=[1,19],g=[1,16],h=[1,17],j=[1,18],k=[8,30],l=[8,21,28,29,30,31,32,40,44,47],m=[1,23],n=[1,24],o=[8,15,16,21,28,29,30,31,32,40,44,47],p=[8,15,16,21,27,28,29,30,31,32,40,44,47],q=[1,49],r={trace:(0,i.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,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList: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:49,$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:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"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],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,i.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]},{11:3,13:4,19:5,20:6,21:b,22:8,23:9,24:10,25:11,26:12,28:c,29:d,31:e,32:f,40:g,44:h,47:j},{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,21:b,28:c,29:d,31:e,32:f,40:g,44:h,47:j}),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,32:f},{11:27,13:4,19:5,20:6,21:b,22:8,23:9,24:10,25:11,26:12,28:c,29:d,31:e,32:f,40:g,44:h,47:j},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},a(p,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},a(k,[2,13]),{26:35,32:f},{32:[2,14]},{17:[1,36]},a(o,[2,24]),{11:37,13:4,14:22,15:m,16:n,19:5,20:6,21:b,22:8,23:9,24:10,25:11,26:12,28:c,29:d,31:e,32:f,40:g,44:h,47:j},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[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]),{37:[1,47]},{34:48,35:q},{15:[1,50]},a(l,[2,27]),a(p,[2,33]),{39:[1,51]},{34:52,35:q,39:[2,31]},{32:[2,15]},a(p,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=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,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.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 "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+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,j=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,j,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,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.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,i.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,i.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,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.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,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.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,i.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,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.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,i.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,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.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,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:return 10;case 1:return a.getLogger().debug("Found space-block"),31;case 2:return a.getLogger().debug("Found nl-block"),31;case 3:return a.getLogger().debug("Found space-block"),29;case 4:a.getLogger().debug(".",b.yytext);break;case 5:a.getLogger().debug("_",b.yytext);break;case 6:return 5;case 7:return b.yytext=-1,28;case 8:return b.yytext=b.yytext.replace(/columns\s+/,""),a.getLogger().debug("COLUMNS (LEX)",b.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:a.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 14:return a.getLogger().debug("LEX: STR end:",b.yytext),"STR";case 15:return b.yytext=b.yytext.replace(/space\:/,""),a.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;case 16:return b.yytext="1",a.getLogger().debug("COLUMNS (LEX)",b.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),a.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),a.getLogger().debug("Lex: (-"),"NODE_DEND";case 44: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:return this.popState(),a.getLogger().debug("Lex: ])"),"NODE_DEND";case 49: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 this.popState(),a.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return a.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return a.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return a.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return a.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return a.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return a.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return a.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),a.getLogger().debug("LEX ARR START"),38;case 75:return a.getLogger().debug("Lex: NODE_ID",b.yytext),32;case 76:return a.getLogger().debug("Lex: EOF",b.yytext),8;case 79:return"NODE_DESCR";case 81:a.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:a.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return a.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";case 84:a.getLogger().debug("LEX POPPING"),this.popState();break;case 85:a.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (left):",b.yytext),"DIR";case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (x):",b.yytext),"DIR";case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (y):",b.yytext),"DIR";case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (up):",b.yytext),"DIR";case 91:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (down):",b.yytext),"DIR";case 92:return b.yytext="]>",a.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 94:case 95:case 96:return a.getLogger().debug("Lex: LINK",b.yytext),15;case 97:case 98:case 99:return a.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 101:return a.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 103:case 104:return this.popState(),a.getLogger().debug("Lex: LINK",b.yytext),15;case 105:return a.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\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:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}},(0,i.K2)(s,"Parser"),s.prototype=r,r.Parser=s,new s}();o.parser=o;var p=new Map,q=[],r=new Map,s="color",t="fill",u=(0,i.D7)(),v=new Map,w=(0,i.K2)(a=>i.Y2.sanitizeText(a,u),"sanitizeText"),x=(0,i.K2)(function(a,b=""){let c=v.get(a);c||(c={id:a,styles:[],textStyles:[]},v.set(a,c)),null!=b&&b.split(",").forEach(a=>{let b=a.replace(/([^;]*);/,"$1").trim();if(RegExp(s).exec(a)){let a=b.replace(t,"bgFill").replace(s,t);c.textStyles.push(a)}c.styles.push(b)})},"addStyleClass"),y=(0,i.K2)(function(a,b=""){let c=p.get(a);null!=b&&(c.styles=b.split(","))},"addStyle2Node"),z=(0,i.K2)(function(a,b){a.split(",").forEach(function(a){let c=p.get(a);if(void 0===c){let b=a.trim();c={id:b,type:"na",children:[]},p.set(b,c)}c.classes||(c.classes=[]),c.classes.push(b)})},"setCssClass"),A=(0,i.K2)((a,b)=>{let c=a.flat(),d=[];for(let a of c){if(a.label&&(a.label=w(a.label)),"classDef"===a.type){x(a.id,a.css);continue}if("applyClass"===a.type){z(a.id,a?.styleClass??"");continue}if("applyStyles"===a.type){a?.stylesStr&&y(a.id,a?.stylesStr);continue}if("column-setting"===a.type)b.columns=a.columns??-1;else if("edge"===a.type){let b=(r.get(a.id)??0)+1;r.set(a.id,b),a.id=b+"-"+a.id,q.push(a)}else{a.label||("composite"===a.type?a.label="":a.label=a.id);let b=p.get(a.id);if(void 0===b?p.set(a.id,a):("na"!==a.type&&(b.type=a.type),a.label!==a.id&&(b.label=a.label)),a.children&&A(a.children,a),"space"===a.type){let b=a.width??1;for(let c=0;c<b;c++){let b=(0,j.A)(a);b.id=b.id+"-"+c,p.set(b.id,b),d.push(b)}}else void 0===b&&d.push(a)}}b.children=d},"populateBlockDatabase"),B=[],C={id:"root",type:"composite",children:[],columns:-1},D=(0,i.K2)(()=>{i.Rm.debug("Clear called"),(0,i.IU)(),p=new Map([["root",C={id:"root",type:"composite",children:[],columns:-1}]]),B=[],v=new Map,q=[],r=new Map},"clear");function E(a){switch(i.Rm.debug("typeStr2Type",a),a){case"[]":return"square";case"()":return i.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 F(a){return(i.Rm.debug("typeStr2Type",a),"=="===a)?"thick":"normal"}function G(a){switch(a.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}(0,i.K2)(E,"typeStr2Type"),(0,i.K2)(F,"edgeTypeStr2Type"),(0,i.K2)(G,"edgeStrToEdgeData");var H=0,I=(0,i.K2)(()=>(H++,"id-"+Math.random().toString(36).substr(2,12)+"-"+H),"generateId"),J=(0,i.K2)(a=>{C.children=a,A(a,C),B=C.children},"setHierarchy"),K=(0,i.K2)(a=>{let b=p.get(a);return b?b.columns?b.columns:b.children?b.children.length:-1:-1},"getColumns"),L=(0,i.K2)(()=>[...p.values()],"getBlocksFlat"),M=(0,i.K2)(()=>B||[],"getBlocks"),N=(0,i.K2)(()=>q,"getEdges"),O=(0,i.K2)(a=>p.get(a),"getBlock"),P=(0,i.K2)(a=>{p.set(a.id,a)},"setBlock"),Q=(0,i.K2)(()=>i.Rm,"getLogger"),R=(0,i.K2)(function(){return v},"getClasses"),S={getConfig:(0,i.K2)(()=>(0,i.zj)().block,"getConfig"),typeStr2Type:E,edgeTypeStr2Type:F,edgeStrToEdgeData:G,getLogger:Q,getBlocksFlat:L,getBlocks:M,getEdges:N,setHierarchy:J,getBlock:O,setBlock:P,getColumns:K,getClasses:R,clear:D,generateId:I},T=(0,i.K2)((a,b)=>{let c=k.A,d=c(a,"r"),e=c(a,"g"),f=c(a,"b");return l.A(d,e,f,b)},"fade"),U=(0,i.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: ${T(a.edgeLabelBackground,.5)};
// background-color:
}
.node .cluster {
// fill: ${T(a.mainBkg,.5)};
fill: ${T(a.clusterBkg,.5)};
stroke: ${T(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"),V=(0,i.K2)((a,b,c,d)=>{b.forEach(b=>{ab[b](a,c,d)})},"insertMarkers"),W=(0,i.K2)((a,b,c)=>{i.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"),X=(0,i.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"),Y=(0,i.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"),Z=(0,i.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,i.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"),_=(0,i.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"),aa=(0,i.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"),ab={extension:W,composition:X,aggregation:Y,dependency:Z,lollipop:$,point:_,circle:aa,cross:(0,i.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,i.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")},ac=(0,i.D7)()?.block?.padding??8;function ad(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,i.K2)(ad,"calculateBlockPosition");var ae=(0,i.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};i.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 af(a,b,c=0,d=0){i.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)af(c,b);let g=ae(a);for(let b of(e=g.width,f=g.height,i.Rm.debug("setBlockSizes abc95 maxWidth of",a.id,":s children is ",e,f),a.children))b.size&&(i.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)+ac*((b.widthInColumns??1)-1),b.size.height=f,b.size.x=0,b.size.y=0,i.Rm.debug(`abc95 updating size of ${a.id} children child:${b.id} maxWidth:${e} maxHeight:${f}`));for(let c of a.children)af(c,b,e,f);let h=a.columns??-1,j=0;for(let b of a.children)j+=b.widthInColumns??1;let k=a.children.length;h>0&&h<j&&(k=h);let l=Math.ceil(j/k),m=k*(e+ac)+ac,n=l*(f+ac)+ac;if(m<c){i.Rm.debug(`Detected to small sibling: abc95 ${a.id} siblingWidth ${c} siblingHeight ${d} width ${m}`),m=c,n=d;let b=(c-k*ac-ac)/k,g=(d-l*ac-ac)/l;for(let c of(i.Rm.debug("Size indata abc88",a.id,"childWidth",b,"maxWidth",e),i.Rm.debug("Size indata abc88",a.id,"childHeight",g,"maxHeight",f),i.Rm.debug("Size indata abc88 xSize",k,"padding",ac),a.children))c.size&&(c.size.width=b,c.size.height=g,c.size.x=0,c.size.y=0)}if(i.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*ac-ac)/b;for(let b of(i.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}}i.Rm.debug("setBlockSizes abc94 (done)",a.id,a?.size?.x,a?.size?.width,a?.size?.y,a?.size?.height)}function ag(a,b){i.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(i.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)*ac;i.Rm.debug("widthOfChildren 88",e,"posX");let f=0;i.Rm.debug("abc91 block?.size?.x",a.id,a?.size?.x);let g=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-ac,h=0;for(let d of a.children){if(!d.size)continue;let{width:e,height:j}=d.size,{px:k,py:l}=ad(c,f);if(l!=h&&(h=l,g=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-ac,i.Rm.debug("New row in layout for block",a.id," and child ",d.id,h)),i.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}${ac}`),a.size){let b=e/2;d.size.x=g+ac+b,i.Rm.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${g} new startingPosX${d.size.x} ${b} padding=${ac} 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*(j+ac)+j/2+ac,i.Rm.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${g}${ac}${b}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${e*(d?.widthInColumns??1)/2}`)}d.children&&ag(d,b),f+=d?.widthInColumns??1,i.Rm.debug("abc88 columnsPos",d,f)}}i.Rm.debug(`layout blocks (<==layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`)}function ah(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}=ah(f,{minX:b,minY:c,maxX:d,maxY:e}));return{minX:b,minY:c,maxX:d,maxY:e}}function ai(a){let b=a.getBlock("root");if(!b)return;af(b,a,0,0),ag(b,a),i.Rm.debug("getBlocks",JSON.stringify(b,null,2));let{minX:c,minY:d,maxX:e,maxY:f}=ah(b);return{x:c,y:d,width:e-c,height:f-d}}function aj(a,b){b&&a.attr("style",b)}function ak(a){let b=(0,m.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),c=b.append("xhtml:div"),d=a.label,e=a.isNode?"nodeLabel":"edgeLabel",f=c.append("span");return f.html(d),aj(f,a.labelStyle),f.attr("class",e),aj(c,a.labelStyle),c.style("display","inline-block"),c.style("white-space","nowrap"),c.attr("xmlns","http://www.w3.org/1999/xhtml"),b.node()}(0,i.K2)(af,"setBlockSizes"),(0,i.K2)(ag,"layoutBlocks"),(0,i.K2)(ah,"findBounds"),(0,i.K2)(ai,"layout"),(0,i.K2)(aj,"applyStyle"),(0,i.K2)(ak,"addHtmlLabel");var al=(0,i.K2)(async(a,b,c,d)=>{let e=a||"";if("object"==typeof e&&(e=e[0]),(0,i._3)((0,i.D7)().flowchart.htmlLabels))return e=e.replace(/\\n|\n/g,"<br />"),i.Rm.debug("vertexText"+e),ak({isNode:d,label:await (0,g.hE)((0,h.Sm)(e)),labelStyle:b.replace("fill:","color:")});{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"),am=(0,i.K2)((a,b,c,d,e)=>{b.arrowTypeStart&&ao(a,"start",b.arrowTypeStart,c,d,e),b.arrowTypeEnd&&ao(a,"end",b.arrowTypeEnd,c,d,e)},"addEdgeMarkers"),an={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ao=(0,i.K2)((a,b,c,d,e,f)=>{let g=an[c];if(!g)return void i.Rm.warn(`Unknown arrow type: ${c}`);a.attr(`marker-${b}`,`url(${d}#${e}_${f}-${g}${"start"===b?"Start":"End"})`)},"addEdgeMarker"),ap={},aq={},ar=(0,i.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 al(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,m.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+")"),ap[b.id]=h,b.width=k.width,b.height=k.height,b.startLabelLeft){let d=await al(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+")"),aq[b.id]||(aq[b.id]={}),aq[b.id].startLeft=e,as(c,b.startLabelLeft)}if(b.startLabelRight){let d=await al(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+")"),aq[b.id]||(aq[b.id]={}),aq[b.id].startRight=e,as(c,b.startLabelRight)}if(b.endLabelLeft){let d=await al(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),aq[b.id]||(aq[b.id]={}),aq[b.id].endLeft=e,as(c,b.endLabelLeft)}if(b.endLabelRight){let d=await al(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),aq[b.id]||(aq[b.id]={}),aq[b.id].endRight=e,as(c,b.endLabelRight)}return f},"insertEdgeLabel");function as(a,b){(0,i.D7)().flowchart.htmlLabels&&a&&(a.style.width=9*b.length+"px",a.style.height="12px")}(0,i.K2)(as,"setTerminalWidth");var at=(0,i.K2)((a,b)=>{i.Rm.debug("Moving label abc88 ",a.id,a.label,ap[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=ap[a.id],f=a.x,g=a.y;if(c){let d=h._K.calcLabelPosition(c);i.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=aq[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=aq[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=aq[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=aq[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"),au=(0,i.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"),av=(0,i.K2)((a,b,c)=>{i.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,j=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)*j){let a=c.y<b.y?b.y-j-e:e-j-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),i.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 i.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"),aw=(0,i.K2)((a,b)=>{i.Rm.debug("abc88 cutPathAtIntersect",a,b);let c=[],d=a[0],e=!1;return a.forEach(a=>{if(au(b,a)||e)d=a,e||c.push(a);else{let f=av(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"),ax=(0,i.K2)(function(a,b,c,d,f,g,h){let j,k=c.points;i.Rm.debug("abc88 InsertEdge: edge=",c,"e=",b);let l=!1,n=g.node(b.v);var o=g.node(b.w);o?.intersect&&n?.intersect&&((k=k.slice(1,c.points.length-1)).unshift(n.intersect(k[0])),k.push(o.intersect(k[k.length-1]))),c.toCluster&&(i.Rm.debug("to cluster abc88",d[c.toCluster]),k=aw(c.points,d[c.toCluster].node),l=!0),c.fromCluster&&(i.Rm.debug("from cluster abc88",d[c.fromCluster]),k=aw(k.reverse(),d[c.fromCluster].node).reverse(),l=!0);let p=k.filter(a=>!Number.isNaN(a.y)),q=m.qrM;c.curve&&("graph"===f||"flowchart"===f)&&(q=c.curve);let{x:r,y:s}=(0,e.R)(c),t=(0,m.n8j)().x(r).y(s).curve(q);switch(c.thickness){case"normal":j="edge-thickness-normal";break;case"thick":case"invisible":j="edge-thickness-thick";break;default:j=""}switch(c.pattern){case"solid":j+=" edge-pattern-solid";break;case"dotted":j+=" edge-pattern-dotted";break;case"dashed":j+=" edge-pattern-dashed"}let u=a.append("path").attr("d",t(p)).attr("id",c.id).attr("class"," "+j+(c.classes?" "+c.classes:"")).attr("style",c.style),v="";((0,i.D7)().flowchart.arrowMarkerAbsolute||(0,i.D7)().state.arrowMarkerAbsolute)&&(v=(0,i.ID)(!0)),am(u,c,v,h,f);let w={};return l&&(w.updatedPath=k),w.originalPath=c.points,w},"insertEdge"),ay=(0,i.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"),az=(0,i.K2)((a,b,c)=>{let d=ay(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 aA(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 aB(a,b,c){return aA(a,b,b,c)}function aC(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&&aD(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&&aD(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 aD(a,b){return a*b>0}function aE(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=aC(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,i.K2)(function(a,b){return a.intersect(b)},"intersectNode"),(0,i.K2)(aA,"intersectEllipse"),(0,i.K2)(aB,"intersectCircle"),(0,i.K2)(aC,"intersectLine"),(0,i.K2)(aD,"sameSign"),(0,i.K2)(aE,"intersectPolygon");var aF={circle:aB,polygon:aE,rect:(0,i.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")},aG=(0,i.K2)(async(a,b,c,d)=>{let e,f,j=(0,i.D7)()