4 lines
76 KiB
JavaScript
4 lines
76 KiB
JavaScript
/*! third party licenses: js/vendor.LICENSE.txt */
|
|
import{g as $}from"./vendor-BeFBwUwf.chunk.mjs";var k={exports:{}},W={exports:{}},V={exports:{}},tt=V.exports,Z;function et(){return Z||(Z=1,function(H,j){(function(I,C){H.exports=C()})(tt,function(){return function(I){var C={};function T(o){if(C[o])return C[o].exports;var e=C[o]={i:o,l:!1,exports:{}};return I[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=I,T.c=C,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(I,C,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,I.exports=o},function(I,C,T){var o=T(2),e=T(8),t=T(9);function i(a,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=a,this.target=n}i.prototype=Object.create(o.prototype);for(var h in o)i[h]=o[h];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(a,n){for(var d=this.getOtherEnd(a),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var a=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},I.exports=i},function(I,C,T){function o(e){this.vGraphObject=e}I.exports=o},function(I,C,T){var o=T(2),e=T(10),t=T(13),i=T(0),h=T(16),a=T(4);function n(r,g,l,p){l==null&&p==null&&(p=g),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,l!=null&&g!=null?this.rect=new t(g.x,g.y,l.width,l.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];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 a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new a(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,g){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=g.width,this.rect.height=g.height},n.prototype.setCenter=function(r,g){this.rect.x=r-this.rect.width/2,this.rect.y=g-this.rect.height/2},n.prototype.setLocation=function(r,g){this.rect.x=r,this.rect.y=g},n.prototype.moveBy=function(r,g){this.rect.x+=r,this.rect.y+=g},n.prototype.getEdgeListToNode=function(r){var g=[],l=this;return l.edges.forEach(function(p){if(p.target==r){if(p.source!=l)throw"Incorrect edge source!";g.push(p)}}),g},n.prototype.getEdgesBetween=function(r){var g=[],l=this;return l.edges.forEach(function(p){if(!(p.source==l||p.target==l))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&g.push(p)}),g},n.prototype.getNeighborsList=function(){var r=new Set,g=this;return g.edges.forEach(function(l){if(l.source==g)r.add(l.target);else{if(l.target!=g)throw"Incorrect incidency!";r.add(l.source)}}),r},n.prototype.withChildren=function(){var r=new Set,g,l;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),y=0;y<p.length;y++)g=p[y],l=g.withChildren(),l.forEach(function(f){r.add(f)});return r},n.prototype.getNoOfChildren=function(){var r=0,g;if(this.child==null)r=1;else for(var l=this.child.getNodes(),p=0;p<l.length;p++)g=l[p],r+=g.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?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,g,l=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+h.nextDouble()*(p-l)+l;var y=-i.INITIAL_WORLD_BOUNDARY,f=i.INITIAL_WORLD_BOUNDARY;g=i.WORLD_CENTER_Y+h.nextDouble()*(f-y)+y,this.rect.x=r,this.rect.y=g},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){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()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var g=r.getRight()-r.getLeft(),l=r.getBottom()-r.getTop();this.labelWidth>g&&(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var g=this.rect.x;g>i.WORLD_BOUNDARY?g=i.WORLD_BOUNDARY:g<-i.WORLD_BOUNDARY&&(g=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var p=new a(g,l),y=r.inverseTransformPoint(p);this.setLocation(y.x,y.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 this.owner==null?null:this.owner.getParent()},I.exports=n},function(I,C,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},I.exports=o},function(I,C,T){var o=T(2),e=T(10),t=T(0),i=T(6),h=T(3),a=T(1),n=T(13),d=T(12),r=T(11);function g(p,y,f){o.call(this,f),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,y!=null&&y instanceof i?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}g.prototype=Object.create(o.prototype);for(var l in o)g[l]=o[l];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(p,y,f){if(y==null&&f==null){var v=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var N=p;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(f)>-1))throw"Source or target not in graph!";if(!(y.owner==f.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=f.owner?null:(N.source=y,N.target=f,N.isInterGraph=!1,this.getEdges().push(N),y.edges.push(N),f!=y&&f.edges.push(N),N)}},g.prototype.remove=function(p){var y=p;if(p instanceof h){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var f=y.edges.slice(),v,N=f.length,A=0;A<N;A++)v=f[A],v.isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);var m=this.nodes.indexOf(y);if(m==-1)throw"Node not in owner node list!";this.nodes.splice(m,1)}else if(p instanceof a){var v=p;if(v==null)throw"Edge is null!";if(!(v.source!=null&&v.target!=null))throw"Source and/or target is null!";if(!(v.source.owner!=null&&v.target.owner!=null&&v.source.owner==this&&v.target.owner==this))throw"Source and/or target owner is invalid!";var s=v.source.edges.indexOf(v),u=v.target.edges.indexOf(v);if(!(s>-1&&u>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(s,1),v.target!=v.source&&v.target.edges.splice(u,1);var m=v.source.owner.getEdges().indexOf(v);if(m==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(m,1)}},g.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,y=e.MAX_VALUE,f,v,N,A=this.getNodes(),m=A.length,s=0;s<m;s++){var u=A[s];f=u.getTop(),v=u.getLeft(),p>f&&(p=f),y>v&&(y=v)}return p==e.MAX_VALUE?null:(A[0].getParent().paddingLeft!=null?N=A[0].getParent().paddingLeft:N=this.margin,this.left=y-N,this.top=p-N,new d(this.left,this.top))},g.prototype.updateBounds=function(p){for(var y=e.MAX_VALUE,f=-e.MAX_VALUE,v=e.MAX_VALUE,N=-e.MAX_VALUE,A,m,s,u,c,E=this.nodes,_=E.length,L=0;L<_;L++){var O=E[L];p&&O.child!=null&&O.updateBounds(),A=O.getLeft(),m=O.getRight(),s=O.getTop(),u=O.getBottom(),y>A&&(y=A),f<m&&(f=m),v>s&&(v=s),N<u&&(N=u)}var D=new n(y,v,f-y,N-v);y==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=D.x-c,this.right=D.x+D.width+c,this.top=D.y-c,this.bottom=D.y+D.height+c},g.calculateBounds=function(p){for(var y=e.MAX_VALUE,f=-e.MAX_VALUE,v=e.MAX_VALUE,N=-e.MAX_VALUE,A,m,s,u,c=p.length,E=0;E<c;E++){var _=p[E];A=_.getLeft(),m=_.getRight(),s=_.getTop(),u=_.getBottom(),y>A&&(y=A),f<m&&(f=m),v>s&&(v=s),N<u&&(N=u)}var L=new n(y,v,f-y,N-v);return L},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var p=0,y=this.nodes,f=y.length,v=0;v<f;v++){var N=y[v];p+=N.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new r,f=new Set,v=this.nodes[0],N,A,m=v.withChildren();for(m.forEach(function(L){y.push(L),f.add(L)});y.length!==0;){v=y.shift(),N=v.getEdges();for(var s=N.length,u=0;u<s;u++){var c=N[u];if(A=c.getOtherEndInGraph(v,this),A!=null&&!f.has(A)){var E=A.withChildren();E.forEach(function(L){y.push(L),f.add(L)})}}}if(this.isConnected=!1,f.size>=this.nodes.length){var _=0;f.forEach(function(L){L.owner==p&&_++}),_==this.nodes.length&&(this.isConnected=!0)}},I.exports=g},function(I,C,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),h=this.layout.newNode(null),a=this.add(i,h);return this.setRootGraph(a),this.rootGraph},t.prototype.add=function(i,h,a,n,d){if(a==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return i.parent=h,h.child=i,i}else{d=a,n=h,a=i;var r=n.getOwner(),g=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(g!=null&&g.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==g)return a.isInterGraph=!1,r.add(a,n,d);if(a.isInterGraph=!0,a.source=n,a.target=d,this.edges.indexOf(a)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(a),!(a.source!=null&&a.target!=null))throw"Edge source and/or target is null!";if(!(a.source.edges.indexOf(a)==-1&&a.target.edges.indexOf(a)==-1))throw"Edge already in source and/or target incidency list!";return a.source.edges.push(a),a.target.edges.push(a),a}},t.prototype.remove=function(i){if(i instanceof o){var h=i;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var a=[];a=a.concat(h.getEdges());for(var n,d=a.length,r=0;r<d;r++)n=a[r],h.remove(n);var g=[];g=g.concat(h.getNodes());var l;d=g.length;for(var r=0;r<d;r++)l=g[r],h.remove(l);h==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(h);this.graphs.splice(p,1),h.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],h=this.getGraphs(),a=h.length,n=0;n<a;n++)i=i.concat(h[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],h=this.getGraphs();h.length;for(var a=0;a<h.length;a++)i=i.concat(h[a].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,h){if(!(i!=null&&h!=null))throw"assert failed";if(i==h)return!0;var a=i.getOwner(),n;do{if(n=a.getParent(),n==null)break;if(n==h)return!0;if(a=n.getOwner(),a==null)break}while(!0);a=h.getOwner();do{if(n=a.getParent(),n==null)break;if(n==i)return!0;if(a=n.getOwner(),a==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,h,a,n,d,r=this.getAllEdges(),g=r.length,l=0;l<g;l++){if(i=r[l],h=i.source,a=i.target,i.lca=null,i.sourceInLca=h,i.targetInLca=a,h==a){i.lca=h.getOwner();continue}for(n=h.getOwner();i.lca==null;){for(i.targetInLca=a,d=a.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,h){if(i==h)return i.getOwner();var a=i.getOwner();do{if(a==null)break;var n=h.getOwner();do{if(n==null)break;if(n==a)return n;n=n.getParent().getOwner()}while(!0);a=a.getParent().getOwner()}while(!0);return a},t.prototype.calcInclusionTreeDepths=function(i,h){i==null&&h==null&&(i=this.rootGraph,h=1);for(var a,n=i.getNodes(),d=n.length,r=0;r<d;r++)a=n[r],a.inclusionTreeDepth=h,a.child!=null&&this.calcInclusionTreeDepths(a.child,h+1)},t.prototype.includesInvalidEdge=function(){for(var i,h=this.edges.length,a=0;a<h;a++)if(i=this.edges[a],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},I.exports=t},function(I,C,T){var o=T(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,I.exports=e},function(I,C,T){var o=T(12);function e(){}e.calcSeparationAmount=function(t,i,h,a){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),h[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),h[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?h[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(h[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?h[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(h[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*h[0],g=h[1]/d;h[0]<g?g=h[0]:r=h[1],h[0]=-1*n[0]*(g/2+a),h[1]=-1*n[1]*(r/2+a)},e.decideDirectionsForOverlappingNodes=function(t,i,h){t.getCenterX()<i.getCenterX()?h[0]=-1:h[0]=1,t.getCenterY()<i.getCenterY()?h[1]=-1:h[1]=1},e.getIntersection2=function(t,i,h){var a=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return h[0]=a,h[1]=n,h[2]=d,h[3]=r,!0;var g=t.getX(),l=t.getY(),p=t.getRight(),y=t.getX(),f=t.getBottom(),v=t.getRight(),N=t.getWidthHalf(),A=t.getHeightHalf(),m=i.getX(),s=i.getY(),u=i.getRight(),c=i.getX(),E=i.getBottom(),_=i.getRight(),L=i.getWidthHalf(),O=i.getHeightHalf(),D=!1,w=!1;if(a===d){if(n>r)return h[0]=a,h[1]=l,h[2]=d,h[3]=E,!1;if(n<r)return h[0]=a,h[1]=f,h[2]=d,h[3]=s,!1}else if(n===r){if(a>d)return h[0]=g,h[1]=n,h[2]=u,h[3]=r,!1;if(a<d)return h[0]=p,h[1]=n,h[2]=m,h[3]=r,!1}else{var x=t.height/t.width,F=i.height/i.width,M=(r-n)/(d-a),R=void 0,G=void 0,S=void 0,P=void 0,b=void 0,U=void 0;if(-x===M?a>d?(h[0]=y,h[1]=f,D=!0):(h[0]=p,h[1]=l,D=!0):x===M&&(a>d?(h[0]=g,h[1]=l,D=!0):(h[0]=v,h[1]=f,D=!0)),-F===M?d>a?(h[2]=c,h[3]=E,w=!0):(h[2]=u,h[3]=s,w=!0):F===M&&(d>a?(h[2]=m,h[3]=s,w=!0):(h[2]=_,h[3]=E,w=!0)),D&&w)return!1;if(a>d?n>r?(R=this.getCardinalDirection(x,M,4),G=this.getCardinalDirection(F,M,2)):(R=this.getCardinalDirection(-x,M,3),G=this.getCardinalDirection(-F,M,1)):n>r?(R=this.getCardinalDirection(-x,M,1),G=this.getCardinalDirection(-F,M,3)):(R=this.getCardinalDirection(x,M,2),G=this.getCardinalDirection(F,M,4)),!D)switch(R){case 1:P=l,S=a+-A/M,h[0]=S,h[1]=P;break;case 2:S=v,P=n+N*M,h[0]=S,h[1]=P;break;case 3:P=f,S=a+A/M,h[0]=S,h[1]=P;break;case 4:S=y,P=n+-N*M,h[0]=S,h[1]=P;break}if(!w)switch(G){case 1:U=s,b=d+-O/M,h[2]=b,h[3]=U;break;case 2:b=_,U=r+L*M,h[2]=b,h[3]=U;break;case 3:U=E,b=d+O/M,h[2]=b,h[3]=U;break;case 4:b=c,U=r+-L*M,h[2]=b,h[3]=U;break}}return!1},e.getCardinalDirection=function(t,i,h){return t>i?h:1+h%4},e.getIntersection=function(t,i,h,a){if(a==null)return this.getIntersection2(t,i,h);var n=t.x,d=t.y,r=i.x,g=i.y,l=h.x,p=h.y,y=a.x,f=a.y,v=void 0,N=void 0,A=void 0,m=void 0,s=void 0,u=void 0,c=void 0,E=void 0,_=void 0;return A=g-d,s=n-r,c=r*d-n*g,m=f-p,u=l-y,E=y*p-l*f,_=A*u-m*s,_===0?null:(v=(s*E-u*c)/_,N=(m*c-A*E)/_,new o(v,N))},e.angleOfVector=function(t,i,h,a){var n=void 0;return t!==h?(n=Math.atan((a-i)/(h-t)),h<t?n+=Math.PI:a<i&&(n+=this.TWO_PI)):a<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,h,a){var n=t.x,d=t.y,r=i.x,g=i.y,l=h.x,p=h.y,y=a.x,f=a.y,v=(r-n)*(f-p)-(y-l)*(g-d);if(v===0)return!1;var N=((f-p)*(y-n)+(l-y)*(f-d))/v,A=((d-g)*(y-n)+(r-n)*(f-d))/v;return 0<N&&N<1&&0<A&&A<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,I.exports=e},function(I,C,T){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},I.exports=o},function(I,C,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,I.exports=o},function(I,C,T){var o=function(){function n(d,r){for(var g=0;g<r.length;g++){var l=r[g];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(d,l.key,l)}}return function(d,r,g){return r&&n(d.prototype,r),g&&n(d,g),d}}();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(n){return{value:n,next:null,prev:null}},i=function(n,d,r,g){return n!==null?n.next=d:g.head=d,r!==null?r.prev=d:g.tail=d,d.prev=n,d.next=r,g.length++,d},h=function(n,d){var r=n.prev,g=n.next;return r!==null?r.next=g:d.head=g,g!==null?g.prev=r:d.tail=r,n.prev=n.next=null,d.length--,n},a=function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(g){return r.push(g)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(d,r){return i(r.prev,t(d),r,this)}},{key:"insertAfter",value:function(d,r){return i(r,t(d),r.next,this)}},{key:"insertNodeBefore",value:function(d,r){return i(r.prev,d,r,this)}},{key:"insertNodeAfter",value:function(d,r){return i(r,d,r.next,this)}},{key:"push",value:function(d){return i(this.tail,t(d),null,this)}},{key:"unshift",value:function(d){return i(null,t(d),this.head,this)}},{key:"remove",value:function(d){return h(d,this)}},{key:"pop",value:function(){return h(this.tail,this).value}},{key:"popNode",value:function(){return h(this.tail,this)}},{key:"shift",value:function(){return h(this.head,this).value}},{key:"shiftNode",value:function(){return h(this.head,this)}},{key:"get_object_at",value:function(d){if(d<=this.length()){for(var r=1,g=this.head;r<d;)g=g.next,r++;return g.value}}},{key:"set_object_at",value:function(d,r){if(d<=this.length()){for(var g=1,l=this.head;g<d;)l=l.next,g++;l.value=r}}}]),n}();I.exports=a},function(I,C,T){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},I.exports=o},function(I,C,T){function o(e,t,i,h){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&h!=null&&(this.x=e,this.y=t,this.width=i,this.height=h)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},I.exports=o},function(I,C,T){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},I.exports=e},function(I,C,T){function o(l){if(Array.isArray(l)){for(var p=0,y=Array(l.length);p<l.length;p++)y[p]=l[p];return y}else return Array.from(l)}var e=T(0),t=T(6),i=T(3),h=T(1),a=T(5),n=T(4),d=T(17),r=T(27);function g(l){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}g.RANDOM_SEED=1,g.prototype=Object.create(r.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var l=new t(this);return this.graphManager=l,l},g.prototype.newGraph=function(l){return new a(null,this.graphManager,l)},g.prototype.newNode=function(l){return new i(this.graphManager,l)},g.prototype.newEdge=function(l){return new h(null,null,l)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),e.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l=this.graphManager.getAllEdges(),p=0;p<l.length;p++)l[p];for(var y=this.graphManager.getRoot().getNodes(),p=0;p<y.length;p++)y[p];this.update(this.graphManager.getRoot())}},g.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof i){var p=l;if(p.getChild()!=null)for(var y=p.getChild().getNodes(),f=0;f<y.length;f++)update(y[f]);if(p.vGraphObject!=null){var v=p.vGraphObject;v.update(p)}}else if(l instanceof h){var N=l;if(N.vGraphObject!=null){var A=N.vGraphObject;A.update(N)}}else if(l instanceof a){var m=l;if(m.vGraphObject!=null){var s=m.vGraphObject;s.update(m)}}},g.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},g.prototype.transform=function(l){if(l==null)this.transform(new n(0,0));else{var p=new d,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){p.setWorldOrgX(l.x),p.setWorldOrgY(l.y),p.setDeviceOrgX(y.x),p.setDeviceOrgY(y.y);for(var f=this.getAllNodes(),v,N=0;N<f.length;N++)v=f[N],v.transform(p)}}},g.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,y,f=l.getNodes(),v=0;v<f.length;v++)p=f[v],y=p.getChild(),y==null||y.getNodes().length==0?p.scatter():(this.positionNodesRandomly(y),p.updateBounds())},g.prototype.getFlatForest=function(){for(var l=[],p=!0,y=this.graphManager.getRoot().getNodes(),f=!0,v=0;v<y.length;v++)y[v].getChild()!=null&&(f=!1);if(!f)return l;var N=new Set,A=[],m=new Map,s=[];for(s=s.concat(y);s.length>0&&p;){for(A.push(s[0]);A.length>0&&p;){var u=A[0];A.splice(0,1),N.add(u);for(var c=u.getEdges(),v=0;v<c.length;v++){var E=c[v].getOtherEnd(u);if(m.get(u)!=E)if(!N.has(E))A.push(E),m.set(E,u);else{p=!1;break}}}if(!p)l=[];else{var _=[].concat(o(N));l.push(_);for(var v=0;v<_.length;v++){var L=_[v],O=s.indexOf(L);O>-1&&s.splice(O,1)}N=new Set,m=new Map}}return l},g.prototype.createDummyNodesForBendpoints=function(l){for(var p=[],y=l.source,f=this.graphManager.calcLowestCommonAncestor(l.source,l.target),v=0;v<l.bendpoints.length;v++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),f.add(N);var A=this.newEdge(null);this.graphManager.add(A,y,N),p.add(N),y=N}var A=this.newEdge(null);return this.graphManager.add(A,y,l.target),this.edgeToDummyNodes.set(l,p),l.isInterGraph()?this.graphManager.remove(l):f.remove(l),p},g.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(o(this.edgeToDummyNodes.keys())).concat(l);for(var p=0;p<l.length;p++){var y=l[p];if(y.bendpoints.length>0){for(var f=this.edgeToDummyNodes.get(y),v=0;v<f.length;v++){var N=f[v],A=new n(N.getCenterX(),N.getCenterY()),m=y.bendpoints.get(v);m.x=A.x,m.y=A.y,N.getOwner().remove(N)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(l,p,y,f){if(y!=null&&f!=null){var v=p;if(l<=50){var N=p/y;v-=(p-N)/50*(50-l)}else{var A=p*f;v+=(A-p)/50*(l-50)}return v}else{var m,s;return l<=50?(m=9*p/500,s=p/10):(m=9*p/50,s=-8*p),m*l+s}},g.findCenterOfTree=function(l){var p=[];p=p.concat(l);var y=[],f=new Map,v=!1,N=null;(p.length==1||p.length==2)&&(v=!0,N=p[0]);for(var A=0;A<p.length;A++){var m=p[A],s=m.getNeighborsList().size;f.set(m,m.getNeighborsList().size),s==1&&y.push(m)}var u=[];for(u=u.concat(y);!v;){var c=[];c=c.concat(u),u=[];for(var A=0;A<p.length;A++){var m=p[A],E=p.indexOf(m);E>=0&&p.splice(E,1);var _=m.getNeighborsList();_.forEach(function(D){if(y.indexOf(D)<0){var w=f.get(D),x=w-1;x==1&&u.push(D),f.set(D,x)}})}y=y.concat(u),(p.length==1||p.length==2)&&(v=!0,N=p[0])}return N},g.prototype.setGraphManager=function(l){this.graphManager=l},I.exports=g},function(I,C,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},I.exports=o},function(I,C,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,h=this.lworldExtX;return h!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/h),i},e.prototype.transformY=function(t){var i=0,h=this.lworldExtY;return h!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/h),i},e.prototype.inverseTransformX=function(t){var i=0,h=this.ldeviceExtX;return h!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/h),i},e.prototype.inverseTransformY=function(t){var i=0,h=this.ldeviceExtY;return h!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/h),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},I.exports=e},function(I,C,T){function o(r){if(Array.isArray(r)){for(var g=0,l=Array(r.length);g<r.length;g++)l[g]=r[g];return l}else return Array.from(r)}var e=T(15),t=T(7),i=T(0),h=T(8),a=T(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,g,l,p,y,f,v=this.getGraphManager().getAllEdges(),N=0;N<v.length;N++)r=v[N],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(l=r.getSource(),p=r.getTarget(),y=r.getSourceInLca().getEstimatedSize(),f=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=y+f-2*i.SIMPLE_NODE_SIZE),g=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*g))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),g,l=0;l<r.length;l++)g=r[l],this.calcSpringForce(g,g.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,p,y,f,v=this.getAllNodes(),N;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),N=new Set,l=0;l<v.length;l++)y=v[l],this.calculateRepulsionForceOfANode(y,N,r,g),N.add(y);else for(l=0;l<v.length;l++)for(y=v[l],p=l+1;p<v.length;p++)f=v[p],y.getOwner()==f.getOwner()&&this.calcRepulsionForce(y,f)},n.prototype.calcGravitationalForces=function(){for(var r,g=this.getAllNodesToApplyGravitation(),l=0;l<g.length;l++)r=g[l],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),g,l=0;l<r.length;l++)g=r[l],g.move()},n.prototype.calcSpringForce=function(r,g){var l=r.getSource(),p=r.getTarget(),y,f,v,N;if(this.uniformLeafNodeSizes&&l.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;y=r.getLength(),y!=0&&(f=this.springConstant*(y-g),v=f*(r.lengthX/y),N=f*(r.lengthY/y),l.springForceX+=v,l.springForceY+=N,p.springForceX-=v,p.springForceY-=N)},n.prototype.calcRepulsionForce=function(r,g){var l=r.getRect(),p=g.getRect(),y=new Array(2),f=new Array(4),v,N,A,m,s,u,c;if(l.intersects(p)){h.calcSeparationAmount(l,p,y,t.DEFAULT_EDGE_LENGTH/2),u=2*y[0],c=2*y[1];var E=r.noOfChildren*g.noOfChildren/(r.noOfChildren+g.noOfChildren);r.repulsionForceX-=E*u,r.repulsionForceY-=E*c,g.repulsionForceX+=E*u,g.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&g.getChild()==null?(v=p.getCenterX()-l.getCenterX(),N=p.getCenterY()-l.getCenterY()):(h.getIntersection(l,p,f),v=f[2]-f[0],N=f[3]-f[1]),Math.abs(v)<t.MIN_REPULSION_DIST&&(v=a.sign(v)*t.MIN_REPULSION_DIST),Math.abs(N)<t.MIN_REPULSION_DIST&&(N=a.sign(N)*t.MIN_REPULSION_DIST),A=v*v+N*N,m=Math.sqrt(A),s=this.repulsionConstant*r.noOfChildren*g.noOfChildren/A,u=s*v/m,c=s*N/m,r.repulsionForceX-=u,r.repulsionForceY-=c,g.repulsionForceX+=u,g.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var g,l,p,y,f,v,N,A;g=r.getOwner(),l=(g.getRight()+g.getLeft())/2,p=(g.getTop()+g.getBottom())/2,y=r.getCenterX()-l,f=r.getCenterY()-p,v=Math.abs(y)+r.getWidth()/2,N=Math.abs(f)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(A=g.getEstimatedSize()*this.gravityRangeFactor,(v>A||N>A)&&(r.gravitationForceX=-this.gravityConstant*y,r.gravitationForceY=-this.gravityConstant*f)):(A=g.getEstimatedSize()*this.compoundGravityRangeFactor,(v>A||N>A)&&(r.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*f*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,g=!1;return this.totalIterations>this.maxIterations/3&&(g=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||g},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,g=this.graphManager.getAllNodes(),l=0;l<g.length;l++)r=g[l],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var g=0,l=0;g=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(g),y=0;y<g;y++)p[y]=new Array(l);for(var y=0;y<g;y++)for(var f=0;f<l;f++)p[y][f]=new Array;return p},n.prototype.addNodeToGrid=function(r,g,l){var p=0,y=0,f=0,v=0;p=parseInt(Math.floor((r.getRect().x-g)/this.repulsionRange)),y=parseInt(Math.floor((r.getRect().width+r.getRect().x-g)/this.repulsionRange)),f=parseInt(Math.floor((r.getRect().y-l)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().height+r.getRect().y-l)/this.repulsionRange));for(var N=p;N<=y;N++)for(var A=f;A<=v;A++)this.grid[N][A].push(r),r.setGridCoordinates(p,y,f,v)},n.prototype.updateGrid=function(){var r,g,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<l.length;r++)g=l[r],this.addNodeToGrid(g,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,g,l,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&l||p){var y=new Set;r.surrounding=new Array;for(var f,v=this.grid,N=r.startX-1;N<r.finishX+2;N++)for(var A=r.startY-1;A<r.finishY+2;A++)if(!(N<0||A<0||N>=v.length||A>=v[0].length)){for(var m=0;m<v[N][A].length;m++)if(f=v[N][A][m],!(r.getOwner()!=f.getOwner()||r==f)&&!g.has(f)&&!y.has(f)){var s=Math.abs(r.getCenterX()-f.getCenterX())-(r.getWidth()/2+f.getWidth()/2),u=Math.abs(r.getCenterY()-f.getCenterY())-(r.getHeight()/2+f.getHeight()/2);s<=this.repulsionRange&&u<=this.repulsionRange&&y.add(f)}}r.surrounding=[].concat(o(y))}for(N=0;N<r.surrounding.length;N++)this.calcRepulsionForce(r,r.surrounding[N])},n.prototype.calcRepulsionRange=function(){return 0},I.exports=n},function(I,C,T){var o=T(1),e=T(7);function t(h,a,n){o.call(this,h,a,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];I.exports=t},function(I,C,T){var o=T(3);function e(i,h,a,n){o.call(this,i,h,a,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=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,h,a,n){this.startX=i,this.finishX=h,this.startY=a,this.finishY=n},I.exports=e},function(I,C,T){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},I.exports=o},function(I,C,T){var o=T(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var h=o.createID(t);this.contains(h)||(this.map[h]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},I.exports=e},function(I,C,T){var o=T(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),h=i.length,a=0;a<h;a++)t.push(this.set[i[a]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,h=0;h<i;h++){var a=t[h];this.add(a)}},I.exports=e},function(I,C,T){var o=function(){function h(a,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}return function(a,n,d){return n&&h(a.prototype,n),d&&h(a,d),a}}();function e(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}var t=T(11),i=function(){function h(a,n){e(this,h),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;a instanceof t?d=a.size():d=a.length,this._quicksort(a,0,d-1)}return o(h,[{key:"_quicksort",value:function(a,n,d){if(n<d){var r=this._partition(a,n,d);this._quicksort(a,n,r),this._quicksort(a,r+1,d)}}},{key:"_partition",value:function(a,n,d){for(var r=this._get(a,n),g=n,l=d;;){for(;this.compareFunction(r,this._get(a,l));)l--;for(;this.compareFunction(this._get(a,g),r);)g++;if(g<l)this._swap(a,g,l),g++,l--;else return l}}},{key:"_get",value:function(a,n){return a instanceof t?a.get_object_at(n):a[n]}},{key:"_set",value:function(a,n,d){a instanceof t?a.set_object_at(n,d):a[n]=d}},{key:"_swap",value:function(a,n,d){var r=this._get(a,n);this._set(a,n,this._get(a,d)),this._set(a,d,r)}},{key:"_defaultCompareFunction",value:function(a,n){return n>a}}]),h}();I.exports=i},function(I,C,T){var o=function(){function i(h,a){for(var n=0;n<a.length;n++){var d=a[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,a,n){return a&&i(h.prototype,a),n&&i(h,n),h}}();function e(i,h){if(!(i instanceof h))throw new TypeError("Cannot call a class as a function")}var t=function(){function i(h,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=h,this.sequence2=a,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=h.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.grid[g]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[g][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 y=0;y<this.jMax;y++)this.tracebackGrid[p][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{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 a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var d=1;d<this.jMax;d++){var r=void 0;this.sequence1[n-1]===this.sequence2[d-1]?r=this.grid[n-1][d-1]+this.match_score:r=this.grid[n-1][d-1]+this.mismatch_penalty;var g=this.grid[n-1][d]+this.gap_penalty,l=this.grid[n][d-1]+this.gap_penalty,p=[r,g,l],y=this.arrayAllMaxIndexes(p);this.grid[n][d]=p[y[0]],this.tracebackGrid[n][d]=[y.includes(0),y.includes(1),y.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 a=h[0],n=this.tracebackGrid[a.pos[0]][a.pos[1]];n[0]&&h.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),n[1]&&h.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2}),n[2]&&h.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),a.pos[0]===0&&a.pos[1]===0&&this.alignments.push({sequence1:a.seq1,sequence2:a.seq2}),h.shift()}return this.alignments}},{key:"getAllIndexes",value:function(h,a){for(var n=[],d=-1;(d=h.indexOf(a,d+1))!==-1;)n.push(d);return n}},{key:"arrayAllMaxIndexes",value:function(h){return this.getAllIndexes(h,Math.max.apply(null,h))}}]),i}();I.exports=t},function(I,C,T){var o=function(){};o.FDLayout=T(18),o.FDLayoutConstants=T(7),o.FDLayoutEdge=T(19),o.FDLayoutNode=T(20),o.DimensionD=T(21),o.HashMap=T(22),o.HashSet=T(23),o.IGeometry=T(8),o.IMath=T(9),o.Integer=T(10),o.Point=T(12),o.PointD=T(4),o.RandomSeed=T(16),o.RectangleD=T(13),o.Transform=T(17),o.UniqueIDGeneretor=T(14),o.Quicksort=T(24),o.LinkedList=T(11),o.LGraphObject=T(2),o.LGraph=T(5),o.LEdge=T(1),o.LGraphManager=T(6),o.LNode=T(3),o.Layout=T(15),o.LayoutConstants=T(0),o.NeedlemanWunsch=T(25),I.exports=o},function(I,C,T){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var h=this.listeners.length;h>=0;h--){var a=this.listeners[h];a.event===t&&a.callback===i&&this.listeners.splice(h,1)}},e.emit=function(t,i){for(var h=0;h<this.listeners.length;h++){var a=this.listeners[h];t===a.event&&a.callback(i)}},I.exports=o}])})}(V)),V.exports}var it=W.exports,Q;function rt(){return Q||(Q=1,function(H,j){(function(I,C){H.exports=C(et())})(it,function(I){return function(C){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return C[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=C,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)}([function(C,T){C.exports=I},function(C,T,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,C.exports=t},function(C,T,o){var e=o(0).FDLayoutEdge;function t(h,a,n){e.call(this,h,a,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];C.exports=t},function(C,T,o){var e=o(0).LGraph;function t(h,a,n){e.call(this,h,a,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];C.exports=t},function(C,T,o){var e=o(0).LGraphManager;function t(h){e.call(this,h)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];C.exports=t},function(C,T,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(a,n,d,r){e.call(this,a,n,d,r)}i.prototype=Object.create(e.prototype);for(var h in e)i[h]=e[h];i.prototype.move=function(){var a=this.graphManager.getLayout();this.displacementX=a.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=a.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementX=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementY=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),a.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},i.prototype.propogateDisplacementToChildren=function(a,n){for(var d=this.getChild().getNodes(),r,g=0;g<d.length;g++)r=d[g],r.getChild()==null?(r.moveBy(a,n),r.displacementX+=a,r.displacementY+=n):r.propogateDisplacementToChildren(a,n)},i.prototype.setPred1=function(a){this.pred1=a},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(a){this.next=a},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(a){this.processed=a},i.prototype.isProcessed=function(){return processed},C.exports=i},function(C,T,o){var e=o(0).FDLayout,t=o(4),i=o(3),h=o(5),a=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,g=o(0).Point,l=o(0).PointD,p=o(0).Layout,y=o(0).Integer,f=o(0).IGeometry,v=o(0).LGraph,N=o(0).Transform;function A(){e.call(this),this.toBeTiled={}}A.prototype=Object.create(e.prototype);for(var m in e)A[m]=e[m];A.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},A.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},A.prototype.newNode=function(s){return new h(this.graphManager,s)},A.prototype.newEdge=function(s){return new a(null,null,s)},A.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.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/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},A.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(E){return s.has(E)});this.graphManager.setAllNodesToApplyGravitation(u)}}else{var c=this.getFlatForest();if(c.length>0)this.positionNodesRadially(c);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(L){return s.has(L)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(_){return s.has(_)});this.graphManager.setAllNodesToApplyGravitation(u),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.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=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),u={},c=0;c<s.length;c++){var E=s[c].rect,_=s[c].id;u[_]={id:_,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return u},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},A.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],u,c=this.graphManager.getGraphs(),E=c.length,_;for(_=0;_<E;_++)u=c[_],u.updateConnected(),u.isConnected||(s=s.concat(u.getNodes()));return s},A.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var u=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!u.has(E)){var _=E.getSource(),L=E.getTarget();if(_==L)E.getBendpoints().push(new l),E.getBendpoints().push(new l),this.createDummyNodesForBendpoints(E),u.add(E);else{var O=[];if(O=O.concat(_.getEdgeListToNode(L)),O=O.concat(L.getEdgeListToNode(_)),!u.has(O[0])){if(O.length>1){var D;for(D=0;D<O.length;D++){var w=O[D];w.getBendpoints().push(new l),this.createDummyNodesForBendpoints(w)}}O.forEach(function(x){u.add(x)})}}}if(u.size==s.length)break}},A.prototype.positionNodesRadially=function(s){for(var u=new g(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,_=0,L=0,O=new l(0,0),D=0;D<s.length;D++){D%c==0&&(L=0,_=E,D!=0&&(_+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var w=s[D],x=p.findCenterOfTree(w);u.x=L,u.y=_,O=A.radialLayout(w,x,u),O.y>E&&(E=Math.floor(O.y)),L=Math.floor(O.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(r.WORLD_CENTER_X-O.x/2,r.WORLD_CENTER_Y-O.y/2))},A.radialLayout=function(s,u,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(u,null,0,359,0,E);var _=v.calculateBounds(s),L=new N;L.setDeviceOrgX(_.getMinX()),L.setDeviceOrgY(_.getMinY()),L.setWorldOrgX(c.x),L.setWorldOrgY(c.y);for(var O=0;O<s.length;O++){var D=s[O];D.transform(L)}var w=new l(_.getMaxX(),_.getMaxY());return L.inverseTransformPoint(w)},A.branchRadialLayout=function(s,u,c,E,_,L){var O=(E-c+1)/2;O<0&&(O+=180);var D=(O+c)%360,w=D*f.TWO_PI/360,x=_*Math.cos(w),F=_*Math.sin(w);s.setCenter(x,F);var M=[];M=M.concat(s.getEdges());var R=M.length;u!=null&&R--;for(var G=0,S=M.length,P,b=s.getEdgesBetween(u);b.length>1;){var U=b[0];b.splice(0,1);var Y=M.indexOf(U);Y>=0&&M.splice(Y,1),S--,R--}u!=null?P=(M.indexOf(b[0])+1)%S:P=0;for(var X=Math.abs(E-c)/R,B=P;G!=R;B=++B%S){var z=M[B].getOtherEnd(s);if(z!=u){var q=(c+G*X)%360,J=(q+X)%360;A.branchRadialLayout(z,s,q,J,_+L,L),G++}}},A.maxDiagonalInTree=function(s){for(var u=y.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],_=E.getDiagonal();_>u&&(u=_)}return u},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var s=this,u={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),_=0;_<E.length;_++){var L=E[_],O=L.getParent();this.getNodeDegreeWithChildren(L)===0&&(O.id==null||!this.getToBeTiled(O))&&c.push(L)}for(var _=0;_<c.length;_++){var L=c[_],D=L.getParent().id;typeof u[D]>"u"&&(u[D]=[]),u[D]=u[D].concat(L)}Object.keys(u).forEach(function(w){if(u[w].length>1){var x="DummyCompound_"+w;s.memberGroups[x]=u[w];var F=u[w][0].getParent(),M=new h(s.graphManager);M.id=x,M.paddingLeft=F.paddingLeft||0,M.paddingRight=F.paddingRight||0,M.paddingBottom=F.paddingBottom||0,M.paddingTop=F.paddingTop||0,s.idToDummyNode[x]=M;var R=s.getGraphManager().add(s.newGraph(),M),G=F.getChild();G.add(M);for(var S=0;S<u[w].length;S++){var P=u[w][S];G.remove(P),R.add(P)}}})},A.prototype.clearCompounds=function(){var s={},u={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)u[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,u)},A.prototype.clearZeroDegreeMembers=function(){var s=this,u=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];u[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=u[c].width,E.rect.height=u[c].height})},A.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var u=this.compoundOrder[s],c=u.id,E=u.paddingLeft,_=u.paddingTop;this.adjustLocations(this.tiledMemberPack[c],u.rect.x,u.rect.y,E,_)}},A.prototype.repopulateZeroDegreeMembers=function(){var s=this,u=this.tiledZeroDegreePack;Object.keys(u).forEach(function(c){var E=s.idToDummyNode[c],_=E.paddingLeft,L=E.paddingTop;s.adjustLocations(u[c],E.rect.x,E.rect.y,_,L)})},A.prototype.getToBeTiled=function(s){var u=s.id;if(this.toBeTiled[u]!=null)return this.toBeTiled[u];var c=s.getChild();if(c==null)return this.toBeTiled[u]=!1,!1;for(var E=c.getNodes(),_=0;_<E.length;_++){var L=E[_];if(this.getNodeDegree(L)>0)return this.toBeTiled[u]=!1,!1;if(L.getChild()==null){this.toBeTiled[L.id]=!1;continue}if(!this.getToBeTiled(L))return this.toBeTiled[u]=!1,!1}return this.toBeTiled[u]=!0,!0},A.prototype.getNodeDegree=function(s){s.id;for(var u=s.getEdges(),c=0,E=0;E<u.length;E++){var _=u[E];_.getSource().id!==_.getTarget().id&&(c=c+1)}return c},A.prototype.getNodeDegreeWithChildren=function(s){var u=this.getNodeDegree(s);if(s.getChild()==null)return u;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var _=c[E];u+=this.getNodeDegreeWithChildren(_)}return u},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(s){for(var u=0;u<s.length;u++){var c=s[u];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},A.prototype.adjustLocations=function(s,u,c,E,_){u+=E,c+=_;for(var L=u,O=0;O<s.rows.length;O++){var D=s.rows[O];u=L;for(var w=0,x=0;x<D.length;x++){var F=D[x];F.rect.x=u,F.rect.y=c,u+=F.rect.width+s.horizontalPadding,F.rect.height>w&&(w=F.rect.height)}c+=w+s.verticalPadding}},A.prototype.tileCompoundMembers=function(s,u){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var _=u[E];c.tiledMemberPack[E]=c.tileNodes(s[E],_.paddingLeft+_.paddingRight),_.rect.width=c.tiledMemberPack[E].width,_.rect.height=c.tiledMemberPack[E].height})},A.prototype.tileNodes=function(s,u){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,_={rows:[],rowWidth:[],rowHeight:[],width:0,height:u,verticalPadding:c,horizontalPadding:E};s.sort(function(D,w){return D.rect.width*D.rect.height>w.rect.width*w.rect.height?-1:D.rect.width*D.rect.height<w.rect.width*w.rect.height?1:0});for(var L=0;L<s.length;L++){var O=s[L];_.rows.length==0?this.insertNodeToRow(_,O,0,u):this.canAddHorizontal(_,O.rect.width,O.rect.height)?this.insertNodeToRow(_,O,this.getShortestRowIndex(_),u):this.insertNodeToRow(_,O,_.rows.length,u),this.shiftToLastRow(_)}return _},A.prototype.insertNodeToRow=function(s,u,c,E){var _=E;if(c==s.rows.length){var L=[];s.rows.push(L),s.rowWidth.push(_),s.rowHeight.push(0)}var O=s.rowWidth[c]+u.rect.width;s.rows[c].length>0&&(O+=s.horizontalPadding),s.rowWidth[c]=O,s.width<O&&(s.width=O);var D=u.rect.height;c>0&&(D+=s.verticalPadding);var w=0;D>s.rowHeight[c]&&(w=s.rowHeight[c],s.rowHeight[c]=D,w=s.rowHeight[c]-w),s.height+=w,s.rows[c].push(u)},A.prototype.getShortestRowIndex=function(s){for(var u=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(u=E,c=s.rowWidth[E]);return u},A.prototype.getLongestRowIndex=function(s){for(var u=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(u=E,c=s.rowWidth[E]);return u},A.prototype.canAddHorizontal=function(s,u,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var _=s.rowWidth[E];if(_+s.horizontalPadding+u<=s.width)return!0;var L=0;s.rowHeight[E]<c&&E>0&&(L=c+s.verticalPadding-s.rowHeight[E]);var O;s.width-_>=u+s.horizontalPadding?O=(s.height+L)/(_+u+s.horizontalPadding):O=(s.height+L)/s.width,L=c+s.verticalPadding;var D;return s.width<u?D=(s.height+L)/u:D=(s.height+L)/s.width,D<1&&(D=1/D),O<1&&(O=1/O),O<D},A.prototype.shiftToLastRow=function(s){var u=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[u],_=E[E.length-1],L=_.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>L&&u!=c){E.splice(-1,1),s.rows[c].push(_),s.rowWidth[u]=s.rowWidth[u]-L,s.rowWidth[c]=s.rowWidth[c]+L,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var O=Number.MIN_VALUE,D=0;D<E.length;D++)E[D].height>O&&(O=E[D].height);u>0&&(O+=s.verticalPadding);var w=s.rowHeight[u]+s.rowHeight[c];s.rowHeight[u]=O,s.rowHeight[c]<_.height+s.verticalPadding&&(s.rowHeight[c]=_.height+s.verticalPadding);var x=s.rowHeight[u]+s.rowHeight[c];s.height+=x-w,this.shiftToLastRow(s)}},A.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var s=[],u=!0,c;u;){var E=this.graphManager.getAllNodes(),_=[];u=!1;for(var L=0;L<E.length;L++)c=E[L],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(_.push([c,c.getEdges()[0],c.getOwner()]),u=!0);if(u==!0){for(var O=[],D=0;D<_.length;D++)_[D][0].getEdges().length==1&&(O.push(_[D]),_[D][0].getOwner().remove(_[D][0]));s.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},A.prototype.growTree=function(s){for(var u=s.length,c=s[u-1],E,_=0;_<c.length;_++)E=c[_],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(s){var u,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var _=c.startX,L=c.finishX,O=c.startY,D=c.finishY,w=0,x=0,F=0,M=0,R=[w,F,x,M];if(O>0)for(var G=_;G<=L;G++)R[0]+=this.grid[G][O-1].length+this.grid[G][O].length-1;if(L<this.grid.length-1)for(var G=O;G<=D;G++)R[1]+=this.grid[L+1][G].length+this.grid[L][G].length-1;if(D<this.grid[0].length-1)for(var G=_;G<=L;G++)R[2]+=this.grid[G][D+1].length+this.grid[G][D].length-1;if(_>0)for(var G=O;G<=D;G++)R[3]+=this.grid[_-1][G].length+this.grid[_][G].length-1;for(var S=y.MAX_VALUE,P,b,U=0;U<R.length;U++)R[U]<S?(S=R[U],P=1,b=U):R[U]==S&&P++;if(P==3&&S==0)R[0]==0&&R[1]==0&&R[2]==0?u=1:R[0]==0&&R[1]==0&&R[3]==0?u=0:R[0]==0&&R[2]==0&&R[3]==0?u=3:R[1]==0&&R[2]==0&&R[3]==0&&(u=2);else if(P==2&&S==0){var Y=Math.floor(Math.random()*2);R[0]==0&&R[1]==0?Y==0?u=0:u=1:R[0]==0&&R[2]==0?Y==0?u=0:u=2:R[0]==0&&R[3]==0?Y==0?u=0:u=3:R[1]==0&&R[2]==0?Y==0?u=1:u=2:R[1]==0&&R[3]==0?Y==0?u=1:u=3:Y==0?u=2:u=3}else if(P==4&&S==0){var Y=Math.floor(Math.random()*4);u=Y}else u=b;u==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):u==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):u==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},C.exports=A},function(C,T,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),C.exports=e}])})}(W)),W.exports}var nt=k.exports,K;function ot(){return K||(K=1,function(H,j){(function(I,C){H.exports=C(rt())})(nt,function(I){return function(C){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return C[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=C,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(C,T){C.exports=I},function(C,T,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,h=o(0).CoSELayout,a=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={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 g(f,v){var N={};for(var A in f)N[A]=f[A];for(var A in v)N[A]=v[A];return N}function l(f){this.options=g(r,f),p(this.options)}var p=function(f){f.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=f.nodeRepulsion),f.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=f.idealEdgeLength),f.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=f.edgeElasticity),f.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.nestingFactor),f.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=f.gravity),f.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=f.numIter),f.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=f.gravityRange),f.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.gravityCompound),f.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.gravityRangeCompound),f.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.initialEnergyOnIncremental),f.quality=="draft"?e.QUALITY=0:f.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=f.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!f.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=f.animate,i.TILE=f.tile,i.TILING_PADDING_VERTICAL=typeof f.tilingPaddingVertical=="function"?f.tilingPaddingVertical.call():f.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof f.tilingPaddingHorizontal=="function"?f.tilingPaddingHorizontal.call():f.tilingPaddingHorizontal};l.prototype.run=function(){var f,v,N=this.options;this.idToLNode={};var A=this.layout=new h,m=this;m.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=A.newGraphManager();this.gm=s;var u=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(u),A);for(var E=0;E<c.length;E++){var _=c[E],L=this.idToLNode[_.data("source")],O=this.idToLNode[_.data("target")];if(L!==O&&L.getEdgesBetween(O).length==0){var D=s.add(A.newEdge(),L,O);D.id=_.id()}}var w=function(F,M){typeof F=="number"&&(F=M);var R=F.data("id"),G=m.idToLNode[R];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},x=function F(){for(var M=function(){N.fit&&N.cy.fit(N.eles,N.padding),f||(f=!0,m.cy.one("layoutready",N.ready),m.cy.trigger({type:"layoutready",layout:m}))},R=m.options.refresh,G,S=0;S<R&&!G;S++)G=m.stopped||m.layout.tick();if(G){A.checkLayoutSuccess()&&!A.isSubLayout&&A.doPostLayout(),A.tilingPostLayout&&A.tilingPostLayout(),A.isLayoutFinished=!0,m.options.eles.nodes().positions(w),M(),m.cy.one("layoutstop",m.options.stop),m.cy.trigger({type:"layoutstop",layout:m}),v&&cancelAnimationFrame(v),f=!1;return}var P=m.layout.getPositionsData();N.eles.nodes().positions(function(b,U){if(typeof b=="number"&&(b=U),!b.isParent()){for(var Y=b.id(),X=P[Y],B=b;X==null&&(X=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[Y]=X,B=B.parent()[0],B!=null););return X!=null?{x:X.x,y:X.y}:{x:b.position("x"),y:b.position("y")}}}),M(),v=requestAnimationFrame(F)};return A.addListener("layoutstarted",function(){m.options.animate==="during"&&(v=requestAnimationFrame(x))}),A.runLayout(),this.options.animate!=="during"&&(m.options.eles.nodes().not(":parent").layoutPositions(m,m.options,w),f=!1),this},l.prototype.getTopMostNodes=function(f){for(var v={},N=0;N<f.length;N++)v[f[N].id()]=!0;var A=f.filter(function(m,s){typeof m=="number"&&(m=s);for(var u=m.parent()[0];u!=null;){if(v[u.id()])return!1;u=u.parent()[0]}return!0});return A},l.prototype.processChildrenList=function(f,v,N){for(var A=v.length,m=0;m<A;m++){var s=v[m],u=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=f.add(new a(N.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=f.add(new a(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var _=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,L=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,O=s.css("text-halign");c.labelWidth=_,c.labelHeight=L,c.labelPos=O}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),u!=null&&u.length>0){var D;D=N.getGraphManager().add(N.newGraph(),c),this.processChildrenList(D,u,N)}}},l.prototype.stop=function(){return this.stopped=!0,this};var y=function(f){f("layout","cose-bilkent",l)};typeof cytoscape<"u"&&y(cytoscape),C.exports=y}])})}(k)),k.exports}var st=ot();const ht=$(st);export{ht as c};
|
|
//# sourceMappingURL=cytoscape-cose-bilkent-BWab1rkW.chunk.mjs.map
|