@donartcha/openlag 0.1.3 → 0.1.5

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.
Files changed (60) hide show
  1. package/dist/assets/{arc-CQVyn5E3.js → arc-Cg8uAUBB.js} +1 -1
  2. package/dist/assets/{architectureDiagram-3BPJPVTR-BK7dvXUP.js → architectureDiagram-3BPJPVTR-BS-jlSix.js} +1 -1
  3. package/dist/assets/{blockDiagram-GPEHLZMM-CZACUlID.js → blockDiagram-GPEHLZMM-piJhj2Kl.js} +1 -1
  4. package/dist/assets/{c4Diagram-AAUBKEIU-BaIdnoVu.js → c4Diagram-AAUBKEIU-CUkupHTt.js} +1 -1
  5. package/dist/assets/channel-Dg6EjY0N.js +1 -0
  6. package/dist/assets/{chunk-2J33WTMH-I6mjZe22.js → chunk-2J33WTMH-DK1RvYbJ.js} +1 -1
  7. package/dist/assets/{chunk-4BX2VUAB-Bni2aQg6.js → chunk-4BX2VUAB-DkbrtaN7.js} +1 -1
  8. package/dist/assets/{chunk-55IACEB6-BVvD3auX.js → chunk-55IACEB6-DeeqmVSw.js} +1 -1
  9. package/dist/assets/{chunk-727SXJPM-BvRYlYfC.js → chunk-727SXJPM-BuaIQz3A.js} +1 -1
  10. package/dist/assets/{chunk-AQP2D5EJ-DODUUYy0.js → chunk-AQP2D5EJ-BXTLYgxd.js} +1 -1
  11. package/dist/assets/{chunk-FMBD7UC4-CSnOrzk-.js → chunk-FMBD7UC4-hrXWkcdb.js} +1 -1
  12. package/dist/assets/{chunk-ND2GUHAM-Cwj-8YlS.js → chunk-ND2GUHAM-D6pYSJIp.js} +1 -1
  13. package/dist/assets/{chunk-QZHKN3VN-DvvnV7FS.js → chunk-QZHKN3VN-DC-A3Aq8.js} +1 -1
  14. package/dist/assets/classDiagram-4FO5ZUOK-C_u0dh5t.js +1 -0
  15. package/dist/assets/classDiagram-v2-Q7XG4LA2-C_u0dh5t.js +1 -0
  16. package/dist/assets/{cose-bilkent-S5V4N54A-CpzWWErA.js → cose-bilkent-S5V4N54A-DsxxO59f.js} +1 -1
  17. package/dist/assets/{dagre-BM42HDAG-BoDP4qSL.js → dagre-BM42HDAG-BfiDIYHL.js} +1 -1
  18. package/dist/assets/{diagram-2AECGRRQ-DHIQUqF0.js → diagram-2AECGRRQ-DtT3XImB.js} +1 -1
  19. package/dist/assets/{diagram-5GNKFQAL-xlx_pjV_.js → diagram-5GNKFQAL-DJFNnWg9.js} +1 -1
  20. package/dist/assets/{diagram-KO2AKTUF-B8MO1HgW.js → diagram-KO2AKTUF-nhyTgQNk.js} +1 -1
  21. package/dist/assets/{diagram-LMA3HP47-CRSJknuZ.js → diagram-LMA3HP47-Dlx64Gbc.js} +1 -1
  22. package/dist/assets/{diagram-OG6HWLK6-CeTvy4fY.js → diagram-OG6HWLK6-BtZhjKp4.js} +1 -1
  23. package/dist/assets/{erDiagram-TEJ5UH35-DFtC0ScP.js → erDiagram-TEJ5UH35-DCjMay5k.js} +1 -1
  24. package/dist/assets/{flowDiagram-I6XJVG4X-DMRa3J_m.js → flowDiagram-I6XJVG4X-VUmu-Ulq.js} +1 -1
  25. package/dist/assets/{ganttDiagram-6RSMTGT7-Bxuykf6p.js → ganttDiagram-6RSMTGT7-DubywubS.js} +1 -1
  26. package/dist/assets/{gitGraphDiagram-PVQCEYII-CXTm84QI.js → gitGraphDiagram-PVQCEYII-PcO-oJqF.js} +1 -1
  27. package/dist/assets/index-BhnK9sdD.css +1 -0
  28. package/dist/assets/{index-Dvw-BZIp.js → index-BxBZmqgf.js} +132 -135
  29. package/dist/assets/{infoDiagram-5YYISTIA-D2tvLdtC.js → infoDiagram-5YYISTIA-BZuhNKak.js} +1 -1
  30. package/dist/assets/{ishikawaDiagram-YF4QCWOH-D0jVP7EP.js → ishikawaDiagram-YF4QCWOH-BXwOxb-L.js} +1 -1
  31. package/dist/assets/{journeyDiagram-JHISSGLW-Ca5D6tBE.js → journeyDiagram-JHISSGLW-C9YvQpLx.js} +1 -1
  32. package/dist/assets/{kanban-definition-UN3LZRKU-BQ6UUXz2.js → kanban-definition-UN3LZRKU-BL-bN75y.js} +1 -1
  33. package/dist/assets/{linear-ARjH3_jK.js → linear-ro7DcLah.js} +1 -1
  34. package/dist/assets/{mindmap-definition-RKZ34NQL-CRRCJeZm.js → mindmap-definition-RKZ34NQL-TyafSJyD.js} +1 -1
  35. package/dist/assets/{pieDiagram-4H26LBE5-BwtLTkTI.js → pieDiagram-4H26LBE5-CGF8I-Jg.js} +1 -1
  36. package/dist/assets/{quadrantDiagram-W4KKPZXB-BZ6VcAAZ.js → quadrantDiagram-W4KKPZXB-gPuTV6yC.js} +1 -1
  37. package/dist/assets/{requirementDiagram-4Y6WPE33-CmuAE86r.js → requirementDiagram-4Y6WPE33-DMNEMII6.js} +1 -1
  38. package/dist/assets/{sankeyDiagram-5OEKKPKP-DRMutNq4.js → sankeyDiagram-5OEKKPKP-CcLp1J1q.js} +1 -1
  39. package/dist/assets/{sequenceDiagram-3UESZ5HK-DXssdhHI.js → sequenceDiagram-3UESZ5HK-CRQIa-m4.js} +1 -1
  40. package/dist/assets/{stateDiagram-AJRCARHV-jyjJA7Vx.js → stateDiagram-AJRCARHV-BCDHz4Yx.js} +1 -1
  41. package/dist/assets/stateDiagram-v2-BHNVJYJU-Cyj4KCTb.js +1 -0
  42. package/dist/assets/{timeline-definition-PNZ67QCA-CMZ7Ow2L.js → timeline-definition-PNZ67QCA-BZBzVnMe.js} +1 -1
  43. package/dist/assets/{vennDiagram-CIIHVFJN-GcmWlOLV.js → vennDiagram-CIIHVFJN-BLb-Z_mb.js} +1 -1
  44. package/dist/assets/{wardley-L42UT6IY-DbIT5rBc.js → wardley-L42UT6IY-DqVhxf9g.js} +1 -1
  45. package/dist/assets/{wardleyDiagram-YWT4CUSO-gYWXw-3o.js → wardleyDiagram-YWT4CUSO-cmFDR9p-.js} +1 -1
  46. package/dist/assets/{xychartDiagram-2RQKCTM6-BVhFPdW8.js → xychartDiagram-2RQKCTM6-DmAwTFQ_.js} +1 -1
  47. package/dist/index.html +2 -2
  48. package/package.json +1 -1
  49. package/src/App.tsx +6 -0
  50. package/src/components/DocumentationView.tsx +83 -82
  51. package/src/components/GraphView.tsx +23 -11
  52. package/src/components/GuideView.tsx +5 -3
  53. package/src/components/ImpactView.tsx +10 -6
  54. package/src/components/OrphansView.tsx +8 -5
  55. package/src/utils/artifactUtils.ts +93 -0
  56. package/dist/assets/channel-cdJUve2-.js +0 -1
  57. package/dist/assets/classDiagram-4FO5ZUOK-cojzztnL.js +0 -1
  58. package/dist/assets/classDiagram-v2-Q7XG4LA2-cojzztnL.js +0 -1
  59. package/dist/assets/index-D02phRy3.css +0 -1
  60. package/dist/assets/stateDiagram-v2-BHNVJYJU-CmxCW1S9.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b4 as ke,_ as dt,I as Ze,Y as qe,l as Se,b as Qe,a as Je,p as Ke,q as je,g as _e,s as tr,z as er,F as rr,D as ir,G as ar,c as Ee,aO as me,b5 as pe,i as nr,d as or,x as sr,b6 as hr,b7 as lr}from"./index-Dvw-BZIp.js";import{p as fr}from"./chunk-4BX2VUAB-Bni2aQg6.js";import{p as cr}from"./wardley-L42UT6IY-DbIT5rBc.js";import{c as Fe}from"./cytoscape.esm-D_LviqZs.js";var he={exports:{}},le={exports:{}},fe={exports:{}},gr=fe.exports,Me;function ur(){return Me||(Me=1,(function(R,M){(function(b,N){R.exports=N()})(gr,function(){return(function(A){var b={};function N(u){if(b[u])return b[u].exports;var l=b[u]={i:u,l:!1,exports:{}};return A[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=A,N.c=b,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(A,b,N){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,A.exports=u}),(function(A,b,N){var u=N(2),l=N(8),a=N(9);function e(f,i,d){u.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=i}e.prototype=Object.create(u.prototype);for(var r in u)e[r]=u[r];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(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,i){for(var d=this.getOtherEnd(f),t=i.getGraphManager().getRoot();;){if(d.getOwner()==i)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,b,N){function u(l){this.vGraphObject=l}A.exports=u}),(function(A,b,N){var u=N(2),l=N(10),a=N(13),e=N(0),r=N(16),f=N(5);function i(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}i.prototype=Object.create(u.prototype);for(var d in u)i[d]=u[d];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;h<c.length;h++)s=c[h],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(c-o)+o;var h=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+r.nextDouble()*(T-h)+h,this.rect.x=t,this.rect.y=s},i.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 s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i}),(function(A,b,N){var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=l}),(function(A,b,N){function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},A.exports=u}),(function(A,b,N){var u=N(2),l=N(10),a=N(0),e=N(7),r=N(3),f=N(1),i=N(13),d=N(12),t=N(11);function s(c,h,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof e?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(v.source=h,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),h.edges.push(v),T!=h&&T.edges.push(v),v)}},s.prototype.remove=function(c){var h=c;if(c instanceof r){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),g,v=T.length,L=0;L<v;L++)g=T[L],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var G=this.nodes.indexOf(h);if(G==-1)throw"Node not in owner node list!";this.nodes.splice(G,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var C=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(C>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(P,1);var G=g.source.owner.getEdges().indexOf(g);if(G==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(G,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,g,v,L=this.getNodes(),G=L.length,C=0;C<G;C++){var P=L[C];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),h>g&&(h=g)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=h-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,v=-l.MAX_VALUE,L,G,C,P,V,Y=this.nodes,J=Y.length,D=0;D<J;D++){var tt=Y[D];c&&tt.child!=null&&tt.updateBounds(),L=tt.getLeft(),G=tt.getRight(),C=tt.getTop(),P=tt.getBottom(),h>L&&(h=L),T<G&&(T=G),g>C&&(g=C),v<P&&(v=P)}var n=new i(h,g,T-h,v-g);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?V=Y[0].getParent().paddingLeft:V=this.margin,this.left=n.x-V,this.right=n.x+n.width+V,this.top=n.y-V,this.bottom=n.y+n.height+V},s.calculateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,v=-l.MAX_VALUE,L,G,C,P,V=c.length,Y=0;Y<V;Y++){var J=c[Y];L=J.getLeft(),G=J.getRight(),C=J.getTop(),P=J.getBottom(),h>L&&(h=L),T<G&&(T=G),g>C&&(g=C),v<P&&(v=P)}var D=new i(h,g,T-h,v-g);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,h=this.nodes,T=h.length,g=0;g<T;g++){var v=h[g];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var h=new t,T=new Set,g=this.nodes[0],v,L,G=g.withChildren();for(G.forEach(function(D){h.push(D),T.add(D)});h.length!==0;){g=h.shift(),v=g.getEdges();for(var C=v.length,P=0;P<C;P++){var V=v[P];if(L=V.getOtherEndInGraph(g,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(D){h.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,b,N){var u,l=N(1);function a(e){u=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),f=this.add(e,r);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,r,f,i,d){if(f==null&&i==null&&d==null){if(e==null)throw"Graph is null!";if(r==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(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{d=f,i=r,f=e;var t=i.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,d);if(f.isInterGraph=!0,f.source=i,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(r.getEdges());for(var i,d=f.length,t=0;t<d;t++)i=f[t],r.remove(i);var s=[];s=s.concat(r.getNodes());var o;d=s.length;for(var t=0;t<d;t++)o=s[t],r.remove(o);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(e instanceof l){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),f=r.length,i=0;i<f;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var f=0;f<r.length;f++)e=e.concat(r[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.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"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var f=e.getOwner(),i;do{if(i=f.getParent(),i==null)break;if(i==r)return!0;if(f=i.getOwner(),f==null)break}while(!0);f=r.getOwner();do{if(i=f.getParent(),i==null)break;if(i==e)return!0;if(f=i.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,r,f,i,d,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],r=e.source,f=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=f,r==f){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=f,d=f.getOwner();e.lca==null;){if(d==i){e.lca=d;break}if(d==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=d.getParent(),d=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var i=r.getOwner();do{if(i==null)break;if(i==f)return i;i=i.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var f,i=e.getNodes(),d=i.length,t=0;t<d;t++)f=i[t],f.inclusionTreeDepth=r,f.child!=null&&this.calcInclusionTreeDepths(f.child,r+1)},a.prototype.includesInvalidEdge=function(){for(var e,r=[],f=this.edges.length,i=0;i<f;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},A.exports=a}),(function(A,b,N){var u=N(12);function l(){}l.calcSeparationAmount=function(a,e,r,f){if(!a.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,i),r[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),r[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var d=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(d=1);var t=d*r[0],s=r[1]/d;r[0]<s?s=r[0]:t=r[1],r[0]=-1*i[0]*(s/2+f),r[1]=-1*i[1]*(t/2+f)},l.decideDirectionsForOverlappingNodes=function(a,e,r){a.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,a.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},l.getIntersection2=function(a,e,r){var f=a.getCenterX(),i=a.getCenterY(),d=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return r[0]=f,r[1]=i,r[2]=d,r[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),h=a.getX(),T=a.getBottom(),g=a.getRight(),v=a.getWidthHalf(),L=a.getHeightHalf(),G=e.getX(),C=e.getY(),P=e.getRight(),V=e.getX(),Y=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),tt=e.getHeightHalf(),n=!1,m=!1;if(f===d){if(i>t)return r[0]=f,r[1]=o,r[2]=d,r[3]=Y,!1;if(i<t)return r[0]=f,r[1]=T,r[2]=d,r[3]=C,!1}else if(i===t){if(f>d)return r[0]=s,r[1]=i,r[2]=P,r[3]=t,!1;if(f<d)return r[0]=c,r[1]=i,r[2]=G,r[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-i)/(d-f),I=void 0,w=void 0,S=void 0,W=void 0,x=void 0,q=void 0;if(-p===y?f>d?(r[0]=h,r[1]=T,n=!0):(r[0]=c,r[1]=o,n=!0):p===y&&(f>d?(r[0]=s,r[1]=o,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?d>f?(r[2]=V,r[3]=Y,m=!0):(r[2]=P,r[3]=C,m=!0):E===y&&(d>f?(r[2]=G,r[3]=C,m=!0):(r[2]=J,r[3]=Y,m=!0)),n&&m)return!1;if(f>d?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,r[0]=S,r[1]=W;break;case 2:S=g,W=i+v*y,r[0]=S,r[1]=W;break;case 3:W=T,S=f+L/y,r[0]=S,r[1]=W;break;case 4:S=h,W=i+-v*y,r[0]=S,r[1]=W;break}if(!m)switch(w){case 1:q=C,x=d+-tt/y,r[2]=x,r[3]=q;break;case 2:x=J,q=t+D*y,r[2]=x,r[3]=q;break;case 3:q=Y,x=d+tt/y,r[2]=x,r[3]=q;break;case 4:x=V,q=t+-D*y,r[2]=x,r[3]=q;break}}return!1},l.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},l.getIntersection=function(a,e,r,f){if(f==null)return this.getIntersection2(a,e,r);var i=a.x,d=a.y,t=e.x,s=e.y,o=r.x,c=r.y,h=f.x,T=f.y,g=void 0,v=void 0,L=void 0,G=void 0,C=void 0,P=void 0,V=void 0,Y=void 0,J=void 0;return L=s-d,C=i-t,V=t*d-i*s,G=T-c,P=o-h,Y=h*c-o*T,J=L*P-G*C,J===0?null:(g=(C*Y-P*V)/J,v=(G*V-L*Y)/J,new u(g,v))},l.angleOfVector=function(a,e,r,f){var i=void 0;return a!==r?(i=Math.atan((f-e)/(r-a)),r<a?i+=Math.PI:f<e&&(i+=this.TWO_PI)):f<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},l.doIntersect=function(a,e,r,f){var i=a.x,d=a.y,t=e.x,s=e.y,o=r.x,c=r.y,h=f.x,T=f.y,g=(t-i)*(T-c)-(h-o)*(s-d);if(g===0)return!1;var v=((T-c)*(h-i)+(o-h)*(T-d))/g,L=((d-s)*(h-i)+(t-i)*(T-d))/g;return 0<v&&v<1&&0<L&&L<1},l.findCircleLineIntersections=function(a,e,r,f,i,d,t){var s=(r-a)*(r-a)+(f-e)*(f-e),o=2*((a-i)*(r-a)+(e-d)*(f-e)),c=(a-i)*(a-i)+(e-d)*(e-d)-t*t,h=o*o-4*s*c;if(h>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,A.exports=l}),(function(A,b,N){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},A.exports=u}),(function(A,b,N){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u}),(function(A,b,N){var u=(function(){function i(d,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}return function(d,t,s){return t&&i(d.prototype,t),s&&i(d,s),d}})();function l(i,d){if(!(i instanceof d))throw new TypeError("Cannot call a class as a function")}var a=function(d){return{value:d,next:null,prev:null}},e=function(d,t,s,o){return d!==null?d.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=d,t.next=s,o.length++,t},r=function(d,t){var s=d.prev,o=d.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,d.prev=d.next=null,t.length--,d},f=(function(){function i(d){var t=this;l(this,i),this.length=0,this.head=null,this.tail=null,d!=null&&d.forEach(function(s){return t.push(s)})}return u(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return r(t,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),i})();A.exports=f}),(function(A,b,N){function u(l,a,e){this.x=null,this.y=null,l==null&&a==null&&e==null?(this.x=0,this.y=0):typeof l=="number"&&typeof a=="number"&&e==null?(this.x=l,this.y=a):l.constructor.name=="Point"&&a==null&&e==null&&(e=l,this.x=e.x,this.y=e.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(l,a,e){l.constructor.name=="Point"&&a==null&&e==null?(e=l,this.setLocation(e.x,e.y)):typeof l=="number"&&typeof a=="number"&&e==null&&(parseInt(l)==l&&parseInt(a)==a?this.move(l,a):(this.x=Math.floor(l+.5),this.y=Math.floor(a+.5)))},u.prototype.move=function(l,a){this.x=l,this.y=a},u.prototype.translate=function(l,a){this.x+=l,this.y+=a},u.prototype.equals=function(l){if(l.constructor.name=="Point"){var a=l;return this.x==a.x&&this.y==a.y}return this==l},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=u}),(function(A,b,N){function u(l,a,e,r){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&a!=null&&e!=null&&r!=null&&(this.x=l,this.y=a,this.width=e,this.height=r)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(l){this.x=l},u.prototype.getY=function(){return this.y},u.prototype.setY=function(l){this.y=l},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},A.exports=u}),(function(A,b,N){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function l(){}l.lastID=0,l.createID=function(a){return l.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=l.getString(),l.lastID++),a.uniqueID)},l.getString=function(a){return a==null&&(a=l.lastID),"Object#"+a},l.isPrimitive=function(a){var e=typeof a>"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},A.exports=l}),(function(A,b,N){function u(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c<o.length;c++)h[c]=o[c];return h}else return Array.from(o)}var l=N(0),a=N(7),e=N(3),r=N(1),f=N(6),i=N(5),d=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new a(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new r(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),l.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)h[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var h=c.getChild().getNodes(),T=0;T<h.length;T++)update(h[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof r){var v=o;if(v.vGraphObject!=null){var L=v.vGraphObject;L.update(v)}}else if(o instanceof f){var G=o;if(G.vGraphObject!=null){var C=G.vGraphObject;C.update(G)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new i(0,0));else{var c=new d,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(h.x),c.setDeviceOrgY(h.y);for(var T=this.getAllNodes(),g,v=0;v<T.length;v++)g=T[v],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,h,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],h=c.getChild(),h==null||h.getNodes().length==0?c.scatter():(this.positionNodesRandomly(h),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,h=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<h.length;g++)h[g].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,L=[],G=new Map,C=[];for(C=C.concat(h);C.length>0&&c;){for(L.push(C[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),v.add(P);for(var V=P.getEdges(),g=0;g<V.length;g++){var Y=V[g].getOtherEnd(P);if(G.get(P)!=Y)if(!v.has(Y))L.push(Y),G.set(Y,P);else{c=!1;break}}}if(!c)o=[];else{var J=[].concat(u(v));o.push(J);for(var g=0;g<J.length;g++){var D=J[g],tt=C.indexOf(D);tt>-1&&C.splice(tt,1)}v=new Set,G=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var L=this.newEdge(null);this.graphManager.add(L,h,v),c.add(v),h=v}var L=this.newEdge(null);return this.graphManager.add(L,h,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(u(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var h=o[c];if(h.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(h),g=0;g<T.length;g++){var v=T[g],L=new i(v.getCenterX(),v.getCenterY()),G=h.bendpoints.get(g);G.x=L.x,G.y=L.y,v.getOwner().remove(v)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,c,h,T){if(h!=null&&T!=null){var g=c;if(o<=50){var v=c/h;g-=(c-v)/50*(50-o)}else{var L=c*T;g+=(L-c)/50*(o-50)}return g}else{var G,C;return o<=50?(G=9*c/500,C=c/10):(G=9*c/50,C=-8*c),G*o+C}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var h=[],T=new Map,g=!1,v=null;(c.length==1||c.length==2)&&(g=!0,v=c[0]);for(var L=0;L<c.length;L++){var G=c[L],C=G.getNeighborsList().size;T.set(G,G.getNeighborsList().size),C==1&&h.push(G)}var P=[];for(P=P.concat(h);!g;){var V=[];V=V.concat(P),P=[];for(var L=0;L<c.length;L++){var G=c[L],Y=c.indexOf(G);Y>=0&&c.splice(Y,1);var J=G.getNeighborsList();J.forEach(function(n){if(h.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,b,N){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u}),(function(A,b,N){var u=N(5);function l(a,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}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},l.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},l.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},l.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},l.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},A.exports=l}),(function(A,b,N){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var l=N(15),a=N(4),e=N(0),r=N(8),f=N(9);function i(){l.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}i.prototype=Object.create(l.prototype);for(var d in l)i[d]=l[d];i.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,h,T,g,v=this.getGraphManager().getAllEdges(),L=0;L<v.length;L++)t=v[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),h=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<g.length;o++)h=g[o],this.calculateRepulsionForceOfANode(h,v,t,s),v.add(h);else for(o=0;o<g.length;o++)for(h=g[o],c=o+1;c<g.length;c++)T=g[c],h.getOwner()==T.getOwner()&&this.calcRepulsionForce(h,T)},i.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},i.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),h,T,g,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(T=t.edgeElasticity*(h-s),g=T*(t.lengthX/h),v=T*(t.lengthY/h),o.springForceX+=g,o.springForceY+=v,c.springForceX-=g,c.springForceY-=v)},i.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),h=new Array(2),T=new Array(4),g,v,L,G,C,P,V;if(o.intersects(c)){r.calcSeparationAmount(o,c,h,a.DEFAULT_EDGE_LENGTH/2),P=2*h[0],V=2*h[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*V,s.repulsionForceX+=Y*P,s.repulsionForceY+=Y*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(r.getIntersection(o,c,T),g=T[2]-T[0],v=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=f.sign(g)*a.MIN_REPULSION_DIST),Math.abs(v)<a.MIN_REPULSION_DIST&&(v=f.sign(v)*a.MIN_REPULSION_DIST),L=g*g+v*v,G=Math.sqrt(L),C=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,P=C*g/G,V=C*v/G,t.repulsionForceX-=P,t.repulsionForceY-=V,s.repulsionForceX+=P,s.repulsionForceY+=V},i.prototype.calcGravitationalForce=function(t){var s,o,c,h,T,g,v,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(h)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),h=0;h<s;h++)c[h]=new Array(o);for(var h=0;h<s;h++)for(var T=0;T<o;T++)c[h][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,s,o){var c=0,h=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=h;v++)for(var L=T;L<=g;L++)this.grid[v][L].push(t),t.setGridCoordinates(c,h,T,g)},i.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var h=new Set;t.surrounding=new Array;for(var T,g=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(v<0||L<0||v>=g.length||L>=g[0].length)){for(var G=0;G<g[v][L].length;G++)if(T=g[v][L][G],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!h.has(T)){var C=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);C<=this.repulsionRange&&P<=this.repulsionRange&&h.add(T)}}t.surrounding=[].concat(u(h))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},i.prototype.calcRepulsionRange=function(){return 0},A.exports=i}),(function(A,b,N){var u=N(1),l=N(4);function a(r,f,i){u.call(this,r,f,i),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];A.exports=a}),(function(A,b,N){var u=N(3),l=N(4);function a(r,f,i,d){u.call(this,r,f,i,d),this.nodeRepulsion=l.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=[]}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];a.prototype.setGridCoordinates=function(r,f,i,d){this.startX=r,this.finishX=f,this.startY=i,this.finishY=d},A.exports=a}),(function(A,b,N){function u(l,a){this.width=0,this.height=0,l!==null&&a!==null&&(this.height=a,this.width=l)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},A.exports=u}),(function(A,b,N){var u=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(a,e){var r=u.createID(a);this.contains(r)||(this.map[r]=e,this.keys.push(a))},l.prototype.contains=function(a){return u.createID(a),this.map[a]!=null},l.prototype.get=function(a){var e=u.createID(a);return this.map[e]},l.prototype.keySet=function(){return this.keys},A.exports=l}),(function(A,b,N){var u=N(14);function l(){this.set={}}l.prototype.add=function(a){var e=u.createID(a);this.contains(e)||(this.set[e]=a)},l.prototype.remove=function(a){delete this.set[u.createID(a)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(a){return this.set[u.createID(a)]==a},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),r=e.length,f=0;f<r;f++)a.push(this.set[e[f]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(a){for(var e=a.length,r=0;r<e;r++){var f=a[r];this.add(f)}},A.exports=l}),(function(A,b,N){function u(){}u.multMat=function(l,a){for(var e=[],r=0;r<l.length;r++){e[r]=[];for(var f=0;f<a[0].length;f++){e[r][f]=0;for(var i=0;i<l[0].length;i++)e[r][f]+=l[r][i]*a[i][f]}}return e},u.transpose=function(l){for(var a=[],e=0;e<l[0].length;e++){a[e]=[];for(var r=0;r<l.length;r++)a[e][r]=l[r][e]}return a},u.multCons=function(l,a){for(var e=[],r=0;r<l.length;r++)e[r]=l[r]*a;return e},u.minusOp=function(l,a){for(var e=[],r=0;r<l.length;r++)e[r]=l[r]-a[r];return e},u.dotProduct=function(l,a){for(var e=0,r=0;r<l.length;r++)e+=l[r]*a[r];return e},u.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},u.normalize=function(l){for(var a=[],e=this.mag(l),r=0;r<l.length;r++)a[r]=l[r]/e;return a},u.multGamma=function(l){for(var a=[],e=0,r=0;r<l.length;r++)e+=l[r];e*=-1/l.length;for(var f=0;f<l.length;f++)a[f]=e+l[f];return a},u.multL=function(l,a,e){for(var r=[],f=[],i=[],d=0;d<a[0].length;d++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][d]*l[s];f[d]=t}for(var o=0;o<e.length;o++){for(var c=0,h=0;h<e.length;h++)c+=e[o][h]*f[h];i[o]=c}for(var T=0;T<a.length;T++){for(var g=0,v=0;v<a[0].length;v++)g+=a[T][v]*i[v];r[T]=g}return r},A.exports=u}),(function(A,b,N){var u=(function(){function r(f,i){for(var d=0;d<i.length;d++){var t=i[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,i,d){return i&&r(f.prototype,i),d&&r(f,d),f}})();function l(r,f){if(!(r instanceof f))throw new TypeError("Cannot call a class as a function")}var a=N(11),e=(function(){function r(f,i){l(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;f instanceof a?d=f.size():d=f.length,this._quicksort(f,0,d-1)}return u(r,[{key:"_quicksort",value:function(i,d,t){if(d<t){var s=this._partition(i,d,t);this._quicksort(i,d,s),this._quicksort(i,s+1,t)}}},{key:"_partition",value:function(i,d,t){for(var s=this._get(i,d),o=d,c=t;;){for(;this.compareFunction(s,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,o),s);)o++;if(o<c)this._swap(i,o,c),o++,c--;else return c}}},{key:"_get",value:function(i,d){return i instanceof a?i.get_object_at(d):i[d]}},{key:"_set",value:function(i,d,t){i instanceof a?i.set_object_at(d,t):i[d]=t}},{key:"_swap",value:function(i,d,t){var s=this._get(i,d);this._set(i,d,this._get(i,t)),this._set(i,t,s)}},{key:"_defaultCompareFunction",value:function(i,d){return d>i}}]),r})();A.exports=e}),(function(A,b,N){function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,i=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,d);t++){if(t<i){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=u.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<i,this.s[t]!==0)){for(var h=0,T=t;T<this.m;T++)h+=l[T][t]*l[T][c];h=-h/l[t][t];for(var g=t;g<this.m;g++)l[g][c]+=h*l[g][t]}e[c]=l[t][c]}if((function(Tt,Ct){return Ct})(f,t<i))for(var v=t;v<this.m;v++)this.U[v][t]=l[v][t];if(t<d){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=u.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var G=t+1;G<this.n;G++)e[G]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var C=t+1;C<this.m;C++)r[C]=0;for(var P=t+1;P<this.n;P++)for(var V=t+1;V<this.m;V++)r[V]+=e[P]*l[V][P];for(var Y=t+1;Y<this.n;Y++)for(var J=-e[Y]/e[t+1],D=t+1;D<this.m;D++)l[D][Y]+=J*r[D]}for(var tt=t+1;tt<this.n;tt++)this.V[tt][t]=e[tt]}}var n=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=l[i][i]),this.m<n&&(this.s[n-1]=0),d+1<n&&(e[d]=l[d][n-1]),e[n-1]=0;{for(var m=i;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=i-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var I=0,w=E;w<this.m;w++)I+=this.U[w][E]*this.U[w][y];I=-I/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=I*this.U[S][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var q=0;q<this.m;q++)this.U[q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<d,e[z]!==0))for(var X=z+1;X<a;X++){for(var rt=0,B=z+1;B<this.n;B++)rt+=this.V[B][z]*this.V[B][X];rt=-rt/this.V[z+1][z];for(var O=z+1;O<this.n;O++)this.V[O][X]+=rt*this.V[O][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var $=n-1,_=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==Q&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<n;Rt++){var Ht=u.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Vt=this.s[n-1]/Yt,F=this.s[n-2]/Yt,U=e[n-2]/Yt,k=this.s[Q]/Yt,K=e[Q]/Yt,Z=((F+Vt)*(F-Vt)+U*U)/2,at=Vt*U*(Vt*U),ct=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(ct=Math.sqrt(Z*Z+at),Z<0&&(ct=-ct),ct=at/(Z+ct));for(var nt=(k+Vt)*(k-Vt)+ct,et=k*K,j=Q;j<n-1;j++){var ut=u.hypot(nt,et),wt=nt/ut,pt=et/ut;j!==Q&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=u.hypot(nt,et),wt=nt/ut,pt=et/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],et=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var ot=0;ot<=$;ot++)this.V[ot][Q]=-this.V[ot][Q]}for(;Q<$&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][Q+1],this.V[ft][Q+1]=this.V[ft][Q],this.V[ft][Q]=Lt;if(Q<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][Q+1],this.U[st][Q+1]=this.U[st][Q],this.U[st][Q]=Lt;Q++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},u.hypot=function(l,a){var e=void 0;return Math.abs(l)>Math.abs(a)?(e=a/l,e=Math.abs(l)*Math.sqrt(1+e*e)):a!=0?(e=l/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},A.exports=u}),(function(A,b,N){var u=(function(){function e(r,f){for(var i=0;i<f.length;i++){var d=f[i];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}return function(r,f,i){return f&&e(r.prototype,f),i&&e(r,i),r}})();function l(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(r,f){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,e),this.sequence1=r,this.sequence2=f,this.match_score=i,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var h=0;h<this.jMax;h++)this.tracebackGrid[c][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[d-1]===this.sequence2[t-1]?s=this.grid[d-1][t-1]+this.match_score:s=this.grid[d-1][t-1]+this.mismatch_penalty;var o=this.grid[d-1][t]+this.gap_penalty,c=this.grid[d][t-1]+this.gap_penalty,h=[s,o,c],T=this.arrayAllMaxIndexes(h);this.grid[d][t]=h[T[0]],this.tracebackGrid[d][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var i=f[0],d=this.tracebackGrid[i.pos[0]][i.pos[1]];d[0]&&f.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),d[1]&&f.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),d[2]&&f.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,i){for(var d=[],t=-1;(t=f.indexOf(i,t+1))!==-1;)d.push(t);return d}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();A.exports=a}),(function(A,b,N){var u=function(){};u.FDLayout=N(18),u.FDLayoutConstants=N(4),u.FDLayoutEdge=N(19),u.FDLayoutNode=N(20),u.DimensionD=N(21),u.HashMap=N(22),u.HashSet=N(23),u.IGeometry=N(8),u.IMath=N(9),u.Integer=N(10),u.Point=N(12),u.PointD=N(5),u.RandomSeed=N(16),u.RectangleD=N(13),u.Transform=N(17),u.UniqueIDGeneretor=N(14),u.Quicksort=N(25),u.LinkedList=N(11),u.LGraphObject=N(2),u.LGraph=N(6),u.LEdge=N(1),u.LGraphManager=N(7),u.LNode=N(3),u.Layout=N(15),u.LayoutConstants=N(0),u.NeedlemanWunsch=N(27),u.Matrix=N(24),u.SVD=N(26),A.exports=u}),(function(A,b,N){function u(){this.listeners=[]}var l=u.prototype;l.addListener=function(a,e){this.listeners.push({event:a,callback:e})},l.removeListener=function(a,e){for(var r=this.listeners.length;r>=0;r--){var f=this.listeners[r];f.event===a&&f.callback===e&&this.listeners.splice(r,1)}},l.emit=function(a,e){for(var r=0;r<this.listeners.length;r++){var f=this.listeners[r];a===f.event&&f.callback(e)}},A.exports=u})])})})(fe)),fe.exports}var dr=le.exports,Oe;function vr(){return Oe||(Oe=1,(function(R,M){(function(b,N){R.exports=N(ur())})(dr,function(A){return(()=>{var b={45:((a,e,r)=>{var f={};f.layoutBase=r(551),f.CoSEConstants=r(806),f.CoSEEdge=r(767),f.CoSEGraph=r(880),f.CoSEGraphManager=r(578),f.CoSELayout=r(765),f.CoSENode=r(991),f.ConstraintHandler=r(902),a.exports=f}),806:((a,e,r)=>{var f=r(551).FDLayoutConstants;function i(){}for(var d in f)i[d]=f[d];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i}),767:((a,e,r)=>{var f=r(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i}),880:((a,e,r)=>{var f=r(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i}),578:((a,e,r)=>{var f=r(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i}),765:((a,e,r)=>{var f=r(551).FDLayout,i=r(578),d=r(880),t=r(991),s=r(767),o=r(806),c=r(902),h=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,v=r(551).PointD,L=r(551).DimensionD,G=r(551).Layout,C=r(551).Integer,P=r(551).IGeometry,V=r(551).LGraph,Y=r(551).Transform,J=r(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var tt in f)D[tt]=f[tt];D.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new d(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function O(H){for(var $=H.getChild().getNodes(),_,ht=0,Q=0;Q<$.length;Q++)_=$[Q],_.getChild()==null?n.fixedNodeSet.has(_.id)&&(ht+=100):ht+=O(_);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var I=y(E);I>0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){w.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){S.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,$,_;for(_=O.length-1;_>=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[H],O[H]=$;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:O.gap})}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push($):q.set(H,[$]),q.has($)?q.get($).push(H):q.set($,[H])}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(_)?z.get(_).push(ht):z.set(_,[ht]),z.has(ht)?z.get(ht).push(_):z.set(ht,[_])}});var X=function(H,$){var _=[],ht=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){_[Nt]=[],ht[Nt]=!1;var gt=it;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},rt=X(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var I=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var W=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(B){if(!n.fixedNodesOnHorizontal.has(B)){var O=0;n.dummyToNodeForVerticalAlignment.has(B)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX:O=n.idToNodeMap.get(B).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(H){if(H.right){var $=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get(B)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(B)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(B,n.nodeToTempPositionMapHorizontal.get(B)+O),n.dummyToNodeForVerticalAlignment.has(B)?n.dummyToNodeForVerticalAlignment.get(B).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get(B).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(B){if(!n.fixedNodesOnHorizontal.has(B)){var O=0;n.dummyToNodeForHorizontalAlignment.has(B)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY:O=n.idToNodeMap.get(B).displacementY,n.nodeToRelativeConstraintMapVertical.get(B).forEach(function(H){if(H.bottom){var $=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get(B)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(B)-n.nodeToTempPositionMapVertical.get(H.top)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapVertical.set(B,n.nodeToTempPositionMapVertical.get(B)+O),n.dummyToNodeForHorizontalAlignment.has(B)?n.dummyToNodeForHorizontalAlignment.get(B).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get(B).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){n.idToNodeMap.get(Q).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),I=E.getTarget();if(y==I)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(y.getEdgeListToNode(I)),w=w.concat(I.getEdgeListToNode(y)),!m.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var W=w[S];W.getBendpoints().push(new v),this.createDummyNodesForBendpoints(W)}}w.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,I=0,w=new v(0,0),S=0;S<n.length;S++){S%p==0&&(I=0,y=E,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[S],x=G.findCenterOfTree(W);m.x=I,m.y=y,w=D.radialLayout(W,x,m),w.y>E&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w<n.length;w++){var S=n[w];S.transform(I)}var W=new v(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,I){var w=(E-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,W=S*P.TWO_PI/360,x=y*Math.cos(W),q=y*Math.sin(W);n.setCenter(x,q);var z=[];z=z.concat(n.getEdges());var X=z.length;m!=null&&X--;for(var rt=0,B=z.length,O,H=n.getEdgesBetween(m);H.length>1;){var $=H[0];H.splice(0,1);var _=z.indexOf($);_>=0&&z.splice(_,1),B--,X--}m!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(E-p)/X,Q=O;rt!=X;Q=++Q%B){var It=z[Q].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=C.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var I=E[y],w=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],S=I.getParent().id;typeof m[S]>"u"&&(m[S]=[]),m[S]=m[S].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=q.paddingLeft||0,z.paddingRight=q.paddingRight||0,z.paddingBottom=q.paddingBottom||0,z.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=q.getChild();rt.add(z);for(var B=0;B<m[W].length;B++){var O=m[W][B];rt.remove(O),X.add(O)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,I=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,S)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var I=E[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,I,w){m+=E+I,p+=y+w;for(var S=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=S;for(var q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=m,X.rect.y=p,m+=X.rect.width+n.horizontalPadding,X.rect.height>q&&(q=X.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return I<y?w=E:w=p,w},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=o.TILING_PADDING_VERTICAL,E=o.TILING_PADDING_HORIZONTAL,y=n.length,I=0,w=0,S=0;n.forEach(function(B){I+=B.getWidth(),w+=B.getHeight(),B.getWidth()>S&&(S=B.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(q))/(2*(W+E)),X;m?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return w.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,q=0,z=0;z<n.length;z++){var X=n[z];x+=X.getCenterX(),q+=X.getCenterY()}w.centerX=x/n.length,w.centerY=q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(w.rows.length==0)this.insertNodeToRow(w,X,0,m);else if(this.canAddHorizontal(w,X.rect.width,X.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,X,rt,m)}else this.insertNodeToRow(w,X,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var w=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width<w&&(n.width=w);var S=m.rect.height;p>0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[I]<p&&I>0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+S)/(w+m+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.width<m?x=(n.height+S)/m:x=(n.height+S)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>w&&(w=E[S].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var I=0;I<E.length;I++)if(p=E[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new L(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,w=p.startY,S=p.finishY,W=0,x=0,q=0,z=0,X=[W,q,x,z];if(w>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(I<this.grid.length-1)for(var rt=w;rt<=S;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,$=0;$<X.length;$++)X[$]<B?(B=X[$],O=1,H=$):X[$]==B&&O++;if(O==3&&B==0)X[0]==0&&X[1]==0&&X[2]==0?m=1:X[0]==0&&X[1]==0&&X[3]==0?m=0:X[0]==0&&X[2]==0&&X[3]==0?m=3:X[1]==0&&X[2]==0&&X[3]==0&&(m=2);else if(O==2&&B==0){var _=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?_==0?m=0:m=1:X[0]==0&&X[2]==0?_==0?m=0:m=2:X[0]==0&&X[3]==0?_==0?m=0:m=3:X[1]==0&&X[2]==0?_==0?m=1:m=2:X[1]==0&&X[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&B==0){var _=Math.floor(Math.random()*4);m=_}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-h.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+h.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+h.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-h.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,r)=>{var f=r(551).FDLayoutNode,i=r(551).IMath;function d(s,o,c,h){f.call(this,s,o,c,h)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T<c.length;T++)h=c[T],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},d.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},d.prototype.setPred1=function(s){this.pred1=s},d.prototype.getPred1=function(){return pred1},d.prototype.getPred2=function(){return pred2},d.prototype.setNext=function(s){this.next=s},d.prototype.getNext=function(){return next},d.prototype.setProcessed=function(s){this.processed=s},d.prototype.isProcessed=function(){return processed},a.exports=d}),902:((a,e,r)=>{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h<c.length;h++)T[h]=c[h];return T}else return Array.from(c)}var i=r(806),d=r(551).LinkedList,t=r(551).Matrix,s=r(551).SVD;function o(){}o.handleConstraints=function(c){var h={};h.fixedNodeConstraint=c.constraints.fixedNodeConstraint,h.alignmentConstraint=c.constraints.alignmentConstraint,h.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,v=[],L=[],G=c.getAllNodes(),C=0,P=0;P<G.length;P++){var V=G[P];V.getChild()==null&&(g.set(V.id,C++),v.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var Y=function(U,k){return{x:U.x-k.x,y:U.y-k.y}},J=function(U){var k=0,K=0;return U.forEach(function(Z){k+=v[g.get(Z)],K+=L[g.get(Z)]}),{x:k/U.size,y:K/U.size}},D=function(U,k,K,Z,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;U.forEach(function(lt,ot){nt.set(ot,0)}),U.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,ut=new d;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(k=="horizontal"?et.set(ot,g.has(ot)?v[g.get(ot)]:Z.get(ot)):et.set(ot,g.has(ot)?L[g.get(ot)]:Z.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?v[g.get(st)]:Z.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:Z.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=g.has(st)?v[g.get(st)]:Z.get(st):ft+=g.has(st)?L[g.get(st)]:Z.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(k=="horizontal"?st=g.has(ft.id)?v[g.get(ft.id)]:Z.get(ft.id):st=g.has(ft.id)?L[g.get(ft.id)]:Z.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;U.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;k=="horizontal"?kt=g.has(St)?v[g.get(St)]:Z.get(St):kt=g.has(St)?L[g.get(St)]:Z.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var ce=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},tt=function(U){var k=0,K=0,Z=0,at=0;if(U.forEach(function(j){j.left?v[g.get(j.left)]-v[g.get(j.right)]>=0?k++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?Z++:at++}),k>K&&Z>at)for(var ct=0;ct<g.size;ct++)v[ct]=-1*v[ct],L[ct]=-1*L[ct];else if(k>K)for(var nt=0;nt<g.size;nt++)v[nt]=-1*v[nt];else if(Z>at)for(var et=0;et<g.size;et++)L[et]=-1*L[et]},n=function(U){var k=[],K=new d,Z=new Set,at=0;return U.forEach(function(ct,nt){if(!Z.has(nt)){k[at]=[];var et=nt;for(K.push(et),Z.add(et),k[at].push(et);K.length!=0;){et=K.shift();var j=U.get(et);j.forEach(function(ut){Z.has(ut.id)||(K.push(ut.id),Z.add(ut.id),k[at].push(ut.id))})}at++}}),k},m=function(U){var k=new Map;return U.forEach(function(K,Z){k.set(Z,[])}),U.forEach(function(K,Z){K.forEach(function(at){k.get(Z).push(at),k.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),k},p=function(U){var k=new Map;return U.forEach(function(K,Z){k.set(Z,[])}),U.forEach(function(K,Z){K.forEach(function(at){k.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),k},E=[],y=[],I=!1,w=!1,S=new Set,W=new Map,x=new Map,q=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(F){F.left?(W.has(F.left)?W.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):W.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),W.has(F.right)||W.set(F.right,[])):(W.has(F.top)?W.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):W.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),W.has(F.bottom)||W.set(F.bottom,[]))}),x=m(W),q=n(x)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(F,U){E[U]=[F.position.x,F.position.y],y[U]=[v[g.get(F.nodeId)],L[g.get(F.nodeId)]]}),I=!0;else if(h.alignmentConstraint)(function(){var F=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,k=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).x,U[et].forEach(function(pt){E[F]=[wt,L[g.get(pt)]],y[F]=[v[g.get(pt)],L[g.get(pt)]],F++})},K=0;K<U.length;K++)k(K);I=!0}if(h.alignmentConstraint.horizontal){for(var Z=h.alignmentConstraint.horizontal,at=function(et){var j=new Set;Z[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).y,Z[et].forEach(function(pt){E[F]=[v[g.get(pt)],wt],y[F]=[v[g.get(pt)],L[g.get(pt)]],F++})},ct=0;ct<Z.length;ct++)at(ct);I=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<q.length;rt++)q[rt].length>z&&(z=q[rt].length,X=rt);if(z<x.size/2)tt(h.relativePlacementConstraint),I=!1,w=!1;else{var B=new Map,O=new Map,H=[];q[X].forEach(function(F){W.get(F).forEach(function(U){U.direction=="horizontal"?(B.has(F)?B.get(F).push(U):B.set(F,[U]),B.has(U.id)||B.set(U.id,[]),H.push({left:F,right:U.id})):(O.has(F)?O.get(F).push(U):O.set(F,[U]),O.has(U.id)||O.set(U.id,[]),H.push({top:F,bottom:U.id}))})}),tt(H),w=!1;var $=D(B,"horizontal"),_=D(O,"vertical");q[X].forEach(function(F,U){y[U]=[v[g.get(F)],L[g.get(F)]],E[U]=[],$.has(F)?E[U][0]=$.get(F):E[U][0]=v[g.get(F)],_.has(F)?E[U][1]=_.get(F):E[U][1]=L[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,Q=t.transpose(E),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<g.size;gt++){var mt=[v[gt],L[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];v[gt]=t.dotProduct(mt,At),L[gt]=t.dotProduct(mt,Ot)}w&&tt(h.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Et={x:0,y:0};h.fixedNodeConstraint.forEach(function(F,U){var k={x:v[g.get(F.nodeId)],y:L[g.get(F.nodeId)]},K=F.position,Z=Y(K,k);Et.x+=Z.x,Et.y+=Z.y}),Et.x/=h.fixedNodeConstraint.length,Et.y/=h.fixedNodeConstraint.length,v.forEach(function(F,U){v[U]+=Et.x}),L.forEach(function(F,U){L[U]+=Et.y}),h.fixedNodeConstraint.forEach(function(F){v[g.get(F.nodeId)]=F.position.x,L[g.get(F.nodeId)]=F.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Dt=h.alignmentConstraint.vertical,Rt=function(U){var k=new Set;Dt[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=v[g.get(K.values().next().value)]:Z=J(k).x,k.forEach(function(at){S.has(at)||(v[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(h.alignmentConstraint.horizontal)for(var Ut=h.alignmentConstraint.horizontal,Pt=function(U){var k=new Set;Ut[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=L[g.get(K.values().next().value)]:Z=J(k).y,k.forEach(function(at){S.has(at)||(L[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}h.relativePlacementConstraint&&(function(){var F=new Map,U=new Map,k=new Map,K=new Map,Z=new Map,at=new Map,ct=new Set,nt=new Set;if(S.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var et=h.alignmentConstraint.vertical,j=function(yt){k.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),k.get("dummy"+yt).push(Mt),S.has(Mt)&&ct.add("dummy"+yt)}),Z.set("dummy"+yt,v[g.get(et[yt][0])])},ut=0;ut<et.length;ut++)j(ut);if(h.alignmentConstraint.horizontal)for(var wt=h.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){U.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,L[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(Zt)?lt.get(Zt).push($t):lt.set(Zt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(Zt=U.get(yt)?U.get(yt):yt,U.get(Mt.id)?$t={id:U.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(Zt)?ot.get(Zt).push($t):ot.set(Zt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),kt=n(zt),Kt=p(lt),ce=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,Z,Qt),Jt=D(ot,"vertical",nt,at,jt),oe=function(yt){k.get(yt)?k.get(yt).forEach(function(Mt){v[g.get(Mt)]=_t.get(yt)}):v[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ge=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ge.next()).done);te=!0){var ue=Le.value;oe(ue)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){L[g.get(Mt)]=Jt.get(yt)}):L[g.get(yt)]=Jt.get(yt)},de=!0,Ce=!1,Ae=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),we;!(de=(we=ve.next()).done);de=!0){var ue=we.value;$e(ue)}}catch(Gt){Ce=!0,Ae=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ce)throw Ae}}})()}for(var Yt=0;Yt<G.length;Yt++){var Vt=G[Yt];Vt.getChild()==null&&Vt.setCenter(v[g.get(Vt.id)],L[g.get(Vt.id)])}},a.exports=o}),551:(a=>{a.exports=A})},N={};function u(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return b[a](r,r.exports,u),r.exports}var l=u(45);return l})()})})(le)),le.exports}var pr=he.exports,De;function yr(){return De||(De=1,(function(R,M){(function(b,N){R.exports=N(vr())})(pr,function(A){return(()=>{var b={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,f=Array(r>1?r-1:0),i=1;i<r;i++)f[i-1]=arguments[i];return f.forEach(function(d){Object.keys(d).forEach(function(t){return e[t]=d[t]})}),e}}),548:((a,e,r)=>{var f=(function(){function t(s,o){var c=[],h=!0,T=!1,g=void 0;try{for(var v=s[Symbol.iterator](),L;!(h=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(G){T=!0,g=G}finally{try{!h&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=r(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(h,T){typeof h=="number"&&(h=T);for(var g=h.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},d.connectComponents=function(t,s,o,c){var h=new i,T=new Set,g=[],v=void 0,L=void 0,G=void 0,C=!1,P=1,V=[],Y=[],J=function(){var tt=t.collection();Y.push(tt);var n=o[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(s)),g.push(n),m.forEach(function(y){h.push(y),T.add(y),tt.merge(y)});for(var p=function(){n=h.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var w=0;w<I.length;w++){var S=I[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var W=v.union(v.descendants());W.forEach(function(x){h.push(x),T.add(x),tt.merge(x),o.has(x)&&g.push(x)})}}};h.length!=0;)p();if(tt.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){tt.has(I.source())&&tt.has(I.target())&&tt.merge(I)})}),g.length==o.length&&(C=!0),!C||C&&P>1){L=g[0],G=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<G&&(G=y.connectedEdges().length,L=y)}),V.push(L.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],o=o.difference(E),P++}};do J();while(!C);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),Y},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,G=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),P;!(v=(P=C.next()).done);v=!0){var V=P.value,Y=f(V,2),J=Y[0],D=Y[1],tt=o.cy.getElementById(J);if(tt){var n=tt.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;m<c&&(c=m),p>h&&(h=p),E<T&&(T=E),y>g&&(g=y)}}}catch(x){L=!0,G=x}finally{try{!v&&C.return&&C.return()}finally{if(L)throw G}}var I=t.x-(h+c)/2,w=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],z=q.getRect().x,X=q.getRect().x+q.getRect().width,rt=q.getRect().y,B=q.getRect().y+q.getRect().height;z<c&&(c=z),X>h&&(h=X),rt<T&&(T=rt),B>g&&(g=B)});var S=t.x-(h+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+S,q.getCenterY()+W)})}}},d.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,G=void 0,C=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,J=0;J<Y;J++){var D=V[J];L=s[c.get(D.id())]-D.width()/2,G=s[c.get(D.id())]+D.width()/2,C=o[c.get(D.id())]-D.height()/2,P=o[c.get(D.id())]+D.height()/2,h>L&&(h=L),T<G&&(T=G),g>C&&(g=C),v<P&&(v=P)}var tt={};return tt.topLeftX=h,tt.topLeftY=g,tt.width=T-h,tt.height=v-g,tt},d.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var h=!1;c.children().forEach(function(T){T.css("display")!="none"&&(h=!0)}),h||o.merge(c)}),o},a.exports=d}),816:((a,e,r)=>{var f=r(548),i=r(140).CoSELayout,d=r(140).CoSENode,t=r(140).layoutBase.PointD,s=r(140).layoutBase.DimensionD,o=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,h=r(140).CoSEConstants,T=function(v,L){var G=v.cy,C=v.eles,P=C.nodes(),V=C.edges(),Y=void 0,J=void 0,D=void 0,tt={};v.randomize&&(Y=L.nodeIndexes,J=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=f.calcParentsWithoutChildren(G,C),E=function W(x,q,z,X){for(var rt=q.length,B=0;B<rt;B++){var O=q[B],H=null;O.intersection(p).length==0&&(H=O.children());var $=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(X.randomize)if(!O.isParent())$=x.add(new d(z.graphManager,new t(J[Y.get(O.id())]-_.w/2,D[Y.get(O.id())]-_.h/2),new s(parseFloat(_.w),parseFloat(_.h))));else{var ht=f.calcBoundingBox(O,J,D,Y);O.intersection(p).length==0?$=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):$=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(_.w),parseFloat(_.h))))}else $=x.add(new d(z.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new s(parseFloat(_.w),parseFloat(_.h))));else $=x.add(new d(this.graphManager));if($.id=O.data("id"),$.nodeRepulsion=m(X.nodeRepulsion,O),$.paddingLeft=parseInt(O.css("padding")),$.paddingTop=parseInt(O.css("padding")),$.paddingRight=parseInt(O.css("padding")),$.paddingBottom=parseInt(O.css("padding")),X.nodeDimensionsIncludeLabels&&($.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=O.css("text-valign"),$.labelPosHorizontal=O.css("text-halign")),tt[O.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=z.getGraphManager().add(z.newGraph(),$),W(Q,H,z,X)}}},y=function(x,q,z){for(var X=0,rt=0,B=0;B<z.length;B++){var O=z[B],H=tt[O.data("source")],$=tt[O.data("target")];if(H&&$&&H!==$&&H.getEdgesBetween($).length==0){var _=q.add(x.newEdge(),H,$);_.id=O.id(),_.idealLength=m(v.idealEdgeLength,O),_.edgeElasticity=m(v.edgeElasticity,O),X+=_.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(v.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,h.TILE=v.tile,h.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),v.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),v.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,S=w.newGraphManager();return E(S.addRoot(),f.getTopMostNodes(P),w,v),y(w,S,V),I(w,v),w.runLayout(),tt};a.exports={coseLayout:T}}),212:((a,e,r)=>{var f=(function(){function v(L,G){for(var C=0;C<G.length;C++){var P=G[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,G,C){return G&&v(L.prototype,G),C&&v(L,C),L}})();function i(v,L){if(!(v instanceof L))throw new TypeError("Cannot call a class as a function")}var d=r(658),t=r(548),s=r(657),o=s.spectralLayout,c=r(816),h=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function v(L){i(this,v),this.options=d({},T,L)}return f(v,[{key:"run",value:function(){var G=this,C=this.options,P=C.cy,V=C.eles,Y=[],J=[],D=void 0,tt=[];C.fixedNodeConstraint&&(!Array.isArray(C.fixedNodeConstraint)||C.fixedNodeConstraint.length==0)&&(C.fixedNodeConstraint=void 0),C.alignmentConstraint&&(C.alignmentConstraint.vertical&&(!Array.isArray(C.alignmentConstraint.vertical)||C.alignmentConstraint.vertical.length==0)&&(C.alignmentConstraint.vertical=void 0),C.alignmentConstraint.horizontal&&(!Array.isArray(C.alignmentConstraint.horizontal)||C.alignmentConstraint.horizontal.length==0)&&(C.alignmentConstraint.horizontal=void 0)),C.relativePlacementConstraint&&(!Array.isArray(C.relativePlacementConstraint)||C.relativePlacementConstraint.length==0)&&(C.relativePlacementConstraint=void 0);var n=C.fixedNodeConstraint||C.alignmentConstraint||C.relativePlacementConstraint;n&&(C.tile=!1,C.packComponents=!1);var m=void 0,p=!1;if(P.layoutUtilities&&C.packComponents&&(m=P.layoutUtilities("get"),m||(m=P.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(P,C.eles,I),D.forEach(function(vt){var it=vt.boundingBox();tt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=P.collection();if(C.tile){var S=new Map,W=[],x=[],q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),w.length>1){var rt=w.boundingBox();tt.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),Y.push(z);for(var B=X.length-1;B>=0;B--)D.splice(X[B],1),Y.splice(X[B],1),tt.splice(X[B],1)}}D.forEach(function(vt,it){C.eles=vt,J.push(h(C,Y[it])),t.relocateComponent(tt[it],J[it],C)})}else D.forEach(function(vt,it){t.relocateComponent(tt[it],Y[it],C)});var O=new Set;if(D.length>1){var H=[],$=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(C.quality=="draft"&&(gt=Y[it].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:Y[it].xCoords[At]-Ot.boundingbox().w/2,y:Y[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else J[it][Ot.id()]&&mt.nodes.push({x:J[it][Ot.id()].getLeft(),y:J[it][Ot.id()].getTop(),width:J[it][Ot.id()].getWidth(),height:J[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,Y[it].xCoords,Y[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(Y[it].xCoords[Ht]),Pt.push(Y[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[it][Et.id()]&&J[it][Dt.id()]&&mt.edges.push({startX:J[it][Et.id()].getCenterX(),startY:J[it][Et.id()].getCenterY(),endX:J[it][Dt.id()].getCenterX(),endY:J[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var _=m.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),mt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(J[vt]).forEach(function(it){var gt=J[vt][it];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=C.eles.boundingBox();if(tt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?(J.push(h(C,Y[0])),t.relocateComponent(tt[0],J[0],C)):t.relocateComponent(tt[0],Y[0],C)}var Q=function(it,gt){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return J.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return Y.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(G,C,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();a.exports=g}),657:((a,e,r)=>{var f=r(548),i=r(140).layoutBase.Matrix,d=r(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),g=h.nodes(":parent"),v=new Map,L=new Map,G=new Map,C=[],P=[],V=[],Y=[],J=[],D=[],tt=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,S=void 0,W=function(){for(var U=0,k=0,K=!1;k<S;){U=Math.floor(Math.random()*m),K=!1;for(var Z=0;Z<k;Z++)if(Y[Z]==U){K=!0;break}if(!K)Y[k]=U,k++;else continue}},x=function(U,k,K){for(var Z=[],at=0,ct=0,nt=0,et=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(Z[ct]=U,j[U]=0;ct>=at;){nt=Z[at++];for(var xt=C[nt],lt=0;lt<xt.length;lt++)et=L.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,Z[++ct]=et);D[nt][k]=j[nt]*w}if(K){for(var ot=0;ot<m;ot++)D[ot][k]<J[ot]&&(J[ot]=D[ot][k]);for(var Lt=0;Lt<m;Lt++)J[Lt]>ut&&(ut=J[Lt],wt=Lt)}return wt},q=function(U){var k=void 0;if(U){k=Math.floor(Math.random()*m);for(var Z=0;Z<m;Z++)J[Z]=p;for(var at=0;at<S;at++)Y[at]=k,k=x(k,at,U)}else{W();for(var K=0;K<S;K++)x(Y[K],K,U)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<S;nt++)D[ct][nt]*=D[ct][nt];for(var et=0;et<S;et++)tt[et]=[];for(var j=0;j<S;j++)for(var ut=0;ut<S;ut++)tt[j][ut]=D[Y[ut]][j]},z=function(){for(var U=d.svd(tt),k=U.S,K=U.U,Z=U.V,at=k[0]*k[0]*k[0],ct=[],nt=0;nt<S;nt++){ct[nt]=[];for(var et=0;et<S;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=k[nt]/(k[nt]*k[nt]+at/(k[nt]*k[nt])))}n=i.multMat(i.multMat(Z,ct),i.transpose(K))},X=function(){for(var U=void 0,k=void 0,K=[],Z=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),Z[nt]=Math.random();K=i.normalize(K),Z=i.normalize(Z);for(var et=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=i.multGamma(i.multL(i.multGamma(at),D,n)),U=i.dotProduct(at,K),K=i.normalize(K),et=i.dotProduct(at,K),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=Z[xt];if(ct=i.minusOp(ct,i.multCons(at,i.dotProduct(at,ct))),Z=i.multGamma(i.multL(i.multGamma(ct),D,n)),k=i.dotProduct(ct,Z),Z=i.normalize(Z),et=i.dotProduct(ct,Z),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var lt=0;lt<m;lt++)ct[lt]=Z[lt];P=i.multCons(at,Math.sqrt(Math.abs(U))),V=i.multCons(ct,Math.sqrt(Math.abs(k)))};f.connectComponents(c,h,f.getTopMostNodes(T),v),g.forEach(function(F){f.connectComponents(c,h,f.getTopMostNodes(F.descendants().intersection(h)),v)});for(var rt=0,B=0;B<T.length;B++)T[B].isParent()||L.set(T[B].id(),rt++);var O=!0,H=!1,$=void 0;try{for(var _=v.keys()[Symbol.iterator](),ht;!(O=(ht=_.next()).done);O=!0){var Q=ht.value;L.set(Q,rt++)}}catch(F){H=!0,$=F}finally{try{!O&&_.return&&_.return()}finally{if(H)throw $}}for(var It=0;It<L.size;It++)C[It]=[];g.forEach(function(F){for(var U=F.children().intersection(h);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(h);var k=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,k=at)}),G.set(F.id(),U.nodes(":childless")[k].id())}),T.forEach(function(F){var U=void 0;F.isParent()?U=L.get(G.get(F.id())):U=L.get(F.id()),F.neighborhood().nodes().forEach(function(k){h.intersection(F.edgesWith(k)).length>0&&(k.isParent()?C[U].push(G.get(k.id())):C[U].push(k.id()))})});var Nt=function(U){var k=L.get(U),K=void 0;v.get(U).forEach(function(Z){c.getElementById(Z).isParent()?K=G.get(Z):K=Z,C[k].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=L.size;var Et=void 0;if(m>2){S=m<o.sampleSize?m:o.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(q(I),z(),X(),Et={nodeIndexes:L,xCoords:P,yCoords:V}):(L.forEach(function(F,U){P.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),Et={nodeIndexes:L,xCoords:P,yCoords:V}),Et}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),V.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Pt.y)}return Et={nodeIndexes:L,xCoords:P,yCoords:V},Et}};a.exports={spectralLayout:t}}),579:((a,e,r)=>{var f=r(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&i(cytoscape),a.exports=i}),140:(a=>{a.exports=A})},N={};function u(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return b[a](r,r.exports,u),r.exports}var l=u(579);return l})()})})(he)),he.exports}var Er=yr();const mr=ke(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(R=>`${R},${R/2} 0,${R} 0,0`,"L"),R:dt(R=>`0,${R/2} ${R},0 ${R},${R}`,"R"),T:dt(R=>`0,0 ${R},0 ${R/2},${R}`,"T"),B:dt(R=>`${R/2},0 ${R},${R} 0,${R}`,"B")},se={L:dt((R,M)=>R-M+2,"L"),R:dt((R,M)=>R-2,"R"),T:dt((R,M)=>R-M+2,"T"),B:dt((R,M)=>R-2,"B")},Tr=dt(function(R){return Wt(R)?R==="L"?"R":"L":R==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(R){const M=R;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=dt(function(R){const M=R;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=dt(function(R){const M=R;return M==="T"||M==="B"},"isArchitectureDirectionY"),Te=dt(function(R,M){const A=Wt(R)&&qt(M),b=qt(R)&&Wt(M);return A||b},"isArchitectureDirectionXY"),Nr=dt(function(R){const M=R[0],A=R[1],b=Wt(M)&&qt(A),N=qt(M)&&Wt(A);return b||N},"isArchitecturePairXY"),Lr=dt(function(R){return R!=="LL"&&R!=="RR"&&R!=="TT"&&R!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(R,M){const A=`${R}${M}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=dt(function([R,M],A){const b=A[0],N=A[1];return Wt(b)?qt(N)?[R+(b==="L"?-1:1),M+(N==="T"?1:-1)]:[R+(b==="L"?-1:1),M]:Wt(N)?[R+(N==="L"?1:-1),M+(b==="T"?1:-1)]:[R,M+(b==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ar=dt(function(R){return R==="LT"||R==="TL"?[1,1]:R==="BL"||R==="LB"?[1,-1]:R==="BR"||R==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(R,M){return Te(R,M)?"bend":Wt(R)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(R){return R.type==="service"},"isArchitectureService"),Or=dt(function(R){return R.type==="junction"},"isArchitectureJunction"),be=dt(R=>R.data(),"edgeData"),ie=dt(R=>R.data(),"nodeData"),Dr=ar.architecture,ae,Pe=(ae=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:M,icon:A,in:b,title:N,iconText:u}){if(this.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The service [${M}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[b]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"service",icon:A,iconText:u,title:N,edges:[],in:b}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:M,in:A}){if(this.registeredIds[M]!==void 0)throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds[M]}`);if(A!==void 0){if(M===A)throw new Error(`The junction [${M}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(M){return this.nodes[M]??null}addGroup({id:M,icon:A,in:b,title:N}){var u,l,a;if(((u=this.registeredIds)==null?void 0:u[M])!==void 0)throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The group [${M}] cannot be placed within itself`);if(((l=this.registeredIds)==null?void 0:l[b])===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(((a=this.registeredIds)==null?void 0:a[b])==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds[M]="group",this.groups[M]={id:M,icon:A,title:N,in:b}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:M,rhsId:A,lhsDir:b,rhsDir:N,lhsInto:u,rhsInto:l,lhsGroup:a,rhsGroup:e,title:r}){if(!Re(b))throw new Error(`Invalid direction given for left hand side of edge ${M}--${A}. Expected (L,R,T,B) got ${String(b)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${A}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[M].in,i=this.nodes[A].in;if(a&&f&&i&&f==i)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&i&&f==i)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:M,lhsDir:b,lhsInto:u,lhsGroup:a,rhsId:A,rhsDir:N,rhsInto:l,rhsGroup:e,title:r};this.edges.push(d),this.nodes[M]&&this.nodes[A]&&(this.nodes[M].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const M={},A=Object.entries(this.nodes).reduce((e,[r,f])=>(e[r]=f.edges.reduce((i,d)=>{var o,c;const t=(o=this.getNode(d.lhsId))==null?void 0:o.in,s=(c=this.getNode(d.rhsId))==null?void 0:c.in;if(t&&s&&t!==s){const h=wr(d.lhsDir,d.rhsDir);h!=="bend"&&(M[t]??(M[t]={}),M[t][s]=h,M[s]??(M[s]={}),M[s][t]=h)}if(d.lhsId===r){const h=ye(d.lhsDir,d.rhsDir);h&&(i[h]=d.rhsId)}else{const h=ye(d.rhsDir,d.lhsDir);h&&(i[h]=d.lhsId)}return i},{}),e),{}),b=Object.keys(A)[0],N={[b]:1},u=Object.keys(A).reduce((e,r)=>r===b?e:{...e,[r]:1},{}),l=dt(e=>{const r={[e]:[0,0]},f=[e];for(;f.length>0;){const i=f.shift();if(i){N[i]=1,delete u[i];const d=A[i],[t,s]=r[i];Object.entries(d).forEach(([o,c])=>{N[c]||(r[c]=Cr([t,s],o),f.push(c))})}}return r},"BFS"),a=[l(b)];for(;Object.keys(u).length>0;)a.push(l(Object.keys(u)[0]));this.dataStructures={adjList:A,spatialMaps:a,groupAlignments:M}}return this.dataStructures}setElementForId(M,A){this.elements[M]=A}getElementById(M){return this.elements[M]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(M){return this.getConfig()[M]}},dt(ae,"ArchitectureDB"),ae),xr=dt((R,M)=>{fr(R,M),R.groups.map(A=>M.addGroup(A)),R.services.map(A=>M.addService({...A,type:"service"})),R.junctions.map(A=>M.addJunction({...A,type:"junction"})),R.edges.map(A=>M.addEdge(A))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async R=>{var b;const M=await cr("architecture",R);Se.debug(M);const A=(b=Ge.parser)==null?void 0:b.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(M,A)},"parse")},Ir=dt(R=>`
1
+ import{b4 as ke,_ as dt,I as Ze,Y as qe,l as Se,b as Qe,a as Je,p as Ke,q as je,g as _e,s as tr,z as er,F as rr,D as ir,G as ar,c as Ee,aO as me,b5 as pe,i as nr,d as or,x as sr,b6 as hr,b7 as lr}from"./index-BxBZmqgf.js";import{p as fr}from"./chunk-4BX2VUAB-DkbrtaN7.js";import{p as cr}from"./wardley-L42UT6IY-DqVhxf9g.js";import{c as Fe}from"./cytoscape.esm-D_LviqZs.js";var he={exports:{}},le={exports:{}},fe={exports:{}},gr=fe.exports,Me;function ur(){return Me||(Me=1,(function(R,M){(function(b,N){R.exports=N()})(gr,function(){return(function(A){var b={};function N(u){if(b[u])return b[u].exports;var l=b[u]={i:u,l:!1,exports:{}};return A[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=A,N.c=b,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(A,b,N){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,A.exports=u}),(function(A,b,N){var u=N(2),l=N(8),a=N(9);function e(f,i,d){u.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=i}e.prototype=Object.create(u.prototype);for(var r in u)e[r]=u[r];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(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,i){for(var d=this.getOtherEnd(f),t=i.getGraphManager().getRoot();;){if(d.getOwner()==i)return d;if(d.getOwner()==t)break;d=d.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=e}),(function(A,b,N){function u(l){this.vGraphObject=l}A.exports=u}),(function(A,b,N){var u=N(2),l=N(10),a=N(13),e=N(0),r=N(16),f=N(5);function i(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}i.prototype=Object.create(u.prototype);for(var d in u)i[d]=u[d];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;h<c.length;h++)s=c[h],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(c-o)+o;var h=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+r.nextDouble()*(T-h)+h,this.rect.x=t,this.rect.y=s},i.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 s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i}),(function(A,b,N){var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=l}),(function(A,b,N){function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},A.exports=u}),(function(A,b,N){var u=N(2),l=N(10),a=N(0),e=N(7),r=N(3),f=N(1),i=N(13),d=N(12),t=N(11);function s(c,h,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof e?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(v.source=h,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),h.edges.push(v),T!=h&&T.edges.push(v),v)}},s.prototype.remove=function(c){var h=c;if(c instanceof r){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),g,v=T.length,L=0;L<v;L++)g=T[L],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var G=this.nodes.indexOf(h);if(G==-1)throw"Node not in owner node list!";this.nodes.splice(G,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var C=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(C>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(P,1);var G=g.source.owner.getEdges().indexOf(g);if(G==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(G,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,g,v,L=this.getNodes(),G=L.length,C=0;C<G;C++){var P=L[C];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),h>g&&(h=g)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=h-v,this.top=c-v,new d(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,v=-l.MAX_VALUE,L,G,C,P,V,Y=this.nodes,J=Y.length,D=0;D<J;D++){var tt=Y[D];c&&tt.child!=null&&tt.updateBounds(),L=tt.getLeft(),G=tt.getRight(),C=tt.getTop(),P=tt.getBottom(),h>L&&(h=L),T<G&&(T=G),g>C&&(g=C),v<P&&(v=P)}var n=new i(h,g,T-h,v-g);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?V=Y[0].getParent().paddingLeft:V=this.margin,this.left=n.x-V,this.right=n.x+n.width+V,this.top=n.y-V,this.bottom=n.y+n.height+V},s.calculateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,g=l.MAX_VALUE,v=-l.MAX_VALUE,L,G,C,P,V=c.length,Y=0;Y<V;Y++){var J=c[Y];L=J.getLeft(),G=J.getRight(),C=J.getTop(),P=J.getBottom(),h>L&&(h=L),T<G&&(T=G),g>C&&(g=C),v<P&&(v=P)}var D=new i(h,g,T-h,v-g);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,h=this.nodes,T=h.length,g=0;g<T;g++){var v=h[g];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var h=new t,T=new Set,g=this.nodes[0],v,L,G=g.withChildren();for(G.forEach(function(D){h.push(D),T.add(D)});h.length!==0;){g=h.shift(),v=g.getEdges();for(var C=v.length,P=0;P<C;P++){var V=v[P];if(L=V.getOtherEndInGraph(g,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(D){h.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,b,N){var u,l=N(1);function a(e){u=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),f=this.add(e,r);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,r,f,i,d){if(f==null&&i==null&&d==null){if(e==null)throw"Graph is null!";if(r==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(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{d=f,i=r,f=e;var t=i.getOwner(),s=d.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,d);if(f.isInterGraph=!0,f.source=i,f.target=d,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(r.getEdges());for(var i,d=f.length,t=0;t<d;t++)i=f[t],r.remove(i);var s=[];s=s.concat(r.getNodes());var o;d=s.length;for(var t=0;t<d;t++)o=s[t],r.remove(o);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(e instanceof l){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),f=r.length,i=0;i<f;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var f=0;f<r.length;f++)e=e.concat(r[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.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"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var f=e.getOwner(),i;do{if(i=f.getParent(),i==null)break;if(i==r)return!0;if(f=i.getOwner(),f==null)break}while(!0);f=r.getOwner();do{if(i=f.getParent(),i==null)break;if(i==e)return!0;if(f=i.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,r,f,i,d,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],r=e.source,f=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=f,r==f){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=f,d=f.getOwner();e.lca==null;){if(d==i){e.lca=d;break}if(d==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=d.getParent(),d=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var i=r.getOwner();do{if(i==null)break;if(i==f)return i;i=i.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var f,i=e.getNodes(),d=i.length,t=0;t<d;t++)f=i[t],f.inclusionTreeDepth=r,f.child!=null&&this.calcInclusionTreeDepths(f.child,r+1)},a.prototype.includesInvalidEdge=function(){for(var e,r=[],f=this.edges.length,i=0;i<f;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},A.exports=a}),(function(A,b,N){var u=N(12);function l(){}l.calcSeparationAmount=function(a,e,r,f){if(!a.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,i),r[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),r[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var d=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(d=1);var t=d*r[0],s=r[1]/d;r[0]<s?s=r[0]:t=r[1],r[0]=-1*i[0]*(s/2+f),r[1]=-1*i[1]*(t/2+f)},l.decideDirectionsForOverlappingNodes=function(a,e,r){a.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,a.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},l.getIntersection2=function(a,e,r){var f=a.getCenterX(),i=a.getCenterY(),d=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return r[0]=f,r[1]=i,r[2]=d,r[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),h=a.getX(),T=a.getBottom(),g=a.getRight(),v=a.getWidthHalf(),L=a.getHeightHalf(),G=e.getX(),C=e.getY(),P=e.getRight(),V=e.getX(),Y=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),tt=e.getHeightHalf(),n=!1,m=!1;if(f===d){if(i>t)return r[0]=f,r[1]=o,r[2]=d,r[3]=Y,!1;if(i<t)return r[0]=f,r[1]=T,r[2]=d,r[3]=C,!1}else if(i===t){if(f>d)return r[0]=s,r[1]=i,r[2]=P,r[3]=t,!1;if(f<d)return r[0]=c,r[1]=i,r[2]=G,r[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-i)/(d-f),I=void 0,w=void 0,S=void 0,W=void 0,x=void 0,q=void 0;if(-p===y?f>d?(r[0]=h,r[1]=T,n=!0):(r[0]=c,r[1]=o,n=!0):p===y&&(f>d?(r[0]=s,r[1]=o,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?d>f?(r[2]=V,r[3]=Y,m=!0):(r[2]=P,r[3]=C,m=!0):E===y&&(d>f?(r[2]=G,r[3]=C,m=!0):(r[2]=J,r[3]=Y,m=!0)),n&&m)return!1;if(f>d?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,r[0]=S,r[1]=W;break;case 2:S=g,W=i+v*y,r[0]=S,r[1]=W;break;case 3:W=T,S=f+L/y,r[0]=S,r[1]=W;break;case 4:S=h,W=i+-v*y,r[0]=S,r[1]=W;break}if(!m)switch(w){case 1:q=C,x=d+-tt/y,r[2]=x,r[3]=q;break;case 2:x=J,q=t+D*y,r[2]=x,r[3]=q;break;case 3:q=Y,x=d+tt/y,r[2]=x,r[3]=q;break;case 4:x=V,q=t+-D*y,r[2]=x,r[3]=q;break}}return!1},l.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},l.getIntersection=function(a,e,r,f){if(f==null)return this.getIntersection2(a,e,r);var i=a.x,d=a.y,t=e.x,s=e.y,o=r.x,c=r.y,h=f.x,T=f.y,g=void 0,v=void 0,L=void 0,G=void 0,C=void 0,P=void 0,V=void 0,Y=void 0,J=void 0;return L=s-d,C=i-t,V=t*d-i*s,G=T-c,P=o-h,Y=h*c-o*T,J=L*P-G*C,J===0?null:(g=(C*Y-P*V)/J,v=(G*V-L*Y)/J,new u(g,v))},l.angleOfVector=function(a,e,r,f){var i=void 0;return a!==r?(i=Math.atan((f-e)/(r-a)),r<a?i+=Math.PI:f<e&&(i+=this.TWO_PI)):f<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},l.doIntersect=function(a,e,r,f){var i=a.x,d=a.y,t=e.x,s=e.y,o=r.x,c=r.y,h=f.x,T=f.y,g=(t-i)*(T-c)-(h-o)*(s-d);if(g===0)return!1;var v=((T-c)*(h-i)+(o-h)*(T-d))/g,L=((d-s)*(h-i)+(t-i)*(T-d))/g;return 0<v&&v<1&&0<L&&L<1},l.findCircleLineIntersections=function(a,e,r,f,i,d,t){var s=(r-a)*(r-a)+(f-e)*(f-e),o=2*((a-i)*(r-a)+(e-d)*(f-e)),c=(a-i)*(a-i)+(e-d)*(e-d)-t*t,h=o*o-4*s*c;if(h>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,A.exports=l}),(function(A,b,N){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},A.exports=u}),(function(A,b,N){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u}),(function(A,b,N){var u=(function(){function i(d,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}return function(d,t,s){return t&&i(d.prototype,t),s&&i(d,s),d}})();function l(i,d){if(!(i instanceof d))throw new TypeError("Cannot call a class as a function")}var a=function(d){return{value:d,next:null,prev:null}},e=function(d,t,s,o){return d!==null?d.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=d,t.next=s,o.length++,t},r=function(d,t){var s=d.prev,o=d.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,d.prev=d.next=null,t.length--,d},f=(function(){function i(d){var t=this;l(this,i),this.length=0,this.head=null,this.tail=null,d!=null&&d.forEach(function(s){return t.push(s)})}return u(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return r(t,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),i})();A.exports=f}),(function(A,b,N){function u(l,a,e){this.x=null,this.y=null,l==null&&a==null&&e==null?(this.x=0,this.y=0):typeof l=="number"&&typeof a=="number"&&e==null?(this.x=l,this.y=a):l.constructor.name=="Point"&&a==null&&e==null&&(e=l,this.x=e.x,this.y=e.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(l,a,e){l.constructor.name=="Point"&&a==null&&e==null?(e=l,this.setLocation(e.x,e.y)):typeof l=="number"&&typeof a=="number"&&e==null&&(parseInt(l)==l&&parseInt(a)==a?this.move(l,a):(this.x=Math.floor(l+.5),this.y=Math.floor(a+.5)))},u.prototype.move=function(l,a){this.x=l,this.y=a},u.prototype.translate=function(l,a){this.x+=l,this.y+=a},u.prototype.equals=function(l){if(l.constructor.name=="Point"){var a=l;return this.x==a.x&&this.y==a.y}return this==l},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=u}),(function(A,b,N){function u(l,a,e,r){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&a!=null&&e!=null&&r!=null&&(this.x=l,this.y=a,this.width=e,this.height=r)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(l){this.x=l},u.prototype.getY=function(){return this.y},u.prototype.setY=function(l){this.y=l},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},A.exports=u}),(function(A,b,N){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function l(){}l.lastID=0,l.createID=function(a){return l.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=l.getString(),l.lastID++),a.uniqueID)},l.getString=function(a){return a==null&&(a=l.lastID),"Object#"+a},l.isPrimitive=function(a){var e=typeof a>"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},A.exports=l}),(function(A,b,N){function u(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c<o.length;c++)h[c]=o[c];return h}else return Array.from(o)}var l=N(0),a=N(7),e=N(3),r=N(1),f=N(6),i=N(5),d=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new a(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new r(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),l.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)h[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var h=c.getChild().getNodes(),T=0;T<h.length;T++)update(h[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof r){var v=o;if(v.vGraphObject!=null){var L=v.vGraphObject;L.update(v)}}else if(o instanceof f){var G=o;if(G.vGraphObject!=null){var C=G.vGraphObject;C.update(G)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new i(0,0));else{var c=new d,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(h.x),c.setDeviceOrgY(h.y);for(var T=this.getAllNodes(),g,v=0;v<T.length;v++)g=T[v],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,h,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],h=c.getChild(),h==null||h.getNodes().length==0?c.scatter():(this.positionNodesRandomly(h),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,h=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<h.length;g++)h[g].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,L=[],G=new Map,C=[];for(C=C.concat(h);C.length>0&&c;){for(L.push(C[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),v.add(P);for(var V=P.getEdges(),g=0;g<V.length;g++){var Y=V[g].getOtherEnd(P);if(G.get(P)!=Y)if(!v.has(Y))L.push(Y),G.set(Y,P);else{c=!1;break}}}if(!c)o=[];else{var J=[].concat(u(v));o.push(J);for(var g=0;g<J.length;g++){var D=J[g],tt=C.indexOf(D);tt>-1&&C.splice(tt,1)}v=new Set,G=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var L=this.newEdge(null);this.graphManager.add(L,h,v),c.add(v),h=v}var L=this.newEdge(null);return this.graphManager.add(L,h,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(u(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var h=o[c];if(h.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(h),g=0;g<T.length;g++){var v=T[g],L=new i(v.getCenterX(),v.getCenterY()),G=h.bendpoints.get(g);G.x=L.x,G.y=L.y,v.getOwner().remove(v)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,c,h,T){if(h!=null&&T!=null){var g=c;if(o<=50){var v=c/h;g-=(c-v)/50*(50-o)}else{var L=c*T;g+=(L-c)/50*(o-50)}return g}else{var G,C;return o<=50?(G=9*c/500,C=c/10):(G=9*c/50,C=-8*c),G*o+C}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var h=[],T=new Map,g=!1,v=null;(c.length==1||c.length==2)&&(g=!0,v=c[0]);for(var L=0;L<c.length;L++){var G=c[L],C=G.getNeighborsList().size;T.set(G,G.getNeighborsList().size),C==1&&h.push(G)}var P=[];for(P=P.concat(h);!g;){var V=[];V=V.concat(P),P=[];for(var L=0;L<c.length;L++){var G=c[L],Y=c.indexOf(G);Y>=0&&c.splice(Y,1);var J=G.getNeighborsList();J.forEach(function(n){if(h.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,b,N){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u}),(function(A,b,N){var u=N(5);function l(a,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}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},l.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},l.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},l.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},l.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},A.exports=l}),(function(A,b,N){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var l=N(15),a=N(4),e=N(0),r=N(8),f=N(9);function i(){l.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}i.prototype=Object.create(l.prototype);for(var d in l)i[d]=l[d];i.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,h,T,g,v=this.getGraphManager().getAllEdges(),L=0;L<v.length;L++)t=v[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),h=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<g.length;o++)h=g[o],this.calculateRepulsionForceOfANode(h,v,t,s),v.add(h);else for(o=0;o<g.length;o++)for(h=g[o],c=o+1;c<g.length;c++)T=g[c],h.getOwner()==T.getOwner()&&this.calcRepulsionForce(h,T)},i.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},i.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),h,T,g,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(T=t.edgeElasticity*(h-s),g=T*(t.lengthX/h),v=T*(t.lengthY/h),o.springForceX+=g,o.springForceY+=v,c.springForceX-=g,c.springForceY-=v)},i.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),h=new Array(2),T=new Array(4),g,v,L,G,C,P,V;if(o.intersects(c)){r.calcSeparationAmount(o,c,h,a.DEFAULT_EDGE_LENGTH/2),P=2*h[0],V=2*h[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*V,s.repulsionForceX+=Y*P,s.repulsionForceY+=Y*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(r.getIntersection(o,c,T),g=T[2]-T[0],v=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=f.sign(g)*a.MIN_REPULSION_DIST),Math.abs(v)<a.MIN_REPULSION_DIST&&(v=f.sign(v)*a.MIN_REPULSION_DIST),L=g*g+v*v,G=Math.sqrt(L),C=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,P=C*g/G,V=C*v/G,t.repulsionForceX-=P,t.repulsionForceY-=V,s.repulsionForceX+=P,s.repulsionForceY+=V},i.prototype.calcGravitationalForce=function(t){var s,o,c,h,T,g,v,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(h)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),h=0;h<s;h++)c[h]=new Array(o);for(var h=0;h<s;h++)for(var T=0;T<o;T++)c[h][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,s,o){var c=0,h=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=h;v++)for(var L=T;L<=g;L++)this.grid[v][L].push(t),t.setGridCoordinates(c,h,T,g)},i.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var h=new Set;t.surrounding=new Array;for(var T,g=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(v<0||L<0||v>=g.length||L>=g[0].length)){for(var G=0;G<g[v][L].length;G++)if(T=g[v][L][G],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!h.has(T)){var C=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);C<=this.repulsionRange&&P<=this.repulsionRange&&h.add(T)}}t.surrounding=[].concat(u(h))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},i.prototype.calcRepulsionRange=function(){return 0},A.exports=i}),(function(A,b,N){var u=N(1),l=N(4);function a(r,f,i){u.call(this,r,f,i),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];A.exports=a}),(function(A,b,N){var u=N(3),l=N(4);function a(r,f,i,d){u.call(this,r,f,i,d),this.nodeRepulsion=l.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=[]}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];a.prototype.setGridCoordinates=function(r,f,i,d){this.startX=r,this.finishX=f,this.startY=i,this.finishY=d},A.exports=a}),(function(A,b,N){function u(l,a){this.width=0,this.height=0,l!==null&&a!==null&&(this.height=a,this.width=l)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(l){this.width=l},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(l){this.height=l},A.exports=u}),(function(A,b,N){var u=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(a,e){var r=u.createID(a);this.contains(r)||(this.map[r]=e,this.keys.push(a))},l.prototype.contains=function(a){return u.createID(a),this.map[a]!=null},l.prototype.get=function(a){var e=u.createID(a);return this.map[e]},l.prototype.keySet=function(){return this.keys},A.exports=l}),(function(A,b,N){var u=N(14);function l(){this.set={}}l.prototype.add=function(a){var e=u.createID(a);this.contains(e)||(this.set[e]=a)},l.prototype.remove=function(a){delete this.set[u.createID(a)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(a){return this.set[u.createID(a)]==a},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),r=e.length,f=0;f<r;f++)a.push(this.set[e[f]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(a){for(var e=a.length,r=0;r<e;r++){var f=a[r];this.add(f)}},A.exports=l}),(function(A,b,N){function u(){}u.multMat=function(l,a){for(var e=[],r=0;r<l.length;r++){e[r]=[];for(var f=0;f<a[0].length;f++){e[r][f]=0;for(var i=0;i<l[0].length;i++)e[r][f]+=l[r][i]*a[i][f]}}return e},u.transpose=function(l){for(var a=[],e=0;e<l[0].length;e++){a[e]=[];for(var r=0;r<l.length;r++)a[e][r]=l[r][e]}return a},u.multCons=function(l,a){for(var e=[],r=0;r<l.length;r++)e[r]=l[r]*a;return e},u.minusOp=function(l,a){for(var e=[],r=0;r<l.length;r++)e[r]=l[r]-a[r];return e},u.dotProduct=function(l,a){for(var e=0,r=0;r<l.length;r++)e+=l[r]*a[r];return e},u.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},u.normalize=function(l){for(var a=[],e=this.mag(l),r=0;r<l.length;r++)a[r]=l[r]/e;return a},u.multGamma=function(l){for(var a=[],e=0,r=0;r<l.length;r++)e+=l[r];e*=-1/l.length;for(var f=0;f<l.length;f++)a[f]=e+l[f];return a},u.multL=function(l,a,e){for(var r=[],f=[],i=[],d=0;d<a[0].length;d++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][d]*l[s];f[d]=t}for(var o=0;o<e.length;o++){for(var c=0,h=0;h<e.length;h++)c+=e[o][h]*f[h];i[o]=c}for(var T=0;T<a.length;T++){for(var g=0,v=0;v<a[0].length;v++)g+=a[T][v]*i[v];r[T]=g}return r},A.exports=u}),(function(A,b,N){var u=(function(){function r(f,i){for(var d=0;d<i.length;d++){var t=i[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,i,d){return i&&r(f.prototype,i),d&&r(f,d),f}})();function l(r,f){if(!(r instanceof f))throw new TypeError("Cannot call a class as a function")}var a=N(11),e=(function(){function r(f,i){l(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;f instanceof a?d=f.size():d=f.length,this._quicksort(f,0,d-1)}return u(r,[{key:"_quicksort",value:function(i,d,t){if(d<t){var s=this._partition(i,d,t);this._quicksort(i,d,s),this._quicksort(i,s+1,t)}}},{key:"_partition",value:function(i,d,t){for(var s=this._get(i,d),o=d,c=t;;){for(;this.compareFunction(s,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,o),s);)o++;if(o<c)this._swap(i,o,c),o++,c--;else return c}}},{key:"_get",value:function(i,d){return i instanceof a?i.get_object_at(d):i[d]}},{key:"_set",value:function(i,d,t){i instanceof a?i.set_object_at(d,t):i[d]=t}},{key:"_swap",value:function(i,d,t){var s=this._get(i,d);this._set(i,d,this._get(i,t)),this._set(i,t,s)}},{key:"_defaultCompareFunction",value:function(i,d){return d>i}}]),r})();A.exports=e}),(function(A,b,N){function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,i=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,d);t++){if(t<i){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=u.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<i,this.s[t]!==0)){for(var h=0,T=t;T<this.m;T++)h+=l[T][t]*l[T][c];h=-h/l[t][t];for(var g=t;g<this.m;g++)l[g][c]+=h*l[g][t]}e[c]=l[t][c]}if((function(Tt,Ct){return Ct})(f,t<i))for(var v=t;v<this.m;v++)this.U[v][t]=l[v][t];if(t<d){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=u.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var G=t+1;G<this.n;G++)e[G]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var C=t+1;C<this.m;C++)r[C]=0;for(var P=t+1;P<this.n;P++)for(var V=t+1;V<this.m;V++)r[V]+=e[P]*l[V][P];for(var Y=t+1;Y<this.n;Y++)for(var J=-e[Y]/e[t+1],D=t+1;D<this.m;D++)l[D][Y]+=J*r[D]}for(var tt=t+1;tt<this.n;tt++)this.V[tt][t]=e[tt]}}var n=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=l[i][i]),this.m<n&&(this.s[n-1]=0),d+1<n&&(e[d]=l[d][n-1]),e[n-1]=0;{for(var m=i;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=i-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var I=0,w=E;w<this.m;w++)I+=this.U[w][E]*this.U[w][y];I=-I/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=I*this.U[S][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var q=0;q<this.m;q++)this.U[q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<d,e[z]!==0))for(var X=z+1;X<a;X++){for(var rt=0,B=z+1;B<this.n;B++)rt+=this.V[B][z]*this.V[B][X];rt=-rt/this.V[z+1][z];for(var O=z+1;O<this.n;O++)this.V[O][X]+=rt*this.V[O][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var $=n-1,_=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==Q&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<n;Rt++){var Ht=u.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Vt=this.s[n-1]/Yt,F=this.s[n-2]/Yt,U=e[n-2]/Yt,k=this.s[Q]/Yt,K=e[Q]/Yt,Z=((F+Vt)*(F-Vt)+U*U)/2,at=Vt*U*(Vt*U),ct=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(ct=Math.sqrt(Z*Z+at),Z<0&&(ct=-ct),ct=at/(Z+ct));for(var nt=(k+Vt)*(k-Vt)+ct,et=k*K,j=Q;j<n-1;j++){var ut=u.hypot(nt,et),wt=nt/ut,pt=et/ut;j!==Q&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=u.hypot(nt,et),wt=nt/ut,pt=et/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],et=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var ot=0;ot<=$;ot++)this.V[ot][Q]=-this.V[ot][Q]}for(;Q<$&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][Q+1],this.V[ft][Q+1]=this.V[ft][Q],this.V[ft][Q]=Lt;if(Q<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][Q+1],this.U[st][Q+1]=this.U[st][Q],this.U[st][Q]=Lt;Q++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},u.hypot=function(l,a){var e=void 0;return Math.abs(l)>Math.abs(a)?(e=a/l,e=Math.abs(l)*Math.sqrt(1+e*e)):a!=0?(e=l/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},A.exports=u}),(function(A,b,N){var u=(function(){function e(r,f){for(var i=0;i<f.length;i++){var d=f[i];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}return function(r,f,i){return f&&e(r.prototype,f),i&&e(r,i),r}})();function l(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(r,f){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,e),this.sequence1=r,this.sequence2=f,this.match_score=i,this.mismatch_penalty=d,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var h=0;h<this.jMax;h++)this.tracebackGrid[c][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[d-1]===this.sequence2[t-1]?s=this.grid[d-1][t-1]+this.match_score:s=this.grid[d-1][t-1]+this.mismatch_penalty;var o=this.grid[d-1][t]+this.gap_penalty,c=this.grid[d][t-1]+this.gap_penalty,h=[s,o,c],T=this.arrayAllMaxIndexes(h);this.grid[d][t]=h[T[0]],this.tracebackGrid[d][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var i=f[0],d=this.tracebackGrid[i.pos[0]][i.pos[1]];d[0]&&f.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),d[1]&&f.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),d[2]&&f.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,i){for(var d=[],t=-1;(t=f.indexOf(i,t+1))!==-1;)d.push(t);return d}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();A.exports=a}),(function(A,b,N){var u=function(){};u.FDLayout=N(18),u.FDLayoutConstants=N(4),u.FDLayoutEdge=N(19),u.FDLayoutNode=N(20),u.DimensionD=N(21),u.HashMap=N(22),u.HashSet=N(23),u.IGeometry=N(8),u.IMath=N(9),u.Integer=N(10),u.Point=N(12),u.PointD=N(5),u.RandomSeed=N(16),u.RectangleD=N(13),u.Transform=N(17),u.UniqueIDGeneretor=N(14),u.Quicksort=N(25),u.LinkedList=N(11),u.LGraphObject=N(2),u.LGraph=N(6),u.LEdge=N(1),u.LGraphManager=N(7),u.LNode=N(3),u.Layout=N(15),u.LayoutConstants=N(0),u.NeedlemanWunsch=N(27),u.Matrix=N(24),u.SVD=N(26),A.exports=u}),(function(A,b,N){function u(){this.listeners=[]}var l=u.prototype;l.addListener=function(a,e){this.listeners.push({event:a,callback:e})},l.removeListener=function(a,e){for(var r=this.listeners.length;r>=0;r--){var f=this.listeners[r];f.event===a&&f.callback===e&&this.listeners.splice(r,1)}},l.emit=function(a,e){for(var r=0;r<this.listeners.length;r++){var f=this.listeners[r];a===f.event&&f.callback(e)}},A.exports=u})])})})(fe)),fe.exports}var dr=le.exports,Oe;function vr(){return Oe||(Oe=1,(function(R,M){(function(b,N){R.exports=N(ur())})(dr,function(A){return(()=>{var b={45:((a,e,r)=>{var f={};f.layoutBase=r(551),f.CoSEConstants=r(806),f.CoSEEdge=r(767),f.CoSEGraph=r(880),f.CoSEGraphManager=r(578),f.CoSELayout=r(765),f.CoSENode=r(991),f.ConstraintHandler=r(902),a.exports=f}),806:((a,e,r)=>{var f=r(551).FDLayoutConstants;function i(){}for(var d in f)i[d]=f[d];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i}),767:((a,e,r)=>{var f=r(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i}),880:((a,e,r)=>{var f=r(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i}),578:((a,e,r)=>{var f=r(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var d in f)i[d]=f[d];a.exports=i}),765:((a,e,r)=>{var f=r(551).FDLayout,i=r(578),d=r(880),t=r(991),s=r(767),o=r(806),c=r(902),h=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,v=r(551).PointD,L=r(551).DimensionD,G=r(551).Layout,C=r(551).Integer,P=r(551).IGeometry,V=r(551).LGraph,Y=r(551).Transform,J=r(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var tt in f)D[tt]=f[tt];D.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new d(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function O(H){for(var $=H.getChild().getNodes(),_,ht=0,Q=0;Q<$.length;Q++)_=$[Q],_.getChild()==null?n.fixedNodeSet.has(_.id)&&(ht+=100):ht+=O(_);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var I=y(E);I>0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){w.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){S.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,$,_;for(_=O.length-1;_>=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[H],O[H]=$;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:O.gap})}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push($):q.set(H,[$]),q.has($)?q.get($).push(H):q.set($,[H])}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(_)?z.get(_).push(ht):z.set(_,[ht]),z.has(ht)?z.get(ht).push(_):z.set(ht,[_])}});var X=function(H,$){var _=[],ht=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){_[Nt]=[],ht[Nt]=!1;var gt=it;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},rt=X(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var I=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var W=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(B){if(!n.fixedNodesOnHorizontal.has(B)){var O=0;n.dummyToNodeForVerticalAlignment.has(B)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX:O=n.idToNodeMap.get(B).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(H){if(H.right){var $=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get(B)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(B)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(B,n.nodeToTempPositionMapHorizontal.get(B)+O),n.dummyToNodeForVerticalAlignment.has(B)?n.dummyToNodeForVerticalAlignment.get(B).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get(B).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(B){if(!n.fixedNodesOnHorizontal.has(B)){var O=0;n.dummyToNodeForHorizontalAlignment.has(B)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY:O=n.idToNodeMap.get(B).displacementY,n.nodeToRelativeConstraintMapVertical.get(B).forEach(function(H){if(H.bottom){var $=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get(B)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(B)-n.nodeToTempPositionMapVertical.get(H.top)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapVertical.set(B,n.nodeToTempPositionMapVertical.get(B)+O),n.dummyToNodeForHorizontalAlignment.has(B)?n.dummyToNodeForHorizontalAlignment.get(B).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get(B).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){n.idToNodeMap.get(Q).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),I=E.getTarget();if(y==I)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(y.getEdgeListToNode(I)),w=w.concat(I.getEdgeListToNode(y)),!m.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var W=w[S];W.getBendpoints().push(new v),this.createDummyNodesForBendpoints(W)}}w.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,I=0,w=new v(0,0),S=0;S<n.length;S++){S%p==0&&(I=0,y=E,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[S],x=G.findCenterOfTree(W);m.x=I,m.y=y,w=D.radialLayout(W,x,m),w.y>E&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w<n.length;w++){var S=n[w];S.transform(I)}var W=new v(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,I){var w=(E-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,W=S*P.TWO_PI/360,x=y*Math.cos(W),q=y*Math.sin(W);n.setCenter(x,q);var z=[];z=z.concat(n.getEdges());var X=z.length;m!=null&&X--;for(var rt=0,B=z.length,O,H=n.getEdgesBetween(m);H.length>1;){var $=H[0];H.splice(0,1);var _=z.indexOf($);_>=0&&z.splice(_,1),B--,X--}m!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(E-p)/X,Q=O;rt!=X;Q=++Q%B){var It=z[Q].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=C.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var I=E[y],w=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],S=I.getParent().id;typeof m[S]>"u"&&(m[S]=[]),m[S]=m[S].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=q.paddingLeft||0,z.paddingRight=q.paddingRight||0,z.paddingBottom=q.paddingBottom||0,z.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=q.getChild();rt.add(z);for(var B=0;B<m[W].length;B++){var O=m[W][B];rt.remove(O),X.add(O)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,I=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,S=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,S)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var I=E[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,I,w){m+=E+I,p+=y+w;for(var S=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=S;for(var q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=m,X.rect.y=p,m+=X.rect.width+n.horizontalPadding,X.rect.height>q&&(q=X.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return I<y?w=E:w=p,w},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=o.TILING_PADDING_VERTICAL,E=o.TILING_PADDING_HORIZONTAL,y=n.length,I=0,w=0,S=0;n.forEach(function(B){I+=B.getWidth(),w+=B.getHeight(),B.getWidth()>S&&(S=B.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(q))/(2*(W+E)),X;m?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return w.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,q=0,z=0;z<n.length;z++){var X=n[z];x+=X.getCenterX(),q+=X.getCenterY()}w.centerX=x/n.length,w.centerY=q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(w.rows.length==0)this.insertNodeToRow(w,X,0,m);else if(this.canAddHorizontal(w,X.rect.width,X.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,X,rt,m)}else this.insertNodeToRow(w,X,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var w=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width<w&&(n.width=w);var S=m.rect.height;p>0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var S=0;n.rowHeight[I]<p&&I>0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+S)/(w+m+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.width<m?x=(n.height+S)/m:x=(n.height+S)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>w&&(w=E[S].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var I=0;I<E.length;I++)if(p=E[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new L(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,w=p.startY,S=p.finishY,W=0,x=0,q=0,z=0,X=[W,q,x,z];if(w>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(I<this.grid.length-1)for(var rt=w;rt<=S;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,$=0;$<X.length;$++)X[$]<B?(B=X[$],O=1,H=$):X[$]==B&&O++;if(O==3&&B==0)X[0]==0&&X[1]==0&&X[2]==0?m=1:X[0]==0&&X[1]==0&&X[3]==0?m=0:X[0]==0&&X[2]==0&&X[3]==0?m=3:X[1]==0&&X[2]==0&&X[3]==0&&(m=2);else if(O==2&&B==0){var _=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?_==0?m=0:m=1:X[0]==0&&X[2]==0?_==0?m=0:m=2:X[0]==0&&X[3]==0?_==0?m=0:m=3:X[1]==0&&X[2]==0?_==0?m=1:m=2:X[1]==0&&X[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&B==0){var _=Math.floor(Math.random()*4);m=_}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-h.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+h.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+h.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-h.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,r)=>{var f=r(551).FDLayoutNode,i=r(551).IMath;function d(s,o,c,h){f.call(this,s,o,c,h)}d.prototype=Object.create(f.prototype);for(var t in f)d[t]=f[t];d.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T<c.length;T++)h=c[T],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},d.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},d.prototype.setPred1=function(s){this.pred1=s},d.prototype.getPred1=function(){return pred1},d.prototype.getPred2=function(){return pred2},d.prototype.setNext=function(s){this.next=s},d.prototype.getNext=function(){return next},d.prototype.setProcessed=function(s){this.processed=s},d.prototype.isProcessed=function(){return processed},a.exports=d}),902:((a,e,r)=>{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h<c.length;h++)T[h]=c[h];return T}else return Array.from(c)}var i=r(806),d=r(551).LinkedList,t=r(551).Matrix,s=r(551).SVD;function o(){}o.handleConstraints=function(c){var h={};h.fixedNodeConstraint=c.constraints.fixedNodeConstraint,h.alignmentConstraint=c.constraints.alignmentConstraint,h.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,v=[],L=[],G=c.getAllNodes(),C=0,P=0;P<G.length;P++){var V=G[P];V.getChild()==null&&(g.set(V.id,C++),v.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var Y=function(U,k){return{x:U.x-k.x,y:U.y-k.y}},J=function(U){var k=0,K=0;return U.forEach(function(Z){k+=v[g.get(Z)],K+=L[g.get(Z)]}),{x:k/U.size,y:K/U.size}},D=function(U,k,K,Z,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;U.forEach(function(lt,ot){nt.set(ot,0)}),U.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,ut=new d;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(k=="horizontal"?et.set(ot,g.has(ot)?v[g.get(ot)]:Z.get(ot)):et.set(ot,g.has(ot)?L[g.get(ot)]:Z.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?v[g.get(st)]:Z.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:Z.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=g.has(st)?v[g.get(st)]:Z.get(st):ft+=g.has(st)?L[g.get(st)]:Z.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(k=="horizontal"?st=g.has(ft.id)?v[g.get(ft.id)]:Z.get(ft.id):st=g.has(ft.id)?L[g.get(ft.id)]:Z.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;U.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;k=="horizontal"?kt=g.has(St)?v[g.get(St)]:Z.get(St):kt=g.has(St)?L[g.get(St)]:Z.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var ce=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+ce)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},tt=function(U){var k=0,K=0,Z=0,at=0;if(U.forEach(function(j){j.left?v[g.get(j.left)]-v[g.get(j.right)]>=0?k++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?Z++:at++}),k>K&&Z>at)for(var ct=0;ct<g.size;ct++)v[ct]=-1*v[ct],L[ct]=-1*L[ct];else if(k>K)for(var nt=0;nt<g.size;nt++)v[nt]=-1*v[nt];else if(Z>at)for(var et=0;et<g.size;et++)L[et]=-1*L[et]},n=function(U){var k=[],K=new d,Z=new Set,at=0;return U.forEach(function(ct,nt){if(!Z.has(nt)){k[at]=[];var et=nt;for(K.push(et),Z.add(et),k[at].push(et);K.length!=0;){et=K.shift();var j=U.get(et);j.forEach(function(ut){Z.has(ut.id)||(K.push(ut.id),Z.add(ut.id),k[at].push(ut.id))})}at++}}),k},m=function(U){var k=new Map;return U.forEach(function(K,Z){k.set(Z,[])}),U.forEach(function(K,Z){K.forEach(function(at){k.get(Z).push(at),k.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),k},p=function(U){var k=new Map;return U.forEach(function(K,Z){k.set(Z,[])}),U.forEach(function(K,Z){K.forEach(function(at){k.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),k},E=[],y=[],I=!1,w=!1,S=new Set,W=new Map,x=new Map,q=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(F){F.left?(W.has(F.left)?W.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):W.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),W.has(F.right)||W.set(F.right,[])):(W.has(F.top)?W.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):W.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),W.has(F.bottom)||W.set(F.bottom,[]))}),x=m(W),q=n(x)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(F,U){E[U]=[F.position.x,F.position.y],y[U]=[v[g.get(F.nodeId)],L[g.get(F.nodeId)]]}),I=!0;else if(h.alignmentConstraint)(function(){var F=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,k=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).x,U[et].forEach(function(pt){E[F]=[wt,L[g.get(pt)]],y[F]=[v[g.get(pt)],L[g.get(pt)]],F++})},K=0;K<U.length;K++)k(K);I=!0}if(h.alignmentConstraint.horizontal){for(var Z=h.alignmentConstraint.horizontal,at=function(et){var j=new Set;Z[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).y,Z[et].forEach(function(pt){E[F]=[v[g.get(pt)],wt],y[F]=[v[g.get(pt)],L[g.get(pt)]],F++})},ct=0;ct<Z.length;ct++)at(ct);I=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<q.length;rt++)q[rt].length>z&&(z=q[rt].length,X=rt);if(z<x.size/2)tt(h.relativePlacementConstraint),I=!1,w=!1;else{var B=new Map,O=new Map,H=[];q[X].forEach(function(F){W.get(F).forEach(function(U){U.direction=="horizontal"?(B.has(F)?B.get(F).push(U):B.set(F,[U]),B.has(U.id)||B.set(U.id,[]),H.push({left:F,right:U.id})):(O.has(F)?O.get(F).push(U):O.set(F,[U]),O.has(U.id)||O.set(U.id,[]),H.push({top:F,bottom:U.id}))})}),tt(H),w=!1;var $=D(B,"horizontal"),_=D(O,"vertical");q[X].forEach(function(F,U){y[U]=[v[g.get(F)],L[g.get(F)]],E[U]=[],$.has(F)?E[U][0]=$.get(F):E[U][0]=v[g.get(F)],_.has(F)?E[U][1]=_.get(F):E[U][1]=L[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,Q=t.transpose(E),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<g.size;gt++){var mt=[v[gt],L[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];v[gt]=t.dotProduct(mt,At),L[gt]=t.dotProduct(mt,Ot)}w&&tt(h.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Et={x:0,y:0};h.fixedNodeConstraint.forEach(function(F,U){var k={x:v[g.get(F.nodeId)],y:L[g.get(F.nodeId)]},K=F.position,Z=Y(K,k);Et.x+=Z.x,Et.y+=Z.y}),Et.x/=h.fixedNodeConstraint.length,Et.y/=h.fixedNodeConstraint.length,v.forEach(function(F,U){v[U]+=Et.x}),L.forEach(function(F,U){L[U]+=Et.y}),h.fixedNodeConstraint.forEach(function(F){v[g.get(F.nodeId)]=F.position.x,L[g.get(F.nodeId)]=F.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Dt=h.alignmentConstraint.vertical,Rt=function(U){var k=new Set;Dt[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=v[g.get(K.values().next().value)]:Z=J(k).x,k.forEach(function(at){S.has(at)||(v[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(h.alignmentConstraint.horizontal)for(var Ut=h.alignmentConstraint.horizontal,Pt=function(U){var k=new Set;Ut[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return S.has(at)})),Z=void 0;K.size>0?Z=L[g.get(K.values().next().value)]:Z=J(k).y,k.forEach(function(at){S.has(at)||(L[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}h.relativePlacementConstraint&&(function(){var F=new Map,U=new Map,k=new Map,K=new Map,Z=new Map,at=new Map,ct=new Set,nt=new Set;if(S.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var et=h.alignmentConstraint.vertical,j=function(yt){k.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),k.get("dummy"+yt).push(Mt),S.has(Mt)&&ct.add("dummy"+yt)}),Z.set("dummy"+yt,v[g.get(et[yt][0])])},ut=0;ut<et.length;ut++)j(ut);if(h.alignmentConstraint.horizontal)for(var wt=h.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){U.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,L[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(Zt)?lt.get(Zt).push($t):lt.set(Zt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(Zt=U.get(yt)?U.get(yt):yt,U.get(Mt.id)?$t={id:U.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(Zt)?ot.get(Zt).push($t):ot.set(Zt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),kt=n(zt),Kt=p(lt),ce=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){ce.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,Z,Qt),Jt=D(ot,"vertical",nt,at,jt),oe=function(yt){k.get(yt)?k.get(yt).forEach(function(Mt){v[g.get(Mt)]=_t.get(yt)}):v[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ge=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ge.next()).done);te=!0){var ue=Le.value;oe(ue)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){L[g.get(Mt)]=Jt.get(yt)}):L[g.get(yt)]=Jt.get(yt)},de=!0,Ce=!1,Ae=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),we;!(de=(we=ve.next()).done);de=!0){var ue=we.value;$e(ue)}}catch(Gt){Ce=!0,Ae=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ce)throw Ae}}})()}for(var Yt=0;Yt<G.length;Yt++){var Vt=G[Yt];Vt.getChild()==null&&Vt.setCenter(v[g.get(Vt.id)],L[g.get(Vt.id)])}},a.exports=o}),551:(a=>{a.exports=A})},N={};function u(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return b[a](r,r.exports,u),r.exports}var l=u(45);return l})()})})(le)),le.exports}var pr=he.exports,De;function yr(){return De||(De=1,(function(R,M){(function(b,N){R.exports=N(vr())})(pr,function(A){return(()=>{var b={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,f=Array(r>1?r-1:0),i=1;i<r;i++)f[i-1]=arguments[i];return f.forEach(function(d){Object.keys(d).forEach(function(t){return e[t]=d[t]})}),e}}),548:((a,e,r)=>{var f=(function(){function t(s,o){var c=[],h=!0,T=!1,g=void 0;try{for(var v=s[Symbol.iterator](),L;!(h=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(G){T=!0,g=G}finally{try{!h&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=r(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(h,T){typeof h=="number"&&(h=T);for(var g=h.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},d.connectComponents=function(t,s,o,c){var h=new i,T=new Set,g=[],v=void 0,L=void 0,G=void 0,C=!1,P=1,V=[],Y=[],J=function(){var tt=t.collection();Y.push(tt);var n=o[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(s)),g.push(n),m.forEach(function(y){h.push(y),T.add(y),tt.merge(y)});for(var p=function(){n=h.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var w=0;w<I.length;w++){var S=I[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var W=v.union(v.descendants());W.forEach(function(x){h.push(x),T.add(x),tt.merge(x),o.has(x)&&g.push(x)})}}};h.length!=0;)p();if(tt.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){tt.has(I.source())&&tt.has(I.target())&&tt.merge(I)})}),g.length==o.length&&(C=!0),!C||C&&P>1){L=g[0],G=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<G&&(G=y.connectedEdges().length,L=y)}),V.push(L.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],o=o.difference(E),P++}};do J();while(!C);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),Y},d.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,G=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),P;!(v=(P=C.next()).done);v=!0){var V=P.value,Y=f(V,2),J=Y[0],D=Y[1],tt=o.cy.getElementById(J);if(tt){var n=tt.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;m<c&&(c=m),p>h&&(h=p),E<T&&(T=E),y>g&&(g=y)}}}catch(x){L=!0,G=x}finally{try{!v&&C.return&&C.return()}finally{if(L)throw G}}var I=t.x-(h+c)/2,w=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],z=q.getRect().x,X=q.getRect().x+q.getRect().width,rt=q.getRect().y,B=q.getRect().y+q.getRect().height;z<c&&(c=z),X>h&&(h=X),rt<T&&(T=rt),B>g&&(g=B)});var S=t.x-(h+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+S,q.getCenterY()+W)})}}},d.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,G=void 0,C=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,J=0;J<Y;J++){var D=V[J];L=s[c.get(D.id())]-D.width()/2,G=s[c.get(D.id())]+D.width()/2,C=o[c.get(D.id())]-D.height()/2,P=o[c.get(D.id())]+D.height()/2,h>L&&(h=L),T<G&&(T=G),g>C&&(g=C),v<P&&(v=P)}var tt={};return tt.topLeftX=h,tt.topLeftY=g,tt.width=T-h,tt.height=v-g,tt},d.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var h=!1;c.children().forEach(function(T){T.css("display")!="none"&&(h=!0)}),h||o.merge(c)}),o},a.exports=d}),816:((a,e,r)=>{var f=r(548),i=r(140).CoSELayout,d=r(140).CoSENode,t=r(140).layoutBase.PointD,s=r(140).layoutBase.DimensionD,o=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,h=r(140).CoSEConstants,T=function(v,L){var G=v.cy,C=v.eles,P=C.nodes(),V=C.edges(),Y=void 0,J=void 0,D=void 0,tt={};v.randomize&&(Y=L.nodeIndexes,J=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=f.calcParentsWithoutChildren(G,C),E=function W(x,q,z,X){for(var rt=q.length,B=0;B<rt;B++){var O=q[B],H=null;O.intersection(p).length==0&&(H=O.children());var $=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(X.randomize)if(!O.isParent())$=x.add(new d(z.graphManager,new t(J[Y.get(O.id())]-_.w/2,D[Y.get(O.id())]-_.h/2),new s(parseFloat(_.w),parseFloat(_.h))));else{var ht=f.calcBoundingBox(O,J,D,Y);O.intersection(p).length==0?$=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):$=x.add(new d(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(_.w),parseFloat(_.h))))}else $=x.add(new d(z.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new s(parseFloat(_.w),parseFloat(_.h))));else $=x.add(new d(this.graphManager));if($.id=O.data("id"),$.nodeRepulsion=m(X.nodeRepulsion,O),$.paddingLeft=parseInt(O.css("padding")),$.paddingTop=parseInt(O.css("padding")),$.paddingRight=parseInt(O.css("padding")),$.paddingBottom=parseInt(O.css("padding")),X.nodeDimensionsIncludeLabels&&($.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=O.css("text-valign"),$.labelPosHorizontal=O.css("text-halign")),tt[O.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=z.getGraphManager().add(z.newGraph(),$),W(Q,H,z,X)}}},y=function(x,q,z){for(var X=0,rt=0,B=0;B<z.length;B++){var O=z[B],H=tt[O.data("source")],$=tt[O.data("target")];if(H&&$&&H!==$&&H.getEdgesBetween($).length==0){var _=q.add(x.newEdge(),H,$);_.id=O.id(),_.idealLength=m(v.idealEdgeLength,O),_.edgeElasticity=m(v.edgeElasticity,O),X+=_.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(v.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,h.TILE=v.tile,h.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),v.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),v.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,S=w.newGraphManager();return E(S.addRoot(),f.getTopMostNodes(P),w,v),y(w,S,V),I(w,v),w.runLayout(),tt};a.exports={coseLayout:T}}),212:((a,e,r)=>{var f=(function(){function v(L,G){for(var C=0;C<G.length;C++){var P=G[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,G,C){return G&&v(L.prototype,G),C&&v(L,C),L}})();function i(v,L){if(!(v instanceof L))throw new TypeError("Cannot call a class as a function")}var d=r(658),t=r(548),s=r(657),o=s.spectralLayout,c=r(816),h=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function v(L){i(this,v),this.options=d({},T,L)}return f(v,[{key:"run",value:function(){var G=this,C=this.options,P=C.cy,V=C.eles,Y=[],J=[],D=void 0,tt=[];C.fixedNodeConstraint&&(!Array.isArray(C.fixedNodeConstraint)||C.fixedNodeConstraint.length==0)&&(C.fixedNodeConstraint=void 0),C.alignmentConstraint&&(C.alignmentConstraint.vertical&&(!Array.isArray(C.alignmentConstraint.vertical)||C.alignmentConstraint.vertical.length==0)&&(C.alignmentConstraint.vertical=void 0),C.alignmentConstraint.horizontal&&(!Array.isArray(C.alignmentConstraint.horizontal)||C.alignmentConstraint.horizontal.length==0)&&(C.alignmentConstraint.horizontal=void 0)),C.relativePlacementConstraint&&(!Array.isArray(C.relativePlacementConstraint)||C.relativePlacementConstraint.length==0)&&(C.relativePlacementConstraint=void 0);var n=C.fixedNodeConstraint||C.alignmentConstraint||C.relativePlacementConstraint;n&&(C.tile=!1,C.packComponents=!1);var m=void 0,p=!1;if(P.layoutUtilities&&C.packComponents&&(m=P.layoutUtilities("get"),m||(m=P.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(D=t.connectComponents(P,C.eles,I),D.forEach(function(vt){var it=vt.boundingBox();tt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&D.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var w=P.collection();if(C.tile){var S=new Map,W=[],x=[],q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),w.length>1){var rt=w.boundingBox();tt.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),Y.push(z);for(var B=X.length-1;B>=0;B--)D.splice(X[B],1),Y.splice(X[B],1),tt.splice(X[B],1)}}D.forEach(function(vt,it){C.eles=vt,J.push(h(C,Y[it])),t.relocateComponent(tt[it],J[it],C)})}else D.forEach(function(vt,it){t.relocateComponent(tt[it],Y[it],C)});var O=new Set;if(D.length>1){var H=[],$=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(C.quality=="draft"&&(gt=Y[it].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(C.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:Y[it].xCoords[At]-Ot.boundingbox().w/2,y:Y[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else J[it][Ot.id()]&&mt.nodes.push({x:J[it][Ot.id()].getLeft(),y:J[it][Ot.id()].getTop(),width:J[it][Ot.id()].getWidth(),height:J[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(C.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,Y[it].xCoords,Y[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(Y[it].xCoords[Ht]),Pt.push(Y[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[it][Et.id()]&&J[it][Dt.id()]&&mt.edges.push({startX:J[it][Et.id()].getCenterX(),startY:J[it][Et.id()].getCenterY(),endX:J[it][Dt.id()].getCenterX(),endY:J[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var _=m.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),mt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(J[vt]).forEach(function(it){var gt=J[vt][it];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=C.eles.boundingBox();if(tt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?(J.push(h(C,Y[0])),t.relocateComponent(tt[0],J[0],C)):t.relocateComponent(tt[0],Y[0],C)}var Q=function(it,gt){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return J.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),C.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return Y.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(G,C,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();a.exports=g}),657:((a,e,r)=>{var f=r(548),i=r(140).layoutBase.Matrix,d=r(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),g=h.nodes(":parent"),v=new Map,L=new Map,G=new Map,C=[],P=[],V=[],Y=[],J=[],D=[],tt=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,S=void 0,W=function(){for(var U=0,k=0,K=!1;k<S;){U=Math.floor(Math.random()*m),K=!1;for(var Z=0;Z<k;Z++)if(Y[Z]==U){K=!0;break}if(!K)Y[k]=U,k++;else continue}},x=function(U,k,K){for(var Z=[],at=0,ct=0,nt=0,et=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(Z[ct]=U,j[U]=0;ct>=at;){nt=Z[at++];for(var xt=C[nt],lt=0;lt<xt.length;lt++)et=L.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,Z[++ct]=et);D[nt][k]=j[nt]*w}if(K){for(var ot=0;ot<m;ot++)D[ot][k]<J[ot]&&(J[ot]=D[ot][k]);for(var Lt=0;Lt<m;Lt++)J[Lt]>ut&&(ut=J[Lt],wt=Lt)}return wt},q=function(U){var k=void 0;if(U){k=Math.floor(Math.random()*m);for(var Z=0;Z<m;Z++)J[Z]=p;for(var at=0;at<S;at++)Y[at]=k,k=x(k,at,U)}else{W();for(var K=0;K<S;K++)x(Y[K],K,U)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<S;nt++)D[ct][nt]*=D[ct][nt];for(var et=0;et<S;et++)tt[et]=[];for(var j=0;j<S;j++)for(var ut=0;ut<S;ut++)tt[j][ut]=D[Y[ut]][j]},z=function(){for(var U=d.svd(tt),k=U.S,K=U.U,Z=U.V,at=k[0]*k[0]*k[0],ct=[],nt=0;nt<S;nt++){ct[nt]=[];for(var et=0;et<S;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=k[nt]/(k[nt]*k[nt]+at/(k[nt]*k[nt])))}n=i.multMat(i.multMat(Z,ct),i.transpose(K))},X=function(){for(var U=void 0,k=void 0,K=[],Z=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),Z[nt]=Math.random();K=i.normalize(K),Z=i.normalize(Z);for(var et=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=i.multGamma(i.multL(i.multGamma(at),D,n)),U=i.dotProduct(at,K),K=i.normalize(K),et=i.dotProduct(at,K),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=Z[xt];if(ct=i.minusOp(ct,i.multCons(at,i.dotProduct(at,ct))),Z=i.multGamma(i.multL(i.multGamma(ct),D,n)),k=i.dotProduct(ct,Z),Z=i.normalize(Z),et=i.dotProduct(ct,Z),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var lt=0;lt<m;lt++)ct[lt]=Z[lt];P=i.multCons(at,Math.sqrt(Math.abs(U))),V=i.multCons(ct,Math.sqrt(Math.abs(k)))};f.connectComponents(c,h,f.getTopMostNodes(T),v),g.forEach(function(F){f.connectComponents(c,h,f.getTopMostNodes(F.descendants().intersection(h)),v)});for(var rt=0,B=0;B<T.length;B++)T[B].isParent()||L.set(T[B].id(),rt++);var O=!0,H=!1,$=void 0;try{for(var _=v.keys()[Symbol.iterator](),ht;!(O=(ht=_.next()).done);O=!0){var Q=ht.value;L.set(Q,rt++)}}catch(F){H=!0,$=F}finally{try{!O&&_.return&&_.return()}finally{if(H)throw $}}for(var It=0;It<L.size;It++)C[It]=[];g.forEach(function(F){for(var U=F.children().intersection(h);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(h);var k=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,k=at)}),G.set(F.id(),U.nodes(":childless")[k].id())}),T.forEach(function(F){var U=void 0;F.isParent()?U=L.get(G.get(F.id())):U=L.get(F.id()),F.neighborhood().nodes().forEach(function(k){h.intersection(F.edgesWith(k)).length>0&&(k.isParent()?C[U].push(G.get(k.id())):C[U].push(k.id()))})});var Nt=function(U){var k=L.get(U),K=void 0;v.get(U).forEach(function(Z){c.getElementById(Z).isParent()?K=G.get(Z):K=Z,C[k].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=L.size;var Et=void 0;if(m>2){S=m<o.sampleSize?m:o.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(q(I),z(),X(),Et={nodeIndexes:L,xCoords:P,yCoords:V}):(L.forEach(function(F,U){P.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),Et={nodeIndexes:L,xCoords:P,yCoords:V}),Et}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),V.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Pt.y)}return Et={nodeIndexes:L,xCoords:P,yCoords:V},Et}};a.exports={spectralLayout:t}}),579:((a,e,r)=>{var f=r(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&i(cytoscape),a.exports=i}),140:(a=>{a.exports=A})},N={};function u(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return b[a](r,r.exports,u),r.exports}var l=u(579);return l})()})})(he)),he.exports}var Er=yr();const mr=ke(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:dt(R=>`${R},${R/2} 0,${R} 0,0`,"L"),R:dt(R=>`0,${R/2} ${R},0 ${R},${R}`,"R"),T:dt(R=>`0,0 ${R},0 ${R/2},${R}`,"T"),B:dt(R=>`${R/2},0 ${R},${R} 0,${R}`,"B")},se={L:dt((R,M)=>R-M+2,"L"),R:dt((R,M)=>R-2,"R"),T:dt((R,M)=>R-M+2,"T"),B:dt((R,M)=>R-2,"B")},Tr=dt(function(R){return Wt(R)?R==="L"?"R":"L":R==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=dt(function(R){const M=R;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=dt(function(R){const M=R;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=dt(function(R){const M=R;return M==="T"||M==="B"},"isArchitectureDirectionY"),Te=dt(function(R,M){const A=Wt(R)&&qt(M),b=qt(R)&&Wt(M);return A||b},"isArchitectureDirectionXY"),Nr=dt(function(R){const M=R[0],A=R[1],b=Wt(M)&&qt(A),N=qt(M)&&Wt(A);return b||N},"isArchitecturePairXY"),Lr=dt(function(R){return R!=="LL"&&R!=="RR"&&R!=="TT"&&R!=="BB"},"isValidArchitectureDirectionPair"),ye=dt(function(R,M){const A=`${R}${M}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=dt(function([R,M],A){const b=A[0],N=A[1];return Wt(b)?qt(N)?[R+(b==="L"?-1:1),M+(N==="T"?1:-1)]:[R+(b==="L"?-1:1),M]:Wt(N)?[R+(N==="L"?1:-1),M+(b==="T"?1:-1)]:[R,M+(b==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ar=dt(function(R){return R==="LT"||R==="TL"?[1,1]:R==="BL"||R==="LB"?[1,-1]:R==="BR"||R==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=dt(function(R,M){return Te(R,M)?"bend":Wt(R)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(R){return R.type==="service"},"isArchitectureService"),Or=dt(function(R){return R.type==="junction"},"isArchitectureJunction"),be=dt(R=>R.data(),"edgeData"),ie=dt(R=>R.data(),"nodeData"),Dr=ar.architecture,ae,Pe=(ae=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:M,icon:A,in:b,title:N,iconText:u}){if(this.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The service [${M}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[b]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"service",icon:A,iconText:u,title:N,edges:[],in:b}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:M,in:A}){if(this.registeredIds[M]!==void 0)throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds[M]}`);if(A!==void 0){if(M===A)throw new Error(`The junction [${M}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[A]==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(M){return this.nodes[M]??null}addGroup({id:M,icon:A,in:b,title:N}){var u,l,a;if(((u=this.registeredIds)==null?void 0:u[M])!==void 0)throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The group [${M}] cannot be placed within itself`);if(((l=this.registeredIds)==null?void 0:l[b])===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(((a=this.registeredIds)==null?void 0:a[b])==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds[M]="group",this.groups[M]={id:M,icon:A,title:N,in:b}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:M,rhsId:A,lhsDir:b,rhsDir:N,lhsInto:u,rhsInto:l,lhsGroup:a,rhsGroup:e,title:r}){if(!Re(b))throw new Error(`Invalid direction given for left hand side of edge ${M}--${A}. Expected (L,R,T,B) got ${String(b)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${A}. Expected (L,R,T,B) got ${String(N)}`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[A]===void 0&&this.groups[A]===void 0)throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[M].in,i=this.nodes[A].in;if(a&&f&&i&&f==i)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&i&&f==i)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:M,lhsDir:b,lhsInto:u,lhsGroup:a,rhsId:A,rhsDir:N,rhsInto:l,rhsGroup:e,title:r};this.edges.push(d),this.nodes[M]&&this.nodes[A]&&(this.nodes[M].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const M={},A=Object.entries(this.nodes).reduce((e,[r,f])=>(e[r]=f.edges.reduce((i,d)=>{var o,c;const t=(o=this.getNode(d.lhsId))==null?void 0:o.in,s=(c=this.getNode(d.rhsId))==null?void 0:c.in;if(t&&s&&t!==s){const h=wr(d.lhsDir,d.rhsDir);h!=="bend"&&(M[t]??(M[t]={}),M[t][s]=h,M[s]??(M[s]={}),M[s][t]=h)}if(d.lhsId===r){const h=ye(d.lhsDir,d.rhsDir);h&&(i[h]=d.rhsId)}else{const h=ye(d.rhsDir,d.lhsDir);h&&(i[h]=d.lhsId)}return i},{}),e),{}),b=Object.keys(A)[0],N={[b]:1},u=Object.keys(A).reduce((e,r)=>r===b?e:{...e,[r]:1},{}),l=dt(e=>{const r={[e]:[0,0]},f=[e];for(;f.length>0;){const i=f.shift();if(i){N[i]=1,delete u[i];const d=A[i],[t,s]=r[i];Object.entries(d).forEach(([o,c])=>{N[c]||(r[c]=Cr([t,s],o),f.push(c))})}}return r},"BFS"),a=[l(b)];for(;Object.keys(u).length>0;)a.push(l(Object.keys(u)[0]));this.dataStructures={adjList:A,spatialMaps:a,groupAlignments:M}}return this.dataStructures}setElementForId(M,A){this.elements[M]=A}getElementById(M){return this.elements[M]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(M){return this.getConfig()[M]}},dt(ae,"ArchitectureDB"),ae),xr=dt((R,M)=>{fr(R,M),R.groups.map(A=>M.addGroup(A)),R.services.map(A=>M.addService({...A,type:"service"})),R.junctions.map(A=>M.addJunction({...A,type:"junction"})),R.edges.map(A=>M.addEdge(A))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async R=>{var b;const M=await cr("architecture",R);Se.debug(M);const A=(b=Ge.parser)==null?void 0:b.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(M,A)},"parse")},Ir=dt(R=>`
2
2
  .edge {
3
3
  stroke-width: ${R.archEdgeWidth};
4
4
  stroke: ${R.archEdgeColor};