import{g as ye}from"./_commonjsHelpers-Cpj98o6Y.js";function Te(zt,jt){for(var q=0;qlt[A]})}}}return Object.freeze(Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"}))}var te={exports:{}},ee={exports:{}},re={exports:{}},Ne=re.exports,ce;function me(){return ce||(ce=1,function(zt,jt){(function(lt,A){zt.exports=A()})(Ne,function(){return function(q){var lt={};function A(T){if(lt[T])return lt[T].exports;var l=lt[T]={i:T,l:!1,exports:{}};return q[T].call(l.exports,l,l.exports,A),l.l=!0,l.exports}return A.m=q,A.c=lt,A.i=function(T){return T},A.d=function(T,l,n){A.o(T,l)||Object.defineProperty(T,l,{configurable:!1,enumerable:!0,get:n})},A.n=function(T){var l=T&&T.__esModule?function(){return T.default}:function(){return T};return A.d(l,"a",l),l},A.o=function(T,l){return Object.prototype.hasOwnProperty.call(T,l)},A.p="",A(A.s=28)}([function(q,lt,A){function T(){}T.QUALITY=1,T.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,T.DEFAULT_INCREMENTAL=!1,T.DEFAULT_ANIMATION_ON_LAYOUT=!0,T.DEFAULT_ANIMATION_DURING_LAYOUT=!1,T.DEFAULT_ANIMATION_PERIOD=50,T.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,T.DEFAULT_GRAPH_MARGIN=15,T.NODE_DIMENSIONS_INCLUDE_LABELS=!1,T.SIMPLE_NODE_SIZE=40,T.SIMPLE_NODE_HALF_SIZE=T.SIMPLE_NODE_SIZE/2,T.EMPTY_COMPOUND_NODE_SIZE=40,T.MIN_EDGE_LENGTH=1,T.WORLD_BOUNDARY=1e6,T.INITIAL_WORLD_BOUNDARY=T.WORLD_BOUNDARY/1e3,T.WORLD_CENTER_X=1200,T.WORLD_CENTER_Y=900,q.exports=T},function(q,lt,A){var T=A(2),l=A(8),n=A(9);function r(u,i,y){T.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=u,this.target=i}r.prototype=Object.create(T.prototype);for(var a in T)r[a]=T[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,i){for(var y=this.getOtherEnd(u),t=i.getGraphManager().getRoot();;){if(y.getOwner()==i)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},q.exports=r},function(q,lt,A){function T(l){this.vGraphObject=l}q.exports=T},function(q,lt,A){var T=A(2),l=A(10),n=A(13),r=A(0),a=A(16),u=A(5);function i(t,s,o,f){o==null&&f==null&&(f=s),T.call(this,f),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}i.prototype=Object.create(T.prototype);for(var y in T)i[y]=T[y];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(f){if(f.target==t){if(f.source!=o)throw"Incorrect edge source!";s.push(f)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(f){if(!(f.source==o||f.target==o))throw"Incorrect edge source and/or target";(f.target==t||f.source==t)&&s.push(f)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var f=this.child.getNodes(),h=0;hs?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var f=new u(s,o),h=t.inverseTransformPoint(f);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},q.exports=i},function(q,lt,A){var T=A(0);function l(){}for(var n in T)l[n]=T[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,q.exports=l},function(q,lt,A){function T(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}T.prototype.getX=function(){return this.x},T.prototype.getY=function(){return this.y},T.prototype.setX=function(l){this.x=l},T.prototype.setY=function(l){this.y=l},T.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},T.prototype.getCopy=function(){return new T(this.x,this.y)},T.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},q.exports=T},function(q,lt,A){var T=A(2),l=A(10),n=A(0),r=A(7),a=A(3),u=A(1),i=A(13),y=A(12),t=A(11);function s(f,h,N){T.call(this,N),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(T.prototype);for(var o in T)s[o]=T[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(f,h,N){if(h==null&&N==null){var v=f;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 d=f;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(N)>-1))throw"Source or target not in graph!";if(!(h.owner==N.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=N.owner?null:(d.source=h,d.target=N,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),N!=h&&N.edges.push(d),d)}},s.prototype.remove=function(f){var h=f;if(f instanceof a){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var N=h.edges.slice(),v,d=N.length,m=0;m-1&&U>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(L,1),v.target!=v.source&&v.target.edges.splice(U,1);var P=v.source.owner.getEdges().indexOf(v);if(P==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(P,1)}},s.prototype.updateLeftTop=function(){for(var f=l.MAX_VALUE,h=l.MAX_VALUE,N,v,d,m=this.getNodes(),P=m.length,L=0;LN&&(f=N),h>v&&(h=v)}return f==l.MAX_VALUE?null:(m[0].getParent().paddingLeft!=null?d=m[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=f-d,new y(this.left,this.top))},s.prototype.updateBounds=function(f){for(var h=l.MAX_VALUE,N=-l.MAX_VALUE,v=l.MAX_VALUE,d=-l.MAX_VALUE,m,P,L,U,k,V=this.nodes,j=V.length,D=0;Dm&&(h=m),NL&&(v=L),dm&&(h=m),NL&&(v=L),d=this.nodes.length){var j=0;N.forEach(function(D){D.owner==f&&j++}),j==this.nodes.length&&(this.isConnected=!0)}},q.exports=s},function(q,lt,A){var T,l=A(1);function n(r){T=A(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(r,a);return this.setRootGraph(u),this.rootGraph},n.prototype.add=function(r,a,u,i,y){if(u==null&&i==null&&y==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{y=u,i=a,u=r;var t=i.getOwner(),s=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return u.isInterGraph=!1,t.add(u,i,y);if(u.isInterGraph=!0,u.source=i,u.target=y,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},n.prototype.remove=function(r){if(r instanceof T){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());for(var i,y=u.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var y=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(y=1);var t=y*a[0],s=a[1]/y;a[0]t)return a[0]=u,a[1]=o,a[2]=y,a[3]=V,!1;if(iy)return a[0]=s,a[1]=i,a[2]=U,a[3]=t,!1;if(uy?(a[0]=h,a[1]=N,e=!0):(a[0]=f,a[1]=o,e=!0):g===c&&(u>y?(a[0]=s,a[1]=o,e=!0):(a[0]=v,a[1]=N,e=!0)),-p===c?y>u?(a[2]=k,a[3]=V,E=!0):(a[2]=U,a[3]=L,E=!0):p===c&&(y>u?(a[2]=P,a[3]=L,E=!0):(a[2]=j,a[3]=V,E=!0)),e&&E)return!1;if(u>y?i>t?(w=this.getCardinalDirection(g,c,4),C=this.getCardinalDirection(p,c,2)):(w=this.getCardinalDirection(-g,c,3),C=this.getCardinalDirection(-p,c,1)):i>t?(w=this.getCardinalDirection(-g,c,1),C=this.getCardinalDirection(-p,c,3)):(w=this.getCardinalDirection(g,c,2),C=this.getCardinalDirection(p,c,4)),!e)switch(w){case 1:G=o,R=u+-m/c,a[0]=R,a[1]=G;break;case 2:R=v,G=i+d*c,a[0]=R,a[1]=G;break;case 3:G=N,R=u+m/c,a[0]=R,a[1]=G;break;case 4:R=h,G=i+-d*c,a[0]=R,a[1]=G;break}if(!E)switch(C){case 1:z=L,O=y+-et/c,a[2]=O,a[3]=z;break;case 2:O=j,z=t+D*c,a[2]=O,a[3]=z;break;case 3:z=V,O=y+et/c,a[2]=O,a[3]=z;break;case 4:O=k,z=t+-D*c,a[2]=O,a[3]=z;break}}return!1},l.getCardinalDirection=function(n,r,a){return n>r?a:1+a%4},l.getIntersection=function(n,r,a,u){if(u==null)return this.getIntersection2(n,r,a);var i=n.x,y=n.y,t=r.x,s=r.y,o=a.x,f=a.y,h=u.x,N=u.y,v=void 0,d=void 0,m=void 0,P=void 0,L=void 0,U=void 0,k=void 0,V=void 0,j=void 0;return m=s-y,L=i-t,k=t*y-i*s,P=N-f,U=o-h,V=h*f-o*N,j=m*U-P*L,j===0?null:(v=(L*V-U*k)/j,d=(P*k-m*V)/j,new T(v,d))},l.angleOfVector=function(n,r,a,u){var i=void 0;return n!==a?(i=Math.atan((u-r)/(a-n)),a=0){var N=(-o+Math.sqrt(o*o-4*s*f))/(2*s),v=(-o-Math.sqrt(o*o-4*s*f))/(2*s),d=null;return N>=0&&N<=1?[N]:v>=0&&v<=1?[v]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,q.exports=l},function(q,lt,A){function T(){}T.sign=function(l){return l>0?1:l<0?-1:0},T.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},T.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},q.exports=T},function(q,lt,A){function T(){}T.MAX_VALUE=2147483647,T.MIN_VALUE=-2147483648,q.exports=T},function(q,lt,A){var T=function(){function i(y,t){for(var s=0;s"u"?"undefined":T(n);return n==null||r!="object"&&r!="function"},q.exports=l},function(q,lt,A){function T(o){if(Array.isArray(o)){for(var f=0,h=Array(o.length);f0&&f;){for(m.push(L[0]);m.length>0&&f;){var U=m[0];m.splice(0,1),d.add(U);for(var k=U.getEdges(),v=0;v-1&&L.splice(et,1)}d=new Set,P=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var f=[],h=o.source,N=this.graphManager.calcLowestCommonAncestor(o.source,o.target),v=0;v0){for(var N=this.edgeToDummyNodes.get(h),v=0;v=0&&f.splice(V,1);var j=P.getNeighborsList();j.forEach(function(e){if(h.indexOf(e)<0){var E=N.get(e),g=E-1;g==1&&U.push(e),N.set(e,g)}})}h=h.concat(U),(f.length==1||f.length==2)&&(v=!0,d=f[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},q.exports=s},function(q,lt,A){function T(){}T.seed=1,T.x=0,T.nextDouble=function(){return T.x=Math.sin(T.seed++)*1e4,T.x-Math.floor(T.x)},q.exports=T},function(q,lt,A){var T=A(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),r},l.prototype.transformY=function(n){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),r},l.prototype.inverseTransformX=function(n){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),r},l.prototype.inverseTransformY=function(n){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),r},l.prototype.inverseTransformPoint=function(n){var r=new T(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},q.exports=l},function(q,lt,A){function T(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,f,h,N,v=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;om||d>m)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*N)):(m=s.getEstimatedSize()*this.compoundGravityRangeFactor,(v>m||d>m)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*N*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=v.length||m>=v[0].length)){for(var P=0;Pi}}]),a}();q.exports=r},function(q,lt,A){function T(){}T.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt}(Math.min(this.m+1,this.n)),this.U=function(Et){var Nt=function Xt(xt){if(xt.length==0)return 0;for(var Ht=[],Rt=0;Rt0;)Nt.push(0);return Nt}(this.n),a=function(Et){for(var Nt=[];Et-- >0;)Nt.push(0);return Nt}(this.m),u=!0,i=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;p--)if(this.s[p]!==0){for(var c=p+1;c=0;b--){if(function(Et,Nt){return Et&&Nt}(b0;){var B=void 0,Dt=void 0;for(B=e-2;B>=-1&&B!==-1;B--)if(Math.abs(r[B])<=nt+Q*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){r[B]=0;break}if(B===e-2)Dt=4;else{var yt=void 0;for(yt=e-1;yt>=B&&yt!==B;yt--){var gt=(yt!==e?Math.abs(r[yt]):0)+(yt!==B+1?Math.abs(r[yt-1]):0);if(Math.abs(this.s[yt])<=nt+Q*gt){this.s[yt]=0;break}}yt===B?Dt=3:yt===e-1?Dt=1:(Dt=2,B=yt)}switch(B++,Dt){case 1:{var _=r[e-2];r[e-2]=0;for(var ft=e-2;ft>=B;ft--){var pt=T.hypot(this.s[ft],_),mt=this.s[ft]/pt,Mt=_/pt;this.s[ft]=pt,ft!==B&&(_=-Mt*r[ft-1],r[ft-1]=mt*r[ft-1]);for(var dt=0;dt=this.s[B+1]);){var Tt=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=Tt,BMath.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},q.exports=T},function(q,lt,A){var T=function(){function r(a,u){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=a,this.sequence2=u,this.match_score=i,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var u=this.listeners[a];u.event===n&&u.callback===r&&this.listeners.splice(a,1)}},l.emit=function(n,r){for(var a=0;a{var lt={45:(n,r,a)=>{var u={};u.layoutBase=a(551),u.CoSEConstants=a(806),u.CoSEEdge=a(767),u.CoSEGraph=a(880),u.CoSEGraphManager=a(578),u.CoSELayout=a(765),u.CoSENode=a(991),u.ConstraintHandler=a(902),n.exports=u},806:(n,r,a)=>{var u=a(551).FDLayoutConstants;function i(){}for(var y in u)i[y]=u[y];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,n.exports=i},767:(n,r,a)=>{var u=a(551).FDLayoutEdge;function i(t,s,o){u.call(this,t,s,o)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i},880:(n,r,a)=>{var u=a(551).LGraph;function i(t,s,o){u.call(this,t,s,o)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i},578:(n,r,a)=>{var u=a(551).LGraphManager;function i(t){u.call(this,t)}i.prototype=Object.create(u.prototype);for(var y in u)i[y]=u[y];n.exports=i},765:(n,r,a)=>{var u=a(551).FDLayout,i=a(578),y=a(880),t=a(991),s=a(767),o=a(806),f=a(902),h=a(551).FDLayoutConstants,N=a(551).LayoutConstants,v=a(551).Point,d=a(551).PointD,m=a(551).DimensionD,P=a(551).Layout,L=a(551).Integer,U=a(551).IGeometry,k=a(551).LGraph,V=a(551).Transform,j=a(551).LinkedList;function D(){u.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(u.prototype);for(var et in u)D[et]=u[et];D.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},D.prototype.newGraph=function(e){return new y(null,this.graphManager,e)},D.prototype.newNode=function(e){return new t(this.graphManager,e)},D.prototype.newEdge=function(e){return new s(null,null,e)},D.prototype.initParameters=function(){u.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var e=N.DEFAULT_CREATE_BENDS_AS_NEEDED;return e&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(w){return E.has(w)});this.graphManager.setAllNodesToApplyGravitation(g)}}else{var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(p){return E.has(p)});this.graphManager.setAllNodesToApplyGravitation(g),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(f.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(c){return e.has(c)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.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()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var g=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(g,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),E={},g=0;g0&&this.updateDisplacements();for(var g=0;g0&&(p.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var C=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){e.fixedNodesOnHorizontal.add(M),e.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,g=0;g=2*M.length/3;Q--)S=Math.floor(Math.random()*(Q+1)),H=M[Q],M[Q]=M[S],M[S]=H;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var S=C.has(M.left)?C.get(M.left):M.left,H=C.has(M.right)?C.get(M.right):M.right;e.nodesInRelativeHorizontal.includes(S)||(e.nodesInRelativeHorizontal.push(S),e.nodeToRelativeConstraintMapHorizontal.set(S,[]),e.dummyToNodeForVerticalAlignment.has(S)?e.nodeToTempPositionMapHorizontal.set(S,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(S)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(S,e.idToNodeMap.get(S).getCenterX())),e.nodesInRelativeHorizontal.includes(H)||(e.nodesInRelativeHorizontal.push(H),e.nodeToRelativeConstraintMapHorizontal.set(H,[]),e.dummyToNodeForVerticalAlignment.has(H)?e.nodeToTempPositionMapHorizontal.set(H,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(H,e.idToNodeMap.get(H).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(S).push({right:H,gap:M.gap}),e.nodeToRelativeConstraintMapHorizontal.get(H).push({left:S,gap:M.gap})}else{var Q=R.has(M.top)?R.get(M.top):M.top,nt=R.has(M.bottom)?R.get(M.bottom):M.bottom;e.nodesInRelativeVertical.includes(Q)||(e.nodesInRelativeVertical.push(Q),e.nodeToRelativeConstraintMapVertical.set(Q,[]),e.dummyToNodeForHorizontalAlignment.has(Q)?e.nodeToTempPositionMapVertical.set(Q,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(Q)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(Q,e.idToNodeMap.get(Q).getCenterY())),e.nodesInRelativeVertical.includes(nt)||(e.nodesInRelativeVertical.push(nt),e.nodeToRelativeConstraintMapVertical.set(nt,[]),e.dummyToNodeForHorizontalAlignment.has(nt)?e.nodeToTempPositionMapVertical.set(nt,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(nt)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(nt,e.idToNodeMap.get(nt).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(Q).push({bottom:nt,gap:M.gap}),e.nodeToRelativeConstraintMapVertical.get(nt).push({top:Q,gap:M.gap})}});else{var z=new Map,b=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var S=C.has(M.left)?C.get(M.left):M.left,H=C.has(M.right)?C.get(M.right):M.right;z.has(S)?z.get(S).push(H):z.set(S,[H]),z.has(H)?z.get(H).push(S):z.set(H,[S])}else{var Q=R.has(M.top)?R.get(M.top):M.top,nt=R.has(M.bottom)?R.get(M.bottom):M.bottom;b.has(Q)?b.get(Q).push(nt):b.set(Q,[nt]),b.has(nt)?b.get(nt).push(Q):b.set(nt,[Q])}});var F=function(S,H){var Q=[],nt=[],B=new j,Dt=new Set,yt=0;return S.forEach(function(gt,_){if(!Dt.has(_)){Q[yt]=[],nt[yt]=!1;var ft=_;for(B.push(ft),Dt.add(ft),Q[yt].push(ft);B.length!=0;){ft=B.shift(),H.has(ft)&&(nt[yt]=!0);var pt=S.get(ft);pt.forEach(function(mt){Dt.has(mt)||(B.push(mt),Dt.add(mt),Q[yt].push(mt))})}yt++}}),{components:Q,isFixed:nt}},J=F(z,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=J.components,this.fixedComponentsOnHorizontal=J.isFixed;var Y=F(b,e.fixedNodesOnVertical);this.componentsOnVertical=Y.components,this.fixedComponentsOnVertical=Y.isFixed}}},D.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(Y){var M=e.idToNodeMap.get(Y.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,g=0;g1){var R;for(R=0;Rp&&(p=Math.floor(C.y)),w=Math.floor(C.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(N.WORLD_CENTER_X-C.x/2,N.WORLD_CENTER_Y-C.y/2))},D.radialLayout=function(e,E,g){var p=Math.max(this.maxDiagonalInTree(e),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(E,null,0,359,0,p);var c=k.calculateBounds(e),w=new V;w.setDeviceOrgX(c.getMinX()),w.setDeviceOrgY(c.getMinY()),w.setWorldOrgX(g.x),w.setWorldOrgY(g.y);for(var C=0;C1;){var H=S[0];S.splice(0,1);var Q=b.indexOf(H);Q>=0&&b.splice(Q,1),Y--,F--}E!=null?M=(b.indexOf(S[0])+1)%Y:M=0;for(var nt=Math.abs(p-g)/F,B=M;J!=F;B=++B%Y){var Dt=b[B].getOtherEnd(e);if(Dt!=E){var yt=(g+J*nt)%360,gt=(yt+nt)%360;D.branchRadialLayout(Dt,e,yt,gt,c+w,w),J++}}},D.maxDiagonalInTree=function(e){for(var E=L.MIN_VALUE,g=0;gE&&(E=c)}return E},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var e=this,E={};this.memberGroups={},this.idToDummyNode={};for(var g=[],p=this.graphManager.getAllNodes(),c=0;c"u"&&(E[R]=[]),E[R]=E[R].concat(w)}Object.keys(E).forEach(function(G){if(E[G].length>1){var O="DummyCompound_"+G;e.memberGroups[O]=E[G];var z=E[G][0].getParent(),b=new t(e.graphManager);b.id=O,b.paddingLeft=z.paddingLeft||0,b.paddingRight=z.paddingRight||0,b.paddingBottom=z.paddingBottom||0,b.paddingTop=z.paddingTop||0,e.idToDummyNode[O]=b;var F=e.getGraphManager().add(e.newGraph(),b),J=z.getChild();J.add(b);for(var Y=0;Yc?(p.rect.x-=(p.labelWidth-c)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-c)/2):p.labelPosHorizontal=="right"&&p.setWidth(c+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var E=this.compoundOrder[e],g=E.id,p=E.paddingLeft,c=E.paddingTop,w=E.labelMarginLeft,C=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[g],E.rect.x,E.rect.y,p,c,w,C)}},D.prototype.repopulateZeroDegreeMembers=function(){var e=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(g){var p=e.idToDummyNode[g],c=p.paddingLeft,w=p.paddingTop,C=p.labelMarginLeft,R=p.labelMarginTop;e.adjustLocations(E[g],p.rect.x,p.rect.y,c,w,C,R)})},D.prototype.getToBeTiled=function(e){var E=e.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var g=e.getChild();if(g==null)return this.toBeTiled[E]=!1,!1;for(var p=g.getNodes(),c=0;c0)return this.toBeTiled[E]=!1,!1;if(w.getChild()==null){this.toBeTiled[w.id]=!1;continue}if(!this.getToBeTiled(w))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},D.prototype.getNodeDegree=function(e){e.id;for(var E=e.getEdges(),g=0,p=0;pz&&(z=F.rect.height)}g+=z+e.verticalPadding}},D.prototype.tileCompoundMembers=function(e,E){var g=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(p){var c=E[p];if(g.tiledMemberPack[p]=g.tileNodes(e[p],c.paddingLeft+c.paddingRight),c.rect.width=g.tiledMemberPack[p].width,c.rect.height=g.tiledMemberPack[p].height,c.setCenter(g.tiledMemberPack[p].centerX,g.tiledMemberPack[p].centerY),c.labelMarginLeft=0,c.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var w=c.rect.width,C=c.rect.height;c.labelWidth&&(c.labelPosHorizontal=="left"?(c.rect.x-=c.labelWidth,c.setWidth(w+c.labelWidth),c.labelMarginLeft=c.labelWidth):c.labelPosHorizontal=="center"&&c.labelWidth>w?(c.rect.x-=(c.labelWidth-w)/2,c.setWidth(c.labelWidth),c.labelMarginLeft=(c.labelWidth-w)/2):c.labelPosHorizontal=="right"&&c.setWidth(w+c.labelWidth)),c.labelHeight&&(c.labelPosVertical=="top"?(c.rect.y-=c.labelHeight,c.setHeight(C+c.labelHeight),c.labelMarginTop=c.labelHeight):c.labelPosVertical=="center"&&c.labelHeight>C?(c.rect.y-=(c.labelHeight-C)/2,c.setHeight(c.labelHeight),c.labelMarginTop=(c.labelHeight-C)/2):c.labelPosVertical=="bottom"&&c.setHeight(C+c.labelHeight))}})},D.prototype.tileNodes=function(e,E){var g=this.tileNodesByFavoringDim(e,E,!0),p=this.tileNodesByFavoringDim(e,E,!1),c=this.getOrgRatio(g),w=this.getOrgRatio(p),C;return wR&&(R=Y.getWidth())});var G=w/c,O=C/c,z=Math.pow(g-p,2)+4*(G+p)*(O+g)*c,b=(p-g+Math.sqrt(z))/(2*(G+p)),F;E?(F=Math.ceil(b),F==b&&F++):F=Math.floor(b);var J=F*(G+p)-p;return R>J&&(J=R),J+=p*2,J},D.prototype.tileNodesByFavoringDim=function(e,E,g){var p=o.TILING_PADDING_VERTICAL,c=o.TILING_PADDING_HORIZONTAL,w=o.TILING_COMPARE_BY,C={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:p,horizontalPadding:c,centerX:0,centerY:0};w&&(C.idealRowWidth=this.calcIdealRowWidth(e,g));var R=function(M){return M.rect.width*M.rect.height},G=function(M,S){return R(S)-R(M)};e.sort(function(Y,M){var S=G;return C.idealRowWidth?(S=w,S(Y.id,M.id)):S(Y,M)});for(var O=0,z=0,b=0;b0&&(C+=e.horizontalPadding),e.rowWidth[g]=C,e.width0&&(R+=e.verticalPadding);var G=0;R>e.rowHeight[g]&&(G=e.rowHeight[g],e.rowHeight[g]=R,G=e.rowHeight[g]-G),e.height+=G,e.rows[g].push(E)},D.prototype.getShortestRowIndex=function(e){for(var E=-1,g=Number.MAX_VALUE,p=0;pg&&(E=p,g=e.rowWidth[p]);return E},D.prototype.canAddHorizontal=function(e,E,g){if(e.idealRowWidth){var p=e.rows.length-1,c=e.rowWidth[p];return c+E+e.horizontalPadding<=e.idealRowWidth}var w=this.getShortestRowIndex(e);if(w<0)return!0;var C=e.rowWidth[w];if(C+e.horizontalPadding+E<=e.width)return!0;var R=0;e.rowHeight[w]0&&(R=g+e.verticalPadding-e.rowHeight[w]);var G;e.width-C>=E+e.horizontalPadding?G=(e.height+R)/(C+E+e.horizontalPadding):G=(e.height+R)/e.width,R=g+e.verticalPadding;var O;return e.widthw&&E!=g){p.splice(-1,1),e.rows[g].push(c),e.rowWidth[E]=e.rowWidth[E]-w,e.rowWidth[g]=e.rowWidth[g]+w,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=p[R].height);E>0&&(C+=e.verticalPadding);var G=e.rowHeight[E]+e.rowHeight[g];e.rowHeight[E]=C,e.rowHeight[g]0)for(var J=c;J<=w;J++)F[0]+=this.grid[J][C-1].length+this.grid[J][C].length-1;if(w0)for(var J=C;J<=R;J++)F[3]+=this.grid[c-1][J].length+this.grid[c][J].length-1;for(var Y=L.MAX_VALUE,M,S,H=0;H{var u=a(551).FDLayoutNode,i=a(551).IMath;function y(s,o,f,h){u.call(this,s,o,f,h)}y.prototype=Object.create(u.prototype);for(var t in u)y[t]=u[t];y.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(s,o){for(var f=this.getChild().getNodes(),h,N=0;N{function u(f){if(Array.isArray(f)){for(var h=0,N=Array(f.length);h0){var Tt=0;it.forEach(function(at){X=="horizontal"?(K.set(at,v.has(at)?d[v.get(at)]:W.get(at)),Tt+=K.get(at)):(K.set(at,v.has(at)?m[v.get(at)]:W.get(at)),Tt+=K.get(at))}),Tt=Tt/it.length,ot.forEach(function(at){$.has(at)||K.set(at,Tt)})}else{var st=0;ot.forEach(function(at){X=="horizontal"?st+=v.has(at)?d[v.get(at)]:W.get(at):st+=v.has(at)?m[v.get(at)]:W.get(at)}),st=st/ot.length,ot.forEach(function(at){K.set(at,st)})}});for(var Lt=function(){var it=ut.shift(),Tt=x.get(it);Tt.forEach(function(st){if(K.get(st.id)at&&(at=Vt),QtUt&&(Ut=Qt)}}catch(kt){Nt=!0,Xt=kt}finally{try{!Et&&xt.return&&xt.return()}finally{if(Nt)throw Xt}}var ie=(Tt+at)/2-(st+Ut)/2,$t=!0,qt=!1,Kt=void 0;try{for(var Zt=ot[Symbol.iterator](),_t;!($t=(_t=Zt.next()).done);$t=!0){var Jt=_t.value;K.set(Jt,K.get(Jt)+ie)}}catch(kt){qt=!0,Kt=kt}finally{try{!$t&&Zt.return&&Zt.return()}finally{if(qt)throw Kt}}})}return K},et=function(x){var X=0,$=0,W=0,tt=0;if(x.forEach(function(Z){Z.left?d[v.get(Z.left)]-d[v.get(Z.right)]>=0?X++:$++:m[v.get(Z.top)]-m[v.get(Z.bottom)]>=0?W++:tt++}),X>$&&W>tt)for(var ht=0;ht$)for(var rt=0;rttt)for(var K=0;K1)h.fixedNodeConstraint.forEach(function(I,x){p[x]=[I.position.x,I.position.y],c[x]=[d[v.get(I.nodeId)],m[v.get(I.nodeId)]]}),w=!0;else if(h.alignmentConstraint)(function(){var I=0;if(h.alignmentConstraint.vertical){for(var x=h.alignmentConstraint.vertical,X=function(K){var Z=new Set;x[K].forEach(function(ct){Z.add(ct)});var ut=new Set([].concat(u(Z)).filter(function(ct){return R.has(ct)})),Lt=void 0;ut.size>0?Lt=d[v.get(ut.values().next().value)]:Lt=j(Z).x,x[K].forEach(function(ct){p[I]=[Lt,m[v.get(ct)]],c[I]=[d[v.get(ct)],m[v.get(ct)]],I++})},$=0;$0?Lt=d[v.get(ut.values().next().value)]:Lt=j(Z).y,W[K].forEach(function(ct){p[I]=[d[v.get(ct)],Lt],c[I]=[d[v.get(ct)],m[v.get(ct)]],I++})},ht=0;htb&&(b=z[J].length,F=J);if(b0){var dt={x:0,y:0};h.fixedNodeConstraint.forEach(function(I,x){var X={x:d[v.get(I.nodeId)],y:m[v.get(I.nodeId)]},$=I.position,W=V($,X);dt.x+=W.x,dt.y+=W.y}),dt.x/=h.fixedNodeConstraint.length,dt.y/=h.fixedNodeConstraint.length,d.forEach(function(I,x){d[x]+=dt.x}),m.forEach(function(I,x){m[x]+=dt.y}),h.fixedNodeConstraint.forEach(function(I){d[v.get(I.nodeId)]=I.position.x,m[v.get(I.nodeId)]=I.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var At=h.alignmentConstraint.vertical,wt=function(x){var X=new Set;At[x].forEach(function(tt){X.add(tt)});var $=new Set([].concat(u(X)).filter(function(tt){return R.has(tt)})),W=void 0;$.size>0?W=d[v.get($.values().next().value)]:W=j(X).x,X.forEach(function(tt){R.has(tt)||(d[v.get(tt)]=W)})},bt=0;bt0?W=m[v.get($.values().next().value)]:W=j(X).y,X.forEach(function(tt){R.has(tt)||(m[v.get(tt)]=W)})},It=0;It{n.exports=q}},A={};function T(n){var r=A[n];if(r!==void 0)return r.exports;var a=A[n]={exports:{}};return lt[n](a,a.exports,T),a.exports}var l=T(45);return l})()})}(ee)),ee.exports}var Me=te.exports,de;function Ae(){return de||(de=1,function(zt,jt){(function(lt,A){zt.exports=A(Ce())})(Me,function(q){return(()=>{var lt={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,u=Array(a>1?a-1:0),i=1;i{var u=function(){function t(s,o){var f=[],h=!0,N=!1,v=void 0;try{for(var d=s[Symbol.iterator](),m;!(h=(m=d.next()).done)&&(f.push(m.value),!(o&&f.length===o));h=!0);}catch(P){N=!0,v=P}finally{try{!h&&d.return&&d.return()}finally{if(N)throw v}}return f}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=a(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var s={},o=0;o0&&w.merge(O)});for(var C=0;C1){m=v[0],P=m.connectedEdges().length,v.forEach(function(c){c.connectedEdges().length0&&f.set("dummy"+(f.size+1),k),V},y.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var f=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,N=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,m=!1,P=void 0;try{for(var L=s.nodeIndexes[Symbol.iterator](),U;!(d=(U=L.next()).done);d=!0){var k=U.value,V=u(k,2),j=V[0],D=V[1],et=o.cy.getElementById(j);if(et){var e=et.boundingBox(),E=s.xCoords[D]-e.w/2,g=s.xCoords[D]+e.w/2,p=s.yCoords[D]-e.h/2,c=s.yCoords[D]+e.h/2;Eh&&(h=g),pv&&(v=c)}}}catch(O){m=!0,P=O}finally{try{!d&&L.return&&L.return()}finally{if(m)throw P}}var w=t.x-(h+f)/2,C=t.y-(v+N)/2;s.xCoords=s.xCoords.map(function(O){return O+w}),s.yCoords=s.yCoords.map(function(O){return O+C})}else{Object.keys(s).forEach(function(O){var z=s[O],b=z.getRect().x,F=z.getRect().x+z.getRect().width,J=z.getRect().y,Y=z.getRect().y+z.getRect().height;bh&&(h=F),Jv&&(v=Y)});var R=t.x-(h+f)/2,G=t.y-(v+N)/2;Object.keys(s).forEach(function(O){var z=s[O];z.setCenter(z.getCenterX()+R,z.getCenterY()+G)})}}},y.calcBoundingBox=function(t,s,o,f){for(var h=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,m=void 0,P=void 0,L=void 0,U=void 0,k=t.descendants().not(":parent"),V=k.length,j=0;jm&&(h=m),NL&&(v=L),d{var u=a(548),i=a(140).CoSELayout,y=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,f=a(140).layoutBase.FDLayoutConstants,h=a(140).CoSEConstants,N=function(d,m){var P=d.cy,L=d.eles,U=L.nodes(),k=L.edges(),V=void 0,j=void 0,D=void 0,et={};d.randomize&&(V=m.nodeIndexes,j=m.xCoords,D=m.yCoords);var e=function(O){return typeof O=="function"},E=function(O,z){return e(O)?O(z):O},g=u.calcParentsWithoutChildren(P,L),p=function G(O,z,b,F){for(var J=z.length,Y=0;Y0){var B=void 0;B=b.getGraphManager().add(b.newGraph(),H),G(B,S,b,F)}}},c=function(O,z,b){for(var F=0,J=0,Y=0;Y0?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=F/J:e(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=f.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=f.MIN_REPULSION_DIST=f.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH)},w=function(O,z){z.fixedNodeConstraint&&(O.constraints.fixedNodeConstraint=z.fixedNodeConstraint),z.alignmentConstraint&&(O.constraints.alignmentConstraint=z.alignmentConstraint),z.relativePlacementConstraint&&(O.constraints.relativePlacementConstraint=z.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=f.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=f.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=f.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=f.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=f.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var C=new i,R=C.newGraphManager();return p(R.addRoot(),u.getTopMostNodes(U),C,d),c(C,R,k),w(C,d),C.runLayout(),et};n.exports={coseLayout:N}},212:(n,r,a)=>{var u=function(){function d(m,P){for(var L=0;L0)if(g){var w=t.getTopMostNodes(L.eles.nodes());if(D=t.connectComponents(U,L.eles,w),D.forEach(function(gt){var _=gt.boundingBox();et.push({x:_.x1+_.w/2,y:_.y1+_.h/2})}),L.randomize&&D.forEach(function(gt){L.eles=gt,V.push(o(L))}),L.quality=="default"||L.quality=="proof"){var C=U.collection();if(L.tile){var R=new Map,G=[],O=[],z=0,b={nodeIndexes:R,xCoords:G,yCoords:O},F=[];if(D.forEach(function(gt,_){gt.edges().length==0&&(gt.nodes().forEach(function(ft,pt){C.merge(gt.nodes()[pt]),ft.isParent()||(b.nodeIndexes.set(gt.nodes()[pt].id(),z++),b.xCoords.push(gt.nodes()[0].position().x),b.yCoords.push(gt.nodes()[0].position().y))}),F.push(_))}),C.length>1){var J=C.boundingBox();et.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),D.push(C),V.push(b);for(var Y=F.length-1;Y>=0;Y--)D.splice(F[Y],1),V.splice(F[Y],1),et.splice(F[Y],1)}}D.forEach(function(gt,_){L.eles=gt,j.push(h(L,V[_])),t.relocateComponent(et[_],j[_],L)})}else D.forEach(function(gt,_){t.relocateComponent(et[_],V[_],L)});var M=new Set;if(D.length>1){var S=[],H=k.filter(function(gt){return gt.css("display")=="none"});D.forEach(function(gt,_){var ft=void 0;if(L.quality=="draft"&&(ft=V[_].nodeIndexes),gt.nodes().not(H).length>0){var pt={};pt.edges=[],pt.nodes=[];var mt=void 0;gt.nodes().not(H).forEach(function(Mt){if(L.quality=="draft")if(!Mt.isParent())mt=ft.get(Mt.id()),pt.nodes.push({x:V[_].xCoords[mt]-Mt.boundingbox().w/2,y:V[_].yCoords[mt]-Mt.boundingbox().h/2,width:Mt.boundingbox().w,height:Mt.boundingbox().h});else{var dt=t.calcBoundingBox(Mt,V[_].xCoords,V[_].yCoords,ft);pt.nodes.push({x:dt.topLeftX,y:dt.topLeftY,width:dt.width,height:dt.height})}else j[_][Mt.id()]&&pt.nodes.push({x:j[_][Mt.id()].getLeft(),y:j[_][Mt.id()].getTop(),width:j[_][Mt.id()].getWidth(),height:j[_][Mt.id()].getHeight()})}),gt.edges().forEach(function(Mt){var dt=Mt.source(),At=Mt.target();if(dt.css("display")!="none"&&At.css("display")!="none")if(L.quality=="draft"){var wt=ft.get(dt.id()),bt=ft.get(At.id()),Pt=[],Ft=[];if(dt.isParent()){var It=t.calcBoundingBox(dt,V[_].xCoords,V[_].yCoords,ft);Pt.push(It.topLeftX+It.width/2),Pt.push(It.topLeftY+It.height/2)}else Pt.push(V[_].xCoords[wt]),Pt.push(V[_].yCoords[wt]);if(At.isParent()){var Gt=t.calcBoundingBox(At,V[_].xCoords,V[_].yCoords,ft);Ft.push(Gt.topLeftX+Gt.width/2),Ft.push(Gt.topLeftY+Gt.height/2)}else Ft.push(V[_].xCoords[bt]),Ft.push(V[_].yCoords[bt]);pt.edges.push({startX:Pt[0],startY:Pt[1],endX:Ft[0],endY:Ft[1]})}else j[_][dt.id()]&&j[_][At.id()]&&pt.edges.push({startX:j[_][dt.id()].getCenterX(),startY:j[_][dt.id()].getCenterY(),endX:j[_][At.id()].getCenterX(),endY:j[_][At.id()].getCenterY()})}),pt.nodes.length>0&&(S.push(pt),M.add(_))}});var Q=E.packComponents(S,L.randomize).shifts;if(L.quality=="draft")V.forEach(function(gt,_){var ft=gt.xCoords.map(function(mt){return mt+Q[_].dx}),pt=gt.yCoords.map(function(mt){return mt+Q[_].dy});gt.xCoords=ft,gt.yCoords=pt});else{var nt=0;M.forEach(function(gt){Object.keys(j[gt]).forEach(function(_){var ft=j[gt][_];ft.setCenter(ft.getCenterX()+Q[nt].dx,ft.getCenterY()+Q[nt].dy)}),nt++})}}}else{var p=L.eles.boundingBox();if(et.push({x:p.x1+p.w/2,y:p.y1+p.h/2}),L.randomize){var c=o(L);V.push(c)}L.quality=="default"||L.quality=="proof"?(j.push(h(L,V[0])),t.relocateComponent(et[0],j[0],L)):t.relocateComponent(et[0],V[0],L)}var B=function(_,ft){if(L.quality=="default"||L.quality=="proof"){typeof _=="number"&&(_=ft);var pt=void 0,mt=void 0,Mt=_.data("id");return j.forEach(function(At){Mt in At&&(pt={x:At[Mt].getRect().getCenterX(),y:At[Mt].getRect().getCenterY()},mt=At[Mt])}),L.nodeDimensionsIncludeLabels&&(mt.labelWidth&&(mt.labelPosHorizontal=="left"?pt.x+=mt.labelWidth/2:mt.labelPosHorizontal=="right"&&(pt.x-=mt.labelWidth/2)),mt.labelHeight&&(mt.labelPosVertical=="top"?pt.y+=mt.labelHeight/2:mt.labelPosVertical=="bottom"&&(pt.y-=mt.labelHeight/2))),pt==null&&(pt={x:_.position("x"),y:_.position("y")}),{x:pt.x,y:pt.y}}else{var dt=void 0;return V.forEach(function(At){var wt=At.nodeIndexes.get(_.id());wt!=null&&(dt={x:At.xCoords[wt],y:At.yCoords[wt]})}),dt==null&&(dt={x:_.position("x"),y:_.position("y")}),{x:dt.x,y:dt.y}}};if(L.quality=="default"||L.quality=="proof"||L.randomize){var Dt=t.calcParentsWithoutChildren(U,k),yt=k.filter(function(gt){return gt.css("display")=="none"});L.eles=k.not(yt),k.nodes().not(":parent").not(yt).layoutPositions(P,L,B),Dt.length>0&&Dt.forEach(function(gt){gt.position(B(gt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();n.exports=v},657:(n,r,a)=>{var u=a(548),i=a(140).layoutBase.Matrix,y=a(140).layoutBase.SVD,t=function(o){var f=o.cy,h=o.eles,N=h.nodes(),v=h.nodes(":parent"),d=new Map,m=new Map,P=new Map,L=[],U=[],k=[],V=[],j=[],D=[],et=[],e=[],E=void 0,g=1e8,p=1e-9,c=o.piTol,w=o.samplingType,C=o.nodeSeparation,R=void 0,G=function(){for(var x=0,X=0,$=!1;X=tt;){rt=W[tt++];for(var Ot=L[rt],ot=0;otut&&(ut=j[Tt],Lt=Tt)}return Lt},z=function(x){var X=void 0;if(x){X=Math.floor(Math.random()*E);for(var W=0;W=1)break;Z=K}for(var ct=0;ct=1)break;Z=K}for(var ot=0;ot0&&(X.isParent()?L[x].push(P.get(X.id())):L[x].push(X.id()))})});var yt=function(x){var X=m.get(x),$=void 0;d.get(x).forEach(function(W){f.getElementById(W).isParent()?$=P.get(W):$=W,L[X].push($),L[m.get($)].push(x)})},gt=!0,_=!1,ft=void 0;try{for(var pt=d.keys()[Symbol.iterator](),mt;!(gt=(mt=pt.next()).done);gt=!0){var Mt=mt.value;yt(Mt)}}catch(I){_=!0,ft=I}finally{try{!gt&&pt.return&&pt.return()}finally{if(_)throw ft}}E=m.size;var dt=void 0;if(E>2){R=E{var u=a(212),i=function(t){t&&t("layout","fcose",u)};typeof cytoscape<"u"&&i(cytoscape),n.exports=i},140:n=>{n.exports=q}},A={};function T(n){var r=A[n];if(r!==void 0)return r.exports;var a=A[n]={exports:{}};return lt[n](a,a.exports,T),a.exports}var l=T(579);return l})()})}(te)),te.exports}var pe=Ae();const Oe=ye(pe),we=Te({__proto__:null,default:Oe},[pe]);export{we as c};