@eventcatalogtest/studio
Version:
A drag and drop UI for distributed systems that keeps your diagrams where they belong – in your repo
88 lines (79 loc) • 100 kB
JavaScript
exports.id=5580,exports.ids=[5580],exports.modules={25580:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>H});var d=c(7827),e=c(65299),f=c(58210),g=c(32892),h=c(31174),i=c(77667),j=c(38073),k=c(52206),l=c(97102),m=c(43739),n=function(){var a=(0,g.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],h=[1,20],i=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,6,13,15,16,19,22],p=[1,33],q=[1,34],r=[1,6,7,11,13,15,16,19,22],s={trace:(0,g.K2)(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:(0,g.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 16:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 17:case 21:d.decorateNode({class:f[h]});break;case 18:d.getLogger().trace("SPACELIST");break;case 19:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 20:d.decorateNode({icon:f[h]});break;case 25:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 26:this.$={id:f[h],descr:f[h],type:d.nodeType.DEFAULT};break;case 27:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:c,9:22,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:k,7:l,10:23,11:m},a(n,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:i}),a(n,[2,18]),a(n,[2,19]),a(n,[2,20]),a(n,[2,21]),a(n,[2,23]),a(n,[2,24]),a(n,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:l,10:32,11:m},{1:[2,7],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(o,[2,14],{7:p,11:q}),a(r,[2,8]),a(r,[2,9]),a(r,[2,10]),a(n,[2,15]),a(n,[2,16]),a(n,[2,17]),{20:[1,35]},{21:[1,36]},a(o,[2,13],{7:p,11:q}),a(r,[2,11]),a(r,[2,12]),{21:[1,37]},a(n,[2,25]),a(n,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,g.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function t(){this.yy={}}return s.lexer={EOF:1,parseError:(0,g.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.K2)(function(){return this._more=!0,this},"more"),reject:(0,g.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,g.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.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,g.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.K2)(function(a,b,c,d){switch(c){case 0:return a.getLogger().trace("Found comment",b.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return a.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:a.getLogger().trace("end icon"),this.popState();break;case 10:return a.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return a.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 27:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return a.getLogger().trace("Long description:",b.yytext),20}},"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}}},(0,g.K2)(t,"Parser"),t.prototype=s,s.Parser=t,new t}();n.parser=n;var o={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},p=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=o,this.clear(),this.getType=this.getType.bind(this),this.getMindmap=this.getMindmap.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{(0,g.K2)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={}}getParent(a){for(let b=this.nodes.length-1;b>=0;b--)if(this.nodes[b].level<a)return this.nodes[b];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(a,b,c,d){g.Rm.info("addNode",a,b,c,d);let e=(0,g.D7)(),f=e.mindmap?.padding??g.UI.mindmap.padding;switch(d){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:f*=2}let h={id:this.count++,nodeId:(0,g.jZ)(b,e),level:a,descr:(0,g.jZ)(c,e),type:d,children:[],width:e.mindmap?.maxNodeWidth??g.UI.mindmap.maxNodeWidth,padding:f},i=this.getParent(a);if(i)i.children.push(h),this.nodes.push(h);else if(0===this.nodes.length)this.nodes.push(h);else throw Error(`There can be only one root. No parent could be found for ("${h.descr}")`)}getType(a,b){switch(g.Rm.debug("In get type",a,b),a){case"[":return this.nodeType.RECT;case"(":return")"===b?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(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}decorateNode(a){if(!a)return;let b=(0,g.D7)(),c=this.nodes[this.nodes.length-1];a.icon&&(c.icon=(0,g.jZ)(a.icon,b)),a.class&&(c.class=(0,g.jZ)(a.class,b))}type2Str(a){switch(a){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"}}getLogger(){return g.Rm}},q=(0,g.K2)(function(a,b,c,d){b.append("path").attr("id","node-"+c.id).attr("class","node-bkg node-"+a.type2Str(c.type)).attr("d",`M0 ${c.height-5} v${-c.height+10} q0,-5 5,-5 h${c.width-10} q5,0 5,5 v${c.height-5} H0 Z`),b.append("line").attr("class","node-line-"+d).attr("x1",0).attr("y1",c.height).attr("x2",c.width).attr("y2",c.height)},"defaultBkg"),r=(0,g.K2)(function(a,b,c){b.append("rect").attr("id","node-"+c.id).attr("class","node-bkg node-"+a.type2Str(c.type)).attr("height",c.height).attr("width",c.width)},"rectBkg"),s=(0,g.K2)(function(a,b,c){let d=c.width,e=c.height,f=.15*d,g=.25*d,h=.35*d,i=.2*d;b.append("path").attr("id","node-"+c.id).attr("class","node-bkg node-"+a.type2Str(c.type)).attr("d",`M0 0 a${f},${f} 0 0,1 ${.25*d},${-1*d*.1}
a${h},${h} 1 0,1 ${.4*d},${-1*d*.1}
a${g},${g} 1 0,1 ${.35*d},${.2*d}
a${f},${f} 1 0,1 ${.15*d},${.35*e}
a${i},${i} 1 0,1 ${-1*d*.15},${.65*e}
a${g},${f} 1 0,1 ${-1*d*.25},${.15*d}
a${h},${h} 1 0,1 ${-1*d*.5},0
a${f},${f} 1 0,1 ${-1*d*.25},${-1*d*.15}
a${f},${f} 1 0,1 ${-1*d*.1},${-1*e*.35}
a${i},${i} 1 0,1 ${.1*d},${-1*e*.65}
H0 V0 Z`)},"cloudBkg"),t=(0,g.K2)(function(a,b,c){let d=c.width,e=c.height,f=.15*d;b.append("path").attr("id","node-"+c.id).attr("class","node-bkg node-"+a.type2Str(c.type)).attr("d",`M0 0 a${f},${f} 1 0,0 ${.25*d},${-1*e*.1}
a${f},${f} 1 0,0 ${.25*d},0
a${f},${f} 1 0,0 ${.25*d},0
a${f},${f} 1 0,0 ${.25*d},${.1*e}
a${f},${f} 1 0,0 ${.15*d},${.33*e}
a${.8*f},${.8*f} 1 0,0 0,${.34*e}
a${f},${f} 1 0,0 ${-1*d*.15},${.33*e}
a${f},${f} 1 0,0 ${-1*d*.25},${.15*e}
a${f},${f} 1 0,0 ${-1*d*.25},0
a${f},${f} 1 0,0 ${-1*d*.25},0
a${f},${f} 1 0,0 ${-1*d*.25},${-1*e*.15}
a${f},${f} 1 0,0 ${-1*d*.1},${-1*e*.33}
a${.8*f},${.8*f} 1 0,0 0,${-1*e*.34}
a${f},${f} 1 0,0 ${.1*d},${-1*e*.33}
H0 V0 Z`)},"bangBkg"),u=(0,g.K2)(function(a,b,c){b.append("circle").attr("id","node-"+c.id).attr("class","node-bkg node-"+a.type2Str(c.type)).attr("r",c.width/2)},"circleBkg");function v(a,b,c,d,e){return a.insert("polygon",":first-child").attr("points",d.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+(e.width-b)/2+", "+c+")")}(0,g.K2)(v,"insertPolygonShape");var w=(0,g.K2)(function(a,b,c){let d=c.height,e=d/4,f=c.width-c.padding+2*e,g=[{x:e,y:0},{x:f-e,y:0},{x:f,y:-d/2},{x:f-e,y:-d},{x:e,y:-d},{x:0,y:-d/2}];v(b,f,d,g,c)},"hexagonBkg"),x=(0,g.K2)(function(a,b,c){b.append("rect").attr("id","node-"+c.id).attr("class","node-bkg node-"+a.type2Str(c.type)).attr("height",c.height).attr("rx",c.padding).attr("ry",c.padding).attr("width",c.width)},"roundedRectBkg"),y=(0,g.K2)(async function(a,b,c,f,g){let h=g.htmlLabels,i=f%11,j=b.append("g");c.section=i;let k="section-"+i;i<0&&(k+=" section-root"),j.attr("class",(c.class?c.class+" ":"")+"mindmap-node "+k);let l=j.append("g"),m=j.append("g"),n=c.descr.replace(/(<br\/*>)/g,"\n");await (0,d.GZ)(m,n,{useHtmlLabels:h,width:c.width,classes:"mindmap-node-label"},g),h||m.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let o=m.node().getBBox(),[p]=(0,e.I5)(g.fontSize);if(c.height=o.height+1.1*p*.5+c.padding,c.width=o.width+2*c.padding,c.icon)if(c.type===a.nodeType.CIRCLE)c.height+=50,c.width+=50,j.append("foreignObject").attr("height","50px").attr("width",c.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+c.icon),m.attr("transform","translate("+c.width/2+", "+(c.height/2-1.5*c.padding)+")");else{c.width+=50;let a=c.height;c.height=Math.max(a,60);let b=Math.abs(c.height-a);j.append("foreignObject").attr("width","60px").attr("height",c.height).attr("style","text-align: center;margin-top:"+b/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+c.icon),m.attr("transform","translate("+(25+c.width/2)+", "+(b/2+c.padding/2)+")")}else if(h){let a=(c.width-o.width)/2,b=(c.height-o.height)/2;m.attr("transform","translate("+a+", "+b+")")}else{let a=c.width/2,b=c.padding/2;m.attr("transform","translate("+a+", "+b+")")}switch(c.type){case a.nodeType.DEFAULT:q(a,l,c,i);break;case a.nodeType.ROUNDED_RECT:x(a,l,c,i);break;case a.nodeType.RECT:r(a,l,c,i);break;case a.nodeType.CIRCLE:l.attr("transform","translate("+c.width/2+", "+c.height/2+")"),u(a,l,c,i);break;case a.nodeType.CLOUD:s(a,l,c,i);break;case a.nodeType.BANG:t(a,l,c,i);break;case a.nodeType.HEXAGON:w(a,l,c,i)}return a.setElementForId(c.id,j),c.height},"drawNode"),z=(0,g.K2)(function(a,b){let c=a.getElementById(b.id),d=b.x||0,e=b.y||0;c.attr("transform","translate("+d+","+e+")")},"positionNode");async function A(a,b,c,d,e){await y(a,b,c,d,e),c.children&&await Promise.all(c.children.map((c,f)=>A(a,b,c,d<0?f:d,e)))}function B(a,b){b.edges().map((b,c)=>{let d=b.data();if(b[0]._private.bodyBounds){let e=b[0]._private.rscratch;g.Rm.trace("Edge: ",c,d),a.insert("path").attr("d",`M ${e.startX},${e.startY} L ${e.midX},${e.midY} L${e.endX},${e.endY} `).attr("class","edge section-edge-"+d.section+" edge-depth-"+d.depth)}})}function C(a,b,c,d){b.add({group:"nodes",data:{id:a.id.toString(),labelText:a.descr,height:a.height,width:a.width,level:d,nodeId:a.id,padding:a.padding,type:a.type},position:{x:a.x,y:a.y}}),a.children&&a.children.forEach(e=>{C(e,b,c,d+1),b.add({group:"edges",data:{id:`${a.id}_${e.id}`,source:a.id,target:e.id,depth:d,section:e.section}})})}function D(a,b){return new Promise(c=>{let d=(0,j.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),e=(0,h.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});d.remove(),C(a,e,b,0),e.nodes().forEach(function(a){a.layoutDimensions=()=>{let b=a.data();return{w:b.width,h:b.height}}}),e.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),e.ready(a=>{g.Rm.info("Ready",a),c(e)})})}function E(a,b){b.nodes().map((b,c)=>{let d=b.data();d.x=b.position().x,d.y=b.position().y,z(a,d);let e=a.getElementById(d.nodeId);g.Rm.info("id:",c,"Position: (",b.position().x,", ",b.position().y,")",d),e.attr("transform",`translate(${b.position().x-d.width/2}, ${b.position().y-d.height/2})`),e.attr("attr",`apa-${c})`)})}h.A.use(i),(0,g.K2)(A,"drawNodes"),(0,g.K2)(B,"drawEdges"),(0,g.K2)(C,"addNodes"),(0,g.K2)(D,"layoutMindmap"),(0,g.K2)(E,"positionNodes");var F=(0,g.K2)(async(a,b,c,d)=>{g.Rm.debug("Rendering mindmap diagram\n"+a);let e=d.db,h=e.getMindmap();if(!h)return;let i=(0,g.D7)();i.htmlLabels=!1;let j=(0,f.D)(b),k=j.append("g");k.attr("class","mindmap-edges");let l=j.append("g");l.attr("class","mindmap-nodes"),await A(e,l,h,-1,i);let m=await D(h,i);B(k,m),E(e,m),(0,g.ot)(void 0,j,i.mindmap?.padding??g.UI.mindmap.padding,i.mindmap?.useMaxWidth??g.UI.mindmap.useMaxWidth)},"draw"),G=(0,g.K2)(a=>{let b="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,k.A)(a["lineColor"+b])?a["lineColor"+b]=(0,l.A)(a["lineColor"+b],20):a["lineColor"+b]=(0,m.A)(a["lineColor"+b],20);for(let c=0;c<a.THEME_COLOR_LIMIT;c++){let d=""+(17-3*c);b+=`
.section-${c-1} rect, .section-${c-1} path, .section-${c-1} circle, .section-${c-1} polygon, .section-${c-1} path {
fill: ${a["cScale"+c]};
}
.section-${c-1} text {
fill: ${a["cScaleLabel"+c]};
}
.node-icon-${c-1} {
font-size: 40px;
color: ${a["cScaleLabel"+c]};
}
.section-edge-${c-1}{
stroke: ${a["cScale"+c]};
}
.edge-depth-${c-1}{
stroke-width: ${d};
}
.section-${c-1} line {
stroke: ${a["cScaleInv"+c]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return b},"genSections"),H={get db(){return new p},renderer:{draw:F},parser:n,styles:(0,g.K2)(a=>`
.edge {
stroke-width: 3;
}
${G(a)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${a.git0};
}
.section-root text {
fill: ${a.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")}},63946:function(a){a.exports=function(){var a=[function(a,b,c){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,a.exports=d},function(a,b,c){"use strict";var d=c(2),e=c(8),f=c(9);function g(a,b,c){d.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=a,this.target=b}for(var h in g.prototype=Object.create(d.prototype),d)g[h]=d[h];g.prototype.getSource=function(){return this.source},g.prototype.getTarget=function(){return this.target},g.prototype.isInterGraph=function(){return this.isInterGraph},g.prototype.getLength=function(){return this.length},g.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},g.prototype.getBendpoints=function(){return this.bendpoints},g.prototype.getLca=function(){return this.lca},g.prototype.getSourceInLca=function(){return this.sourceInLca},g.prototype.getTargetInLca=function(){return this.targetInLca},g.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},g.prototype.getOtherEndInGraph=function(a,b){for(var c=this.getOtherEnd(a),d=b.getGraphManager().getRoot();;){if(c.getOwner()==b)return c;if(c.getOwner()==d)break;c=c.getOwner().getParent()}return null},g.prototype.updateLength=function(){var a=[,,,,];this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[3],1>Math.abs(this.lengthX)&&(this.lengthX=f.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=f.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},g.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),1>Math.abs(this.lengthX)&&(this.lengthX=f.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=f.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},a.exports=g},function(a,b,c){"use strict";a.exports=function(a){this.vGraphObject=a}},function(a,b,c){"use strict";var d=c(2),e=c(10),f=c(13),g=c(0),h=c(16),i=c(4);function j(a,b,c,g){null==c&&null==g&&(g=b),d.call(this,g),null!=a.graphManager&&(a=a.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=a,null!=c&&null!=b?this.rect=new f(b.x,b.y,c.width,c.height):this.rect=new f}for(var k in j.prototype=Object.create(d.prototype),d)j[k]=d[k];j.prototype.getEdges=function(){return this.edges},j.prototype.getChild=function(){return this.child},j.prototype.getOwner=function(){return this.owner},j.prototype.getWidth=function(){return this.rect.width},j.prototype.setWidth=function(a){this.rect.width=a},j.prototype.getHeight=function(){return this.rect.height},j.prototype.setHeight=function(a){this.rect.height=a},j.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},j.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},j.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},j.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},j.prototype.getRect=function(){return this.rect},j.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},j.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},j.prototype.setRect=function(a,b){this.rect.x=a.x,this.rect.y=a.y,this.rect.width=b.width,this.rect.height=b.height},j.prototype.setCenter=function(a,b){this.rect.x=a-this.rect.width/2,this.rect.y=b-this.rect.height/2},j.prototype.setLocation=function(a,b){this.rect.x=a,this.rect.y=b},j.prototype.moveBy=function(a,b){this.rect.x+=a,this.rect.y+=b},j.prototype.getEdgeListToNode=function(a){var b=[],c=this;return c.edges.forEach(function(d){if(d.target==a){if(d.source!=c)throw"Incorrect edge source!";b.push(d)}}),b},j.prototype.getEdgesBetween=function(a){var b=[],c=this;return c.edges.forEach(function(d){if(d.source!=c&&d.target!=c)throw"Incorrect edge source and/or target";(d.target==a||d.source==a)&&b.push(d)}),b},j.prototype.getNeighborsList=function(){var a=new Set,b=this;return b.edges.forEach(function(c){if(c.source==b)a.add(c.target);else{if(c.target!=b)throw"Incorrect incidency!";a.add(c.source)}}),a},j.prototype.withChildren=function(){var a=new Set;if(a.add(this),null!=this.child)for(var b=this.child.getNodes(),c=0;c<b.length;c++)b[c].withChildren().forEach(function(b){a.add(b)});return a},j.prototype.getNoOfChildren=function(){var a=0;if(null==this.child)a=1;else for(var b=this.child.getNodes(),c=0;c<b.length;c++)a+=b[c].getNoOfChildren();return 0==a&&(a=1),a},j.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},j.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},j.prototype.scatter=function(){var a,b,c=-g.INITIAL_WORLD_BOUNDARY,d=g.INITIAL_WORLD_BOUNDARY;a=g.WORLD_CENTER_X+h.nextDouble()*(d-c)+c;var e=-g.INITIAL_WORLD_BOUNDARY,f=g.INITIAL_WORLD_BOUNDARY;b=g.WORLD_CENTER_Y+h.nextDouble()*(f-e)+e,this.rect.x=a,this.rect.y=b},j.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var a=this.getChild();if(a.updateBounds(!0),this.rect.x=a.getLeft(),this.rect.y=a.getTop(),this.setWidth(a.getRight()-a.getLeft()),this.setHeight(a.getBottom()-a.getTop()),g.NODE_DIMENSIONS_INCLUDE_LABELS){var b=a.getRight()-a.getLeft(),c=a.getBottom()-a.getTop();this.labelWidth>b&&(this.rect.x-=(this.labelWidth-b)/2,this.setWidth(this.labelWidth)),this.labelHeight>c&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-c)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-c),this.setHeight(this.labelHeight))}}},j.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},j.prototype.transform=function(a){var b=this.rect.x;b>g.WORLD_BOUNDARY?b=g.WORLD_BOUNDARY:b<-g.WORLD_BOUNDARY&&(b=-g.WORLD_BOUNDARY);var c=this.rect.y;c>g.WORLD_BOUNDARY?c=g.WORLD_BOUNDARY:c<-g.WORLD_BOUNDARY&&(c=-g.WORLD_BOUNDARY);var d=new i(b,c),e=a.inverseTransformPoint(d);this.setLocation(e.x,e.y)},j.prototype.getLeft=function(){return this.rect.x},j.prototype.getRight=function(){return this.rect.x+this.rect.width},j.prototype.getTop=function(){return this.rect.y},j.prototype.getBottom=function(){return this.rect.y+this.rect.height},j.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},a.exports=j},function(a,b,c){"use strict";function d(a,b){null==a&&null==b?(this.x=0,this.y=0):(this.x=a,this.y=b)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(a){this.x=a},d.prototype.setY=function(a){this.y=a},d.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},a.exports=d},function(a,b,c){"use strict";var d=c(2),e=c(10),f=c(0),g=c(6),h=c(3),i=c(1),j=c(13),k=c(12),l=c(11);function m(a,b,c){d.call(this,c),this.estimatedSize=e.MIN_VALUE,this.margin=f.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=a,null!=b&&b instanceof g?this.graphManager=b:null!=b&&b instanceof Layout&&(this.graphManager=b.graphManager)}for(var n in m.prototype=Object.create(d.prototype),d)m[n]=d[n];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(a,b,c){if(null==b&&null==c){if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(a)>-1)throw"Node already in graph!";return a.owner=this,this.getNodes().push(a),a}if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(c)>-1))throw"Source or target not in graph!";if(b.owner!=c.owner||b.owner!=this)throw"Both owners must be this graph!";return b.owner!=c.owner?null:(a.source=b,a.target=c,a.isInterGraph=!1,this.getEdges().push(a),b.edges.push(a),c!=b&&c.edges.push(a),a)},m.prototype.remove=function(a){if(a instanceof h){if(null==a)throw"Node is null!";if(null==a.owner||a.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var b,c=a.edges.slice(),d=c.length,e=0;e<d;e++)(b=c[e]).isInterGraph?this.graphManager.remove(b):b.source.owner.remove(b);var f=this.nodes.indexOf(a);if(-1==f)throw"Node not in owner node list!";this.nodes.splice(f,1)}else if(a instanceof i){var b=a;if(null==b)throw"Edge is null!";if(null==b.source||null==b.target)throw"Source and/or target is null!";if(null==b.source.owner||null==b.target.owner||b.source.owner!=this||b.target.owner!=this)throw"Source and/or target owner is invalid!";var g=b.source.edges.indexOf(b),j=b.target.edges.indexOf(b);if(!(g>-1&&j>-1))throw"Source and/or target doesn't know this edge!";b.source.edges.splice(g,1),b.target!=b.source&&b.target.edges.splice(j,1);var f=b.source.owner.getEdges().indexOf(b);if(-1==f)throw"Not in owner's edge list!";b.source.owner.getEdges().splice(f,1)}},m.prototype.updateLeftTop=function(){for(var a,b,c,d=e.MAX_VALUE,f=e.MAX_VALUE,g=this.getNodes(),h=g.length,i=0;i<h;i++){var j=g[i];a=j.getTop(),b=j.getLeft(),d>a&&(d=a),f>b&&(f=b)}return d==e.MAX_VALUE?null:(c=void 0!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=f-c,this.top=d-c,new k(this.left,this.top))},m.prototype.updateBounds=function(a){for(var b,c,d,f,g,h=e.MAX_VALUE,i=-e.MAX_VALUE,k=e.MAX_VALUE,l=-e.MAX_VALUE,m=this.nodes,n=m.length,o=0;o<n;o++){var p=m[o];a&&null!=p.child&&p.updateBounds(),b=p.getLeft(),c=p.getRight(),d=p.getTop(),f=p.getBottom(),h>b&&(h=b),i<c&&(i=c),k>d&&(k=d),l<f&&(l=f)}var q=new j(h,k,i-h,l-k);h==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),g=void 0!=m[0].getParent().paddingLeft?m[0].getParent().paddingLeft:this.margin,this.left=q.x-g,this.right=q.x+q.width+g,this.top=q.y-g,this.bottom=q.y+q.height+g},m.calculateBounds=function(a){for(var b,c,d,f,g=e.MAX_VALUE,h=-e.MAX_VALUE,i=e.MAX_VALUE,k=-e.MAX_VALUE,l=a.length,m=0;m<l;m++){var n=a[m];b=n.getLeft(),c=n.getRight(),d=n.getTop(),f=n.getBottom(),g>b&&(g=b),h<c&&(h=c),i>d&&(i=d),k<f&&(k=f)}return new j(g,i,h-g,k-i)},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var a=0,b=this.nodes,c=b.length,d=0;d<c;d++)a+=b[d].calcEstimatedSize();return 0==a?this.estimatedSize=f.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=a/Math.sqrt(this.nodes.length),this.estimatedSize},m.prototype.updateConnected=function(){var a,b,c=this;if(0==this.nodes.length){this.isConnected=!0;return}var d=new l,e=new Set,f=this.nodes[0];for(f.withChildren().forEach(function(a){d.push(a),e.add(a)});0!==d.length;)for(var g=(a=(f=d.shift()).getEdges()).length,h=0;h<g;h++)null==(b=a[h].getOtherEndInGraph(f,this))||e.has(b)||b.withChildren().forEach(function(a){d.push(a),e.add(a)});if(this.isConnected=!1,e.size>=this.nodes.length){var i=0;e.forEach(function(a){a.owner==c&&i++}),i==this.nodes.length&&(this.isConnected=!0)}},a.exports=m},function(a,b,c){"use strict";var d,e=c(1);function f(a){d=c(5),this.layout=a,this.graphs=[],this.edges=[]}f.prototype.addRoot=function(){var a=this.layout.newGraph(),b=this.layout.newNode(null),c=this.add(a,b);return this.setRootGraph(c),this.rootGraph},f.prototype.add=function(a,b,c,d,e){if(null==c&&null==d&&null==e){if(null==a)throw"Graph is null!";if(null==b)throw"Parent node is null!";if(this.graphs.indexOf(a)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(a),null!=a.parent)throw"Already has a parent!";if(null!=b.child)throw"Already has a child!";return a.parent=b,b.child=a,a}e=c,d=b,c=a;var f=d.getOwner(),g=e.getOwner();if(null==f||f.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==g||g.getGraphManager()!=this)throw"Target not in this graph mgr!";if(f==g)return c.isInterGraph=!1,f.add(c,d,e);if(c.isInterGraph=!0,c.source=d,c.target=e,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),null==c.source||null==c.target)throw"Edge source and/or target is null!";if(-1!=c.source.edges.indexOf(c)||-1!=c.target.edges.indexOf(c))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c},f.prototype.remove=function(a){if(a instanceof d){if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(a!=this.rootGraph&&(null==a.parent||a.parent.graphManager!=this))throw"Invalid parent node!";for(var b,c,f=[],g=(f=f.concat(a.getEdges())).length,h=0;h<g;h++)b=f[h],a.remove(b);var i=[];g=(i=i.concat(a.getNodes())).length;for(var h=0;h<g;h++)c=i[h],a.remove(c);a==this.rootGraph&&this.setRootGraph(null);var j=this.graphs.indexOf(a);this.graphs.splice(j,1),a.parent=null}else if(a instanceof e){if(null==(b=a))throw"Edge is null!";if(!b.isInterGraph)throw"Not an inter-graph edge!";if(null==b.source||null==b.target)throw"Source and/or target is null!";if(-1==b.source.edges.indexOf(b)||-1==b.target.edges.indexOf(b))throw"Source and/or target doesn't know this edge!";var j=b.source.edges.indexOf(b);if(b.source.edges.splice(j,1),j=b.target.edges.indexOf(b),b.target.edges.splice(j,1),null==b.source.owner||null==b.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==b.source.owner.getGraphManager().edges.indexOf(b))throw"Not in owner graph manager's edge list!";var j=b.source.owner.getGraphManager().edges.indexOf(b);b.source.owner.getGraphManager().edges.splice(j,1)}},f.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},f.prototype.getGraphs=function(){return this.graphs},f.prototype.getAllNodes=function(){if(null==this.allNodes){for(var a=[],b=this.getGraphs(),c=b.length,d=0;d<c;d++)a=a.concat(b[d].getNodes());this.allNodes=a}return this.allNodes},f.prototype.resetAllNodes=function(){this.allNodes=null},f.prototype.resetAllEdges=function(){this.allEdges=null},f.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},f.prototype.getAllEdges=function(){if(null==this.allEdges){var a=[],b=this.getGraphs();b.length;for(var c=0;c<b.length;c++)a=a.concat(b[c].getEdges());a=a.concat(this.edges),this.allEdges=a}return this.allEdges},f.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},f.prototype.setAllNodesToApplyGravitation=function(a){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=a},f.prototype.getRoot=function(){return this.rootGraph},f.prototype.setRootGraph=function(a){if(a.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=a,null==a.parent&&(a.parent=this.layout.newNode("Root node"))},f.prototype.getLayout=function(){return this.layout},f.prototype.isOneAncestorOfOther=function(a,b){if(null==a||null==b)throw"assert failed";if(a==b)return!0;for(var c,d=a.getOwner();null!=(c=d.getParent());){if(c==b)return!0;if(null==(d=c.getOwner()))break}for(d=b.getOwner();null!=(c=d.getParent());){if(c==a)return!0;if(null==(d=c.getOwner()))break}return!1},f.prototype.calcLowestCommonAncestors=function(){for(var a,b,c,d,e,f=this.getAllEdges(),g=f.length,h=0;h<g;h++){if(b=(a=f[h]).source,c=a.target,a.lca=null,a.sourceInLca=b,a.targetInLca=c,b==c){a.lca=b.getOwner();continue}for(d=b.getOwner();null==a.lca;){for(a.targetInLca=c,e=c.getOwner();null==a.lca;){if(e==d){a.lca=e;break}if(e==this.rootGraph)break;if(null!=a.lca)throw"assert failed";a.targetInLca=e.getParent(),e=a.targetInLca.getOwner()}if(d==this.rootGraph)break;null==a.lca&&(a.sourceInLca=d.getParent(),d=a.sourceInLca.getOwner())}if(null==a.lca)throw"assert failed"}},f.prototype.calcLowestCommonAncestor=function(a,b){if(a==b)return a.getOwner();for(var c=a.getOwner();null!=c;){for(var d=b.getOwner();null!=d;){if(d==c)return d;d=d.getParent().getOwner()}c=c.getParent().getOwner()}return c},f.prototype.calcInclusionTreeDepths=function(a,b){null==a&&null==b&&(a=this.rootGraph,b=1);for(var c,d=a.getNodes(),e=d.length,f=0;f<e;f++)(c=d[f]).inclusionTreeDepth=b,null!=c.child&&this.calcInclusionTreeDepths(c.child,b+1)},f.prototype.includesInvalidEdge=function(){for(var a,b=this.edges.length,c=0;c<b;c++)if(a=this.edges[c],this.isOneAncestorOfOther(a.source,a.target))return!0;return!1},a.exports=f},function(a,b,c){"use strict";var d=c(0);function e(){}for(var f in d)e[f]=d[f];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=3*e.MAX_NODE_DISPLACEMENT_INCREMENTAL,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,a.exports=e},function(a,b,c){"use strict";var d=c(12);function e(){}e.calcSeparationAmount=function(a,b,c,d){if(!a.intersects(b))throw"assert failed";var e=[,,];this.decideDirectionsForOverlappingNodes(a,b,e),c[0]=Math.min(a.getRight(),b.getRight())-Math.max(a.x,b.x),c[1]=Math.min(a.getBottom(),b.getBottom())-Math.max(a.y,b.y),a.getX()<=b.getX()&&a.getRight()>=b.getRight()?c[0]+=Math.min(b.getX()-a.getX(),a.getRight()-b.getRight()):b.getX()<=a.getX()&&b.getRight()>=a.getRight()&&(c[0]+=Math.min(a.getX()-b.getX(),b.getRight()-a.getRight())),a.getY()<=b.getY()&&a.getBottom()>=b.getBottom()?c[1]+=Math.min(b.getY()-a.getY(),a.getBottom()-b.getBottom()):b.getY()<=a.getY()&&b.getBottom()>=a.getBottom()&&(c[1]+=Math.min(a.getY()-b.getY(),b.getBottom()-a.getBottom()));var f=Math.abs((b.getCenterY()-a.getCenterY())/(b.getCenterX()-a.getCenterX()));b.getCenterY()===a.getCenterY()&&b.getCenterX()===a.getCenterX()&&(f=1);var g=f*c[0],h=c[1]/f;c[0]<h?h=c[0]:g=c[1],c[0]=-1*e[0]*(h/2+d),c[1]=-1*e[1]*(g/2+d)},e.decideDirectionsForOverlappingNodes=function(a,b,c){a.getCenterX()<b.getCenterX()?c[0]=-1:c[0]=1,a.getCenterY()<b.getCenterY()?c[1]=-1:c[1]=1},e.getIntersection2=function(a,b,c){var d=a.getCenterX(),e=a.getCenterY(),f=b.getCenterX(),g=b.getCenterY();if(a.intersects(b))return c[0]=d,c[1]=e,c[2]=f,c[3]=g,!0;var h=a.getX(),i=a.getY(),j=a.getRight(),k=a.getX(),l=a.getBottom(),m=a.getRight(),n=a.getWidthHalf(),o=a.getHeightHalf(),p=b.getX(),q=b.getY(),r=b.getRight(),s=b.getX(),t=b.getBottom(),u=b.getRight(),v=b.getWidthHalf(),w=b.getHeightHalf(),x=!1,y=!1;if(d===f)e>g?(c[0]=d,c[1]=i,c[2]=f,c[3]=t):e<g&&(c[0]=d,c[1]=l,c[2]=f,c[3]=q);else if(e===g)d>f?(c[0]=h,c[1]=e,c[2]=r,c[3]=g):d<f&&(c[0]=j,c[1]=e,c[2]=p,c[3]=g);else{var z=a.height/a.width,A=b.height/b.width,B=(g-e)/(f-d),C=void 0,D=void 0,E=void 0,F=void 0,G=void 0,H=void 0;if(-z===B?(d>f?(c[0]=k,c[1]=l):(c[0]=j,c[1]=i),x=!0):z===B&&(d>f?(c[0]=h,c[1]=i):(c[0]=m,c[1]=l),x=!0),-A===B?(f>d?(c[2]=s,c[3]=t):(c[2]=r,c[3]=q),y=!0):A===B&&(f>d?(c[2]=p,c[3]=q):(c[2]=u,c[3]=t),y=!0),x&&y)return!1;if(d>f?e>g?(C=this.getCardinalDirection(z,B,4),D=this.getCardinalDirection(A,B,2)):(C=this.getCardinalDirection(-z,B,3),D=this.getCardinalDirection(-A,B,1)):e>g?(C=this.getCardinalDirection(-z,B,1),D=this.getCardinalDirection(-A,B,3)):(C=this.getCardinalDirection(z,B,2),D=this.getCardinalDirection(A,B,4)),!x)switch(C){case 1:F=i,E=d+-o/B,c[0]=E,c[1]=F;break;case 2:E=m,F=e+n*B,c[0]=E,c[1]=F;break;case 3:F=l,E=d+o/B,c[0]=E,c[1]=F;break;case 4:E=k,F=e+-n*B,c[0]=E,c[1]=F}if(!y)switch(D){case 1:H=q,G=f+-w/B,c[2]=G,c[3]=H;break;case 2:G=u,H=g+v*B,c[2]=G,c[3]=H;break;case 3:H=t,G=f+w/B,c[2]=G,c[3]=H;break;case 4:G=s,H=g+-v*B,c[2]=G,c[3]=H}}return!1},e.getCardinalDirection=function(a,b,c){return a>b?c:1+c%4},e.getIntersection=function(a,b,c,e){if(null==e)return this.getIntersection2(a,b,c);var f=a.x,g=a.y,h=b.x,i=b.y,j=c.x,k=c.y,l=e.x,m=e.y,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0,s=void 0,t=void 0;return(n=i-g,p=f-h,r=h*g-f*i,o=m-k,q=j-l,s=l*k-j*m,0==(t=n*q-o*p))?null:new d((p*s-q*r)/t,(o*r-n*s)/t)},e.angleOfVector=function(a,b,c,d){var e=void 0;return a!==c?(e=Math.atan((d-b)/(c-a)),c<a?e+=Math.PI:d<b&&(e+=this.TWO_PI)):e=d<b?this.ONE_AND_HALF_PI:this.HALF_PI,e},e.doIntersect=function(a,b,c,d){var e=a.x,f=a.y,g=b.x,h=b.y,i=c.x,j=c.y,k=d.x,l=d.y,m=(g-e)*(l-j)-(k-i)*(h-f);if(0===m)return!1;var n=((l-j)*(k-e)+(i-k)*(l-f))/m,o=((f-h)*(k-e)+(g-e)*(l-f))/m;return 0<n&&n<1&&0<o&&o<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,a.exports=e},function(a,b,c){"use strict";function d(){}d.sign=function(a){return a>0?1:a<0?-1:0},d.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},d.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},a.exports=d},function(a,b,c){"use strict";function d(){}d.MAX_VALUE=0x7fffffff,d.MIN_VALUE=-0x80000000,a.exports=d},function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return{value:a,next:null,prev:null}},f=function(a,b,c,d){return null!==a?a.next=b:d.head=b,null!==c?c.prev=b:d.tail=b,b.prev=a,b.next=c,d.length++,b},g=function(a,b){var c=a.prev,d=a.next;return null!==c?c.next=d:b.head=d,null!==d?d.prev=c:b.tail=c,a.prev=a.next=null,b.length--,a};a.exports=function(){function a(b){var c=this;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");this.length=0,this.head=null,this.tail=null,null!=b&&b.forEach(function(a){return c.push(a)})}return d(a,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(a,b){return f(b.prev,e(a),b,this)}},{key:"insertAfter",value:function(a,b){return f(b,e(a),b.next,this)}},{key:"insertNodeBefore",value:function(a,b){return f(b.prev,a,b,this)}},{key:"insertNodeAfter",value:function(a,b){return f(b,a,b.next,this)}},{key:"push",value:function(a){return f(this.tail,e(a),null,this)}},{key:"unshift",value:function(a){return f(null,e(a),this.head,this)}},{key:"remove",value:function(a){return g(a,this)}},{key:"pop",value:function(){return g(this.tail,this).value}},{key:"popNode",value:function(){return g(this.tail,this)}},{key:"shift",value:function(){return g(this.head,this).value}},{key:"shiftNode",value:function(){return g(this.head,this)}},{key:"get_object_at",value:function(a){if(a<=this.length()){for(var b=1,c=this.head;b<a;)c=c.next,b++;return c.value}}},{key:"set_object_at",value:function(a,b){if(a<=this.length()){for(var c=1,d=this.head;c<a;)d=d.next,c++;d.value=b}}}]),a}()},function(a,b,c){"use strict";function d(a,b,c){this.x=null,this.y=null,null==a&&null==b&&null==c?(this.x=0,this.y=0):"number"==typeof a&&"number"==typeof b&&null==c?(this.x=a,this.y=b):"Point"==a.constructor.name&&null==b&&null==c&&(c=a,this.x=c.x,this.y=c.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(a,b,c){"Point"==a.constructor.name&&null==b&&null==c?(c=a,this.setLocation(c.x,c.y)):"number"==typeof a&&"number"==typeof b&&null==c&&(parseInt(a)==a&&parseInt(b)==b?this.move(a,b):(this.x=Math.floor(a+.5),this.y=Math.floor(b+.5)))},d.prototype.move=function(a,b){this.x=a,this.y=b},d.prototype.translate=function(a,b){this.x+=a,this.y+=b},d.prototype.equals=function(a){return"Point"==a.constructor.name?this.x==a.x&&this.y==a.y:this==a},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},a.exports=d},function(a,b,c){"use strict";function d(a,b,c,d){this.x=0,this.y=0,this.width=0,this.height=0,null!=a&&null!=b&&null!=c&&null!=d&&(this.x=a,this.y=b,this.width=c,this.height=d)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(a){this.x=a},d.prototype.getY=function(){return this.y},d.prototype.setY=function(a){this.y=a},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(a){this.width=a},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(a){this.height=a},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(a){r