markdown-flow-ui 0.1.118-dev.1 → 0.1.118-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs10.js +1 -1
- package/dist/_virtual/index.cjs11.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.es10.js +2 -3
- package/dist/_virtual/index.es10.js.map +1 -1
- package/dist/_virtual/index.es11.js +3 -2
- package/dist/_virtual/index.es11.js.map +1 -1
- package/dist/_virtual/index.es5.js +4 -4
- package/dist/_virtual/index.es6.js +4 -4
- package/dist/components/ContentRender/IframeSandbox.cjs.js +6 -6
- package/dist/components/ContentRender/IframeSandbox.cjs.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.es.js +200 -200
- package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.cjs.js +12 -11
- package/dist/components/ContentRender/SandboxApp.cjs.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.es.js +82 -82
- package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs.js +1 -1
- package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs.js.map +1 -1
- package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.es.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/node_modules/layout-base/layout-base.cjs.js +1 -1
- package/dist/node_modules/layout-base/layout-base.cjs.js.map +1 -1
- package/dist/node_modules/layout-base/layout-base.es.js +1 -1
- package/dist/node_modules/rc-util/es/ref.cjs.js +1 -1
- package/dist/node_modules/rc-util/es/ref.es.js +1 -1
- package/dist/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/node_modules/unified/lib/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const It=require("../../../../_virtual/layout-base.cjs2.js");var Wt=It.__module.exports,Yt;function Vt(){return Yt||(Yt=1,(function(Xt,zt){(function(M,d){Xt.exports=d()})(Wt,function(){return(function(L){var M={};function d(h){if(M[h])return M[h].exports;var i=M[h]={i:h,l:!1,exports:{}};return L[h].call(i.exports,i,i.exports,d),i.l=!0,i.exports}return d.m=L,d.c=M,d.i=function(h){return h},d.d=function(h,i,r){d.o(h,i)||Object.defineProperty(h,i,{configurable:!1,enumerable:!0,get:r})},d.n=function(h){var i=h&&h.__esModule?function(){return h.default}:function(){return h};return d.d(i,"a",i),i},d.o=function(h,i){return Object.prototype.hasOwnProperty.call(h,i)},d.p="",d(d.s=28)})([(function(L,M,d){function h(){}h.QUALITY=1,h.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,h.DEFAULT_INCREMENTAL=!1,h.DEFAULT_ANIMATION_ON_LAYOUT=!0,h.DEFAULT_ANIMATION_DURING_LAYOUT=!1,h.DEFAULT_ANIMATION_PERIOD=50,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,h.DEFAULT_GRAPH_MARGIN=15,h.NODE_DIMENSIONS_INCLUDE_LABELS=!1,h.SIMPLE_NODE_SIZE=40,h.SIMPLE_NODE_HALF_SIZE=h.SIMPLE_NODE_SIZE/2,h.EMPTY_COMPOUND_NODE_SIZE=40,h.MIN_EDGE_LENGTH=1,h.WORLD_BOUNDARY=1e6,h.INITIAL_WORLD_BOUNDARY=h.WORLD_BOUNDARY/1e3,h.WORLD_CENTER_X=1200,h.WORLD_CENTER_Y=900,L.exports=h}),(function(L,M,d){var h=d(2),i=d(8),r=d(9);function e(l,n,f){h.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=l,this.target=n}e.prototype=Object.create(h.prototype);for(var s in h)e[s]=h[s];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(l,n){for(var f=this.getOtherEnd(l),t=n.getGraphManager().getRoot();;){if(f.getOwner()==n)return f;if(f.getOwner()==t)break;f=f.getOwner().getParent()}return null},e.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=r.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=r.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=r.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=r.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=e}),(function(L,M,d){function h(i){this.vGraphObject=i}L.exports=h}),(function(L,M,d){var h=d(2),i=d(10),r=d(13),e=d(0),s=d(16),l=d(5);function n(t,o,a,u){a==null&&u==null&&(u=o),h.call(this,u),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=t,a!=null&&o!=null?this.rect=new r(o.x,o.y,a.width,a.height):this.rect=new r}n.prototype=Object.create(h.prototype);for(var f in h)n[f]=h[f];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(t){this.rect.width=t},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(t){this.rect.height=t},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},n.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},n.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},n.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},n.prototype.getEdgeListToNode=function(t){var o=[],a=this;return a.edges.forEach(function(u){if(u.target==t){if(u.source!=a)throw"Incorrect edge source!";o.push(u)}}),o},n.prototype.getEdgesBetween=function(t){var o=[],a=this;return a.edges.forEach(function(u){if(!(u.source==a||u.target==a))throw"Incorrect edge source and/or target";(u.target==t||u.source==t)&&o.push(u)}),o},n.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(a){if(a.source==o)t.add(a.target);else{if(a.target!=o)throw"Incorrect incidency!";t.add(a.source)}}),t},n.prototype.withChildren=function(){var t=new Set,o,a;if(t.add(this),this.child!=null)for(var u=this.child.getNodes(),g=0;g<u.length;g++)o=u[g],a=o.withChildren(),a.forEach(function(p){t.add(p)});return t},n.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var a=this.child.getNodes(),u=0;u<a.length;u++)o=a[u],t+=o.getNoOfChildren();return t==0&&(t=1),t},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var t,o,a=-e.INITIAL_WORLD_BOUNDARY,u=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+s.nextDouble()*(u-a)+a;var g=-e.INITIAL_WORLD_BOUNDARY,p=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+s.nextDouble()*(p-g)+g,this.rect.x=t,this.rect.y=o},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),a=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(a+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>a?(this.rect.y-=(this.labelHeight-a)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(a+this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var a=this.rect.y;a>e.WORLD_BOUNDARY?a=e.WORLD_BOUNDARY:a<-e.WORLD_BOUNDARY&&(a=-e.WORLD_BOUNDARY);var u=new l(o,a),g=t.inverseTransformPoint(u);this.setLocation(g.x,g.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},L.exports=n}),(function(L,M,d){var h=d(0);function i(){}for(var r in h)i[r]=h[r];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=i}),(function(L,M,d){function h(i,r){i==null&&r==null?(this.x=0,this.y=0):(this.x=i,this.y=r)}h.prototype.getX=function(){return this.x},h.prototype.getY=function(){return this.y},h.prototype.setX=function(i){this.x=i},h.prototype.setY=function(i){this.y=i},h.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},h.prototype.getCopy=function(){return new h(this.x,this.y)},h.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},L.exports=h}),(function(L,M,d){var h=d(2),i=d(10),r=d(0),e=d(7),s=d(3),l=d(1),n=d(13),f=d(12),t=d(11);function o(u,g,p){h.call(this,p),this.estimatedSize=i.MIN_VALUE,this.margin=r.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,g!=null&&g instanceof e?this.graphManager=g:g!=null&&g instanceof Layout&&(this.graphManager=g.graphManager)}o.prototype=Object.create(h.prototype);for(var a in h)o[a]=h[a];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(u,g,p){if(g==null&&p==null){var c=u;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var v=u;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(p)>-1))throw"Source or target not in graph!";if(!(g.owner==p.owner&&g.owner==this))throw"Both owners must be this graph!";return g.owner!=p.owner?null:(v.source=g,v.target=p,v.isInterGraph=!1,this.getEdges().push(v),g.edges.push(v),p!=g&&p.edges.push(v),v)}},o.prototype.remove=function(u){var g=u;if(u instanceof s){if(g==null)throw"Node is null!";if(!(g.owner!=null&&g.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var p=g.edges.slice(),c,v=p.length,y=0;y<v;y++)c=p[y],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var E=this.nodes.indexOf(g);if(E==-1)throw"Node not in owner node list!";this.nodes.splice(E,1)}else if(u instanceof l){var c=u;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var D=c.source.edges.indexOf(c),I=c.target.edges.indexOf(c);if(!(D>-1&&I>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(D,1),c.target!=c.source&&c.target.edges.splice(I,1);var E=c.source.owner.getEdges().indexOf(c);if(E==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(E,1)}},o.prototype.updateLeftTop=function(){for(var u=i.MAX_VALUE,g=i.MAX_VALUE,p,c,v,y=this.getNodes(),E=y.length,D=0;D<E;D++){var I=y[D];p=I.getTop(),c=I.getLeft(),u>p&&(u=p),g>c&&(g=c)}return u==i.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?v=y[0].getParent().paddingLeft:v=this.margin,this.left=g-v,this.top=u-v,new f(this.left,this.top))},o.prototype.updateBounds=function(u){for(var g=i.MAX_VALUE,p=-i.MAX_VALUE,c=i.MAX_VALUE,v=-i.MAX_VALUE,y,E,D,I,N,m=this.nodes,x=m.length,w=0;w<x;w++){var F=m[w];u&&F.child!=null&&F.updateBounds(),y=F.getLeft(),E=F.getRight(),D=F.getTop(),I=F.getBottom(),g>y&&(g=y),p<E&&(p=E),c>D&&(c=D),v<I&&(v=I)}var T=new n(g,c,p-g,v-c);g==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),m[0].getParent().paddingLeft!=null?N=m[0].getParent().paddingLeft:N=this.margin,this.left=T.x-N,this.right=T.x+T.width+N,this.top=T.y-N,this.bottom=T.y+T.height+N},o.calculateBounds=function(u){for(var g=i.MAX_VALUE,p=-i.MAX_VALUE,c=i.MAX_VALUE,v=-i.MAX_VALUE,y,E,D,I,N=u.length,m=0;m<N;m++){var x=u[m];y=x.getLeft(),E=x.getRight(),D=x.getTop(),I=x.getBottom(),g>y&&(g=y),p<E&&(p=E),c>D&&(c=D),v<I&&(v=I)}var w=new n(g,c,p-g,v-c);return w},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var u=0,g=this.nodes,p=g.length,c=0;c<p;c++){var v=g[c];u+=v.calcEstimatedSize()}return u==0?this.estimatedSize=r.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=u/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var g=new t,p=new Set,c=this.nodes[0],v,y,E=c.withChildren();for(E.forEach(function(w){g.push(w),p.add(w)});g.length!==0;){c=g.shift(),v=c.getEdges();for(var D=v.length,I=0;I<D;I++){var N=v[I];if(y=N.getOtherEndInGraph(c,this),y!=null&&!p.has(y)){var m=y.withChildren();m.forEach(function(w){g.push(w),p.add(w)})}}}if(this.isConnected=!1,p.size>=this.nodes.length){var x=0;p.forEach(function(w){w.owner==u&&x++}),x==this.nodes.length&&(this.isConnected=!0)}},L.exports=o}),(function(L,M,d){var h,i=d(1);function r(e){h=d(6),this.layout=e,this.graphs=[],this.edges=[]}r.prototype.addRoot=function(){var e=this.layout.newGraph(),s=this.layout.newNode(null),l=this.add(e,s);return this.setRootGraph(l),this.rootGraph},r.prototype.add=function(e,s,l,n,f){if(l==null&&n==null&&f==null){if(e==null)throw"Graph is null!";if(s==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(s.child!=null)throw"Already has a child!";return e.parent=s,s.child=e,e}else{f=l,n=s,l=e;var t=n.getOwner(),o=f.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return l.isInterGraph=!1,t.add(l,n,f);if(l.isInterGraph=!0,l.source=n,l.target=f,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},r.prototype.remove=function(e){if(e instanceof h){var s=e;if(s.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(s==this.rootGraph||s.parent!=null&&s.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(s.getEdges());for(var n,f=l.length,t=0;t<f;t++)n=l[t],s.remove(n);var o=[];o=o.concat(s.getNodes());var a;f=o.length;for(var t=0;t<f;t++)a=o[t],s.remove(a);s==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(s);this.graphs.splice(u,1),s.parent=null}else if(e instanceof i){if(n=e,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var u=n.source.edges.indexOf(n);if(n.source.edges.splice(u,1),u=n.target.edges.indexOf(n),n.target.edges.splice(u,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var u=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(u,1)}},r.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},r.prototype.getGraphs=function(){return this.graphs},r.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],s=this.getGraphs(),l=s.length,n=0;n<l;n++)e=e.concat(s[n].getNodes());this.allNodes=e}return this.allNodes},r.prototype.resetAllNodes=function(){this.allNodes=null},r.prototype.resetAllEdges=function(){this.allEdges=null},r.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},r.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],s=this.getGraphs();s.length;for(var l=0;l<s.length;l++)e=e.concat(s[l].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},r.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},r.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},r.prototype.getRoot=function(){return this.rootGraph},r.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},r.prototype.getLayout=function(){return this.layout},r.prototype.isOneAncestorOfOther=function(e,s){if(!(e!=null&&s!=null))throw"assert failed";if(e==s)return!0;var l=e.getOwner(),n;do{if(n=l.getParent(),n==null)break;if(n==s)return!0;if(l=n.getOwner(),l==null)break}while(!0);l=s.getOwner();do{if(n=l.getParent(),n==null)break;if(n==e)return!0;if(l=n.getOwner(),l==null)break}while(!0);return!1},r.prototype.calcLowestCommonAncestors=function(){for(var e,s,l,n,f,t=this.getAllEdges(),o=t.length,a=0;a<o;a++){if(e=t[a],s=e.source,l=e.target,e.lca=null,e.sourceInLca=s,e.targetInLca=l,s==l){e.lca=s.getOwner();continue}for(n=s.getOwner();e.lca==null;){for(e.targetInLca=l,f=l.getOwner();e.lca==null;){if(f==n){e.lca=f;break}if(f==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=f.getParent(),f=e.targetInLca.getOwner()}if(n==this.rootGraph)break;e.lca==null&&(e.sourceInLca=n.getParent(),n=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},r.prototype.calcLowestCommonAncestor=function(e,s){if(e==s)return e.getOwner();var l=e.getOwner();do{if(l==null)break;var n=s.getOwner();do{if(n==null)break;if(n==l)return n;n=n.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},r.prototype.calcInclusionTreeDepths=function(e,s){e==null&&s==null&&(e=this.rootGraph,s=1);for(var l,n=e.getNodes(),f=n.length,t=0;t<f;t++)l=n[t],l.inclusionTreeDepth=s,l.child!=null&&this.calcInclusionTreeDepths(l.child,s+1)},r.prototype.includesInvalidEdge=function(){for(var e,s=[],l=this.edges.length,n=0;n<l;n++)e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target)&&s.push(e);for(var n=0;n<s.length;n++)this.remove(s[n]);return!1},L.exports=r}),(function(L,M,d){var h=d(12);function i(){}i.calcSeparationAmount=function(r,e,s,l){if(!r.intersects(e))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(r,e,n),s[0]=Math.min(r.getRight(),e.getRight())-Math.max(r.x,e.x),s[1]=Math.min(r.getBottom(),e.getBottom())-Math.max(r.y,e.y),r.getX()<=e.getX()&&r.getRight()>=e.getRight()?s[0]+=Math.min(e.getX()-r.getX(),r.getRight()-e.getRight()):e.getX()<=r.getX()&&e.getRight()>=r.getRight()&&(s[0]+=Math.min(r.getX()-e.getX(),e.getRight()-r.getRight())),r.getY()<=e.getY()&&r.getBottom()>=e.getBottom()?s[1]+=Math.min(e.getY()-r.getY(),r.getBottom()-e.getBottom()):e.getY()<=r.getY()&&e.getBottom()>=r.getBottom()&&(s[1]+=Math.min(r.getY()-e.getY(),e.getBottom()-r.getBottom()));var f=Math.abs((e.getCenterY()-r.getCenterY())/(e.getCenterX()-r.getCenterX()));e.getCenterY()===r.getCenterY()&&e.getCenterX()===r.getCenterX()&&(f=1);var t=f*s[0],o=s[1]/f;s[0]<o?o=s[0]:t=s[1],s[0]=-1*n[0]*(o/2+l),s[1]=-1*n[1]*(t/2+l)},i.decideDirectionsForOverlappingNodes=function(r,e,s){r.getCenterX()<e.getCenterX()?s[0]=-1:s[0]=1,r.getCenterY()<e.getCenterY()?s[1]=-1:s[1]=1},i.getIntersection2=function(r,e,s){var l=r.getCenterX(),n=r.getCenterY(),f=e.getCenterX(),t=e.getCenterY();if(r.intersects(e))return s[0]=l,s[1]=n,s[2]=f,s[3]=t,!0;var o=r.getX(),a=r.getY(),u=r.getRight(),g=r.getX(),p=r.getBottom(),c=r.getRight(),v=r.getWidthHalf(),y=r.getHeightHalf(),E=e.getX(),D=e.getY(),I=e.getRight(),N=e.getX(),m=e.getBottom(),x=e.getRight(),w=e.getWidthHalf(),F=e.getHeightHalf(),T=!1,G=!1;if(l===f){if(n>t)return s[0]=l,s[1]=a,s[2]=f,s[3]=m,!1;if(n<t)return s[0]=l,s[1]=p,s[2]=f,s[3]=D,!1}else if(n===t){if(l>f)return s[0]=o,s[1]=n,s[2]=I,s[3]=t,!1;if(l<f)return s[0]=u,s[1]=n,s[2]=E,s[3]=t,!1}else{var X=r.height/r.width,R=e.height/e.width,C=(t-n)/(f-l),B=void 0,$=void 0,b=void 0,P=void 0,W=void 0,V=void 0;if(-X===C?l>f?(s[0]=g,s[1]=p,T=!0):(s[0]=u,s[1]=a,T=!0):X===C&&(l>f?(s[0]=o,s[1]=a,T=!0):(s[0]=c,s[1]=p,T=!0)),-R===C?f>l?(s[2]=N,s[3]=m,G=!0):(s[2]=I,s[3]=D,G=!0):R===C&&(f>l?(s[2]=E,s[3]=D,G=!0):(s[2]=x,s[3]=m,G=!0)),T&&G)return!1;if(l>f?n>t?(B=this.getCardinalDirection(X,C,4),$=this.getCardinalDirection(R,C,2)):(B=this.getCardinalDirection(-X,C,3),$=this.getCardinalDirection(-R,C,1)):n>t?(B=this.getCardinalDirection(-X,C,1),$=this.getCardinalDirection(-R,C,3)):(B=this.getCardinalDirection(X,C,2),$=this.getCardinalDirection(R,C,4)),!T)switch(B){case 1:P=a,b=l+-y/C,s[0]=b,s[1]=P;break;case 2:b=c,P=n+v*C,s[0]=b,s[1]=P;break;case 3:P=p,b=l+y/C,s[0]=b,s[1]=P;break;case 4:b=g,P=n+-v*C,s[0]=b,s[1]=P;break}if(!G)switch($){case 1:V=D,W=f+-F/C,s[2]=W,s[3]=V;break;case 2:W=x,V=t+w*C,s[2]=W,s[3]=V;break;case 3:V=m,W=f+F/C,s[2]=W,s[3]=V;break;case 4:W=N,V=t+-w*C,s[2]=W,s[3]=V;break}}return!1},i.getCardinalDirection=function(r,e,s){return r>e?s:1+s%4},i.getIntersection=function(r,e,s,l){if(l==null)return this.getIntersection2(r,e,s);var n=r.x,f=r.y,t=e.x,o=e.y,a=s.x,u=s.y,g=l.x,p=l.y,c=void 0,v=void 0,y=void 0,E=void 0,D=void 0,I=void 0,N=void 0,m=void 0,x=void 0;return y=o-f,D=n-t,N=t*f-n*o,E=p-u,I=a-g,m=g*u-a*p,x=y*I-E*D,x===0?null:(c=(D*m-I*N)/x,v=(E*N-y*m)/x,new h(c,v))},i.angleOfVector=function(r,e,s,l){var n=void 0;return r!==s?(n=Math.atan((l-e)/(s-r)),s<r?n+=Math.PI:l<e&&(n+=this.TWO_PI)):l<e?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},i.doIntersect=function(r,e,s,l){var n=r.x,f=r.y,t=e.x,o=e.y,a=s.x,u=s.y,g=l.x,p=l.y,c=(t-n)*(p-u)-(g-a)*(o-f);if(c===0)return!1;var v=((p-u)*(g-n)+(a-g)*(p-f))/c,y=((f-o)*(g-n)+(t-n)*(p-f))/c;return 0<v&&v<1&&0<y&&y<1},i.findCircleLineIntersections=function(r,e,s,l,n,f,t){var o=(s-r)*(s-r)+(l-e)*(l-e),a=2*((r-n)*(s-r)+(e-f)*(l-e)),u=(r-n)*(r-n)+(e-f)*(e-f)-t*t,g=a*a-4*o*u;if(g>=0){var p=(-a+Math.sqrt(a*a-4*o*u))/(2*o),c=(-a-Math.sqrt(a*a-4*o*u))/(2*o),v=null;return p>=0&&p<=1?[p]:c>=0&&c<=1?[c]:v}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,L.exports=i}),(function(L,M,d){function h(){}h.sign=function(i){return i>0?1:i<0?-1:0},h.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},h.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},L.exports=h}),(function(L,M,d){function h(){}h.MAX_VALUE=2147483647,h.MIN_VALUE=-2147483648,L.exports=h}),(function(L,M,d){var h=(function(){function n(f,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,a.key,a)}}return function(f,t,o){return t&&n(f.prototype,t),o&&n(f,o),f}})();function i(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var r=function(f){return{value:f,next:null,prev:null}},e=function(f,t,o,a){return f!==null?f.next=t:a.head=t,o!==null?o.prev=t:a.tail=t,t.prev=f,t.next=o,a.length++,t},s=function(f,t){var o=f.prev,a=f.next;return o!==null?o.next=a:t.head=a,a!==null?a.prev=o:t.tail=o,f.prev=f.next=null,t.length--,f},l=(function(){function n(f){var t=this;i(this,n),this.length=0,this.head=null,this.tail=null,f?.forEach(function(o){return t.push(o)})}return h(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,o){return e(o.prev,r(t),o,this)}},{key:"insertAfter",value:function(t,o){return e(o,r(t),o.next,this)}},{key:"insertNodeBefore",value:function(t,o){return e(o.prev,t,o,this)}},{key:"insertNodeAfter",value:function(t,o){return e(o,t,o.next,this)}},{key:"push",value:function(t){return e(this.tail,r(t),null,this)}},{key:"unshift",value:function(t){return e(null,r(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var o=1,a=this.head;o<t;)a=a.next,o++;return a.value}}},{key:"set_object_at",value:function(t,o){if(t<=this.length()){for(var a=1,u=this.head;a<t;)u=u.next,a++;u.value=o}}}]),n})();L.exports=l}),(function(L,M,d){function h(i,r,e){this.x=null,this.y=null,i==null&&r==null&&e==null?(this.x=0,this.y=0):typeof i=="number"&&typeof r=="number"&&e==null?(this.x=i,this.y=r):i.constructor.name=="Point"&&r==null&&e==null&&(e=i,this.x=e.x,this.y=e.y)}h.prototype.getX=function(){return this.x},h.prototype.getY=function(){return this.y},h.prototype.getLocation=function(){return new h(this.x,this.y)},h.prototype.setLocation=function(i,r,e){i.constructor.name=="Point"&&r==null&&e==null?(e=i,this.setLocation(e.x,e.y)):typeof i=="number"&&typeof r=="number"&&e==null&&(parseInt(i)==i&&parseInt(r)==r?this.move(i,r):(this.x=Math.floor(i+.5),this.y=Math.floor(r+.5)))},h.prototype.move=function(i,r){this.x=i,this.y=r},h.prototype.translate=function(i,r){this.x+=i,this.y+=r},h.prototype.equals=function(i){if(i.constructor.name=="Point"){var r=i;return this.x==r.x&&this.y==r.y}return this==i},h.prototype.toString=function(){return new h().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=h}),(function(L,M,d){function h(i,r,e,s){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&r!=null&&e!=null&&s!=null&&(this.x=i,this.y=r,this.width=e,this.height=s)}h.prototype.getX=function(){return this.x},h.prototype.setX=function(i){this.x=i},h.prototype.getY=function(){return this.y},h.prototype.setY=function(i){this.y=i},h.prototype.getWidth=function(){return this.width},h.prototype.setWidth=function(i){this.width=i},h.prototype.getHeight=function(){return this.height},h.prototype.setHeight=function(i){this.height=i},h.prototype.getRight=function(){return this.x+this.width},h.prototype.getBottom=function(){return this.y+this.height},h.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},h.prototype.getCenterX=function(){return this.x+this.width/2},h.prototype.getMinX=function(){return this.getX()},h.prototype.getMaxX=function(){return this.getX()+this.width},h.prototype.getCenterY=function(){return this.y+this.height/2},h.prototype.getMinY=function(){return this.getY()},h.prototype.getMaxY=function(){return this.getY()+this.height},h.prototype.getWidthHalf=function(){return this.width/2},h.prototype.getHeightHalf=function(){return this.height/2},L.exports=h}),(function(L,M,d){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function i(){}i.lastID=0,i.createID=function(r){return i.isPrimitive(r)?r:(r.uniqueID!=null||(r.uniqueID=i.getString(),i.lastID++),r.uniqueID)},i.getString=function(r){return r==null&&(r=i.lastID),"Object#"+r},i.isPrimitive=function(r){var e=typeof r>"u"?"undefined":h(r);return r==null||e!="object"&&e!="function"},L.exports=i}),(function(L,M,d){function h(a){if(Array.isArray(a)){for(var u=0,g=Array(a.length);u<a.length;u++)g[u]=a[u];return g}else return Array.from(a)}var i=d(0),r=d(7),e=d(3),s=d(1),l=d(6),n=d(5),f=d(17),t=d(29);function o(a){t.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new r(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var a=new r(this);return this.graphManager=a,a},o.prototype.newGraph=function(a){return new l(null,this.graphManager,a)},o.prototype.newNode=function(a){return new e(this.graphManager,a)},o.prototype.newEdge=function(a){return new s(null,null,a)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),i.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),u=0;u<a.length;u++)a[u];for(var g=this.graphManager.getRoot().getNodes(),u=0;u<g.length;u++)g[u];this.update(this.graphManager.getRoot())}},o.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof e){var u=a;if(u.getChild()!=null)for(var g=u.getChild().getNodes(),p=0;p<g.length;p++)update(g[p]);if(u.vGraphObject!=null){var c=u.vGraphObject;c.update(u)}}else if(a instanceof s){var v=a;if(v.vGraphObject!=null){var y=v.vGraphObject;y.update(v)}}else if(a instanceof l){var E=a;if(E.vGraphObject!=null){var D=E.vGraphObject;D.update(E)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var u=new f,g=this.graphManager.getRoot().updateLeftTop();if(g!=null){u.setWorldOrgX(a.x),u.setWorldOrgY(a.y),u.setDeviceOrgX(g.x),u.setDeviceOrgY(g.y);for(var p=this.getAllNodes(),c,v=0;v<p.length;v++)c=p[v],c.transform(u)}}},o.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var u,g,p=a.getNodes(),c=0;c<p.length;c++)u=p[c],g=u.getChild(),g==null||g.getNodes().length==0?u.scatter():(this.positionNodesRandomly(g),u.updateBounds())},o.prototype.getFlatForest=function(){for(var a=[],u=!0,g=this.graphManager.getRoot().getNodes(),p=!0,c=0;c<g.length;c++)g[c].getChild()!=null&&(p=!1);if(!p)return a;var v=new Set,y=[],E=new Map,D=[];for(D=D.concat(g);D.length>0&&u;){for(y.push(D[0]);y.length>0&&u;){var I=y[0];y.splice(0,1),v.add(I);for(var N=I.getEdges(),c=0;c<N.length;c++){var m=N[c].getOtherEnd(I);if(E.get(I)!=m)if(!v.has(m))y.push(m),E.set(m,I);else{u=!1;break}}}if(!u)a=[];else{var x=[].concat(h(v));a.push(x);for(var c=0;c<x.length;c++){var w=x[c],F=D.indexOf(w);F>-1&&D.splice(F,1)}v=new Set,E=new Map}}return a},o.prototype.createDummyNodesForBendpoints=function(a){for(var u=[],g=a.source,p=this.graphManager.calcLowestCommonAncestor(a.source,a.target),c=0;c<a.bendpoints.length;c++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),p.add(v);var y=this.newEdge(null);this.graphManager.add(y,g,v),u.add(v),g=v}var y=this.newEdge(null);return this.graphManager.add(y,g,a.target),this.edgeToDummyNodes.set(a,u),a.isInterGraph()?this.graphManager.remove(a):p.remove(a),u},o.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(h(this.edgeToDummyNodes.keys())).concat(a);for(var u=0;u<a.length;u++){var g=a[u];if(g.bendpoints.length>0){for(var p=this.edgeToDummyNodes.get(g),c=0;c<p.length;c++){var v=p[c],y=new n(v.getCenterX(),v.getCenterY()),E=g.bendpoints.get(c);E.x=y.x,E.y=y.y,v.getOwner().remove(v)}this.graphManager.add(g,g.source,g.target)}}},o.transform=function(a,u,g,p){if(g!=null&&p!=null){var c=u;if(a<=50){var v=u/g;c-=(u-v)/50*(50-a)}else{var y=u*p;c+=(y-u)/50*(a-50)}return c}else{var E,D;return a<=50?(E=9*u/500,D=u/10):(E=9*u/50,D=-8*u),E*a+D}},o.findCenterOfTree=function(a){var u=[];u=u.concat(a);var g=[],p=new Map,c=!1,v=null;(u.length==1||u.length==2)&&(c=!0,v=u[0]);for(var y=0;y<u.length;y++){var E=u[y],D=E.getNeighborsList().size;p.set(E,E.getNeighborsList().size),D==1&&g.push(E)}var I=[];for(I=I.concat(g);!c;){var N=[];N=N.concat(I),I=[];for(var y=0;y<u.length;y++){var E=u[y],m=u.indexOf(E);m>=0&&u.splice(m,1);var x=E.getNeighborsList();x.forEach(function(T){if(g.indexOf(T)<0){var G=p.get(T),X=G-1;X==1&&I.push(T),p.set(T,X)}})}g=g.concat(I),(u.length==1||u.length==2)&&(c=!0,v=u[0])}return v},o.prototype.setGraphManager=function(a){this.graphManager=a},L.exports=o}),(function(L,M,d){function h(){}h.seed=1,h.x=0,h.nextDouble=function(){return h.x=Math.sin(h.seed++)*1e4,h.x-Math.floor(h.x)},L.exports=h}),(function(L,M,d){var h=d(5);function i(r,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(r){this.lworldOrgX=r},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(r){this.lworldOrgY=r},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(r){this.lworldExtX=r},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(r){this.lworldExtY=r},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(r){this.ldeviceOrgX=r},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(r){this.ldeviceOrgY=r},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(r){this.ldeviceExtX=r},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(r){this.ldeviceExtY=r},i.prototype.transformX=function(r){var e=0,s=this.lworldExtX;return s!=0&&(e=this.ldeviceOrgX+(r-this.lworldOrgX)*this.ldeviceExtX/s),e},i.prototype.transformY=function(r){var e=0,s=this.lworldExtY;return s!=0&&(e=this.ldeviceOrgY+(r-this.lworldOrgY)*this.ldeviceExtY/s),e},i.prototype.inverseTransformX=function(r){var e=0,s=this.ldeviceExtX;return s!=0&&(e=this.lworldOrgX+(r-this.ldeviceOrgX)*this.lworldExtX/s),e},i.prototype.inverseTransformY=function(r){var e=0,s=this.ldeviceExtY;return s!=0&&(e=this.lworldOrgY+(r-this.ldeviceOrgY)*this.lworldExtY/s),e},i.prototype.inverseTransformPoint=function(r){var e=new h(this.inverseTransformX(r.x),this.inverseTransformY(r.y));return e},L.exports=i}),(function(L,M,d){function h(t){if(Array.isArray(t)){for(var o=0,a=Array(t.length);o<t.length;o++)a[o]=t[o];return a}else return Array.from(t)}var i=d(15),r=d(4),e=d(0),s=d(8),l=d(9);function n(){i.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}n.prototype=Object.create(i.prototype);for(var f in i)n[f]=i[f];n.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,o,a,u,g,p,c,v=this.getGraphManager().getAllEdges(),y=0;y<v.length;y++)t=v[y],o=t.idealLength,t.isInterGraph&&(u=t.getSource(),g=t.getTarget(),p=t.getSourceInLca().getEstimatedSize(),c=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=p+c-2*e.SIMPLE_NODE_SIZE),a=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*a))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>r.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,a=0;a<t.length;a++)o=t[a],this.calcSpringForce(o,o.idealLength)},n.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,u,g,p,c=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,a=0;a<c.length;a++)g=c[a],this.calculateRepulsionForceOfANode(g,v,t,o),v.add(g);else for(a=0;a<c.length;a++)for(g=c[a],u=a+1;u<c.length;u++)p=c[u],g.getOwner()==p.getOwner()&&this.calcRepulsionForce(g,p)},n.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),a=0;a<o.length;a++)t=o[a],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,a=0;a<t.length;a++)o=t[a],o.move()},n.prototype.calcSpringForce=function(t,o){var a=t.getSource(),u=t.getTarget(),g,p,c,v;if(this.uniformLeafNodeSizes&&a.getChild()==null&&u.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;g=t.getLength(),g!=0&&(p=t.edgeElasticity*(g-o),c=p*(t.lengthX/g),v=p*(t.lengthY/g),a.springForceX+=c,a.springForceY+=v,u.springForceX-=c,u.springForceY-=v)},n.prototype.calcRepulsionForce=function(t,o){var a=t.getRect(),u=o.getRect(),g=new Array(2),p=new Array(4),c,v,y,E,D,I,N;if(a.intersects(u)){s.calcSeparationAmount(a,u,g,r.DEFAULT_EDGE_LENGTH/2),I=2*g[0],N=2*g[1];var m=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=m*I,t.repulsionForceY-=m*N,o.repulsionForceX+=m*I,o.repulsionForceY+=m*N}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(c=u.getCenterX()-a.getCenterX(),v=u.getCenterY()-a.getCenterY()):(s.getIntersection(a,u,p),c=p[2]-p[0],v=p[3]-p[1]),Math.abs(c)<r.MIN_REPULSION_DIST&&(c=l.sign(c)*r.MIN_REPULSION_DIST),Math.abs(v)<r.MIN_REPULSION_DIST&&(v=l.sign(v)*r.MIN_REPULSION_DIST),y=c*c+v*v,E=Math.sqrt(y),D=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/y,I=D*c/E,N=D*v/E,t.repulsionForceX-=I,t.repulsionForceY-=N,o.repulsionForceX+=I,o.repulsionForceY+=N},n.prototype.calcGravitationalForce=function(t){var o,a,u,g,p,c,v,y;o=t.getOwner(),a=(o.getRight()+o.getLeft())/2,u=(o.getTop()+o.getBottom())/2,g=t.getCenterX()-a,p=t.getCenterY()-u,c=Math.abs(g)+t.getWidth()/2,v=Math.abs(p)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(y=o.getEstimatedSize()*this.gravityRangeFactor,(c>y||v>y)&&(t.gravitationForceX=-this.gravityConstant*g,t.gravitationForceY=-this.gravityConstant*p)):(y=o.getEstimatedSize()*this.compoundGravityRangeFactor,(c>y||v>y)&&(t.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*p*this.compoundGravityConstant))},n.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),a=0;a<o.length;a++)t=o[a],t.noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var o=0,a=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var u=new Array(o),g=0;g<o;g++)u[g]=new Array(a);for(var g=0;g<o;g++)for(var p=0;p<a;p++)u[g][p]=new Array;return u},n.prototype.addNodeToGrid=function(t,o,a){var u=0,g=0,p=0,c=0;u=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/this.repulsionRange)),p=parseInt(Math.floor((t.getRect().y-a)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().height+t.getRect().y-a)/this.repulsionRange));for(var v=u;v<=g;v++)for(var y=p;y<=c;y++)this.grid[v][y].push(t),t.setGridCoordinates(u,g,p,c)},n.prototype.updateGrid=function(){var t,o,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<a.length;t++)o=a[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,o,a,u){if(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&a||u){var g=new Set;t.surrounding=new Array;for(var p,c=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var y=t.startY-1;y<t.finishY+2;y++)if(!(v<0||y<0||v>=c.length||y>=c[0].length)){for(var E=0;E<c[v][y].length;E++)if(p=c[v][y][E],!(t.getOwner()!=p.getOwner()||t==p)&&!o.has(p)&&!g.has(p)){var D=Math.abs(t.getCenterX()-p.getCenterX())-(t.getWidth()/2+p.getWidth()/2),I=Math.abs(t.getCenterY()-p.getCenterY())-(t.getHeight()/2+p.getHeight()/2);D<=this.repulsionRange&&I<=this.repulsionRange&&g.add(p)}}t.surrounding=[].concat(h(g))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},n.prototype.calcRepulsionRange=function(){return 0},L.exports=n}),(function(L,M,d){var h=d(1),i=d(4);function r(s,l,n){h.call(this,s,l,n),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}r.prototype=Object.create(h.prototype);for(var e in h)r[e]=h[e];L.exports=r}),(function(L,M,d){var h=d(3),i=d(4);function r(s,l,n,f){h.call(this,s,l,n,f),this.nodeRepulsion=i.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=[]}r.prototype=Object.create(h.prototype);for(var e in h)r[e]=h[e];r.prototype.setGridCoordinates=function(s,l,n,f){this.startX=s,this.finishX=l,this.startY=n,this.finishY=f},L.exports=r}),(function(L,M,d){function h(i,r){this.width=0,this.height=0,i!==null&&r!==null&&(this.height=r,this.width=i)}h.prototype.getWidth=function(){return this.width},h.prototype.setWidth=function(i){this.width=i},h.prototype.getHeight=function(){return this.height},h.prototype.setHeight=function(i){this.height=i},L.exports=h}),(function(L,M,d){var h=d(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(r,e){var s=h.createID(r);this.contains(s)||(this.map[s]=e,this.keys.push(r))},i.prototype.contains=function(r){return h.createID(r),this.map[r]!=null},i.prototype.get=function(r){var e=h.createID(r);return this.map[e]},i.prototype.keySet=function(){return this.keys},L.exports=i}),(function(L,M,d){var h=d(14);function i(){this.set={}}i.prototype.add=function(r){var e=h.createID(r);this.contains(e)||(this.set[e]=r)},i.prototype.remove=function(r){delete this.set[h.createID(r)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(r){return this.set[h.createID(r)]==r},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(r){for(var e=Object.keys(this.set),s=e.length,l=0;l<s;l++)r.push(this.set[e[l]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(r){for(var e=r.length,s=0;s<e;s++){var l=r[s];this.add(l)}},L.exports=i}),(function(L,M,d){function h(){}h.multMat=function(i,r){for(var e=[],s=0;s<i.length;s++){e[s]=[];for(var l=0;l<r[0].length;l++){e[s][l]=0;for(var n=0;n<i[0].length;n++)e[s][l]+=i[s][n]*r[n][l]}}return e},h.transpose=function(i){for(var r=[],e=0;e<i[0].length;e++){r[e]=[];for(var s=0;s<i.length;s++)r[e][s]=i[s][e]}return r},h.multCons=function(i,r){for(var e=[],s=0;s<i.length;s++)e[s]=i[s]*r;return e},h.minusOp=function(i,r){for(var e=[],s=0;s<i.length;s++)e[s]=i[s]-r[s];return e},h.dotProduct=function(i,r){for(var e=0,s=0;s<i.length;s++)e+=i[s]*r[s];return e},h.mag=function(i){return Math.sqrt(this.dotProduct(i,i))},h.normalize=function(i){for(var r=[],e=this.mag(i),s=0;s<i.length;s++)r[s]=i[s]/e;return r},h.multGamma=function(i){for(var r=[],e=0,s=0;s<i.length;s++)e+=i[s];e*=-1/i.length;for(var l=0;l<i.length;l++)r[l]=e+i[l];return r},h.multL=function(i,r,e){for(var s=[],l=[],n=[],f=0;f<r[0].length;f++){for(var t=0,o=0;o<r.length;o++)t+=-.5*r[o][f]*i[o];l[f]=t}for(var a=0;a<e.length;a++){for(var u=0,g=0;g<e.length;g++)u+=e[a][g]*l[g];n[a]=u}for(var p=0;p<r.length;p++){for(var c=0,v=0;v<r[0].length;v++)c+=r[p][v]*n[v];s[p]=c}return s},L.exports=h}),(function(L,M,d){var h=(function(){function s(l,n){for(var f=0;f<n.length;f++){var t=n[f];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}return function(l,n,f){return n&&s(l.prototype,n),f&&s(l,f),l}})();function i(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}var r=d(11),e=(function(){function s(l,n){i(this,s),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;l instanceof r?f=l.size():f=l.length,this._quicksort(l,0,f-1)}return h(s,[{key:"_quicksort",value:function(n,f,t){if(f<t){var o=this._partition(n,f,t);this._quicksort(n,f,o),this._quicksort(n,o+1,t)}}},{key:"_partition",value:function(n,f,t){for(var o=this._get(n,f),a=f,u=t;;){for(;this.compareFunction(o,this._get(n,u));)u--;for(;this.compareFunction(this._get(n,a),o);)a++;if(a<u)this._swap(n,a,u),a++,u--;else return u}}},{key:"_get",value:function(n,f){return n instanceof r?n.get_object_at(f):n[f]}},{key:"_set",value:function(n,f,t){n instanceof r?n.set_object_at(f,t):n[f]=t}},{key:"_swap",value:function(n,f,t){var o=this._get(n,f);this._set(n,f,this._get(n,t)),this._set(n,t,o)}},{key:"_defaultCompareFunction",value:function(n,f){return f>n}}]),s})();L.exports=e}),(function(L,M,d){function h(){}h.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var r=Math.min(this.m,this.n);this.s=(function(S){for(var U=[];S-- >0;)U.push(0);return U})(Math.min(this.m+1,this.n)),this.U=(function(S){var U=function wt(et){if(et.length==0)return 0;for(var ct=[],pt=0;pt<et[0];pt++)ct.push(wt(et.slice(1)));return ct};return U(S)})([this.m,r]),this.V=(function(S){var U=function wt(et){if(et.length==0)return 0;for(var ct=[],pt=0;pt<et[0];pt++)ct.push(wt(et.slice(1)));return ct};return U(S)})([this.n,this.n]);for(var e=(function(S){for(var U=[];S-- >0;)U.push(0);return U})(this.n),s=(function(S){for(var U=[];S-- >0;)U.push(0);return U})(this.m),l=!0,n=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,f);t++){if(t<n){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=h.hypot(this.s[t],i[o][t]);if(this.s[t]!==0){i[t][t]<0&&(this.s[t]=-this.s[t]);for(var a=t;a<this.m;a++)i[a][t]/=this.s[t];i[t][t]+=1}this.s[t]=-this.s[t]}for(var u=t+1;u<this.n;u++){if((function(S,U){return S&&U})(t<n,this.s[t]!==0)){for(var g=0,p=t;p<this.m;p++)g+=i[p][t]*i[p][u];g=-g/i[t][t];for(var c=t;c<this.m;c++)i[c][u]+=g*i[c][t]}e[u]=i[t][u]}if((function(S,U){return U})(l,t<n))for(var v=t;v<this.m;v++)this.U[v][t]=i[v][t];if(t<f){e[t]=0;for(var y=t+1;y<this.n;y++)e[t]=h.hypot(e[t],e[y]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var E=t+1;E<this.n;E++)e[E]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(S,U){return S&&U})(t+1<this.m,e[t]!==0)){for(var D=t+1;D<this.m;D++)s[D]=0;for(var I=t+1;I<this.n;I++)for(var N=t+1;N<this.m;N++)s[N]+=e[I]*i[N][I];for(var m=t+1;m<this.n;m++)for(var x=-e[m]/e[t+1],w=t+1;w<this.m;w++)i[w][m]+=x*s[w]}for(var F=t+1;F<this.n;F++)this.V[F][t]=e[F]}}var T=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=i[n][n]),this.m<T&&(this.s[T-1]=0),f+1<T&&(e[f]=i[f][T-1]),e[T-1]=0;{for(var G=n;G<r;G++){for(var X=0;X<this.m;X++)this.U[X][G]=0;this.U[G][G]=1}for(var R=n-1;R>=0;R--)if(this.s[R]!==0){for(var C=R+1;C<r;C++){for(var B=0,$=R;$<this.m;$++)B+=this.U[$][R]*this.U[$][C];B=-B/this.U[R][R];for(var b=R;b<this.m;b++)this.U[b][C]+=B*this.U[b][R]}for(var P=R;P<this.m;P++)this.U[P][R]=-this.U[P][R];this.U[R][R]=1+this.U[R][R];for(var W=0;W<R-1;W++)this.U[W][R]=0}else{for(var V=0;V<this.m;V++)this.U[V][R]=0;this.U[R][R]=1}}for(var Y=this.n-1;Y>=0;Y--){if((function(S,U){return S&&U})(Y<f,e[Y]!==0))for(var vt=Y+1;vt<r;vt++){for(var dt=0,yt=Y+1;yt<this.n;yt++)dt+=this.V[yt][Y]*this.V[yt][vt];dt=-dt/this.V[Y+1][Y];for(var Lt=Y+1;Lt<this.n;Lt++)this.V[Lt][vt]+=dt*this.V[Lt][Y]}for(var Dt=0;Dt<this.n;Dt++)this.V[Dt][Y]=0;this.V[Y][Y]=1}for(var Ut=T-1,St=Math.pow(2,-52),Ft=Math.pow(2,-966);T>0;){var O=void 0,at=void 0;for(O=T-2;O>=-1&&O!==-1;O--)if(Math.abs(e[O])<=Ft+St*(Math.abs(this.s[O])+Math.abs(this.s[O+1]))){e[O]=0;break}if(O===T-2)at=4;else{var H=void 0;for(H=T-1;H>=O&&H!==O;H--){var bt=(H!==T?Math.abs(e[H]):0)+(H!==O+1?Math.abs(e[H-1]):0);if(Math.abs(this.s[H])<=Ft+St*bt){this.s[H]=0;break}}H===O?at=3:H===T-1?at=1:(at=2,O=H)}switch(O++,at){case 1:{var Tt=e[T-2];e[T-2]=0;for(var z=T-2;z>=O;z--){var ht=h.hypot(this.s[z],Tt),mt=this.s[z]/ht,Mt=Tt/ht;this.s[z]=ht,z!==O&&(Tt=-Mt*e[z-1],e[z-1]=mt*e[z-1]);for(var J=0;J<this.n;J++)ht=mt*this.V[J][z]+Mt*this.V[J][T-1],this.V[J][T-1]=-Mt*this.V[J][z]+mt*this.V[J][T-1],this.V[J][z]=ht}}break;case 2:{var Nt=e[O-1];e[O-1]=0;for(var q=O;q<T;q++){var lt=h.hypot(this.s[q],Nt),At=this.s[q]/lt,Rt=Nt/lt;this.s[q]=lt,Nt=-Rt*e[q],e[q]=At*e[q];for(var j=0;j<this.m;j++)lt=At*this.U[j][q]+Rt*this.U[j][O-1],this.U[j][O-1]=-Rt*this.U[j][q]+At*this.U[j][O-1],this.U[j][q]=lt}}break;case 3:{var ut=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[T-1]),Math.abs(this.s[T-2])),Math.abs(e[T-2])),Math.abs(this.s[O])),Math.abs(e[O])),rt=this.s[T-1]/ut,Gt=this.s[T-2]/ut,Et=e[T-2]/ut,xt=this.s[O]/ut,Pt=e[O]/ut,ft=((Gt+rt)*(Gt-rt)+Et*Et)/2,Ct=rt*Et*(rt*Et),it=0;(function(S,U){return S||U})(ft!==0,Ct!==0)&&(it=Math.sqrt(ft*ft+Ct),ft<0&&(it=-it),it=Ct/(ft+it));for(var tt=(xt+rt)*(xt-rt)+it,nt=xt*Pt,A=O;A<T-1;A++){var Z=h.hypot(tt,nt),Q=tt/Z,K=nt/Z;A!==O&&(e[A-1]=Z),tt=Q*this.s[A]+K*e[A],e[A]=Q*e[A]-K*this.s[A],nt=K*this.s[A+1],this.s[A+1]=Q*this.s[A+1];for(var k=0;k<this.n;k++)Z=Q*this.V[k][A]+K*this.V[k][A+1],this.V[k][A+1]=-K*this.V[k][A]+Q*this.V[k][A+1],this.V[k][A]=Z;if(Z=h.hypot(tt,nt),Q=tt/Z,K=nt/Z,this.s[A]=Z,tt=Q*e[A]+K*this.s[A+1],this.s[A+1]=-K*e[A]+Q*this.s[A+1],nt=K*e[A+1],e[A+1]=Q*e[A+1],A<this.m-1)for(var _=0;_<this.m;_++)Z=Q*this.U[_][A]+K*this.U[_][A+1],this.U[_][A+1]=-K*this.U[_][A]+Q*this.U[_][A+1],this.U[_][A]=Z}e[T-2]=tt}break;case 4:{if(this.s[O]<=0){this.s[O]=this.s[O]<0?-this.s[O]:0;for(var Ot=0;Ot<=Ut;Ot++)this.V[Ot][O]=-this.V[Ot][O]}for(;O<Ut&&!(this.s[O]>=this.s[O+1]);){var gt=this.s[O];if(this.s[O]=this.s[O+1],this.s[O+1]=gt,O<this.n-1)for(var st=0;st<this.n;st++)gt=this.V[st][O+1],this.V[st][O+1]=this.V[st][O],this.V[st][O]=gt;if(O<this.m-1)for(var ot=0;ot<this.m;ot++)gt=this.U[ot][O+1],this.U[ot][O+1]=this.U[ot][O],this.U[ot][O]=gt;O++}T--}break}}var Ht={U:this.U,V:this.V,S:this.s};return Ht},h.hypot=function(i,r){var e=void 0;return Math.abs(i)>Math.abs(r)?(e=r/i,e=Math.abs(i)*Math.sqrt(1+e*e)):r!=0?(e=i/r,e=Math.abs(r)*Math.sqrt(1+e*e)):e=0,e},L.exports=h}),(function(L,M,d){var h=(function(){function e(s,l){for(var n=0;n<l.length;n++){var f=l[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,l,n){return l&&e(s.prototype,l),n&&e(s,n),s}})();function i(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}var r=(function(){function e(s,l){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=s,this.sequence2=l,this.match_score=n,this.mismatch_penalty=f,this.gap_penalty=t,this.iMax=s.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[o][a]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[u][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return h(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var f=1;f<this.iMax;f++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[f-1]===this.sequence2[t-1]?o=this.grid[f-1][t-1]+this.match_score:o=this.grid[f-1][t-1]+this.mismatch_penalty;var a=this.grid[f-1][t]+this.gap_penalty,u=this.grid[f][t-1]+this.gap_penalty,g=[o,a,u],p=this.arrayAllMaxIndexes(g);this.grid[f][t]=g[p[0]],this.tracebackGrid[f][t]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var n=l[0],f=this.tracebackGrid[n.pos[0]][n.pos[1]];f[0]&&l.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),f[1]&&l.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),f[2]&&l.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),l.shift()}return this.alignments}},{key:"getAllIndexes",value:function(l,n){for(var f=[],t=-1;(t=l.indexOf(n,t+1))!==-1;)f.push(t);return f}},{key:"arrayAllMaxIndexes",value:function(l){return this.getAllIndexes(l,Math.max.apply(null,l))}}]),e})();L.exports=r}),(function(L,M,d){var h=function(){};h.FDLayout=d(18),h.FDLayoutConstants=d(4),h.FDLayoutEdge=d(19),h.FDLayoutNode=d(20),h.DimensionD=d(21),h.HashMap=d(22),h.HashSet=d(23),h.IGeometry=d(8),h.IMath=d(9),h.Integer=d(10),h.Point=d(12),h.PointD=d(5),h.RandomSeed=d(16),h.RectangleD=d(13),h.Transform=d(17),h.UniqueIDGeneretor=d(14),h.Quicksort=d(25),h.LinkedList=d(11),h.LGraphObject=d(2),h.LGraph=d(6),h.LEdge=d(1),h.LGraphManager=d(7),h.LNode=d(3),h.Layout=d(15),h.LayoutConstants=d(0),h.NeedlemanWunsch=d(27),h.Matrix=d(24),h.SVD=d(26),L.exports=h}),(function(L,M,d){function h(){this.listeners=[]}var i=h.prototype;i.addListener=function(r,e){this.listeners.push({event:r,callback:e})},i.removeListener=function(r,e){for(var s=this.listeners.length;s>=0;s--){var l=this.listeners[s];l.event===r&&l.callback===e&&this.listeners.splice(s,1)}},i.emit=function(r,e){for(var s=0;s<this.listeners.length;s++){var l=this.listeners[s];r===l.event&&l.callback(e)}},L.exports=h})])})})(It.__module)),It.__module.exports}exports.__require=Vt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const It=require("../../../../_virtual/layout-base.cjs.js");var Wt=It.__module.exports,Yt;function Vt(){return Yt||(Yt=1,(function(Xt,zt){(function(M,d){Xt.exports=d()})(Wt,function(){return(function(L){var M={};function d(h){if(M[h])return M[h].exports;var i=M[h]={i:h,l:!1,exports:{}};return L[h].call(i.exports,i,i.exports,d),i.l=!0,i.exports}return d.m=L,d.c=M,d.i=function(h){return h},d.d=function(h,i,r){d.o(h,i)||Object.defineProperty(h,i,{configurable:!1,enumerable:!0,get:r})},d.n=function(h){var i=h&&h.__esModule?function(){return h.default}:function(){return h};return d.d(i,"a",i),i},d.o=function(h,i){return Object.prototype.hasOwnProperty.call(h,i)},d.p="",d(d.s=28)})([(function(L,M,d){function h(){}h.QUALITY=1,h.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,h.DEFAULT_INCREMENTAL=!1,h.DEFAULT_ANIMATION_ON_LAYOUT=!0,h.DEFAULT_ANIMATION_DURING_LAYOUT=!1,h.DEFAULT_ANIMATION_PERIOD=50,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,h.DEFAULT_GRAPH_MARGIN=15,h.NODE_DIMENSIONS_INCLUDE_LABELS=!1,h.SIMPLE_NODE_SIZE=40,h.SIMPLE_NODE_HALF_SIZE=h.SIMPLE_NODE_SIZE/2,h.EMPTY_COMPOUND_NODE_SIZE=40,h.MIN_EDGE_LENGTH=1,h.WORLD_BOUNDARY=1e6,h.INITIAL_WORLD_BOUNDARY=h.WORLD_BOUNDARY/1e3,h.WORLD_CENTER_X=1200,h.WORLD_CENTER_Y=900,L.exports=h}),(function(L,M,d){var h=d(2),i=d(8),r=d(9);function e(l,n,f){h.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=l,this.target=n}e.prototype=Object.create(h.prototype);for(var s in h)e[s]=h[s];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(l,n){for(var f=this.getOtherEnd(l),t=n.getGraphManager().getRoot();;){if(f.getOwner()==n)return f;if(f.getOwner()==t)break;f=f.getOwner().getParent()}return null},e.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=r.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=r.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=r.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=r.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=e}),(function(L,M,d){function h(i){this.vGraphObject=i}L.exports=h}),(function(L,M,d){var h=d(2),i=d(10),r=d(13),e=d(0),s=d(16),l=d(5);function n(t,o,a,u){a==null&&u==null&&(u=o),h.call(this,u),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=t,a!=null&&o!=null?this.rect=new r(o.x,o.y,a.width,a.height):this.rect=new r}n.prototype=Object.create(h.prototype);for(var f in h)n[f]=h[f];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(t){this.rect.width=t},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(t){this.rect.height=t},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},n.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},n.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},n.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},n.prototype.getEdgeListToNode=function(t){var o=[],a=this;return a.edges.forEach(function(u){if(u.target==t){if(u.source!=a)throw"Incorrect edge source!";o.push(u)}}),o},n.prototype.getEdgesBetween=function(t){var o=[],a=this;return a.edges.forEach(function(u){if(!(u.source==a||u.target==a))throw"Incorrect edge source and/or target";(u.target==t||u.source==t)&&o.push(u)}),o},n.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(a){if(a.source==o)t.add(a.target);else{if(a.target!=o)throw"Incorrect incidency!";t.add(a.source)}}),t},n.prototype.withChildren=function(){var t=new Set,o,a;if(t.add(this),this.child!=null)for(var u=this.child.getNodes(),g=0;g<u.length;g++)o=u[g],a=o.withChildren(),a.forEach(function(p){t.add(p)});return t},n.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var a=this.child.getNodes(),u=0;u<a.length;u++)o=a[u],t+=o.getNoOfChildren();return t==0&&(t=1),t},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var t,o,a=-e.INITIAL_WORLD_BOUNDARY,u=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+s.nextDouble()*(u-a)+a;var g=-e.INITIAL_WORLD_BOUNDARY,p=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+s.nextDouble()*(p-g)+g,this.rect.x=t,this.rect.y=o},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),a=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(a+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>a?(this.rect.y-=(this.labelHeight-a)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(a+this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var a=this.rect.y;a>e.WORLD_BOUNDARY?a=e.WORLD_BOUNDARY:a<-e.WORLD_BOUNDARY&&(a=-e.WORLD_BOUNDARY);var u=new l(o,a),g=t.inverseTransformPoint(u);this.setLocation(g.x,g.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},L.exports=n}),(function(L,M,d){var h=d(0);function i(){}for(var r in h)i[r]=h[r];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=i}),(function(L,M,d){function h(i,r){i==null&&r==null?(this.x=0,this.y=0):(this.x=i,this.y=r)}h.prototype.getX=function(){return this.x},h.prototype.getY=function(){return this.y},h.prototype.setX=function(i){this.x=i},h.prototype.setY=function(i){this.y=i},h.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},h.prototype.getCopy=function(){return new h(this.x,this.y)},h.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},L.exports=h}),(function(L,M,d){var h=d(2),i=d(10),r=d(0),e=d(7),s=d(3),l=d(1),n=d(13),f=d(12),t=d(11);function o(u,g,p){h.call(this,p),this.estimatedSize=i.MIN_VALUE,this.margin=r.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,g!=null&&g instanceof e?this.graphManager=g:g!=null&&g instanceof Layout&&(this.graphManager=g.graphManager)}o.prototype=Object.create(h.prototype);for(var a in h)o[a]=h[a];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(u,g,p){if(g==null&&p==null){var c=u;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var v=u;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(p)>-1))throw"Source or target not in graph!";if(!(g.owner==p.owner&&g.owner==this))throw"Both owners must be this graph!";return g.owner!=p.owner?null:(v.source=g,v.target=p,v.isInterGraph=!1,this.getEdges().push(v),g.edges.push(v),p!=g&&p.edges.push(v),v)}},o.prototype.remove=function(u){var g=u;if(u instanceof s){if(g==null)throw"Node is null!";if(!(g.owner!=null&&g.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var p=g.edges.slice(),c,v=p.length,y=0;y<v;y++)c=p[y],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var E=this.nodes.indexOf(g);if(E==-1)throw"Node not in owner node list!";this.nodes.splice(E,1)}else if(u instanceof l){var c=u;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var D=c.source.edges.indexOf(c),I=c.target.edges.indexOf(c);if(!(D>-1&&I>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(D,1),c.target!=c.source&&c.target.edges.splice(I,1);var E=c.source.owner.getEdges().indexOf(c);if(E==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(E,1)}},o.prototype.updateLeftTop=function(){for(var u=i.MAX_VALUE,g=i.MAX_VALUE,p,c,v,y=this.getNodes(),E=y.length,D=0;D<E;D++){var I=y[D];p=I.getTop(),c=I.getLeft(),u>p&&(u=p),g>c&&(g=c)}return u==i.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?v=y[0].getParent().paddingLeft:v=this.margin,this.left=g-v,this.top=u-v,new f(this.left,this.top))},o.prototype.updateBounds=function(u){for(var g=i.MAX_VALUE,p=-i.MAX_VALUE,c=i.MAX_VALUE,v=-i.MAX_VALUE,y,E,D,I,N,m=this.nodes,x=m.length,w=0;w<x;w++){var F=m[w];u&&F.child!=null&&F.updateBounds(),y=F.getLeft(),E=F.getRight(),D=F.getTop(),I=F.getBottom(),g>y&&(g=y),p<E&&(p=E),c>D&&(c=D),v<I&&(v=I)}var T=new n(g,c,p-g,v-c);g==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),m[0].getParent().paddingLeft!=null?N=m[0].getParent().paddingLeft:N=this.margin,this.left=T.x-N,this.right=T.x+T.width+N,this.top=T.y-N,this.bottom=T.y+T.height+N},o.calculateBounds=function(u){for(var g=i.MAX_VALUE,p=-i.MAX_VALUE,c=i.MAX_VALUE,v=-i.MAX_VALUE,y,E,D,I,N=u.length,m=0;m<N;m++){var x=u[m];y=x.getLeft(),E=x.getRight(),D=x.getTop(),I=x.getBottom(),g>y&&(g=y),p<E&&(p=E),c>D&&(c=D),v<I&&(v=I)}var w=new n(g,c,p-g,v-c);return w},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var u=0,g=this.nodes,p=g.length,c=0;c<p;c++){var v=g[c];u+=v.calcEstimatedSize()}return u==0?this.estimatedSize=r.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=u/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var g=new t,p=new Set,c=this.nodes[0],v,y,E=c.withChildren();for(E.forEach(function(w){g.push(w),p.add(w)});g.length!==0;){c=g.shift(),v=c.getEdges();for(var D=v.length,I=0;I<D;I++){var N=v[I];if(y=N.getOtherEndInGraph(c,this),y!=null&&!p.has(y)){var m=y.withChildren();m.forEach(function(w){g.push(w),p.add(w)})}}}if(this.isConnected=!1,p.size>=this.nodes.length){var x=0;p.forEach(function(w){w.owner==u&&x++}),x==this.nodes.length&&(this.isConnected=!0)}},L.exports=o}),(function(L,M,d){var h,i=d(1);function r(e){h=d(6),this.layout=e,this.graphs=[],this.edges=[]}r.prototype.addRoot=function(){var e=this.layout.newGraph(),s=this.layout.newNode(null),l=this.add(e,s);return this.setRootGraph(l),this.rootGraph},r.prototype.add=function(e,s,l,n,f){if(l==null&&n==null&&f==null){if(e==null)throw"Graph is null!";if(s==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(s.child!=null)throw"Already has a child!";return e.parent=s,s.child=e,e}else{f=l,n=s,l=e;var t=n.getOwner(),o=f.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return l.isInterGraph=!1,t.add(l,n,f);if(l.isInterGraph=!0,l.source=n,l.target=f,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},r.prototype.remove=function(e){if(e instanceof h){var s=e;if(s.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(s==this.rootGraph||s.parent!=null&&s.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(s.getEdges());for(var n,f=l.length,t=0;t<f;t++)n=l[t],s.remove(n);var o=[];o=o.concat(s.getNodes());var a;f=o.length;for(var t=0;t<f;t++)a=o[t],s.remove(a);s==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(s);this.graphs.splice(u,1),s.parent=null}else if(e instanceof i){if(n=e,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var u=n.source.edges.indexOf(n);if(n.source.edges.splice(u,1),u=n.target.edges.indexOf(n),n.target.edges.splice(u,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var u=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(u,1)}},r.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},r.prototype.getGraphs=function(){return this.graphs},r.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],s=this.getGraphs(),l=s.length,n=0;n<l;n++)e=e.concat(s[n].getNodes());this.allNodes=e}return this.allNodes},r.prototype.resetAllNodes=function(){this.allNodes=null},r.prototype.resetAllEdges=function(){this.allEdges=null},r.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},r.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],s=this.getGraphs();s.length;for(var l=0;l<s.length;l++)e=e.concat(s[l].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},r.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},r.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},r.prototype.getRoot=function(){return this.rootGraph},r.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},r.prototype.getLayout=function(){return this.layout},r.prototype.isOneAncestorOfOther=function(e,s){if(!(e!=null&&s!=null))throw"assert failed";if(e==s)return!0;var l=e.getOwner(),n;do{if(n=l.getParent(),n==null)break;if(n==s)return!0;if(l=n.getOwner(),l==null)break}while(!0);l=s.getOwner();do{if(n=l.getParent(),n==null)break;if(n==e)return!0;if(l=n.getOwner(),l==null)break}while(!0);return!1},r.prototype.calcLowestCommonAncestors=function(){for(var e,s,l,n,f,t=this.getAllEdges(),o=t.length,a=0;a<o;a++){if(e=t[a],s=e.source,l=e.target,e.lca=null,e.sourceInLca=s,e.targetInLca=l,s==l){e.lca=s.getOwner();continue}for(n=s.getOwner();e.lca==null;){for(e.targetInLca=l,f=l.getOwner();e.lca==null;){if(f==n){e.lca=f;break}if(f==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=f.getParent(),f=e.targetInLca.getOwner()}if(n==this.rootGraph)break;e.lca==null&&(e.sourceInLca=n.getParent(),n=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},r.prototype.calcLowestCommonAncestor=function(e,s){if(e==s)return e.getOwner();var l=e.getOwner();do{if(l==null)break;var n=s.getOwner();do{if(n==null)break;if(n==l)return n;n=n.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},r.prototype.calcInclusionTreeDepths=function(e,s){e==null&&s==null&&(e=this.rootGraph,s=1);for(var l,n=e.getNodes(),f=n.length,t=0;t<f;t++)l=n[t],l.inclusionTreeDepth=s,l.child!=null&&this.calcInclusionTreeDepths(l.child,s+1)},r.prototype.includesInvalidEdge=function(){for(var e,s=[],l=this.edges.length,n=0;n<l;n++)e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target)&&s.push(e);for(var n=0;n<s.length;n++)this.remove(s[n]);return!1},L.exports=r}),(function(L,M,d){var h=d(12);function i(){}i.calcSeparationAmount=function(r,e,s,l){if(!r.intersects(e))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(r,e,n),s[0]=Math.min(r.getRight(),e.getRight())-Math.max(r.x,e.x),s[1]=Math.min(r.getBottom(),e.getBottom())-Math.max(r.y,e.y),r.getX()<=e.getX()&&r.getRight()>=e.getRight()?s[0]+=Math.min(e.getX()-r.getX(),r.getRight()-e.getRight()):e.getX()<=r.getX()&&e.getRight()>=r.getRight()&&(s[0]+=Math.min(r.getX()-e.getX(),e.getRight()-r.getRight())),r.getY()<=e.getY()&&r.getBottom()>=e.getBottom()?s[1]+=Math.min(e.getY()-r.getY(),r.getBottom()-e.getBottom()):e.getY()<=r.getY()&&e.getBottom()>=r.getBottom()&&(s[1]+=Math.min(r.getY()-e.getY(),e.getBottom()-r.getBottom()));var f=Math.abs((e.getCenterY()-r.getCenterY())/(e.getCenterX()-r.getCenterX()));e.getCenterY()===r.getCenterY()&&e.getCenterX()===r.getCenterX()&&(f=1);var t=f*s[0],o=s[1]/f;s[0]<o?o=s[0]:t=s[1],s[0]=-1*n[0]*(o/2+l),s[1]=-1*n[1]*(t/2+l)},i.decideDirectionsForOverlappingNodes=function(r,e,s){r.getCenterX()<e.getCenterX()?s[0]=-1:s[0]=1,r.getCenterY()<e.getCenterY()?s[1]=-1:s[1]=1},i.getIntersection2=function(r,e,s){var l=r.getCenterX(),n=r.getCenterY(),f=e.getCenterX(),t=e.getCenterY();if(r.intersects(e))return s[0]=l,s[1]=n,s[2]=f,s[3]=t,!0;var o=r.getX(),a=r.getY(),u=r.getRight(),g=r.getX(),p=r.getBottom(),c=r.getRight(),v=r.getWidthHalf(),y=r.getHeightHalf(),E=e.getX(),D=e.getY(),I=e.getRight(),N=e.getX(),m=e.getBottom(),x=e.getRight(),w=e.getWidthHalf(),F=e.getHeightHalf(),T=!1,G=!1;if(l===f){if(n>t)return s[0]=l,s[1]=a,s[2]=f,s[3]=m,!1;if(n<t)return s[0]=l,s[1]=p,s[2]=f,s[3]=D,!1}else if(n===t){if(l>f)return s[0]=o,s[1]=n,s[2]=I,s[3]=t,!1;if(l<f)return s[0]=u,s[1]=n,s[2]=E,s[3]=t,!1}else{var X=r.height/r.width,R=e.height/e.width,C=(t-n)/(f-l),B=void 0,$=void 0,b=void 0,P=void 0,W=void 0,V=void 0;if(-X===C?l>f?(s[0]=g,s[1]=p,T=!0):(s[0]=u,s[1]=a,T=!0):X===C&&(l>f?(s[0]=o,s[1]=a,T=!0):(s[0]=c,s[1]=p,T=!0)),-R===C?f>l?(s[2]=N,s[3]=m,G=!0):(s[2]=I,s[3]=D,G=!0):R===C&&(f>l?(s[2]=E,s[3]=D,G=!0):(s[2]=x,s[3]=m,G=!0)),T&&G)return!1;if(l>f?n>t?(B=this.getCardinalDirection(X,C,4),$=this.getCardinalDirection(R,C,2)):(B=this.getCardinalDirection(-X,C,3),$=this.getCardinalDirection(-R,C,1)):n>t?(B=this.getCardinalDirection(-X,C,1),$=this.getCardinalDirection(-R,C,3)):(B=this.getCardinalDirection(X,C,2),$=this.getCardinalDirection(R,C,4)),!T)switch(B){case 1:P=a,b=l+-y/C,s[0]=b,s[1]=P;break;case 2:b=c,P=n+v*C,s[0]=b,s[1]=P;break;case 3:P=p,b=l+y/C,s[0]=b,s[1]=P;break;case 4:b=g,P=n+-v*C,s[0]=b,s[1]=P;break}if(!G)switch($){case 1:V=D,W=f+-F/C,s[2]=W,s[3]=V;break;case 2:W=x,V=t+w*C,s[2]=W,s[3]=V;break;case 3:V=m,W=f+F/C,s[2]=W,s[3]=V;break;case 4:W=N,V=t+-w*C,s[2]=W,s[3]=V;break}}return!1},i.getCardinalDirection=function(r,e,s){return r>e?s:1+s%4},i.getIntersection=function(r,e,s,l){if(l==null)return this.getIntersection2(r,e,s);var n=r.x,f=r.y,t=e.x,o=e.y,a=s.x,u=s.y,g=l.x,p=l.y,c=void 0,v=void 0,y=void 0,E=void 0,D=void 0,I=void 0,N=void 0,m=void 0,x=void 0;return y=o-f,D=n-t,N=t*f-n*o,E=p-u,I=a-g,m=g*u-a*p,x=y*I-E*D,x===0?null:(c=(D*m-I*N)/x,v=(E*N-y*m)/x,new h(c,v))},i.angleOfVector=function(r,e,s,l){var n=void 0;return r!==s?(n=Math.atan((l-e)/(s-r)),s<r?n+=Math.PI:l<e&&(n+=this.TWO_PI)):l<e?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},i.doIntersect=function(r,e,s,l){var n=r.x,f=r.y,t=e.x,o=e.y,a=s.x,u=s.y,g=l.x,p=l.y,c=(t-n)*(p-u)-(g-a)*(o-f);if(c===0)return!1;var v=((p-u)*(g-n)+(a-g)*(p-f))/c,y=((f-o)*(g-n)+(t-n)*(p-f))/c;return 0<v&&v<1&&0<y&&y<1},i.findCircleLineIntersections=function(r,e,s,l,n,f,t){var o=(s-r)*(s-r)+(l-e)*(l-e),a=2*((r-n)*(s-r)+(e-f)*(l-e)),u=(r-n)*(r-n)+(e-f)*(e-f)-t*t,g=a*a-4*o*u;if(g>=0){var p=(-a+Math.sqrt(a*a-4*o*u))/(2*o),c=(-a-Math.sqrt(a*a-4*o*u))/(2*o),v=null;return p>=0&&p<=1?[p]:c>=0&&c<=1?[c]:v}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,L.exports=i}),(function(L,M,d){function h(){}h.sign=function(i){return i>0?1:i<0?-1:0},h.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},h.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},L.exports=h}),(function(L,M,d){function h(){}h.MAX_VALUE=2147483647,h.MIN_VALUE=-2147483648,L.exports=h}),(function(L,M,d){var h=(function(){function n(f,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,a.key,a)}}return function(f,t,o){return t&&n(f.prototype,t),o&&n(f,o),f}})();function i(n,f){if(!(n instanceof f))throw new TypeError("Cannot call a class as a function")}var r=function(f){return{value:f,next:null,prev:null}},e=function(f,t,o,a){return f!==null?f.next=t:a.head=t,o!==null?o.prev=t:a.tail=t,t.prev=f,t.next=o,a.length++,t},s=function(f,t){var o=f.prev,a=f.next;return o!==null?o.next=a:t.head=a,a!==null?a.prev=o:t.tail=o,f.prev=f.next=null,t.length--,f},l=(function(){function n(f){var t=this;i(this,n),this.length=0,this.head=null,this.tail=null,f?.forEach(function(o){return t.push(o)})}return h(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,o){return e(o.prev,r(t),o,this)}},{key:"insertAfter",value:function(t,o){return e(o,r(t),o.next,this)}},{key:"insertNodeBefore",value:function(t,o){return e(o.prev,t,o,this)}},{key:"insertNodeAfter",value:function(t,o){return e(o,t,o.next,this)}},{key:"push",value:function(t){return e(this.tail,r(t),null,this)}},{key:"unshift",value:function(t){return e(null,r(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var o=1,a=this.head;o<t;)a=a.next,o++;return a.value}}},{key:"set_object_at",value:function(t,o){if(t<=this.length()){for(var a=1,u=this.head;a<t;)u=u.next,a++;u.value=o}}}]),n})();L.exports=l}),(function(L,M,d){function h(i,r,e){this.x=null,this.y=null,i==null&&r==null&&e==null?(this.x=0,this.y=0):typeof i=="number"&&typeof r=="number"&&e==null?(this.x=i,this.y=r):i.constructor.name=="Point"&&r==null&&e==null&&(e=i,this.x=e.x,this.y=e.y)}h.prototype.getX=function(){return this.x},h.prototype.getY=function(){return this.y},h.prototype.getLocation=function(){return new h(this.x,this.y)},h.prototype.setLocation=function(i,r,e){i.constructor.name=="Point"&&r==null&&e==null?(e=i,this.setLocation(e.x,e.y)):typeof i=="number"&&typeof r=="number"&&e==null&&(parseInt(i)==i&&parseInt(r)==r?this.move(i,r):(this.x=Math.floor(i+.5),this.y=Math.floor(r+.5)))},h.prototype.move=function(i,r){this.x=i,this.y=r},h.prototype.translate=function(i,r){this.x+=i,this.y+=r},h.prototype.equals=function(i){if(i.constructor.name=="Point"){var r=i;return this.x==r.x&&this.y==r.y}return this==i},h.prototype.toString=function(){return new h().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=h}),(function(L,M,d){function h(i,r,e,s){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&r!=null&&e!=null&&s!=null&&(this.x=i,this.y=r,this.width=e,this.height=s)}h.prototype.getX=function(){return this.x},h.prototype.setX=function(i){this.x=i},h.prototype.getY=function(){return this.y},h.prototype.setY=function(i){this.y=i},h.prototype.getWidth=function(){return this.width},h.prototype.setWidth=function(i){this.width=i},h.prototype.getHeight=function(){return this.height},h.prototype.setHeight=function(i){this.height=i},h.prototype.getRight=function(){return this.x+this.width},h.prototype.getBottom=function(){return this.y+this.height},h.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},h.prototype.getCenterX=function(){return this.x+this.width/2},h.prototype.getMinX=function(){return this.getX()},h.prototype.getMaxX=function(){return this.getX()+this.width},h.prototype.getCenterY=function(){return this.y+this.height/2},h.prototype.getMinY=function(){return this.getY()},h.prototype.getMaxY=function(){return this.getY()+this.height},h.prototype.getWidthHalf=function(){return this.width/2},h.prototype.getHeightHalf=function(){return this.height/2},L.exports=h}),(function(L,M,d){var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function i(){}i.lastID=0,i.createID=function(r){return i.isPrimitive(r)?r:(r.uniqueID!=null||(r.uniqueID=i.getString(),i.lastID++),r.uniqueID)},i.getString=function(r){return r==null&&(r=i.lastID),"Object#"+r},i.isPrimitive=function(r){var e=typeof r>"u"?"undefined":h(r);return r==null||e!="object"&&e!="function"},L.exports=i}),(function(L,M,d){function h(a){if(Array.isArray(a)){for(var u=0,g=Array(a.length);u<a.length;u++)g[u]=a[u];return g}else return Array.from(a)}var i=d(0),r=d(7),e=d(3),s=d(1),l=d(6),n=d(5),f=d(17),t=d(29);function o(a){t.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new r(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var a=new r(this);return this.graphManager=a,a},o.prototype.newGraph=function(a){return new l(null,this.graphManager,a)},o.prototype.newNode=function(a){return new e(this.graphManager,a)},o.prototype.newEdge=function(a){return new s(null,null,a)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),i.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),u=0;u<a.length;u++)a[u];for(var g=this.graphManager.getRoot().getNodes(),u=0;u<g.length;u++)g[u];this.update(this.graphManager.getRoot())}},o.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof e){var u=a;if(u.getChild()!=null)for(var g=u.getChild().getNodes(),p=0;p<g.length;p++)update(g[p]);if(u.vGraphObject!=null){var c=u.vGraphObject;c.update(u)}}else if(a instanceof s){var v=a;if(v.vGraphObject!=null){var y=v.vGraphObject;y.update(v)}}else if(a instanceof l){var E=a;if(E.vGraphObject!=null){var D=E.vGraphObject;D.update(E)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var u=new f,g=this.graphManager.getRoot().updateLeftTop();if(g!=null){u.setWorldOrgX(a.x),u.setWorldOrgY(a.y),u.setDeviceOrgX(g.x),u.setDeviceOrgY(g.y);for(var p=this.getAllNodes(),c,v=0;v<p.length;v++)c=p[v],c.transform(u)}}},o.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var u,g,p=a.getNodes(),c=0;c<p.length;c++)u=p[c],g=u.getChild(),g==null||g.getNodes().length==0?u.scatter():(this.positionNodesRandomly(g),u.updateBounds())},o.prototype.getFlatForest=function(){for(var a=[],u=!0,g=this.graphManager.getRoot().getNodes(),p=!0,c=0;c<g.length;c++)g[c].getChild()!=null&&(p=!1);if(!p)return a;var v=new Set,y=[],E=new Map,D=[];for(D=D.concat(g);D.length>0&&u;){for(y.push(D[0]);y.length>0&&u;){var I=y[0];y.splice(0,1),v.add(I);for(var N=I.getEdges(),c=0;c<N.length;c++){var m=N[c].getOtherEnd(I);if(E.get(I)!=m)if(!v.has(m))y.push(m),E.set(m,I);else{u=!1;break}}}if(!u)a=[];else{var x=[].concat(h(v));a.push(x);for(var c=0;c<x.length;c++){var w=x[c],F=D.indexOf(w);F>-1&&D.splice(F,1)}v=new Set,E=new Map}}return a},o.prototype.createDummyNodesForBendpoints=function(a){for(var u=[],g=a.source,p=this.graphManager.calcLowestCommonAncestor(a.source,a.target),c=0;c<a.bendpoints.length;c++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),p.add(v);var y=this.newEdge(null);this.graphManager.add(y,g,v),u.add(v),g=v}var y=this.newEdge(null);return this.graphManager.add(y,g,a.target),this.edgeToDummyNodes.set(a,u),a.isInterGraph()?this.graphManager.remove(a):p.remove(a),u},o.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(h(this.edgeToDummyNodes.keys())).concat(a);for(var u=0;u<a.length;u++){var g=a[u];if(g.bendpoints.length>0){for(var p=this.edgeToDummyNodes.get(g),c=0;c<p.length;c++){var v=p[c],y=new n(v.getCenterX(),v.getCenterY()),E=g.bendpoints.get(c);E.x=y.x,E.y=y.y,v.getOwner().remove(v)}this.graphManager.add(g,g.source,g.target)}}},o.transform=function(a,u,g,p){if(g!=null&&p!=null){var c=u;if(a<=50){var v=u/g;c-=(u-v)/50*(50-a)}else{var y=u*p;c+=(y-u)/50*(a-50)}return c}else{var E,D;return a<=50?(E=9*u/500,D=u/10):(E=9*u/50,D=-8*u),E*a+D}},o.findCenterOfTree=function(a){var u=[];u=u.concat(a);var g=[],p=new Map,c=!1,v=null;(u.length==1||u.length==2)&&(c=!0,v=u[0]);for(var y=0;y<u.length;y++){var E=u[y],D=E.getNeighborsList().size;p.set(E,E.getNeighborsList().size),D==1&&g.push(E)}var I=[];for(I=I.concat(g);!c;){var N=[];N=N.concat(I),I=[];for(var y=0;y<u.length;y++){var E=u[y],m=u.indexOf(E);m>=0&&u.splice(m,1);var x=E.getNeighborsList();x.forEach(function(T){if(g.indexOf(T)<0){var G=p.get(T),X=G-1;X==1&&I.push(T),p.set(T,X)}})}g=g.concat(I),(u.length==1||u.length==2)&&(c=!0,v=u[0])}return v},o.prototype.setGraphManager=function(a){this.graphManager=a},L.exports=o}),(function(L,M,d){function h(){}h.seed=1,h.x=0,h.nextDouble=function(){return h.x=Math.sin(h.seed++)*1e4,h.x-Math.floor(h.x)},L.exports=h}),(function(L,M,d){var h=d(5);function i(r,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(r){this.lworldOrgX=r},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(r){this.lworldOrgY=r},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(r){this.lworldExtX=r},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(r){this.lworldExtY=r},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(r){this.ldeviceOrgX=r},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(r){this.ldeviceOrgY=r},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(r){this.ldeviceExtX=r},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(r){this.ldeviceExtY=r},i.prototype.transformX=function(r){var e=0,s=this.lworldExtX;return s!=0&&(e=this.ldeviceOrgX+(r-this.lworldOrgX)*this.ldeviceExtX/s),e},i.prototype.transformY=function(r){var e=0,s=this.lworldExtY;return s!=0&&(e=this.ldeviceOrgY+(r-this.lworldOrgY)*this.ldeviceExtY/s),e},i.prototype.inverseTransformX=function(r){var e=0,s=this.ldeviceExtX;return s!=0&&(e=this.lworldOrgX+(r-this.ldeviceOrgX)*this.lworldExtX/s),e},i.prototype.inverseTransformY=function(r){var e=0,s=this.ldeviceExtY;return s!=0&&(e=this.lworldOrgY+(r-this.ldeviceOrgY)*this.lworldExtY/s),e},i.prototype.inverseTransformPoint=function(r){var e=new h(this.inverseTransformX(r.x),this.inverseTransformY(r.y));return e},L.exports=i}),(function(L,M,d){function h(t){if(Array.isArray(t)){for(var o=0,a=Array(t.length);o<t.length;o++)a[o]=t[o];return a}else return Array.from(t)}var i=d(15),r=d(4),e=d(0),s=d(8),l=d(9);function n(){i.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}n.prototype=Object.create(i.prototype);for(var f in i)n[f]=i[f];n.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,o,a,u,g,p,c,v=this.getGraphManager().getAllEdges(),y=0;y<v.length;y++)t=v[y],o=t.idealLength,t.isInterGraph&&(u=t.getSource(),g=t.getTarget(),p=t.getSourceInLca().getEstimatedSize(),c=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=p+c-2*e.SIMPLE_NODE_SIZE),a=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*a))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>r.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,a=0;a<t.length;a++)o=t[a],this.calcSpringForce(o,o.idealLength)},n.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,u,g,p,c=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,a=0;a<c.length;a++)g=c[a],this.calculateRepulsionForceOfANode(g,v,t,o),v.add(g);else for(a=0;a<c.length;a++)for(g=c[a],u=a+1;u<c.length;u++)p=c[u],g.getOwner()==p.getOwner()&&this.calcRepulsionForce(g,p)},n.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),a=0;a<o.length;a++)t=o[a],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,a=0;a<t.length;a++)o=t[a],o.move()},n.prototype.calcSpringForce=function(t,o){var a=t.getSource(),u=t.getTarget(),g,p,c,v;if(this.uniformLeafNodeSizes&&a.getChild()==null&&u.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;g=t.getLength(),g!=0&&(p=t.edgeElasticity*(g-o),c=p*(t.lengthX/g),v=p*(t.lengthY/g),a.springForceX+=c,a.springForceY+=v,u.springForceX-=c,u.springForceY-=v)},n.prototype.calcRepulsionForce=function(t,o){var a=t.getRect(),u=o.getRect(),g=new Array(2),p=new Array(4),c,v,y,E,D,I,N;if(a.intersects(u)){s.calcSeparationAmount(a,u,g,r.DEFAULT_EDGE_LENGTH/2),I=2*g[0],N=2*g[1];var m=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=m*I,t.repulsionForceY-=m*N,o.repulsionForceX+=m*I,o.repulsionForceY+=m*N}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(c=u.getCenterX()-a.getCenterX(),v=u.getCenterY()-a.getCenterY()):(s.getIntersection(a,u,p),c=p[2]-p[0],v=p[3]-p[1]),Math.abs(c)<r.MIN_REPULSION_DIST&&(c=l.sign(c)*r.MIN_REPULSION_DIST),Math.abs(v)<r.MIN_REPULSION_DIST&&(v=l.sign(v)*r.MIN_REPULSION_DIST),y=c*c+v*v,E=Math.sqrt(y),D=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/y,I=D*c/E,N=D*v/E,t.repulsionForceX-=I,t.repulsionForceY-=N,o.repulsionForceX+=I,o.repulsionForceY+=N},n.prototype.calcGravitationalForce=function(t){var o,a,u,g,p,c,v,y;o=t.getOwner(),a=(o.getRight()+o.getLeft())/2,u=(o.getTop()+o.getBottom())/2,g=t.getCenterX()-a,p=t.getCenterY()-u,c=Math.abs(g)+t.getWidth()/2,v=Math.abs(p)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(y=o.getEstimatedSize()*this.gravityRangeFactor,(c>y||v>y)&&(t.gravitationForceX=-this.gravityConstant*g,t.gravitationForceY=-this.gravityConstant*p)):(y=o.getEstimatedSize()*this.compoundGravityRangeFactor,(c>y||v>y)&&(t.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*p*this.compoundGravityConstant))},n.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),a=0;a<o.length;a++)t=o[a],t.noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var o=0,a=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var u=new Array(o),g=0;g<o;g++)u[g]=new Array(a);for(var g=0;g<o;g++)for(var p=0;p<a;p++)u[g][p]=new Array;return u},n.prototype.addNodeToGrid=function(t,o,a){var u=0,g=0,p=0,c=0;u=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/this.repulsionRange)),p=parseInt(Math.floor((t.getRect().y-a)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().height+t.getRect().y-a)/this.repulsionRange));for(var v=u;v<=g;v++)for(var y=p;y<=c;y++)this.grid[v][y].push(t),t.setGridCoordinates(u,g,p,c)},n.prototype.updateGrid=function(){var t,o,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<a.length;t++)o=a[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,o,a,u){if(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&a||u){var g=new Set;t.surrounding=new Array;for(var p,c=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var y=t.startY-1;y<t.finishY+2;y++)if(!(v<0||y<0||v>=c.length||y>=c[0].length)){for(var E=0;E<c[v][y].length;E++)if(p=c[v][y][E],!(t.getOwner()!=p.getOwner()||t==p)&&!o.has(p)&&!g.has(p)){var D=Math.abs(t.getCenterX()-p.getCenterX())-(t.getWidth()/2+p.getWidth()/2),I=Math.abs(t.getCenterY()-p.getCenterY())-(t.getHeight()/2+p.getHeight()/2);D<=this.repulsionRange&&I<=this.repulsionRange&&g.add(p)}}t.surrounding=[].concat(h(g))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},n.prototype.calcRepulsionRange=function(){return 0},L.exports=n}),(function(L,M,d){var h=d(1),i=d(4);function r(s,l,n){h.call(this,s,l,n),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}r.prototype=Object.create(h.prototype);for(var e in h)r[e]=h[e];L.exports=r}),(function(L,M,d){var h=d(3),i=d(4);function r(s,l,n,f){h.call(this,s,l,n,f),this.nodeRepulsion=i.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=[]}r.prototype=Object.create(h.prototype);for(var e in h)r[e]=h[e];r.prototype.setGridCoordinates=function(s,l,n,f){this.startX=s,this.finishX=l,this.startY=n,this.finishY=f},L.exports=r}),(function(L,M,d){function h(i,r){this.width=0,this.height=0,i!==null&&r!==null&&(this.height=r,this.width=i)}h.prototype.getWidth=function(){return this.width},h.prototype.setWidth=function(i){this.width=i},h.prototype.getHeight=function(){return this.height},h.prototype.setHeight=function(i){this.height=i},L.exports=h}),(function(L,M,d){var h=d(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(r,e){var s=h.createID(r);this.contains(s)||(this.map[s]=e,this.keys.push(r))},i.prototype.contains=function(r){return h.createID(r),this.map[r]!=null},i.prototype.get=function(r){var e=h.createID(r);return this.map[e]},i.prototype.keySet=function(){return this.keys},L.exports=i}),(function(L,M,d){var h=d(14);function i(){this.set={}}i.prototype.add=function(r){var e=h.createID(r);this.contains(e)||(this.set[e]=r)},i.prototype.remove=function(r){delete this.set[h.createID(r)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(r){return this.set[h.createID(r)]==r},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(r){for(var e=Object.keys(this.set),s=e.length,l=0;l<s;l++)r.push(this.set[e[l]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(r){for(var e=r.length,s=0;s<e;s++){var l=r[s];this.add(l)}},L.exports=i}),(function(L,M,d){function h(){}h.multMat=function(i,r){for(var e=[],s=0;s<i.length;s++){e[s]=[];for(var l=0;l<r[0].length;l++){e[s][l]=0;for(var n=0;n<i[0].length;n++)e[s][l]+=i[s][n]*r[n][l]}}return e},h.transpose=function(i){for(var r=[],e=0;e<i[0].length;e++){r[e]=[];for(var s=0;s<i.length;s++)r[e][s]=i[s][e]}return r},h.multCons=function(i,r){for(var e=[],s=0;s<i.length;s++)e[s]=i[s]*r;return e},h.minusOp=function(i,r){for(var e=[],s=0;s<i.length;s++)e[s]=i[s]-r[s];return e},h.dotProduct=function(i,r){for(var e=0,s=0;s<i.length;s++)e+=i[s]*r[s];return e},h.mag=function(i){return Math.sqrt(this.dotProduct(i,i))},h.normalize=function(i){for(var r=[],e=this.mag(i),s=0;s<i.length;s++)r[s]=i[s]/e;return r},h.multGamma=function(i){for(var r=[],e=0,s=0;s<i.length;s++)e+=i[s];e*=-1/i.length;for(var l=0;l<i.length;l++)r[l]=e+i[l];return r},h.multL=function(i,r,e){for(var s=[],l=[],n=[],f=0;f<r[0].length;f++){for(var t=0,o=0;o<r.length;o++)t+=-.5*r[o][f]*i[o];l[f]=t}for(var a=0;a<e.length;a++){for(var u=0,g=0;g<e.length;g++)u+=e[a][g]*l[g];n[a]=u}for(var p=0;p<r.length;p++){for(var c=0,v=0;v<r[0].length;v++)c+=r[p][v]*n[v];s[p]=c}return s},L.exports=h}),(function(L,M,d){var h=(function(){function s(l,n){for(var f=0;f<n.length;f++){var t=n[f];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}return function(l,n,f){return n&&s(l.prototype,n),f&&s(l,f),l}})();function i(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}var r=d(11),e=(function(){function s(l,n){i(this,s),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;l instanceof r?f=l.size():f=l.length,this._quicksort(l,0,f-1)}return h(s,[{key:"_quicksort",value:function(n,f,t){if(f<t){var o=this._partition(n,f,t);this._quicksort(n,f,o),this._quicksort(n,o+1,t)}}},{key:"_partition",value:function(n,f,t){for(var o=this._get(n,f),a=f,u=t;;){for(;this.compareFunction(o,this._get(n,u));)u--;for(;this.compareFunction(this._get(n,a),o);)a++;if(a<u)this._swap(n,a,u),a++,u--;else return u}}},{key:"_get",value:function(n,f){return n instanceof r?n.get_object_at(f):n[f]}},{key:"_set",value:function(n,f,t){n instanceof r?n.set_object_at(f,t):n[f]=t}},{key:"_swap",value:function(n,f,t){var o=this._get(n,f);this._set(n,f,this._get(n,t)),this._set(n,t,o)}},{key:"_defaultCompareFunction",value:function(n,f){return f>n}}]),s})();L.exports=e}),(function(L,M,d){function h(){}h.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var r=Math.min(this.m,this.n);this.s=(function(S){for(var U=[];S-- >0;)U.push(0);return U})(Math.min(this.m+1,this.n)),this.U=(function(S){var U=function wt(et){if(et.length==0)return 0;for(var ct=[],pt=0;pt<et[0];pt++)ct.push(wt(et.slice(1)));return ct};return U(S)})([this.m,r]),this.V=(function(S){var U=function wt(et){if(et.length==0)return 0;for(var ct=[],pt=0;pt<et[0];pt++)ct.push(wt(et.slice(1)));return ct};return U(S)})([this.n,this.n]);for(var e=(function(S){for(var U=[];S-- >0;)U.push(0);return U})(this.n),s=(function(S){for(var U=[];S-- >0;)U.push(0);return U})(this.m),l=!0,n=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,f);t++){if(t<n){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=h.hypot(this.s[t],i[o][t]);if(this.s[t]!==0){i[t][t]<0&&(this.s[t]=-this.s[t]);for(var a=t;a<this.m;a++)i[a][t]/=this.s[t];i[t][t]+=1}this.s[t]=-this.s[t]}for(var u=t+1;u<this.n;u++){if((function(S,U){return S&&U})(t<n,this.s[t]!==0)){for(var g=0,p=t;p<this.m;p++)g+=i[p][t]*i[p][u];g=-g/i[t][t];for(var c=t;c<this.m;c++)i[c][u]+=g*i[c][t]}e[u]=i[t][u]}if((function(S,U){return U})(l,t<n))for(var v=t;v<this.m;v++)this.U[v][t]=i[v][t];if(t<f){e[t]=0;for(var y=t+1;y<this.n;y++)e[t]=h.hypot(e[t],e[y]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var E=t+1;E<this.n;E++)e[E]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(S,U){return S&&U})(t+1<this.m,e[t]!==0)){for(var D=t+1;D<this.m;D++)s[D]=0;for(var I=t+1;I<this.n;I++)for(var N=t+1;N<this.m;N++)s[N]+=e[I]*i[N][I];for(var m=t+1;m<this.n;m++)for(var x=-e[m]/e[t+1],w=t+1;w<this.m;w++)i[w][m]+=x*s[w]}for(var F=t+1;F<this.n;F++)this.V[F][t]=e[F]}}var T=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=i[n][n]),this.m<T&&(this.s[T-1]=0),f+1<T&&(e[f]=i[f][T-1]),e[T-1]=0;{for(var G=n;G<r;G++){for(var X=0;X<this.m;X++)this.U[X][G]=0;this.U[G][G]=1}for(var R=n-1;R>=0;R--)if(this.s[R]!==0){for(var C=R+1;C<r;C++){for(var B=0,$=R;$<this.m;$++)B+=this.U[$][R]*this.U[$][C];B=-B/this.U[R][R];for(var b=R;b<this.m;b++)this.U[b][C]+=B*this.U[b][R]}for(var P=R;P<this.m;P++)this.U[P][R]=-this.U[P][R];this.U[R][R]=1+this.U[R][R];for(var W=0;W<R-1;W++)this.U[W][R]=0}else{for(var V=0;V<this.m;V++)this.U[V][R]=0;this.U[R][R]=1}}for(var Y=this.n-1;Y>=0;Y--){if((function(S,U){return S&&U})(Y<f,e[Y]!==0))for(var vt=Y+1;vt<r;vt++){for(var dt=0,yt=Y+1;yt<this.n;yt++)dt+=this.V[yt][Y]*this.V[yt][vt];dt=-dt/this.V[Y+1][Y];for(var Lt=Y+1;Lt<this.n;Lt++)this.V[Lt][vt]+=dt*this.V[Lt][Y]}for(var Dt=0;Dt<this.n;Dt++)this.V[Dt][Y]=0;this.V[Y][Y]=1}for(var Ut=T-1,St=Math.pow(2,-52),Ft=Math.pow(2,-966);T>0;){var O=void 0,at=void 0;for(O=T-2;O>=-1&&O!==-1;O--)if(Math.abs(e[O])<=Ft+St*(Math.abs(this.s[O])+Math.abs(this.s[O+1]))){e[O]=0;break}if(O===T-2)at=4;else{var H=void 0;for(H=T-1;H>=O&&H!==O;H--){var bt=(H!==T?Math.abs(e[H]):0)+(H!==O+1?Math.abs(e[H-1]):0);if(Math.abs(this.s[H])<=Ft+St*bt){this.s[H]=0;break}}H===O?at=3:H===T-1?at=1:(at=2,O=H)}switch(O++,at){case 1:{var Tt=e[T-2];e[T-2]=0;for(var z=T-2;z>=O;z--){var ht=h.hypot(this.s[z],Tt),mt=this.s[z]/ht,Mt=Tt/ht;this.s[z]=ht,z!==O&&(Tt=-Mt*e[z-1],e[z-1]=mt*e[z-1]);for(var J=0;J<this.n;J++)ht=mt*this.V[J][z]+Mt*this.V[J][T-1],this.V[J][T-1]=-Mt*this.V[J][z]+mt*this.V[J][T-1],this.V[J][z]=ht}}break;case 2:{var Nt=e[O-1];e[O-1]=0;for(var q=O;q<T;q++){var lt=h.hypot(this.s[q],Nt),At=this.s[q]/lt,Rt=Nt/lt;this.s[q]=lt,Nt=-Rt*e[q],e[q]=At*e[q];for(var j=0;j<this.m;j++)lt=At*this.U[j][q]+Rt*this.U[j][O-1],this.U[j][O-1]=-Rt*this.U[j][q]+At*this.U[j][O-1],this.U[j][q]=lt}}break;case 3:{var ut=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[T-1]),Math.abs(this.s[T-2])),Math.abs(e[T-2])),Math.abs(this.s[O])),Math.abs(e[O])),rt=this.s[T-1]/ut,Gt=this.s[T-2]/ut,Et=e[T-2]/ut,xt=this.s[O]/ut,Pt=e[O]/ut,ft=((Gt+rt)*(Gt-rt)+Et*Et)/2,Ct=rt*Et*(rt*Et),it=0;(function(S,U){return S||U})(ft!==0,Ct!==0)&&(it=Math.sqrt(ft*ft+Ct),ft<0&&(it=-it),it=Ct/(ft+it));for(var tt=(xt+rt)*(xt-rt)+it,nt=xt*Pt,A=O;A<T-1;A++){var Z=h.hypot(tt,nt),Q=tt/Z,K=nt/Z;A!==O&&(e[A-1]=Z),tt=Q*this.s[A]+K*e[A],e[A]=Q*e[A]-K*this.s[A],nt=K*this.s[A+1],this.s[A+1]=Q*this.s[A+1];for(var k=0;k<this.n;k++)Z=Q*this.V[k][A]+K*this.V[k][A+1],this.V[k][A+1]=-K*this.V[k][A]+Q*this.V[k][A+1],this.V[k][A]=Z;if(Z=h.hypot(tt,nt),Q=tt/Z,K=nt/Z,this.s[A]=Z,tt=Q*e[A]+K*this.s[A+1],this.s[A+1]=-K*e[A]+Q*this.s[A+1],nt=K*e[A+1],e[A+1]=Q*e[A+1],A<this.m-1)for(var _=0;_<this.m;_++)Z=Q*this.U[_][A]+K*this.U[_][A+1],this.U[_][A+1]=-K*this.U[_][A]+Q*this.U[_][A+1],this.U[_][A]=Z}e[T-2]=tt}break;case 4:{if(this.s[O]<=0){this.s[O]=this.s[O]<0?-this.s[O]:0;for(var Ot=0;Ot<=Ut;Ot++)this.V[Ot][O]=-this.V[Ot][O]}for(;O<Ut&&!(this.s[O]>=this.s[O+1]);){var gt=this.s[O];if(this.s[O]=this.s[O+1],this.s[O+1]=gt,O<this.n-1)for(var st=0;st<this.n;st++)gt=this.V[st][O+1],this.V[st][O+1]=this.V[st][O],this.V[st][O]=gt;if(O<this.m-1)for(var ot=0;ot<this.m;ot++)gt=this.U[ot][O+1],this.U[ot][O+1]=this.U[ot][O],this.U[ot][O]=gt;O++}T--}break}}var Ht={U:this.U,V:this.V,S:this.s};return Ht},h.hypot=function(i,r){var e=void 0;return Math.abs(i)>Math.abs(r)?(e=r/i,e=Math.abs(i)*Math.sqrt(1+e*e)):r!=0?(e=i/r,e=Math.abs(r)*Math.sqrt(1+e*e)):e=0,e},L.exports=h}),(function(L,M,d){var h=(function(){function e(s,l){for(var n=0;n<l.length;n++){var f=l[n];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,l,n){return l&&e(s.prototype,l),n&&e(s,n),s}})();function i(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}var r=(function(){function e(s,l){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=s,this.sequence2=l,this.match_score=n,this.mismatch_penalty=f,this.gap_penalty=t,this.iMax=s.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[o][a]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[u][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return h(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var f=1;f<this.iMax;f++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[f-1]===this.sequence2[t-1]?o=this.grid[f-1][t-1]+this.match_score:o=this.grid[f-1][t-1]+this.mismatch_penalty;var a=this.grid[f-1][t]+this.gap_penalty,u=this.grid[f][t-1]+this.gap_penalty,g=[o,a,u],p=this.arrayAllMaxIndexes(g);this.grid[f][t]=g[p[0]],this.tracebackGrid[f][t]=[p.includes(0),p.includes(1),p.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var n=l[0],f=this.tracebackGrid[n.pos[0]][n.pos[1]];f[0]&&l.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),f[1]&&l.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),f[2]&&l.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),l.shift()}return this.alignments}},{key:"getAllIndexes",value:function(l,n){for(var f=[],t=-1;(t=l.indexOf(n,t+1))!==-1;)f.push(t);return f}},{key:"arrayAllMaxIndexes",value:function(l){return this.getAllIndexes(l,Math.max.apply(null,l))}}]),e})();L.exports=r}),(function(L,M,d){var h=function(){};h.FDLayout=d(18),h.FDLayoutConstants=d(4),h.FDLayoutEdge=d(19),h.FDLayoutNode=d(20),h.DimensionD=d(21),h.HashMap=d(22),h.HashSet=d(23),h.IGeometry=d(8),h.IMath=d(9),h.Integer=d(10),h.Point=d(12),h.PointD=d(5),h.RandomSeed=d(16),h.RectangleD=d(13),h.Transform=d(17),h.UniqueIDGeneretor=d(14),h.Quicksort=d(25),h.LinkedList=d(11),h.LGraphObject=d(2),h.LGraph=d(6),h.LEdge=d(1),h.LGraphManager=d(7),h.LNode=d(3),h.Layout=d(15),h.LayoutConstants=d(0),h.NeedlemanWunsch=d(27),h.Matrix=d(24),h.SVD=d(26),L.exports=h}),(function(L,M,d){function h(){this.listeners=[]}var i=h.prototype;i.addListener=function(r,e){this.listeners.push({event:r,callback:e})},i.removeListener=function(r,e){for(var s=this.listeners.length;s>=0;s--){var l=this.listeners[s];l.event===r&&l.callback===e&&this.listeners.splice(s,1)}},i.emit=function(r,e){for(var s=0;s<this.listeners.length;s++){var l=this.listeners[s];r===l.event&&l.callback(e)}},L.exports=h})])})})(It.__module)),It.__module.exports}exports.__require=Vt;
|
|
2
2
|
//# sourceMappingURL=layout-base.cjs.js.map
|