`fill: ${t.fillType6}`:""}; } .task-type-7, .section-type-7 { ${t.fillType0?`fill: ${t.fillType7}`:""}; } .actor-0 { ${t.actor0?`fill: ${t.actor0}`:""}; } .actor-1 { ${t.actor1?`fill: ${t.actor1}`:""}; } .actor-2 { ${t.actor2?`fill: ${t.actor2}`:""}; } .actor-3 { ${t.actor3?`fill: ${t.actor3}`:""}; } .actor-4 { ${t.actor4?`fill: ${t.actor4}`:""}; } .actor-5 { ${t.actor5?`fill: ${t.actor5}`:""}; } ${Tu()} `,"getStyles"),Rrt=Lrt,_G=x(function(t,e){return _0(t,e)},"drawRect"),Drt=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=Uc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(a,"smile");function s(l){let u=Uc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),o3e=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),l3e=x(function(t,e){return a0e(t,e)},"drawText"),Nrt=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,l3e(t,e)},"drawLabel"),Irt=x(function(t,e,r){let n=t.append("g"),i=Za();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,_G(n,i),c3e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),i3e=-1,Mrt=x(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");i3e++,i.append("line").attr("id","task"+i3e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Drt(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=Za();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,_G(i,s);let o=e.x+14;e.people.forEach(l=>{let u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};o3e(i,h),o+=10}),c3e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),Ort=x(function(t,e){TS(t,e)},"drawBackgroundRect"),c3e=(function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let y=0;y{Kh[S]={color:wc.actorColours[m%wc.actorColours.length],position:m},m++}),u3e(f),ap=wc.leftMargin+nA,Ml.insert(0,0,ap,Object.keys(Kh).length*50),$rt(f,d,0);let y=Ml.getBounds();p&&f.append("text").text(p).attr("x",ap).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o);let v=y.stopy-y.starty+2*wc.diagramMarginY,b=ap+y.stopx+2*wc.diagramMarginX;xn(f,v,b,wc.useMaxWidth),f.append("line").attr("x1",ap).attr("y1",wc.height*4).attr("x2",b-ap-4).attr("y2",wc.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let w=p?70:0;f.attr("viewBox",`${y.startx} -25 ${b} ${v+w}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",v+w+25)},"draw"),Ml={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:x(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let i=Te().journey,a=this,s=0;function o(l){return x(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-f*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(Ml.data,"startx",t-f*i.boxMargin,Math.min),a.updateVal(Ml.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-f*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(Ml.data,"starty",e-f*i.boxMargin,Math.min),a.updateVal(Ml.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}x(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:x(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(Ml.data,"startx",i,Math.min),this.updateVal(Ml.data,"starty",s,Math.min),this.updateVal(Ml.data,"stopx",a,Math.max),this.updateVal(Ml.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return this.data},"getBounds")},SG=wc.sectionFills,a3e=wc.sectionColours,$rt=x(function(t,e,r){let n=Te().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,o=0,l="#CCC",u="black",h=0;for(let[f,d]of e.entries()){if(i!==d.section){l=SG[o%SG.length],h=o%SG.length,u=a3e[o%a3e.length];let g=0,m=d.section;for(let v=f;v(Kh[m]&&(g[m]=Kh[m]),g),{});d.x=f*n.taskMargin+f*n.width+ap,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=u,d.fill=l,d.num=h,d.actors=p,A3.drawTask(t,d,n),Ml.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),s3e={setConf:Brt,draw:Frt},zrt={parser:brt,db:n3e,renderer:s3e,styles:Rrt,init:x(t=>{s3e.setConf(t.journey),n3e.clear()},"init")}});var _3e={};gr(_3e,{diagram:()=>ont});function NG(t,e){t.each(function(){var r=Ye(this),n=r.text().split(/(\s+|
)/).reverse(),i,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;he||i==="
")&&(a.pop(),u.text(a.join(" ").trim()),i==="
"?a=[""]:a=[i],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(i))})}var LG,Grt,m3e,lv,y3e,RG,iA,cv,v3e,x3e,b3e,w3e,T3e,k3e,E3e,S3e,d3e,qrt,Vrt,aA,Urt,Wrt,C3e,Hrt,Yrt,p3e,Xrt,jrt,Krt,DG,A3e,Zrt,Qrt,Jrt,ent,Dg,tnt,g3e,rnt,nnt,int,ant,snt,ont,L3e=$(()=>{Er();lr();pr();pr();xo();LG=(function(){var t=x(function(d,p,g,m){for(g=g||{},m=d.length;m--;g[d[m]]=p);return g},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,16],l=[1,17],u={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:x(function(p,g,m,y,v,b,w){var S=b.length-1;switch(v){case 1:return b[S-1];case 2:this.$=[];break;case 3:b[S-1].push(b[S]),this.$=b[S-1];break;case 4:case 5:this.$=b[S];break;case 6:case 7:this.$=[];break;case 8:y.getCommonDb().setDiagramTitle(b[S].substr(6)),this.$=b[S].substr(6);break;case 9:this.$=b[S].trim(),y.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[S].trim(),y.getCommonDb().setAccDescription(this.$);break;case 12:y.addSection(b[S].substr(8)),this.$=b[S].substr(8);break;case 15:y.addTask(b[S],0,""),this.$=b[S];break;case 16:y.addEvent(b[S].substr(2)),this.$=b[S];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:x(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),parse:x(function(p){var g=this,m=[0],y=[],v=[null],b=[],w=this.table,S="",T=0,k=0,C=0,L=2,D=1,M=b.slice.call(arguments,1),I=Object.create(this.lexer),E={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(E.yy[_]=this.yy[_]);I.setInput(p,E.yy),E.yy.lexer=I,E.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var A=I.yylloc;b.push(A);var R=I.options&&I.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(re){m.length=m.length-2*re,v.length=v.length-re,b.length=b.length-re}x(N,"popStack");function O(){var re;return re=y.pop()||I.lex()||D,typeof re!="number"&&(re instanceof Array&&(y=re,re=y.pop()),re=g.symbols_[re]||re),re}x(O,"lex");for(var P,B,G,F,q,j,J={},H,he,Z,fe;;){if(G=m[m.length-1],this.defaultActions[G]?F=this.defaultActions[G]:((P===null||typeof P>"u")&&(P=O()),F=w[G]&&w[G][P]),typeof F>"u"||!F.length||!F[0]){var ne="";fe=[];for(H in w[G])this.terminals_[H]&&H>L&&fe.push("'"+this.terminals_[H]+"'");I.showPosition?ne="Parse error on line "+(T+1)+`: `+I.showPosition()+` Expecting `+fe.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ne="Parse error on line "+(T+1)+": Unexpected "+(P==D?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ne,{text:I.match,token:this.terminals_[P]||P,line:I.yylineno,loc:A,expected:fe})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+P);switch(F[0]){case 1:m.push(P),v.push(I.yytext),b.push(I.yylloc),m.push(F[1]),P=null,B?(P=B,B=null):(k=I.yyleng,S=I.yytext,T=I.yylineno,A=I.yylloc,C>0&&C--);break;case 2:if(he=this.productions_[F[1]][1],J.$=v[v.length-he],J._$={first_line:b[b.length-(he||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(he||1)].first_column,last_column:b[b.length-1].last_column},R&&(J._$.range=[b[b.length-(he||1)].range[0],b[b.length-1].range[1]]),j=this.performAction.apply(J,[S,k,T,E.yy,F[1],v,b].concat(M)),typeof j<"u")return j;he&&(m=m.slice(0,-1*he*2),v=v.slice(0,-1*he),b=b.slice(0,-1*he)),m.push(this.productions_[F[1]][0]),v.push(J.$),b.push(J._$),Z=w[m[m.length-2]][m[m.length-1]],m.push(Z);break;case 3:return!0}}return!0},"parse")},h=(function(){var d={EOF:1,parseError:x(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:x(function(p,g){return this.yy=g||this.yy||{},this._input=p,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:x(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:x(function(p){var g=p.length,m=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var y=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),m.length-1&&(this.yylineno-=m.length-1);var v=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:m?(m.length===y.length?this.yylloc.first_column:0)+y[y.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(p){this.unput(this.match.slice(p))},"less"),pastInput:x(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+` `+g+"^"},"showPosition"),test_match:x(function(p,g){var m,y,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var b in v)this[b]=v[b];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),b=0;bg[0].length)){if(g=m,y=b,this.options.backtrack_lexer){if(p=this.test_match(m,v[b]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,v[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var g=this.next();return g||this.lex()},"lex"),begin:x(function(g){this.conditionStack.push(g)},"begin"),popState:x(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:x(function(g){this.begin(g)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(g,m,y,v){var b=v;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return d})();u.lexer=h;function f(){this.yy={}}return x(f,"Parser"),f.prototype=u,u.Parser=f,new f})();LG.parser=LG;Grt=LG,m3e={};Jh(m3e,{addEvent:()=>E3e,addSection:()=>b3e,addTask:()=>k3e,addTaskOrg:()=>S3e,clear:()=>x3e,default:()=>qrt,getCommonDb:()=>v3e,getSections:()=>w3e,getTasks:()=>T3e});lv="",y3e=0,RG=[],iA=[],cv=[],v3e=x(()=>O5,"getCommonDb"),x3e=x(function(){RG.length=0,iA.length=0,lv="",cv.length=0,kr()},"clear"),b3e=x(function(t){lv=t,RG.push(t)},"addSection"),w3e=x(function(){return RG},"getSections"),T3e=x(function(){let t=d3e(),e=100,r=0;for(;!t&&rr.id===y3e-1).events.push(t)},"addEvent"),S3e=x(function(t){let e={section:lv,type:lv,description:t,task:t,classes:[]};iA.push(e)},"addTaskOrg"),d3e=x(function(){let t=x(function(r){return cv[r].processed},"compileTask"),e=!0;for(let[r,n]of cv.entries())t(r),e=e&&n.processed;return e},"compileTasks"),qrt={clear:x3e,getCommonDb:v3e,addSection:b3e,getSections:w3e,getTasks:T3e,addTask:k3e,addTaskOrg:S3e,addEvent:E3e},Vrt=12,aA=x(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),Urt=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=Uc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(a,"smile");function s(l){let u=Uc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),Wrt=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),C3e=x(function(t,e){let r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),Hrt=x(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}x(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,C3e(t,e)},"drawLabel"),Yrt=x(function(t,e,r){let n=t.append("g"),i=DG();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,aA(n,i),A3e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),p3e=-1,Xrt=x(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");p3e++,i.append("line").attr("id","task"+p3e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Urt(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=DG();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,aA(i,s),A3e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),jrt=x(function(t,e){aA(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),Krt=x(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),DG=x(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),A3e=(function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}x(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let y=0;y0&&(_+=(M.events.length-1)*10),k=Math.max(k,_)}te.debug("maxSectionHeight before draw",p),te.debug("maxTaskHeight before draw",g),d&&d.length>0?d.forEach(D=>{let M=h.filter(A=>A.section===D),I={number:w,descr:D,section:w,width:200*Math.max(M.length,1)-50,padding:20,maxHeight:p};te.debug("sectionNode",I);let E=u.append("g"),_=Dg.drawNode(E,I,w,i);te.debug("sectionNode output",_),E.attr("transform",`translate(${v}, ${y})`),b+=p+50,M.length>0&&g3e(u,M,w,v,b,g,i,T,k,p,!1),v+=200*Math.max(M.length,1),b=y,w++}):(S=!1,g3e(u,h,w,v,b,g,i,T,k,p,!0));let C=u.node().getBBox();te.debug("bounds",C),f&&u.append("text").text(f).attr("x",C.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),m=S?p+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",m).attr("x2",C.width+3*a).attr("y2",m).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),eh(void 0,u,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),g3e=x(function(t,e,r,n,i,a,s,o,l,u,h){for(let f of e){let d={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:a};te.debug("taskNode",d);let p=t.append("g").attr("class","taskWrapper"),m=Dg.drawNode(p,d,r,s).height;if(te.debug("taskHeight after draw",m),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,m),f.events){let y=t.append("g").attr("class","lineWrapper"),v=a;i+=100,v=v+rnt(t,f.events,r,n,i,s),i-=100,y.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),rnt=x(function(t,e,r,n,i,a){let s=0,o=i;i=i+100;for(let l of e){let u={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};te.debug("eventNode",u);let h=t.append("g").attr("class","eventWrapper"),d=Dg.drawNode(h,u,r,a).height;s=s+d,h.attr("transform",`translate(${n}, ${i})`),i=i+10+d}return i=o,s},"drawEvents"),nnt={setConf:x(()=>{},"setConf"),draw:tnt},int=x(t=>{let e="";for(let r=0;r` .edge { stroke-width: 3; } ${int(t)} .section-root rect, .section-root path, .section-root circle { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .eventWrapper { filter: brightness(120%); } `,"getStyles"),snt=ant,ont={db:m3e,renderer:nnt,parser:Grt,styles:snt}});function R3e(t,e=0){return(qa[t[e+0]]+qa[t[e+1]]+qa[t[e+2]]+qa[t[e+3]]+"-"+qa[t[e+4]]+qa[t[e+5]]+"-"+qa[t[e+6]]+qa[t[e+7]]+"-"+qa[t[e+8]]+qa[t[e+9]]+"-"+qa[t[e+10]]+qa[t[e+11]]+qa[t[e+12]]+qa[t[e+13]]+qa[t[e+14]]+qa[t[e+15]]).toLowerCase()}var qa,D3e=$(()=>{qa=[];for(let t=0;t<256;++t)qa.push((t+256).toString(16).slice(1))});function MG(){if(!IG){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");IG=crypto.getRandomValues.bind(crypto)}return IG(lnt)}var IG,lnt,N3e=$(()=>{lnt=new Uint8Array(16)});var cnt,OG,I3e=$(()=>{cnt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),OG={randomUUID:cnt}});function unt(t,e,r){if(OG.randomUUID&&!e&&!t)return OG.randomUUID();t=t||{};let n=t.random??t.rng?.()??MG();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[r+i]=n[i];return e}return R3e(n)}var PG,M3e=$(()=>{I3e();N3e();D3e();PG=unt});var O3e=$(()=>{M3e()});var P3e={};gr(P3e,{diagram:()=>vnt});var BG,hnt,Zh,fnt,dnt,pnt,gnt,mnt,ynt,vnt,B3e=$(()=>{ac();Sl();xl();cl();Co();Qs();xs();bs();Aa();bn();Er();lr();O3e();xo();BG=(function(){var t=x(function(S,T,k,C){for(k=k||{},C=S.length;C--;k[S[C]]=T);return k},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(T,k,C,L,D,M,I){var E=M.length-1;switch(D){case 6:case 7:return L;case 8:L.getLogger().trace("Stop NL ");break;case 9:L.getLogger().trace("Stop EOF ");break;case 11:L.getLogger().trace("Stop NL2 ");break;case 12:L.getLogger().trace("Stop EOF2 ");break;case 15:L.getLogger().info("Node: ",M[E].id),L.addNode(M[E-1].length,M[E].id,M[E].descr,M[E].type);break;case 16:L.getLogger().trace("Icon: ",M[E]),L.decorateNode({icon:M[E]});break;case 17:case 21:L.decorateNode({class:M[E]});break;case 18:L.getLogger().trace("SPACELIST");break;case 19:L.getLogger().trace("Node: ",M[E].id),L.addNode(0,M[E].id,M[E].descr,M[E].type);break;case 20:L.decorateNode({icon:M[E]});break;case 25:L.getLogger().trace("node found ..",M[E-2]),this.$={id:M[E-1],descr:M[E-1],type:L.getType(M[E-2],M[E])};break;case 26:this.$={id:M[E],descr:M[E],type:L.nodeType.DEFAULT};break;case 27:L.getLogger().trace("node found ..",M[E-3]),this.$={id:M[E-3],descr:M[E-1],type:L.getType(M[E-2],M[E])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(p,[2,14],{7:g,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:g,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(T,k){if(k.recoverable)this.trace(T);else{var C=new Error(T);throw C.hash=k,C}},"parseError"),parse:x(function(T){var k=this,C=[0],L=[],D=[null],M=[],I=this.table,E="",_=0,A=0,R=0,N=2,O=1,P=M.slice.call(arguments,1),B=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);B.setInput(T,G.yy),G.yy.lexer=B,G.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var q=B.yylloc;M.push(q);var j=B.options&&B.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function J(X){C.length=C.length-2*X,D.length=D.length-X,M.length=M.length-X}x(J,"popStack");function H(){var X;return X=L.pop()||B.lex()||O,typeof X!="number"&&(X instanceof Array&&(L=X,X=L.pop()),X=k.symbols_[X]||X),X}x(H,"lex");for(var he,Z,fe,ne,re,ee,K={},le,Q,ge,ie;;){if(fe=C[C.length-1],this.defaultActions[fe]?ne=this.defaultActions[fe]:((he===null||typeof he>"u")&&(he=H()),ne=I[fe]&&I[fe][he]),typeof ne>"u"||!ne.length||!ne[0]){var we="";ie=[];for(le in I[fe])this.terminals_[le]&&le>N&&ie.push("'"+this.terminals_[le]+"'");B.showPosition?we="Parse error on line "+(_+1)+`: `+B.showPosition()+` Expecting `+ie.join(", ")+", got '"+(this.terminals_[he]||he)+"'":we="Parse error on line "+(_+1)+": Unexpected "+(he==O?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(we,{text:B.match,token:this.terminals_[he]||he,line:B.yylineno,loc:q,expected:ie})}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fe+", token: "+he);switch(ne[0]){case 1:C.push(he),D.push(B.yytext),M.push(B.yylloc),C.push(ne[1]),he=null,Z?(he=Z,Z=null):(A=B.yyleng,E=B.yytext,_=B.yylineno,q=B.yylloc,R>0&&R--);break;case 2:if(Q=this.productions_[ne[1]][1],K.$=D[D.length-Q],K._$={first_line:M[M.length-(Q||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(Q||1)].first_column,last_column:M[M.length-1].last_column},j&&(K._$.range=[M[M.length-(Q||1)].range[0],M[M.length-1].range[1]]),ee=this.performAction.apply(K,[E,A,_,G.yy,ne[1],D,M].concat(P)),typeof ee<"u")return ee;Q&&(C=C.slice(0,-1*Q*2),D=D.slice(0,-1*Q),M=M.slice(0,-1*Q)),C.push(this.productions_[ne[1]][0]),D.push(K.$),M.push(K._$),ge=I[C[C.length-2]][C[C.length-1]],C.push(ge);break;case 3:return!0}}return!0},"parse")},b=(function(){var S={EOF:1,parseError:x(function(k,C){if(this.yy.parser)this.yy.parser.parseError(k,C);else throw new Error(k)},"parseError"),setInput:x(function(T,k){return this.yy=k||this.yy||{},this._input=T,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:x(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var k=T.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:x(function(T){var k=T.length,C=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var L=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 D=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===L.length?this.yylloc.first_column:0)+L[L.length-C.length].length-C[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(T){this.unput(this.match.slice(T))},"less"),pastInput:x(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var T=this.pastInput(),k=new Array(T.length+1).join("-");return T+this.upcomingInput()+` `+k+"^"},"showPosition"),test_match:x(function(T,k){var C,L,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),L=T[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,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(T[0].length),this.matched+=T[0],C=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var M in D)this[M]=D[M];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,k,C,L;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),M=0;Mk[0].length)){if(k=C,L=M,this.options.backtrack_lexer){if(T=this.test_match(C,D[M]),T!==!1)return T;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(T=this.test_match(k,D[L]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var k=this.next();return k||this.lex()},"lex"),begin:x(function(k){this.conditionStack.push(k)},"begin"),popState:x(function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:x(function(k){this.begin(k)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(k,C,L,D){var M=D;switch(L){case 0:return k.getLogger().trace("Found comment",C.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:k.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return k.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:k.getLogger().trace("end icon"),this.popState();break;case 10:return k.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return k.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return k.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return k.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:k.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return k.getLogger().trace("description:",C.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),k.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),k.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),k.getLogger().trace("node end ...",C.yytext),"NODE_DEND";break;case 30:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),k.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),k.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return k.getLogger().trace("Long description:",C.yytext),20;break;case 36:return k.getLogger().trace("Long description:",C.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return S})();v.lexer=b;function w(){this.yy={}}return x(w,"Parser"),w.prototype=v,v.Parser=w,new w})();BG.parser=BG;hnt=BG,Zh={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},fnt=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=Zh,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{x(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level0?this.nodes[0]:null}addNode(t,e,r,n){te.info("addNode",t,e,r,n);let i=!1;this.nodes.length===0?(this.baseLevel=t,t=0,i=!0):this.baseLevel!==void 0&&(t=t-this.baseLevel,i=!1);let a=Te(),s=a.mindmap?.padding??hr.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2;break}let o={id:this.count++,nodeId:ur(e,a),level:t,descr:ur(r,a),type:n,children:[],width:a.mindmap?.maxNodeWidth??hr.mindmap.maxNodeWidth,padding:s,isRoot:i},l=this.getParent(t);if(l)l.children.push(o),this.nodes.push(o);else if(i)this.nodes.push(o);else throw new Error(`There can be only one root. No parent could be found for ("${o.descr}")`)}getType(t,e){switch(te.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return e===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;let e=Te(),r=this.nodes[this.nodes.length-1];t.icon&&(r.icon=ur(t.icon,e)),t.class&&(r.class=ur(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(t.level===0?t.section=void 0:t.section=e,t.children)for(let[r,n]of t.children.entries()){let i=t.level===0?r:e;this.assignSections(n,i)}}flattenNodes(t,e){let r=["mindmap-node"];t.isRoot===!0?r.push("section-root","section--1"):t.section!==void 0&&r.push(`section-${t.section}`),t.class&&r.push(t.class);let n=r.join(" "),i=x(s=>{switch(s){case Zh.CIRCLE:return"mindmapCircle";case Zh.RECT:return"rect";case Zh.ROUNDED_RECT:return"rounded";case Zh.CLOUD:return"cloud";case Zh.BANG:return"bang";case Zh.HEXAGON:return"hexagon";case Zh.DEFAULT:return"defaultMindmapNode";case Zh.NO_BORDER:default:return"rect"}},"getShapeFromType"),a={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:i(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:n,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(a),t.children)for(let s of t.children)this.flattenNodes(s,e)}generateEdges(t,e){if(t.children)for(let r of t.children){let n="edge";r.section!==void 0&&(n+=` section-edge-${r.section}`);let i=t.level+1;n+=` edge-depth-${i}`;let a={id:`edge_${t.id}_${r.id}`,start:t.id.toString(),end:r.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:n,depth:t.level,section:r.section};e.push(a),this.generateEdges(r,e)}}getData(){let t=this.getMindmap(),e=Te(),n=uW().layout!==void 0,i=e;if(n||(i.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:i};te.debug("getData: mindmapRoot",t,e),this.assignSections(t);let a=[],s=[];this.flattenNodes(t,a),this.generateEdges(t,s),te.debug(`getData: processed ${a.length} nodes and ${s.length} edges`);let o=new Map;for(let l of a)o.set(l.id,{shape:l.shape,width:l.width,height:l.height,padding:l.padding});return{nodes:a,edges:s,config:i,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+PG()}}getLogger(){return te}},dnt=x(async(t,e,r,n)=>{te.debug(`Rendering mindmap diagram `+t);let i=n.db,a=i.getData(),s=El(e,a.config.securityLevel);a.type=n.type,a.layoutAlgorithm=xu(a.config.layout,{fallback:"cose-bilkent"}),a.diagramId=e,i.getMindmap()&&(a.nodes.forEach(l=>{l.shape==="rounded"?(l.radius=15,l.taper=15,l.stroke="none",l.width=0,l.padding=15):l.shape==="circle"?l.padding=10:l.shape==="rect"&&(l.width=0,l.padding=10)}),await vl(a,s),so(s,a.config.mindmap?.padding??hr.mindmap.padding,"mindmapDiagram",a.config.mindmap?.useMaxWidth??hr.mindmap.useMaxWidth))},"draw"),pnt={draw:dnt},gnt=x(t=>{let e="";for(let r=0;r` .edge { stroke-width: 3; } ${gnt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .section-root span { color: ${t.gitBranchLabel0}; } .section-2 span { color: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } `,"getStyles"),ynt=mnt,vnt={get db(){return new fnt},renderer:pnt,parser:hnt,styles:ynt}});var $3e={};gr($3e,{diagram:()=>Bnt});var FG,xnt,Ol,zG,$G,GG,bnt,wnt,F3e,Tnt,knt,Zi,Ent,Snt,Cnt,Ant,_nt,Lnt,Rnt,Dnt,Nnt,Int,Mnt,Ont,Pnt,Bnt,z3e=$(()=>{Hc();vd();q2();Qs();xs();bs();Aa();bn();Er();lr();xo();FG=(function(){var t=x(function(C,L,D,M){for(D=D||{},M=C.length;M--;D[C[M]]=L);return D},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],b=[1,6,7,11,13,16,17,20,23],w=[1,38],S={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:x(function(L,D,M,I,E,_,A){var R=_.length-1;switch(E){case 6:case 7:return I;case 8:I.getLogger().trace("Stop NL ");break;case 9:I.getLogger().trace("Stop EOF ");break;case 11:I.getLogger().trace("Stop NL2 ");break;case 12:I.getLogger().trace("Stop EOF2 ");break;case 15:I.getLogger().info("Node: ",_[R-1].id),I.addNode(_[R-2].length,_[R-1].id,_[R-1].descr,_[R-1].type,_[R]);break;case 16:I.getLogger().info("Node: ",_[R].id),I.addNode(_[R-1].length,_[R].id,_[R].descr,_[R].type);break;case 17:I.getLogger().trace("Icon: ",_[R]),I.decorateNode({icon:_[R]});break;case 18:case 23:I.decorateNode({class:_[R]});break;case 19:I.getLogger().trace("SPACELIST");break;case 20:I.getLogger().trace("Node: ",_[R-1].id),I.addNode(0,_[R-1].id,_[R-1].descr,_[R-1].type,_[R]);break;case 21:I.getLogger().trace("Node: ",_[R].id),I.addNode(0,_[R].id,_[R].descr,_[R].type);break;case 22:I.decorateNode({icon:_[R]});break;case 27:I.getLogger().trace("node found ..",_[R-2]),this.$={id:_[R-1],descr:_[R-1],type:I.getType(_[R-2],_[R])};break;case 28:this.$={id:_[R],descr:_[R],type:0};break;case 29:I.getLogger().trace("node found ..",_[R-3]),this.$={id:_[R-3],descr:_[R-1],type:I.getType(_[R-2],_[R])};break;case 30:this.$=_[R-1]+_[R];break;case 31:this.$=_[R];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(m,[2,14],{7:y,11:v}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:w}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(b,[2,11]),t(b,[2,12]),t(d,[2,15],{24:w}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(L,D){if(D.recoverable)this.trace(L);else{var M=new Error(L);throw M.hash=D,M}},"parseError"),parse:x(function(L){var D=this,M=[0],I=[],E=[null],_=[],A=this.table,R="",N=0,O=0,P=0,B=2,G=1,F=_.slice.call(arguments,1),q=Object.create(this.lexer),j={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(j.yy[J]=this.yy[J]);q.setInput(L,j.yy),j.yy.lexer=q,j.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var H=q.yylloc;_.push(H);var he=q.options&&q.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(Fe){M.length=M.length-2*Fe,E.length=E.length-Fe,_.length=_.length-Fe}x(Z,"popStack");function fe(){var Fe;return Fe=I.pop()||q.lex()||G,typeof Fe!="number"&&(Fe instanceof Array&&(I=Fe,Fe=I.pop()),Fe=D.symbols_[Fe]||Fe),Fe}x(fe,"lex");for(var ne,re,ee,K,le,Q,ge={},ie,we,X,ze;;){if(ee=M[M.length-1],this.defaultActions[ee]?K=this.defaultActions[ee]:((ne===null||typeof ne>"u")&&(ne=fe()),K=A[ee]&&A[ee][ne]),typeof K>"u"||!K.length||!K[0]){var ye="";ze=[];for(ie in A[ee])this.terminals_[ie]&&ie>B&&ze.push("'"+this.terminals_[ie]+"'");q.showPosition?ye="Parse error on line "+(N+1)+`: `+q.showPosition()+` Expecting `+ze.join(", ")+", got '"+(this.terminals_[ne]||ne)+"'":ye="Parse error on line "+(N+1)+": Unexpected "+(ne==G?"end of input":"'"+(this.terminals_[ne]||ne)+"'"),this.parseError(ye,{text:q.match,token:this.terminals_[ne]||ne,line:q.yylineno,loc:H,expected:ze})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+ne);switch(K[0]){case 1:M.push(ne),E.push(q.yytext),_.push(q.yylloc),M.push(K[1]),ne=null,re?(ne=re,re=null):(O=q.yyleng,R=q.yytext,N=q.yylineno,H=q.yylloc,P>0&&P--);break;case 2:if(we=this.productions_[K[1]][1],ge.$=E[E.length-we],ge._$={first_line:_[_.length-(we||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(we||1)].first_column,last_column:_[_.length-1].last_column},he&&(ge._$.range=[_[_.length-(we||1)].range[0],_[_.length-1].range[1]]),Q=this.performAction.apply(ge,[R,O,N,j.yy,K[1],E,_].concat(F)),typeof Q<"u")return Q;we&&(M=M.slice(0,-1*we*2),E=E.slice(0,-1*we),_=_.slice(0,-1*we)),M.push(this.productions_[K[1]][0]),E.push(ge.$),_.push(ge._$),X=A[M[M.length-2]][M[M.length-1]],M.push(X);break;case 3:return!0}}return!0},"parse")},T=(function(){var C={EOF:1,parseError:x(function(D,M){if(this.yy.parser)this.yy.parser.parseError(D,M);else throw new Error(D)},"parseError"),setInput:x(function(L,D){return this.yy=D||this.yy||{},this._input=L,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:x(function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var D=L.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),L},"input"),unput:x(function(L){var D=L.length,M=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var I=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),M.length-1&&(this.yylineno-=M.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:M?(M.length===I.length?this.yylloc.first_column:0)+I[I.length-M.length].length-M[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(L){this.unput(this.match.slice(L))},"less"),pastInput:x(function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var L=this.pastInput(),D=new Array(L.length+1).join("-");return L+this.upcomingInput()+` `+D+"^"},"showPosition"),test_match:x(function(L,D){var M,I,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))),I=L[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+L[0].length},this.yytext+=L[0],this.match+=L[0],this.matches=L,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(L[0].length),this.matched+=L[0],M=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var _ in E)this[_]=E[_];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var L,D,M,I;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),_=0;_D[0].length)){if(D=M,I=_,this.options.backtrack_lexer){if(L=this.test_match(M,E[_]),L!==!1)return L;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(L=this.test_match(D,E[I]),L!==!1?L:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var D=this.next();return D||this.lex()},"lex"),begin:x(function(D){this.conditionStack.push(D)},"begin"),popState:x(function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},"topState"),pushState:x(function(D){this.begin(D)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(D,M,I,E){var _=E;switch(I){case 0:return this.pushState("shapeData"),M.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let A=/\n\s*/g;return M.yytext=M.yytext.replace(A,"
"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return D.getLogger().trace("Found comment",M.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:D.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return D.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:D.getLogger().trace("end icon"),this.popState();break;case 16:return D.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return D.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return D.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return D.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:D.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return D.getLogger().trace("description:",M.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),D.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),D.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),D.getLogger().trace("node end ...",M.yytext),"NODE_DEND";break;case 36:return this.popState(),D.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),D.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),D.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),D.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),D.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return D.getLogger().trace("Long description:",M.yytext),21;break;case 42:return D.getLogger().trace("Long description:",M.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return C})();S.lexer=T;function k(){this.yy={}}return x(k,"Parser"),k.prototype=S,S.Parser=k,new k})();FG.parser=FG;xnt=FG,Ol=[],zG=[],$G=0,GG={},bnt=x(()=>{Ol=[],zG=[],$G=0,GG={}},"clear"),wnt=x(t=>{if(Ol.length===0)return null;let e=Ol[0].level,r=null;for(let n=Ol.length-1;n>=0;n--)if(Ol[n].level===e&&!r&&(r=Ol[n]),Ol[n].levelo.parentId===i.id);for(let o of s){let l={id:o.id,parentId:i.id,label:ur(o.label??"",n),isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(l)}}return{nodes:e,edges:t,other:{},config:Te()}},"getData"),knt=x((t,e,r,n,i)=>{let a=Te(),s=a.mindmap?.padding??hr.mindmap.padding;switch(n){case Zi.ROUNDED_RECT:case Zi.RECT:case Zi.HEXAGON:s*=2}let o={id:ur(e,a)||"kbn"+$G++,level:t,label:ur(r,a),width:a.mindmap?.maxNodeWidth??hr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let u;i.includes(` `)?u=i+` `:u=`{ `+i+` }`;let h=Ef(u,{schema:kf});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(o.shape=h?.shape),h?.label&&(o.label=h?.label),h?.icon&&(o.icon=h?.icon.toString()),h?.assigned&&(o.assigned=h?.assigned.toString()),h?.ticket&&(o.ticket=h?.ticket.toString()),h?.priority&&(o.priority=h?.priority)}let l=wnt(t);l?o.parentId=l.id||"kbn"+$G++:zG.push(o),Ol.push(o)},"addNode"),Zi={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ent=x((t,e)=>{switch(te.debug("In get type",t,e),t){case"[":return Zi.RECT;case"(":return e===")"?Zi.ROUNDED_RECT:Zi.CLOUD;case"((":return Zi.CIRCLE;case")":return Zi.CLOUD;case"))":return Zi.BANG;case"{{":return Zi.HEXAGON;default:return Zi.DEFAULT}},"getType"),Snt=x((t,e)=>{GG[t]=e},"setElementForId"),Cnt=x(t=>{if(!t)return;let e=Te(),r=Ol[Ol.length-1];t.icon&&(r.icon=ur(t.icon,e)),t.class&&(r.cssClasses=ur(t.class,e))},"decorateNode"),Ant=x(t=>{switch(t){case Zi.DEFAULT:return"no-border";case Zi.RECT:return"rect";case Zi.ROUNDED_RECT:return"rounded-rect";case Zi.CIRCLE:return"circle";case Zi.CLOUD:return"cloud";case Zi.BANG:return"bang";case Zi.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),_nt=x(()=>te,"getLogger"),Lnt=x(t=>GG[t],"getElementById"),Rnt={clear:bnt,addNode:knt,getSections:F3e,getData:Tnt,nodeType:Zi,getType:Ent,setElementForId:Snt,decorateNode:Cnt,type2Str:Ant,getLogger:_nt,getElementById:Lnt},Dnt=Rnt,Nnt=x(async(t,e,r,n)=>{te.debug(`Rendering kanban diagram `+t);let a=n.db.getData(),s=Te();s.htmlLabels=!1;let o=ta(e),l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(y=>y.isGroup),f=0,d=10,p=[],g=25;for(let y of h){let v=s?.kanban?.sectionWidth||200;f=f+1,y.x=v*f+(f-1)*d/2,y.width=v,y.y=0,y.height=v*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+f;let b=await Fm(l,y);g=Math.max(g,b?.labelBBox?.height),p.push(b)}let m=0;for(let y of h){let v=p[m];m=m+1;let b=s?.kanban?.sectionWidth||200,w=-b*3/2+g,S=w,T=a.nodes.filter(L=>L.parentId===y.id);for(let L of T){if(L.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");L.x=y.x,L.width=b-1.5*d;let M=(await t0(u,L,{config:s})).node().getBBox();L.y=S+M.height/2,await yx(L),S=L.y+M.height/2+d/2}let k=v.cluster.select("rect"),C=Math.max(S-w+3*d,50)+(g-25);k.attr("height",C)}eh(void 0,o,s.mindmap?.padding??hr.kanban.padding,s.mindmap?.useMaxWidth??hr.kanban.useMaxWidth)},"draw"),Int={draw:Nnt},Mnt=x(t=>{let e="";for(let n=0;nt.darkMode?It(n,i):At(n,i),"adjuster");for(let n=0;n` .edge { stroke-width: 3; } ${Mnt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .cluster-label, .label { color: ${t.textColor}; fill: ${t.textColor}; } .kanban-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } ${Tu()} `,"getStyles"),Pnt=Ont,Bnt={db:Dnt,renderer:Int,parser:xnt,styles:Pnt}});function _3(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var G3e=$(()=>{});function uv(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var q3e=$(()=>{});function hv(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}var V3e=$(()=>{});var qG=$(()=>{G3e();q3e();V3e()});function Fnt(t){return t.target.depth}function VG(t){return t.depth}function UG(t,e){return e-1-t.height}function L3(t,e){return t.sourceLinks.length?t.depth:e-1}function WG(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?uv(t.sourceLinks,Fnt)-1:0}var HG=$(()=>{qG()});function fv(t){return function(){return t}}var U3e=$(()=>{});function W3e(t,e){return sA(t.source,e.source)||t.index-e.index}function H3e(t,e){return sA(t.target,e.target)||t.index-e.index}function sA(t,e){return t.y0-e.y0}function YG(t){return t.value}function $nt(t){return t.index}function znt(t){return t.nodes}function Gnt(t){return t.links}function Y3e(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function X3e({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width}}function oA(){let t=0,e=0,r=1,n=1,i=24,a=8,s,o=$nt,l=L3,u,h,f=znt,d=Gnt,p=6;function g(){let R={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return m(R),y(R),v(R),b(R),T(R),X3e(R),R}g.update=function(R){return X3e(R),R},g.nodeId=function(R){return arguments.length?(o=typeof R=="function"?R:fv(R),g):o},g.nodeAlign=function(R){return arguments.length?(l=typeof R=="function"?R:fv(R),g):l},g.nodeSort=function(R){return arguments.length?(u=R,g):u},g.nodeWidth=function(R){return arguments.length?(i=+R,g):i},g.nodePadding=function(R){return arguments.length?(a=s=+R,g):a},g.nodes=function(R){return arguments.length?(f=typeof R=="function"?R:fv(R),g):f},g.links=function(R){return arguments.length?(d=typeof R=="function"?R:fv(R),g):d},g.linkSort=function(R){return arguments.length?(h=R,g):h},g.size=function(R){return arguments.length?(t=e=0,r=+R[0],n=+R[1],g):[r-t,n-e]},g.extent=function(R){return arguments.length?(t=+R[0][0],r=+R[1][0],e=+R[0][1],n=+R[1][1],g):[[t,e],[r,n]]},g.iterations=function(R){return arguments.length?(p=+R,g):p};function m({nodes:R,links:N}){for(let[P,B]of R.entries())B.index=P,B.sourceLinks=[],B.targetLinks=[];let O=new Map(R.map((P,B)=>[o(P,B,R),P]));for(let[P,B]of N.entries()){B.index=P;let{source:G,target:F}=B;typeof G!="object"&&(G=B.source=Y3e(O,G)),typeof F!="object"&&(F=B.target=Y3e(O,F)),G.sourceLinks.push(B),F.targetLinks.push(B)}if(h!=null)for(let{sourceLinks:P,targetLinks:B}of R)P.sort(h),B.sort(h)}function y({nodes:R}){for(let N of R)N.value=N.fixedValue===void 0?Math.max(hv(N.sourceLinks,YG),hv(N.targetLinks,YG)):N.fixedValue}function v({nodes:R}){let N=R.length,O=new Set(R),P=new Set,B=0;for(;O.size;){for(let G of O){G.depth=B;for(let{target:F}of G.sourceLinks)P.add(F)}if(++B>N)throw new Error("circular link");O=P,P=new Set}}function b({nodes:R}){let N=R.length,O=new Set(R),P=new Set,B=0;for(;O.size;){for(let G of O){G.height=B;for(let{source:F}of G.targetLinks)P.add(F)}if(++B>N)throw new Error("circular link");O=P,P=new Set}}function w({nodes:R}){let N=_3(R,B=>B.depth)+1,O=(r-t-i)/(N-1),P=new Array(N);for(let B of R){let G=Math.max(0,Math.min(N-1,Math.floor(l.call(null,B,N))));B.layer=G,B.x0=t+G*O,B.x1=B.x0+i,P[G]?P[G].push(B):P[G]=[B]}if(u)for(let B of P)B.sort(u);return P}function S(R){let N=uv(R,O=>(n-e-(O.length-1)*s)/hv(O,YG));for(let O of R){let P=e;for(let B of O){B.y0=P,B.y1=P+B.value*N,P=B.y1+s;for(let G of B.sourceLinks)G.width=G.value*N}P=(n-P+s)/(O.length+1);for(let B=0;BO.length)-1)),S(N);for(let O=0;O0))continue;let J=(q/j-F.y0)*N;F.y0+=J,F.y1+=J,I(F)}u===void 0&&G.sort(sA),L(G,O)}}function C(R,N,O){for(let P=R.length,B=P-2;B>=0;--B){let G=R[B];for(let F of G){let q=0,j=0;for(let{target:H,value:he}of F.sourceLinks){let Z=he*(H.layer-F.layer);q+=A(F,H)*Z,j+=Z}if(!(j>0))continue;let J=(q/j-F.y0)*N;F.y0+=J,F.y1+=J,I(F)}u===void 0&&G.sort(sA),L(G,O)}}function L(R,N){let O=R.length>>1,P=R[O];M(R,P.y0-s,O-1,N),D(R,P.y1+s,O+1,N),M(R,n,R.length-1,N),D(R,e,0,N)}function D(R,N,O,P){for(;O1e-6&&(B.y0+=G,B.y1+=G),N=B.y1+s}}function M(R,N,O,P){for(;O>=0;--O){let B=R[O],G=(B.y1-N)*P;G>1e-6&&(B.y0-=G,B.y1-=G),N=B.y0-s}}function I({sourceLinks:R,targetLinks:N}){if(h===void 0){for(let{source:{sourceLinks:O}}of N)O.sort(H3e);for(let{target:{targetLinks:O}}of R)O.sort(W3e)}}function E(R){if(h===void 0)for(let{sourceLinks:N,targetLinks:O}of R)N.sort(H3e),O.sort(W3e)}function _(R,N){let O=R.y0-(R.sourceLinks.length-1)*s/2;for(let{target:P,width:B}of R.sourceLinks){if(P===N)break;O+=B+s}for(let{source:P,width:B}of N.targetLinks){if(P===R)break;O-=B}return O}function A(R,N){let O=N.y0-(N.targetLinks.length-1)*s/2;for(let{source:P,width:B}of N.targetLinks){if(P===R)break;O+=B+s}for(let{target:P,width:B}of R.sourceLinks){if(P===N)break;O-=B}return O}return g}var j3e=$(()=>{qG();HG();U3e()});function KG(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function K3e(){return new KG}var XG,jG,Ng,qnt,ZG,Z3e=$(()=>{XG=Math.PI,jG=2*XG,Ng=1e-6,qnt=jG-Ng;KG.prototype=K3e.prototype={constructor:KG,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,u=a-t,h=s-e,f=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>Ng)if(!(Math.abs(h*o-l*u)>Ng)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-a,p=n-s,g=o*o+l*l,m=d*d+p*p,y=Math.sqrt(g),v=Math.sqrt(f),b=i*Math.tan((XG-Math.acos((g+f-m)/(2*y*v)))/2),w=b/v,S=b/y;Math.abs(w-1)>Ng&&(this._+="L"+(t+w*u)+","+(e+w*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>u*p)+","+(this._x1=t+S*o)+","+(this._y1=e+S*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Ng||Math.abs(this._y1-u)>Ng)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%jG+jG),f>qnt?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>Ng&&(this._+="A"+r+","+r+",0,"+ +(f>=XG)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};ZG=K3e});var Q3e=$(()=>{Z3e()});function QG(t){return function(){return t}}var J3e=$(()=>{});function e5e(t){return t[0]}function t5e(t){return t[1]}var r5e=$(()=>{});var n5e,i5e=$(()=>{n5e=Array.prototype.slice});function Vnt(t){return t.source}function Unt(t){return t.target}function Wnt(t){var e=Vnt,r=Unt,n=e5e,i=t5e,a=null;function s(){var o,l=n5e.call(arguments),u=e.apply(this,l),h=r.apply(this,l);if(a||(a=o=ZG()),t(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=h,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:QG(+o),s):n},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:QG(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function Hnt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function JG(){return Wnt(Hnt)}var a5e=$(()=>{Q3e();i5e();J3e();r5e()});var s5e=$(()=>{a5e()});function Ynt(t){return[t.source.x1,t.y0]}function Xnt(t){return[t.target.x0,t.y1]}function eq(){return JG().source(Ynt).target(Xnt)}var o5e=$(()=>{s5e()});var l5e=$(()=>{j3e();HG();o5e()});var u5e={};gr(u5e,{diagram:()=>hit});var tq,lA,uA,hA,cA,jnt,Knt,Znt,Qnt,Jnt,eit,tit,rit,nit,c5e,iit,ait,sit,oit,lit,cit,uit,hit,h5e=$(()=>{Er();lr();pr();l5e();tq=(function(){var t=x(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:x(function(l,u,h,f,d,p,g){var m=p.length-1;switch(d){case 7:let y=f.findOrCreateNode(p[m-4].trim().replaceAll('""','"')),v=f.findOrCreateNode(p[m-2].trim().replaceAll('""','"')),b=parseFloat(p[m].trim());f.addLink(y,v,b);break;case 8:case 9:case 11:this.$=p[m];break;case 10:this.$=p[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:x(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:x(function(l){var u=this,h=[0],f=[],d=[null],p=[],g=this.table,m="",y=0,v=0,b=0,w=2,S=1,T=p.slice.call(arguments,1),k=Object.create(this.lexer),C={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(C.yy[L]=this.yy[L]);k.setInput(l,C.yy),C.yy.lexer=k,C.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var D=k.yylloc;p.push(D);var M=k.options&&k.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(H){h.length=h.length-2*H,d.length=d.length-H,p.length=p.length-H}x(I,"popStack");function E(){var H;return H=f.pop()||k.lex()||S,typeof H!="number"&&(H instanceof Array&&(f=H,H=f.pop()),H=u.symbols_[H]||H),H}x(E,"lex");for(var _,A,R,N,O,P,B={},G,F,q,j;;){if(R=h[h.length-1],this.defaultActions[R]?N=this.defaultActions[R]:((_===null||typeof _>"u")&&(_=E()),N=g[R]&&g[R][_]),typeof N>"u"||!N.length||!N[0]){var J="";j=[];for(G in g[R])this.terminals_[G]&&G>w&&j.push("'"+this.terminals_[G]+"'");k.showPosition?J="Parse error on line "+(y+1)+`: `+k.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[_]||_)+"'":J="Parse error on line "+(y+1)+": Unexpected "+(_==S?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(J,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:D,expected:j})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(N[0]){case 1:h.push(_),d.push(k.yytext),p.push(k.yylloc),h.push(N[1]),_=null,A?(_=A,A=null):(v=k.yyleng,m=k.yytext,y=k.yylineno,D=k.yylloc,b>0&&b--);break;case 2:if(F=this.productions_[N[1]][1],B.$=d[d.length-F],B._$={first_line:p[p.length-(F||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(F||1)].first_column,last_column:p[p.length-1].last_column},M&&(B._$.range=[p[p.length-(F||1)].range[0],p[p.length-1].range[1]]),P=this.performAction.apply(B,[m,v,y,C.yy,N[1],d,p].concat(T)),typeof P<"u")return P;F&&(h=h.slice(0,-1*F*2),d=d.slice(0,-1*F),p=p.slice(0,-1*F)),h.push(this.productions_[N[1]][0]),d.push(B.$),p.push(B._$),q=g[h[h.length-2]][h[h.length-1]],h.push(q);break;case 3:return!0}}return!0},"parse")},a=(function(){var o={EOF:1,parseError:x(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:x(function(l,u){return this.yy=u||this.yy||{},this._input=l,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:x(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:x(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=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),h.length-1&&(this.yylineno-=h.length-1);var d=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:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(l){this.unput(this.match.slice(l))},"less"),pastInput:x(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` `+u+"^"},"showPosition"),test_match:x(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return o})();i.lexer=a;function s(){this.yy={}}return x(s,"Parser"),s.prototype=i,i.Parser=s,new s})();tq.parser=tq;lA=tq,uA=[],hA=[],cA=new Map,jnt=x(()=>{uA=[],hA=[],cA=new Map,kr()},"clear"),Knt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{x(this,"SankeyLink")}},Znt=x((t,e,r)=>{uA.push(new Knt(t,e,r))},"addLink"),Qnt=class{constructor(t){this.ID=t}static{x(this,"SankeyNode")}},Jnt=x(t=>{t=tt.sanitizeText(t,Te());let e=cA.get(t);return e===void 0&&(e=new Qnt(t),cA.set(t,e),hA.push(e)),e},"findOrCreateNode"),eit=x(()=>hA,"getNodes"),tit=x(()=>uA,"getLinks"),rit=x(()=>({nodes:hA.map(t=>({id:t.ID})),links:uA.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),nit={nodesMap:cA,getConfig:x(()=>Te().sankey,"getConfig"),getNodes:eit,getLinks:tit,getGraph:rit,addLink:Znt,findOrCreateNode:Jnt,getAccTitle:Ir,setAccTitle:Nr,getAccDescription:Or,setAccDescription:Mr,getDiagramTitle:Pr,setDiagramTitle:Vr,clear:jnt},c5e=class rq{static{x(this,"Uid")}static{this.count=0}static next(e){return new rq(e+ ++rq.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},iit={left:VG,right:UG,center:WG,justify:L3},ait=x(function(t,e,r,n){let{securityLevel:i,sankey:a}=Te(),s=P5.sankey,o;i==="sandbox"&&(o=Ye("#i"+e));let l=i==="sandbox"?Ye(o.nodes()[0].contentDocument.body):Ye("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):Ye(`[id="${e}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,m=a?.suffix??s.suffix,y=a?.showValues??s.showValues,v=n.db.getGraph(),b=iit[p];oA().nodeId(M=>M.id).nodeWidth(10).nodePadding(10+(y?15:0)).nodeAlign(b).extent([[0,0],[h,f]])(v);let T=ko(LL);u.append("g").attr("class","nodes").selectAll(".node").data(v.nodes).join("g").attr("class","node").attr("id",M=>(M.uid=c5e.next("node-")).id).attr("transform",function(M){return"translate("+M.x0+","+M.y0+")"}).attr("x",M=>M.x0).attr("y",M=>M.y0).append("rect").attr("height",M=>M.y1-M.y0).attr("width",M=>M.x1-M.x0).attr("fill",M=>T(M.id));let k=x(({id:M,value:I})=>y?`${M} ${g}${Math.round(I*100)/100}${m}`:M,"getText");u.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(v.nodes).join("text").attr("x",M=>M.x0(M.y1+M.y0)/2).attr("dy",`${y?"0":"0.35"}em`).attr("text-anchor",M=>M.x0(I.uid=c5e.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",I=>I.source.x1).attr("x2",I=>I.target.x0);M.append("stop").attr("offset","0%").attr("stop-color",I=>T(I.source.id)),M.append("stop").attr("offset","100%").attr("stop-color",I=>T(I.target.id))}let D;switch(L){case"gradient":D=x(M=>M.uid,"coloring");break;case"source":D=x(M=>T(M.source.id),"coloring");break;case"target":D=x(M=>T(M.target.id),"coloring");break;default:D=L}C.append("path").attr("d",eq()).attr("stroke",D).attr("stroke-width",M=>Math.max(1,M.width)),eh(void 0,u,0,d)},"draw"),sit={draw:ait},oit=x(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` `).trim(),"prepareTextForParsing"),lit=x(t=>`.label { font-family: ${t.fontFamily}; }`,"getStyles"),cit=lit,uit=lA.parse.bind(lA);lA.parse=t=>uit(oit(t));hit={styles:cit,parser:lA,db:nit,renderer:sit}});var p5e={};gr(p5e,{diagram:()=>wit});var fit,f5e,dit,pit,git,d5e,mit,yit,vit,xit,bit,wit,g5e=$(()=>{Hc();L0();bn();Er();lr();Zd();fit=hr.packet,f5e=class{constructor(){this.packet=[],this.setAccTitle=Nr,this.getAccTitle=Ir,this.setDiagramTitle=Vr,this.getDiagramTitle=Pr,this.getAccDescription=Or,this.setAccDescription=Mr}static{x(this,"PacketDB")}getConfig(){let t=ui({...fit,...fr().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){kr(),this.packet=[]}},dit=1e4,pit=x((t,e)=>{Mo(t,e);let r=-1,n=[],i=1,{bitsPerRow:a}=e.getConfig();for(let{start:s,end:o,bits:l,label:u}of t.blocks){if(s!==void 0&&o!==void 0&&o{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];let n=e*r-1,i=e*r;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),d5e={parser:{yy:void 0},parse:x(async t=>{let e=await Bs("packet",t),r=d5e.parser?.yy;if(!(r instanceof f5e))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");te.debug(e),pit(e,r)},"parse")},mit=x((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=i.getPacket(),f=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),g=l*u+2,m=ta(e);m.attr("viewbox",`0 0 ${g} ${p}`),xn(m,p,g,a.useMaxWidth);for(let[y,v]of h.entries())yit(m,v,y,a);m.append("text").text(f).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),yit=x((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=t.append("g"),h=r*(n+a)+a;for(let f of e){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-i;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let g=f.end===f.start,m=h-2;u.append("text").attr("x",d+(g?p/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||u.append("text").attr("x",d+p).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),vit={draw:mit},xit={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},bit=x(({packet:t}={})=>{let e=ui(xit,t);return` .packetByte { font-size: ${e.byteFontSize}; } .packetByte.start { fill: ${e.startByteColor}; } .packetByte.end { fill: ${e.endByteColor}; } .packetLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .packetTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } .packetBlock { stroke: ${e.blockStrokeColor}; stroke-width: ${e.blockStrokeWidth}; fill: ${e.blockFillColor}; } `},"styles"),wit={parser:d5e,get db(){return new f5e},renderer:vit,styles:bit}});var T5e={};gr(T5e,{diagram:()=>Git});function v5e(t,e,r,n,i,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;r.forEach((u,h)=>{if(u.entries.length!==o)return;let f=u.entries.map((d,p)=>{let g=2*Math.PI*p/o-Math.PI/2,m=x5e(d,n,i,l),y=m*Math.cos(g),v=m*Math.sin(g);return{x:y,y:v}});a==="circle"?t.append("path").attr("d",b5e(f,s.curveTension)).attr("class",`radarCurve-${h}`):a==="polygon"&&t.append("polygon").attr("points",f.map(d=>`${d.x},${d.y}`).join(" ")).attr("class",`radarCurve-${h}`)})}function x5e(t,e,r,n){let i=Math.min(Math.max(t,e),r);return n*(i-e)/(r-e)}function b5e(t,e){let r=t.length,n=`M${t[0].x},${t[0].y}`;for(let i=0;i{let u=t.append("g").attr("transform",`translate(${i}, ${a+l*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}var dv,m5e,Ig,Tit,kit,y5e,Eit,Sit,Cit,Ait,_it,Lit,Rit,R3,Dit,Nit,Iit,Mit,Oit,Pit,Bit,Fit,$it,zit,Git,k5e=$(()=>{Hc();L0();bn();Er();lr();Zd();dv={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},m5e={axes:[],curves:[],options:dv},Ig=structuredClone(m5e),Tit=hr.radar,kit=x(()=>ui({...Tit,...fr().radar}),"getConfig"),y5e=x(()=>Ig.axes,"getAxes"),Eit=x(()=>Ig.curves,"getCurves"),Sit=x(()=>Ig.options,"getOptions"),Cit=x(t=>{Ig.axes=t.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),Ait=x(t=>{Ig.curves=t.map(e=>({name:e.name,label:e.label??e.name,entries:_it(e.entries)}))},"setCurves"),_it=x(t=>{if(t[0].axis==null)return t.map(r=>r.value);let e=y5e();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(r=>{let n=t.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),Lit=x(t=>{let e=t.reduce((r,n)=>(r[n.name]=n,r),{});Ig.options={showLegend:e.showLegend?.value??dv.showLegend,ticks:e.ticks?.value??dv.ticks,max:e.max?.value??dv.max,min:e.min?.value??dv.min,graticule:e.graticule?.value??dv.graticule}},"setOptions"),Rit=x(()=>{kr(),Ig=structuredClone(m5e)},"clear"),R3={getAxes:y5e,getCurves:Eit,getOptions:Sit,setAxes:Cit,setCurves:Ait,setOptions:Lit,getConfig:kit,clear:Rit,setAccTitle:Nr,getAccTitle:Ir,setDiagramTitle:Vr,getDiagramTitle:Pr,getAccDescription:Or,setAccDescription:Mr},Dit=x(t=>{Mo(t,R3);let{axes:e,curves:r,options:n}=t;R3.setAxes(e),R3.setCurves(r),R3.setOptions(n)},"populate"),Nit={parse:x(async t=>{let e=await Bs("radar",t);te.debug(e),Dit(e)},"parse")},Iit=x((t,e,r,n)=>{let i=n.db,a=i.getAxes(),s=i.getCurves(),o=i.getOptions(),l=i.getConfig(),u=i.getDiagramTitle(),h=ta(e),f=Mit(h,l),d=o.max??Math.max(...s.map(m=>Math.max(...m.entries))),p=o.min,g=Math.min(l.width,l.height)/2;Oit(f,a,g,o.ticks,o.graticule),Pit(f,a,g,l),v5e(f,a,s,p,d,o.graticule,l),w5e(f,s,o.showLegend,l),f.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),Mit=x((t,e)=>{let r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return t.attr("viewbox",`0 0 ${r} ${n}`).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),Oit=x((t,e,r,n,i)=>{if(i==="circle")for(let a=0;a{let f=2*h*Math.PI/a-Math.PI/2,d=o*Math.cos(f),p=o*Math.sin(f);return`${d},${p}`}).join(" ");t.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),Pit=x((t,e,r,n)=>{let i=e.length;for(let a=0;a{let r="";for(let n=0;n{let e=mp(),r=fr(),n=ui(e,r.themeVariables),i=ui(n.radar,t);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),zit=x(({radar:t}={})=>{let{themeVariables:e,radarOptions:r}=$it(t);return` .radarTitle { font-size: ${e.fontSize}; color: ${e.titleColor}; dominant-baseline: hanging; text-anchor: middle; } .radarAxisLine { stroke: ${r.axisColor}; stroke-width: ${r.axisStrokeWidth}; } .radarAxisLabel { dominant-baseline: middle; text-anchor: middle; font-size: ${r.axisLabelFontSize}px; color: ${r.axisColor}; } .radarGraticule { fill: ${r.graticuleColor}; fill-opacity: ${r.graticuleOpacity}; stroke: ${r.graticuleColor}; stroke-width: ${r.graticuleStrokeWidth}; } .radarLegendText { text-anchor: start; font-size: ${r.legendFontSize}px; dominant-baseline: hanging; } ${Fit(e,r)} `},"styles"),Git={parser:Nit,db:R3,renderer:Bit,styles:zit}});var J5e={};gr(J5e,{diagram:()=>fst});function O5e(t){switch(te.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return te.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 P5e(t){return te.debug("typeStr2Type",t),t==="=="?"thick":"normal"}function B5e(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function F5e(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function gA(t,e,r=0,n=0){te.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let p of t.children)gA(p,e);let s=Tat(t);i=s.width,a=s.height,te.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let p of t.children)p.size&&(te.debug(`abc95 Setting size of children of ${t.id} id=${p.id} ${i} ${a} ${JSON.stringify(p.size)}`),p.size.width=i*(p.widthInColumns??1)+Li*((p.widthInColumns??1)-1),p.size.height=a,p.size.x=0,p.size.y=0,te.debug(`abc95 updating size of ${t.id} children child:${p.id} maxWidth:${i} maxHeight:${a}`));for(let p of t.children)gA(p,e,i,a);let o=t.columns??-1,l=0;for(let p of t.children)l+=p.widthInColumns??1;let u=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(p>0){let g=(f-p*Li-Li)/p;te.debug("abc95 (growing to fit) width",t.id,f,t.size?.width,g);for(let m of t.children)m.size&&(m.size.width=g)}}t.size={width:f,height:d,x:0,y:0}}te.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function uq(t,e){te.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(te.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*Li;te.debug("widthOfChildren 88",i,"posX");let a=0;te.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Li,o=0;for(let l of t.children){let u=t;if(!l.size)continue;let{width:h,height:f}=l.size,{px:d,py:p}=F5e(r,a);if(p!=o&&(o=p,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Li,te.debug("New row in layout for block",t.id," and child ",l.id,o)),te.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${a} (px, py) ${d},${p} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${Li}`),u.size){let m=h/2;l.size.x=s+Li+m,te.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${m} padding=${Li} width=${h} halfWidth=${m} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+m,l.size.y=u.size.y-u.size.height/2+p*(f+Li)+f/2+Li,te.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${Li}${m}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&uq(l,e);let g=l?.widthInColumns??1;r>0&&(g=Math.min(g,r-a%r)),a+=g,te.debug("abc88 columnsPos",l,a)}}te.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function hq(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:o,height:l}=t.size;a-o/2n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=hq(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function $5e(t){let e=t.getBlock("root");if(!e)return;gA(e,t,0,0),uq(e,t),te.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=hq(e),s=a-n,o=i-r;return{x:r,y:n,width:o,height:s}}function aq(t,e){e&&t.attr("style",e)}function z5e(t,e){let r=Ye(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,a=t.isNode?"nodeLabel":"edgeLabel",s=n.append("span");return s.html(ur(i,e)),aq(s,t.labelStyle),s.attr("class",a),aq(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}function D3(t,e){Te().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function G5e(t,e){return t.intersect(e)}function q5e(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function H5e(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){s=Math.min(s,g.x),o=Math.min(o,g.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h1&&a.sort(function(g,m){var y=g.x-r.x,v=g.y-r.y,b=Math.sqrt(y*y+v*v),w=m.x-r.x,S=m.y-r.y,T=Math.sqrt(w*w+S*S);return b{i.push(o,0)},"addBorder"),s=x(o=>{i.push(0,o)},"skipBorder");e.includes("t")?(te.debug("add top border"),a(r)):s(r),e.includes("r")?(te.debug("add right border"),a(n)):s(n),e.includes("b")?(te.debug("add bottom border"),a(r)):s(r),e.includes("l")?(te.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}function fq(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let l=_T(n?.styles??[]),u=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:o??fr()?.block?.padding??0}}async function X5e(t,e,r){let n=fq(e,r,!1);if(n.type==="group")return;let i=fr(),a=await Y5e(t,n,{config:i}),s=a.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function j5e(t,e,r){let n=fq(e,r,!0);if(r.getBlock(n.id).type!=="space"){let a=fr();await Y5e(t,n,{config:a}),e.intersect=n?.intersect,lst(n)}}async function yA(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await yA(t,i.children,r,n)}async function K5e(t,e,r){await yA(t,e,r,X5e)}async function Z5e(t,e,r){await yA(t,e,r,j5e)}async function Q5e(t,e,r,n,i){let a=new dn({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];Rat(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await Cat(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),Aat({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var nq,qit,Tc,lq,iq,E5e,S5e,Vit,I5e,Uit,pA,Wit,Hit,Yit,Xit,M5e,cq,N3,jit,C5e,Kit,Zit,Qit,Jit,eat,tat,rat,nat,iat,aat,sat,oat,fA,lat,cat,uat,hat,fat,dat,pat,gat,mat,yat,vat,xat,bat,wat,Li,Tat,kat,Pl,Eat,Sat,A5e,sq,os,Cat,Aat,_at,Lat,_5e,Rat,Dat,Nat,Iat,V5e,Mat,Oat,Pat,Bat,Fat,ii,pa,Ti,$at,zat,L5e,Ho,R5e,Gat,qat,Vat,Uat,Wat,Hat,Yat,Xat,jat,Kat,Zat,Qat,Jat,est,tst,rst,nst,ist,ast,D5e,sst,ost,N5e,dA,Y5e,lst,cst,ust,hst,fst,ewe=$(()=>{vd();Co();xs();Aa();bn();Er();lr();aD();xo();pr();fl();pr();pr();pr();pr();nq=(function(){var t=x(function(w,S,T,k){for(T=T||{},k=w.length;k--;T[w[k]]=S);return T},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],d=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],y={trace:x(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:x(function(S,T,k,C,L,D,M){var I=D.length-1;switch(L){case 4:C.getLogger().debug("Rule: separator (NL) ");break;case 5:C.getLogger().debug("Rule: separator (Space) ");break;case 6:C.getLogger().debug("Rule: separator (EOF) ");break;case 7:C.getLogger().debug("Rule: hierarchy: ",D[I-1]),C.setHierarchy(D[I-1]);break;case 8:C.getLogger().debug("Stop NL ");break;case 9:C.getLogger().debug("Stop EOF ");break;case 10:C.getLogger().debug("Stop NL2 ");break;case 11:C.getLogger().debug("Stop EOF2 ");break;case 12:C.getLogger().debug("Rule: statement: ",D[I]),typeof D[I].length=="number"?this.$=D[I]:this.$=[D[I]];break;case 13:C.getLogger().debug("Rule: statement #2: ",D[I-1]),this.$=[D[I-1]].concat(D[I]);break;case 14:C.getLogger().debug("Rule: link: ",D[I],S),this.$={edgeTypeStr:D[I],label:""};break;case 15:C.getLogger().debug("Rule: LABEL link: ",D[I-3],D[I-1],D[I]),this.$={edgeTypeStr:D[I],label:D[I-1]};break;case 18:let E=parseInt(D[I]),_=C.generateId();this.$={id:_,type:"space",label:"",width:E,children:[]};break;case 23:C.getLogger().debug("Rule: (nodeStatement link node) ",D[I-2],D[I-1],D[I]," typestr: ",D[I-1].edgeTypeStr);let A=C.edgeStrToEdgeData(D[I-1].edgeTypeStr);this.$=[{id:D[I-2].id,label:D[I-2].label,type:D[I-2].type,directions:D[I-2].directions},{id:D[I-2].id+"-"+D[I].id,start:D[I-2].id,end:D[I].id,label:D[I-1].label,type:"edge",directions:D[I].directions,arrowTypeEnd:A,arrowTypeStart:"arrow_open"},{id:D[I].id,label:D[I].label,type:C.typeStr2Type(D[I].typeStr),directions:D[I].directions}];break;case 24:C.getLogger().debug("Rule: nodeStatement (abc88 node size) ",D[I-1],D[I]),this.$={id:D[I-1].id,label:D[I-1].label,type:C.typeStr2Type(D[I-1].typeStr),directions:D[I-1].directions,widthInColumns:parseInt(D[I],10)};break;case 25:C.getLogger().debug("Rule: nodeStatement (node) ",D[I]),this.$={id:D[I].id,label:D[I].label,type:C.typeStr2Type(D[I].typeStr),directions:D[I].directions,widthInColumns:1};break;case 26:C.getLogger().debug("APA123",this?this:"na"),C.getLogger().debug("COLUMNS: ",D[I]),this.$={type:"column-setting",columns:D[I]==="auto"?-1:parseInt(D[I])};break;case 27:C.getLogger().debug("Rule: id-block statement : ",D[I-2],D[I-1]);let R=C.generateId();this.$={...D[I-2],type:"composite",children:D[I-1]};break;case 28:C.getLogger().debug("Rule: blockStatement : ",D[I-2],D[I-1],D[I]);let N=C.generateId();this.$={id:N,type:"composite",label:"",children:D[I-1]};break;case 29:C.getLogger().debug("Rule: node (NODE_ID separator): ",D[I]),this.$={id:D[I]};break;case 30:C.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",D[I-1],D[I]),this.$={id:D[I-1],label:D[I].label,typeStr:D[I].typeStr,directions:D[I].directions};break;case 31:C.getLogger().debug("Rule: dirList: ",D[I]),this.$=[D[I]];break;case 32:C.getLogger().debug("Rule: dirList: ",D[I-1],D[I]),this.$=[D[I-1]].concat(D[I]);break;case 33:C.getLogger().debug("Rule: nodeShapeNLabel: ",D[I-2],D[I-1],D[I]),this.$={typeStr:D[I-2]+D[I],label:D[I-1]};break;case 34:C.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",D[I-3],D[I-2]," #3:",D[I-1],D[I]),this.$={typeStr:D[I-3]+D[I],label:D[I-2],directions:D[I-1]};break;case 35:case 36:this.$={type:"classDef",id:D[I-1].trim(),css:D[I].trim()};break;case 37:this.$={type:"applyClass",id:D[I-1].trim(),styleClass:D[I].trim()};break;case 38:this.$={type:"applyStyles",id:D[I-1].trim(),stylesStr:D[I].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:i,31:a,39:s,43:o,46:l}),t(h,[2,16],{14:22,15:f,16:d}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:a},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(p,[2,24]),{10:e,11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(h,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:x(function(S,T){if(T.recoverable)this.trace(S);else{var k=new Error(S);throw k.hash=T,k}},"parseError"),parse:x(function(S){var T=this,k=[0],C=[],L=[null],D=[],M=this.table,I="",E=0,_=0,A=0,R=2,N=1,O=D.slice.call(arguments,1),P=Object.create(this.lexer),B={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(B.yy[G]=this.yy[G]);P.setInput(S,B.yy),B.yy.lexer=P,B.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var F=P.yylloc;D.push(F);var q=P.options&&P.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(we){k.length=k.length-2*we,L.length=L.length-we,D.length=D.length-we}x(j,"popStack");function J(){var we;return we=C.pop()||P.lex()||N,typeof we!="number"&&(we instanceof Array&&(C=we,we=C.pop()),we=T.symbols_[we]||we),we}x(J,"lex");for(var H,he,Z,fe,ne,re,ee={},K,le,Q,ge;;){if(Z=k[k.length-1],this.defaultActions[Z]?fe=this.defaultActions[Z]:((H===null||typeof H>"u")&&(H=J()),fe=M[Z]&&M[Z][H]),typeof fe>"u"||!fe.length||!fe[0]){var ie="";ge=[];for(K in M[Z])this.terminals_[K]&&K>R&&ge.push("'"+this.terminals_[K]+"'");P.showPosition?ie="Parse error on line "+(E+1)+`: `+P.showPosition()+` Expecting `+ge.join(", ")+", got '"+(this.terminals_[H]||H)+"'":ie="Parse error on line "+(E+1)+": Unexpected "+(H==N?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(ie,{text:P.match,token:this.terminals_[H]||H,line:P.yylineno,loc:F,expected:ge})}if(fe[0]instanceof Array&&fe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+H);switch(fe[0]){case 1:k.push(H),L.push(P.yytext),D.push(P.yylloc),k.push(fe[1]),H=null,he?(H=he,he=null):(_=P.yyleng,I=P.yytext,E=P.yylineno,F=P.yylloc,A>0&&A--);break;case 2:if(le=this.productions_[fe[1]][1],ee.$=L[L.length-le],ee._$={first_line:D[D.length-(le||1)].first_line,last_line:D[D.length-1].last_line,first_column:D[D.length-(le||1)].first_column,last_column:D[D.length-1].last_column},q&&(ee._$.range=[D[D.length-(le||1)].range[0],D[D.length-1].range[1]]),re=this.performAction.apply(ee,[I,_,E,B.yy,fe[1],L,D].concat(O)),typeof re<"u")return re;le&&(k=k.slice(0,-1*le*2),L=L.slice(0,-1*le),D=D.slice(0,-1*le)),k.push(this.productions_[fe[1]][0]),L.push(ee.$),D.push(ee._$),Q=M[k[k.length-2]][k[k.length-1]],k.push(Q);break;case 3:return!0}}return!0},"parse")},v=(function(){var w={EOF:1,parseError:x(function(T,k){if(this.yy.parser)this.yy.parser.parseError(T,k);else throw new Error(T)},"parseError"),setInput:x(function(S,T){return this.yy=T||this.yy||{},this._input=S,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:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var T=S.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:x(function(S){var T=S.length,k=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var C=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),k.length-1&&(this.yylineno-=k.length-1);var L=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:k?(k.length===C.length?this.yylloc.first_column:0)+C[C.length-k.length].length-k[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),T=new Array(S.length+1).join("-");return S+this.upcomingInput()+` `+T+"^"},"showPosition"),test_match:x(function(S,T){var k,C,L;if(this.options.backtrack_lexer&&(L={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&&(L.yylloc.range=this.yylloc.range.slice(0))),C=S[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,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(S[0].length),this.matched+=S[0],k=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var D in L)this[D]=L[D];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,T,k,C;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),D=0;DT[0].length)){if(T=k,C=D,this.options.backtrack_lexer){if(S=this.test_match(k,L[D]),S!==!1)return S;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(S=this.test_match(T,L[C]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var T=this.next();return T||this.lex()},"lex"),begin:x(function(T){this.conditionStack.push(T)},"begin"),popState:x(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:x(function(T){this.begin(T)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(T,k,C,L){var D=L;switch(C){case 0:return T.getLogger().debug("Found block-beta"),10;break;case 1:return T.getLogger().debug("Found id-block"),29;break;case 2:return T.getLogger().debug("Found block"),10;break;case 3:T.getLogger().debug(".",k.yytext);break;case 4:T.getLogger().debug("_",k.yytext);break;case 5:return 5;case 6:return k.yytext=-1,28;break;case 7:return k.yytext=k.yytext.replace(/columns\s+/,""),T.getLogger().debug("COLUMNS (LEX)",k.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:T.getLogger().debug("LEX: POPPING STR:",k.yytext),this.popState();break;case 13:return T.getLogger().debug("LEX: STR end:",k.yytext),"STR";break;case 14:return k.yytext=k.yytext.replace(/space\:/,""),T.getLogger().debug("SPACE NUM (LEX)",k.yytext),21;break;case 15:return k.yytext="1",T.getLogger().debug("COLUMNS (LEX)",k.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),T.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),T.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),T.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),T.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),T.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),T.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),T.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),T.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),T.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),T.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return T.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return T.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return T.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return T.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return T.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return T.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return T.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),T.getLogger().debug("LEX ARR START"),37;break;case 74:return T.getLogger().debug("Lex: NODE_ID",k.yytext),31;break;case 75:return T.getLogger().debug("Lex: EOF",k.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:T.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:T.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return T.getLogger().debug("LEX: NODE_DESCR:",k.yytext),"NODE_DESCR";break;case 83:T.getLogger().debug("LEX POPPING"),this.popState();break;case 84:T.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return k.yytext=k.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (right): dir:",k.yytext),"DIR";break;case 86:return k.yytext=k.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (left):",k.yytext),"DIR";break;case 87:return k.yytext=k.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (x):",k.yytext),"DIR";break;case 88:return k.yytext=k.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (y):",k.yytext),"DIR";break;case 89:return k.yytext=k.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (up):",k.yytext),"DIR";break;case 90:return k.yytext=k.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (down):",k.yytext),"DIR";break;case 91:return k.yytext="]>",T.getLogger().debug("Lex (ARROW_DIR end):",k.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return T.getLogger().debug("Lex: LINK","#"+k.yytext+"#"),15;break;case 93:return T.getLogger().debug("Lex: LINK",k.yytext),15;break;case 94:return T.getLogger().debug("Lex: LINK",k.yytext),15;break;case 95:return T.getLogger().debug("Lex: LINK",k.yytext),15;break;case 96:return T.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 97:return T.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 98:return T.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return T.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),T.getLogger().debug("Lex: LINK","#"+k.yytext+"#"),15;break;case 102:return this.popState(),T.getLogger().debug("Lex: LINK",k.yytext),15;break;case 103:return this.popState(),T.getLogger().debug("Lex: LINK",k.yytext),15;break;case 104:return T.getLogger().debug("Lex: COLON",k.yytext),k.yytext=k.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return w})();y.lexer=v;function b(){this.yy={}}return x(b,"Parser"),b.prototype=y,y.Parser=b,new b})();nq.parser=nq;qit=nq,Tc=new Map,lq=[],iq=new Map,E5e="color",S5e="fill",Vit="bgFill",I5e=",",Uit=Te(),pA=new Map,Wit=x(t=>tt.sanitizeText(t,Uit),"sanitizeText"),Hit=x(function(t,e=""){let r=pA.get(t);r||(r={id:t,styles:[],textStyles:[]},pA.set(t,r)),e?.split(I5e).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(E5e).exec(n)){let s=i.replace(S5e,Vit).replace(E5e,S5e);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Yit=x(function(t,e=""){let r=Tc.get(t);e!=null&&(r.styles=e.split(I5e))},"addStyle2Node"),Xit=x(function(t,e){t.split(",").forEach(function(r){let n=Tc.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Tc.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),M5e=x((t,e)=>{let r=t.flat(),n=[],a=r.find(s=>s?.type==="column-setting")?.columns??-1;for(let s of r){if(typeof a=="number"&&a>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>a&&te.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=Wit(s.label)),s.type==="classDef"){Hit(s.id,s.css);continue}if(s.type==="applyClass"){Xit(s.id,s?.styleClass??"");continue}if(s.type==="applyStyles"){s?.stylesStr&&Yit(s.id,s?.stylesStr);continue}if(s.type==="column-setting")e.columns=s.columns??-1;else if(s.type==="edge"){let o=(iq.get(s.id)??0)+1;iq.set(s.id,o),s.id=o+"-"+s.id,lq.push(s)}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);let o=Tc.get(s.id);if(o===void 0?Tc.set(s.id,s):(s.type!=="na"&&(o.type=s.type),s.label!==s.id&&(o.label=s.label)),s.children&&M5e(s.children,s),s.type==="space"){let l=s.width??1;for(let u=0;u{te.debug("Clear called"),kr(),N3={id:"root",type:"composite",children:[],columns:-1},Tc=new Map([["root",N3]]),cq=[],pA=new Map,lq=[],iq=new Map},"clear");x(O5e,"typeStr2Type");x(P5e,"edgeTypeStr2Type");x(B5e,"edgeStrToEdgeData");C5e=0,Kit=x(()=>(C5e++,"id-"+Math.random().toString(36).substr(2,12)+"-"+C5e),"generateId"),Zit=x(t=>{N3.children=t,M5e(t,N3),cq=N3.children},"setHierarchy"),Qit=x(t=>{let e=Tc.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),Jit=x(()=>[...Tc.values()],"getBlocksFlat"),eat=x(()=>cq||[],"getBlocks"),tat=x(()=>lq,"getEdges"),rat=x(t=>Tc.get(t),"getBlock"),nat=x(t=>{Tc.set(t.id,t)},"setBlock"),iat=x(()=>te,"getLogger"),aat=x(function(){return pA},"getClasses"),sat={getConfig:x(()=>fr().block,"getConfig"),typeStr2Type:O5e,edgeTypeStr2Type:P5e,edgeStrToEdgeData:B5e,getLogger:iat,getBlocksFlat:Jit,getBlocks:eat,getEdges:tat,setHierarchy:Zit,getBlock:rat,setBlock:nat,getColumns:Qit,getClasses:aat,clear:jit,generateId:Kit},oat=sat,fA=x((t,e)=>{let r=up,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return cs(n,i,a,e)},"fade"),lat=x(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .cluster-label text { fill: ${t.titleColor}; } .cluster-label span,p { color: ${t.titleColor}; } .label text,span,p { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.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: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${fA(t.edgeLabelBackground,.5)}; // background-color: } .node .cluster { // fill: ${fA(t.mainBkg,.5)}; fill: ${fA(t.clusterBkg,.5)}; stroke: ${fA(t.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: ${t.titleColor}; } .cluster span,p { color: ${t.titleColor}; } /* .cluster div { color: ${t.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } ${Tu()} `,"getStyles"),cat=lat,uat=x((t,e,r,n)=>{e.forEach(i=>{bat[i](t,r,n)})},"insertMarkers"),hat=x((t,e,r)=>{te.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),fat=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),dat=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),pat=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),gat=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),mat=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),yat=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),vat=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),xat=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),bat={extension:hat,composition:fat,aggregation:dat,dependency:pat,lollipop:gat,point:mat,circle:yat,cross:vat,barb:xat},wat=uat,Li=Te()?.block?.padding??8;x(F5e,"calculateBlockPosition");Tat=x(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};te.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");x(gA,"setBlockSizes");x(uq,"layoutBlocks");x(hq,"findBounds");x($5e,"layout");x(aq,"applyStyle");x(z5e,"addHtmlLabel");kat=x(async(t,e,r,n)=>{let i=t||"";typeof i=="object"&&(i=i[0]);let a=Te();if(Kr(a.flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),te.debug("vertexText"+i);let s=await VT(Ks(i)),o={isNode:n,label:s,labelStyle:e.replace("fill:","color:")};return z5e(o,a)}else{let s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(let l of o){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),s.appendChild(u)}return s}},"createLabel"),Pl=kat,Eat=x((t,e,r,n,i)=>{e.arrowTypeStart&&A5e(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&A5e(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Sat={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},A5e=x((t,e,r,n,i,a)=>{let s=Sat[r];if(!s){te.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),sq={},os={},Cat=x(async(t,e)=>{let r=Te(),n=Kr(r.flowchart.htmlLabels),i=e.labelType==="markdown"?Ca(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await Pl(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();if(n){let u=i.children[0],h=Ye(i);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),sq[e.id]=a,e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=await Pl(e.startLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),os[e.id]||(os[e.id]={}),os[e.id].startLeft=h,D3(l,e.startLabelLeft)}if(e.startLabelRight){let u=await Pl(e.startLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),os[e.id]||(os[e.id]={}),os[e.id].startRight=h,D3(l,e.startLabelRight)}if(e.endLabelLeft){let u=await Pl(e.endLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),os[e.id]||(os[e.id]={}),os[e.id].endLeft=h,D3(l,e.endLabelLeft)}if(e.endLabelRight){let u=await Pl(e.endLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),os[e.id]||(os[e.id]={}),os[e.id].endRight=h,D3(l,e.endLabelRight)}return i},"insertEdgeLabel");x(D3,"setTerminalWidth");Aat=x((t,e)=>{te.debug("Moving label abc88 ",t.id,t.label,sq[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Te(),{subGraphTitleTotalMargin:i}=hh(n);if(t.label){let a=sq[t.id],s=t.x,o=t.y;if(r){let l=Ut.calcLabelPosition(r);te.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=os[t.id].startLeft,s=t.x,o=t.y;if(r){let l=Ut.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=os[t.id].startRight,s=t.x,o=t.y;if(r){let l=Ut.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=os[t.id].endLeft,s=t.x,o=t.y;if(r){let l=Ut.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=os[t.id].endRight,s=t.x,o=t.y;if(r){let l=Ut.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),_at=x((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),Lat=x((t,e,r)=>{te.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{te.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!_at(e,a)&&!i){let s=Lat(e,n,a),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),Rat=x(function(t,e,r,n,i,a,s){let o=r.points;te.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1,u=a.node(e.v);var h=a.node(e.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(te.debug("to cluster abc88",n[r.toCluster]),o=_5e(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(te.debug("from cluster abc88",n[r.fromCluster]),o=_5e(o.reverse(),n[r.fromCluster].node).reverse(),l=!0);let f=o.filter(S=>!Number.isNaN(S.y)),d=Yl;r.curve&&(i==="graph"||i==="flowchart")&&(d=r.curve);let{x:p,y:g}=sT(r),m=Wc().x(p).y(g).curve(d),y;switch(r.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-thick";break;default:y=""}switch(r.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break}let v=t.append("path").attr("d",m(f)).attr("id",r.id).attr("class"," "+y+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(Te().flowchart.arrowMarkerAbsolute||Te().state.arrowMarkerAbsolute)&&(b=xp(!0)),Eat(v,r,b,s,i);let w={};return l&&(w.updatedPath=o),w.originalPath=r.points,w},"insertEdge"),Dat=x(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),Nat=x((t,e,r)=>{let n=Dat(t),i=2,a=e.height+2*r.padding,s=a/i,o=e.width+2*s+r.padding,l=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-a/3},{x:o+2*l,y:-a/2},{x:o,y:-2*a/3},{x:o,y:-a},{x:o-s,y:-a},{x:o/2,y:-a-2*l},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*l,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:o-s,y:-a},{x:o,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:o,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-a}]:n.has("left")&&n.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-a}]:n.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a+l}]:n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l}]:n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");x(G5e,"intersectNode");Iat=G5e;x(q5e,"intersectEllipse");V5e=q5e;x(U5e,"intersectCircle");Mat=U5e;x(W5e,"intersectLine");x(oq,"sameSign");Oat=W5e,Pat=H5e;x(H5e,"intersectPolygon");Bat=x((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),Fat=Bat,ii={node:Iat,circle:Mat,ellipse:V5e,polygon:Pat,rect:Fat},pa=x(async(t,e,r,n)=>{let i=Te(),a,s=e.useHtmlLabels||Kr(i.flowchart.htmlLabels);r?a=r:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),u;e.labelText===void 0?u="":u=typeof e.labelText=="string"?e.labelText:e.labelText[0];let h=l.node(),f;e.labelType==="markdown"?f=Ca(l,ur(Ks(u),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):f=h.appendChild(await Pl(ur(Ks(u),i),e.labelStyle,!1,n));let d=f.getBBox(),p=e.padding/2;if(Kr(i.flowchart.htmlLabels)){let g=f.children[0],m=Ye(f),y=g.getElementsByTagName("img");if(y){let v=u.replace(/]*>/g,"").trim()==="";await Promise.all([...y].map(b=>new Promise(w=>{function S(){if(b.style.display="flex",b.style.flexDirection="column",v){let T=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,C=parseInt(T,10)*5+"px";b.style.minWidth=C,b.style.maxWidth=C}else b.style.width="100%";w(b)}x(S,"setupImage"),setTimeout(()=>{b.complete&&S()}),b.addEventListener("error",S),b.addEventListener("load",S)})))}d=g.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),Ti=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");x(kc,"insertPolygonShape");$at=x(async(t,e)=>{e.useHtmlLabels||Te().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await pa(t,e,"node "+e.classes,!0);te.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ti(e,s),e.intersect=function(o){return ii.rect(e,o)},n},"note"),zat=$at,L5e=x(t=>t?" "+t:"","formatClass"),Ho=x((t,e)=>`${e||"node default"}${L5e(t.classes)} ${L5e(t.class)}`,"getClassesFromNode"),R5e=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];te.info("Question main (Circle)");let l=kc(r,s,s,o);return l.attr("style",e.style),Ti(e,l),e.intersect=function(u){return te.warn("Intersect called"),ii.polygon(e,o,u)},r},"question"),Gat=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return ii.circle(e,14,s)},r},"choice"),qat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=kc(r,o,a,l);return u.attr("style",e.style),Ti(e,u),e.intersect=function(h){return ii.polygon(e,l,h)},r},"hexagon"),Vat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,o=n.width+2*s+e.padding,l=Nat(e.directions,n,e),u=kc(r,o,a,l);return u.attr("style",e.style),Ti(e,u),e.intersect=function(h){return ii.polygon(e,l,h)},r},"block_arrow"),Uat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return kc(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(l){return ii.polygon(e,s,l)},r},"rect_left_inv_arrow"),Wat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=kc(r,i,a,s);return o.attr("style",e.style),Ti(e,o),e.intersect=function(l){return ii.polygon(e,s,l)},r},"lean_right"),Hat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=kc(r,i,a,s);return o.attr("style",e.style),Ti(e,o),e.intersect=function(l){return ii.polygon(e,s,l)},r},"lean_left"),Yat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=kc(r,i,a,s);return o.attr("style",e.style),Ti(e,o),e.intersect=function(l){return ii.polygon(e,s,l)},r},"trapezoid"),Xat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=kc(r,i,a,s);return o.attr("style",e.style),Ti(e,o),e.intersect=function(l){return ii.polygon(e,s,l)},r},"inv_trapezoid"),jat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=kc(r,i,a,s);return o.attr("style",e.style),Ti(e,o),e.intersect=function(l){return ii.polygon(e,s,l)},r},"rect_right_inv_arrow"),Kat=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return Ti(e,u),e.intersect=function(h){let f=ii.rect(e,h),d=f.x-e.x;if(a!=0&&(Math.abs(d)e.height/2-s)){let p=s*s*(1-d*d/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),Zat=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await pa(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(mA(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{te.warn(`Unknown node property ${f}`)})}return Ti(e,a),e.intersect=function(h){return ii.rect(e,h)},r},"rect"),Qat=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await pa(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(mA(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{te.warn(`Unknown node property ${f}`)})}return Ti(e,a),e.intersect=function(h){return ii.rect(e,h)},r},"composite"),Jat=x(async(t,e)=>{let{shapeSvg:r}=await pa(t,e,"label",!0);te.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(mA(n,e.props.borders,i,a),s.delete("borders")),s.forEach(o=>{te.warn(`Unknown node property ${o}`)})}return Ti(e,n),e.intersect=function(s){return ii.rect(e,s)},r},"labelRect");x(mA,"applyNodePropertyBorders");est=x(async(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l="";typeof o=="object"?l=o[0]:l=o,te.info("Label text abc79",l,o,typeof o=="object");let u=s.node().appendChild(await Pl(l,e.labelStyle,!0,!0)),h={width:0,height:0};if(Kr(Te().flowchart.htmlLabels)){let m=u.children[0],y=Ye(u);h=m.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}te.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=s.node().appendChild(await Pl(f.join?f.join("
"):f,e.labelStyle,!0,!0));if(Kr(Te().flowchart.htmlLabels)){let m=p.children[0],y=Ye(p);h=m.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}let g=e.padding/2;return Ye(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+g+5)+")"),Ye(u).attr("transform","translate( "+(h.width{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return Ti(e,s),e.intersect=function(o){return ii.rect(e,o)},r},"stadium"),rst=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await pa(t,e,Ho(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),te.info("Circle main"),Ti(e,a),e.intersect=function(s){return te.info("Circle intersect",e,n.width/2+i,s),ii.circle(e,n.width/2+i,s)},r},"circle"),nst=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await pa(t,e,Ho(e,void 0),!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),te.info("DoubleCircle main"),Ti(e,o),e.intersect=function(u){return te.info("DoubleCircle intersect",e,n.width/2+i+a,u),ii.circle(e,n.width/2+i+a,u)},r},"doublecircle"),ist=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await pa(t,e,Ho(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=kc(r,i,a,s);return o.attr("style",e.style),Ti(e,o),e.intersect=function(l){return ii.polygon(e,s,l)},r},"subroutine"),ast=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ti(e,n),e.intersect=function(i){return ii.circle(e,7,i)},r},"start"),D5e=x((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Ti(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return ii.rect(e,o)},n},"forkJoin"),sst=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ti(e,i),e.intersect=function(a){return ii.circle(e,7,a)},r},"end"),ost=x(async(t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=n,d=s.insert("g").attr("class","label"),p=0,g=e.classData.annotations?.[0],m=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",y=d.node().appendChild(await Pl(m,e.labelStyle,!0,!0)),v=y.getBBox();if(Kr(Te().flowchart.htmlLabels)){let L=y.children[0],D=Ye(y);v=L.getBoundingClientRect(),D.attr("width",v.width),D.attr("height",v.height)}e.classData.annotations[0]&&(f+=v.height+n,h+=v.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(Te().flowchart.htmlLabels?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");let w=d.node().appendChild(await Pl(b,e.labelStyle,!0,!0));Ye(w).attr("class","classTitle");let S=w.getBBox();if(Kr(Te().flowchart.htmlLabels)){let L=w.children[0],D=Ye(w);S=L.getBoundingClientRect(),D.attr("width",S.width),D.attr("height",S.height)}f+=S.height+n,S.width>h&&(h=S.width);let T=[];e.classData.members.forEach(async L=>{let D=L.getDisplayDetails(),M=D.displayText;Te().flowchart.htmlLabels&&(M=M.replace(//g,">"));let I=d.node().appendChild(await Pl(M,D.cssStyle?D.cssStyle:e.labelStyle,!0,!0)),E=I.getBBox();if(Kr(Te().flowchart.htmlLabels)){let _=I.children[0],A=Ye(I);E=_.getBoundingClientRect(),A.attr("width",E.width),A.attr("height",E.height)}E.width>h&&(h=E.width),f+=E.height+n,T.push(I)}),f+=i;let k=[];if(e.classData.methods.forEach(async L=>{let D=L.getDisplayDetails(),M=D.displayText;Te().flowchart.htmlLabels&&(M=M.replace(//g,">"));let I=d.node().appendChild(await Pl(M,D.cssStyle?D.cssStyle:e.labelStyle,!0,!0)),E=I.getBBox();if(Kr(Te().flowchart.htmlLabels)){let _=I.children[0],A=Ye(I);E=_.getBoundingClientRect(),A.attr("width",E.width),A.attr("height",E.height)}E.width>h&&(h=E.width),f+=E.height+n,k.push(I)}),f+=i,g){let L=(h-v.width)/2;Ye(y).attr("transform","translate( "+(-1*h/2+L)+", "+-1*f/2+")"),p=v.height+n}let C=(h-S.width)/2;return Ye(w).attr("transform","translate( "+(-1*h/2+C)+", "+(-1*f/2+p)+")"),p+=S.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,T.forEach(L=>{Ye(L).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+i/2)+")");let D=L?.getBBox();p+=(D?.height??0)+n}),p+=i,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,k.forEach(L=>{Ye(L).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let D=L?.getBBox();p+=(D?.height??0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+e.padding).attr("height",f+e.padding),Ti(e,o),e.intersect=function(L){return ii.rect(e,L)},s},"class_box"),N5e={rhombus:R5e,composite:Qat,question:R5e,rect:Zat,labelRect:Jat,rectWithTitle:est,choice:Gat,circle:rst,doublecircle:nst,stadium:tst,hexagon:qat,block_arrow:Vat,rect_left_inv_arrow:Uat,lean_right:Wat,lean_left:Hat,trapezoid:Yat,inv_trapezoid:Xat,rect_right_inv_arrow:jat,cylinder:Kat,start:ast,end:sst,note:zat,subroutine:ist,fork:D5e,join:D5e,class_box:ost},dA={},Y5e=x(async(t,e,r)=>{let n,i;if(e.link){let a;Te().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await N5e[e.shape](n,e,r)}else i=await N5e[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),dA[e.id]=n,e.haveCallback&&dA[e.id].attr("class",dA[e.id].attr("class")+" clickable"),n},"insertNode"),lst=x(t=>{let e=dA[t.id];te.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");x(fq,"getNodeFromBlock");x(X5e,"calculateBlockSize");x(j5e,"insertBlockPositioned");x(yA,"performOperations");x(K5e,"calculateBlockSizes");x(Z5e,"insertBlocks");x(Q5e,"insertEdges");cst=x(function(t,e){return e.db.getClasses()},"getClasses"),ust=x(async function(t,e,r,n){let{securityLevel:i,block:a}=fr(),s=n.db,o;i==="sandbox"&&(o=Ye("#i"+e));let l=i==="sandbox"?Ye(o.nodes()[0].contentDocument.body):Ye("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):Ye(`[id="${e}"]`);wat(u,["point","circle","cross"],n.type,e);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),g=u.insert("g").attr("class","block");await K5e(g,f,s);let m=$5e(s);if(await Z5e(g,f,s),await Q5e(g,p,d,s,e),m){let y=m,v=Math.max(1,Math.round(.125*(y.width/y.height))),b=y.height+v+10,w=y.width+10,{useMaxWidth:S}=a;xn(u,b,w,!!S),te.debug("Here Bounds",m,y),u.attr("viewBox",`${y.x-5} ${y.y-5} ${y.width+10} ${y.height+10}`)}},"draw"),hst={draw:ust,getClasses:cst},fst={parser:qit,db:oat,renderer:hst,styles:cat}});var pq=Wt((I3,dq)=>{(function(e,r){typeof I3=="object"&&typeof dq=="object"?dq.exports=r():typeof define=="function"&&define.amd?define([],r):typeof I3=="object"?I3.layoutBase=r():e.layoutBase=r()})(I3,function(){return(function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)})([(function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s}),(function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u}),(function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i}),(function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,y){n.call(this,y),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,y){if(m==null&&y==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(b.source=m,b.target=y,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),y!=m&&y.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),v,b=y.length,w=0;w-1&&k>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(T,1),v.target!=v.source&&v.target.edges.splice(k,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,y,v,b,w=this.getNodes(),S=w.length,T=0;Ty&&(g=y),m>v&&(m=v)}return g==i.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,y=-i.MAX_VALUE,v=i.MAX_VALUE,b=-i.MAX_VALUE,w,S,T,k,C,L=this.nodes,D=L.length,M=0;Mw&&(m=w),yT&&(v=T),bw&&(m=w),yT&&(v=T),b=this.nodes.length){var D=0;y.forEach(function(M){M.owner==g&&D++}),D==this.nodes.length&&(this.isConnected=!0)}},t.exports=d}),(function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=L,!1;if(uh)return o[0]=d,o[1]=u,o[2]=k,o[3]=f,!1;if(lh?(o[0]=m,o[1]=y,E=!0):(o[0]=g,o[1]=p,E=!0):A===N&&(l>h?(o[0]=d,o[1]=p,E=!0):(o[0]=v,o[1]=y,E=!0)),-R===N?h>l?(o[2]=C,o[3]=L,_=!0):(o[2]=k,o[3]=T,_=!0):R===N&&(h>l?(o[2]=S,o[3]=T,_=!0):(o[2]=D,o[3]=L,_=!0)),E&&_)return!1;if(l>h?u>f?(O=this.getCardinalDirection(A,N,4),P=this.getCardinalDirection(R,N,2)):(O=this.getCardinalDirection(-A,N,3),P=this.getCardinalDirection(-R,N,1)):u>f?(O=this.getCardinalDirection(-A,N,1),P=this.getCardinalDirection(-R,N,3)):(O=this.getCardinalDirection(A,N,2),P=this.getCardinalDirection(R,N,4)),!E)switch(O){case 1:G=p,B=l+-w/N,o[0]=B,o[1]=G;break;case 2:B=v,G=u+b*N,o[0]=B,o[1]=G;break;case 3:G=y,B=l+w/N,o[0]=B,o[1]=G;break;case 4:B=m,G=u+-b*N,o[0]=B,o[1]=G;break}if(!_)switch(P){case 1:q=T,F=h+-I/N,o[2]=F,o[3]=q;break;case 2:F=D,q=f+M*N,o[2]=F,o[3]=q;break;case 3:q=L,F=h+I/N,o[2]=F,o[3]=q;break;case 4:F=C,q=f+-M*N,o[2]=F,o[3]=q;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,y=l.y,v=void 0,b=void 0,w=void 0,S=void 0,T=void 0,k=void 0,C=void 0,L=void 0,D=void 0;return w=d-h,T=u-f,C=f*h-u*d,S=y-g,k=p-m,L=m*g-p*y,D=w*k-S*T,D===0?null:(v=(T*L-k*C)/D,b=(S*C-w*L)/D,new n(v,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o=0){var y=(-p+Math.sqrt(p*p-4*d*g))/(2*d),v=(-p-Math.sqrt(p*p-4*d*g))/(2*d),b=null;return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:b}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i}),(function(t,e,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n}),(function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i}),(function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(w.push(T[0]);w.length>0&&g;){var k=w[0];w.splice(0,1),b.add(k);for(var C=k.getEdges(),v=0;v-1&&T.splice(I,1)}b=new Set,S=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),v=0;v0){for(var y=this.edgeToDummyNodes.get(m),v=0;v=0&&g.splice(L,1);var D=S.getNeighborsList();D.forEach(function(E){if(m.indexOf(E)<0){var _=y.get(E),A=_-1;A==1&&k.push(E),y.set(E,A)}})}m=m.concat(k),(g.length==1||g.length==2)&&(v=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d}),(function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n}),(function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i}),(function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,y,v=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pw||b>w)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*y)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(v>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=v.length||w>=v[0].length)){for(var S=0;Su}}]),o})();t.exports=s}),(function(t,e,r){"use strict";function n(){}n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=(function(lt){for(var ot=[];lt-- >0;)ot.push(0);return ot})(Math.min(this.m+1,this.n)),this.U=(function(lt){var ot=function dt(mt){if(mt.length==0)return 0;for(var yt=[],ut=0;ut0;)ot.push(0);return ot})(this.n),o=(function(lt){for(var ot=[];lt-- >0;)ot.push(0);return ot})(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;N--)if(this.s[N]!==0){for(var O=N+1;O=0;J--){if((function(lt,ot){return lt&&ot})(J0;){var Q=void 0,ge=void 0;for(Q=_-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(s[Q])<=le+K*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){s[Q]=0;break}if(Q===_-2)ge=4;else{var ie=void 0;for(ie=_-1;ie>=Q&&ie!==Q;ie--){var we=(ie!==_?Math.abs(s[ie]):0)+(ie!==Q+1?Math.abs(s[ie-1]):0);if(Math.abs(this.s[ie])<=le+K*we){this.s[ie]=0;break}}ie===Q?ge=3:ie===_-1?ge=1:(ge=2,Q=ie)}switch(Q++,ge){case 1:{var X=s[_-2];s[_-2]=0;for(var ze=_-2;ze>=Q;ze--){var ye=n.hypot(this.s[ze],X),Fe=this.s[ze]/ye,Xe=X/ye;if(this.s[ze]=ye,ze!==Q&&(X=-Xe*s[ze-1],s[ze-1]=Fe*s[ze-1]),u)for(var We=0;We=this.s[Q+1]);){var at=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=at,u&&QMath.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(e,r){typeof M3=="object"&&typeof gq=="object"?gq.exports=r(pq()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof M3=="object"?M3.coseBase=r(pq()):e.coseBase=r(e.layoutBase)})(M3,function(t){return(()=>{"use strict";var e={45:((a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l}),806:((a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u}),767:((a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),880:((a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),578:((a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),765:((a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),g=o(902),m=o(551).FDLayoutConstants,y=o(551).LayoutConstants,v=o(551).Point,b=o(551).PointD,w=o(551).DimensionD,S=o(551).Layout,T=o(551).Integer,k=o(551).IGeometry,C=o(551).LGraph,L=o(551).Transform,D=o(551).LinkedList;function M(){l.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(l.prototype);for(var I in l)M[I]=l[I];M.prototype.newGraphManager=function(){var E=new u(this);return this.graphManager=E,E},M.prototype.newGraph=function(E){return new h(null,this.graphManager,E)},M.prototype.newNode=function(E){return new f(this.graphManager,E)},M.prototype.newEdge=function(E){return new d(null,null,E)},M.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var E=y.DEFAULT_CREATE_BENDS_AS_NEEDED;return E&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var _=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(O){return _.has(O)});this.graphManager.setAllNodesToApplyGravitation(A)}}else{var E=this.getFlatForest();if(E.length>0)this.positionNodesRadially(E);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var _=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(R){return _.has(R)});this.graphManager.setAllNodesToApplyGravitation(A),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(N){return E.has(N)});this.graphManager.setAllNodesToApplyGravitation(_),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var A=!this.isTreeGrowing&&!this.isGrowthFinished,R=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(A,R),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var E=this.graphManager.getAllNodes(),_={},A=0;A0&&this.updateDisplacements();for(var A=0;A0&&(R.fixedNodeWeight=O)}}if(this.constraints.relativePlacementConstraint){var P=new Map,B=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(Z){E.fixedNodesOnHorizontal.add(Z),E.fixedNodesOnVertical.add(Z)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,A=0;A=2*Z.length/3;re--)fe=Math.floor(Math.random()*(re+1)),ne=Z[re],Z[re]=Z[fe],Z[fe]=ne;return Z},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(Z){if(Z.left){var fe=P.has(Z.left)?P.get(Z.left):Z.left,ne=P.has(Z.right)?P.get(Z.right):Z.right;E.nodesInRelativeHorizontal.includes(fe)||(E.nodesInRelativeHorizontal.push(fe),E.nodeToRelativeConstraintMapHorizontal.set(fe,[]),E.dummyToNodeForVerticalAlignment.has(fe)?E.nodeToTempPositionMapHorizontal.set(fe,E.idToNodeMap.get(E.dummyToNodeForVerticalAlignment.get(fe)[0]).getCenterX()):E.nodeToTempPositionMapHorizontal.set(fe,E.idToNodeMap.get(fe).getCenterX())),E.nodesInRelativeHorizontal.includes(ne)||(E.nodesInRelativeHorizontal.push(ne),E.nodeToRelativeConstraintMapHorizontal.set(ne,[]),E.dummyToNodeForVerticalAlignment.has(ne)?E.nodeToTempPositionMapHorizontal.set(ne,E.idToNodeMap.get(E.dummyToNodeForVerticalAlignment.get(ne)[0]).getCenterX()):E.nodeToTempPositionMapHorizontal.set(ne,E.idToNodeMap.get(ne).getCenterX())),E.nodeToRelativeConstraintMapHorizontal.get(fe).push({right:ne,gap:Z.gap}),E.nodeToRelativeConstraintMapHorizontal.get(ne).push({left:fe,gap:Z.gap})}else{var re=B.has(Z.top)?B.get(Z.top):Z.top,ee=B.has(Z.bottom)?B.get(Z.bottom):Z.bottom;E.nodesInRelativeVertical.includes(re)||(E.nodesInRelativeVertical.push(re),E.nodeToRelativeConstraintMapVertical.set(re,[]),E.dummyToNodeForHorizontalAlignment.has(re)?E.nodeToTempPositionMapVertical.set(re,E.idToNodeMap.get(E.dummyToNodeForHorizontalAlignment.get(re)[0]).getCenterY()):E.nodeToTempPositionMapVertical.set(re,E.idToNodeMap.get(re).getCenterY())),E.nodesInRelativeVertical.includes(ee)||(E.nodesInRelativeVertical.push(ee),E.nodeToRelativeConstraintMapVertical.set(ee,[]),E.dummyToNodeForHorizontalAlignment.has(ee)?E.nodeToTempPositionMapVertical.set(ee,E.idToNodeMap.get(E.dummyToNodeForHorizontalAlignment.get(ee)[0]).getCenterY()):E.nodeToTempPositionMapVertical.set(ee,E.idToNodeMap.get(ee).getCenterY())),E.nodeToRelativeConstraintMapVertical.get(re).push({bottom:ee,gap:Z.gap}),E.nodeToRelativeConstraintMapVertical.get(ee).push({top:re,gap:Z.gap})}});else{var q=new Map,j=new Map;this.constraints.relativePlacementConstraint.forEach(function(Z){if(Z.left){var fe=P.has(Z.left)?P.get(Z.left):Z.left,ne=P.has(Z.right)?P.get(Z.right):Z.right;q.has(fe)?q.get(fe).push(ne):q.set(fe,[ne]),q.has(ne)?q.get(ne).push(fe):q.set(ne,[fe])}else{var re=B.has(Z.top)?B.get(Z.top):Z.top,ee=B.has(Z.bottom)?B.get(Z.bottom):Z.bottom;j.has(re)?j.get(re).push(ee):j.set(re,[ee]),j.has(ee)?j.get(ee).push(re):j.set(ee,[re])}});var J=function(fe,ne){var re=[],ee=[],K=new D,le=new Set,Q=0;return fe.forEach(function(ge,ie){if(!le.has(ie)){re[Q]=[],ee[Q]=!1;var we=ie;for(K.push(we),le.add(we),re[Q].push(we);K.length!=0;){we=K.shift(),ne.has(we)&&(ee[Q]=!0);var X=fe.get(we);X.forEach(function(ze){le.has(ze)||(K.push(ze),le.add(ze),re[Q].push(ze))})}Q++}}),{components:re,isFixed:ee}},H=J(q,E.fixedNodesOnHorizontal);this.componentsOnHorizontal=H.components,this.fixedComponentsOnHorizontal=H.isFixed;var he=J(j,E.fixedNodesOnVertical);this.componentsOnVertical=he.components,this.fixedComponentsOnVertical=he.isFixed}}},M.prototype.updateDisplacements=function(){var E=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(he){var Z=E.idToNodeMap.get(he.nodeId);Z.displacementX=0,Z.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var _=this.constraints.alignmentConstraint.vertical,A=0;A<_.length;A++){for(var R=0,N=0;N<_[A].length;N++){if(this.fixedNodeSet.has(_[A][N])){R=0;break}R+=this.idToNodeMap.get(_[A][N]).displacementX}for(var O=R/_[A].length,N=0;N<_[A].length;N++)this.idToNodeMap.get(_[A][N]).displacementX=O}if(this.constraints.alignmentConstraint.horizontal)for(var P=this.constraints.alignmentConstraint.horizontal,A=0;A1){var B;for(B=0;BR&&(R=Math.floor(P.y)),O=Math.floor(P.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(y.WORLD_CENTER_X-P.x/2,y.WORLD_CENTER_Y-P.y/2))},M.radialLayout=function(E,_,A){var R=Math.max(this.maxDiagonalInTree(E),p.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(_,null,0,359,0,R);var N=C.calculateBounds(E),O=new L;O.setDeviceOrgX(N.getMinX()),O.setDeviceOrgY(N.getMinY()),O.setWorldOrgX(A.x),O.setWorldOrgY(A.y);for(var P=0;P1;){var re=ne[0];ne.splice(0,1);var ee=J.indexOf(re);ee>=0&&J.splice(ee,1),Z--,H--}_!=null?fe=(J.indexOf(ne[0])+1)%Z:fe=0;for(var K=Math.abs(R-A)/H,le=fe;he!=H;le=++le%Z){var Q=J[le].getOtherEnd(E);if(Q!=_){var ge=(A+he*K)%360,ie=(ge+K)%360;M.branchRadialLayout(Q,E,ge,ie,N+O,O),he++}}},M.maxDiagonalInTree=function(E){for(var _=T.MIN_VALUE,A=0;A_&&(_=N)}return _},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var E=this,_={};this.memberGroups={},this.idToDummyNode={};for(var A=[],R=this.graphManager.getAllNodes(),N=0;N"u"&&(_[B]=[]),_[B]=_[B].concat(O)}Object.keys(_).forEach(function(G){if(_[G].length>1){var F="DummyCompound_"+G;E.memberGroups[F]=_[G];var q=_[G][0].getParent(),j=new f(E.graphManager);j.id=F,j.paddingLeft=q.paddingLeft||0,j.paddingRight=q.paddingRight||0,j.paddingBottom=q.paddingBottom||0,j.paddingTop=q.paddingTop||0,E.idToDummyNode[F]=j;var J=E.getGraphManager().add(E.newGraph(),j),H=q.getChild();H.add(j);for(var he=0;he<_[G].length;he++){var Z=_[G][he];H.remove(Z),J.add(Z)}}})},M.prototype.clearCompounds=function(){var E={},_={};this.performDFSOnCompounds();for(var A=0;AN?(R.rect.x-=(R.labelWidth-N)/2,R.setWidth(R.labelWidth),R.labelMarginLeft=(R.labelWidth-N)/2):R.labelPosHorizontal=="right"&&R.setWidth(N+R.labelWidth)),R.labelHeight&&(R.labelPosVertical=="top"?(R.rect.y-=R.labelHeight,R.setHeight(O+R.labelHeight),R.labelMarginTop=R.labelHeight):R.labelPosVertical=="center"&&R.labelHeight>O?(R.rect.y-=(R.labelHeight-O)/2,R.setHeight(R.labelHeight),R.labelMarginTop=(R.labelHeight-O)/2):R.labelPosVertical=="bottom"&&R.setHeight(O+R.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var E=this.compoundOrder.length-1;E>=0;E--){var _=this.compoundOrder[E],A=_.id,R=_.paddingLeft,N=_.paddingTop,O=_.labelMarginLeft,P=_.labelMarginTop;this.adjustLocations(this.tiledMemberPack[A],_.rect.x,_.rect.y,R,N,O,P)}},M.prototype.repopulateZeroDegreeMembers=function(){var E=this,_=this.tiledZeroDegreePack;Object.keys(_).forEach(function(A){var R=E.idToDummyNode[A],N=R.paddingLeft,O=R.paddingTop,P=R.labelMarginLeft,B=R.labelMarginTop;E.adjustLocations(_[A],R.rect.x,R.rect.y,N,O,P,B)})},M.prototype.getToBeTiled=function(E){var _=E.id;if(this.toBeTiled[_]!=null)return this.toBeTiled[_];var A=E.getChild();if(A==null)return this.toBeTiled[_]=!1,!1;for(var R=A.getNodes(),N=0;N0)return this.toBeTiled[_]=!1,!1;if(O.getChild()==null){this.toBeTiled[O.id]=!1;continue}if(!this.getToBeTiled(O))return this.toBeTiled[_]=!1,!1}return this.toBeTiled[_]=!0,!0},M.prototype.getNodeDegree=function(E){for(var _=E.id,A=E.getEdges(),R=0,N=0;Nq&&(q=J.rect.height)}A+=q+E.verticalPadding}},M.prototype.tileCompoundMembers=function(E,_){var A=this;this.tiledMemberPack=[],Object.keys(E).forEach(function(R){var N=_[R];if(A.tiledMemberPack[R]=A.tileNodes(E[R],N.paddingLeft+N.paddingRight),N.rect.width=A.tiledMemberPack[R].width,N.rect.height=A.tiledMemberPack[R].height,N.setCenter(A.tiledMemberPack[R].centerX,A.tiledMemberPack[R].centerY),N.labelMarginLeft=0,N.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var O=N.rect.width,P=N.rect.height;N.labelWidth&&(N.labelPosHorizontal=="left"?(N.rect.x-=N.labelWidth,N.setWidth(O+N.labelWidth),N.labelMarginLeft=N.labelWidth):N.labelPosHorizontal=="center"&&N.labelWidth>O?(N.rect.x-=(N.labelWidth-O)/2,N.setWidth(N.labelWidth),N.labelMarginLeft=(N.labelWidth-O)/2):N.labelPosHorizontal=="right"&&N.setWidth(O+N.labelWidth)),N.labelHeight&&(N.labelPosVertical=="top"?(N.rect.y-=N.labelHeight,N.setHeight(P+N.labelHeight),N.labelMarginTop=N.labelHeight):N.labelPosVertical=="center"&&N.labelHeight>P?(N.rect.y-=(N.labelHeight-P)/2,N.setHeight(N.labelHeight),N.labelMarginTop=(N.labelHeight-P)/2):N.labelPosVertical=="bottom"&&N.setHeight(P+N.labelHeight))}})},M.prototype.tileNodes=function(E,_){var A=this.tileNodesByFavoringDim(E,_,!0),R=this.tileNodesByFavoringDim(E,_,!1),N=this.getOrgRatio(A),O=this.getOrgRatio(R),P;return OB&&(B=he.getWidth())});var G=O/N,F=P/N,q=Math.pow(A-R,2)+4*(G+R)*(F+A)*N,j=(R-A+Math.sqrt(q))/(2*(G+R)),J;_?(J=Math.ceil(j),J==j&&J++):J=Math.floor(j);var H=J*(G+R)-R;return B>H&&(H=B),H+=R*2,H},M.prototype.tileNodesByFavoringDim=function(E,_,A){var R=p.TILING_PADDING_VERTICAL,N=p.TILING_PADDING_HORIZONTAL,O=p.TILING_COMPARE_BY,P={rows:[],rowWidth:[],rowHeight:[],width:0,height:_,verticalPadding:R,horizontalPadding:N,centerX:0,centerY:0};O&&(P.idealRowWidth=this.calcIdealRowWidth(E,A));var B=function(Z){return Z.rect.width*Z.rect.height},G=function(Z,fe){return B(fe)-B(Z)};E.sort(function(he,Z){var fe=G;return P.idealRowWidth?(fe=O,fe(he.id,Z.id)):fe(he,Z)});for(var F=0,q=0,j=0;j0&&(P+=E.horizontalPadding),E.rowWidth[A]=P,E.width0&&(B+=E.verticalPadding);var G=0;B>E.rowHeight[A]&&(G=E.rowHeight[A],E.rowHeight[A]=B,G=E.rowHeight[A]-G),E.height+=G,E.rows[A].push(_)},M.prototype.getShortestRowIndex=function(E){for(var _=-1,A=Number.MAX_VALUE,R=0;RA&&(_=R,A=E.rowWidth[R]);return _},M.prototype.canAddHorizontal=function(E,_,A){if(E.idealRowWidth){var R=E.rows.length-1,N=E.rowWidth[R];return N+_+E.horizontalPadding<=E.idealRowWidth}var O=this.getShortestRowIndex(E);if(O<0)return!0;var P=E.rowWidth[O];if(P+E.horizontalPadding+_<=E.width)return!0;var B=0;E.rowHeight[O]0&&(B=A+E.verticalPadding-E.rowHeight[O]);var G;E.width-P>=_+E.horizontalPadding?G=(E.height+B)/(P+_+E.horizontalPadding):G=(E.height+B)/E.width,B=A+E.verticalPadding;var F;return E.width<_?F=(E.height+B)/_:F=(E.height+B)/E.width,F<1&&(F=1/F),G<1&&(G=1/G),GO&&_!=A){R.splice(-1,1),E.rows[A].push(N),E.rowWidth[_]=E.rowWidth[_]-O,E.rowWidth[A]=E.rowWidth[A]+O,E.width=E.rowWidth[instance.getLongestRowIndex(E)];for(var P=Number.MIN_VALUE,B=0;BP&&(P=R[B].height);_>0&&(P+=E.verticalPadding);var G=E.rowHeight[_]+E.rowHeight[A];E.rowHeight[_]=P,E.rowHeight[A]0)for(var H=N;H<=O;H++)J[0]+=this.grid[H][P-1].length+this.grid[H][P].length-1;if(O0)for(var H=P;H<=B;H++)J[3]+=this.grid[N-1][H].length+this.grid[N][H].length-1;for(var he=T.MAX_VALUE,Z,fe,ne=0;ne{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,g,m){l.call(this,d,p,g,m)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var g=this.getChild().getNodes(),m,y=0;y{function l(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);m0){var Ke=0;Ge.forEach(function(at){ue=="horizontal"?(me.set(at,v.has(at)?b[v.get(at)]:se.get(at)),Ke+=me.get(at)):(me.set(at,v.has(at)?w[v.get(at)]:se.get(at)),Ke+=me.get(at))}),Ke=Ke/Ge.length,He.forEach(function(at){z.has(at)||me.set(at,Ke)})}else{var Ue=0;He.forEach(function(at){ue=="horizontal"?Ue+=v.has(at)?b[v.get(at)]:se.get(at):Ue+=v.has(at)?w[v.get(at)]:se.get(at)}),Ue=Ue/He.length,He.forEach(function(at){me.set(at,Ue)})}});for(var Pe=function(){var Ge=Ae.shift(),Ke=U.get(Ge);Ke.forEach(function(Ue){if(me.get(Ue.id)at&&(at=yt),utBt&&(Bt=ut)}}catch(kn){St=!0,lt=kn}finally{try{!gt&&ot.return&&ot.return()}finally{if(St)throw lt}}var Hr=(Ke+at)/2-(Ue+Bt)/2,Lt=!0,Yr=!1,Fr=void 0;try{for(var sr=He[Symbol.iterator](),nr;!(Lt=(nr=sr.next()).done);Lt=!0){var Tr=nr.value;me.set(Tr,me.get(Tr)+Hr)}}catch(kn){Yr=!0,Fr=kn}finally{try{!Lt&&sr.return&&sr.return()}finally{if(Yr)throw Fr}}})}return me},I=function(U){var ue=0,z=0,se=0,oe=0;if(U.forEach(function(_e){_e.left?b[v.get(_e.left)]-b[v.get(_e.right)]>=0?ue++:z++:w[v.get(_e.top)]-w[v.get(_e.bottom)]>=0?se++:oe++}),ue>z&&se>oe)for(var xe=0;xez)for(var pe=0;peoe)for(var me=0;me1)m.fixedNodeConstraint.forEach(function(ce,U){R[U]=[ce.position.x,ce.position.y],N[U]=[b[v.get(ce.nodeId)],w[v.get(ce.nodeId)]]}),O=!0;else if(m.alignmentConstraint)(function(){var ce=0;if(m.alignmentConstraint.vertical){for(var U=m.alignmentConstraint.vertical,ue=function(me){var _e=new Set;U[me].forEach(function(je){_e.add(je)});var Ae=new Set([].concat(l(_e)).filter(function(je){return B.has(je)})),Pe=void 0;Ae.size>0?Pe=b[v.get(Ae.values().next().value)]:Pe=D(_e).x,U[me].forEach(function(je){R[ce]=[Pe,w[v.get(je)]],N[ce]=[b[v.get(je)],w[v.get(je)]],ce++})},z=0;z0?Pe=b[v.get(Ae.values().next().value)]:Pe=D(_e).y,se[me].forEach(function(je){R[ce]=[b[v.get(je)],Pe],N[ce]=[b[v.get(je)],w[v.get(je)]],ce++})},xe=0;xej&&(j=q[H].length,J=H);if(j0){var Fe={x:0,y:0};m.fixedNodeConstraint.forEach(function(ce,U){var ue={x:b[v.get(ce.nodeId)],y:w[v.get(ce.nodeId)]},z=ce.position,se=L(z,ue);Fe.x+=se.x,Fe.y+=se.y}),Fe.x/=m.fixedNodeConstraint.length,Fe.y/=m.fixedNodeConstraint.length,b.forEach(function(ce,U){b[U]+=Fe.x}),w.forEach(function(ce,U){w[U]+=Fe.y}),m.fixedNodeConstraint.forEach(function(ce){b[v.get(ce.nodeId)]=ce.position.x,w[v.get(ce.nodeId)]=ce.position.y})}if(m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var Xe=m.alignmentConstraint.vertical,We=function(U){var ue=new Set;Xe[U].forEach(function(oe){ue.add(oe)});var z=new Set([].concat(l(ue)).filter(function(oe){return B.has(oe)})),se=void 0;z.size>0?se=b[v.get(z.values().next().value)]:se=D(ue).x,ue.forEach(function(oe){B.has(oe)||(b[v.get(oe)]=se)})},De=0;De0?se=w[v.get(z.values().next().value)]:se=D(ue).y,ue.forEach(function(oe){B.has(oe)||(w[v.get(oe)]=se)})},Se=0;Se{a.exports=t})},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(45);return i})()})});var twe=Wt((O3,yq)=>{(function(e,r){typeof O3=="object"&&typeof yq=="object"?yq.exports=r(mq()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof O3=="object"?O3.cytoscapeFcose=r(mq()):e.cytoscapeFcose=r(e.coseBase)})(O3,function(t){return(()=>{"use strict";var e={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=(function(){function f(d,p){var g=[],m=!0,y=!1,v=void 0;try{for(var b=d[Symbol.iterator](),w;!(m=(w=b.next()).done)&&(g.push(w.value),!(p&&g.length===p));m=!0);}catch(S){y=!0,v=S}finally{try{!m&&b.return&&b.return()}finally{if(y)throw v}}return g}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&O.merge(F)});for(var P=0;P1){w=v[0],S=w.connectedEdges().length,v.forEach(function(N){N.connectedEdges().length0&&g.set("dummy"+(g.size+1),C),L},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var b=!0,w=!1,S=void 0;try{for(var T=d.nodeIndexes[Symbol.iterator](),k;!(b=(k=T.next()).done);b=!0){var C=k.value,L=l(C,2),D=L[0],M=L[1],I=p.cy.getElementById(D);if(I){var E=I.boundingBox(),_=d.xCoords[M]-E.w/2,A=d.xCoords[M]+E.w/2,R=d.yCoords[M]-E.h/2,N=d.yCoords[M]+E.h/2;_m&&(m=A),Rv&&(v=N)}}}catch(F){w=!0,S=F}finally{try{!b&&T.return&&T.return()}finally{if(w)throw S}}var O=f.x-(m+g)/2,P=f.y-(v+y)/2;d.xCoords=d.xCoords.map(function(F){return F+O}),d.yCoords=d.yCoords.map(function(F){return F+P})}else{Object.keys(d).forEach(function(F){var q=d[F],j=q.getRect().x,J=q.getRect().x+q.getRect().width,H=q.getRect().y,he=q.getRect().y+q.getRect().height;jm&&(m=J),Hv&&(v=he)});var B=f.x-(m+g)/2,G=f.y-(v+y)/2;Object.keys(d).forEach(function(F){var q=d[F];q.setCenter(q.getCenterX()+B,q.getCenterY()+G)})}}},h.calcBoundingBox=function(f,d,p,g){for(var m=Number.MAX_SAFE_INTEGER,y=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,w=void 0,S=void 0,T=void 0,k=void 0,C=f.descendants().not(":parent"),L=C.length,D=0;Dw&&(m=w),yT&&(v=T),b{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,g=o(140).layoutBase.FDLayoutConstants,m=o(140).CoSEConstants,y=function(b,w){var S=b.cy,T=b.eles,k=T.nodes(),C=T.edges(),L=void 0,D=void 0,M=void 0,I={};b.randomize&&(L=w.nodeIndexes,D=w.xCoords,M=w.yCoords);var E=function(F){return typeof F=="function"},_=function(F,q){return E(F)?F(q):F},A=l.calcParentsWithoutChildren(S,T),R=function G(F,q,j,J){for(var H=q.length,he=0;he0){var K=void 0;K=j.getGraphManager().add(j.newGraph(),ne),G(K,fe,j,J)}}},N=function(F,q,j){for(var J=0,H=0,he=0;he0?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=J/H:E(b.idealEdgeLength)?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,m.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,m.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},O=function(F,q){q.fixedNodeConstraint&&(F.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(F.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(F.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};b.nestingFactor!=null&&(m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(m.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(m.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(m.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(m.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(m.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?p.QUALITY=2:p.QUALITY=0,m.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!b.randomize,m.ANIMATE=g.ANIMATE=p.ANIMATE=b.animate,m.TILE=b.tile,m.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,m.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,m.PURE_INCREMENTAL=!b.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!1),b.step=="enforced"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!1),b.step=="cose"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?m.TREE_REDUCTION_ON_INCREMENTAL=!1:m.TREE_REDUCTION_ON_INCREMENTAL=!0;var P=new u,B=P.newGraphManager();return R(B.addRoot(),l.getTopMostNodes(k),P,b),N(P,B,C),O(P,b),P.runLayout(),I};a.exports={coseLayout:y}}),212:((a,s,o)=>{var l=(function(){function b(w,S){for(var T=0;T0)if(N){var B=f.getTopMostNodes(T.eles.nodes());if(E=f.connectComponents(k,T.eles,B),E.forEach(function(we){var X=we.boundingBox();_.push({x:X.x1+X.w/2,y:X.y1+X.h/2})}),T.randomize&&E.forEach(function(we){T.eles=we,L.push(p(T))}),T.quality=="default"||T.quality=="proof"){var G=k.collection();if(T.tile){var F=new Map,q=[],j=[],J=0,H={nodeIndexes:F,xCoords:q,yCoords:j},he=[];if(E.forEach(function(we,X){we.edges().length==0&&(we.nodes().forEach(function(ze,ye){G.merge(we.nodes()[ye]),ze.isParent()||(H.nodeIndexes.set(we.nodes()[ye].id(),J++),H.xCoords.push(we.nodes()[0].position().x),H.yCoords.push(we.nodes()[0].position().y))}),he.push(X))}),G.length>1){var Z=G.boundingBox();_.push({x:Z.x1+Z.w/2,y:Z.y1+Z.h/2}),E.push(G),L.push(H);for(var fe=he.length-1;fe>=0;fe--)E.splice(he[fe],1),L.splice(he[fe],1),_.splice(he[fe],1)}}E.forEach(function(we,X){T.eles=we,I.push(m(T,L[X])),f.relocateComponent(_[X],I[X],T)})}else E.forEach(function(we,X){f.relocateComponent(_[X],L[X],T)});var ne=new Set;if(E.length>1){var re=[],ee=C.filter(function(we){return we.css("display")=="none"});E.forEach(function(we,X){var ze=void 0;if(T.quality=="draft"&&(ze=L[X].nodeIndexes),we.nodes().not(ee).length>0){var ye={};ye.edges=[],ye.nodes=[];var Fe=void 0;we.nodes().not(ee).forEach(function(Xe){if(T.quality=="draft")if(!Xe.isParent())Fe=ze.get(Xe.id()),ye.nodes.push({x:L[X].xCoords[Fe]-Xe.boundingbox().w/2,y:L[X].yCoords[Fe]-Xe.boundingbox().h/2,width:Xe.boundingbox().w,height:Xe.boundingbox().h});else{var We=f.calcBoundingBox(Xe,L[X].xCoords,L[X].yCoords,ze);ye.nodes.push({x:We.topLeftX,y:We.topLeftY,width:We.width,height:We.height})}else I[X][Xe.id()]&&ye.nodes.push({x:I[X][Xe.id()].getLeft(),y:I[X][Xe.id()].getTop(),width:I[X][Xe.id()].getWidth(),height:I[X][Xe.id()].getHeight()})}),we.edges().forEach(function(Xe){var We=Xe.source(),De=Xe.target();if(We.css("display")!="none"&&De.css("display")!="none")if(T.quality=="draft"){var Oe=ze.get(We.id()),Ie=ze.get(De.id()),Se=[],$e=[];if(We.isParent()){var Y=f.calcBoundingBox(We,L[X].xCoords,L[X].yCoords,ze);Se.push(Y.topLeftX+Y.width/2),Se.push(Y.topLeftY+Y.height/2)}else Se.push(L[X].xCoords[Oe]),Se.push(L[X].yCoords[Oe]);if(De.isParent()){var ce=f.calcBoundingBox(De,L[X].xCoords,L[X].yCoords,ze);$e.push(ce.topLeftX+ce.width/2),$e.push(ce.topLeftY+ce.height/2)}else $e.push(L[X].xCoords[Ie]),$e.push(L[X].yCoords[Ie]);ye.edges.push({startX:Se[0],startY:Se[1],endX:$e[0],endY:$e[1]})}else I[X][We.id()]&&I[X][De.id()]&&ye.edges.push({startX:I[X][We.id()].getCenterX(),startY:I[X][We.id()].getCenterY(),endX:I[X][De.id()].getCenterX(),endY:I[X][De.id()].getCenterY()})}),ye.nodes.length>0&&(re.push(ye),ne.add(X))}});var K=R.packComponents(re,T.randomize).shifts;if(T.quality=="draft")L.forEach(function(we,X){var ze=we.xCoords.map(function(Fe){return Fe+K[X].dx}),ye=we.yCoords.map(function(Fe){return Fe+K[X].dy});we.xCoords=ze,we.yCoords=ye});else{var le=0;ne.forEach(function(we){Object.keys(I[we]).forEach(function(X){var ze=I[we][X];ze.setCenter(ze.getCenterX()+K[le].dx,ze.getCenterY()+K[le].dy)}),le++})}}}else{var O=T.eles.boundingBox();if(_.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),T.randomize){var P=p(T);L.push(P)}T.quality=="default"||T.quality=="proof"?(I.push(m(T,L[0])),f.relocateComponent(_[0],I[0],T)):f.relocateComponent(_[0],L[0],T)}var Q=function(X,ze){if(T.quality=="default"||T.quality=="proof"){typeof X=="number"&&(X=ze);var ye=void 0,Fe=void 0,Xe=X.data("id");return I.forEach(function(De){Xe in De&&(ye={x:De[Xe].getRect().getCenterX(),y:De[Xe].getRect().getCenterY()},Fe=De[Xe])}),T.nodeDimensionsIncludeLabels&&(Fe.labelWidth&&(Fe.labelPosHorizontal=="left"?ye.x+=Fe.labelWidth/2:Fe.labelPosHorizontal=="right"&&(ye.x-=Fe.labelWidth/2)),Fe.labelHeight&&(Fe.labelPosVertical=="top"?ye.y+=Fe.labelHeight/2:Fe.labelPosVertical=="bottom"&&(ye.y-=Fe.labelHeight/2))),ye==null&&(ye={x:X.position("x"),y:X.position("y")}),{x:ye.x,y:ye.y}}else{var We=void 0;return L.forEach(function(De){var Oe=De.nodeIndexes.get(X.id());Oe!=null&&(We={x:De.xCoords[Oe],y:De.yCoords[Oe]})}),We==null&&(We={x:X.position("x"),y:X.position("y")}),{x:We.x,y:We.y}}};if(T.quality=="default"||T.quality=="proof"||T.randomize){var ge=f.calcParentsWithoutChildren(k,C),ie=C.filter(function(we){return we.css("display")=="none"});T.eles=C.not(ie),C.nodes().not(":parent").not(ie).layoutPositions(S,T,Q),ge.length>0&&ge.forEach(function(we){we.position(Q(we))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),b})();a.exports=v}),657:((a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var g=p.cy,m=p.eles,y=m.nodes(),v=m.nodes(":parent"),b=new Map,w=new Map,S=new Map,T=[],k=[],C=[],L=[],D=[],M=[],I=[],E=[],_=void 0,A=void 0,R=1e8,N=1e-9,O=p.piTol,P=p.samplingType,B=p.nodeSeparation,G=void 0,F=function(){for(var ue=0,z=0,se=!1;z=xe;){me=oe[xe++];for(var He=T[me],Ge=0;GePe&&(Pe=D[Ue],je=Ue)}return je},j=function(ue){var z=void 0;if(ue){z=Math.floor(Math.random()*A),_=z;for(var oe=0;oe=1)break;Pe=Ae}for(var He=0;He=1)break;Pe=Ae}for(var Ke=0;Ke0&&(z.isParent()?T[ue].push(S.get(z.id())):T[ue].push(z.id()))})});var ge=function(ue){var z=w.get(ue),se=void 0;b.get(ue).forEach(function(oe){g.getElementById(oe).isParent()?se=S.get(oe):se=oe,T[z].push(se),T[w.get(se)].push(ue)})},ie=!0,we=!1,X=void 0;try{for(var ze=b.keys()[Symbol.iterator](),ye;!(ie=(ye=ze.next()).done);ie=!0){var Fe=ye.value;ge(Fe)}}catch(U){we=!0,X=U}finally{try{!ie&&ze.return&&ze.return()}finally{if(we)throw X}}A=w.size;var Xe=void 0;if(A>2){G=A{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u}),140:(a=>{a.exports=t})},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(579);return i})()})});var ywe={};gr(ywe,{diagram:()=>Dst});function cwe(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"service",id:n.id,icon:n.icon,label:n.title,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function uwe(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"junction",id:n.id,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function hwe(t,e){e.nodes().map(r=>{let n=gv(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function fwe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function dwe(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=xq(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${i}`,label:f,source:n,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:i,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:p,classes:d})})}function pwe(t,e,r){let n=x((o,l)=>Object.entries(o).reduce((u,[h,f])=>{let d=0,p=Object.entries(f);if(p.length===1)return u[h]=p[0][1],u;for(let g=0;g{let l={},u={};return Object.entries(o).forEach(([h,[f,d]])=>{let p=t.getNode(h)?.in??"default";l[d]??={},l[d][p]??=[],l[d][p].push(h),u[f]??={},u[f][p]??=[],u[f][p].push(h)}),{horiz:Object.values(n(l,"horizontal")).filter(h=>h.length>1),vert:Object.values(n(u,"vertical")).filter(h=>h.length>1)}}),[a,s]=i.reduce(([o,l],{horiz:u,vert:h})=>[[...o,...u],[...l,...h]],[[],[]]);return{horizontal:a,vertical:s}}function gwe(t,e){let r=[],n=x(a=>`${a[0]},${a[1]}`,"posToStr"),i=x(a=>a.split(",").map(s=>parseInt(s)),"strToPos");return t.forEach(a=>{let s=Object.fromEntries(Object.entries(a).map(([h,f])=>[n(f),h])),o=[n([0,0])],l={},u={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){let h=o.shift();if(h){l[h]=1;let f=s[h];if(f){let d=i(h);Object.entries(u).forEach(([p,g])=>{let m=n([d[0]+g[0],d[1]+g[1]]),y=s[m];y&&!l[m]&&(o.push(m),r.push({[rwe[p]]:y,[rwe[dst(p)]]:f,gap:1.5*e.getConfigField("iconSize")}))})}}}}),r}function mwe(t,e,r,n,i,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{let l=Ye("body").append("div").attr("id","cy").attr("style","display:none"),u=yl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),fwe(r,u),cwe(t,u,i),uwe(e,u,i),dwe(n,u);let h=pwe(i,a,s),f=gwe(a,i),d=u.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){let[g,m]=p.connectedNodes(),{parent:y}=gv(g),{parent:v}=gv(m);return y===v?1.5*i.getConfigField("iconSize"):.5*i.getConfigField("iconSize")},edgeElasticity(p){let[g,m]=p.connectedNodes(),{parent:y}=gv(g),{parent:v}=gv(m);return y===v?.45:.001},alignmentConstraint:h,relativePlacementConstraint:f});d.one("layoutstop",()=>{function p(g,m,y,v){let b,w,{x:S,y:T}=g,{x:k,y:C}=m;w=(v-T+(S-y)*(T-C)/(S-k))/Math.sqrt(1+Math.pow((T-C)/(S-k),2)),b=Math.sqrt(Math.pow(v-T,2)+Math.pow(y-S,2)-Math.pow(w,2));let L=Math.sqrt(Math.pow(k-S,2)+Math.pow(C-T,2));b=b/L;let D=(k-S)*(v-T)-(C-T)*(y-S);switch(!0){case D>=0:D=1;break;case D<0:D=-1;break}let M=(k-S)*(y-S)+(C-T)*(v-T);switch(!0){case M>=0:M=1;break;case M<0:M=-1;break}return w=Math.abs(w)*D,b=b*M,{distances:w,weights:b}}x(p,"getSegmentWeights"),u.startBatch();for(let g of Object.values(u.edges()))if(g.data?.()){let{x:m,y}=g.source().position(),{x:v,y:b}=g.target().position();if(m!==v&&y!==b){let w=g.sourceEndpoint(),S=g.targetEndpoint(),{sourceDir:T}=awe(g),[k,C]=sp(T)?[w.x,S.y]:[S.x,w.y],{weights:L,distances:D}=p(w,S,k,C);g.style("segment-distances",D),g.style("segment-weights",L)}}u.endBatch(),d.run()}),d.run(),u.ready(p=>{te.info("Ready",p),o(u)})})}var lwe,rwe,nwe,vA,dst,iwe,zs,sp,xq,pst,gst,vq,mst,yst,vst,xst,bst,awe,gv,wst,swe,Tst,owe,kst,Est,pv,P3,Sst,Cst,Ast,_st,Lst,Rst,Dst,vwe=$(()=>{Hc();Aa();L0();bn();Er();lr();Zd();_M();lwe=ma(twe(),1);pr();rwe={L:"left",R:"right",T:"top",B:"bottom"},nwe={L:x(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:x(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:x(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:x(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},vA={L:x((t,e)=>t-e+2,"L"),R:x((t,e)=>t-2,"R"),T:x((t,e)=>t-e+2,"T"),B:x((t,e)=>t-2,"B")},dst=x(function(t){return zs(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),iwe=x(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),zs=x(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),sp=x(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),xq=x(function(t,e){let r=zs(t)&&sp(e),n=sp(t)&&zs(e);return r||n},"isArchitectureDirectionXY"),pst=x(function(t){let e=t[0],r=t[1],n=zs(e)&&sp(r),i=sp(e)&&zs(r);return n||i},"isArchitecturePairXY"),gst=x(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),vq=x(function(t,e){let r=`${t}${e}`;return gst(r)?r:void 0},"getArchitectureDirectionPair"),mst=x(function([t,e],r){let n=r[0],i=r[1];return zs(n)?sp(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:zs(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),yst=x(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),vst=x(function(t,e){return xq(t,e)?"bend":zs(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),xst=x(function(t){return t.type==="service"},"isArchitectureService"),bst=x(function(t){return t.type==="junction"},"isArchitectureJunction"),awe=x(t=>t.data(),"edgeData"),gv=x(t=>t.data(),"nodeData"),wst=hr.architecture,swe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Nr,this.getAccTitle=Ir,this.setDiagramTitle=Vr,this.getDiagramTitle=Pr,this.getAccDescription=Or,this.setAccDescription=Mr,this.clear()}static{x(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},kr()}addService({id:t,icon:e,in:r,title:n,iconText:i}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(xst)}addJunction({id:t,in:e}){this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(bst)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:r,title:n}){if(this.registeredIds?.[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(this.registeredIds?.[r]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[r]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!iwe(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(!iwe(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=this.nodes[t].in,h=this.nodes[e].in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};this.edges.push(f),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let t={},e=Object.entries(this.nodes).reduce((o,[l,u])=>(o[l]=u.edges.reduce((h,f)=>{let d=this.getNode(f.lhsId)?.in,p=this.getNode(f.rhsId)?.in;if(d&&p&&d!==p){let g=vst(f.lhsDir,f.rhsDir);g!=="bend"&&(t[d]??={},t[d][p]=g,t[p]??={},t[p][d]=g)}if(f.lhsId===l){let g=vq(f.lhsDir,f.rhsDir);g&&(h[g]=f.rhsId)}else{let g=vq(f.rhsDir,f.lhsDir);g&&(h[g]=f.lhsId)}return h},{}),o),{}),r=Object.keys(e)[0],n={[r]:1},i=Object.keys(e).reduce((o,l)=>l===r?o:{...o,[l]:1},{}),a=x(o=>{let l={[o]:[0,0]},u=[o];for(;u.length>0;){let h=u.shift();if(h){n[h]=1,delete i[h];let f=e[h],[d,p]=l[h];Object.entries(f).forEach(([g,m])=>{n[m]||(l[m]=mst([d,p],g),u.push(m))})}}return l},"BFS"),s=[a(r)];for(;Object.keys(i).length>0;)s.push(a(Object.keys(i)[0]));this.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return ui({...wst,...fr().architecture})}getConfigField(t){return this.getConfig()[t]}},Tst=x((t,e)=>{Mo(t,e),t.groups.map(r=>e.addGroup(r)),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(r=>e.addEdge(r))},"populateDb"),owe={parser:{yy:void 0},parse:x(async t=>{let e=await Bs("architecture",t);te.debug(e);let r=owe.parser?.yy;if(!(r instanceof swe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Tst(e,r)},"parse")},kst=x(t=>` .edge { stroke-width: ${t.archEdgeWidth}; stroke: ${t.archEdgeColor}; fill: none; } .arrow { fill: ${t.archEdgeArrowColor}; } .node-bkg { fill: none; stroke: ${t.archGroupBorderColor}; stroke-width: ${t.archGroupBorderWidth}; stroke-dasharray: 8; } .node-icon-text { display: flex; align-items: center; } .node-icon-text > div { color: #fff; margin: 1px; height: fit-content; text-align: center; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; } `,"getStyles"),Est=kst,pv=x(t=>`${t}`,"wrapIcon"),P3={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:pv('')},server:{body:pv('')},disk:{body:pv('')},internet:{body:pv('')},cloud:{body:pv('')},unknown:vR,blank:{body:pv("")}}},Sst=x(async function(t,e,r){let n=r.getConfigField("padding"),i=r.getConfigField("iconSize"),a=i/2,s=i/6,o=s/2;await Promise.all(e.edges().map(async l=>{let{source:u,sourceDir:h,sourceArrow:f,sourceGroup:d,target:p,targetDir:g,targetArrow:m,targetGroup:y,label:v}=awe(l),{x:b,y:w}=l[0].sourceEndpoint(),{x:S,y:T}=l[0].midpoint(),{x:k,y:C}=l[0].targetEndpoint(),L=n+4;if(d&&(zs(h)?b+=h==="L"?-L:L:w+=h==="T"?-L:L+18),y&&(zs(g)?k+=g==="L"?-L:L:C+=g==="T"?-L:L+18),!d&&r.getNode(u)?.type==="junction"&&(zs(h)?b+=h==="L"?a:-a:w+=h==="T"?a:-a),!y&&r.getNode(p)?.type==="junction"&&(zs(g)?k+=g==="L"?a:-a:C+=g==="T"?a:-a),l[0]._private.rscratch){let D=t.insert("g");if(D.insert("path").attr("d",`M ${b},${w} L ${S},${T} L${k},${C} `).attr("class","edge").attr("id",eu(u,p,{prefix:"L"})),f){let M=zs(h)?vA[h](b,s):b-o,I=sp(h)?vA[h](w,s):w-o;D.insert("polygon").attr("points",nwe[h](s)).attr("transform",`translate(${M},${I})`).attr("class","arrow")}if(m){let M=zs(g)?vA[g](k,s):k-o,I=sp(g)?vA[g](C,s):C-o;D.insert("polygon").attr("points",nwe[g](s)).attr("transform",`translate(${M},${I})`).attr("class","arrow")}if(v){let M=xq(h,g)?"XY":zs(h)?"X":"Y",I=0;M==="X"?I=Math.abs(b-k):M==="Y"?I=Math.abs(w-C)/1.5:I=Math.abs(b-k)/2;let E=D.append("g");if(await Ca(E,v,{useHtmlLabels:!1,width:I,classes:"architecture-service-label"},Te()),E.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),M==="X")E.attr("transform","translate("+S+", "+T+")");else if(M==="Y")E.attr("transform","translate("+S+", "+T+") rotate(-90)");else if(M==="XY"){let _=vq(h,g);if(_&&pst(_)){let A=E.node().getBoundingClientRect(),[R,N]=yst(_);E.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*R*N*45})`);let O=E.node().getBoundingClientRect();E.attr("transform",` translate(${S}, ${T-A.height/2}) translate(${R*O.width/2}, ${N*O.height/2}) rotate(${-1*R*N*45}, 0, ${A.height/2}) `)}}}}}))},"drawEdges"),Cst=x(async function(t,e,r){let i=r.getConfigField("padding")*.75,a=r.getConfigField("fontSize"),o=r.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async l=>{let u=gv(l);if(u.type==="group"){let{h,w:f,x1:d,y1:p}=l.boundingBox(),g=t.append("rect");g.attr("id",`group-${u.id}`).attr("x",d+o).attr("y",p+o).attr("width",f).attr("height",h).attr("class","node-bkg");let m=t.append("g"),y=d,v=p;if(u.icon){let b=m.append("g");b.html(`${await ru(u.icon,{height:i,width:i,fallbackPrefix:P3.prefix})}`),b.attr("transform","translate("+(y+o+1)+", "+(v+o+1)+")"),y+=i,v+=a/2-1-2}if(u.label){let b=m.append("g");await Ca(b,u.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},Te()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),b.attr("transform","translate("+(y+o+4)+", "+(v+o+2)+")")}r.setElementForId(u.id,g)}}))},"drawGroups"),Ast=x(async function(t,e,r){let n=Te();for(let i of r){let a=e.append("g"),s=t.getConfigField("iconSize");if(i.title){let h=a.append("g");await Ca(h,i.title,{useHtmlLabels:!1,width:s*1.5,classes:"architecture-service-label"},n),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),h.attr("transform","translate("+s/2+", "+s+")")}let o=a.append("g");if(i.icon)o.html(`${await ru(i.icon,{height:s,width:s,fallbackPrefix:P3.prefix})}`);else if(i.iconText){o.html(`${await ru("blank",{height:s,width:s,fallbackPrefix:P3.prefix})}`);let d=o.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(ur(i.iconText,n)),p=parseInt(window.getComputedStyle(d.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;d.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/p)};`)}else o.append("path").attr("class","node-bkg").attr("id","node-"+i.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);a.attr("id",`service-${i.id}`).attr("class","architecture-service");let{width:l,height:u}=a.node().getBBox();i.width=l,i.height=u,t.setElementForId(i.id,a)}return 0},"drawServices"),_st=x(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=t.getConfigField("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:o,height:l}=i._groups[0][0].getBBox();i.width=o,i.height=l,t.setElementForId(n.id,i)})},"drawJunctions");zT([{name:P3.prefix,icons:P3}]);yl.use(lwe.default);x(cwe,"addServices");x(uwe,"addJunctions");x(hwe,"positionNodes");x(fwe,"addGroups");x(dwe,"addEdges");x(pwe,"getAlignments");x(gwe,"getRelativeConstraints");x(mwe,"layoutArchitecture");Lst=x(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),h=ta(e),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await Ast(i,d,a),_st(i,d,s);let g=await mwe(a,s,o,l,i,u);await Sst(f,g,i),await Cst(p,g,i),hwe(i,g),eh(void 0,h,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),Rst={draw:Lst},Dst={parser:owe,get db(){return new swe},renderer:Rst,styles:Est}});var Twe={};gr(Twe,{diagram:()=>Gst});function bwe(t){if(!t.length)return[];let e=[],r=[];return t.forEach(n=>{let i={name:n.name,children:n.type==="Leaf"?void 0:[]};for(i.classSelector=n?.classSelector,n?.cssCompiledStyles&&(i.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(i.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)e.push(i);else{let a=r[r.length-1].node;a.children?a.children.push(i):a.children=[i]}n.type!=="Leaf"&&r.push({node:i,level:n.level})}),e}var xwe,Nst,Ist,wwe,Mst,mv,B3,Ost,Pst,Bst,Fst,$st,zst,Gst,kwe=$(()=>{Hc();Sl();bs();L0();bn();Er();lr();Zd();pr();xwe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Nr,this.getAccTitle=Ir,this.setDiagramTitle=Vr,this.getDiagramTitle=Pr,this.getAccDescription=Or,this.setAccDescription=Mr}static{x(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=hr,e=fr();return ui({...t.treemap,...e.treemap??{}})}addNode(t,e){this.nodes.push(t),this.levels.set(t,e),e===0&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,e){let r=this.classes.get(t)??{id:t,styles:[],textStyles:[]},n=e.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/ยงยงยง/g,",").split(";");n&&n.forEach(i=>{U2(i)&&(r?.textStyles?r.textStyles.push(i):r.textStyles=[i]),r?.styles?r.styles.push(i):r.styles=[i]}),this.classes.set(t,r)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){kr(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};x(bwe,"buildHierarchy");Nst=x((t,e)=>{Mo(t,e);let r=[];for(let a of t.TreemapRows??[])a.$type==="ClassDefStatement"&&e.addClass(a.className??"",a.styleText??"");for(let a of t.TreemapRows??[]){let s=a.item;if(!s)continue;let o=a.indent?parseInt(a.indent):0,l=Ist(s),u=s.classSelector?e.getStylesForClass(s.classSelector):[],h=u.length>0?u.join(";"):void 0,f={level:o,name:l,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:h};r.push(f)}let n=bwe(r),i=x((a,s)=>{for(let o of a)e.addNode(o,s),o.children&&o.children.length>0&&i(o.children,s+1)},"addNodesRecursively");i(n,0)},"populate"),Ist=x(t=>t.name?String(t.name):"","getItemName"),wwe={parser:{yy:void 0},parse:x(async t=>{try{let r=await Bs("treemap",t);te.debug("Treemap AST:",r);let n=wwe.parser?.yy;if(!(n instanceof xwe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Nst(r,n)}catch(e){throw te.error("Error parsing treemap:",e),e}},"parse")},Mst=10,mv=10,B3=25,Ost=x((t,e,r,n)=>{let i=n.db,a=i.getConfig(),s=a.padding??Mst,o=i.getDiagramTitle(),l=i.getRoot(),{themeVariables:u}=fr();if(!l)return;let h=o?30:0,f=ta(e),d=a.nodeWidth?a.nodeWidth*mv:960,p=a.nodeHeight?a.nodeHeight*mv:500,g=d,m=p+h;f.attr("viewBox",`0 0 ${g} ${m}`),xn(f,m,g,a.useMaxWidth);let y;try{let A=a.valueFormat||",";if(A==="$0,0")y=x(R=>"$"+zc(",")(R),"valueFormat");else if(A.startsWith("$")&&A.includes(",")){let R=/\.\d+/.exec(A),N=R?R[0]:"";y=x(O=>"$"+zc(","+N)(O),"valueFormat")}else if(A.startsWith("$")){let R=A.substring(1);y=x(N=>"$"+zc(R||"")(N),"valueFormat")}else y=zc(A)}catch(A){te.error("Error creating format function:",A),y=zc(",")}let v=ko().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),b=ko().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),w=ko().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);o&&f.append("text").attr("x",g/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o);let S=f.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),T=em(l).sum(A=>A.value??0).sort((A,R)=>(R.value??0)-(A.value??0)),C=nL().size([d,p]).paddingTop(A=>A.children&&A.children.length>0?B3+mv:0).paddingInner(s).paddingLeft(A=>A.children&&A.children.length>0?mv:0).paddingRight(A=>A.children&&A.children.length>0?mv:0).paddingBottom(A=>A.children&&A.children.length>0?mv:0).round(!0)(T),L=C.descendants().filter(A=>A.children&&A.children.length>0),D=S.selectAll(".treemapSection").data(L).enter().append("g").attr("class","treemapSection").attr("transform",A=>`translate(${A.x0},${A.y0})`);D.append("rect").attr("width",A=>A.x1-A.x0).attr("height",B3).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",A=>A.depth===0?"display: none;":""),D.append("clipPath").attr("id",(A,R)=>`clip-section-${e}-${R}`).append("rect").attr("width",A=>Math.max(0,A.x1-A.x0-12)).attr("height",B3),D.append("rect").attr("width",A=>A.x1-A.x0).attr("height",A=>A.y1-A.y0).attr("class",(A,R)=>`treemapSection section${R}`).attr("fill",A=>v(A.data.name)).attr("fill-opacity",.6).attr("stroke",A=>b(A.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",A=>{if(A.depth===0)return"display: none;";let R=Rt({cssCompiledStyles:A.data.cssCompiledStyles});return R.nodeStyles+";"+R.borderStyles.join(";")}),D.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",B3/2).attr("dominant-baseline","middle").text(A=>A.depth===0?"":A.data.name).attr("font-weight","bold").attr("style",A=>{if(A.depth===0)return"display: none;";let R="dominant-baseline: middle; font-size: 12px; fill:"+w(A.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",N=Rt({cssCompiledStyles:A.data.cssCompiledStyles});return R+N.labelStyles.replace("color:","fill:")}).each(function(A){if(A.depth===0)return;let R=Ye(this),N=A.data.name;R.text(N);let O=A.x1-A.x0,P=6,B;a.showValues!==!1&&A.value?B=O-10-30-10-P:B=O-P-6;let F=Math.max(15,B),q=R.node();if(q.getComputedTextLength()>F){let H=N;for(;H.length>0;){if(H=N.substring(0,H.length-1),H.length===0){R.text("..."),q.getComputedTextLength()>F&&R.text("");break}if(R.text(H+"..."),q.getComputedTextLength()<=F)break}}}),a.showValues!==!1&&D.append("text").attr("class","treemapSectionValue").attr("x",A=>A.x1-A.x0-10).attr("y",B3/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(A=>A.value?y(A.value):"").attr("font-style","italic").attr("style",A=>{if(A.depth===0)return"display: none;";let R="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+w(A.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",N=Rt({cssCompiledStyles:A.data.cssCompiledStyles});return R+N.labelStyles.replace("color:","fill:")});let M=C.leaves(),I=S.selectAll(".treemapLeafGroup").data(M).enter().append("g").attr("class",(A,R)=>`treemapNode treemapLeafGroup leaf${R}${A.data.classSelector?` ${A.data.classSelector}`:""}x`).attr("transform",A=>`translate(${A.x0},${A.y0})`);I.append("rect").attr("width",A=>A.x1-A.x0).attr("height",A=>A.y1-A.y0).attr("class","treemapLeaf").attr("fill",A=>A.parent?v(A.parent.data.name):v(A.data.name)).attr("style",A=>Rt({cssCompiledStyles:A.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",A=>A.parent?v(A.parent.data.name):v(A.data.name)).attr("stroke-width",3),I.append("clipPath").attr("id",(A,R)=>`clip-${e}-${R}`).append("rect").attr("width",A=>Math.max(0,A.x1-A.x0-4)).attr("height",A=>Math.max(0,A.y1-A.y0-4)),I.append("text").attr("class","treemapLabel").attr("x",A=>(A.x1-A.x0)/2).attr("y",A=>(A.y1-A.y0)/2).attr("style",A=>{let R="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+w(A.data.name)+";",N=Rt({cssCompiledStyles:A.data.cssCompiledStyles});return R+N.labelStyles.replace("color:","fill:")}).attr("clip-path",(A,R)=>`url(#clip-${e}-${R})`).text(A=>A.data.name).each(function(A){let R=Ye(this),N=A.x1-A.x0,O=A.y1-A.y0,P=R.node(),B=4,G=N-2*B,F=O-2*B;if(G<10||F<10){R.style("display","none");return}let q=parseInt(R.style("font-size"),10),j=8,J=28,H=.6,he=6,Z=2;for(;P.getComputedTextLength()>G&&q>j;)q--,R.style("font-size",`${q}px`);let fe=Math.max(he,Math.min(J,Math.round(q*H))),ne=q+Z+fe;for(;ne>F&&q>j&&(q--,fe=Math.max(he,Math.min(J,Math.round(q*H))),!(feF;R.style("font-size",`${q}px`),(P.getComputedTextLength()>G||q(R.x1-R.x0)/2).attr("y",function(R){return(R.y1-R.y0)/2}).attr("style",R=>{let N="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+w(R.data.name)+";",O=Rt({cssCompiledStyles:R.data.cssCompiledStyles});return N+O.labelStyles.replace("color:","fill:")}).attr("clip-path",(R,N)=>`url(#clip-${e}-${N})`).text(R=>R.value?y(R.value):"").each(function(R){let N=Ye(this),O=this.parentNode;if(!O){N.style("display","none");return}let P=Ye(O).select(".treemapLabel");if(P.empty()||P.style("display")==="none"){N.style("display","none");return}let B=parseFloat(P.style("font-size")),G=28,F=.6,q=6,j=2,J=Math.max(q,Math.min(G,Math.round(B*F)));N.style("font-size",`${J}px`);let he=(R.y1-R.y0)/2+B/2+j;N.attr("y",he);let Z=R.x1-R.x0,re=R.y1-R.y0-4,ee=Z-8;N.node().getComputedTextLength()>ee||he+J>re||J{let e=ui(Fst,t);return` .treemapNode.section { stroke: ${e.sectionStrokeColor}; stroke-width: ${e.sectionStrokeWidth}; fill: ${e.sectionFillColor}; } .treemapNode.leaf { stroke: ${e.leafStrokeColor}; stroke-width: ${e.leafStrokeWidth}; fill: ${e.leafFillColor}; } .treemapLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .treemapValue { fill: ${e.valueColor}; font-size: ${e.valueFontSize}; } .treemapTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } `},"getStyles"),zst=$st,Gst={parser:wwe,get db(){return new xwe},renderer:Bst,styles:zst}});LA();Hc();q2();xl();cl();Co();Qs();xs();bs();Aa();bn();Er();lr();gR();pr();var fS="comm",dS="rule",pS="decl";var zpe="@import";var Gpe="@namespace",qpe="@keyframes";var Vpe="@layer";var OM=Math.abs,db=String.fromCharCode;function gS(t){return t.trim()}function pb(t,e,r){return t.replace(e,r)}function Upe(t,e,r){return t.indexOf(e,r)}function pd(t,e){return t.charCodeAt(e)|0}function gd(t,e,r){return t.slice(e,r)}function Io(t){return t.length}function Wpe(t){return t.length}function _1(t,e){return e.push(t),t}var mS=1,L1=1,Hpe=0,bl=0,Oi=0,D1="";function yS(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:mS,column:L1,length:s,return:"",siblings:o}}function Ype(){return Oi}function Xpe(){return Oi=bl>0?pd(D1,--bl):0,L1--,Oi===10&&(L1=1,mS--),Oi}function wl(){return Oi=bl2||R1(Oi)>3?"":" "}function Qpe(t,e){for(;--e&&wl()&&!(Oi<48||Oi>102||Oi>57&&Oi<65||Oi>70&&Oi<97););return vS(t,gb()+(e<6&&Ch()==32&&wl()==32))}function PM(t){for(;wl();)switch(Oi){case t:return bl;case 34:case 39:t!==34&&t!==39&&PM(Oi);break;case 40:t===41&&PM(t);break;case 92:wl();break}return bl}function Jpe(t,e){for(;wl()&&t+Oi!==57;)if(t+Oi===84&&Ch()===47)break;return"/*"+vS(e,bl-1)+"*"+db(t===47?t:wl())}function e0e(t){for(;!R1(Ch());)wl();return vS(t,bl)}function n0e(t){return Kpe(bS("",null,null,null,[""],t=jpe(t),0,[0],t))}function bS(t,e,r,n,i,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,g=0,m=1,y=1,v=1,b=0,w="",S=i,T=a,k=n,C=w;y;)switch(g=b,b=wl()){case 40:if(g!=108&&pd(C,f-1)==58){Upe(C+=pb(xS(b),"&","&\f"),"&\f",OM(u?o[u-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:C+=xS(b);break;case 9:case 10:case 13:case 32:C+=Zpe(g);break;case 92:C+=Qpe(gb()-1,7);continue;case 47:switch(Ch()){case 42:case 47:_1(pHe(Jpe(wl(),gb()),e,r,l),l),(R1(g||1)==5||R1(Ch()||1)==5)&&Io(C)&&gd(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*m:o[u++]=Io(C)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:v==-1&&(C=pb(C,/\f/g,"")),p>0&&(Io(C)-f||m===0&&g===47)&&_1(p>32?r0e(C+";",n,r,f-1,l):r0e(pb(C," ","")+";",n,r,f-2,l),l);break;case 59:C+=";";default:if(_1(k=t0e(C,e,r,u,h,i,o,w,S=[],T=[],f,a),a),b===123)if(h===0)bS(C,e,k,k,S,a,f,o,T);else{switch(d){case 99:if(pd(C,3)===110)break;case 108:if(pd(C,2)===97)break;default:h=0;case 100:case 109:case 115:}h?bS(t,k,k,n&&_1(t0e(t,k,k,0,0,i,o,w,i,S=[],f,T),T),i,T,f,o,n?S:T):bS(C,k,k,k,[""],T,0,o,T)}}u=h=p=0,m=v=1,w=C="",f=s;break;case 58:f=1+Io(C),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Xpe()==125)continue}switch(C+=db(b),b*m){case 38:v=h>0?1:(C+="\f",-1);break;case 44:o[u++]=(Io(C)-1)*v,v=1;break;case 64:Ch()===45&&(C+=xS(wl())),d=Ch(),h=f=Io(w=C+=e0e(gb())),b++;break;case 45:g===45&&Io(C)==2&&(m=0)}}return a}function t0e(t,e,r,n,i,a,s,o,l,u,h,f){for(var d=i-1,p=i===0?a:[""],g=Wpe(p),m=0,y=0,v=0;m0?p[b]+" "+w:pb(w,/&\f/g,p[b])))&&(l[v++]=S);return yS(t,e,r,i===0?dS:o,l,u,h,f)}function pHe(t,e,r,n){return yS(t,e,r,fS,db(Ype()),gd(t,2,-2),0,n)}function r0e(t,e,r,n,i){return yS(t,e,r,pS,gd(t,0,n),gd(t,n+1,-1),n,i)}function wS(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Vst=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(v0e(),y0e));return{id:_we,diagram:t}},"loader"),Ust={id:_we,detector:qst,loader:Vst},Wst=Ust,Lwe="flowchart",Hst=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),Yst=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(MS(),IS));return{id:Lwe,diagram:t}},"loader"),Xst={id:Lwe,detector:Hst,loader:Yst},jst=Xst,Rwe="flowchart-v2",Kst=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),Zst=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(MS(),IS));return{id:Rwe,diagram:t}},"loader"),Qst={id:Rwe,detector:Kst,loader:Zst},Jst=Qst,Dwe="er",eot=x(t=>/^\s*erDiagram/.test(t),"detector"),tot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(k0e(),T0e));return{id:Dwe,diagram:t}},"loader"),rot={id:Dwe,detector:eot,loader:tot},not=rot,Nwe="gitGraph",iot=x(t=>/^\s*gitGraph/.test(t),"detector"),aot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Wxe(),Uxe));return{id:Nwe,diagram:t}},"loader"),sot={id:Nwe,detector:iot,loader:aot},oot=sot,Iwe="gantt",lot=x(t=>/^\s*gantt/.test(t),"detector"),cot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(dbe(),fbe));return{id:Iwe,diagram:t}},"loader"),uot={id:Iwe,detector:lot,loader:cot},hot=uot,Mwe="info",fot=x(t=>/^\s*info/.test(t),"detector"),dot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(gbe(),pbe));return{id:Mwe,diagram:t}},"loader"),pot={id:Mwe,detector:fot,loader:dot},Owe="pie",got=x(t=>/^\s*pie/.test(t),"detector"),mot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(xbe(),vbe));return{id:Owe,diagram:t}},"loader"),yot={id:Owe,detector:got,loader:mot},Pwe="quadrantChart",vot=x(t=>/^\s*quadrantChart/.test(t),"detector"),xot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Pbe(),Obe));return{id:Pwe,diagram:t}},"loader"),bot={id:Pwe,detector:vot,loader:xot},wot=bot,Bwe="xychart",Tot=x(t=>/^\s*xychart(-beta)?/.test(t),"detector"),kot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(i4e(),n4e));return{id:Bwe,diagram:t}},"loader"),Eot={id:Bwe,detector:Tot,loader:kot},Sot=Eot,Fwe="requirement",Cot=x(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),Aot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(o4e(),s4e));return{id:Fwe,diagram:t}},"loader"),_ot={id:Fwe,detector:Cot,loader:Aot},Lot=_ot,$we="sequence",Rot=x(t=>/^\s*sequenceDiagram/.test(t),"detector"),Dot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(b4e(),x4e));return{id:$we,diagram:t}},"loader"),Not={id:$we,detector:Rot,loader:Dot},Iot=Not,zwe="class",Mot=x((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),Oot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(S4e(),E4e));return{id:zwe,diagram:t}},"loader"),Pot={id:zwe,detector:Mot,loader:Oot},Bot=Pot,Gwe="classDiagram",Fot=x((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),$ot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(A4e(),C4e));return{id:Gwe,diagram:t}},"loader"),zot={id:Gwe,detector:Fot,loader:$ot},Got=zot,qwe="state",qot=x((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),Vot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(J4e(),Q4e));return{id:qwe,diagram:t}},"loader"),Uot={id:qwe,detector:qot,loader:Vot},Wot=Uot,Vwe="stateDiagram",Hot=x((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Yot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(t3e(),e3e));return{id:Vwe,diagram:t}},"loader"),Xot={id:Vwe,detector:Hot,loader:Yot},jot=Xot,Uwe="journey",Kot=x(t=>/^\s*journey/.test(t),"detector"),Zot=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(f3e(),h3e));return{id:Uwe,diagram:t}},"loader"),Qot={id:Uwe,detector:Kot,loader:Zot},Jot=Qot,elt=x((t,e,r)=>{te.debug(`rendering svg for syntax error `);let n=ta(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),xn(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Wwe={draw:elt},tlt=Wwe,rlt={db:{},renderer:Wwe,parser:{parse:x(()=>{},"parse")}},nlt=rlt,Hwe="flowchart-elk",ilt=x((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),alt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(MS(),IS));return{id:Hwe,diagram:t}},"loader"),slt={id:Hwe,detector:ilt,loader:alt},olt=slt,Ywe="timeline",llt=x(t=>/^\s*timeline/.test(t),"detector"),clt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(L3e(),_3e));return{id:Ywe,diagram:t}},"loader"),ult={id:Ywe,detector:llt,loader:clt},hlt=ult,Xwe="mindmap",flt=x(t=>/^\s*mindmap/.test(t),"detector"),dlt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(B3e(),P3e));return{id:Xwe,diagram:t}},"loader"),plt={id:Xwe,detector:flt,loader:dlt},glt=plt,jwe="kanban",mlt=x(t=>/^\s*kanban/.test(t),"detector"),ylt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(z3e(),$3e));return{id:jwe,diagram:t}},"loader"),vlt={id:jwe,detector:mlt,loader:ylt},xlt=vlt,Kwe="sankey",blt=x(t=>/^\s*sankey(-beta)?/.test(t),"detector"),wlt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(h5e(),u5e));return{id:Kwe,diagram:t}},"loader"),Tlt={id:Kwe,detector:blt,loader:wlt},klt=Tlt,Zwe="packet",Elt=x(t=>/^\s*packet(-beta)?/.test(t),"detector"),Slt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(g5e(),p5e));return{id:Zwe,diagram:t}},"loader"),Clt={id:Zwe,detector:Elt,loader:Slt},Qwe="radar",Alt=x(t=>/^\s*radar-beta/.test(t),"detector"),_lt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(k5e(),T5e));return{id:Qwe,diagram:t}},"loader"),Llt={id:Qwe,detector:Alt,loader:_lt},Jwe="block",Rlt=x(t=>/^\s*block(-beta)?/.test(t),"detector"),Dlt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ewe(),J5e));return{id:Jwe,diagram:t}},"loader"),Nlt={id:Jwe,detector:Rlt,loader:Dlt},Ilt=Nlt,eTe="architecture",Mlt=x(t=>/^\s*architecture/.test(t),"detector"),Olt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(vwe(),ywe));return{id:eTe,diagram:t}},"loader"),Plt={id:eTe,detector:Mlt,loader:Olt},Blt=Plt,tTe="treemap",Flt=x(t=>/^\s*treemap/.test(t),"detector"),$lt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(kwe(),Twe));return{id:tTe,diagram:t}},"loader"),zlt={id:tTe,detector:Flt,loader:$lt},Ewe=!1,bA=x(()=>{Ewe||(Ewe=!0,Uv("error",nlt,t=>t.toLowerCase().trim()==="error"),Uv("---",{db:{clear:x(()=>{},"clear")},styles:{},renderer:{draw:x(()=>{},"draw")},parser:{parse:x(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:x(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),D5(olt,glt,Blt),D5(Wst,xlt,Got,Bot,not,hot,pot,yot,Lot,Iot,Jst,jst,hlt,oot,jot,Wot,Jot,wot,klt,Clt,Sot,Ilt,Llt,zlt))},"addDiagrams"),Glt=x(async()=>{te.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(lf).map(async([r,{detector:n,loader:i}])=>{if(i)try{F5(r)}catch{try{let{diagram:a,id:s}=await i();Uv(s,a,n)}catch(a){throw te.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete lf[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){te.error(`Failed to load ${e.length} external diagrams`);for(let r of e)te.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),qlt="graphics-document document";function rTe(t,e){t.attr("role",qlt),e!==""&&t.attr("aria-roledescription",e)}x(rTe,"setA11yDiagramInfo");function nTe(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}x(nTe,"addSVGa11yTitleDescription");var wq=class iTe{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static{x(this,"Diagram")}static async fromText(e,r={}){let n=fr(),i=Gv(e,n);e=Xte(e)+` `;try{F5(i)}catch{let u=tW(i);if(!u)throw new G8(`Diagram ${i} not found.`);let{id:h,diagram:f}=await u();Uv(h,f)}let{db:a,parser:s,renderer:o,init:l}=F5(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new iTe(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},Swe=[],Vlt=x(()=>{Swe.forEach(t=>{t()}),Swe=[]},"attachFunctions"),Ult=x(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function aTe(t){let e=t.match(z8);if(!e)return{text:t,metadata:{}};let r=Ef(e[1],{schema:kf})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}x(aTe,"extractFrontMatter");var Wlt=x(t=>t.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Hlt=x(t=>{let{text:e,metadata:r}=aTe(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),Ylt=x(t=>{let e=Ut.detectInit(t)??{},r=Ut.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:qte(t),directive:e}},"processDirectives");function kq(t){let e=Wlt(t),r=Hlt(e),n=Ylt(r.text),i=ui(r.config,n.directive);return t=Ult(n.text),{code:t,title:r.title,config:i}}x(kq,"preprocessDiagram");function sTe(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}x(sTe,"toBase64");var Xlt=5e4,jlt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Klt="sandbox",Zlt="loose",Qlt="http://www.w3.org/2000/svg",Jlt="http://www.w3.org/1999/xlink",ect="http://www.w3.org/1999/xhtml",tct="100%",rct="100%",nct="border:0;margin:0;",ict="margin:0",act="allow-top-navigation-by-user-activation allow-popups",sct='The "iframe" tag is not supported by your browser.',oct=["foreignobject"],lct=["dominant-baseline"];function Eq(t){let e=kq(t);return qv(),lW(e.config??{}),e}x(Eq,"processAndSetConfigs");async function oTe(t,e){bA();try{let{code:r,config:n}=Eq(t);return{diagramType:(await cTe(r)).type,config:n}}catch(r){if(e?.suppressErrors)return!1;throw r}}x(oTe,"parse");var Cwe=x((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),cct=x((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let s=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(o=>{dr(o.styles)||s.forEach(l=>{r+=Cwe(o.id,l,o.styles)}),dr(o.textStyles)||(r+=Cwe(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),uct=x((t,e,r,n)=>{let i=cct(t,r),a=pW(e,i,t.themeVariables);return wS(n0e(`${n}{${a}}`),i0e)},"createUserStyles"),hct=x((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Ks(n),n=n.replace(/
/g,"
"),n},"cleanUpSvgCode"),fct=x((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":rct,n=sTe(`${t}`);return``},"putIntoIFrame"),Awe=x((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Qlt);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function Tq(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}x(Tq,"sandboxedIframe");var dct=x((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),pct=x(async function(t,e,r){bA();let n=Eq(e);e=n.code;let i=fr();te.debug(i),e.length>(i?.maxTextSize??Xlt)&&(e=jlt);let a="#"+t,s="i"+t,o="#"+s,l="d"+t,u="#"+l,h=x(()=>{let _=Ye(d?o:u).node();_&&"remove"in _&&_.remove()},"removeTempElements"),f=Ye("body"),d=i.securityLevel===Klt,p=i.securityLevel===Zlt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let E=Tq(Ye(r),s);f=Ye(E.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Ye(r);Awe(f,t,l,`font-family: ${g}`,Jlt)}else{if(dct(document,t,l,s),d){let E=Tq(Ye("body"),s);f=Ye(E.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Ye("body");Awe(f,t,l)}let m,y;try{m=await wq.fromText(e,{title:n.title})}catch(E){if(i.suppressErrorRendering)throw h(),E;m=await wq.fromText("error"),y=E}let v=f.select(u).node(),b=m.type,w=v.firstChild,S=w.firstChild,T=m.renderer.getClasses?.(e,m),k=uct(i,b,T,a),C=document.createElement("style");C.innerHTML=k,w.insertBefore(C,S);try{await m.renderer.draw(e,t,yv.version,m)}catch(E){throw i.suppressErrorRendering?h():tlt.draw(e,t,yv.version),E}let L=f.select(`${u} svg`),D=m.db.getAccTitle?.(),M=m.db.getAccDescription?.();uTe(b,L,D,M),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",ect);let I=f.select(u).node().innerHTML;if(te.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),I=hct(I,d,Kr(i.arrowMarkerAbsolute)),d){let E=f.select(u+" svg").node();I=fct(I,E)}else p||(I=tf.sanitize(I,{ADD_TAGS:oct,ADD_ATTR:lct,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Vlt(),y)throw y;return h(),{diagramType:b,svg:I,bindFunctions:m.db.bindFunctions}},"render");function lTe(t={}){let e=Gn({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),aW(e),e?.theme&&e.theme in Oc?e.themeVariables=Oc[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Oc.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?iW(e):q8();vv(r.logLevel),bA()}x(lTe,"initialize");var cTe=x((t,e={})=>{let{code:r}=kq(t);return wq.fromText(r,e)},"getDiagramFromText");function uTe(t,e,r,n){rTe(e,t),nTe(e,r,n,e.attr("id"))}x(uTe,"addA11yInfo");var Mg=Object.freeze({render:pct,parse:oTe,getDiagramFromText:cTe,initialize:lTe,getConfig:fr,setConfig:V8,getSiteConfig:q8,updateSiteConfig:sW,reset:x(()=>{qv()},"reset"),globalReset:x(()=>{qv(yp)},"globalReset"),defaultConfig:yp});vv(fr().logLevel);qv(fr());var gct=x((t,e,r)=>{te.warn(t),LT(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),hTe=x(async function(t={querySelector:".mermaid"}){try{await mct(t)}catch(e){if(LT(e)&&te.error(e.str),Qh.parseError&&Qh.parseError(e),!t.suppressErrors)throw te.error("Use the suppressErrors option to suppress these errors"),e}},"run"),mct=x(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=Mg.getConfig();te.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");te.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(te.debug("Start On Load: "+n?.startOnLoad),Mg.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new Ut.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(i)){if(te.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=FT(Ut.entityDecode(s)).trim().replace(//gi,"
");let h=Ut.detectInit(s);h&&te.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await gTe(u,s,l);l.innerHTML=f,t&&await t(u),d&&d(l)}catch(f){gct(f,o,Qh.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),fTe=x(function(t){Mg.initialize(t)},"initialize"),yct=x(async function(t,e,r){te.warn("mermaid.init is deprecated. Please use run instead."),t&&fTe(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await hTe(n)},"init"),vct=x(async(t,{lazyLoad:e=!0}={})=>{bA(),D5(...t),e===!1&&await Glt()},"registerExternalDiagrams"),dTe=x(function(){if(Qh.startOnLoad){let{startOnLoad:t}=Mg.getConfig();t&&Qh.run().catch(e=>te.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",dTe,!1);var xct=x(function(t){Qh.parseError=t},"setParseErrorHandler"),xA=[],bq=!1,pTe=x(async()=>{if(!bq){for(bq=!0;xA.length>0;){let t=xA.shift();if(t)try{await t()}catch(e){te.error("Error executing queue",e)}}bq=!1}},"executeQueue"),bct=x(async(t,e)=>new Promise((r,n)=>{let i=x(()=>new Promise((a,s)=>{Mg.parse(t,e).then(o=>{a(o),r(o)},o=>{te.error("Error parsing",o),Qh.parseError?.(o),s(o),n(o)})}),"performCall");xA.push(i),pTe().catch(n)}),"parse"),gTe=x((t,e,r)=>new Promise((n,i)=>{let a=x(()=>new Promise((s,o)=>{Mg.render(t,e,r).then(l=>{s(l),n(l)},l=>{te.error("Error parsing",l),Qh.parseError?.(l),o(l),i(l)})}),"performCall");xA.push(a),pTe().catch(i)}),"render"),wct=x(()=>Object.keys(lf).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Qh={startOnLoad:!0,mermaidAPI:Mg,parse:bct,render:gTe,init:yct,run:hTe,registerExternalDiagrams:vct,registerLayoutLoaders:MM,initialize:fTe,parseError:void 0,contentLoaded:dTe,setParseErrorHandler:xct,detectType:Gv,registerIconPacks:zT,getRegisteredDiagramsMetadata:wct},F3=Qh;var Sq=class{constructor(e,r,n){this.container=e;this.content=r;this.vscode=n;this.container=e,this.content=r,this.content.style.transformOrigin="0 0",this.container.style.overflow="hidden",this.container.style.cursor="default",this.setupEventListeners()}scale=1;translateX=0;translateY=0;isPanning=!1;hasDragged=!1;hasInteracted=!1;startX=0;startY=0;minScale=.1;maxScale=5;zoomFactor=.002;initialize(){this.restoreState()||requestAnimationFrame(()=>{this.centerContent()})}setupEventListeners(){this.container.addEventListener("mousedown",e=>this.handleMouseDown(e)),document.addEventListener("mousemove",e=>this.handleMouseMove(e)),document.addEventListener("mouseup",()=>this.handleMouseUp()),this.container.addEventListener("click",e=>this.handleClick(e)),this.container.addEventListener("wheel",e=>this.handleWheel(e),{passive:!1}),this.container.addEventListener("mousemove",e=>this.updateCursorFromModifier(e)),this.container.addEventListener("mouseenter",e=>this.updateCursorFromModifier(e)),window.addEventListener("keydown",e=>this.handleKeyChange(e)),window.addEventListener("keyup",e=>this.handleKeyChange(e)),window.addEventListener("resize",()=>this.handleResize())}handleKeyChange(e){(e.key==="Alt"||e.key==="Shift")&&!this.isPanning&&(e.preventDefault(),e.altKey&&!e.shiftKey?this.container.style.cursor="grab":e.altKey&&e.shiftKey?this.container.style.cursor="zoom-out":this.container.style.cursor="default")}updateCursorFromModifier(e){this.isPanning||(e.altKey&&!e.shiftKey?this.container.style.cursor="grab":e.altKey&&e.shiftKey?this.container.style.cursor="zoom-out":this.container.style.cursor="default")}handleClick(e){if(!e.altKey||this.hasDragged)return;e.preventDefault(),e.stopPropagation();let r=this.container.getBoundingClientRect(),n=e.clientX-r.left,i=e.clientY-r.top,a=e.shiftKey?.8:1.25;this.zoomAtPoint(a,n,i)}handleWheel(e){let r=e.ctrlKey;if(!(!e.altKey&&!r)&&(r||e.altKey)){e.preventDefault(),e.stopPropagation();let n=this.container.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,s=r?this.zoomFactor*5:this.zoomFactor,o=-e.deltaY*s,l=Math.min(this.maxScale,Math.max(this.minScale,this.scale*(1+o))),u=l/this.scale;this.translateX=i-(i-this.translateX)*u,this.translateY=a-(a-this.translateY)*u,this.scale=l,this.applyTransform(),this.saveState()}}handleMouseDown(e){e.button!==0||!e.altKey||(e.preventDefault(),e.stopPropagation(),this.isPanning=!0,this.hasDragged=!1,this.startX=e.clientX-this.translateX,this.startY=e.clientY-this.translateY,this.container.style.cursor="grabbing")}handleMouseMove(e){if(!this.isPanning)return;if(e.buttons===0){this.handleMouseUp();return}let r=e.clientX-this.startX-this.translateX,n=e.clientY-this.startY-this.translateY;(Math.abs(r)>3||Math.abs(n)>3)&&(this.hasDragged=!0),this.translateX=e.clientX-this.startX,this.translateY=e.clientY-this.startY,this.applyTransform()}handleMouseUp(){this.isPanning&&(this.isPanning=!1,this.container.style.cursor="default",this.saveState())}applyTransform(){this.content.style.transform=`translate(${this.translateX}px, ${this.translateY}px) scale(${this.scale})`}saveState(){this.hasInteracted=!0;let e=this.vscode.getState()||{};this.vscode.setState({...e,panZoom:{scale:this.scale,translateX:this.translateX,translateY:this.translateY}})}restoreState(){let e=this.vscode.getState();if(e?.panZoom){let r=e.panZoom;return this.scale=r.scale??1,this.translateX=r.translateX??0,this.translateY=r.translateY??0,this.hasInteracted=!0,this.applyTransform(),!0}return!1}handleResize(){this.hasInteracted||this.centerContent()}centerContent(){let e=this.container.getBoundingClientRect(),r=this.content.querySelector("svg");if(!r)return;let n=r.getBoundingClientRect();this.translateX=(e.width-n.width)/2,this.translateY=(e.height-n.height)/2,this.applyTransform()}reset(){this.scale=1,this.translateX=0,this.translateY=0,this.hasInteracted=!1,this.applyTransform();let e=this.vscode.getState()||{};delete e.panZoom,this.vscode.setState(e),requestAnimationFrame(()=>{this.centerContent()})}zoomIn(){let e=this.container.getBoundingClientRect();this.zoomAtPoint(1.25,e.width/2,e.height/2)}zoomOut(){let e=this.container.getBoundingClientRect();this.zoomAtPoint(.8,e.width/2,e.height/2)}zoomAtPoint(e,r,n){let i=Math.min(this.maxScale,Math.max(this.minScale,this.scale*e)),a=i/this.scale;this.translateX=r-(r-this.translateX)*a,this.translateY=n-(n-this.translateY)*a,this.scale=i,this.applyTransform(),this.saveState()}};function mTe(){return document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast")&&!document.body.classList.contains("vscode-high-contrast-light")?"dark":"default"}async function Tct(t,e,r){t.textContent=e,delete t.dataset.processed,F3.initialize({theme:r}),await F3.run({nodes:[t]})}async function yTe(t){let e=document.querySelector(".mermaid");if(!e)return;let r=mTe(),n=e.textContent??"",i={mermaidSource:n,theme:r},a=t.getState()||{};t.setState({...a,mermaidSource:n});let s=document.createElement("div");s.className="mermaid-wrapper",s.style.cssText="position: relative; width: 100%; height: 100%; overflow: hidden;";let o=document.createElement("div");o.className="mermaid-content",e.parentNode?.insertBefore(s,e),o.appendChild(e),s.appendChild(o);let l={startOnLoad:!1,theme:r};F3.initialize(l),await F3.run({nodes:[e]}),e.classList.add("rendered");let u=new Sq(s,o,t);return u.initialize(),window.addEventListener("message",h=>{h.data.type==="resetPanZoom"&&u.reset()}),new MutationObserver(()=>{let h=mTe();if(i?.theme===h)return;let f=document.querySelector(".mermaid");!f||!(f instanceof HTMLElement)||(i={mermaidSource:i?.mermaidSource??"",theme:h},Tct(f,i.mermaidSource,h))}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),u}var vTe=acquireVsCodeApi();async function kct(){await yTe(vTe);let t=document.querySelector(".open-in-editor-btn");t&&t.addEventListener("click",e=>{e.stopPropagation(),vTe.postMessage({type:"openInEditor"})})}kct(); /*! Bundled license information: dompurify/dist/purify.es.mjs: (*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE *) mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.mjs: (*! Bundled license information: js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) *) lodash-es/lodash.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) cytoscape/dist/cytoscape.esm.mjs: (*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) *) (*! Event object based on jQuery events, MIT license https://jquery.org/license/ https://tldrlegal.com/license/mit-license https://github.com/jquery/jquery/blob/master/src/event.js *) (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) mermaid/dist/mermaid.core.mjs: (*! Check if previously processed *) (*! * Wait for document loaded before starting the execution *) */