Files
vac.dev/assets/js/75.f07d689b.js
2026-05-08 07:42:49 +00:00

1 line
74 KiB
JavaScript

"use strict";(self.webpackChunkresearch_logos_co=self.webpackChunkresearch_logos_co||[]).push([[75],{75:(t,e,r)=>{r.d(e,{diagram:()=>fr});var a=r(52501),n=r(11334),i=r(97963),s=r(35183),o=r(4137),c=r(17726),l=r(40797),d=r(11754),h=r(72641),g=r(52851),u=r(22031),y=r(27422);const p=function(t,e){return t&&(0,u.A)(e,(0,y.A)(e),t)};var b=r(55615);const x=function(t,e){return t&&(0,u.A)(e,(0,b.A)(e),t)};var f=r(80154),m=r(39759),w=r(14792);const k=function(t,e){return(0,u.A)(t,(0,w.A)(t),e)};var L=r(76912),S=r(15647),_=r(13153);const v=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,L.A)(e,(0,w.A)(t)),t=(0,S.A)(t);return e}:_.A;const E=function(t,e){return(0,u.A)(t,v(t),e)};var D=r(19042),A=r(56212);const R=function(t){return(0,A.A)(t,b.A,v)};var $=r(9779),K=Object.prototype.hasOwnProperty;const I=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&K.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var T=r(90565);const N=function(t,e){var r=e?(0,T.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var C=/\w*$/;const B=function(t){var e=new t.constructor(t.source,C.exec(t));return e.lastIndex=t.lastIndex,e};var O=r(241),z=O.A?O.A.prototype:void 0,M=z?z.valueOf:void 0;const j=function(t){return M?Object(M.call(t)):{}};var P=r(1801);const Y=function(t,e,r){var a=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,T.A)(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return N(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,P.A)(t,r);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return B(t);case"[object Symbol]":return j(t)}};var F=r(18598),W=r(92049),X=r(99912),U=r(53098);const H=function(t){return(0,U.A)(t)&&"[object Map]"==(0,$.A)(t)};var Z=r(52789),q=r(64841),G=q.A&&q.A.isMap;const V=G?(0,Z.A)(G):H;var J=r(23149);const Q=function(t){return(0,U.A)(t)&&"[object Set]"==(0,$.A)(t)};var tt=q.A&&q.A.isSet;const et=tt?(0,Z.A)(tt):Q;var rt="[object Arguments]",at="[object Function]",nt="[object Object]",it={};it[rt]=it["[object Array]"]=it["[object ArrayBuffer]"]=it["[object DataView]"]=it["[object Boolean]"]=it["[object Date]"]=it["[object Float32Array]"]=it["[object Float64Array]"]=it["[object Int8Array]"]=it["[object Int16Array]"]=it["[object Int32Array]"]=it["[object Map]"]=it["[object Number]"]=it[nt]=it["[object RegExp]"]=it["[object Set]"]=it["[object String]"]=it["[object Symbol]"]=it["[object Uint8Array]"]=it["[object Uint8ClampedArray]"]=it["[object Uint16Array]"]=it["[object Uint32Array]"]=!0,it["[object Error]"]=it[at]=it["[object WeakMap]"]=!1;const st=function t(e,r,a,n,i,s){var o,c=1&r,l=2&r,u=4&r;if(a&&(o=i?a(e,n,i,s):a(e)),void 0!==o)return o;if(!(0,J.A)(e))return e;var w=(0,W.A)(e);if(w){if(o=I(e),!c)return(0,m.A)(e,o)}else{var L=(0,$.A)(e),S=L==at||"[object GeneratorFunction]"==L;if((0,X.A)(e))return(0,f.A)(e,c);if(L==nt||L==rt||S&&!i){if(o=l||S?{}:(0,F.A)(e),!c)return l?E(e,x(o,e)):k(e,p(o,e))}else{if(!it[L])return i?e:{};o=Y(e,L,c)}}s||(s=new d.A);var _=s.get(e);if(_)return _;s.set(e,o),et(e)?e.forEach((function(n){o.add(t(n,r,a,n,e,s))})):V(e)&&e.forEach((function(n,i){o.set(i,t(n,r,a,i,e,s))}));var v=u?l?R:D.A:l?b.A:y.A,A=w?void 0:v(e);return(0,h.A)(A||e,(function(n,i){A&&(n=e[i=n]),(0,g.A)(o,i,t(n,r,a,i,e,s))})),o};const ot=function(t){return st(t,4)};var ct=r(75937),lt=r(25582),dt=r(70451),ht=r(697),gt=function(){var t=(0,l.K2)((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[1,15],r=[1,7],a=[1,13],n=[1,14],i=[1,19],s=[1,16],o=[1,17],c=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],x={trace:(0,l.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,l.K2)((function(t,e,r,a,n,i,s){var o=i.length-1;switch(n){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",i[o-1]),a.setHierarchy(i[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:a.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const n=a.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:a.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]);a.generateId();this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const s=a.generateId();this.$={id:s,type:"composite",label:"",children:i[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}}),"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:a,29:n,31:i,39:s,43:o,46:c},{8:[1,20]},t(d,[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:a,29:n,31:i,39:s,43:o,46:c}),t(h,[2,16],{14:22,15:g,16:u}),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(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:i},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:n,31:i,39:s,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:i},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:n,31:i,39:s,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[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:b},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,l.K2)((function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)}),"parseError"),parse:(0,l.K2)((function(t){var e=this,r=[0],a=[],n=[null],i=[],s=this.table,o="",c=0,d=0,h=0,g=i.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var b=u.yylloc;i.push(b);var x=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)((function(t){r.length=r.length-2*t,n.length=n.length-t,i.length=i.length-t}),"popStack"),(0,l.K2)(f,"lex");for(var m,w,k,L,S,_,v,E,D,A={};;){if(k=r[r.length-1],this.defaultActions[k]?L=this.defaultActions[k]:(null==m&&(m=f()),L=s[k]&&s[k][m]),void 0===L||!L.length||!L[0]){var R="";for(_ in D=[],s[k])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");R=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:b,expected:D})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(L[0]){case 1:r.push(m),n.push(u.yytext),i.push(u.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=u.yyleng,o=u.yytext,c=u.yylineno,b=u.yylloc,h>0&&h--);break;case 2:if(v=this.productions_[L[1]][1],A.$=n[n.length-v],A._$={first_line:i[i.length-(v||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(v||1)].first_column,last_column:i[i.length-1].last_column},x&&(A._$.range=[i[i.length-(v||1)].range[0],i[i.length-1].range[1]]),void 0!==(S=this.performAction.apply(A,[o,d,c,y.yy,L[1],n,i].concat(g))))return S;v&&(r=r.slice(0,-1*v*2),n=n.slice(0,-1*v),i=i.slice(0,-1*v)),r.push(this.productions_[L[1]][0]),n.push(A.$),i.push(A._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}),"parse")},f=function(){return{EOF:1,parseError:(0,l.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,l.K2)((function(t,e){return this.yy=e||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:(0,l.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,l.K2)((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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),r.length-1&&(this.yylineno-=r.length-1);var n=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,l.K2)((function(){return this._more=!0,this}),"more"),reject:(0,l.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,l.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,l.K2)((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:(0,l.K2)((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:(0,l.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,l.K2)((function(t,e){var r,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in n)this[i]=n[i];return!1}return!1}),"test_match"),next:(0,l.K2)((function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),i=0;i<n.length;i++)if((r=this._input.match(this.rules[n[i]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,l.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,l.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,l.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,l.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,l.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,l.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,l.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,l.K2)((function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";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:",e.yytext),"NODE_DESCR";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 e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=f,(0,l.K2)(m,"Parser"),m.prototype=x,x.Parser=m,new m}();gt.parser=gt;var ut=gt,yt=new Map,pt=[],bt=new Map,xt="color",ft="fill",mt=(0,c.D7)(),wt=new Map,kt="",Lt=(0,l.K2)((t=>c.Y2.sanitizeText(t,mt)),"sanitizeText"),St=(0,l.K2)((function(t,e=""){let r=wt.get(t);r||(r={id:t,styles:[],textStyles:[]},wt.set(t,r)),null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(xt).exec(t)){const t=e.replace(ft,"bgFill").replace(xt,ft);r.textStyles.push(t)}r.styles.push(e)}))}),"addStyleClass"),_t=(0,l.K2)((function(t,e=""){const r=yt.get(t);null!=e&&(r.styles=e.split(","))}),"addStyle2Node"),vt=(0,l.K2)((function(t,e){t.split(",").forEach((function(t){let r=yt.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},yt.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)}))}),"setCssClass"),Et=(0,l.K2)(((t,e)=>{const r=t.flat(),a=[],n=r.find((t=>"column-setting"===t?.type)),i=n?.columns??-1;for(const s of r)if("number"==typeof i&&i>0&&"column-setting"!==s.type&&"number"==typeof s.widthInColumns&&s.widthInColumns>i&&l.Rm.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${i}`),s.label&&(s.label=Lt(s.label)),"classDef"!==s.type)if("applyClass"!==s.type)if("applyStyles"!==s.type)if("column-setting"===s.type)e.columns=s.columns??-1;else if("edge"===s.type){const t=(bt.get(s.id)??0)+1;bt.set(s.id,t),s.id=t+"-"+s.id,pt.push(s)}else{s.label||("composite"===s.type?s.label="":s.label=s.id);const t=yt.get(s.id);if(void 0===t?yt.set(s.id,s):("na"!==s.type&&(t.type=s.type),s.label!==s.id&&(t.label=s.label)),s.children&&Et(s.children,s),"space"===s.type){const t=s.width??1;for(let e=0;e<t;e++){const t=ot(s);t.id=t.id+"-"+e,yt.set(t.id,t),a.push(t)}}else void 0===t&&a.push(s)}else s?.stylesStr&&_t(s.id,s?.stylesStr);else vt(s.id,s?.styleClass??"");else St(s.id,s.css);e.children=a}),"populateBlockDatabase"),Dt=[],At={id:"root",type:"composite",children:[],columns:-1},Rt=(0,l.K2)((()=>{l.Rm.debug("Clear called"),(0,c.IU)(),At={id:"root",type:"composite",children:[],columns:-1},yt=new Map([["root",At]]),Dt=[],wt=new Map,pt=[],bt=new Map,kt=""}),"clear");function $t(t){switch(l.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return l.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Kt(t){return l.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function It(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,l.K2)($t,"typeStr2Type"),(0,l.K2)(Kt,"edgeTypeStr2Type"),(0,l.K2)(It,"edgeStrToEdgeData");var Tt=0,Nt=(0,l.K2)((()=>(Tt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Tt)),"generateId"),Ct=(0,l.K2)((t=>{At.children=t,Et(t,At),Dt=At.children}),"setHierarchy"),Bt=(0,l.K2)((t=>{const e=yt.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1}),"getColumns"),Ot=(0,l.K2)((()=>[...yt.values()]),"getBlocksFlat"),zt=(0,l.K2)((()=>Dt||[]),"getBlocks"),Mt=(0,l.K2)((()=>pt),"getEdges"),jt=(0,l.K2)((t=>yt.get(t)),"getBlock"),Pt=(0,l.K2)((t=>{yt.set(t.id,t)}),"setBlock"),Yt=(0,l.K2)((t=>{kt=t}),"setDiagramId"),Ft=(0,l.K2)((()=>kt),"getDiagramId"),Wt=(0,l.K2)((()=>l.Rm),"getLogger"),Xt=(0,l.K2)((function(){return wt}),"getClasses"),Ut={getConfig:(0,l.K2)((()=>(0,c.zj)().block),"getConfig"),typeStr2Type:$t,edgeTypeStr2Type:Kt,edgeStrToEdgeData:It,getLogger:Wt,getBlocksFlat:Ot,getBlocks:zt,getEdges:Mt,setHierarchy:Ct,getBlock:jt,setBlock:Pt,getColumns:Bt,getClasses:Xt,clear:Rt,generateId:Nt,setDiagramId:Yt,getDiagramId:Ft},Ht=(0,l.K2)(((t,e)=>{const r=ct.A,a=r(t,"r"),n=r(t,"g"),i=r(t,"b");return lt.A(a,n,i,e)}),"fade"),Zt=(0,l.K2)((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${Ht(t.mainBkg,.5)};\n fill: ${Ht(t.clusterBkg,.5)};\n stroke: ${Ht(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,a.o)()}\n`),"getStyles"),qt=(0,l.K2)(((t,e,r,a)=>{e.forEach((e=>{Gt[e](t,r,a)}))}),"insertMarkers"),Gt={extension:(0,l.K2)(((t,e,r)=>{l.Rm.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"),composition:(0,l.K2)(((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"),aggregation:(0,l.K2)(((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"),dependency:(0,l.K2)(((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"),lollipop:(0,l.K2)(((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"),point:(0,l.K2)(((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"),circle:(0,l.K2)(((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"),cross:(0,l.K2)(((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"),barb:(0,l.K2)(((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")},Vt=qt,Jt=(0,c.D7)()?.block?.padding??8;function Qt(t,e){if(0===t||!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(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,l.K2)(Qt,"calculateBlockPosition");var te=(0,l.K2)((t=>{let e=0,r=0;for(const a of t.children){const{width:t,height:n,x:i,y:s}=a.size??{width:0,height:0,x:0,y:0};l.Rm.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",n,"x:",i,"y:",s,a.type),"space"!==a.type&&(t>e&&(e=t/(a.widthInColumns??1)),n>r&&(r=n))}return{width:e,height:r}}),"getMaxChildSize");function ee(t,e,r=0,a=0){l.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let n=0,i=0;if(t.children?.length>0){for(const r of t.children)ee(r,e);const s=te(t);n=s.width,i=s.height,l.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",n,i);for(const e of t.children)e.size&&(l.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${n} ${i} ${JSON.stringify(e.size)}`),e.size.width=n*(e.widthInColumns??1)+Jt*((e.widthInColumns??1)-1),e.size.height=i,e.size.x=0,e.size.y=0,l.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${n} maxHeight:${i}`));for(const r of t.children)ee(r,e,n,i);const o=t.columns??-1;let c=0;for(const e of t.children)c+=e.widthInColumns??1;let d=t.children.length;o>0&&o<c&&(d=o);const h=Math.ceil(c/d);let g=d*(n+Jt)+Jt,u=h*(i+Jt)+Jt;if(g<r){l.Rm.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${g}`),g=r,u=a;const e=(r-d*Jt-Jt)/d,s=(a-h*Jt-Jt)/h;l.Rm.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",n),l.Rm.debug("Size indata abc88",t.id,"childHeight",s,"maxHeight",i),l.Rm.debug("Size indata abc88 xSize",d,"padding",Jt);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=s,r.size.x=0,r.size.y=0)}if(l.Rm.debug(`abc95 (finale calc) ${t.id} xSize ${d} ySize ${h} columns ${o}${t.children.length} width=${Math.max(g,t.size?.width||0)}`),g<(t?.size?.width||0)){g=t?.size?.width||0;const e=o>0?Math.min(t.children.length,o):t.children.length;if(e>0){const r=(g-e*Jt-Jt)/e;l.Rm.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:g,height:u,x:0,y:0}}l.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function re(t,e){l.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const r=t.columns??-1;if(l.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const a=t?.children[0]?.size?.width??0,n=t.children.length*a+(t.children.length-1)*Jt;l.Rm.debug("widthOfChildren 88",n,"posX");const i=new Map;{let e=0;for(const a of t.children){if(!a.size)continue;const{py:t}=Qt(r,e),n=i.get(t)??0;a.size.height>n&&i.set(t,a.size.height);let s=a?.widthInColumns??1;r>0&&(s=Math.min(s,r-e%r)),e+=s}}const s=new Map;{let t=0;const e=[...i.keys()].sort(((t,e)=>t-e));for(const r of e)s.set(r,t),t+=(i.get(r)??0)+Jt}let o=0;l.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let c=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Jt,d=0;for(const h of t.children){const a=t;if(!h.size)continue;const{width:n,height:g}=h.size,{px:u,py:y}=Qt(r,o);if(y!=d&&(d=y,c=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Jt,l.Rm.debug("New row in layout for block",t.id," and child ",h.id,d)),l.Rm.debug(`abc89 layout blocks (child) id: ${h.id} Pos: ${o} (px, py) ${u},${y} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${n}${Jt}`),a.size){const t=n/2;h.size.x=c+Jt+t,l.Rm.debug(`abc91 layout blocks (calc) px, pyid:${h.id} startingPos=X${c} new startingPosX${h.size.x} ${t} padding=${Jt} width=${n} halfWidth=${t} => x:${h.size.x} y:${h.size.y} ${h.widthInColumns} (width * (child?.w || 1)) / 2 ${n*(h?.widthInColumns??1)/2}`),c=h.size.x+t;const e=s.get(y)??0,r=i.get(y)??g;h.size.y=a.size.y-a.size.height/2+e+r/2+Jt,l.Rm.debug(`abc88 layout blocks (calc) px, pyid:${h.id}startingPosX${c}${Jt}${t}=>x:${h.size.x}y:${h.size.y}${h.widthInColumns}(width * (child?.w || 1)) / 2${n*(h?.widthInColumns??1)/2}`)}h.children&&re(h,e);let p=h?.widthInColumns??1;r>0&&(p=Math.min(p,r-o%r)),o+=p,l.Rm.debug("abc88 columnsPos",h,o)}}l.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function ae(t,{minX:e,minY:r,maxX:a,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:s,width:o,height:c}=t.size;i-o/2<e&&(e=i-o/2),s-c/2<r&&(r=s-c/2),i+o/2>a&&(a=i+o/2),s+c/2>n&&(n=s+c/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:a,maxY:n}=ae(i,{minX:e,minY:r,maxX:a,maxY:n}));return{minX:e,minY:r,maxX:a,maxY:n}}function ne(t){const e=t.getBlock("root");if(!e)return;ee(e,t,0,0),re(e,t),l.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:a,maxX:n,maxY:i}=ae(e);return{x:r,y:a,width:n-r,height:i-a}}(0,l.K2)(ee,"setBlockSizes"),(0,l.K2)(re,"layoutBlocks"),(0,l.K2)(ae,"findBounds"),(0,l.K2)(ne,"layout");var ie=(0,l.K2)((async(t,e,r,a=!1,n=!1)=>{let i=e||"";"object"==typeof i&&(i=i[0]);const o=(0,c.D7)(),l=(0,c.E)(o);return await(0,s.GZ)(t,i,{style:r,isTitle:a,useHtmlLabels:l,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},o)}),"createLabel"),se=(0,l.K2)(((t,e,r,a,n)=>{e.arrowTypeStart&&ce(t,"start",e.arrowTypeStart,r,a,n),e.arrowTypeEnd&&ce(t,"end",e.arrowTypeEnd,r,a,n)}),"addEdgeMarkers"),oe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ce=(0,l.K2)(((t,e,r,a,n,i)=>{const s=oe[r];if(!s)return void l.Rm.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${n}_${i}-${s}${o})`)}),"addEdgeMarker"),le={},de={},he=(0,l.K2)((async(t,e)=>{const r=(0,c.D7)(),a=(0,c.E)(r),i=t.insert("g").attr("class","edgeLabel"),o=i.insert("g").attr("class","label"),l="markdown"===e.labelType,d=await(0,s.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:l,isNode:!1,markdown:l,width:l?void 0:Number.POSITIVE_INFINITY},r);o.node().appendChild(d);let h,g=d.getBBox(),u=g;if(a){const t=d.children[0],e=(0,dt.Ltv)(d);g=t.getBoundingClientRect(),u=g,e.attr("width",g.width),e.attr("height",g.height)}else{const t=(0,dt.Ltv)(d).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(o.attr("transform",(0,n.Wg)(u,a)),le[e.id]=i,e.width=g.width,e.height=g.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),s=await ie(i,e.startLabelLeft,e.labelStyle);h=s;let o=s.getBBox();if(a){const t=s.children[0],e=(0,dt.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}i.attr("transform",(0,n.Wg)(o,a)),de[e.id]||(de[e.id]={}),de[e.id].startLeft=r,ge(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),s=await ie(r,e.startLabelRight,e.labelStyle);h=s,i.node().appendChild(s);let o=s.getBBox();if(a){const t=s.children[0],e=(0,dt.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}i.attr("transform",(0,n.Wg)(o,a)),de[e.id]||(de[e.id]={}),de[e.id].startRight=r,ge(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),s=await ie(i,e.endLabelLeft,e.labelStyle);h=s;let o=s.getBBox();if(a){const t=s.children[0],e=(0,dt.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}i.attr("transform",(0,n.Wg)(o,a)),r.node().appendChild(s),de[e.id]||(de[e.id]={}),de[e.id].endLeft=r,ge(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),s=await ie(i,e.endLabelRight,e.labelStyle);h=s;let o=s.getBBox();if(a){const t=s.children[0],e=(0,dt.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}i.attr("transform",(0,n.Wg)(o,a)),r.node().appendChild(s),de[e.id]||(de[e.id]={}),de[e.id].endRight=r,ge(h,e.endLabelRight)}return d}),"insertEdgeLabel");function ge(t,e){(0,c.E)((0,c.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,l.K2)(ge,"setTerminalWidth");var ue=(0,l.K2)(((t,e)=>{l.Rm.debug("Moving label abc88 ",t.id,t.label,le[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=(0,c.D7)(),{subGraphTitleTotalMargin:n}=(0,i.O)(a);if(t.label){const a=le[t.id];let i=t.x,s=t.y;if(r){const a=o._K.calcLabelPosition(r);l.Rm.debug("Moving label "+t.label+" from (",i,",",s,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(i=a.x,s=a.y)}a.attr("transform",`translate(${i}, ${s+n/2})`)}if(t.startLabelLeft){const e=de[t.id].startLeft;let a=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,n=e.y}e.attr("transform",`translate(${a}, ${n})`)}if(t.startLabelRight){const e=de[t.id].startRight;let a=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,n=e.y}e.attr("transform",`translate(${a}, ${n})`)}if(t.endLabelLeft){const e=de[t.id].endLeft;let a=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,n=e.y}e.attr("transform",`translate(${a}, ${n})`)}if(t.endLabelRight){const e=de[t.id].endRight;let a=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,n=e.y}e.attr("transform",`translate(${a}, ${n})`)}}),"positionEdgeLabel"),ye=(0,l.K2)(((t,e)=>{const r=t.x,a=t.y,n=Math.abs(e.x-r),i=Math.abs(e.y-a),s=t.width/2,o=t.height/2;return n>=s||i>=o}),"outsideNode"),pe=(0,l.K2)(((t,e,r)=>{l.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,n=t.y,i=Math.abs(a-r.x),s=t.width/2;let o=r.x<e.x?s-i:s+i;const c=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*s>Math.abs(a-e.x)*c){let t=r.y<e.y?e.y-c-n:n-c-e.y;o=h*t/d;const a={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===o&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),l.Rm.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${o}`,a),a}{o=r.x<e.x?e.x-s-a:a-s-e.x;let t=d*o/h,n=r.x<e.x?r.x+h-o:r.x-h+o,i=r.y<e.y?r.y+t:r.y-t;return l.Rm.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${o}`,{_x:n,_y:i}),0===o&&(n=e.x,i=e.y),0===h&&(n=e.x),0===d&&(i=e.y),{x:n,y:i}}}),"intersection"),be=(0,l.K2)(((t,e)=>{l.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],n=!1;return t.forEach((t=>{if(ye(e,t)||n)a=t,n||r.push(t);else{const i=pe(e,a,t);let s=!1;r.forEach((t=>{s=s||t.x===i.x&&t.y===i.y})),r.some((t=>t.x===i.x&&t.y===i.y))||r.push(i),n=!0}})),r}),"cutPathAtIntersect"),xe=(0,l.K2)((function(t,e,r,a,i,s,o){let d=r.points;l.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=s.node(e.v);var u=s.node(e.w);u?.intersect&&g?.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(u.intersect(d[d.length-1]))),r.toCluster&&(l.Rm.debug("to cluster abc88",a[r.toCluster]),d=be(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(l.Rm.debug("from cluster abc88",a[r.fromCluster]),d=be(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const y=d.filter((t=>!Number.isNaN(t.y)));let p=dt.qrM;!r.curve||"graph"!==i&&"flowchart"!==i||(p=r.curve);const{x:b,y:x}=(0,n.RI)(r),f=(0,dt.n8j)().x(b).y(x).curve(p);let m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}const w=t.append("path").attr("d",f(y)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";((0,c.D7)().flowchart.arrowMarkerAbsolute||(0,c.D7)().state.arrowMarkerAbsolute)&&(k=(0,c.ID)(!0)),se(w,r,k,o,i);let L={};return h&&(L.updatedPath=d),L.originalPath=r.points,L}),"insertEdge"),fe=(0,l.K2)((t=>{const e=new Set;for(const 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)}return e}),"expandAndDeduplicateDirections"),me=(0,l.K2)(((t,e,r)=>{const a=fe(t),n=e.height+2*r.padding,i=n/2,s=e.width+2*i+r.padding,o=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:i,y:0},{x:s/2,y:2*o},{x:s-i,y:0},{x:s,y:0},{x:s,y:-n/3},{x:s+2*o,y:-n/2},{x:s,y:-2*n/3},{x:s,y:-n},{x:s-i,y:-n},{x:s/2,y:-n-2*o},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*o,y:-n/2},{x:0,y:-n/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:i,y:-n},{x:s-i,y:-n},{x:s,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:-i},{x:s,y:-n+i},{x:0,y:-n}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:s,y:0},{x:0,y:-i},{x:0,y:-n+i},{x:s,y:-n}]:a.has("right")&&a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:a.has("up")&&a.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:s/2,y:-n},{x:s,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o},{x:s,y:-o}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:s,y:-i},{x:0,y:-n}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-n}]:a.has("left")&&a.has("up")?[{x:s,y:0},{x:0,y:-i},{x:s,y:-n}]:a.has("left")&&a.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-n}]:a.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n+o}]:a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:a.has("up")?[{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:s/2,y:-n},{x:s,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o}]:a.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o},{x:s,y:-o}]:[{x:0,y:0}]}),"getArrowPoints");function we(t,e){return t.intersect(e)}(0,l.K2)(we,"intersectNode");var ke=we;function Le(t,e,r,a){var n=t.x,i=t.y,s=n-a.x,o=i-a.y,c=Math.sqrt(e*e*o*o+r*r*s*s),l=Math.abs(e*r*s/c);a.x<n&&(l=-l);var d=Math.abs(e*r*o/c);return a.y<i&&(d=-d),{x:n+l,y:i+d}}(0,l.K2)(Le,"intersectEllipse");var Se=Le;function _e(t,e,r){return Se(t,e,e,r)}(0,l.K2)(_e,"intersectCircle");var ve=_e;function Ee(t,e,r,a){var n,i,s,o,c,l,d,h,g,u,y,p,b;if(n=e.y-t.y,s=t.x-e.x,c=e.x*t.y-t.x*e.y,g=n*r.x+s*r.y+c,u=n*a.x+s*a.y+c,!(0!==g&&0!==u&&De(g,u)||(i=a.y-r.y,o=r.x-a.x,l=a.x*r.y-r.x*a.y,d=i*t.x+o*t.y+l,h=i*e.x+o*e.y+l,0!==d&&0!==h&&De(d,h)||0==(y=n*o-i*s))))return p=Math.abs(y/2),{x:(b=s*l-o*c)<0?(b-p)/y:(b+p)/y,y:(b=i*c-n*l)<0?(b-p)/y:(b+p)/y}}function De(t,e){return t*e>0}(0,l.K2)(Ee,"intersectLine"),(0,l.K2)(De,"sameSign");var Ae=Ee,Re=$e;function $e(t,e,r){var a=t.x,n=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)})):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var c=a-t.width/2-s,l=n-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=Ae(t,r,{x:c+h.x,y:l+h.y},{x:c+g.x,y:l+g.y});u&&i.push(u)}return i.length?(i.length>1&&i.sort((function(t,e){var a=t.x-r.x,n=t.y-r.y,i=Math.sqrt(a*a+n*n),s=e.x-r.x,o=e.y-r.y,c=Math.sqrt(s*s+o*o);return i<c?-1:i===c?0:1})),i[0]):t}(0,l.K2)($e,"intersectPolygon");var Ke={node:ke,circle:ve,ellipse:Se,polygon:Re,rect:(0,l.K2)(((t,e)=>{var r,a,n=t.x,i=t.y,s=e.x-n,o=e.y-i,c=t.width/2,l=t.height/2;return Math.abs(o)*c>Math.abs(s)*l?(o<0&&(l=-l),r=0===o?0:l*s/o,a=l):(s<0&&(c=-c),r=c,a=0===s?0:c*o/s),{x:n+r,y:i+a}}),"intersectRect")},Ie=(0,l.K2)((async(t,e,r,a)=>{const n=(0,c.D7)();let l;const d=e.useHtmlLabels||(0,c.E)(n);l=r||"node default";const h=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=h.insert("g").attr("class","label").attr("style",e.labelStyle);let u,y;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],y="markdown"===e.labelType?(0,s.GZ)(g,(0,c.jZ)((0,o.Sm)(u),n),{useHtmlLabels:d,width:e.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):await ie(g,(0,c.jZ)((0,o.Sm)(u),n),e.labelStyle,!1,a);let p=y.getBBox();const b=e.padding/2;if((0,c.E)(n)){const t=y.children[0],e=(0,dt.Ltv)(y);await(0,i.X)(t,u),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return d?g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):g.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:b,label:g}}),"labelHelper"),Te=(0,l.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds");function Ne(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,l.K2)(Ne,"insertPolygonShape");var Ce=(0,l.K2)((async(t,e)=>{e.useHtmlLabels||(0,c.E)((0,c.D7)())||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:n}=await Ie(t,e,"node "+e.classes,!0);l.Rm.info("Classes = ",e.classes);const i=r.insert("rect",":first-child");return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-n).attr("y",-a.height/2-n).attr("width",a.width+e.padding).attr("height",a.height+e.padding),Te(e,i),e.intersect=function(t){return Ke.rect(e,t)},r}),"note"),Be=(0,l.K2)((t=>t?" "+t:""),"formatClass"),Oe=(0,l.K2)(((t,e)=>`${e||"node default"}${Be(t.classes)} ${Be(t.class)}`),"getClassesFromNode"),ze=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding+(a.height+e.padding),i=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];l.Rm.info("Question main (Circle)");const s=Ne(r,n,n,i);return s.attr("style",e.style),Te(e,s),e.intersect=function(t){return l.Rm.warn("Intersect called"),Ke.polygon(e,i,t)},r}),"question"),Me=(0,l.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Ke.circle(e,14,t)},r}),"choice"),je=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.height+e.padding,i=n/4,s=a.width+2*i+e.padding,o=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],c=Ne(r,s,n,o);return c.attr("style",e.style),Te(e,c),e.intersect=function(t){return Ke.polygon(e,o,t)},r}),"hexagon"),Pe=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,void 0,!0),n=a.height+2*e.padding,i=n/2,s=a.width+2*i+e.padding,o=me(e.directions,a,e),c=Ne(r,s,n,o);return c.attr("style",e.style),Te(e,c),e.intersect=function(t){return Ke.polygon(e,o,t)},r}),"block_arrow"),Ye=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return Ne(r,n,i,s).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"rect_left_inv_arrow"),Fe=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],o=Ne(r,n,i,s);return o.attr("style",e.style),Te(e,o),e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"lean_right"),We=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],o=Ne(r,n,i,s);return o.attr("style",e.style),Te(e,o),e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"lean_left"),Xe=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],o=Ne(r,n,i,s);return o.attr("style",e.style),Te(e,o),e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"trapezoid"),Ue=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Ne(r,n,i,s);return o.attr("style",e.style),Te(e,o),e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"inv_trapezoid"),He=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],o=Ne(r,n,i,s);return o.attr("style",e.style),Te(e,o),e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"rect_right_inv_arrow"),Ze=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=n/2,s=i/(2.5+n/50),o=a.height+s+e.padding,c="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",c).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return Te(e,l),e.intersect=function(t){const r=Ke.rect(e,t),a=r.x-e.x;if(0!=i&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let n=s*s*(1-a*a/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,t.y-e.y>0&&(n=-n),r.y+=n}return r},r}),"cylinder"),qe=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:n}=await Ie(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),s=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,c=e.positioned?-s/2:-a.width/2-n,d=e.positioned?-o/2:-a.height/2-n;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Je(i,e.props.borders,s,o),t.delete("borders")),t.forEach((t=>{l.Rm.warn(`Unknown node property ${t}`)}))}return Te(e,i),e.intersect=function(t){return Ke.rect(e,t)},r}),"rect"),Ge=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:n}=await Ie(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),s=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,c=e.positioned?-s/2:-a.width/2-n,d=e.positioned?-o/2:-a.height/2-n;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Je(i,e.props.borders,s,o),t.delete("borders")),t.forEach((t=>{l.Rm.warn(`Unknown node property ${t}`)}))}return Te(e,i),e.intersect=function(t){return Ke.rect(e,t)},r}),"composite"),Ve=(0,l.K2)((async(t,e)=>{const{shapeSvg:r}=await Ie(t,e,"label",!0);l.Rm.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Je(a,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{l.Rm.warn(`Unknown node property ${t}`)}))}return Te(e,a),e.intersect=function(t){return Ke.rect(e,t)},r}),"labelRect");function Je(t,e,r,a){const n=[],i=(0,l.K2)((t=>{n.push(t,0)}),"addBorder"),s=(0,l.K2)((t=>{n.push(0,t)}),"skipBorder");e.includes("t")?(l.Rm.debug("add top border"),i(r)):s(r),e.includes("r")?(l.Rm.debug("add right border"),i(a)):s(a),e.includes("b")?(l.Rm.debug("add bottom border"),i(r)):s(r),e.includes("l")?(l.Rm.debug("add left border"),i(a)):s(a),t.attr("stroke-dasharray",n.join(" "))}(0,l.K2)(Je,"applyNodePropertyBorders");var Qe=(0,l.K2)((async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),n=a.insert("rect",":first-child"),i=a.insert("line"),s=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof o?o[0]:o,l.Rm.info("Label text abc79",d,o,"object"==typeof o);const h=await ie(s,d,e.labelStyle,!0,!0);let g={width:0,height:0};if((0,c.E)((0,c.D7)())){const t=h.children[0],e=(0,dt.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}l.Rm.info("Text 2",o);const u=o.slice(1,o.length);let y=h.getBBox();const p=await ie(s,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,c.E)((0,c.D7)())){const t=p.children[0],e=(0,dt.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const b=e.padding/2;return(0,dt.Ltv)(p).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+b+5)+")"),(0,dt.Ltv)(h).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=s.node().getBBox(),s.attr("transform","translate("+-g.width/2+", "+(-g.height/2-b+3)+")"),n.attr("class","outer title-state").attr("x",-g.width/2-b).attr("y",-g.height/2-b).attr("width",g.width+e.padding).attr("height",g.height+e.padding),i.attr("class","divider").attr("x1",-g.width/2-b).attr("x2",g.width/2+b).attr("y1",-g.height/2-b+y.height+b).attr("y2",-g.height/2-b+y.height+b),Te(e,n),e.intersect=function(t){return Ke.rect(e,t)},a}),"rectWithTitle"),tr=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.height+e.padding,i=a.width+n/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return Te(e,s),e.intersect=function(t){return Ke.rect(e,t)},r}),"stadium"),er=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:n}=await Ie(t,e,Oe(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+n).attr("width",a.width+e.padding).attr("height",a.height+e.padding),l.Rm.info("Circle main"),Te(e,i),e.intersect=function(t){return l.Rm.info("Circle intersect",e,a.width/2+n,t),Ke.circle(e,a.width/2+n,t)},r}),"circle"),rr=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:n}=await Ie(t,e,Oe(e,void 0),!0),i=r.insert("g",":first-child"),s=i.insert("circle"),o=i.insert("circle");return i.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+n+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+n).attr("width",a.width+e.padding).attr("height",a.height+e.padding),l.Rm.info("DoubleCircle main"),Te(e,s),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,a.width/2+n+5,t),Ke.circle(e,a.width/2+n+5,t)},r}),"doublecircle"),ar=(0,l.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await Ie(t,e,Oe(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Ne(r,n,i,s);return o.attr("style",e.style),Te(e,o),e.intersect=function(t){return Ke.polygon(e,s,t)},r}),"subroutine"),nr=(0,l.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Te(e,a),e.intersect=function(t){return Ke.circle(e,7,t)},r}),"start"),ir=(0,l.K2)(((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===r&&(n=10,i=70);const s=a.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return Te(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Ke.rect(e,t)},a}),"forkJoin"),sr={rhombus:ze,composite:Ge,question:ze,rect:qe,labelRect:Ve,rectWithTitle:Qe,choice:Me,circle:er,doublecircle:rr,stadium:tr,hexagon:je,block_arrow:Pe,rect_left_inv_arrow:Ye,lean_right:Fe,lean_left:We,trapezoid:Xe,inv_trapezoid:Ue,rect_right_inv_arrow:He,cylinder:Ze,start:nr,end:(0,l.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Te(e,n),e.intersect=function(t){return Ke.circle(e,7,t)},r}),"end"),note:Ce,subroutine:ar,fork:ir,join:ir,class_box:(0,l.K2)((async(t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),s=n.insert("line"),o=n.insert("line");let l=0,d=4;const h=n.insert("g").attr("class","label");let g=0;const u=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",p=await ie(h,y,e.labelStyle,!0,!0);let b=p.getBBox();if((0,c.E)((0,c.D7)())){const t=p.children[0],e=(0,dt.Ltv)(p);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}e.classData.annotations[0]&&(d+=b.height+4,l+=b.width);let x=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,c.E)((0,c.D7)())?x+="&lt;"+e.classData.type+"&gt;":x+="<"+e.classData.type+">");const f=await ie(h,x,e.labelStyle,!0,!0);(0,dt.Ltv)(f).attr("class","classTitle");let m=f.getBBox();if((0,c.E)((0,c.D7)())){const t=f.children[0],e=(0,dt.Ltv)(f);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}d+=m.height+4,m.width>l&&(l=m.width);const w=[];e.classData.members.forEach((async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,c.E)((0,c.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const n=await ie(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let i=n.getBBox();if((0,c.E)((0,c.D7)())){const t=n.children[0],e=(0,dt.Ltv)(n);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>l&&(l=i.width),d+=i.height+4,w.push(n)})),d+=8;const k=[];if(e.classData.methods.forEach((async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,c.E)((0,c.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const n=await ie(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let i=n.getBBox();if((0,c.E)((0,c.D7)())){const t=n.children[0],e=(0,dt.Ltv)(n);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>l&&(l=i.width),d+=i.height+4,k.push(n)})),d+=8,u){let t=(l-b.width)/2;(0,dt.Ltv)(p).attr("transform","translate( "+(-1*l/2+t)+", "+-1*d/2+")"),g=b.height+4}let L=(l-m.width)/2;return(0,dt.Ltv)(f).attr("transform","translate( "+(-1*l/2+L)+", "+(-1*d/2+g)+")"),g+=m.height+4,s.attr("class","divider").attr("x1",-l/2-r).attr("x2",l/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,w.forEach((t=>{(0,dt.Ltv)(t).attr("transform","translate( "+-l/2+", "+(-1*d/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4})),g+=8,o.attr("class","divider").attr("x1",-l/2-r).attr("x2",l/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,k.forEach((t=>{(0,dt.Ltv)(t).attr("transform","translate( "+-l/2+", "+(-1*d/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4})),i.attr("style",e.style).attr("class","outer title-state").attr("x",-l/2-r).attr("y",-d/2-r).attr("width",l+e.padding).attr("height",d+e.padding),Te(e,i),e.intersect=function(t){return Ke.rect(e,t)},n}),"class_box")},or={},cr=(0,l.K2)((async(t,e,r)=>{let a,n;if(e.link){let i;"sandbox"===(0,c.D7)().securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),n=await sr[e.shape](a,e,r)}else n=await sr[e.shape](t,e,r),a=n;return e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),or[e.id]=a,e.haveCallback&&or[e.id].attr("class",or[e.id].attr("class")+" clickable"),a}),"insertNode"),lr=(0,l.K2)((t=>{const e=or[t.id];l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode");function dr(t,e,r=!1){const a=t;let n="default";(a?.classes?.length||0)>0&&(n=(a?.classes??[]).join(" ")),n+=" flowchart-label";let i,s=0,l="";switch(a.type){case"round":s=5,l="rect";break;case"composite":s=0,l="composite",i=0;break;case"square":case"group":default:l="rect";break;case"diamond":l="question";break;case"hexagon":l="hexagon";break;case"block_arrow":l="block_arrow";break;case"odd":case"rect_left_inv_arrow":l="rect_left_inv_arrow";break;case"lean_right":l="lean_right";break;case"lean_left":l="lean_left";break;case"trapezoid":l="trapezoid";break;case"inv_trapezoid":l="inv_trapezoid";break;case"circle":l="circle";break;case"ellipse":l="ellipse";break;case"stadium":l="stadium";break;case"subroutine":l="subroutine";break;case"cylinder":l="cylinder";break;case"doublecircle":l="doublecircle"}const d=(0,o.sM)(a?.styles??[]),h=a.label,g=a.size??{width:0,height:0,x:0,y:0},u=e.getDiagramId();return{labelStyle:d.labelStyle,shape:l,labelText:h,rx:s,ry:s,class:n,style:d.style,id:a.id,domId:u?`${u}-${a.id}`:a.id,directions:a.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:a.type,padding:i??(0,c.zj)()?.block?.padding??0}}async function hr(t,e,r){const a=dr(e,r,!1);if("group"===a.type)return;const n=(0,c.zj)(),i=await cr(t,a,{config:n}),s=i.node().getBBox(),o=r.getBlock(a.id);o.size={width:s.width,height:s.height,x:0,y:0,node:i},r.setBlock(o),i.remove()}async function gr(t,e,r){const a=dr(e,r,!0);if("space"!==r.getBlock(a.id).type){const r=(0,c.zj)();await cr(t,a,{config:r}),e.intersect=a?.intersect,lr(a)}}async function ur(t,e,r,a){for(const n of e)await a(t,n,r),n.children&&await ur(t,n.children,r,a)}async function yr(t,e,r){await ur(t,e,r,hr)}async function pr(t,e,r){await ur(t,e,r,gr)}async function br(t,e,r,a,n){const i=new ht.T({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&i.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of e)if(s.start&&s.end){const e=a.getBlock(s.start),r=a.getBlock(s.end);if(e?.size&&r?.size){const a=e.size,o=r.size,c=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}],l=n?`${n}-${s.id}`:s.id;xe(t,{v:s.start,w:s.end,name:l},{...s,id:l,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",i,n),s.label&&(await he(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),ue({...s,x:c[1].x,y:c[1].y},{originalPath:c}))}}}(0,l.K2)(dr,"getNodeFromBlock"),(0,l.K2)(hr,"calculateBlockSize"),(0,l.K2)(gr,"insertBlockPositioned"),(0,l.K2)(ur,"performOperations"),(0,l.K2)(yr,"calculateBlockSizes"),(0,l.K2)(pr,"insertBlocks"),(0,l.K2)(br,"insertEdges");var xr=(0,l.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),fr={parser:ut,db:Ut,renderer:{draw:(0,l.K2)((async function(t,e,r,a){const{securityLevel:n,block:i}=(0,c.zj)(),s=a.db;let o;s.setDiagramId(e),"sandbox"===n&&(o=(0,dt.Ltv)("#i"+e));const d="sandbox"===n?(0,dt.Ltv)(o.nodes()[0].contentDocument.body):(0,dt.Ltv)("body"),h="sandbox"===n?d.select(`[id="${e}"]`):(0,dt.Ltv)(`[id="${e}"]`);Vt(h,["point","circle","cross"],a.type,e);const g=s.getBlocks(),u=s.getBlocksFlat(),y=s.getEdges(),p=h.insert("g").attr("class","block");await yr(p,g,s);const b=ne(s);if(await pr(p,g,s),await br(p,y,u,s,e),b){const t=b,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:n}=i;(0,c.a$)(h,r,a,!!n),l.Rm.debug("Here Bounds",b,t),h.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}}),"draw"),getClasses:xr},styles:Zt}},2634:(t,e,r)=>{r.d(e,{A:()=>a});const a=function(t,e){for(var r=-1,a=null==t?0:t.length,n=0,i=[];++r<a;){var s=t[r];e(s,r,t)&&(i[n++]=s)}return i}},13153:(t,e,r)=>{r.d(e,{A:()=>a});const a=function(){return[]}},14792:(t,e,r)=>{r.d(e,{A:()=>o});var a=r(2634),n=r(13153),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const o=s?function(t){return null==t?[]:(t=Object(t),(0,a.A)(s(t),(function(e){return i.call(t,e)})))}:n.A},19042:(t,e,r)=>{r.d(e,{A:()=>s});var a=r(56212),n=r(14792),i=r(27422);const s=function(t){return(0,a.A)(t,i.A,n.A)}},27422:(t,e,r)=>{r.d(e,{A:()=>s});var a=r(83607),n=r(69471),i=r(38446);const s=function(t){return(0,i.A)(t)?(0,a.A)(t):(0,n.A)(t)}},52501:(t,e,r)=>{r.d(e,{o:()=>a});var a=(0,r(40797).K2)((()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n"),"getIconStyles")},56212:(t,e,r)=>{r.d(e,{A:()=>i});var a=r(76912),n=r(92049);const i=function(t,e,r){var i=e(t);return(0,n.A)(t)?i:(0,a.A)(i,r(t))}},72641:(t,e,r)=>{r.d(e,{A:()=>a});const a=function(t,e){for(var r=-1,a=null==t?0:t.length;++r<a&&!1!==e(t[r],r,t););return t}},75937:(t,e,r)=>{r.d(e,{A:()=>i});var a=r(72453),n=r(74886);const i=(t,e)=>a.A.lang.round(n.A.parse(t)[e])},76912:(t,e,r)=>{r.d(e,{A:()=>a});const a=function(t,e){for(var r=-1,a=e.length,n=t.length;++r<a;)t[n+r]=e[r];return t}}}]);