You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
venv/PyCharm 2025.2.1.1/plugins/python/jupyter-web/6201.js

1 line
99 KiB

(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[6201],{92258:function(Nt,b,X){var D;Nt.exports=(D=X(66554),function(c){var a={};function e(t){if(a[t])return a[t].exports;var i=a[t]={i:t,l:!1,exports:{}};return c[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=c,e.c=a,e.i=function(t){return t},e.d=function(t,i,h){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:h})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=7)}([function(c,a){c.exports=D},function(c,a,e){"use strict";var t=e(0).FDLayoutConstants;function i(){}for(var h in t)i[h]=t[h];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,c.exports=i},function(c,a,e){"use strict";var t=e(0).FDLayoutEdge;function i(n,u,r){t.call(this,n,u,r)}for(var h in i.prototype=Object.create(t.prototype),t)i[h]=t[h];c.exports=i},function(c,a,e){"use strict";var t=e(0).LGraph;function i(n,u,r){t.call(this,n,u,r)}for(var h in i.prototype=Object.create(t.prototype),t)i[h]=t[h];c.exports=i},function(c,a,e){"use strict";var t=e(0).LGraphManager;function i(n){t.call(this,n)}for(var h in i.prototype=Object.create(t.prototype),t)i[h]=t[h];c.exports=i},function(c,a,e){"use strict";var t=e(0).FDLayoutNode,i=e(0).IMath;function h(u,r,o,l){t.call(this,u,r,o,l)}for(var n in h.prototype=Object.create(t.prototype),t)h[n]=t[n];h.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},h.prototype.propogateDisplacementToChildren=function(u,r){for(var l,o=this.getChild().getNodes(),p=0;p<o.length;p++)null==(l=o[p]).getChild()?(l.moveBy(u,r),l.displacementX+=u,l.displacementY+=r):l.propogateDisplacementToChildren(u,r)},h.prototype.setPred1=function(u){this.pred1=u},h.prototype.getPred1=function(){return pred1},h.prototype.getPred2=function(){return pred2},h.prototype.setNext=function(u){this.next=u},h.prototype.getNext=function(){return next},h.prototype.setProcessed=function(u){this.processed=u},h.prototype.isProcessed=function(){return processed},c.exports=h},function(c,a,e){"use strict";var t=e(0).FDLayout,i=e(4),h=e(3),n=e(5),u=e(2),r=e(1),o=e(0).FDLayoutConstants,l=e(0).LayoutConstants,p=e(0).Point,g=e(0).PointD,T=e(0).Layout,v=e(0).Integer,E=e(0).IGeometry,L=e(0).LGraph,w=e(0).Transform;function I(){t.call(this),this.toBeTiled={}}for(var R in I.prototype=Object.create(t.prototype),t)I[R]=t[R];I.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},I.prototype.newGraph=function(s){return new h(null,this.graphManager,s)},I.prototype.newNode=function(s){return new n(this.graphManager,s)},I.prototype.newEdge=function(s){return new u(null,null,s)},I.prototype.initParameters=function(){t.prototype.initParameters.call(this,arguments),this.isSubLayout||(r.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=o.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=o.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/o.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=o.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},I.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},I.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(r.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(C){return f.has(C)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var s=this.getFlatForest();s.length>0?this.positionNodesRadially(s):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),f=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return f.has(y)}),this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly())}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},I.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%o.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(m){return s.has(m)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},I.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},d=0;d<s.length;d++){var y=s[d].rect,m=s[d].id;f[m]={id:m,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return f},I.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if("during"===o.ANIMATE)this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},I.prototype.calculateNodesToApplyGravitationTo=function(){var f,m,s=[],d=this.graphManager.getGraphs(),y=d.length;for(m=0;m<y;m++)(f=d[m]).updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},I.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var d,f=new Set;for(d=0;d<s.length;d++){var y=s[d];if(!f.has(y)){var m=y.getSource(),C=y.getTarget();if(m==C)y.getBendpoints().push(new g),y.getBendpoints().push(new g),this.createDummyNodesForBendpoints(y),f.add(y);else{var x=[];if(x=(x=x.concat(m.getEdgeListToNode(C))).concat(C.getEdgeListToNode(m)),!f.has(x[0])){var G;if(x.length>1)for(G=0;G<x.length;G++){var k=x[G];k.getBendpoints().push(new g),this.createDummyNodesForBendpoints(k)}x.forEach(function(H){f.add(H)})}}}if(f.size==s.length)break}},I.prototype.positionNodesRadially=function(s){for(var f=new p(0,0),d=Math.ceil(Math.sqrt(s.length)),y=0,m=0,C=0,x=new g(0,0),G=0;G<s.length;G++){G%d==0&&(C=0,m=y,0!=G&&(m+=r.DEFAULT_COMPONENT_SEPERATION),y=0);var k=s[G],H=T.findCenterOfTree(k);f.x=C,f.y=m,(x=I.radialLayout(k,H,f)).y>y&&(y=Math.floor(x.y)),C=Math.floor(x.x+r.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(l.WORLD_CENTER_X-x.x/2,l.WORLD_CENTER_Y-x.y/2))},I.radialLayout=function(s,f,d){var y=Math.max(this.maxDiagonalInTree(s),r.DEFAULT_RADIAL_SEPARATION);I.branchRadialLayout(f,null,0,359,0,y);var m=L.calculateBounds(s),C=new w;C.setDeviceOrgX(m.getMinX()),C.setDeviceOrgY(m.getMinY()),C.setWorldOrgX(d.x),C.setWorldOrgY(d.y);for(var x=0;x<s.length;x++)s[x].transform(C);var k=new g(m.getMaxX(),m.getMaxY());return C.inverseTransformPoint(k)},I.branchRadialLayout=function(s,f,d,y,m,C){var x=(y-d+1)/2;x<0&&(x+=180);var k=(x+d)%360*E.TWO_PI/360,J=(Math.cos(k),m*Math.cos(k)),q=m*Math.sin(k);s.setCenter(J,q);var U=[],$=(U=U.concat(s.getEdges())).length;null!=f&&$--;for(var ot,Z=0,j=U.length,tt=s.getEdgesBetween(f);tt.length>1;){var at=tt[0];tt.splice(0,1);var dt=U.indexOf(at);dt>=0&&U.splice(dt,1),j--,$--}ot=null!=f?(U.indexOf(tt[0])+1)%j:0;for(var ht=Math.abs(y-d)/$,gt=ot;Z!=$;gt=++gt%j){var mt=U[gt].getOtherEnd(s);if(mt!=f){var At=(d+Z*ht)%360,Ct=(At+ht)%360;I.branchRadialLayout(mt,s,At,Ct,m+C,C),Z++}}},I.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,d=0;d<s.length;d++){var m=s[d].getDiagonal();m>f&&(f=m)}return f},I.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},I.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var d=[],y=this.graphManager.getAllNodes(),m=0;m<y.length;m++){var x=(C=y[m]).getParent();0===this.getNodeDegreeWithChildren(C)&&(null==x.id||!this.getToBeTiled(x))&&d.push(C)}for(m=0;m<d.length;m++){var C,G=(C=d[m]).getParent().id;typeof f[G]>"u"&&(f[G]=[]),f[G]=f[G].concat(C)}Object.keys(f).forEach(function(k){if(f[k].length>1){var H="DummyCompound_"+k;s.memberGroups[H]=f[k];var J=f[k][0].getParent(),q=new n(s.graphManager);q.id=H,q.paddingLeft=J.paddingLeft||0,q.paddingRight=J.paddingRight||0,q.paddingBottom=J.paddingBottom||0,q.paddingTop=J.paddingTop||0,s.idToDummyNode[H]=q;var U=s.getGraphManager().add(s.newGraph(),q),$=J.getChild();$.add(q);for(var Z=0;Z<f[k].length;Z++){var j=f[k][Z];$.remove(j),U.add(j)}}})},I.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var d=0;d<this.compoundOrder.length;d++)f[this.compoundOrder[d].id]=this.compoundOrder[d],s[this.compoundOrder[d].id]=[].concat(this.compoundOrder[d].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[d].getChild()),this.compoundOrder[d].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},I.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(d){var y=s.idToDummyNode[d];f[d]=s.tileNodes(s.memberGroups[d],y.paddingLeft+y.paddingRight),y.rect.width=f[d].width,y.rect.height=f[d].height})},I.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],d=f.id,y=f.paddingLeft,m=f.paddingTop;this.adjustLocations(this.tiledMemberPack[d],f.rect.x,f.rect.y,y,m)}},I.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(d){var y=s.idToDummyNode[d],m=y.paddingLeft,C=y.paddingTop;s.adjustLocations(f[d],y.rect.x,y.rect.y,m,C)})},I.prototype.getToBeTiled=function(s){var f=s.id;if(null!=this.toBeTiled[f])return this.toBeTiled[f];var d=s.getChild();if(null==d)return this.toBeTiled[f]=!1,!1;for(var y=d.getNodes(),m=0;m<y.length;m++){var C=y[m];if(this.getNodeDegree(C)>0)return this.toBeTiled[f]=!1,!1;if(null!=C.getChild()){if(!this.getToBeTiled(C))return this.toBeTiled[f]=!1,!1}else this.toBeTiled[C.id]=!1}return this.toBeTiled[f]=!0,!0},I.prototype.getNodeDegree=function(s){s.id;for(var d=s.getEdges(),y=0,m=0;m<d.length;m++){var C=d[m];C.getSource().id!==C.getTarget().id&&(y+=1)}return y},I.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(null==s.getChild())return f;for(var d=s.getChild().getNodes(),y=0;y<d.length;y++){var m=d[y];f+=this.getNodeDegreeWithChildren(m)}return f},I.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},I.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var d=s[f];null!=d.getChild()&&this.fillCompexOrderByDFS(d.getChild().getNodes()),this.getToBeTiled(d)&&this.compoundOrder.push(d)}},I.prototype.adjustLocations=function(s,f,d,y,m){d+=m;for(var C=f+=y,x=0;x<s.rows.length;x++){var G=s.rows[x];f=C;for(var k=0,H=0;H<G.length;H++){var J=G[H];J.rect.x=f,J.rect.y=d,f+=J.rect.width+s.horizontalPadding,J.rect.height>k&&(k=J.rect.height)}d+=k+s.verticalPadding}},I.prototype.tileCompoundMembers=function(s,f){var d=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(y){var m=f[y];d.tiledMemberPack[y]=d.tileNodes(s[y],m.paddingLeft+m.paddingRight),m.rect.width=d.tiledMemberPack[y].width,m.rect.height=d.tiledMemberPack[y].height})},I.prototype.tileNodes=function(s,f){var m={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:r.TILING_PADDING_VERTICAL,horizontalPadding:r.TILING_PADDING_HORIZONTAL};s.sort(function(G,k){return G.rect.width*G.rect.height>k.rect.width*k.rect.height?-1:G.rect.width*G.rect.height<k.rect.width*k.rect.height?1:0});for(var C=0;C<s.length;C++){var x=s[C];0==m.rows.length?this.insertNodeToRow(m,x,0,f):this.canAddHorizontal(m,x.rect.width,x.rect.height)?this.insertNodeToRow(m,x,this.getShortestRowIndex(m),f):this.insertNodeToRow(m,x,m.rows.length,f),this.shiftToLastRow(m)}return m},I.prototype.insertNodeToRow=function(s,f,d,y){var m=y;if(d==s.rows.length){var C=[];s.rows.push(C),s.rowWidth.push(m),s.rowHeight.push(0)}var x=s.rowWidth[d]+f.rect.width;s.rows[d].length>0&&(x+=s.horizontalPadding),s.rowWidth[d]=x,s.width<x&&(s.width=x);var G=f.rect.height;d>0&&(G+=s.verticalPadding);var k=0;G>s.rowHeight[d]&&(k=s.rowHeight[d],s.rowHeight[d]=G,k=s.rowHeight[d]-k),s.height+=k,s.rows[d].push(f)},I.prototype.getShortestRowIndex=function(s){for(var f=-1,d=Number.MAX_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]<d&&(f=y,d=s.rowWidth[y]);return f},I.prototype.getLongestRowIndex=function(s){for(var f=-1,d=Number.MIN_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]>d&&(f=y,d=s.rowWidth[y]);return f},I.prototype.canAddHorizontal=function(s,f,d){var y=this.getShortestRowIndex(s);if(y<0)return!0;var m=s.rowWidth[y];if(m+s.horizontalPadding+f<=s.width)return!0;var x,G,C=0;return s.rowHeight[y]<d&&y>0&&(C=d+s.verticalPadding-s.rowHeight[y]),x=s.width-m>=f+s.horizontalPadding?(s.height+C)/(m+f+s.horizontalPadding):(s.height+C)/s.width,C=d+s.verticalPadding,(G=s.width<f?(s.height+C)/f:(s.height+C)/s.width)<1&&(G=1/G),x<1&&(x=1/x),x<G},I.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),d=s.rowWidth.length-1,y=s.rows[f],m=y[y.length-1],C=m.width+s.horizontalPadding;if(s.width-s.rowWidth[d]>C&&f!=d){y.splice(-1,1),s.rows[d].push(m),s.rowWidth[f]=s.rowWidth[f]-C,s.rowWidth[d]=s.rowWidth[d]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var x=Number.MIN_VALUE,G=0;G<y.length;G++)y[G].height>x&&(x=y[G].height);f>0&&(x+=s.verticalPadding);var k=s.rowHeight[f]+s.rowHeight[d];s.rowHeight[f]=x,s.rowHeight[d]<m.height+s.verticalPadding&&(s.rowHeight[d]=m.height+s.verticalPadding);var H=s.rowHeight[f]+s.rowHeight[d];s.height+=H-k,this.shiftToLastRow(s)}},I.prototype.tilingPreLayout=function(){r.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},I.prototype.tilingPostLayout=function(){r.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},I.prototype.reduceTrees=function(){for(var d,s=[],f=!0;f;){var y=this.graphManager.getAllNodes(),m=[];f=!1;for(var C=0;C<y.length;C++)1==(d=y[C]).getEdges().length&&!d.getEdges()[0].isInterGraph&&null==d.getChild()&&(m.push([d,d.getEdges()[0],d.getOwner()]),f=!0);if(1==f){for(var x=[],G=0;G<m.length;G++)1==m[G][0].getEdges().length&&(x.push(m[G]),m[G][0].getOwner().remove(m[G][0]));s.push(x),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},I.prototype.growTree=function(s){for(var y,d=s[s.length-1],m=0;m<d.length;m++)y=d[m],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},I.prototype.findPlaceforPrunedNode=function(s){var f,d,y=s[0],m=(d=y==s[1].source?s[1].target:s[1].source).startX,C=d.finishX,x=d.startY,G=d.finishY,U=[0,0,0,0];if(x>0)for(var $=m;$<=C;$++)U[0]+=this.grid[$][x-1].length+this.grid[$][x].length-1;if(C<this.grid.length-1)for($=x;$<=G;$++)U[1]+=this.grid[C+1][$].length+this.grid[C][$].length-1;if(G<this.grid[0].length-1)for($=m;$<=C;$++)U[2]+=this.grid[$][G+1].length+this.grid[$][G].length-1;if(m>0)for($=x;$<=G;$++)U[3]+=this.grid[m-1][$].length+this.grid[m][$].length-1;for(var j,ot,Z=v.MAX_VALUE,tt=0;tt<U.length;tt++)U[tt]<Z?(Z=U[tt],j=1,ot=tt):U[tt]==Z&&j++;if(3==j&&0==Z)0==U[0]&&0==U[1]&&0==U[2]?f=1:0==U[0]&&0==U[1]&&0==U[3]?f=0:0==U[0]&&0==U[2]&&0==U[3]?f=3:0==U[1]&&0==U[2]&&0==U[3]&&(f=2);else if(2==j&&0==Z){var at=Math.floor(2*Math.random());f=0==U[0]&&0==U[1]?0==at?0:1:0==U[0]&&0==U[2]?0==at?0:2:0==U[0]&&0==U[3]?0==at?0:3:0==U[1]&&0==U[2]?0==at?1:2:0==U[1]&&0==U[3]?0==at?1:3:0==at?2:3}else f=4==j&&0==Z?at=Math.floor(4*Math.random()):ot;0==f?y.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-o.DEFAULT_EDGE_LENGTH-y.getHeight()/2):1==f?y.setCenter(d.getCenterX()+d.getWidth()/2+o.DEFAULT_EDGE_LENGTH+y.getWidth()/2,d.getCenterY()):2==f?y.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+o.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(d.getCenterX()-d.getWidth()/2-o.DEFAULT_EDGE_LENGTH-y.getWidth()/2,d.getCenterY())},c.exports=I},function(c,a,e){"use strict";var t={};t.layoutBase=e(0),t.CoSEConstants=e(1),t.CoSEEdge=e(2),t.CoSEGraph=e(3),t.CoSEGraphManager=e(4),t.CoSELayout=e(6),t.CoSENode=e(5),c.exports=t}]))},26626:function(Nt,b,X){var D;Nt.exports=(D=X(92258),function(c){var a={};function e(t){if(a[t])return a[t].exports;var i=a[t]={i:t,l:!1,exports:{}};return c[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=c,e.c=a,e.i=function(t){return t},e.d=function(t,i,h){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:h})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=1)}([function(c,a){c.exports=D},function(c,a,e){"use strict";var t=e(0).layoutBase.LayoutConstants,i=e(0).layoutBase.FDLayoutConstants,h=e(0).CoSEConstants,n=e(0).CoSELayout,u=e(0).CoSENode,r=e(0).layoutBase.PointD,o=e(0).layoutBase.DimensionD,l={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function p(E,L){var w={};for(var I in E)w[I]=E[I];for(var I in L)w[I]=L[I];return w}function g(E){this.options=p(l,E),T(this.options)}var T=function(L){null!=L.nodeRepulsion&&(h.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=L.nodeRepulsion),null!=L.idealEdgeLength&&(h.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=L.idealEdgeLength),null!=L.edgeElasticity&&(h.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=L.edgeElasticity),null!=L.nestingFactor&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=L.nestingFactor),null!=L.gravity&&(h.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=L.gravity),null!=L.numIter&&(h.MAX_ITERATIONS=i.MAX_ITERATIONS=L.numIter),null!=L.gravityRange&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=L.gravityRange),null!=L.gravityCompound&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=L.gravityCompound),null!=L.gravityRangeCompound&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=L.gravityRangeCompound),null!=L.initialEnergyOnIncremental&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=L.initialEnergyOnIncremental),"draft"==L.quality?t.QUALITY=0:"proof"==L.quality?t.QUALITY=2:t.QUALITY=1,h.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=L.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=!L.randomize,h.ANIMATE=i.ANIMATE=t.ANIMATE=L.animate,h.TILE=L.tile,h.TILING_PADDING_VERTICAL="function"==typeof L.tilingPaddingVertical?L.tilingPaddingVertical.call():L.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL="function"==typeof L.tilingPaddingHorizontal?L.tilingPaddingHorizontal.call():L.tilingPaddingHorizontal};g.prototype.run=function(){var E,L,w=this.options,R=(this.idToLNode={},this.layout=new n),s=this;s.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var f=R.newGraphManager();this.gm=f;var d=this.options.eles.nodes(),y=this.options.eles.edges();this.root=f.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(d),R);for(var m=0;m<y.length;m++){var C=y[m],x=this.idToLNode[C.data("source")],G=this.idToLNode[C.data("target")];x!==G&&0==x.getEdgesBetween(G).length&&(f.add(R.newEdge(),x,G).id=C.id())}var H=function(U,$){"number"==typeof U&&(U=$);var Z=U.data("id"),j=s.idToLNode[Z];return{x:j.getRect().getCenterX(),y:j.getRect().getCenterY()}},J=function q(){for(var Z,U=function(){w.fit&&w.cy.fit(w.eles,w.padding),E||(E=!0,s.cy.one("layoutready",w.ready),s.cy.trigger({type:"layoutready",layout:s}))},$=s.options.refresh,j=0;j<$&&!Z;j++)Z=s.stopped||s.layout.tick();if(Z)return R.checkLayoutSuccess()&&!R.isSubLayout&&R.doPostLayout(),R.tilingPostLayout&&R.tilingPostLayout(),R.isLayoutFinished=!0,s.options.eles.nodes().positions(H),U(),s.cy.one("layoutstop",s.options.stop),s.cy.trigger({type:"layoutstop",layout:s}),L&&cancelAnimationFrame(L),void(E=!1);var ot=s.layout.getPositionsData();w.eles.nodes().positions(function(tt,at){if("number"==typeof tt&&(tt=at),!tt.isParent()){for(var dt=tt.id(),ht=ot[dt],gt=tt;null==ht&&(ht=ot[gt.data("parent")]||ot["DummyCompound_"+gt.data("parent")],ot[dt]=ht,null!=(gt=gt.parent()[0])););return null!=ht?{x:ht.x,y:ht.y}:{x:tt.position("x"),y:tt.position("y")}}}),U(),L=requestAnimationFrame(q)};return R.addListener("layoutstarted",function(){"during"===s.options.animate&&(L=requestAnimationFrame(J))}),R.runLayout(),"during"!==this.options.animate&&(s.options.eles.nodes().not(":parent").layoutPositions(s,s.options,H),E=!1),this},g.prototype.getTopMostNodes=function(E){for(var L={},w=0;w<E.length;w++)L[E[w].id()]=!0;return E.filter(function(R,s){"number"==typeof R&&(R=s);for(var f=R.parent()[0];null!=f;){if(L[f.id()])return!1;f=f.parent()[0]}return!0})},g.prototype.processChildrenList=function(E,L,w){for(var I=L.length,R=0;R<I;R++){var d,G,s=L[R],f=s.children(),y=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((d=null!=s.outerWidth()&&null!=s.outerHeight()?E.add(new u(w.graphManager,new r(s.position("x")-y.w/2,s.position("y")-y.h/2),new o(parseFloat(y.w),parseFloat(y.h)))):E.add(new u(this.graphManager))).id=s.data("id"),d.paddingLeft=parseInt(s.css("padding")),d.paddingTop=parseInt(s.css("padding")),d.paddingRight=parseInt(s.css("padding")),d.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var m=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,C=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,x=s.css("text-halign");d.labelWidth=m,d.labelHeight=C,d.labelPos=x}this.idToLNode[s.data("id")]=d,isNaN(d.rect.x)&&(d.rect.x=0),isNaN(d.rect.y)&&(d.rect.y=0),null!=f&&f.length>0&&(G=w.getGraphManager().add(w.newGraph(),d),this.processChildrenList(G,f,w))}},g.prototype.stop=function(){return this.stopped=!0,this};var v=function(L){L("layout","cose-bilkent",g)};typeof cytoscape<"u"&&v(cytoscape),c.exports=v}]))},66554:function(Nt){Nt.exports=function(b){var X={};function D(c){if(X[c])return X[c].exports;var a=X[c]={i:c,l:!1,exports:{}};return b[c].call(a.exports,a,a.exports,D),a.l=!0,a.exports}return D.m=b,D.c=X,D.i=function(c){return c},D.d=function(c,a,e){D.o(c,a)||Object.defineProperty(c,a,{configurable:!1,enumerable:!0,get:e})},D.n=function(c){var a=c&&c.__esModule?function(){return c.default}:function(){return c};return D.d(a,"a",a),a},D.o=function(c,a){return Object.prototype.hasOwnProperty.call(c,a)},D.p="",D(D.s=26)}([function(b,X,D){"use strict";function c(){}c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,b.exports=c},function(b,X,D){"use strict";var c=D(2),a=D(8),e=D(9);function t(h,n,u){c.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=h,this.target=n}for(var i in t.prototype=Object.create(c.prototype),c)t[i]=c[i];t.prototype.getSource=function(){return this.source},t.prototype.getTarget=function(){return this.target},t.prototype.isInterGraph=function(){return this.isInterGraph},t.prototype.getLength=function(){return this.length},t.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},t.prototype.getBendpoints=function(){return this.bendpoints},t.prototype.getLca=function(){return this.lca},t.prototype.getSourceInLca=function(){return this.sourceInLca},t.prototype.getTargetInLca=function(){return this.targetInLca},t.prototype.getOtherEnd=function(h){if(this.source===h)return this.target;if(this.target===h)return this.source;throw"Node is not incident with this edge"},t.prototype.getOtherEndInGraph=function(h,n){for(var u=this.getOtherEnd(h),r=n.getGraphManager().getRoot();;){if(u.getOwner()==n)return u;if(u.getOwner()==r)break;u=u.getOwner().getParent()}return null},t.prototype.updateLength=function(){var h=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),h),this.isOverlapingSourceAndTarget||(this.lengthX=h[0]-h[2],this.lengthY=h[1]-h[3],Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},t.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},b.exports=t},function(b,X,D){"use strict";function c(a){this.vGraphObject=a}b.exports=c},function(b,X,D){"use strict";var c=D(2),a=D(10),e=D(13),t=D(0),i=D(16),h=D(4);function n(r,o,l,p){null==l&&null==p&&(p=o),c.call(this,p),null!=r.graphManager&&(r=r.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,this.rect=null!=l&&null!=o?new e(o.x,o.y,l.width,l.height):new e}for(var u in n.prototype=Object.create(c.prototype),c)n[u]=c[u];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,o){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=o.width,this.rect.height=o.height},n.prototype.setCenter=function(r,o){this.rect.x=r-this.rect.width/2,this.rect.y=o-this.rect.height/2},n.prototype.setLocation=function(r,o){this.rect.x=r,this.rect.y=o},n.prototype.moveBy=function(r,o){this.rect.x+=r,this.rect.y+=o},n.prototype.getEdgeListToNode=function(r){var o=[],p=this;return p.edges.forEach(function(g){if(g.target==r){if(g.source!=p)throw"Incorrect edge source!";o.push(g)}}),o},n.prototype.getEdgesBetween=function(r){var o=[],p=this;return p.edges.forEach(function(g){if(g.source!=p&&g.target!=p)throw"Incorrect edge source and/or target";(g.target==r||g.source==r)&&o.push(g)}),o},n.prototype.getNeighborsList=function(){var r=new Set,o=this;return o.edges.forEach(function(l){if(l.source==o)r.add(l.target);else{if(l.target!=o)throw"Incorrect incidency!";r.add(l.source)}}),r},n.prototype.withChildren=function(){var r=new Set;if(r.add(this),null!=this.child)for(var p=this.child.getNodes(),g=0;g<p.length;g++)p[g].withChildren().forEach(function(T){r.add(T)});return r},n.prototype.getNoOfChildren=function(){var r=0;if(null==this.child)r=1;else for(var l=this.child.getNodes(),p=0;p<l.length;p++)r+=l[p].getNoOfChildren();return 0==r&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.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)},n.prototype.scatter=function(){var r,o,l=-t.INITIAL_WORLD_BOUNDARY,p=t.INITIAL_WORLD_BOUNDARY;r=t.WORLD_CENTER_X+i.nextDouble()*(p-l)+l;var g=-t.INITIAL_WORLD_BOUNDARY,T=t.INITIAL_WORLD_BOUNDARY;o=t.WORLD_CENTER_Y+i.nextDouble()*(T-g)+g,this.rect.x=r,this.rect.y=o},n.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),t.NODE_DIMENSIONS_INCLUDE_LABELS){var o=r.getRight()-r.getLeft(),l=r.getBottom()-r.getTop();this.labelWidth>o&&(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-l)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var o=this.rect.x;o>t.WORLD_BOUNDARY?o=t.WORLD_BOUNDARY:o<-t.WORLD_BOUNDARY&&(o=-t.WORLD_BOUNDARY);var l=this.rect.y;l>t.WORLD_BOUNDARY?l=t.WORLD_BOUNDARY:l<-t.WORLD_BOUNDARY&&(l=-t.WORLD_BOUNDARY);var p=new h(o,l),g=r.inverseTransformPoint(p);this.setLocation(g.x,g.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},b.exports=n},function(b,X,D){"use strict";function c(a,e){null==a&&null==e?(this.x=0,this.y=0):(this.x=a,this.y=e)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(a){this.x=a},c.prototype.setY=function(a){this.y=a},c.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},b.exports=c},function(b,X,D){"use strict";var c=D(2),a=D(10),e=D(0),t=D(6),i=D(3),h=D(1),n=D(13),u=D(12),r=D(11);function o(p,g,T){c.call(this,T),this.estimatedSize=a.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,null!=g&&g instanceof t?this.graphManager=g:null!=g&&g instanceof Layout&&(this.graphManager=g.graphManager)}for(var l in o.prototype=Object.create(c.prototype),c)o[l]=c[l];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(p,g,T){if(null==g&&null==T){var v=p;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}var E=p;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(g.owner!=T.owner||g.owner!=this)throw"Both owners must be this graph!";return g.owner!=T.owner?null:(E.source=g,E.target=T,E.isInterGraph=!1,this.getEdges().push(E),g.edges.push(E),T!=g&&T.edges.push(E),E)},o.prototype.remove=function(p){var g=p;if(p instanceof i){if(null==g)throw"Node is null!";if(null==g.owner||g.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var T=g.edges.slice(),E=T.length,L=0;L<E;L++)(v=T[L]).isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);if(-1==(w=this.nodes.indexOf(g)))throw"Node not in owner node list!";this.nodes.splice(w,1)}else if(p instanceof h){var v;if(null==(v=p))throw"Edge is null!";if(null==v.source||null==v.target)throw"Source and/or target is null!";if(null==v.source.owner||null==v.target.owner||v.source.owner!=this||v.target.owner!=this)throw"Source and/or target owner is invalid!";var w,I=v.source.edges.indexOf(v),R=v.target.edges.indexOf(v);if(!(I>-1&&R>-1))throw"Source and/or target doesn't know this edge!";if(v.source.edges.splice(I,1),v.target!=v.source&&v.target.edges.splice(R,1),-1==(w=v.source.owner.getEdges().indexOf(v)))throw"Not in owner's edge list!";v.source.owner.getEdges().splice(w,1)}},o.prototype.updateLeftTop=function(){for(var T,v,E,p=a.MAX_VALUE,g=a.MAX_VALUE,L=this.getNodes(),w=L.length,I=0;I<w;I++){var R=L[I];p>(T=R.getTop())&&(p=T),g>(v=R.getLeft())&&(g=v)}return p==a.MAX_VALUE?null:(E=null!=L[0].getParent().paddingLeft?L[0].getParent().paddingLeft:this.margin,this.left=g-E,this.top=p-E,new u(this.left,this.top))},o.prototype.updateBounds=function(p){for(var L,w,I,R,s,g=a.MAX_VALUE,T=-a.MAX_VALUE,v=a.MAX_VALUE,E=-a.MAX_VALUE,f=this.nodes,d=f.length,y=0;y<d;y++){var m=f[y];p&&null!=m.child&&m.updateBounds(),g>(L=m.getLeft())&&(g=L),T<(w=m.getRight())&&(T=w),v>(I=m.getTop())&&(v=I),E<(R=m.getBottom())&&(E=R)}var C=new n(g,v,T-g,E-v);g==a.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=C.x-s,this.right=C.x+C.width+s,this.top=C.y-s,this.bottom=C.y+C.height+s},o.calculateBounds=function(p){for(var L,w,I,R,g=a.MAX_VALUE,T=-a.MAX_VALUE,v=a.MAX_VALUE,E=-a.MAX_VALUE,s=p.length,f=0;f<s;f++){var d=p[f];g>(L=d.getLeft())&&(g=L),T<(w=d.getRight())&&(T=w),v>(I=d.getTop())&&(v=I),E<(R=d.getBottom())&&(E=R)}return new n(g,v,T-g,E-v)},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var p=0,g=this.nodes,T=g.length,v=0;v<T;v++)p+=g[v].calcEstimatedSize();return this.estimatedSize=0==p?e.EMPTY_COMPOUND_NODE_SIZE:p/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var p=this;if(0!=this.nodes.length){var E,L,g=new r,T=new Set,v=this.nodes[0];for(v.withChildren().forEach(function(y){g.push(y),T.add(y)});0!==g.length;)for(var I=(E=(v=g.shift()).getEdges()).length,R=0;R<I;R++)null==(L=E[R].getOtherEndInGraph(v,this))||T.has(L)||L.withChildren().forEach(function(y){g.push(y),T.add(y)});if(this.isConnected=!1,T.size>=this.nodes.length){var d=0;T.forEach(function(y){y.owner==p&&d++}),d==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},b.exports=o},function(b,X,D){"use strict";var c,a=D(1);function e(t){c=D(5),this.layout=t,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var t=this.layout.newGraph(),i=this.layout.newNode(null),h=this.add(t,i);return this.setRootGraph(h),this.rootGraph},e.prototype.add=function(t,i,h,n,u){if(null==h&&null==n&&null==u){if(null==t)throw"Graph is null!";if(null==i)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=i.child)throw"Already has a child!";return t.parent=i,i.child=t,t}u=h,h=t;var r=(n=i).getOwner(),o=u.getOwner();if(null==r||r.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(r==o)return h.isInterGraph=!1,r.add(h,n,u);if(h.isInterGraph=!0,h.source=n,h.target=u,this.edges.indexOf(h)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(h),null==h.source||null==h.target)throw"Edge source and/or target is null!";if(-1!=h.source.edges.indexOf(h)||-1!=h.target.edges.indexOf(h))throw"Edge already in source and/or target incidency list!";return h.source.edges.push(h),h.target.edges.push(h),h},e.prototype.remove=function(t){if(t instanceof c){var i=t;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(i!=this.rootGraph&&(null==i.parent||i.parent.graphManager!=this))throw"Invalid parent node!";for(var n,h=[],u=(h=h.concat(i.getEdges())).length,r=0;r<u;r++)n=h[r],i.remove(n);var l,o=[];for(u=(o=o.concat(i.getNodes())).length,r=0;r<u;r++)l=o[r],i.remove(l);i==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(i);this.graphs.splice(p,1),i.parent=null}else if(t instanceof a){if(null==(n=t))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(p=n.source.edges.indexOf(n),n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";p=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(p,1)}},e.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},e.prototype.getGraphs=function(){return this.graphs},e.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],i=this.getGraphs(),h=i.length,n=0;n<h;n++)t=t.concat(i[n].getNodes());this.allNodes=t}return this.allNodes},e.prototype.resetAllNodes=function(){this.allNodes=null},e.prototype.resetAllEdges=function(){this.allEdges=null},e.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},e.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],i=this.getGraphs(),n=(i.length,0);n<i.length;n++)t=t.concat(i[n].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},e.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},e.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},e.prototype.getRoot=function(){return this.rootGraph},e.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},e.prototype.getLayout=function(){return this.layout},e.prototype.isOneAncestorOfOther=function(t,i){if(null==t||null==i)throw"assert failed";if(t==i)return!0;for(var n,h=t.getOwner();null!=(n=h.getParent());){if(n==i)return!0;if(null==(h=n.getOwner()))break}for(h=i.getOwner();null!=(n=h.getParent());){if(n==t)return!0;if(null==(h=n.getOwner()))break}return!1},e.prototype.calcLowestCommonAncestors=function(){for(var t,i,h,n,u,r=this.getAllEdges(),o=r.length,l=0;l<o;l++)if(i=(t=r[l]).source,h=t.target,t.lca=null,t.sourceInLca=i,t.targetInLca=h,i!=h){for(n=i.getOwner();null==t.lca;){for(t.targetInLca=h,u=h.getOwner();null==t.lca;){if(u==n){t.lca=u;break}if(u==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=u.getParent(),u=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=i.getOwner()},e.prototype.calcLowestCommonAncestor=function(t,i){if(t==i)return t.getOwner();for(var h=t.getOwner();null!=h;){for(var n=i.getOwner();null!=n;){if(n==h)return n;n=n.getParent().getOwner()}h=h.getParent().getOwner()}return h},e.prototype.calcInclusionTreeDepths=function(t,i){null==t&&null==i&&(t=this.rootGraph,i=1);for(var h,n=t.getNodes(),u=n.length,r=0;r<u;r++)(h=n[r]).inclusionTreeDepth=i,null!=h.child&&this.calcInclusionTreeDepths(h.child,i+1)},e.prototype.includesInvalidEdge=function(){for(var t,i=this.edges.length,h=0;h<i;h++)if(t=this.edges[h],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},b.exports=e},function(b,X,D){"use strict";var c=D(0);function a(){}for(var e in c)a[e]=c[e];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,a.MAX_NODE_DISPLACEMENT=3*a.MAX_NODE_DISPLACEMENT_INCREMENTAL,a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,b.exports=a},function(b,X,D){"use strict";var c=D(12);function a(){}a.calcSeparationAmount=function(e,t,i,h){if(!e.intersects(t))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(e,t,n),i[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),i[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var u=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(u=1);var r=u*i[0],o=i[1]/u;i[0]<o?o=i[0]:r=i[1],i[0]=-1*n[0]*(o/2+h),i[1]=-1*n[1]*(r/2+h)},a.decideDirectionsForOverlappingNodes=function(e,t,i){e.getCenterX()<t.getCenterX()?i[0]=-1:i[0]=1,e.getCenterY()<t.getCenterY()?i[1]=-1:i[1]=1},a.getIntersection2=function(e,t,i){var h=e.getCenterX(),n=e.getCenterY(),u=t.getCenterX(),r=t.getCenterY();if(e.intersects(t))return i[0]=h,i[1]=n,i[2]=u,i[3]=r,!0;var o=e.getX(),l=e.getY(),p=e.getRight(),g=e.getX(),T=e.getBottom(),v=e.getRight(),E=e.getWidthHalf(),L=e.getHeightHalf(),w=t.getX(),I=t.getY(),R=t.getRight(),s=t.getX(),f=t.getBottom(),d=t.getRight(),y=t.getWidthHalf(),m=t.getHeightHalf(),C=!1,x=!1;if(h===u){if(n>r)return i[0]=h,i[1]=l,i[2]=u,i[3]=f,!1;if(n<r)return i[0]=h,i[1]=T,i[2]=u,i[3]=I,!1}else if(n===r){if(h>u)return i[0]=o,i[1]=n,i[2]=R,i[3]=r,!1;if(h<u)return i[0]=p,i[1]=n,i[2]=w,i[3]=r,!1}else{var G=e.height/e.width,k=t.height/t.width,H=(r-n)/(u-h),J=void 0,q=void 0,U=void 0,$=void 0,Z=void 0,j=void 0;if(-G===H?h>u?(i[0]=g,i[1]=T,C=!0):(i[0]=p,i[1]=l,C=!0):G===H&&(h>u?(i[0]=o,i[1]=l,C=!0):(i[0]=v,i[1]=T,C=!0)),-k===H?u>h?(i[2]=s,i[3]=f,x=!0):(i[2]=R,i[3]=I,x=!0):k===H&&(u>h?(i[2]=w,i[3]=I,x=!0):(i[2]=d,i[3]=f,x=!0)),C&&x)return!1;if(h>u?n>r?(J=this.getCardinalDirection(G,H,4),q=this.getCardinalDirection(k,H,2)):(J=this.getCardinalDirection(-G,H,3),q=this.getCardinalDirection(-k,H,1)):n>r?(J=this.getCardinalDirection(-G,H,1),q=this.getCardinalDirection(-k,H,3)):(J=this.getCardinalDirection(G,H,2),q=this.getCardinalDirection(k,H,4)),!C)switch(J){case 1:$=l,U=h+-L/H,i[0]=U,i[1]=$;break;case 2:U=v,$=n+E*H,i[0]=U,i[1]=$;break;case 3:$=T,U=h+L/H,i[0]=U,i[1]=$;break;case 4:U=g,$=n+-E*H,i[0]=U,i[1]=$}if(!x)switch(q){case 1:j=I,Z=u+-m/H,i[2]=Z,i[3]=j;break;case 2:Z=d,j=r+y*H,i[2]=Z,i[3]=j;break;case 3:j=f,Z=u+m/H,i[2]=Z,i[3]=j;break;case 4:Z=s,j=r+-y*H,i[2]=Z,i[3]=j}}return!1},a.getCardinalDirection=function(e,t,i){return e>t?i:1+i%4},a.getIntersection=function(e,t,i,h){if(null==h)return this.getIntersection2(e,t,i);var n=e.x,u=e.y,r=t.x,o=t.y,l=i.x,p=i.y,g=h.x,T=h.y,L=void 0,w=void 0,I=void 0,R=void 0,s=void 0,f=void 0,d=void 0;return s=r*u-n*o,f=g*p-l*T,0==(d=(L=o-u)*(R=l-g)-(w=T-p)*(I=n-r))?null:new c((I*f-R*s)/d,(w*s-L*f)/d)},a.angleOfVector=function(e,t,i,h){var n=void 0;return e!==i?(n=Math.atan((h-t)/(i-e)),i<e?n+=Math.PI:h<t&&(n+=this.TWO_PI)):n=h<t?this.ONE_AND_HALF_PI:this.HALF_PI,n},a.doIntersect=function(e,t,i,h){var n=e.x,u=e.y,r=t.x,o=t.y,l=i.x,p=i.y,g=h.x,T=h.y,v=(r-n)*(T-p)-(g-l)*(o-u);if(0===v)return!1;var E=((T-p)*(g-n)+(l-g)*(T-u))/v,L=((u-o)*(g-n)+(r-n)*(T-u))/v;return 0<E&&E<1&&0<L&&L<1},a.HALF_PI=.5*Math.PI,a.ONE_AND_HALF_PI=1.5*Math.PI,a.TWO_PI=2*Math.PI,a.THREE_PI=3*Math.PI,b.exports=a},function(b,X,D){"use strict";function c(){}c.sign=function(a){return a>0?1:a<0?-1:0},c.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},c.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},b.exports=c},function(b,X,D){"use strict";function c(){}c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,b.exports=c},function(b,X,D){"use strict";var c=function(){function n(u,r){for(var o=0;o<r.length;o++){var l=r[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}return function(u,r,o){return r&&n(u.prototype,r),o&&n(u,o),u}}();function a(n,u){if(!(n instanceof u))throw new TypeError("Cannot call a class as a function")}var e=function(u){return{value:u,next:null,prev:null}},t=function(u,r,o,l){return null!==u?u.next=r:l.head=r,null!==o?o.prev=r:l.tail=r,r.prev=u,r.next=o,l.length++,r},i=function(u,r){var o=u.prev,l=u.next;return null!==o?o.next=l:r.head=l,null!==l?l.prev=o:r.tail=o,u.prev=u.next=null,r.length--,u},h=function(){function n(u){var r=this;a(this,n),this.length=0,this.head=null,this.tail=null,null!=u&&u.forEach(function(o){return r.push(o)})}return c(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,o){return t(o.prev,e(r),o,this)}},{key:"insertAfter",value:function(r,o){return t(o,e(r),o.next,this)}},{key:"insertNodeBefore",value:function(r,o){return t(o.prev,r,o,this)}},{key:"insertNodeAfter",value:function(r,o){return t(o,r,o.next,this)}},{key:"push",value:function(r){return t(this.tail,e(r),null,this)}},{key:"unshift",value:function(r){return t(null,e(r),this.head,this)}},{key:"remove",value:function(r){return i(r,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var o=1,l=this.head;o<r;)l=l.next,o++;return l.value}}},{key:"set_object_at",value:function(r,o){if(r<=this.length()){for(var l=1,p=this.head;l<r;)p=p.next,l++;p.value=o}}}]),n}();b.exports=h},function(b,X,D){"use strict";function c(a,e,t){this.x=null,this.y=null,null==a&&null==e&&null==t?(this.x=0,this.y=0):"number"==typeof a&&"number"==typeof e&&null==t?(this.x=a,this.y=e):"Point"==a.constructor.name&&null==e&&null==t&&(t=a,this.x=t.x,this.y=t.y)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(a,e,t){"Point"==a.constructor.name&&null==e&&null==t?(t=a,this.setLocation(t.x,t.y)):"number"==typeof a&&"number"==typeof e&&null==t&&(parseInt(a)==a&&parseInt(e)==e?this.move(a,e):(this.x=Math.floor(a+.5),this.y=Math.floor(e+.5)))},c.prototype.move=function(a,e){this.x=a,this.y=e},c.prototype.translate=function(a,e){this.x+=a,this.y+=e},c.prototype.equals=function(a){if("Point"==a.constructor.name){var e=a;return this.x==e.x&&this.y==e.y}return this==a},c.prototype.toString=function(){return(new c).constructor.name+"[x="+this.x+",y="+this.y+"]"},b.exports=c},function(b,X,D){"use strict";function c(a,e,t,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=a&&null!=e&&null!=t&&null!=i&&(this.x=a,this.y=e,this.width=t,this.height=i)}c.prototype.getX=function(){return this.x},c.prototype.setX=function(a){this.x=a},c.prototype.getY=function(){return this.y},c.prototype.setY=function(a){this.y=a},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(a){this.width=a},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(a){this.height=a},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(a){return!(this.getRight()<a.x||this.getBottom()<a.y||a.getRight()<this.x||a.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},b.exports=c},function(b,X,D){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(){}a.lastID=0,a.createID=function(e){return a.isPrimitive(e)?e:(null!=e.uniqueID||(e.uniqueID=a.getString(),a.lastID++),e.uniqueID)},a.getString=function(e){return null==e&&(e=a.lastID),"Object#"+e},a.isPrimitive=function(e){var t=typeof e>"u"?"undefined":c(e);return null==e||"object"!=t&&"function"!=t},b.exports=a},function(b,X,D){"use strict";function c(l){if(Array.isArray(l)){for(var p=0,g=Array(l.length);p<l.length;p++)g[p]=l[p];return g}return Array.from(l)}var a=D(0),e=D(6),t=D(3),i=D(1),h=D(5),n=D(4),u=D(17),r=D(27);function o(l){r.call(this),this.layoutQuality=a.QUALITY,this.createBendsAsNeeded=a.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=a.DEFAULT_INCREMENTAL,this.animationOnLayout=a.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=a.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=a.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=a.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new e(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=l&&(this.isRemoteUse=l)}o.RANDOM_SEED=1,o.prototype=Object.create(r.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var l=new e(this);return this.graphManager=l,l},o.prototype.newGraph=function(l){return new h(null,this.graphManager,l)},o.prototype.newNode=function(l){return new t(this.graphManager,l)},o.prototype.newEdge=function(l){return new i(null,null,l)},o.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){var l;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),l=!this.checkLayoutSuccess()&&this.layout(),"during"!==a.ANIMATE&&(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var p=this.graphManager.getAllEdges(),g=0;g<p.length;g++)p[g];var v=this.graphManager.getRoot().getNodes();for(g=0;g<v.length;g++)v[g];this.update(this.graphManager.getRoot())}},o.prototype.update=function(l){if(null==l)this.update2();else if(l instanceof t){var p=l;if(null!=p.getChild())for(var g=p.getChild().getNodes(),T=0;T<g.length;T++)update(g[T]);null!=p.vGraphObject&&p.vGraphObject.update(p)}else if(l instanceof i){var E=l;null!=E.vGraphObject&&E.vGraphObject.update(E)}else if(l instanceof h){var w=l;null!=w.vGraphObject&&w.vGraphObject.update(w)}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=a.QUALITY,this.animationDuringLayout=a.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=a.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=a.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=a.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=a.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=a.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(l){if(null==l)this.transform(new n(0,0));else{var p=new u,g=this.graphManager.getRoot().updateLeftTop();if(null!=g){p.setWorldOrgX(l.x),p.setWorldOrgY(l.y),p.setDeviceOrgX(g.x),p.setDeviceOrgY(g.y);for(var T=this.getAllNodes(),E=0;E<T.length;E++)T[E].transform(p)}}},o.prototype.positionNodesRandomly=function(l){if(null==l)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,g,T=l.getNodes(),v=0;v<T.length;v++)null==(g=(p=T[v]).getChild())||0==g.getNodes().length?p.scatter():(this.positionNodesRandomly(g),p.updateBounds())},o.prototype.getFlatForest=function(){for(var l=[],p=!0,g=this.graphManager.getRoot().getNodes(),T=!0,v=0;v<g.length;v++)null!=g[v].getChild()&&(T=!1);if(!T)return l;var E=new Set,L=[],w=new Map,I=[];for(I=I.concat(g);I.length>0&&p;){for(L.push(I[0]);L.length>0&&p;){var R=L[0];L.splice(0,1),E.add(R);var s=R.getEdges();for(v=0;v<s.length;v++){var f=s[v].getOtherEnd(R);if(w.get(R)!=f){if(E.has(f)){p=!1;break}L.push(f),w.set(f,R)}}}if(p){var d=[].concat(c(E));for(l.push(d),v=0;v<d.length;v++){var y=d[v],m=I.indexOf(y);m>-1&&I.splice(m,1)}E=new Set,w=new Map}else l=[]}return l},o.prototype.createDummyNodesForBendpoints=function(l){for(var p=[],g=l.source,T=this.graphManager.calcLowestCommonAncestor(l.source,l.target),v=0;v<l.bendpoints.length;v++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),T.add(E);var L=this.newEdge(null);this.graphManager.add(L,g,E),p.add(E),g=E}return L=this.newEdge(null),this.graphManager.add(L,g,l.target),this.edgeToDummyNodes.set(l,p),l.isInterGraph()?this.graphManager.remove(l):T.remove(l),p},o.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(c(this.edgeToDummyNodes.keys())).concat(l);for(var p=0;p<l.length;p++){var g=l[p];if(g.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(g),v=0;v<T.length;v++){var E=T[v],L=new n(E.getCenterX(),E.getCenterY()),w=g.bendpoints.get(v);w.x=L.x,w.y=L.y,E.getOwner().remove(E)}this.graphManager.add(g,g.source,g.target)}}},o.transform=function(l,p,g,T){if(null!=g&&null!=T){var v=p;return l<=50?v-=(p-p/g)/50*(50-l):v+=(p*T-p)/50*(l-50),v}var w,I;return l<=50?(w=9*p/500,I=p/10):(w=9*p/50,I=-8*p),w*l+I},o.findCenterOfTree=function(l){var p=[];p=p.concat(l);var g=[],T=new Map,v=!1,E=null;(1==p.length||2==p.length)&&(v=!0,E=p[0]);for(var L=0;L<p.length;L++){var I=(w=p[L]).getNeighborsList().size;T.set(w,w.getNeighborsList().size),1==I&&g.push(w)}var R=[];for(R=R.concat(g);!v;){var s=[];for(s=s.concat(R),R=[],L=0;L<p.length;L++){var w=p[L],f=p.indexOf(w);f>=0&&p.splice(f,1),w.getNeighborsList().forEach(function(C){if(g.indexOf(C)<0){var G=T.get(C)-1;1==G&&R.push(C),T.set(C,G)}})}g=g.concat(R),(1==p.length||2==p.length)&&(v=!0,E=p[0])}return E},o.prototype.setGraphManager=function(l){this.graphManager=l},b.exports=o},function(b,X,D){"use strict";function c(){}c.seed=1,c.x=0,c.nextDouble=function(){return c.x=1e4*Math.sin(c.seed++),c.x-Math.floor(c.x)},b.exports=c},function(b,X,D){"use strict";var c=D(4);function a(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(e){this.lworldExtX=e},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(e){this.lworldExtY=e},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},a.prototype.transformX=function(e){var t=0,i=this.lworldExtX;return 0!=i&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/i),t},a.prototype.transformY=function(e){var t=0,i=this.lworldExtY;return 0!=i&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/i),t},a.prototype.inverseTransformX=function(e){var t=0,i=this.ldeviceExtX;return 0!=i&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/i),t},a.prototype.inverseTransformY=function(e){var t=0,i=this.ldeviceExtY;return 0!=i&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/i),t},a.prototype.inverseTransformPoint=function(e){return new c(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},b.exports=a},function(b,X,D){"use strict";function c(r){if(Array.isArray(r)){for(var o=0,l=Array(r.length);o<r.length;o++)l[o]=r[o];return l}return Array.from(r)}var a=D(15),e=D(7),t=D(0),i=D(8),h=D(9);function n(){a.call(this),this.useSmartIdealEdgeLengthCalculation=e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=e.DEFAULT_EDGE_LENGTH,this.springConstant=e.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=e.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=e.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=e.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=e.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*e.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=e.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=e.MAX_ITERATIONS}for(var u in n.prototype=Object.create(a.prototype),a)n[u]=a[u];n.prototype.initParameters=function(){a.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,o,l,p,g,T,v=this.getGraphManager().getAllEdges(),E=0;E<v.length;E++)(r=v[E]).idealLength=this.idealEdgeLength,r.isInterGraph&&(l=r.getSource(),p=r.getTarget(),g=r.getSourceInLca().getEstimatedSize(),T=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=g+T-2*t.SIMPLE_NODE_SIZE),o=r.getLca().getInclusionTreeDepth(),r.idealLength+=e.DEFAULT_EDGE_LENGTH*e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*o))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>e.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(r-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var o,r=this.getAllEdges(),l=0;l<r.length;l++)o=r[l],this.calcSpringForce(o,o.idealLength)},n.prototype.calcRepulsionForces=function(){var l,p,g,T,E,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],v=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,l=0;l<v.length;l++)g=v[l],this.calculateRepulsionForceOfANode(g,E,r,o),E.add(g);else for(l=0;l<v.length;l++)for(g=v[l],p=l+1;p<v.length;p++)T=v[p],g.getOwner()==T.getOwner()&&this.calcRepulsionForce(g,T)},n.prototype.calcGravitationalForces=function(){for(var r,o=this.getAllNodesToApplyGravitation(),l=0;l<o.length;l++)r=o[l],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),l=0;l<r.length;l++)r[l].move()},n.prototype.calcSpringForce=function(r,o){var g,T,v,E,l=r.getSource(),p=r.getTarget();if(this.uniformLeafNodeSizes&&null==l.getChild()&&null==p.getChild())r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;0!=(g=r.getLength())&&(v=(T=this.springConstant*(g-o))*(r.lengthX/g),E=T*(r.lengthY/g),l.springForceX+=v,l.springForceY+=E,p.springForceX-=v,p.springForceY-=E)},n.prototype.calcRepulsionForce=function(r,o){var v,E,L,w,I,R,s,l=r.getRect(),p=o.getRect(),g=new Array(2),T=new Array(4);if(l.intersects(p)){i.calcSeparationAmount(l,p,g,e.DEFAULT_EDGE_LENGTH/2),R=2*g[0],s=2*g[1];var f=r.noOfChildren*o.noOfChildren/(r.noOfChildren+o.noOfChildren);r.repulsionForceX-=f*R,r.repulsionForceY-=f*s,o.repulsionForceX+=f*R,o.repulsionForceY+=f*s}else this.uniformLeafNodeSizes&&null==r.getChild()&&null==o.getChild()?(v=p.getCenterX()-l.getCenterX(),E=p.getCenterY()-l.getCenterY()):(i.getIntersection(l,p,T),v=T[2]-T[0],E=T[3]-T[1]),Math.abs(v)<e.MIN_REPULSION_DIST&&(v=h.sign(v)*e.MIN_REPULSION_DIST),Math.abs(E)<e.MIN_REPULSION_DIST&&(E=h.sign(E)*e.MIN_REPULSION_DIST),L=v*v+E*E,w=Math.sqrt(L),R=(I=this.repulsionConstant*r.noOfChildren*o.noOfChildren/L)*v/w,s=I*E/w,r.repulsionForceX-=R,r.repulsionForceY-=s,o.repulsionForceX+=R,o.repulsionForceY+=s},n.prototype.calcGravitationalForce=function(r){var o,l,p,g,T,v,E,L;l=((o=r.getOwner()).getRight()+o.getLeft())/2,p=(o.getTop()+o.getBottom())/2,g=r.getCenterX()-l,T=r.getCenterY()-p,v=Math.abs(g)+r.getWidth()/2,E=Math.abs(T)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(v>(L=o.getEstimatedSize()*this.gravityRangeFactor)||E>L)&&(r.gravitationForceX=-this.gravityConstant*g,r.gravitationForceY=-this.gravityConstant*T):(v>(L=o.getEstimatedSize()*this.compoundGravityRangeFactor)||E>L)&&(r.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant)},n.prototype.isConverged=function(){var r,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||o},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,o=this.graphManager.getAllNodes(),l=0;l<o.length;l++)(r=o[l]).noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var o=0,l=0;o=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(o),g=0;g<o;g++)p[g]=new Array(l);for(g=0;g<o;g++)for(var T=0;T<l;T++)p[g][T]=new Array;return p},n.prototype.addNodeToGrid=function(r,o,l){var p=0,g=0,T=0,v=0;p=parseInt(Math.floor((r.getRect().x-o)/this.repulsionRange)),g=parseInt(Math.floor((r.getRect().width+r.getRect().x-o)/this.repulsionRange)),T=parseInt(Math.floor((r.getRect().y-l)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().height+r.getRect().y-l)/this.repulsionRange));for(var E=p;E<=g;E++)for(var L=T;L<=v;L++)this.grid[E][L].push(r),r.setGridCoordinates(p,g,T,v)},n.prototype.updateGrid=function(){var r,o,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<l.length;r++)o=l[r],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,o,l,p){if(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&l||p){var g=new Set;r.surrounding=new Array;for(var T,v=this.grid,E=r.startX-1;E<r.finishX+2;E++)for(var L=r.startY-1;L<r.finishY+2;L++)if(!(E<0||L<0||E>=v.length||L>=v[0].length))for(var w=0;w<v[E][L].length;w++)if(T=v[E][L][w],r.getOwner()==T.getOwner()&&r!=T&&!o.has(T)&&!g.has(T)){var I=Math.abs(r.getCenterX()-T.getCenterX())-(r.getWidth()/2+T.getWidth()/2),R=Math.abs(r.getCenterY()-T.getCenterY())-(r.getHeight()/2+T.getHeight()/2);I<=this.repulsionRange&&R<=this.repulsionRange&&g.add(T)}r.surrounding=[].concat(c(g))}for(E=0;E<r.surrounding.length;E++)this.calcRepulsionForce(r,r.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},b.exports=n},function(b,X,D){"use strict";var c=D(1),a=D(7);function e(i,h,n){c.call(this,i,h,n),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(var t in e.prototype=Object.create(c.prototype),c)e[t]=c[t];b.exports=e},function(b,X,D){"use strict";var c=D(3);function a(t,i,h,n){c.call(this,t,i,h,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var e in a.prototype=Object.create(c.prototype),c)a[e]=c[e];a.prototype.setGridCoordinates=function(t,i,h,n){this.startX=t,this.finishX=i,this.startY=h,this.finishY=n},b.exports=a},function(b,X,D){"use strict";function c(a,e){this.width=0,this.height=0,null!==a&&null!==e&&(this.height=e,this.width=a)}c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(a){this.width=a},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(a){this.height=a},b.exports=c},function(b,X,D){"use strict";var c=D(14);function a(){this.map={},this.keys=[]}a.prototype.put=function(e,t){var i=c.createID(e);this.contains(i)||(this.map[i]=t,this.keys.push(e))},a.prototype.contains=function(e){return c.createID(e),null!=this.map[e]},a.prototype.get=function(e){var t=c.createID(e);return this.map[t]},a.prototype.keySet=function(){return this.keys},b.exports=a},function(b,X,D){"use strict";var c=D(14);function a(){this.set={}}a.prototype.add=function(e){var t=c.createID(e);this.contains(t)||(this.set[t]=e)},a.prototype.remove=function(e){delete this.set[c.createID(e)]},a.prototype.clear=function(){this.set={}},a.prototype.contains=function(e){return this.set[c.createID(e)]==e},a.prototype.isEmpty=function(){return 0===this.size()},a.prototype.size=function(){return Object.keys(this.set).length},a.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),i=t.length,h=0;h<i;h++)e.push(this.set[t[h]])},a.prototype.size=function(){return Object.keys(this.set).length},a.prototype.addAll=function(e){for(var t=e.length,i=0;i<t;i++){var h=e[i];this.add(h)}},b.exports=a},function(b,X,D){"use strict";var c=function(){function i(h,n){for(var u=0;u<n.length;u++){var r=n[u];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(h,r.key,r)}}return function(h,n,u){return n&&i(h.prototype,n),u&&i(h,u),h}}();function a(i,h){if(!(i instanceof h))throw new TypeError("Cannot call a class as a function")}var e=D(11),t=function(){function i(h,n){a(this,i),(null!==n||void 0!==n)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;u=h instanceof e?h.size():h.length,this._quicksort(h,0,u-1)}return c(i,[{key:"_quicksort",value:function(n,u,r){if(u<r){var o=this._partition(n,u,r);this._quicksort(n,u,o),this._quicksort(n,o+1,r)}}},{key:"_partition",value:function(n,u,r){for(var o=this._get(n,u),l=u,p=r;;){for(;this.compareFunction(o,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,l),o);)l++;if(!(l<p))return p;this._swap(n,l,p),l++,p--}}},{key:"_get",value:function(n,u){return n instanceof e?n.get_object_at(u):n[u]}},{key:"_set",value:function(n,u,r){n instanceof e?n.set_object_at(u,r):n[u]=r}},{key:"_swap",value:function(n,u,r){var o=this._get(n,u);this._set(n,u,this._get(n,r)),this._set(n,r,o)}},{key:"_defaultCompareFunction",value:function(n,u){return u>n}}]),i}();b.exports=t},function(b,X,D){"use strict";var c=function(){function t(i,h){for(var n=0;n<h.length;n++){var u=h[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}return function(i,h,n){return h&&t(i.prototype,h),n&&t(i,n),i}}();function a(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var e=function(){function t(i,h){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;a(this,t),this.sequence1=i,this.sequence2=h,this.match_score=n,this.mismatch_penalty=u,this.gap_penalty=r,this.iMax=i.length+1,this.jMax=h.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[o][l]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[p][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return c(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var h=1;h<this.jMax;h++)this.grid[0][h]=this.grid[0][h-1]+this.gap_penalty,this.tracebackGrid[0][h]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var r=1;r<this.jMax;r++){var g=[this.sequence1[u-1]===this.sequence2[r-1]?this.grid[u-1][r-1]+this.match_score:this.grid[u-1][r-1]+this.mismatch_penalty,this.grid[u-1][r]+this.gap_penalty,this.grid[u][r-1]+this.gap_penalty],T=this.arrayAllMaxIndexes(g);this.grid[u][r]=g[T[0]],this.tracebackGrid[u][r]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var h=[];for(h.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});h[0];){var n=h[0],u=this.tracebackGrid[n.pos[0]][n.pos[1]];u[0]&&h.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),u[1]&&h.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),u[2]&&h.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),0===n.pos[0]&&0===n.pos[1]&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),h.shift()}return this.alignments}},{key:"getAllIndexes",value:function(h,n){for(var u=[],r=-1;-1!==(r=h.indexOf(n,r+1));)u.push(r);return u}},{key:"arrayAllMaxIndexes",value:function(h){return this.getAllIndexes(h,Math.max.apply(null,h))}}]),t}();b.exports=e},function(b,X,D){"use strict";var c=function(){};c.FDLayout=D(18),c.FDLayoutConstants=D(7),c.FDLayoutEdge=D(19),c.FDLayoutNode=D(20),c.DimensionD=D(21),c.HashMap=D(22),c.HashSet=D(23),c.IGeometry=D(8),c.IMath=D(9),c.Integer=D(10),c.Point=D(12),c.PointD=D(4),c.RandomSeed=D(16),c.RectangleD=D(13),c.Transform=D(17),c.UniqueIDGeneretor=D(14),c.Quicksort=D(24),c.LinkedList=D(11),c.LGraphObject=D(2),c.LGraph=D(5),c.LEdge=D(1),c.LGraphManager=D(6),c.LNode=D(3),c.Layout=D(15),c.LayoutConstants=D(0),c.NeedlemanWunsch=D(25),b.exports=c},function(b,X,D){"use strict";function c(){this.listeners=[]}var a=c.prototype;a.addListener=function(e,t){this.listeners.push({event:e,callback:t})},a.removeListener=function(e,t){for(var i=this.listeners.length;i>=0;i--){var h=this.listeners[i];h.event===e&&h.callback===t&&this.listeners.splice(i,1)}},a.emit=function(e,t){for(var i=0;i<this.listeners.length;i++){var h=this.listeners[i];e===h.event&&h.callback(t)}},b.exports=c}])},66201:(Nt,b,X)=>{"use strict";X.r(b),X.d(b,{diagram:()=>jt});var D=X(53420),c=X(50027),a=X(62477),e=X(39624),t=X(3685),i=X(90574),h=X(26626),n=X(31083),u=X(39603),r=X(46803),o=X(69965),l=function(){var A=(0,t.eW)(function(Et,Y,F,W){for(F=F||{},W=Et.length;W--;F[Et[W]]=Y);return F},"o"),S=[1,4],O=[1,13],N=[1,12],P=[1,15],M=[1,16],K=[1,20],V=[1,19],et=[6,7,8],yt=[1,26],st=[1,24],lt=[1,25],it=[6,7,11],Lt=[1,6,13,15,16,19,22],Rt=[1,33],pt=[1,34],ut=[1,6,7,11,13,15,16,19,22],Mt={trace:(0,t.eW)(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,t.eW)(function(Y,F,W,B,z,_,It){var Q=_.length-1;switch(z){case 6:case 7:return B;case 8:B.getLogger().trace("Stop NL ");break;case 9:B.getLogger().trace("Stop EOF ");break;case 11:B.getLogger().trace("Stop NL2 ");break;case 12:B.getLogger().trace("Stop EOF2 ");break;case 15:B.getLogger().info("Node: ",_[Q].id),B.addNode(_[Q-1].length,_[Q].id,_[Q].descr,_[Q].type);break;case 16:B.getLogger().trace("Icon: ",_[Q]),B.decorateNode({icon:_[Q]});break;case 17:case 21:B.decorateNode({class:_[Q]});break;case 18:B.getLogger().trace("SPACELIST");break;case 19:B.getLogger().trace("Node: ",_[Q].id),B.addNode(0,_[Q].id,_[Q].descr,_[Q].type);break;case 20:B.decorateNode({icon:_[Q]});break;case 25:B.getLogger().trace("node found ..",_[Q-2]),this.$={id:_[Q-1],descr:_[Q-1],type:B.getType(_[Q-2],_[Q])};break;case 26:this.$={id:_[Q],descr:_[Q],type:B.nodeType.DEFAULT};break;case 27:B.getLogger().trace("node found ..",_[Q-3]),this.$={id:_[Q-3],descr:_[Q-1],type:B.getType(_[Q-2],_[Q])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:S},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:S},{6:O,7:[1,10],9:9,12:11,13:N,14:14,15:P,16:M,17:17,18:18,19:K,22:V},A(et,[2,3]),{1:[2,2]},A(et,[2,4]),A(et,[2,5]),{1:[2,6],6:O,12:21,13:N,14:14,15:P,16:M,17:17,18:18,19:K,22:V},{6:O,9:22,12:11,13:N,14:14,15:P,16:M,17:17,18:18,19:K,22:V},{6:yt,7:st,10:23,11:lt},A(it,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:K,22:V}),A(it,[2,18]),A(it,[2,19]),A(it,[2,20]),A(it,[2,21]),A(it,[2,23]),A(it,[2,24]),A(it,[2,26],{19:[1,30]}),{20:[1,31]},{6:yt,7:st,10:32,11:lt},{1:[2,7],6:O,12:21,13:N,14:14,15:P,16:M,17:17,18:18,19:K,22:V},A(Lt,[2,14],{7:Rt,11:pt}),A(ut,[2,8]),A(ut,[2,9]),A(ut,[2,10]),A(it,[2,15]),A(it,[2,16]),A(it,[2,17]),{20:[1,35]},{21:[1,36]},A(Lt,[2,13],{7:Rt,11:pt}),A(ut,[2,11]),A(ut,[2,12]),{21:[1,37]},A(it,[2,25]),A(it,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,t.eW)(function(Y,F){if(!F.recoverable){var W=new Error(Y);throw W.hash=F,W}this.trace(Y)},"parseError"),parse:(0,t.eW)(function(Y){var F=this,W=[0],B=[],z=[null],_=[],It=this.table,Q="",wt=0,Yt=0,Xt=0,zt=2,kt=1,Jt=_.slice.call(arguments,1),rt=Object.create(this.lexer),Tt={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(Tt.yy[Ft]=this.yy[Ft]);rt.setInput(Y,Tt.yy),Tt.yy.lexer=rt,Tt.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var bt=rt.yylloc;_.push(bt);var qt=rt.options&&rt.options.ranges;function te(ct){W.length=W.length-2*ct,z.length=z.length-ct,_.length=_.length-ct}function Wt(){var ct;return"number"!=typeof(ct=B.pop()||rt.lex()||kt)&&(ct instanceof Array&&(ct=(B=ct).pop()),ct=F.symbols_[ct]||ct),ct}"function"==typeof Tt.yy.parseError?this.parseError=Tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,t.eW)(te,"popStack"),(0,t.eW)(Wt,"lex");for(var nt,Pt,Dt,ft,Ut,St,vt,Ht,Gt,Ot={};;){if(Dt=W[W.length-1],this.defaultActions[Dt]?ft=this.defaultActions[Dt]:((null===nt||typeof nt>"u")&&(nt=Wt()),ft=It[Dt]&&It[Dt][nt]),typeof ft>"u"||!ft.length||!ft[0]){var _t="";for(St in Gt=[],It[Dt])this.terminals_[St]&&St>zt&&Gt.push("'"+this.terminals_[St]+"'");_t=rt.showPosition?"Parse error on line "+(wt+1)+":\n"+rt.showPosition()+"\nExpecting "+Gt.join(", ")+", got '"+(this.terminals_[nt]||nt)+"'":"Parse error on line "+(wt+1)+": Unexpected "+(nt==kt?"end of input":"'"+(this.terminals_[nt]||nt)+"'"),this.parseError(_t,{text:rt.match,token:this.terminals_[nt]||nt,line:rt.yylineno,loc:bt,expected:Gt})}if(ft[0]instanceof Array&&ft.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Dt+", token: "+nt);switch(ft[0]){case 1:W.push(nt),z.push(rt.yytext),_.push(rt.yylloc),W.push(ft[1]),nt=null,Pt?(nt=Pt,Pt=null):(Yt=rt.yyleng,Q=rt.yytext,wt=rt.yylineno,bt=rt.yylloc,Xt>0&&Xt--);break;case 2:if(vt=this.productions_[ft[1]][1],Ot.$=z[z.length-vt],Ot._$={first_line:_[_.length-(vt||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(vt||1)].first_column,last_column:_[_.length-1].last_column},qt&&(Ot._$.range=[_[_.length-(vt||1)].range[0],_[_.length-1].range[1]]),typeof(Ut=this.performAction.apply(Ot,[Q,Yt,wt,Tt.yy,ft[1],z,_].concat(Jt)))<"u")return Ut;vt&&(W=W.slice(0,-1*vt*2),z=z.slice(0,-1*vt),_=_.slice(0,-1*vt)),W.push(this.productions_[ft[1]][0]),z.push(Ot.$),_.push(Ot._$),Ht=It[W[W.length-2]][W[W.length-1]],W.push(Ht);break;case 3:return!0}}return!0},"parse")},Qt=function(){return{EOF:1,parseError:(0,t.eW)(function(F,W){if(!this.yy.parser)throw new Error(F);this.yy.parser.parseError(F,W)},"parseError"),setInput:(0,t.eW)(function(Y,F){return this.yy=F||this.yy||{},this._input=Y,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,t.eW)(function(){var Y=this._input[0];return this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y,Y.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),Y},"input"),unput:(0,t.eW)(function(Y){var F=Y.length,W=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var B=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),W.length-1&&(this.yylineno-=W.length-1);var z=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:W?(W.length===B.length?this.yylloc.first_column:0)+B[B.length-W.length].length-W[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},"unput"),more:(0,t.eW)(function(){return this._more=!0,this},"more"),reject:(0,t.eW)(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,t.eW)(function(Y){this.unput(this.match.slice(Y))},"less"),pastInput:(0,t.eW)(function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,t.eW)(function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,t.eW)(function(){var Y=this.pastInput(),F=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+"\n"+F+"^"},"showPosition"),test_match:(0,t.eW)(function(Y,F){var W,B,z;if(this.options.backtrack_lexer&&(z={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&&(z.yylloc.range=this.yylloc.range.slice(0))),(B=Y[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],W=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var _ in z)this[_]=z[_];return!1}return!1},"test_match"),next:(0,t.eW)(function(){if(this.done)return this.EOF;var Y,F,W,B;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),_=0;_<z.length;_++)if((W=this._input.match(this.rules[z[_]]))&&(!F||W[0].length>F[0].length)){if(F=W,B=_,this.options.backtrack_lexer){if(!1!==(Y=this.test_match(W,z[_])))return Y;if(this._backtrack){F=!1;continue}return!1}if(!this.options.flex)break}return F?!1!==(Y=this.test_match(F,z[B]))&&Y:""===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,t.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,t.eW)(function(F){this.conditionStack.push(F)},"begin"),popState:(0,t.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,t.eW)(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,t.eW)(function(F){return(F=this.conditionStack.length-1-Math.abs(F||0))>=0?this.conditionStack[F]:"INITIAL"},"topState"),pushState:(0,t.eW)(function(F){this.begin(F)},"pushState"),stateStackSize:(0,t.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,t.eW)(function(F,W,B,z){switch(B){case 0:return F.getLogger().trace("Found comment",W.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:F.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return F.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:F.getLogger().trace("end icon"),this.popState();break;case 10:return F.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return F.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return F.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return F.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:F.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return F.getLogger().trace("description:",W.yytext),"NODE_DESCR";case 27:return this.popState(),F.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),F.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),F.getLogger().trace("node end ...",W.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),F.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),F.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return F.getLogger().trace("Long description:",W.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}}}}();function xt(){this.yy={}}return Mt.lexer=Qt,(0,t.eW)(xt,"Parser"),xt.prototype=Mt,Mt.Parser=xt,new xt}();l.parser=l;var p=l,g=[],T=0,v={},E=(0,t.eW)(()=>{g=[],T=0,v={}},"clear"),L=(0,t.eW)(function(A){for(let S=g.length-1;S>=0;S--)if(g[S].level<A)return g[S];return null},"getParent"),w=(0,t.eW)(()=>g.length>0?g[0]:null,"getMindmap"),I=(0,t.eW)((A,S,O,N)=>{t.cM.info("addNode",A,S,O,N);const P=(0,t.nV)();let M=P.mindmap?.padding??t.vZ.mindmap.padding;switch(N){case R.ROUNDED_RECT:case R.RECT:case R.HEXAGON:M*=2}const K={id:T++,nodeId:(0,t.oO)(S,P),level:A,descr:(0,t.oO)(O,P),type:N,children:[],width:P.mindmap?.maxNodeWidth??t.vZ.mindmap.maxNodeWidth,padding:M},V=L(A);if(V)V.children.push(K),g.push(K);else{if(0!==g.length)throw new Error('There can be only one root. No parent could be found for ("'+K.descr+'")');g.push(K)}},"addNode"),R={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},G={clear:E,addNode:I,getMindmap:w,nodeType:R,getType:(0,t.eW)((A,S)=>{switch(t.cM.debug("In get type",A,S),A){case"[":return R.RECT;case"(":return")"===S?R.ROUNDED_RECT:R.CLOUD;case"((":return R.CIRCLE;case")":return R.CLOUD;case"))":return R.BANG;case"{{":return R.HEXAGON;default:return R.DEFAULT}},"getType"),setElementForId:(0,t.eW)((A,S)=>{v[A]=S},"setElementForId"),decorateNode:(0,t.eW)(A=>{if(!A)return;const S=(0,t.nV)(),O=g[g.length-1];A.icon&&(O.icon=(0,t.oO)(A.icon,S)),A.class&&(O.class=(0,t.oO)(A.class,S))},"decorateNode"),type2Str:(0,t.eW)(A=>{switch(A){case R.DEFAULT:return"no-border";case R.RECT:return"rect";case R.ROUNDED_RECT:return"rounded-rect";case R.CIRCLE:return"circle";case R.CLOUD:return"cloud";case R.BANG:return"bang";case R.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,t.eW)(()=>t.cM,"getLogger"),getElementById:(0,t.eW)(A=>v[A],"getElementById")},H=(0,t.eW)(function(A,S,O,N){S.append("path").attr("id","node-"+O.id).attr("class","node-bkg node-"+A.type2Str(O.type)).attr("d",`M0 ${O.height-5} v${10-O.height} q0,-5 5,-5 h${O.width-10} q5,0 5,5 v${O.height-5} H0 Z`),S.append("line").attr("class","node-line-"+N).attr("x1",0).attr("y1",O.height).attr("x2",O.width).attr("y2",O.height)},"defaultBkg"),J=(0,t.eW)(function(A,S,O){S.append("rect").attr("id","node-"+O.id).attr("class","node-bkg node-"+A.type2Str(O.type)).attr("height",O.height).attr("width",O.width)},"rectBkg"),q=(0,t.eW)(function(A,S,O){const N=O.width,P=O.height,M=.15*N,K=.25*N,V=.35*N,et=.2*N;S.append("path").attr("id","node-"+O.id).attr("class","node-bkg node-"+A.type2Str(O.type)).attr("d",`M0 0 a${M},${M} 0 0,1 ${.25*N},${-1*N*.1}\n a${V},${V} 1 0,1 ${.4*N},${-1*N*.1}\n a${K},${K} 1 0,1 ${.35*N},${1*N*.2}\n\n a${M},${M} 1 0,1 ${.15*N},${1*P*.35}\n a${et},${et} 1 0,1 ${-1*N*.15},${1*P*.65}\n\n a${K},${M} 1 0,1 ${-1*N*.25},${.15*N}\n a${V},${V} 1 0,1 ${-1*N*.5},0\n a${M},${M} 1 0,1 ${-1*N*.25},${-1*N*.15}\n\n a${M},${M} 1 0,1 ${-1*N*.1},${-1*P*.35}\n a${et},${et} 1 0,1 ${.1*N},${-1*P*.65}\n\n H0 V0 Z`)},"cloudBkg"),U=(0,t.eW)(function(A,S,O){const N=O.width,P=O.height,M=.15*N;S.append("path").attr("id","node-"+O.id).attr("class","node-bkg node-"+A.type2Str(O.type)).attr("d",`M0 0 a${M},${M} 1 0,0 ${.25*N},${-1*P*.1}\n a${M},${M} 1 0,0 ${.25*N},0\n a${M},${M} 1 0,0 ${.25*N},0\n a${M},${M} 1 0,0 ${.25*N},${1*P*.1}\n\n a${M},${M} 1 0,0 ${.15*N},${1*P*.33}\n a${.8*M},${.8*M} 1 0,0 0,${1*P*.34}\n a${M},${M} 1 0,0 ${-1*N*.15},${1*P*.33}\n\n a${M},${M} 1 0,0 ${-1*N*.25},${.15*P}\n a${M},${M} 1 0,0 ${-1*N*.25},0\n a${M},${M} 1 0,0 ${-1*N*.25},0\n a${M},${M} 1 0,0 ${-1*N*.25},${-1*P*.15}\n\n a${M},${M} 1 0,0 ${-1*N*.1},${-1*P*.33}\n a${.8*M},${.8*M} 1 0,0 0,${-1*P*.34}\n a${M},${M} 1 0,0 ${.1*N},${-1*P*.33}\n\n H0 V0 Z`)},"bangBkg"),$=(0,t.eW)(function(A,S,O){S.append("circle").attr("id","node-"+O.id).attr("class","node-bkg node-"+A.type2Str(O.type)).attr("r",O.width/2)},"circleBkg");function Z(A,S,O,N,P){return A.insert("polygon",":first-child").attr("points",N.map(function(M){return M.x+","+M.y}).join(" ")).attr("transform","translate("+(P.width-S)/2+", "+O+")")}(0,t.eW)(Z,"insertPolygonShape");var j=(0,t.eW)(function(A,S,O){const N=O.height,M=N/4,K=O.width-O.padding+2*M;Z(S,K,N,[{x:M,y:0},{x:K-M,y:0},{x:K,y:-N/2},{x:K-M,y:-N},{x:M,y:-N},{x:0,y:-N/2}],O)},"hexagonBkg"),ot=(0,t.eW)(function(A,S,O){S.append("rect").attr("id","node-"+O.id).attr("class","node-bkg node-"+A.type2Str(O.type)).attr("height",O.height).attr("rx",O.padding).attr("ry",O.padding).attr("width",O.width)},"roundedRectBkg"),tt=(0,t.eW)(function(){var A=(0,D.Z)(function*(S,O,N,P,M){const K=M.htmlLabels,V=P%11,et=O.append("g");N.section=V;let yt="section-"+V;V<0&&(yt+=" section-root"),et.attr("class",(N.class?N.class+" ":"")+"mindmap-node "+yt);const st=et.append("g"),lt=et.append("g"),it=N.descr.replace(/(<br\/*>)/g,"\n");yield(0,c.rw)(lt,it,{useHtmlLabels:K,width:N.width,classes:"mindmap-node-label"},M),K||lt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const Lt=lt.node().getBBox(),[Rt]=(0,a.VG)(M.fontSize);if(N.height=Lt.height+1.1*Rt*.5+N.padding,N.width=Lt.width+2*N.padding,N.icon)if(N.type===S.nodeType.CIRCLE)N.height+=50,N.width+=50,et.append("foreignObject").attr("height","50px").attr("width",N.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+V+" "+N.icon),lt.attr("transform","translate("+N.width/2+", "+(N.height/2-1.5*N.padding)+")");else{N.width+=50;const pt=N.height;N.height=Math.max(pt,60);const ut=Math.abs(N.height-pt);et.append("foreignObject").attr("width","60px").attr("height",N.height).attr("style","text-align: center;margin-top:"+ut/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+V+" "+N.icon),lt.attr("transform","translate("+(25+N.width/2)+", "+(ut/2+N.padding/2)+")")}else if(K){const pt=(N.width-Lt.width)/2,ut=(N.height-Lt.height)/2;lt.attr("transform","translate("+pt+", "+ut+")")}else{const pt=N.width/2,ut=N.padding/2;lt.attr("transform","translate("+pt+", "+ut+")")}switch(N.type){case S.nodeType.DEFAULT:H(S,st,N,V);break;case S.nodeType.ROUNDED_RECT:ot(S,st,N,V);break;case S.nodeType.RECT:J(S,st,N,V);break;case S.nodeType.CIRCLE:st.attr("transform","translate("+N.width/2+", "+ +N.height/2+")"),$(S,st,N,V);break;case S.nodeType.CLOUD:q(S,st,N,V);break;case S.nodeType.BANG:U(S,st,N,V);break;case S.nodeType.HEXAGON:j(S,st,N,V)}return S.setElementForId(N.id,et),N.height});return function(S,O,N,P,M){return A.apply(this,arguments)}}(),"drawNode"),at=(0,t.eW)(function(A,S){const O=A.getElementById(S.id),N=S.x||0,P=S.y||0;O.attr("transform","translate("+N+","+P+")")},"positionNode");function dt(A,S,O,N,P){return ht.apply(this,arguments)}function ht(){return(ht=(0,D.Z)(function*(A,S,O,N,P){yield tt(A,S,O,N,P),O.children&&(yield Promise.all(O.children.map((M,K)=>dt(A,S,M,N<0?K:N,P))))})).apply(this,arguments)}function gt(A,S){S.edges().map((O,N)=>{const P=O.data();if(O[0]._private.bodyBounds){const M=O[0]._private.rscratch;t.cM.trace("Edge: ",N,P),A.insert("path").attr("d",`M ${M.startX},${M.startY} L ${M.midX},${M.midY} L${M.endX},${M.endY} `).attr("class","edge section-edge-"+P.section+" edge-depth-"+P.depth)}})}function mt(A,S,O,N){S.add({group:"nodes",data:{id:A.id.toString(),labelText:A.descr,height:A.height,width:A.width,level:N,nodeId:A.id,padding:A.padding,type:A.type},position:{x:A.x,y:A.y}}),A.children&&A.children.forEach(P=>{mt(P,S,O,N+1),S.add({group:"edges",data:{id:`${A.id}_${P.id}`,source:A.id,target:P.id,depth:N,section:P.section}})})}function At(A,S){return new Promise(O=>{const N=(0,n.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),P=(0,i.Z)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),mt(A,P,S,0),P.nodes().forEach(function(M){M.layoutDimensions=()=>{const K=M.data();return{w:K.width,h:K.height}}}),P.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),P.ready(M=>{t.cM.info("Ready",M),O(P)})})}function Ct(A,S){S.nodes().map((O,N)=>{const P=O.data();P.x=O.position().x,P.y=O.position().y,at(A,P);const M=A.getElementById(P.nodeId);t.cM.info("Id:",N,"Position: (",O.position().x,", ",O.position().y,")",P),M.attr("transform",`translate(${O.position().x-P.width/2}, ${O.position().y-P.height/2})`),M.attr("attr",`apa-${N})`)})}i.Z.use(h),(0,t.eW)(dt,"drawNodes"),(0,t.eW)(gt,"drawEdges"),(0,t.eW)(mt,"addNodes"),(0,t.eW)(At,"layoutMindmap"),(0,t.eW)(Ct,"positionNodes");var Bt={draw:(0,t.eW)(function(){var A=(0,D.Z)(function*(S,O,N,P){t.cM.debug("Rendering mindmap diagram\n"+S);const M=P.db,K=M.getMindmap();if(!K)return;const V=(0,t.nV)();V.htmlLabels=!1;const et=(0,e.P)(O),yt=et.append("g");yt.attr("class","mindmap-edges");const st=et.append("g");st.attr("class","mindmap-nodes"),yield dt(M,st,K,-1,V);const lt=yield At(K,V);gt(yt,lt),Ct(M,lt),(0,t.j7)(void 0,et,V.mindmap?.padding??t.vZ.mindmap.padding,V.mindmap?.useMaxWidth??t.vZ.mindmap.useMaxWidth)});return function(S,O,N,P){return A.apply(this,arguments)}}(),"draw")},Vt=(0,t.eW)(A=>{let S="";for(let O=0;O<A.THEME_COLOR_LIMIT;O++)A["lineColor"+O]=A["lineColor"+O]||A["cScaleInv"+O],(0,u.Z)(A["lineColor"+O])?A["lineColor"+O]=(0,r.Z)(A["lineColor"+O],20):A["lineColor"+O]=(0,o.Z)(A["lineColor"+O],20);for(let O=0;O<A.THEME_COLOR_LIMIT;O++){const N=""+(17-3*O);S+=`\n .section-${O-1} rect, .section-${O-1} path, .section-${O-1} circle, .section-${O-1} polygon, .section-${O-1} path {\n fill: ${A["cScale"+O]};\n }\n .section-${O-1} text {\n fill: ${A["cScaleLabel"+O]};\n }\n .node-icon-${O-1} {\n font-size: 40px;\n color: ${A["cScaleLabel"+O]};\n }\n .section-edge-${O-1}{\n stroke: ${A["cScale"+O]};\n }\n .edge-depth-${O-1}{\n stroke-width: ${N};\n }\n .section-${O-1} line {\n stroke: ${A["cScaleInv"+O]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return S},"genSections"),jt={db:G,renderer:Bt,parser:p,styles:(0,t.eW)(A=>`\n .edge {\n stroke-width: 3;\n }\n ${Vt(A)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${A.git0};\n }\n .section-root text {\n fill: ${A.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles")}}}]);