UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

1 lines 152 kB
import{a as De}from"./chunk-MBJCTAW2.mjs";import{a as tr}from"./chunk-4KE642ED.mjs";import{a as er}from"./chunk-VSLJSFIP.mjs";import{a as _e}from"./chunk-ZIX2NOZJ.mjs";import"./chunk-GFOUM62E.mjs";import"./chunk-ACBE5OQD.mjs";import"./chunk-ITREFQHG.mjs";import"./chunk-YLPUNF7Q.mjs";import"./chunk-J4IYBS62.mjs";import{a as rr}from"./chunk-ZKOTWRZ5.mjs";import{a as Xe,b as He,c as de,g as ve}from"./chunk-TK7VX7YV.mjs";import{l as je}from"./chunk-CRSA2SMT.mjs";import"./chunk-TI4EEUUG.mjs";import{A as Ve,O as ze,Q as Be,R as $e,S as ke,T as Ze,U as Je,V as qe,W as Qe,Y as pe,b as ge,ha as Ke,s as We}from"./chunk-63ZE7VZ5.mjs";import"./chunk-2QAHK7A2.mjs";import"./chunk-7LUIIE75.mjs";import"./chunk-JIBEMXPF.mjs";import"./chunk-5ZJXQJOJ.mjs";import"./chunk-YPUTD6PB.mjs";import"./chunk-6BY5RJGC.mjs";import{a as L,b as Le,e as Nr}from"./chunk-GTKDMUJJ.mjs";var Re=Le((le,Oe)=>{"use strict";L(function(w,N){typeof le=="object"&&typeof Oe=="object"?Oe.exports=N():typeof define=="function"&&define.amd?define([],N):typeof le=="object"?le.layoutBase=N():w.layoutBase=N()},"webpackUniversalModuleDefinition")(le,function(){return function(E){var w={};function N(g){if(w[g])return w[g].exports;var s=w[g]={i:g,l:!1,exports:{}};return E[g].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return L(N,"__webpack_require__"),N.m=E,N.c=w,N.i=function(g){return g},N.d=function(g,s,n){N.o(g,s)||Object.defineProperty(g,s,{configurable:!1,enumerable:!0,get:n})},N.n=function(g){var s=g&&g.__esModule?L(function(){return g.default},"getDefault"):L(function(){return g},"getModuleExports");return N.d(s,"a",s),s},N.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},N.p="",N(N.s=28)}([function(E,w,N){"use strict";function g(){}L(g,"LayoutConstants"),g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,E.exports=g},function(E,w,N){"use strict";var g=N(2),s=N(8),n=N(9);function i(c,t,u){g.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=c,this.target=t}L(i,"LEdge"),i.prototype=Object.create(g.prototype);for(var a in g)i[a]=g[a];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(c){if(this.source===c)return this.target;if(this.target===c)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(c,t){for(var u=this.getOtherEnd(c),r=t.getGraphManager().getRoot();;){if(u.getOwner()==t)return u;if(u.getOwner()==r)break;u=u.getOwner().getParent()}return null},i.prototype.updateLength=function(){var c=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),c),this.isOverlapingSourceAndTarget||(this.lengthX=c[0]-c[2],this.lengthY=c[1]-c[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))},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=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)},E.exports=i},function(E,w,N){"use strict";function g(s){this.vGraphObject=s}L(g,"LGraphObject"),E.exports=g},function(E,w,N){"use strict";var g=N(2),s=N(10),n=N(13),i=N(0),a=N(16),c=N(5);function t(r,e,o,f){o==null&&f==null&&(f=e),g.call(this,f),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=r,o!=null&&e!=null?this.rect=new n(e.x,e.y,o.width,o.height):this.rect=new n}L(t,"LNode"),t.prototype=Object.create(g.prototype);for(var u in g)t[u]=g[u];t.prototype.getEdges=function(){return this.edges},t.prototype.getChild=function(){return this.child},t.prototype.getOwner=function(){return this.owner},t.prototype.getWidth=function(){return this.rect.width},t.prototype.setWidth=function(r){this.rect.width=r},t.prototype.getHeight=function(){return this.rect.height},t.prototype.setHeight=function(r){this.rect.height=r},t.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},t.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},t.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},t.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},t.prototype.getRect=function(){return this.rect},t.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},t.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},t.prototype.setRect=function(r,e){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=e.width,this.rect.height=e.height},t.prototype.setCenter=function(r,e){this.rect.x=r-this.rect.width/2,this.rect.y=e-this.rect.height/2},t.prototype.setLocation=function(r,e){this.rect.x=r,this.rect.y=e},t.prototype.moveBy=function(r,e){this.rect.x+=r,this.rect.y+=e},t.prototype.getEdgeListToNode=function(r){var e=[],o,f=this;return f.edges.forEach(function(l){if(l.target==r){if(l.source!=f)throw"Incorrect edge source!";e.push(l)}}),e},t.prototype.getEdgesBetween=function(r){var e=[],o,f=this;return f.edges.forEach(function(l){if(!(l.source==f||l.target==f))throw"Incorrect edge source and/or target";(l.target==r||l.source==r)&&e.push(l)}),e},t.prototype.getNeighborsList=function(){var r=new Set,e=this;return e.edges.forEach(function(o){if(o.source==e)r.add(o.target);else{if(o.target!=e)throw"Incorrect incidency!";r.add(o.source)}}),r},t.prototype.withChildren=function(){var r=new Set,e,o;if(r.add(this),this.child!=null)for(var f=this.child.getNodes(),l=0;l<f.length;l++)e=f[l],o=e.withChildren(),o.forEach(function(A){r.add(A)});return r},t.prototype.getNoOfChildren=function(){var r=0,e;if(this.child==null)r=1;else for(var o=this.child.getNodes(),f=0;f<o.length;f++)e=o[f],r+=e.getNoOfChildren();return r==0&&(r=1),r},t.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},t.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)},t.prototype.scatter=function(){var r,e,o=-i.INITIAL_WORLD_BOUNDARY,f=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+a.nextDouble()*(f-o)+o;var l=-i.INITIAL_WORLD_BOUNDARY,A=i.INITIAL_WORLD_BOUNDARY;e=i.WORLD_CENTER_Y+a.nextDouble()*(A-l)+l,this.rect.x=r,this.rect.y=e},t.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 e=r.getRight()-r.getLeft(),o=r.getBottom()-r.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(e+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))}}},t.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},t.prototype.transform=function(r){var e=this.rect.x;e>i.WORLD_BOUNDARY?e=i.WORLD_BOUNDARY:e<-i.WORLD_BOUNDARY&&(e=-i.WORLD_BOUNDARY);var o=this.rect.y;o>i.WORLD_BOUNDARY?o=i.WORLD_BOUNDARY:o<-i.WORLD_BOUNDARY&&(o=-i.WORLD_BOUNDARY);var f=new c(e,o),l=r.inverseTransformPoint(f);this.setLocation(l.x,l.y)},t.prototype.getLeft=function(){return this.rect.x},t.prototype.getRight=function(){return this.rect.x+this.rect.width},t.prototype.getTop=function(){return this.rect.y},t.prototype.getBottom=function(){return this.rect.y+this.rect.height},t.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},E.exports=t},function(E,w,N){"use strict";var g=N(0);function s(){}L(s,"FDLayoutConstants");for(var n in g)s[n]=g[n];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,E.exports=s},function(E,w,N){"use strict";function g(s,n){s==null&&n==null?(this.x=0,this.y=0):(this.x=s,this.y=n)}L(g,"PointD"),g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},E.exports=g},function(E,w,N){"use strict";var g=N(2),s=N(10),n=N(0),i=N(7),a=N(3),c=N(1),t=N(13),u=N(12),r=N(11);function e(f,l,A){g.call(this,A),this.estimatedSize=s.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,l!=null&&l instanceof i?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}L(e,"LGraph"),e.prototype=Object.create(g.prototype);for(var o in g)e[o]=g[o];e.prototype.getNodes=function(){return this.nodes},e.prototype.getEdges=function(){return this.edges},e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getParent=function(){return this.parent},e.prototype.getLeft=function(){return this.left},e.prototype.getRight=function(){return this.right},e.prototype.getTop=function(){return this.top},e.prototype.getBottom=function(){return this.bottom},e.prototype.isConnected=function(){return this.isConnected},e.prototype.add=function(f,l,A){if(l==null&&A==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 y=f;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(A)>-1))throw"Source or target not in graph!";if(!(l.owner==A.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=A.owner?null:(y.source=l,y.target=A,y.isInterGraph=!1,this.getEdges().push(y),l.edges.push(y),A!=l&&A.edges.push(y),y)}},e.prototype.remove=function(f){var l=f;if(f instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var A=l.edges.slice(),v,y=A.length,D=0;D<y;D++)v=A[D],v.isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);var S=this.nodes.indexOf(l);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(f instanceof c){var v=f;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 C=v.source.edges.indexOf(v),b=v.target.edges.indexOf(v);if(!(C>-1&&b>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(C,1),v.target!=v.source&&v.target.edges.splice(b,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},e.prototype.updateLeftTop=function(){for(var f=s.MAX_VALUE,l=s.MAX_VALUE,A,v,y,D=this.getNodes(),S=D.length,C=0;C<S;C++){var b=D[C];A=b.getTop(),v=b.getLeft(),f>A&&(f=A),l>v&&(l=v)}return f==s.MAX_VALUE?null:(D[0].getParent().paddingLeft!=null?y=D[0].getParent().paddingLeft:y=this.margin,this.left=l-y,this.top=f-y,new u(this.left,this.top))},e.prototype.updateBounds=function(f){for(var l=s.MAX_VALUE,A=-s.MAX_VALUE,v=s.MAX_VALUE,y=-s.MAX_VALUE,D,S,C,b,z,X=this.nodes,K=X.length,R=0;R<K;R++){var J=X[R];f&&J.child!=null&&J.updateBounds(),D=J.getLeft(),S=J.getRight(),C=J.getTop(),b=J.getBottom(),l>D&&(l=D),A<S&&(A=S),v>C&&(v=C),y<b&&(y=b)}var h=new t(l,v,A-l,y-v);l==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?z=X[0].getParent().paddingLeft:z=this.margin,this.left=h.x-z,this.right=h.x+h.width+z,this.top=h.y-z,this.bottom=h.y+h.height+z},e.calculateBounds=function(f){for(var l=s.MAX_VALUE,A=-s.MAX_VALUE,v=s.MAX_VALUE,y=-s.MAX_VALUE,D,S,C,b,z=f.length,X=0;X<z;X++){var K=f[X];D=K.getLeft(),S=K.getRight(),C=K.getTop(),b=K.getBottom(),l>D&&(l=D),A<S&&(A=S),v>C&&(v=C),y<b&&(y=b)}var R=new t(l,v,A-l,y-v);return R},e.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){for(var f=0,l=this.nodes,A=l.length,v=0;v<A;v++){var y=l[v];f+=y.calcEstimatedSize()}return f==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=f/Math.sqrt(this.nodes.length),this.estimatedSize},e.prototype.updateConnected=function(){var f=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new r,A=new Set,v=this.nodes[0],y,D,S=v.withChildren();for(S.forEach(function(R){l.push(R),A.add(R)});l.length!==0;){v=l.shift(),y=v.getEdges();for(var C=y.length,b=0;b<C;b++){var z=y[b];if(D=z.getOtherEndInGraph(v,this),D!=null&&!A.has(D)){var X=D.withChildren();X.forEach(function(R){l.push(R),A.add(R)})}}}if(this.isConnected=!1,A.size>=this.nodes.length){var K=0;A.forEach(function(R){R.owner==f&&K++}),K==this.nodes.length&&(this.isConnected=!0)}},E.exports=e},function(E,w,N){"use strict";var g,s=N(1);function n(i){g=N(6),this.layout=i,this.graphs=[],this.edges=[]}L(n,"LGraphManager"),n.prototype.addRoot=function(){var i=this.layout.newGraph(),a=this.layout.newNode(null),c=this.add(i,a);return this.setRootGraph(c),this.rootGraph},n.prototype.add=function(i,a,c,t,u){if(c==null&&t==null&&u==null){if(i==null)throw"Graph is null!";if(a==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(a.child!=null)throw"Already has a child!";return i.parent=a,a.child=i,i}else{u=c,t=a,c=i;var r=t.getOwner(),e=u.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(e!=null&&e.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==e)return c.isInterGraph=!1,r.add(c,t,u);if(c.isInterGraph=!0,c.source=t,c.target=u,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),!(c.source!=null&&c.target!=null))throw"Edge source and/or target is null!";if(!(c.source.edges.indexOf(c)==-1&&c.target.edges.indexOf(c)==-1))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c}},n.prototype.remove=function(i){if(i instanceof g){var a=i;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 c=[];c=c.concat(a.getEdges());for(var t,u=c.length,r=0;r<u;r++)t=c[r],a.remove(t);var e=[];e=e.concat(a.getNodes());var o;u=e.length;for(var r=0;r<u;r++)o=e[r],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var f=this.graphs.indexOf(a);this.graphs.splice(f,1),a.parent=null}else if(i instanceof s){if(t=i,t==null)throw"Edge is null!";if(!t.isInterGraph)throw"Not an inter-graph edge!";if(!(t.source!=null&&t.target!=null))throw"Source and/or target is null!";if(!(t.source.edges.indexOf(t)!=-1&&t.target.edges.indexOf(t)!=-1))throw"Source and/or target doesn't know this edge!";var f=t.source.edges.indexOf(t);if(t.source.edges.splice(f,1),f=t.target.edges.indexOf(t),t.target.edges.splice(f,1),!(t.source.owner!=null&&t.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(t.source.owner.getGraphManager().edges.indexOf(t)==-1)throw"Not in owner graph manager's edge list!";var f=t.source.owner.getGraphManager().edges.indexOf(t);t.source.owner.getGraphManager().edges.splice(f,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],a=this.getGraphs(),c=a.length,t=0;t<c;t++)i=i.concat(a[t].getNodes());this.allNodes=i}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){for(var i=[],a=this.getGraphs(),c=a.length,t=0;t<a.length;t++)i=i.concat(a[t].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},n.prototype.getRoot=function(){return this.rootGraph},n.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"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(i,a){if(!(i!=null&&a!=null))throw"assert failed";if(i==a)return!0;var c=i.getOwner(),t;do{if(t=c.getParent(),t==null)break;if(t==a)return!0;if(c=t.getOwner(),c==null)break}while(!0);c=a.getOwner();do{if(t=c.getParent(),t==null)break;if(t==i)return!0;if(c=t.getOwner(),c==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var i,a,c,t,u,r=this.getAllEdges(),e=r.length,o=0;o<e;o++){if(i=r[o],a=i.source,c=i.target,i.lca=null,i.sourceInLca=a,i.targetInLca=c,a==c){i.lca=a.getOwner();continue}for(t=a.getOwner();i.lca==null;){for(i.targetInLca=c,u=c.getOwner();i.lca==null;){if(u==t){i.lca=u;break}if(u==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=u.getParent(),u=i.targetInLca.getOwner()}if(t==this.rootGraph)break;i.lca==null&&(i.sourceInLca=t.getParent(),t=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(i,a){if(i==a)return i.getOwner();var c=i.getOwner();do{if(c==null)break;var t=a.getOwner();do{if(t==null)break;if(t==c)return t;t=t.getParent().getOwner()}while(!0);c=c.getParent().getOwner()}while(!0);return c},n.prototype.calcInclusionTreeDepths=function(i,a){i==null&&a==null&&(i=this.rootGraph,a=1);for(var c,t=i.getNodes(),u=t.length,r=0;r<u;r++)c=t[r],c.inclusionTreeDepth=a,c.child!=null&&this.calcInclusionTreeDepths(c.child,a+1)},n.prototype.includesInvalidEdge=function(){for(var i,a=[],c=this.edges.length,t=0;t<c;t++)i=this.edges[t],this.isOneAncestorOfOther(i.source,i.target)&&a.push(i);for(var t=0;t<a.length;t++)this.remove(a[t]);return!1},E.exports=n},function(E,w,N){"use strict";var g=N(12);function s(){}L(s,"IGeometry"),s.calcSeparationAmount=function(n,i,a,c){if(!n.intersects(i))throw"assert failed";var t=new Array(2);this.decideDirectionsForOverlappingNodes(n,i,t),a[0]=Math.min(n.getRight(),i.getRight())-Math.max(n.x,i.x),a[1]=Math.min(n.getBottom(),i.getBottom())-Math.max(n.y,i.y),n.getX()<=i.getX()&&n.getRight()>=i.getRight()?a[0]+=Math.min(i.getX()-n.getX(),n.getRight()-i.getRight()):i.getX()<=n.getX()&&i.getRight()>=n.getRight()&&(a[0]+=Math.min(n.getX()-i.getX(),i.getRight()-n.getRight())),n.getY()<=i.getY()&&n.getBottom()>=i.getBottom()?a[1]+=Math.min(i.getY()-n.getY(),n.getBottom()-i.getBottom()):i.getY()<=n.getY()&&i.getBottom()>=n.getBottom()&&(a[1]+=Math.min(n.getY()-i.getY(),i.getBottom()-n.getBottom()));var u=Math.abs((i.getCenterY()-n.getCenterY())/(i.getCenterX()-n.getCenterX()));i.getCenterY()===n.getCenterY()&&i.getCenterX()===n.getCenterX()&&(u=1);var r=u*a[0],e=a[1]/u;a[0]<e?e=a[0]:r=a[1],a[0]=-1*t[0]*(e/2+c),a[1]=-1*t[1]*(r/2+c)},s.decideDirectionsForOverlappingNodes=function(n,i,a){n.getCenterX()<i.getCenterX()?a[0]=-1:a[0]=1,n.getCenterY()<i.getCenterY()?a[1]=-1:a[1]=1},s.getIntersection2=function(n,i,a){var c=n.getCenterX(),t=n.getCenterY(),u=i.getCenterX(),r=i.getCenterY();if(n.intersects(i))return a[0]=c,a[1]=t,a[2]=u,a[3]=r,!0;var e=n.getX(),o=n.getY(),f=n.getRight(),l=n.getX(),A=n.getBottom(),v=n.getRight(),y=n.getWidthHalf(),D=n.getHeightHalf(),S=i.getX(),C=i.getY(),b=i.getRight(),z=i.getX(),X=i.getBottom(),K=i.getRight(),R=i.getWidthHalf(),J=i.getHeightHalf(),h=!1,m=!1;if(c===u){if(t>r)return a[0]=c,a[1]=o,a[2]=u,a[3]=X,!1;if(t<r)return a[0]=c,a[1]=A,a[2]=u,a[3]=C,!1}else if(t===r){if(c>u)return a[0]=e,a[1]=t,a[2]=b,a[3]=r,!1;if(c<u)return a[0]=f,a[1]=t,a[2]=S,a[3]=r,!1}else{var d=n.height/n.width,T=i.height/i.width,p=(r-t)/(u-c),O=void 0,x=void 0,G=void 0,F=void 0,I=void 0,Z=void 0;if(-d===p?c>u?(a[0]=l,a[1]=A,h=!0):(a[0]=f,a[1]=o,h=!0):d===p&&(c>u?(a[0]=e,a[1]=o,h=!0):(a[0]=v,a[1]=A,h=!0)),-T===p?u>c?(a[2]=z,a[3]=X,m=!0):(a[2]=b,a[3]=C,m=!0):T===p&&(u>c?(a[2]=S,a[3]=C,m=!0):(a[2]=K,a[3]=X,m=!0)),h&&m)return!1;if(c>u?t>r?(O=this.getCardinalDirection(d,p,4),x=this.getCardinalDirection(T,p,2)):(O=this.getCardinalDirection(-d,p,3),x=this.getCardinalDirection(-T,p,1)):t>r?(O=this.getCardinalDirection(-d,p,1),x=this.getCardinalDirection(-T,p,3)):(O=this.getCardinalDirection(d,p,2),x=this.getCardinalDirection(T,p,4)),!h)switch(O){case 1:F=o,G=c+-D/p,a[0]=G,a[1]=F;break;case 2:G=v,F=t+y*p,a[0]=G,a[1]=F;break;case 3:F=A,G=c+D/p,a[0]=G,a[1]=F;break;case 4:G=l,F=t+-y*p,a[0]=G,a[1]=F;break}if(!m)switch(x){case 1:Z=C,I=u+-J/p,a[2]=I,a[3]=Z;break;case 2:I=K,Z=r+R*p,a[2]=I,a[3]=Z;break;case 3:Z=X,I=u+J/p,a[2]=I,a[3]=Z;break;case 4:I=z,Z=r+-R*p,a[2]=I,a[3]=Z;break}}return!1},s.getCardinalDirection=function(n,i,a){return n>i?a:1+a%4},s.getIntersection=function(n,i,a,c){if(c==null)return this.getIntersection2(n,i,a);var t=n.x,u=n.y,r=i.x,e=i.y,o=a.x,f=a.y,l=c.x,A=c.y,v=void 0,y=void 0,D=void 0,S=void 0,C=void 0,b=void 0,z=void 0,X=void 0,K=void 0;return D=e-u,C=t-r,z=r*u-t*e,S=A-f,b=o-l,X=l*f-o*A,K=D*b-S*C,K===0?null:(v=(C*X-b*z)/K,y=(S*z-D*X)/K,new g(v,y))},s.angleOfVector=function(n,i,a,c){var t=void 0;return n!==a?(t=Math.atan((c-i)/(a-n)),a<n?t+=Math.PI:c<i&&(t+=this.TWO_PI)):c<i?t=this.ONE_AND_HALF_PI:t=this.HALF_PI,t},s.doIntersect=function(n,i,a,c){var t=n.x,u=n.y,r=i.x,e=i.y,o=a.x,f=a.y,l=c.x,A=c.y,v=(r-t)*(A-f)-(l-o)*(e-u);if(v===0)return!1;var y=((A-f)*(l-t)+(o-l)*(A-u))/v,D=((u-e)*(l-t)+(r-t)*(A-u))/v;return 0<y&&y<1&&0<D&&D<1},s.findCircleLineIntersections=function(n,i,a,c,t,u,r){var e=(a-n)*(a-n)+(c-i)*(c-i),o=2*((n-t)*(a-n)+(i-u)*(c-i)),f=(n-t)*(n-t)+(i-u)*(i-u)-r*r,l=o*o-4*e*f;if(l>=0){var A=(-o+Math.sqrt(o*o-4*e*f))/(2*e),v=(-o-Math.sqrt(o*o-4*e*f))/(2*e),y=null;return A>=0&&A<=1?[A]:v>=0&&v<=1?[v]:y}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,E.exports=s},function(E,w,N){"use strict";function g(){}L(g,"IMath"),g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},E.exports=g},function(E,w,N){"use strict";function g(){}L(g,"Integer"),g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,E.exports=g},function(E,w,N){"use strict";var g=function(){function t(u,r){for(var e=0;e<r.length;e++){var o=r[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return L(t,"defineProperties"),function(u,r,e){return r&&t(u.prototype,r),e&&t(u,e),u}}();function s(t,u){if(!(t instanceof u))throw new TypeError("Cannot call a class as a function")}L(s,"_classCallCheck");var n=L(function(u){return{value:u,next:null,prev:null}},"nodeFrom"),i=L(function(u,r,e,o){return u!==null?u.next=r:o.head=r,e!==null?e.prev=r:o.tail=r,r.prev=u,r.next=e,o.length++,r},"add"),a=L(function(u,r){var e=u.prev,o=u.next;return e!==null?e.next=o:r.head=o,o!==null?o.prev=e:r.tail=e,u.prev=u.next=null,r.length--,u},"_remove"),c=function(){function t(u){var r=this;s(this,t),this.length=0,this.head=null,this.tail=null,u?.forEach(function(e){return r.push(e)})}return L(t,"LinkedList"),g(t,[{key:"size",value:L(function(){return this.length},"size")},{key:"insertBefore",value:L(function(r,e){return i(e.prev,n(r),e,this)},"insertBefore")},{key:"insertAfter",value:L(function(r,e){return i(e,n(r),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:L(function(r,e){return i(e.prev,r,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:L(function(r,e){return i(e,r,e.next,this)},"insertNodeAfter")},{key:"push",value:L(function(r){return i(this.tail,n(r),null,this)},"push")},{key:"unshift",value:L(function(r){return i(null,n(r),this.head,this)},"unshift")},{key:"remove",value:L(function(r){return a(r,this)},"remove")},{key:"pop",value:L(function(){return a(this.tail,this).value},"pop")},{key:"popNode",value:L(function(){return a(this.tail,this)},"popNode")},{key:"shift",value:L(function(){return a(this.head,this).value},"shift")},{key:"shiftNode",value:L(function(){return a(this.head,this)},"shiftNode")},{key:"get_object_at",value:L(function(r){if(r<=this.length()){for(var e=1,o=this.head;e<r;)o=o.next,e++;return o.value}},"get_object_at")},{key:"set_object_at",value:L(function(r,e){if(r<=this.length()){for(var o=1,f=this.head;o<r;)f=f.next,o++;f.value=e}},"set_object_at")}]),t}();E.exports=c},function(E,w,N){"use strict";function g(s,n,i){this.x=null,this.y=null,s==null&&n==null&&i==null?(this.x=0,this.y=0):typeof s=="number"&&typeof n=="number"&&i==null?(this.x=s,this.y=n):s.constructor.name=="Point"&&n==null&&i==null&&(i=s,this.x=i.x,this.y=i.y)}L(g,"Point"),g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.getLocation=function(){return new g(this.x,this.y)},g.prototype.setLocation=function(s,n,i){s.constructor.name=="Point"&&n==null&&i==null?(i=s,this.setLocation(i.x,i.y)):typeof s=="number"&&typeof n=="number"&&i==null&&(parseInt(s)==s&&parseInt(n)==n?this.move(s,n):(this.x=Math.floor(s+.5),this.y=Math.floor(n+.5)))},g.prototype.move=function(s,n){this.x=s,this.y=n},g.prototype.translate=function(s,n){this.x+=s,this.y+=n},g.prototype.equals=function(s){if(s.constructor.name=="Point"){var n=s;return this.x==n.x&&this.y==n.y}return this==s},g.prototype.toString=function(){return new g().constructor.name+"[x="+this.x+",y="+this.y+"]"},E.exports=g},function(E,w,N){"use strict";function g(s,n,i,a){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&n!=null&&i!=null&&a!=null&&(this.x=s,this.y=n,this.width=i,this.height=a)}L(g,"RectangleD"),g.prototype.getX=function(){return this.x},g.prototype.setX=function(s){this.x=s},g.prototype.getY=function(){return this.y},g.prototype.setY=function(s){this.y=s},g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(s){this.width=s},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(s){this.height=s},g.prototype.getRight=function(){return this.x+this.width},g.prototype.getBottom=function(){return this.y+this.height},g.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},g.prototype.getCenterX=function(){return this.x+this.width/2},g.prototype.getMinX=function(){return this.getX()},g.prototype.getMaxX=function(){return this.getX()+this.width},g.prototype.getCenterY=function(){return this.y+this.height/2},g.prototype.getMinY=function(){return this.getY()},g.prototype.getMaxY=function(){return this.getY()+this.height},g.prototype.getWidthHalf=function(){return this.width/2},g.prototype.getHeightHalf=function(){return this.height/2},E.exports=g},function(E,w,N){"use strict";var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function s(){}L(s,"UniqueIDGeneretor"),s.lastID=0,s.createID=function(n){return s.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=s.getString(),s.lastID++),n.uniqueID)},s.getString=function(n){return n==null&&(n=s.lastID),"Object#"+n},s.isPrimitive=function(n){var i=typeof n>"u"?"undefined":g(n);return n==null||i!="object"&&i!="function"},E.exports=s},function(E,w,N){"use strict";function g(o){if(Array.isArray(o)){for(var f=0,l=Array(o.length);f<o.length;f++)l[f]=o[f];return l}else return Array.from(o)}L(g,"_toConsumableArray");var s=N(0),n=N(7),i=N(3),a=N(1),c=N(6),t=N(5),u=N(17),r=N(29);function e(o){r.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}L(e,"Layout"),e.RANDOM_SEED=1,e.prototype=Object.create(r.prototype),e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},e.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},e.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},e.prototype.newGraphManager=function(){var o=new n(this);return this.graphManager=o,o},e.prototype.newGraph=function(o){return new c(null,this.graphManager,o)},e.prototype.newNode=function(o){return new i(this.graphManager,o)},e.prototype.newEdge=function(o){return new a(null,null,o)},e.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},e.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),s.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},e.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},e.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o,f=this.graphManager.getAllEdges(),l=0;l<f.length;l++)o=f[l];for(var A,v=this.graphManager.getRoot().getNodes(),l=0;l<v.length;l++)A=v[l];this.update(this.graphManager.getRoot())}},e.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof i){var f=o;if(f.getChild()!=null)for(var l=f.getChild().getNodes(),A=0;A<l.length;A++)update(l[A]);if(f.vGraphObject!=null){var v=f.vGraphObject;v.update(f)}}else if(o instanceof a){var y=o;if(y.vGraphObject!=null){var D=y.vGraphObject;D.update(y)}}else if(o instanceof c){var S=o;if(S.vGraphObject!=null){var C=S.vGraphObject;C.update(S)}}},e.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},e.prototype.transform=function(o){if(o==null)this.transform(new t(0,0));else{var f=new u,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){f.setWorldOrgX(o.x),f.setWorldOrgY(o.y),f.setDeviceOrgX(l.x),f.setDeviceOrgY(l.y);for(var A=this.getAllNodes(),v,y=0;y<A.length;y++)v=A[y],v.transform(f)}}},e.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var f,l,A=o.getNodes(),v=0;v<A.length;v++)f=A[v],l=f.getChild(),l==null||l.getNodes().length==0?f.scatter():(this.positionNodesRandomly(l),f.updateBounds())},e.prototype.getFlatForest=function(){for(var o=[],f=!0,l=this.graphManager.getRoot().getNodes(),A=!0,v=0;v<l.length;v++)l[v].getChild()!=null&&(A=!1);if(!A)return o;var y=new Set,D=[],S=new Map,C=[];for(C=C.concat(l);C.length>0&&f;){for(D.push(C[0]);D.length>0&&f;){var b=D[0];D.splice(0,1),y.add(b);for(var z=b.getEdges(),v=0;v<z.length;v++){var X=z[v].getOtherEnd(b);if(S.get(b)!=X)if(!y.has(X))D.push(X),S.set(X,b);else{f=!1;break}}}if(!f)o=[];else{var K=[].concat(g(y));o.push(K);for(var v=0;v<K.length;v++){var R=K[v],J=C.indexOf(R);J>-1&&C.splice(J,1)}y=new Set,S=new Map}}return o},e.prototype.createDummyNodesForBendpoints=function(o){for(var f=[],l=o.source,A=this.graphManager.calcLowestCommonAncestor(o.source,o.target),v=0;v<o.bendpoints.length;v++){var y=this.newNode(null);y.setRect(new Point(0,0),new Dimension(1,1)),A.add(y);var D=this.newEdge(null);this.graphManager.add(D,l,y),f.add(y),l=y}var D=this.newEdge(null);return this.graphManager.add(D,l,o.target),this.edgeToDummyNodes.set(o,f),o.isInterGraph()?this.graphManager.remove(o):A.remove(o),f},e.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(g(this.edgeToDummyNodes.keys())).concat(o);for(var f=0;f<o.length;f++){var l=o[f];if(l.bendpoints.length>0){for(var A=this.edgeToDummyNodes.get(l),v=0;v<A.length;v++){var y=A[v],D=new t(y.getCenterX(),y.getCenterY()),S=l.bendpoints.get(v);S.x=D.x,S.y=D.y,y.getOwner().remove(y)}this.graphManager.add(l,l.source,l.target)}}},e.transform=function(o,f,l,A){if(l!=null&&A!=null){var v=f;if(o<=50){var y=f/l;v-=(f-y)/50*(50-o)}else{var D=f*A;v+=(D-f)/50*(o-50)}return v}else{var S,C;return o<=50?(S=9*f/500,C=f/10):(S=9*f/50,C=-8*f),S*o+C}},e.findCenterOfTree=function(o){var f=[];f=f.concat(o);var l=[],A=new Map,v=!1,y=null;(f.length==1||f.length==2)&&(v=!0,y=f[0]);for(var D=0;D<f.length;D++){var S=f[D],C=S.getNeighborsList().size;A.set(S,S.getNeighborsList().size),C==1&&l.push(S)}var b=[];for(b=b.concat(l);!v;){var z=[];z=z.concat(b),b=[];for(var D=0;D<f.length;D++){var S=f[D],X=f.indexOf(S);X>=0&&f.splice(X,1);var K=S.getNeighborsList();K.forEach(function(h){if(l.indexOf(h)<0){var m=A.get(h),d=m-1;d==1&&b.push(h),A.set(h,d)}})}l=l.concat(b),(f.length==1||f.length==2)&&(v=!0,y=f[0])}return y},e.prototype.setGraphManager=function(o){this.graphManager=o},E.exports=e},function(E,w,N){"use strict";function g(){}L(g,"RandomSeed"),g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},E.exports=g},function(E,w,N){"use strict";var g=N(5);function s(n,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}L(s,"Transform"),s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(n){this.lworldExtX=n},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(n){this.lworldExtY=n},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},s.prototype.transformX=function(n){var i=0,a=this.lworldExtX;return a!=0&&(i=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/a),i},s.prototype.transformY=function(n){var i=0,a=this.lworldExtY;return a!=0&&(i=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/a),i},s.prototype.inverseTransformX=function(n){var i=0,a=this.ldeviceExtX;return a!=0&&(i=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/a),i},s.prototype.inverseTransformY=function(n){var i=0,a=this.ldeviceExtY;return a!=0&&(i=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/a),i},s.prototype.inverseTransformPoint=function(n){var i=new g(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return i},E.exports=s},function(E,w,N){"use strict";function g(r){if(Array.isArray(r)){for(var e=0,o=Array(r.length);e<r.length;e++)o[e]=r[e];return o}else return Array.from(r)}L(g,"_toConsumableArray");var s=N(15),n=N(4),i=N(0),a=N(8),c=N(9);function t(){s.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}L(t,"FDLayout"),t.prototype=Object.create(s.prototype);for(var u in s)t[u]=s[u];t.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},t.prototype.calcIdealEdgeLengths=function(){for(var r,e,o,f,l,A,v,y=this.getGraphManager().getAllEdges(),D=0;D<y.length;D++)r=y[D],e=r.idealLength,r.isInterGraph&&(f=r.getSource(),l=r.getTarget(),A=r.getSourceInLca().getEstimatedSize(),v=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=A+v-2*i.SIMPLE_NODE_SIZE),o=r.getLca().getInclusionTreeDepth(),r.idealLength+=e*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(f.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},t.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-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):(r>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(r-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()},t.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),e,o=0;o<r.length;o++)e=r[o],this.calcSpringForce(e,e.idealLength)},t.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,f,l,A,v=this.getAllNodes(),y;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),y=new Set,o=0;o<v.length;o++)l=v[o],this.calculateRepulsionForceOfANode(l,y,r,e),y.add(l);else for(o=0;o<v.length;o++)for(l=v[o],f=o+1;f<v.length;f++)A=v[f],l.getOwner()==A.getOwner()&&this.calcRepulsionForce(l,A)},t.prototype.calcGravitationalForces=function(){for(var r,e=this.getAllNodesToApplyGravitation(),o=0;o<e.length;o++)r=e[o],this.calcGravitationalForce(r)},t.prototype.moveNodes=function(){for(var r=this.getAllNodes(),e,o=0;o<r.length;o++)e=r[o],e.move()},t.prototype.calcSpringForce=function(r,e){var o=r.getSource(),f=r.getTarget(),l,A,v,y;if(this.uniformLeafNodeSizes&&o.getChild()==null&&f.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;l=r.getLength(),l!=0&&(A=r.edgeElasticity*(l-e),v=A*(r.lengthX/l),y=A*(r.lengthY/l),o.springForceX+=v,o.springForceY+=y,f.springForceX-=v,f.springForceY-=y)},t.prototype.calcRepulsionForce=function(r,e){var o=r.getRect(),f=e.getRect(),l=new Array(2),A=new Array(4),v,y,D,S,C,b,z;if(o.intersects(f)){a.calcSeparationAmount(o,f,l,n.DEFAULT_EDGE_LENGTH/2),b=2*l[0],z=2*l[1];var X=r.noOfChildren*e.noOfChildren/(r.noOfChildren+e.noOfChildren);r.repulsionForceX-=X*b,r.repulsionForceY-=X*z,e.repulsionForceX+=X*b,e.repulsionForceY+=X*z}else this.uniformLeafNodeSizes&&r.getChild()==null&&e.getChild()==null?(v=f.getCenterX()-o.getCenterX(),y=f.getCenterY()-o.getCenterY()):(a.getIntersection(o,f,A),v=A[2]-A[0],y=A[3]-A[1]),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=c.sign(v)*n.MIN_REPULSION_DIST),Math.abs(y)<n.MIN_REPULSION_DIST&&(y=c.sign(y)*n.MIN_REPULSION_DIST),D=v*v+y*y,S=Math.sqrt(D),C=(r.nodeRepulsion/2+e.nodeRepulsion/2)*r.noOfChildren*e.noOfChildren/D,b=C*v/S,z=C*y/S,r.repulsionForceX-=b,r.repulsionForceY-=z,e.repulsionForceX+=b,e.repulsionForceY+=z},t.prototype.calcGravitationalForce=function(r){var e,o,f,l,A,v,y,D;e=r.getOwner(),o=(e.getRight()+e.getLeft())/2,f=(e.getTop()+e.getBottom())/2,l=r.getCenterX()-o,A=r.getCenterY()-f,v=Math.abs(l)+r.getWidth()/2,y=Math.abs(A)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(D=e.getEstimatedSize()*this.gravityRangeFactor,(v>D||y>D)&&(r.gravitationForceX=-this.gravityConstant*l,r.gravitationForceY=-this.gravityConstant*A)):(D=e.getEstimatedSize()*this.compoundGravityRangeFactor,(v>D||y>D)&&(r.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*A*this.compoundGravityConstant))},t.prototype.isConverged=function(){var r,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||e},t.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},t.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,e=this.graphManager.getAllNodes(),o=0;o<e.length;o++)r=e[o],r.noOfChildren=r.getNoOfChildren()},t.prototype.calcGrid=function(r){var e=0,o=0;e=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var f=new Array(e),l=0;l<e;l++)f[l]=new Array(o);for(var l=0;l<e;l++)for(var A=0;A<o;A++)f[l][A]=new Array;return f},t.prototype.addNodeToGrid=function(r,e,o){var f=0,l=0,A=0,v=0;f=parseInt(Math.floor((r.getRect().x-e)/this.repulsionRange)),l=parseInt(Math.floor((r.getRect().width+r.getRect().x-e)/this.repulsionRange)),A=parseInt(Math.floor((r.getRect().y-o)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().height+r.getRect().y-o)/this.repulsionRange));for(var y=f;y<=l;y++)for(var D=A;D<=v;D++)this.grid[y][D].push(r),r.setGridCoordinates(f,l,A,v)},t.prototype.updateGrid=function(){var r,e,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<o.length;r++)e=o[r],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},t.prototype.calculateRepulsionForceOfANode=function(r,e,o,f){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||f){var l=new Set;r.surrounding=new Array;for(var A,v=this.grid,y=r.startX-1;y<r.finishX+2;y++)for(var D=r.startY-1;D<r.finishY+2;D++)if(!(y<0||D<0||y>=v.length||D>=v[0].length)){for(var S=0;S<v[y][D].length;S++)if(A=v[y][D][S],!(r.getOwner()!=A.getOwner()||r==A)&&!e.has(A)&&!l.has(A)){var C=Math.abs(r.getCenterX()-A.getCenterX())-(r.getWidth()/2+A.getWidth()/2),b=Math.abs(r.getCenterY()-A.getCenterY())-(r.getHeight()/2+A.getHeight()/2);C<=this.repulsionRange&&b<=this.repulsionRange&&l.add(A)}}r.surrounding=[].concat(g(l))}for(y=0;y<r.surrounding.length;y++)this.calcRepulsionForce(r,r.surrounding[y])},t.prototype.calcRepulsionRange=function(){return 0},E.exports=t},function(E,w,N){"use strict";var g=N(1),s=N(4);function n(a,c,t){g.call(this,a,c,t),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}L(n,"FDLayoutEdge"),n.prototype=Object.create(g.prototype);for(var i in g)n[i]=g[i];E.exports=n},function(E,w,N){"use strict";var g=N(3),s=N(4);function n(a,c,t,u){g.call(this,a,c,t,u),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,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=[]}L(n,"FDLayoutNode"),n.prototype=Object.create(g.prototype);for(var i in g)n[i]=g[i];n.prototype.setGridCoordinates=function(a,c,t,u){this.startX=a,this.finishX=c,this.startY=t,this.finishY=u},E.exports=n},function(E,w,N){"use strict";function g(s,n){this.width=0,this.height=0,s!==null&&n!==null&&(this.height=n,this.width=s)}L(g,"DimensionD"),g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(s){this.width=s},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(s){this.height=s},E.exports=g},function(E,w,N){"use strict";var g=N(14);function s(){this.map={},this.keys=[]}L(s,"HashMap"),s.prototype.put=function(n,i){var a=g.createID(n);this.contains(a)||(this.map[a]=i,this.keys.push(n))},s.prototype.contains=function(n){var i=g.createID(n);return this.map[n]!=null},s.prototype.get=function(n){var i=g.createID(n);return this.map[i]},s.prototype.keySet=function(){return this.keys},E.exports=s},function(E,w,N){"use strict";var g=N(14);function s(){this.set={}}L(s,"HashSet"),s.prototype.add=function(n){var i=g.createID(n);this.contains(i)||(this.set[i]=n)},s.prototype.remove=function(n){delete this.set[g.createID(n)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(n){return this.set[g.createID(n)]==n},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(n){for(var i=Object.keys(this.set),a=i.length,c=0;c<a;c++)n.push(this.set[i[c]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(n){for(var i=n.length,a=0;a<i;a++){var c=n[a];this.add(c)}},E.exports=s},function(E,w,N){"use strict";function g(){}L(g,"Matrix"),g.multMat=function(s,n){for(var i=[],a=0;a<s.length;a++){i[a]=[];for(var c=0;c<n[0].length;c++){i[a][c]=0;for(var t=0;t<s[0].length;t++)i[a][c]+=s[a][t]*n[t][c]}}return i},g.transpose=function(s){for(var n=[],i=0;i<s[0].length;i++){n[i]=[];for(var a=0;a<s.length;a++)n[i][a]=s[a][i]}return n},g.multCons=function(s,n){for(var i=[],a=0;a<s.length;a++)i[a]=s[a]*n;return i},g.minusOp=function(s,n){for(var i=[],a=0;a<s.length;a++)i[a]=s[a]-n[a];return i},g.dotProduct=function(s,n){for(var i=0,a=0;a<s.length;a++)i+=s[a]*n[a];return i},g.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},g.normalize=function(s){for(var n=[],i=this.mag(s),a=0;a<s.length;a++)n[a]=s[a]/i;