@marimo-team/frontend 0.15.1-dev34 → 0.15.1-dev35

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 (113) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-BcJwEN2q.js → ConnectedDataExplorerComponent-BYxPTiA6.js} +1 -1
  2. package/dist/assets/{ImageComparisonComponent-CnwGwcTi.js → ImageComparisonComponent-DBpvpxlw.js} +1 -1
  3. package/dist/assets/{VegaLite-Cnk7Ozer.js → VegaLite-DzkGo9LJ.js} +1 -1
  4. package/dist/assets/{_baseEach-DJPM6ZzY.js → _baseEach-CnK_W3-W.js} +1 -1
  5. package/dist/assets/_baseMap-CIc0IDdl.js +1 -0
  6. package/dist/assets/{_baseUniq-CrXjB6JP.js → _baseUniq-DsEUejTO.js} +1 -1
  7. package/dist/assets/{_createAggregator-Cd0noqMc.js → _createAggregator-xSD3e6yX.js} +1 -1
  8. package/dist/assets/{any-language-editor-ZfVYrHPH.js → any-language-editor-CSLfx3Fo.js} +1 -1
  9. package/dist/assets/{architectureDiagram-KFL7JDKH-DuJCaD_M.js → architectureDiagram-KFL7JDKH-DDJcEe4E.js} +1 -1
  10. package/dist/assets/{blockDiagram-ZYB65J3Q-B0f3bVJ0.js → blockDiagram-ZYB65J3Q-DrajNxU6.js} +1 -1
  11. package/dist/assets/{c4Diagram-AAMF2YG6-3srX8_ui.js → c4Diagram-AAMF2YG6-DkbBAlkB.js} +1 -1
  12. package/dist/assets/channel-D2aPrBH4.js +1 -0
  13. package/dist/assets/{chunk-ANTBXLJU-CD8Ya77t.js → chunk-ANTBXLJU-CyFpCIAD.js} +1 -1
  14. package/dist/assets/{chunk-FHKO5MBM-34L0hhh_.js → chunk-FHKO5MBM-DaRG9EJ9.js} +1 -1
  15. package/dist/assets/{chunk-GLLZNHP4-CRWkmhQj.js → chunk-GLLZNHP4-C852Uilf.js} +1 -1
  16. package/dist/assets/{chunk-JBRWN2VN-CB8a_SQv.js → chunk-JBRWN2VN-DF6c2w7p.js} +1 -1
  17. package/dist/assets/{chunk-LXBSTHXV-YNRk01ob.js → chunk-LXBSTHXV-DJc1jClD.js} +1 -1
  18. package/dist/assets/{chunk-NRVI72HA-nFtyi9pH.js → chunk-NRVI72HA-BYzJjL14.js} +1 -1
  19. package/dist/assets/{chunk-OMD6QJNC-BXZ4Kapq.js → chunk-OMD6QJNC-DpzW6M54.js} +1 -1
  20. package/dist/assets/{chunk-WVR4S24B-ZnYlHppS.js → chunk-WVR4S24B-Ds_Fnulu.js} +1 -1
  21. package/dist/assets/{circle-play-k88jloBa.js → circle-play-ILK7D0lo.js} +1 -1
  22. package/dist/assets/classDiagram-3BZAVTQC-DAUNRz1h.js +1 -0
  23. package/dist/assets/classDiagram-v2-QTMF73CY-DAUNRz1h.js +1 -0
  24. package/dist/assets/clone-CYXehyk_.js +1 -0
  25. package/dist/assets/{compile-CDMtSySK.js → compile-Q6b1NW0Y.js} +1 -1
  26. package/dist/assets/{dagre-2BBEFEWP-Bfm20vyd.js → dagre-2BBEFEWP-DUplj_Iy.js} +1 -1
  27. package/dist/assets/{data-grid-overlay-editor-CwEfDFcK.js → data-grid-overlay-editor-BHVNUwJL.js} +1 -1
  28. package/dist/assets/{diagram-4IRLE6MV-A9psNOWP.js → diagram-4IRLE6MV-CqSPK4-w.js} +1 -1
  29. package/dist/assets/{diagram-GUPCWM2R-B23WLgai.js → diagram-GUPCWM2R-Yz9pe62o.js} +1 -1
  30. package/dist/assets/{diagram-RP2FKANI-CU5qL55k.js → diagram-RP2FKANI-DAvv4Av_.js} +1 -1
  31. package/dist/assets/{edit-page-DYm-s1ff.js → edit-page-hlKtRc6p.js} +4 -4
  32. package/dist/assets/{erDiagram-HZWUO2LU-D31RvIVf.js → erDiagram-HZWUO2LU-BIlDOHrw.js} +1 -1
  33. package/dist/assets/{flowDiagram-THRYKUMA-ClYGAL8Y.js → flowDiagram-THRYKUMA-w6HYIjcR.js} +1 -1
  34. package/dist/assets/{ganttDiagram-WV7ZQ7D5-Cmed9KL9.js → ganttDiagram-WV7ZQ7D5-CS1t__7-.js} +1 -1
  35. package/dist/assets/{gitGraphDiagram-OJR772UL-CWvdnGVc.js → gitGraphDiagram-OJR772UL-DCcukZnI.js} +1 -1
  36. package/dist/assets/{glide-data-editor-CFVz2aZ5.js → glide-data-editor-BoQ4MEIu.js} +4 -4
  37. package/dist/assets/{graph-OxTx0_rA.js → graph-DzywueYf.js} +1 -1
  38. package/dist/assets/{home-page-Dt3nnRSz.js → home-page-CTLf7o0o.js} +1 -1
  39. package/dist/assets/{index-D4HfKv3U.js → index-B8egTd_Y.js} +1 -1
  40. package/dist/assets/{index-DjT-1R5N.js → index-BNpIaqHq.js} +1 -1
  41. package/dist/assets/{index-BM1NAxco.js → index-BNuSEPHf.js} +1 -1
  42. package/dist/assets/{index-BOFl7de8.js → index-BOaSI40H.js} +1 -1
  43. package/dist/assets/{index-DLO62gfd.js → index-BVdia1-T.js} +1 -1
  44. package/dist/assets/{index-Baw8vWOg.js → index-BbrvgVGd.js} +1 -1
  45. package/dist/assets/{index-KCIhgRrL.js → index-BobSdMcV.js} +1 -1
  46. package/dist/assets/{index-BLXqwIOX.js → index-BsZupkBE.js} +1 -1
  47. package/dist/assets/{index-C0Q8e5FM.js → index-CTTXrsVd.js} +1 -1
  48. package/dist/assets/{index-Bd2C9zUZ.js → index-C_ZOWmXX.js} +1 -1
  49. package/dist/assets/{index-WltWzc1Z.js → index-CjvmeMRd.js} +1 -1
  50. package/dist/assets/{index-quG0To4_.js → index-DMgZFfTJ.js} +1 -1
  51. package/dist/assets/{index-CQFSXxPp.js → index-DMvScaq6.js} +133 -133
  52. package/dist/assets/{index-DsWckHTg.js → index-DNjb9MyH.js} +1 -1
  53. package/dist/assets/{index-DETsDEp1.js → index-DUumP-lt.js} +1 -1
  54. package/dist/assets/{index-4GKIL9qL.js → index-Dl6_NSX4.js} +1 -1
  55. package/dist/assets/{index-B-P7QUhF.js → index-DsMyERcC.js} +1 -1
  56. package/dist/assets/{index-DHlxJ27b.js → index-EaCZDGUn.js} +1 -1
  57. package/dist/assets/{index-BUwTI3go.js → index-gZP0fYKG.js} +1 -1
  58. package/dist/assets/{index-Bu3XvTHk.js → index-txir7kB2.js} +1 -1
  59. package/dist/assets/infoDiagram-6WOFNB3A-B1zwcYam.js +2 -0
  60. package/dist/assets/{journeyDiagram-FFXJYRFH-BLEcUGJo.js → journeyDiagram-FFXJYRFH-IwybgEnB.js} +1 -1
  61. package/dist/assets/{kanban-definition-KOZQBZVT-RanT6u8e.js → kanban-definition-KOZQBZVT-BnLxznwF.js} +1 -1
  62. package/dist/assets/{layout-D4n_CEl8.js → layout-lIKJEEeS.js} +1 -1
  63. package/dist/assets/{linear-BbPKk0w3.js → linear-DzfVWjvh.js} +1 -1
  64. package/dist/assets/{links-B7_BzQLv.js → links-yIZ6advT.js} +1 -1
  65. package/dist/assets/{mermaid-CUkYs7pX.js → mermaid-CEpdDmik.js} +4 -4
  66. package/dist/assets/{min-Yuyj_o4k.js → min-CH9RTxJs.js} +1 -1
  67. package/dist/assets/{mindmap-definition-LNHGMQRG-x4MjCJ_j.js → mindmap-definition-LNHGMQRG-BGOBqdZQ.js} +1 -1
  68. package/dist/assets/{number-overlay-editor-DeKR_mfB.js → number-overlay-editor-Bp8EEFG4.js} +1 -1
  69. package/dist/assets/{pieDiagram-DBDJKBY4-ZOMhJp-a.js → pieDiagram-DBDJKBY4-BH18DMec.js} +1 -1
  70. package/dist/assets/{quadrantDiagram-YPSRARAO-vZeyiYxN.js → quadrantDiagram-YPSRARAO-DyEaA3Tj.js} +1 -1
  71. package/dist/assets/{react-plotly-BV6-1ruP.js → react-plotly-BWJyJ31U.js} +1 -1
  72. package/dist/assets/{requirementDiagram-EGVEC5DT-DkgbH0oi.js → requirementDiagram-EGVEC5DT-BIDYwWds.js} +1 -1
  73. package/dist/assets/{run-page-0slxHZwl.js → run-page-CFGHZjjp.js} +1 -1
  74. package/dist/assets/{sankeyDiagram-HRAUVNP4-BuFPw2i8.js → sankeyDiagram-HRAUVNP4-CI7WE82z.js} +1 -1
  75. package/dist/assets/{sequenceDiagram-WFGC7UMF-BKGIaix6.js → sequenceDiagram-WFGC7UMF-CAt5_R3a.js} +1 -1
  76. package/dist/assets/{slides-component-DYhLRND3.js → slides-component-BE3m7wod.js} +1 -1
  77. package/dist/assets/{sortBy-C_bWmRoh.js → sortBy-D8wYLA9x.js} +1 -1
  78. package/dist/assets/{stateDiagram-UUKSUZ4H-Cm2zkw0M.js → stateDiagram-UUKSUZ4H-B9ghWYn7.js} +1 -1
  79. package/dist/assets/stateDiagram-v2-EYPG3UTE-DtL7XYtB.js +1 -0
  80. package/dist/assets/{storage-Dk-ciwQU.js → storage-BseyfFaj.js} +3 -3
  81. package/dist/assets/{terminal-DrDWxiEU.js → terminal-R2SnqHO_.js} +1 -1
  82. package/dist/assets/{time-DW3BCgky.js → time-CftJc27E.js} +1 -1
  83. package/dist/assets/{timeline-definition-3HZDQTIS-B_ZdpuLp.js → timeline-definition-3HZDQTIS-B8ej5Uev.js} +1 -1
  84. package/dist/assets/{tracing-BuGDnWcg.js → tracing-OU6KdAjg.js} +2 -2
  85. package/dist/assets/{trash-BKmRbRfw.js → trash-BX0buH-6.js} +1 -1
  86. package/dist/assets/{treemap-75Q7IDZK-BBbbCdps.js → treemap-75Q7IDZK-C6t8vi8s.js} +1 -1
  87. package/dist/assets/{vega-component-DogOWa6S.js → vega-component-a-Wve7v1.js} +1 -1
  88. package/dist/assets/{xychartDiagram-FDP5SA34-3B1j_9pq.js → xychartDiagram-FDP5SA34-DmTMju1m.js} +1 -1
  89. package/dist/index.html +1 -1
  90. package/package.json +1 -1
  91. package/src/__mocks__/notebook.ts +108 -0
  92. package/src/components/editor/ai/__tests__/completion-utils.test.ts +119 -139
  93. package/src/components/editor/ai/completion-utils.ts +7 -33
  94. package/src/core/ai/context/__tests__/registry.test.ts +154 -0
  95. package/src/core/ai/context/__tests__/utils.test.ts +174 -0
  96. package/src/core/ai/context/context.ts +3 -1
  97. package/src/core/ai/context/providers/__tests__/__snapshots__/error.test.ts.snap +3 -0
  98. package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +8 -12
  99. package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +4 -20
  100. package/src/core/ai/context/providers/__tests__/error.test.ts +328 -0
  101. package/src/core/ai/context/providers/common.ts +1 -0
  102. package/src/core/ai/context/providers/error.ts +165 -0
  103. package/src/core/ai/context/providers/tables.ts +14 -6
  104. package/src/core/ai/context/providers/variable.ts +11 -2
  105. package/src/core/ai/context/utils.ts +49 -0
  106. package/src/core/cells/cells.ts +1 -1
  107. package/dist/assets/_baseMap-u5TY8JMW.js +0 -1
  108. package/dist/assets/channel-BIZI32eZ.js +0 -1
  109. package/dist/assets/classDiagram-3BZAVTQC-DfPpF-gd.js +0 -1
  110. package/dist/assets/classDiagram-v2-QTMF73CY-DfPpF-gd.js +0 -1
  111. package/dist/assets/clone-yHYNh3QG.js +0 -1
  112. package/dist/assets/infoDiagram-6WOFNB3A-BQOY1VMN.js +0 -2
  113. package/dist/assets/stateDiagram-v2-EYPG3UTE-DX5NRIHK.js +0 -1
@@ -1,4 +1,4 @@
1
- var Qt;import{_ as nt,I as ze,T as Ve,l as ye,b as We,a as Be,p as je,q as qe,g as $e,s as Ze,y as Qe,E as Je,F as Ke,G as tn,c as se,a4 as ae,am as he,h as en,an as nn,ao as rn}from"./mermaid-CUkYs7pX.js";import{p as on}from"./chunk-ANTBXLJU-CD8Ya77t.js";import{p as sn}from"./treemap-75Q7IDZK-BBbbCdps.js";import{c as Ee}from"./cytoscape.esm-UcEO6FGL.js";import{z as an}from"./index-CQFSXxPp.js";import{s as hn}from"./transform-B8bpuzxV.js";import"./step-BwsUM5iJ.js";import"./_baseEach-DJPM6ZzY.js";import"./_baseUniq-CrXjB6JP.js";import"./min-Yuyj_o4k.js";import"./_baseMap-u5TY8JMW.js";import"./clone-yHYNh3QG.js";import"./_createAggregator-Cd0noqMc.js";import"./timer-BwIYMJWC.js";var Ne,Te={exports:{}},Ae={exports:{}},we={exports:{}};function ln(){return Ne?we.exports:(Ne=1,C=function(){return function(T){var L={};function E(d){if(L[d])return L[d].exports;var r=L[d]={i:d,l:!1,exports:{}};return T[d].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=T,E.c=L,E.i=function(d){return d},E.d=function(d,r,a){E.o(d,r)||Object.defineProperty(d,r,{configurable:!1,enumerable:!0,get:a})},E.n=function(d){var r=d&&d.__esModule?function(){return d.default}:function(){return d};return E.d(r,"a",r),r},E.o=function(d,r){return Object.prototype.hasOwnProperty.call(d,r)},E.p="",E(E.s=28)}([function(T,L,E){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,T.exports=d},function(T,L,E){var d=E(2),r=E(8),a=E(9);function e(i,o,t){d.call(this,t),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=t,this.bendpoints=[],this.source=i,this.target=o}for(var n in e.prototype=Object.create(d.prototype),d)e[n]=d[n];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(i){if(this.source===i)return this.target;if(this.target===i)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(i,o){for(var t=this.getOtherEnd(i),h=o.getGraphManager().getRoot();;){if(t.getOwner()==o)return t;if(t.getOwner()==h)break;t=t.getOwner().getParent()}return null},e.prototype.updateLength=function(){var i=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),i),this.isOverlapingSourceAndTarget||(this.lengthX=i[0]-i[2],this.lengthY=i[1]-i[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)},T.exports=e},function(T,L,E){T.exports=function(d){this.vGraphObject=d}},function(T,L,E){var d=E(2),r=E(10),a=E(13),e=E(0),n=E(16),i=E(5);function o(h,g,c,l){c==null&&l==null&&(l=g),d.call(this,l),h.graphManager!=null&&(h=h.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=h,this.rect=c!=null&&g!=null?new a(g.x,g.y,c.width,c.height):new a}for(var t in o.prototype=Object.create(d.prototype),d)o[t]=d[t];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(h){this.rect.width=h},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(h){this.rect.height=h},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(h,g){this.rect.x=h.x,this.rect.y=h.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(h,g){this.rect.x=h-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(h,g){this.rect.x=h,this.rect.y=g},o.prototype.moveBy=function(h,g){this.rect.x+=h,this.rect.y+=g},o.prototype.getEdgeListToNode=function(h){var g=[],c=this;return c.edges.forEach(function(l){if(l.target==h){if(l.source!=c)throw"Incorrect edge source!";g.push(l)}}),g},o.prototype.getEdgesBetween=function(h){var g=[],c=this;return c.edges.forEach(function(l){if(l.source!=c&&l.target!=c)throw"Incorrect edge source and/or target";l.target!=h&&l.source!=h||g.push(l)}),g},o.prototype.getNeighborsList=function(){var h=new Set,g=this;return g.edges.forEach(function(c){if(c.source==g)h.add(c.target);else{if(c.target!=g)throw"Incorrect incidency!";h.add(c.source)}}),h},o.prototype.withChildren=function(){var h=new Set;if(h.add(this),this.child!=null)for(var g=this.child.getNodes(),c=0;c<g.length;c++)g[c].withChildren().forEach(function(l){h.add(l)});return h},o.prototype.getNoOfChildren=function(){var h=0;if(this.child==null)h=1;else for(var g=this.child.getNodes(),c=0;c<g.length;c++)h+=g[c].getNoOfChildren();return h==0&&(h=1),h},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.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)},o.prototype.scatter=function(){var h,g,c=-e.INITIAL_WORLD_BOUNDARY,l=e.INITIAL_WORLD_BOUNDARY;h=e.WORLD_CENTER_X+n.nextDouble()*(l-c)+c;var y=-e.INITIAL_WORLD_BOUNDARY,v=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+n.nextDouble()*(v-y)+y,this.rect.x=h,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var h=this.getChild();if(h.updateBounds(!0),this.rect.x=h.getLeft(),this.rect.y=h.getTop(),this.setWidth(h.getRight()-h.getLeft()),this.setHeight(h.getBottom()-h.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=h.getRight()-h.getLeft(),c=h.getBottom()-h.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(g+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>g?(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(g+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>c?(this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(c+this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(h){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var c=this.rect.y;c>e.WORLD_BOUNDARY?c=e.WORLD_BOUNDARY:c<-e.WORLD_BOUNDARY&&(c=-e.WORLD_BOUNDARY);var l=new i(g,c),y=h.inverseTransformPoint(l);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},T.exports=o},function(T,L,E){var d=E(0);function r(){}for(var a in d)r[a]=d[a];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,T.exports=r},function(T,L,E){function d(r,a){r==null&&a==null?(this.x=0,this.y=0):(this.x=r,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(r){this.x=r},d.prototype.setY=function(r){this.y=r},d.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},T.exports=d},function(T,L,E){var d=E(2),r=E(10),a=E(0),e=E(7),n=E(3),i=E(1),o=E(13),t=E(12),h=E(11);function g(l,y,v){d.call(this,v),this.estimatedSize=r.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=l,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var c in g.prototype=Object.create(d.prototype),d)g[c]=d[c];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(l,y,v){if(y==null&&v==null){var N=l;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(N)>-1)throw"Node already in graph!";return N.owner=this,this.getNodes().push(N),N}var A=l;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(y.owner!=v.owner||y.owner!=this)throw"Both owners must be this graph!";return y.owner!=v.owner?null:(A.source=y,A.target=v,A.isInterGraph=!1,this.getEdges().push(A),y.edges.push(A),v!=y&&v.edges.push(A),A)},g.prototype.remove=function(l){var y=l;if(l instanceof n){if(y==null)throw"Node is null!";if(y.owner==null||y.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),N=v.length,A=0;A<N;A++)(M=v[A]).isInterGraph?this.graphManager.remove(M):M.source.owner.remove(M);if((P=this.nodes.indexOf(y))==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(l instanceof i){var M;if((M=l)==null)throw"Edge is null!";if(M.source==null||M.target==null)throw"Source and/or target is null!";if(M.source.owner==null||M.target.owner==null||M.source.owner!=this||M.target.owner!=this)throw"Source and/or target owner is invalid!";var P,b=M.source.edges.indexOf(M),Y=M.target.edges.indexOf(M);if(!(b>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";if(M.source.edges.splice(b,1),M.target!=M.source&&M.target.edges.splice(Y,1),(P=M.source.owner.getEdges().indexOf(M))==-1)throw"Not in owner's edge list!";M.source.owner.getEdges().splice(P,1)}},g.prototype.updateLeftTop=function(){for(var l,y,v,N=r.MAX_VALUE,A=r.MAX_VALUE,M=this.getNodes(),P=M.length,b=0;b<P;b++){var Y=M[b];N>(l=Y.getTop())&&(N=l),A>(y=Y.getLeft())&&(A=y)}return N==r.MAX_VALUE?null:(v=M[0].getParent().paddingLeft!=null?M[0].getParent().paddingLeft:this.margin,this.left=A-v,this.top=N-v,new t(this.left,this.top))},g.prototype.updateBounds=function(l){for(var y,v,N,A,M,P=r.MAX_VALUE,b=-r.MAX_VALUE,Y=r.MAX_VALUE,H=-r.MAX_VALUE,q=this.nodes,_=q.length,B=0;B<_;B++){var s=q[B];l&&s.child!=null&&s.updateBounds(),P>(y=s.getLeft())&&(P=y),b<(v=s.getRight())&&(b=v),Y>(N=s.getTop())&&(Y=N),H<(A=s.getBottom())&&(H=A)}var m=new o(P,Y,b-P,H-Y);P==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),M=q[0].getParent().paddingLeft!=null?q[0].getParent().paddingLeft:this.margin,this.left=m.x-M,this.right=m.x+m.width+M,this.top=m.y-M,this.bottom=m.y+m.height+M},g.calculateBounds=function(l){for(var y,v,N,A,M=r.MAX_VALUE,P=-r.MAX_VALUE,b=r.MAX_VALUE,Y=-r.MAX_VALUE,H=l.length,q=0;q<H;q++){var _=l[q];M>(y=_.getLeft())&&(M=y),P<(v=_.getRight())&&(P=v),b>(N=_.getTop())&&(b=N),Y<(A=_.getBottom())&&(Y=A)}return new o(M,b,P-M,Y-b)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var l=0,y=this.nodes,v=y.length,N=0;N<v;N++)l+=y[N].calcEstimatedSize();return this.estimatedSize=l==0?a.EMPTY_COMPOUND_NODE_SIZE:l/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var l=this;if(this.nodes.length!=0){var y,v,N=new h,A=new Set,M=this.nodes[0];for(M.withChildren().forEach(function(H){N.push(H),A.add(H)});N.length!==0;)for(var P=(y=(M=N.shift()).getEdges()).length,b=0;b<P;b++)(v=y[b].getOtherEndInGraph(M,this))==null||A.has(v)||v.withChildren().forEach(function(H){N.push(H),A.add(H)});if(this.isConnected=!1,A.size>=this.nodes.length){var Y=0;A.forEach(function(H){H.owner==l&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},T.exports=g},function(T,L,E){var d,r=E(1);function a(e){d=E(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),n=this.layout.newNode(null),i=this.add(e,n);return this.setRootGraph(i),this.rootGraph},a.prototype.add=function(e,n,i,o,t){if(i==null&&o==null&&t==null){if(e==null)throw"Graph is null!";if(n==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(n.child!=null)throw"Already has a child!";return e.parent=n,n.child=e,e}t=i,i=e;var h=(o=n).getOwner(),g=t.getOwner();if(h==null||h.getGraphManager()!=this)throw"Source not in this graph mgr!";if(g==null||g.getGraphManager()!=this)throw"Target not in this graph mgr!";if(h==g)return i.isInterGraph=!1,h.add(i,o,t);if(i.isInterGraph=!0,i.source=o,i.target=t,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),i.source==null||i.target==null)throw"Edge source and/or target is null!";if(i.source.edges.indexOf(i)!=-1||i.target.edges.indexOf(i)!=-1)throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},a.prototype.remove=function(e){if(e instanceof d){var n=e;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],t=(o=o.concat(n.getEdges())).length,h=0;h<t;h++)i=o[h],n.remove(i);var g,c=[];for(t=(c=c.concat(n.getNodes())).length,h=0;h<t;h++)g=c[h],n.remove(g);n==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(n);this.graphs.splice(l,1),n.parent=null}else if(e instanceof r){if((i=e)==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!";if(l=i.source.edges.indexOf(i),i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,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!";l=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(l,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=[],n=this.getGraphs(),i=n.length,o=0;o<i;o++)e=e.concat(n[o].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=[],n=this.getGraphs();n.length;for(var i=0;i<n.length;i++)e=e.concat(n[i].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,n){if(e==null||n==null)throw"assert failed";if(e==n)return!0;for(var i,o=e.getOwner();(i=o.getParent())!=null;){if(i==n)return!0;if((o=i.getOwner())==null)break}for(o=n.getOwner();(i=o.getParent())!=null;){if(i==e)return!0;if((o=i.getOwner())==null)break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,n,i,o,t,h=this.getAllEdges(),g=h.length,c=0;c<g;c++)if(n=(e=h[c]).source,i=e.target,e.lca=null,e.sourceInLca=n,e.targetInLca=i,n!=i){for(o=n.getOwner();e.lca==null;){for(e.targetInLca=i,t=i.getOwner();e.lca==null;){if(t==o){e.lca=t;break}if(t==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=t.getParent(),t=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca==null&&(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}else e.lca=n.getOwner()},a.prototype.calcLowestCommonAncestor=function(e,n){if(e==n)return e.getOwner();for(var i=e.getOwner();i!=null;){for(var o=n.getOwner();o!=null;){if(o==i)return o;o=o.getParent().getOwner()}i=i.getParent().getOwner()}return i},a.prototype.calcInclusionTreeDepths=function(e,n){var i;e==null&&n==null&&(e=this.rootGraph,n=1);for(var o=e.getNodes(),t=o.length,h=0;h<t;h++)(i=o[h]).inclusionTreeDepth=n,i.child!=null&&this.calcInclusionTreeDepths(i.child,n+1)},a.prototype.includesInvalidEdge=function(){for(var e,n=[],i=this.edges.length,o=0;o<i;o++)e=this.edges[o],this.isOneAncestorOfOther(e.source,e.target)&&n.push(e);for(o=0;o<n.length;o++)this.remove(n[o]);return!1},T.exports=a},function(T,L,E){var d=E(12);function r(){}r.calcSeparationAmount=function(a,e,n,i){if(!a.intersects(e))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,o),n[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),n[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?n[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var t=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(t=1);var h=t*n[0],g=n[1]/t;n[0]<g?g=n[0]:h=n[1],n[0]=-1*o[0]*(g/2+i),n[1]=-1*o[1]*(h/2+i)},r.decideDirectionsForOverlappingNodes=function(a,e,n){a.getCenterX()<e.getCenterX()?n[0]=-1:n[0]=1,a.getCenterY()<e.getCenterY()?n[1]=-1:n[1]=1},r.getIntersection2=function(a,e,n){var i=a.getCenterX(),o=a.getCenterY(),t=e.getCenterX(),h=e.getCenterY();if(a.intersects(e))return n[0]=i,n[1]=o,n[2]=t,n[3]=h,!0;var g=a.getX(),c=a.getY(),l=a.getRight(),y=a.getX(),v=a.getBottom(),N=a.getRight(),A=a.getWidthHalf(),M=a.getHeightHalf(),P=e.getX(),b=e.getY(),Y=e.getRight(),H=e.getX(),q=e.getBottom(),_=e.getRight(),B=e.getWidthHalf(),s=e.getHeightHalf(),m=!1,u=!1;if(i===t){if(o>h)return n[0]=i,n[1]=c,n[2]=t,n[3]=q,!1;if(o<h)return n[0]=i,n[1]=v,n[2]=t,n[3]=b,!1}else if(o===h){if(i>t)return n[0]=g,n[1]=o,n[2]=Y,n[3]=h,!1;if(i<t)return n[0]=l,n[1]=o,n[2]=P,n[3]=h,!1}else{var p=a.height/a.width,f=e.height/e.width,w=(h-o)/(t-i),I=void 0,x=void 0,F=void 0,G=void 0,S=void 0,D=void 0;if(-p===w?i>t?(n[0]=y,n[1]=v,m=!0):(n[0]=l,n[1]=c,m=!0):p===w&&(i>t?(n[0]=g,n[1]=c,m=!0):(n[0]=N,n[1]=v,m=!0)),-f===w?t>i?(n[2]=H,n[3]=q,u=!0):(n[2]=Y,n[3]=b,u=!0):f===w&&(t>i?(n[2]=P,n[3]=b,u=!0):(n[2]=_,n[3]=q,u=!0)),m&&u)return!1;if(i>t?o>h?(I=this.getCardinalDirection(p,w,4),x=this.getCardinalDirection(f,w,2)):(I=this.getCardinalDirection(-p,w,3),x=this.getCardinalDirection(-f,w,1)):o>h?(I=this.getCardinalDirection(-p,w,1),x=this.getCardinalDirection(-f,w,3)):(I=this.getCardinalDirection(p,w,2),x=this.getCardinalDirection(f,w,4)),!m)switch(I){case 1:G=c,F=i+-M/w,n[0]=F,n[1]=G;break;case 2:F=N,G=o+A*w,n[0]=F,n[1]=G;break;case 3:G=v,F=i+M/w,n[0]=F,n[1]=G;break;case 4:F=y,G=o+-A*w,n[0]=F,n[1]=G}if(!u)switch(x){case 1:D=b,S=t+-s/w,n[2]=S,n[3]=D;break;case 2:S=_,D=h+B*w,n[2]=S,n[3]=D;break;case 3:D=q,S=t+s/w,n[2]=S,n[3]=D;break;case 4:S=H,D=h+-B*w,n[2]=S,n[3]=D}}return!1},r.getCardinalDirection=function(a,e,n){return a>e?n:1+n%4},r.getIntersection=function(a,e,n,i){if(i==null)return this.getIntersection2(a,e,n);var o,t,h,g,c,l,y,v=a.x,N=a.y,A=e.x,M=e.y,P=n.x,b=n.y,Y=i.x,H=i.y;return(y=(o=M-N)*(g=P-Y)-(t=H-b)*(h=v-A))===0?null:new d((h*(l=Y*b-P*H)-g*(c=A*N-v*M))/y,(t*c-o*l)/y)},r.angleOfVector=function(a,e,n,i){var o=void 0;return a!==n?(o=Math.atan((i-e)/(n-a)),n<a?o+=Math.PI:i<e&&(o+=this.TWO_PI)):o=i<e?this.ONE_AND_HALF_PI:this.HALF_PI,o},r.doIntersect=function(a,e,n,i){var o=a.x,t=a.y,h=e.x,g=e.y,c=n.x,l=n.y,y=i.x,v=i.y,N=(h-o)*(v-l)-(y-c)*(g-t);if(N===0)return!1;var A=((v-l)*(y-o)+(c-y)*(v-t))/N,M=((t-g)*(y-o)+(h-o)*(v-t))/N;return 0<A&&A<1&&0<M&&M<1},r.findCircleLineIntersections=function(a,e,n,i,o,t,h){var g=(n-a)*(n-a)+(i-e)*(i-e),c=2*((a-o)*(n-a)+(e-t)*(i-e)),l=(a-o)*(a-o)+(e-t)*(e-t)-h*h;if(c*c-4*g*l>=0){var y=(-c+Math.sqrt(c*c-4*g*l))/(2*g),v=(-c-Math.sqrt(c*c-4*g*l))/(2*g);return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:null}return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,T.exports=r},function(T,L,E){function d(){}d.sign=function(r){return r>0?1:r<0?-1:0},d.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},d.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},T.exports=d},function(T,L,E){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,T.exports=d},function(T,L,E){var d=function(){function i(o,t){for(var h=0;h<t.length;h++){var g=t[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,t,h){return t&&i(o.prototype,t),h&&i(o,h),o}}(),r=function(i){return{value:i,next:null,prev:null}},a=function(i,o,t,h){return i!==null?i.next=o:h.head=o,t!==null?t.prev=o:h.tail=o,o.prev=i,o.next=t,h.length++,o},e=function(i,o){var t=i.prev,h=i.next;return t!==null?t.next=h:o.head=h,h!==null?h.prev=t:o.tail=t,i.prev=i.next=null,o.length--,i},n=function(){function i(o){var t=this;(function(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,i),this.length=0,this.head=null,this.tail=null,o!=null&&o.forEach(function(h){return t.push(h)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,t){return a(t.prev,r(o),t,this)}},{key:"insertAfter",value:function(o,t){return a(t,r(o),t.next,this)}},{key:"insertNodeBefore",value:function(o,t){return a(t.prev,o,t,this)}},{key:"insertNodeAfter",value:function(o,t){return a(t,o,t.next,this)}},{key:"push",value:function(o){return a(this.tail,r(o),null,this)}},{key:"unshift",value:function(o){return a(null,r(o),this.head,this)}},{key:"remove",value:function(o){return e(o,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(o){if(o<=this.length()){for(var t=1,h=this.head;t<o;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(o,t){if(o<=this.length()){for(var h=1,g=this.head;h<o;)g=g.next,h++;g.value=t}}}]),i}();T.exports=n},function(T,L,E){function d(r,a,e){this.x=null,this.y=null,r==null&&a==null&&e==null?(this.x=0,this.y=0):typeof r=="number"&&typeof a=="number"&&e==null?(this.x=r,this.y=a):r.constructor.name=="Point"&&a==null&&e==null&&(e=r,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(r,a,e){r.constructor.name=="Point"&&a==null&&e==null?(e=r,this.setLocation(e.x,e.y)):typeof r=="number"&&typeof a=="number"&&e==null&&(parseInt(r)==r&&parseInt(a)==a?this.move(r,a):(this.x=Math.floor(r+.5),this.y=Math.floor(a+.5)))},d.prototype.move=function(r,a){this.x=r,this.y=a},d.prototype.translate=function(r,a){this.x+=r,this.y+=a},d.prototype.equals=function(r){if(r.constructor.name=="Point"){var a=r;return this.x==a.x&&this.y==a.y}return this==r},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},T.exports=d},function(T,L,E){function d(r,a,e,n){this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&a!=null&&e!=null&&n!=null&&(this.x=r,this.y=a,this.width=e,this.height=n)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(r){this.x=r},d.prototype.getY=function(){return this.y},d.prototype.setY=function(r){this.y=r},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(r){this.width=r},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(r){this.height=r},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(r){return!(this.getRight()<r.x||this.getBottom()<r.y||r.getRight()<this.x||r.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},T.exports=d},function(T,L,E){var d=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 r(){}r.lastID=0,r.createID=function(a){return r.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=r.getString(),r.lastID++),a.uniqueID)},r.getString=function(a){return a==null&&(a=r.lastID),"Object#"+a},r.isPrimitive=function(a){var e=a===void 0?"undefined":d(a);return a==null||e!="object"&&e!="function"},T.exports=r},function(T,L,E){function d(c){if(Array.isArray(c)){for(var l=0,y=Array(c.length);l<c.length;l++)y[l]=c[l];return y}return Array.from(c)}var r=E(0),a=E(7),e=E(3),n=E(1),i=E(6),o=E(5),t=E(17),h=E(29);function g(c){h.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null&&(this.isRemoteUse=c)}g.RANDOM_SEED=1,g.prototype=Object.create(h.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var c=new a(this);return this.graphManager=c,c},g.prototype.newGraph=function(c){return new i(null,this.graphManager,c)},g.prototype.newNode=function(c){return new e(this.graphManager,c)},g.prototype.newEdge=function(c){return new n(null,null,c)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){var c;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),c=!this.checkLayoutSuccess()&&this.layout(),r.ANIMATE!=="during"&&(c&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,c)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var c=this.graphManager.getAllEdges(),l=0;l<c.length;l++)c[l];var y=this.graphManager.getRoot().getNodes();for(l=0;l<y.length;l++)y[l];this.update(this.graphManager.getRoot())}},g.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof e){var l=c;if(l.getChild()!=null)for(var y=l.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);l.vGraphObject!=null&&l.vGraphObject.update(l)}else if(c instanceof n){var N=c;N.vGraphObject!=null&&N.vGraphObject.update(N)}else if(c instanceof i){var A=c;A.vGraphObject!=null&&A.vGraphObject.update(A)}},g.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},g.prototype.transform=function(c){if(c==null)this.transform(new o(0,0));else{var l=new t,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){l.setWorldOrgX(c.x),l.setWorldOrgY(c.y),l.setDeviceOrgX(y.x),l.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),N=0;N<v.length;N++)v[N].transform(l)}}},g.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var l,y,v=c.getNodes(),N=0;N<v.length;N++)(y=(l=v[N]).getChild())==null||y.getNodes().length==0?l.scatter():(this.positionNodesRandomly(y),l.updateBounds())},g.prototype.getFlatForest=function(){for(var c=[],l=!0,y=this.graphManager.getRoot().getNodes(),v=!0,N=0;N<y.length;N++)y[N].getChild()!=null&&(v=!1);if(!v)return c;var A=new Set,M=[],P=new Map,b=[];for(b=b.concat(y);b.length>0&&l;){for(M.push(b[0]);M.length>0&&l;){var Y=M[0];M.splice(0,1),A.add(Y);var H=Y.getEdges();for(N=0;N<H.length;N++){var q=H[N].getOtherEnd(Y);if(P.get(Y)!=q){if(A.has(q)){l=!1;break}M.push(q),P.set(q,Y)}}}if(l){var _=[].concat(d(A));for(c.push(_),N=0;N<_.length;N++){var B=_[N],s=b.indexOf(B);s>-1&&b.splice(s,1)}A=new Set,P=new Map}else c=[]}return c},g.prototype.createDummyNodesForBendpoints=function(c){for(var l=[],y=c.source,v=this.graphManager.calcLowestCommonAncestor(c.source,c.target),N=0;N<c.bendpoints.length;N++){var A=this.newNode(null);A.setRect(new Point(0,0),new Dimension(1,1)),v.add(A);var M=this.newEdge(null);this.graphManager.add(M,y,A),l.add(A),y=A}return M=this.newEdge(null),this.graphManager.add(M,y,c.target),this.edgeToDummyNodes.set(c,l),c.isInterGraph()?this.graphManager.remove(c):v.remove(c),l},g.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(d(this.edgeToDummyNodes.keys())).concat(c);for(var l=0;l<c.length;l++){var y=c[l];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),N=0;N<v.length;N++){var A=v[N],M=new o(A.getCenterX(),A.getCenterY()),P=y.bendpoints.get(N);P.x=M.x,P.y=M.y,A.getOwner().remove(A)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(c,l,y,v){if(y!=null&&v!=null){var N=l;return c<=50?N-=(l-l/y)/50*(50-c):N+=(l*v-l)/50*(c-50),N}var A,M;return c<=50?(A=9*l/500,M=l/10):(A=9*l/50,M=-8*l),A*c+M},g.findCenterOfTree=function(c){var l=[];l=l.concat(c);var y=[],v=new Map,N=!1,A=null;l.length!=1&&l.length!=2||(N=!0,A=l[0]);for(var M=0;M<l.length;M++){var P=(H=l[M]).getNeighborsList().size;v.set(H,H.getNeighborsList().size),P==1&&y.push(H)}var b=[];for(b=b.concat(y);!N;){var Y=[];for(Y=Y.concat(b),b=[],M=0;M<l.length;M++){var H=l[M],q=l.indexOf(H);q>=0&&l.splice(q,1),H.getNeighborsList().forEach(function(_){if(y.indexOf(_)<0){var B=v.get(_)-1;B==1&&b.push(_),v.set(_,B)}})}y=y.concat(b),l.length!=1&&l.length!=2||(N=!0,A=l[0])}return A},g.prototype.setGraphManager=function(c){this.graphManager=c},T.exports=g},function(T,L,E){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=1e4*Math.sin(d.seed++),d.x-Math.floor(d.x)},T.exports=d},function(T,L,E){var d=E(5);function r(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}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(a){this.lworldExtX=a},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(a){this.lworldExtY=a},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},r.prototype.transformX=function(a){var e=0,n=this.lworldExtX;return n!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),e},r.prototype.transformY=function(a){var e=0,n=this.lworldExtY;return n!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),e},r.prototype.inverseTransformX=function(a){var e=0,n=this.ldeviceExtX;return n!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),e},r.prototype.inverseTransformY=function(a){var e=0,n=this.ldeviceExtY;return n!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),e},r.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},T.exports=r},function(T,L,E){var d=E(15),r=E(4),a=E(0),e=E(8),n=E(9);function i(){d.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var o in i.prototype=Object.create(d.prototype),d)i[o]=d[o];i.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,h,g,c,l,y,v,N=this.getGraphManager().getAllEdges(),A=0;A<N.length;A++)h=(t=N[A]).idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),y=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=y+v-2*a.SIMPLE_NODE_SIZE),g=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*g))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>r.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t,h=this.getAllEdges(),g=0;g<h.length;g++)t=h[g],this.calcSpringForce(t,t.idealLength)},i.prototype.calcRepulsionForces=function(){var t,h,g,c,l,y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],v=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&y&&this.updateGrid(),l=new Set,t=0;t<N.length;t++)g=N[t],this.calculateRepulsionForceOfANode(g,l,y,v),l.add(g);else for(t=0;t<N.length;t++)for(g=N[t],h=t+1;h<N.length;h++)c=N[h],g.getOwner()==c.getOwner()&&this.calcRepulsionForce(g,c)},i.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),g=0;g<h.length;g++)t=h[g],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},i.prototype.calcSpringForce=function(t,h){var g,c,l,y,v=t.getSource(),N=t.getTarget();if(this.uniformLeafNodeSizes&&v.getChild()==null&&N.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;(g=t.getLength())!=0&&(l=(c=t.edgeElasticity*(g-h))*(t.lengthX/g),y=c*(t.lengthY/g),v.springForceX+=l,v.springForceY+=y,N.springForceX-=l,N.springForceY-=y)},i.prototype.calcRepulsionForce=function(t,h){var g,c,l,y,v,N,A,M=t.getRect(),P=h.getRect(),b=new Array(2),Y=new Array(4);if(M.intersects(P)){e.calcSeparationAmount(M,P,b,r.DEFAULT_EDGE_LENGTH/2),N=2*b[0],A=2*b[1];var H=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=H*N,t.repulsionForceY-=H*A,h.repulsionForceX+=H*N,h.repulsionForceY+=H*A}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(g=P.getCenterX()-M.getCenterX(),c=P.getCenterY()-M.getCenterY()):(e.getIntersection(M,P,Y),g=Y[2]-Y[0],c=Y[3]-Y[1]),Math.abs(g)<r.MIN_REPULSION_DIST&&(g=n.sign(g)*r.MIN_REPULSION_DIST),Math.abs(c)<r.MIN_REPULSION_DIST&&(c=n.sign(c)*r.MIN_REPULSION_DIST),l=g*g+c*c,y=Math.sqrt(l),N=(v=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/l)*g/y,A=v*c/y,t.repulsionForceX-=N,t.repulsionForceY-=A,h.repulsionForceX+=N,h.repulsionForceY+=A},i.prototype.calcGravitationalForce=function(t){var h,g,c,l,y,v,N,A;g=((h=t.getOwner()).getRight()+h.getLeft())/2,c=(h.getTop()+h.getBottom())/2,l=t.getCenterX()-g,y=t.getCenterY()-c,v=Math.abs(l)+t.getWidth()/2,N=Math.abs(y)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(v>(A=h.getEstimatedSize()*this.gravityRangeFactor)||N>A)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*y):(v>(A=h.getEstimatedSize()*this.compoundGravityRangeFactor)||N>A)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant)},i.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},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,h=this.graphManager.getAllNodes(),g=0;g<h.length;g++)(t=h[g]).noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var h,g;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(h),l=0;l<h;l++)c[l]=new Array(g);for(l=0;l<h;l++)for(var y=0;y<g;y++)c[l][y]=new Array;return c},i.prototype.addNodeToGrid=function(t,h,g){var c,l,y,v;c=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((t.getRect().y-g)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-g)/this.repulsionRange));for(var N=c;N<=l;N++)for(var A=y;A<=v;A++)this.grid[N][A].push(t),t.setGridCoordinates(c,l,y,v)},i.prototype.updateGrid=function(){var t,h,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<g.length;t++)h=g[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,h,g,c){if(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&g||c){var l,y=new Set;t.surrounding=new Array;for(var v=this.grid,N=t.startX-1;N<t.finishX+2;N++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(N<0||A<0||N>=v.length||A>=v[0].length)){for(var M=0;M<v[N][A].length;M++)if(l=v[N][A][M],t.getOwner()==l.getOwner()&&t!=l&&!h.has(l)&&!y.has(l)){var P=Math.abs(t.getCenterX()-l.getCenterX())-(t.getWidth()/2+l.getWidth()/2),b=Math.abs(t.getCenterY()-l.getCenterY())-(t.getHeight()/2+l.getHeight()/2);P<=this.repulsionRange&&b<=this.repulsionRange&&y.add(l)}}t.surrounding=[].concat(function(Y){if(Array.isArray(Y)){for(var H=0,q=Array(Y.length);H<Y.length;H++)q[H]=Y[H];return q}return Array.from(Y)}(y))}for(N=0;N<t.surrounding.length;N++)this.calcRepulsionForce(t,t.surrounding[N])},i.prototype.calcRepulsionRange=function(){return 0},T.exports=i},function(T,L,E){var d=E(1),r=E(4);function a(n,i,o){d.call(this,n,i,o),this.idealLength=r.DEFAULT_EDGE_LENGTH,this.edgeElasticity=r.DEFAULT_SPRING_STRENGTH}for(var e in a.prototype=Object.create(d.prototype),d)a[e]=d[e];T.exports=a},function(T,L,E){var d=E(3),r=E(4);function a(n,i,o,t){d.call(this,n,i,o,t),this.nodeRepulsion=r.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=[]}for(var e in a.prototype=Object.create(d.prototype),d)a[e]=d[e];a.prototype.setGridCoordinates=function(n,i,o,t){this.startX=n,this.finishX=i,this.startY=o,this.finishY=t},T.exports=a},function(T,L,E){function d(r,a){this.width=0,this.height=0,r!==null&&a!==null&&(this.height=a,this.width=r)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(r){this.width=r},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(r){this.height=r},T.exports=d},function(T,L,E){var d=E(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(a,e){var n=d.createID(a);this.contains(n)||(this.map[n]=e,this.keys.push(a))},r.prototype.contains=function(a){return d.createID(a),this.map[a]!=null},r.prototype.get=function(a){var e=d.createID(a);return this.map[e]},r.prototype.keySet=function(){return this.keys},T.exports=r},function(T,L,E){var d=E(14);function r(){this.set={}}r.prototype.add=function(a){var e=d.createID(a);this.contains(e)||(this.set[e]=a)},r.prototype.remove=function(a){delete this.set[d.createID(a)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(a){return this.set[d.createID(a)]==a},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),n=e.length,i=0;i<n;i++)a.push(this.set[e[i]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(a){for(var e=a.length,n=0;n<e;n++){var i=a[n];this.add(i)}},T.exports=r},function(T,L,E){function d(){}d.multMat=function(r,a){for(var e=[],n=0;n<r.length;n++){e[n]=[];for(var i=0;i<a[0].length;i++){e[n][i]=0;for(var o=0;o<r[0].length;o++)e[n][i]+=r[n][o]*a[o][i]}}return e},d.transpose=function(r){for(var a=[],e=0;e<r[0].length;e++){a[e]=[];for(var n=0;n<r.length;n++)a[e][n]=r[n][e]}return a},d.multCons=function(r,a){for(var e=[],n=0;n<r.length;n++)e[n]=r[n]*a;return e},d.minusOp=function(r,a){for(var e=[],n=0;n<r.length;n++)e[n]=r[n]-a[n];return e},d.dotProduct=function(r,a){for(var e=0,n=0;n<r.length;n++)e+=r[n]*a[n];return e},d.mag=function(r){return Math.sqrt(this.dotProduct(r,r))},d.normalize=function(r){for(var a=[],e=this.mag(r),n=0;n<r.length;n++)a[n]=r[n]/e;return a},d.multGamma=function(r){for(var a=[],e=0,n=0;n<r.length;n++)e+=r[n];e*=-1/r.length;for(var i=0;i<r.length;i++)a[i]=e+r[i];return a},d.multL=function(r,a,e){for(var n=[],i=[],o=[],t=0;t<a[0].length;t++){for(var h=0,g=0;g<a.length;g++)h+=-.5*a[g][t]*r[g];i[t]=h}for(var c=0;c<e.length;c++){for(var l=0,y=0;y<e.length;y++)l+=e[c][y]*i[y];o[c]=l}for(var v=0;v<a.length;v++){for(var N=0,A=0;A<a[0].length;A++)N+=a[v][A]*o[A];n[v]=N}return n},T.exports=d},function(T,L,E){var d=function(){function e(n,i){for(var o=0;o<i.length;o++){var t=i[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,o){return i&&e(n.prototype,i),o&&e(n,o),n}}(),r=E(11),a=function(){function e(n,i){(function(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),i===null&&i===void 0||(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=n instanceof r?n.size():n.length,this._quicksort(n,0,o-1)}return d(e,[{key:"_quicksort",value:function(n,i,o){if(i<o){var t=this._partition(n,i,o);this._quicksort(n,i,t),this._quicksort(n,t+1,o)}}},{key:"_partition",value:function(n,i,o){for(var t=this._get(n,i),h=i,g=o;;){for(;this.compareFunction(t,this._get(n,g));)g--;for(;this.compareFunction(this._get(n,h),t);)h++;if(!(h<g))return g;this._swap(n,h,g),h++,g--}}},{key:"_get",value:function(n,i){return n instanceof r?n.get_object_at(i):n[i]}},{key:"_set",value:function(n,i,o){n instanceof r?n.set_object_at(i,o):n[i]=o}},{key:"_swap",value:function(n,i,o){var t=this._get(n,i);this._set(n,i,this._get(n,o)),this._set(n,o,t)}},{key:"_defaultCompareFunction",value:function(n,i){return i>n}}]),e}();T.exports=a},function(T,L,E){function d(){}d.svd=function(r){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=r.length,this.n=r[0].length;var a=Math.min(this.m,this.n);this.s=function(At){for(var ct=[];At-- >0;)ct.push(0);return ct}(Math.min(this.m+1,this.n)),this.U=function At(ct){if(ct.length==0)return 0;for(var Gt=[],Ct=0;Ct<ct[0];Ct++)Gt.push(At(ct.slice(1)));return Gt}([this.m,a]),this.V=function(At){return function ct(Gt){if(Gt.length==0)return 0;for(var Ct=[],Yt=0;Yt<Gt[0];Yt++)Ct.push(ct(Gt.slice(1)));return Ct}(At)}([this.n,this.n]);for(var e=function(At){for(var ct=[];At-- >0;)ct.push(0);return ct}(this.n),n=function(At){for(var ct=[];At-- >0;)ct.push(0);return ct}(this.m),i=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,o);t++){if(t<i){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=d.hypot(this.s[t],r[h][t]);if(this.s[t]!==0){r[t][t]<0&&(this.s[t]=-this.s[t]);for(var g=t;g<this.m;g++)r[g][t]/=this.s[t];r[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if(function(At,ct){return At&&ct}(t<i,this.s[t]!==0)){for(var l=0,y=t;y<this.m;y++)l+=r[y][t]*r[y][c];l=-l/r[t][t];for(var v=t;v<this.m;v++)r[v][c]+=l*r[v][t]}e[c]=r[t][c]}if(function(At,ct){return ct}(0,t<i))for(var N=t;N<this.m;N++)this.U[N][t]=r[N][t];if(t<o){e[t]=0;for(var A=t+1;A<this.n;A++)e[t]=d.hypot(e[t],e[A]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var M=t+1;M<this.n;M++)e[M]/=e[t];e[t+1]+=1}if(e[t]=-e[t],function(At,ct){return At&&ct}(t+1<this.m,e[t]!==0)){for(var P=t+1;P<this.m;P++)n[P]=0;for(var b=t+1;b<this.n;b++)for(var Y=t+1;Y<this.m;Y++)n[Y]+=e[b]*r[Y][b];for(var H=t+1;H<this.n;H++)for(var q=-e[H]/e[t+1],_=t+1;_<this.m;_++)r[_][H]+=q*n[_]}for(var B=t+1;B<this.n;B++)this.V[B][t]=e[B]}}var s=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=r[i][i]),this.m<s&&(this.s[s-1]=0),o+1<s&&(e[o]=r[o][s-1]),e[s-1]=0;for(var m=i;m<a;m++){for(var u=0;u<this.m;u++)this.U[u][m]=0;this.U[m][m]=1}for(var p=i-1;p>=0;p--)if(this.s[p]!==0){for(var f=p+1;f<a;f++){for(var w=0,I=p;I<this.m;I++)w+=this.U[I][p]*this.U[I][f];w=-w/this.U[p][p];for(var x=p;x<this.m;x++)this.U[x][f]+=w*this.U[x][p]}for(var F=p;F<this.m;F++)this.U[F][p]=-this.U[F][p];this.U[p][p]=1+this.U[p][p];for(var G=0;G<p-1;G++)this.U[G][p]=0}else{for(var S=0;S<this.m;S++)this.U[S][p]=0;this.U[p][p]=1}for(var D=this.n-1;D>=0;D--){if(function(At,ct){return At&&ct}(D<o,e[D]!==0))for(var z=D+1;z<a;z++){for(var W=0,U=D+1;U<this.n;U++)W+=this.V[U][D]*this.V[U][z];W=-W/this.V[D+1][D];for(var O=D+1;O<this.n;O++)this.V[O][z]+=W*this.V[O][D]}for(var X=0;X<this.n;X++)this.V[X][D]=0;this.V[D][D]=1}for(var j=s-1,K=Math.pow(2,-52),it=Math.pow(2,-966);s>0;){var V=void 0,yt=void 0;for(V=s-2;V>=-1&&V!==-1;V--)if(Math.abs(e[V])<=it+K*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){e[V]=0;break}if(V===s-2)yt=4;else{var Lt=void 0;for(Lt=s-1;Lt>=V&&Lt!==V;Lt--){var Ut=(Lt!==s?Math.abs(e[Lt]):0)+(Lt!==V+1?Math.abs(e[Lt-1]):0);if(Math.abs(this.s[Lt])<=it+K*Ut){this.s[Lt]=0;break}}Lt===V?yt=3:Lt===s-1?yt=1:(yt=2,V=Lt)}switch(V++,yt){case 1:var Rt=e[s-2];e[s-2]=0;for(var J=s-2;J>=V;J--){var ot=d.hypot(this.s[J],Rt),ut=this.s[J]/ot,dt=Rt/ot;this.s[J]=ot,J!==V&&(Rt=-dt*e[J-1],e[J-1]=ut*e[J-1]);for(var vt=0;vt<this.n;vt++)ot=ut*this.V[vt][J]+dt*this.V[vt][s-1],this.V[vt][s-1]=-dt*this.V[vt][J]+ut*this.V[vt][s-1],this.V[vt][J]=ot}break;case 2:var Et=e[V-1];e[V-1]=0;for(var ht=V;ht<s;ht++){var Tt=d.hypot(this.s[ht],Et),_t=this.s[ht]/Tt,Ot=Et/Tt;this.s[ht]=Tt,Et=-Ot*e[ht],e[ht]=_t*e[ht];for(var Mt=0;Mt<this.m;Mt++)Tt=_t*this.U[Mt][ht]+Ot*this.U[Mt][V-1],this.U[Mt][V-1]=-Ot*this.U[Mt][ht]+_t*this.U[Mt][V-1],this.U[Mt][ht]=Tt}break;case 3:var xt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[s-1]),Math.abs(this.s[s-2])),Math.abs(e[s-2])),Math.abs(this.s[V])),Math.abs(e[V])),R=this.s[s-1]/xt,k=this.s[s-2]/xt,Q=e[s-2]/xt,Z=this.s[V]/xt,st=e[V]/xt,It=((k+R)*(k-R)+Q*Q)/2,rt=R*Q*(R*Q),mt=0;(function(At,ct){return At||ct})(It!==0,rt!==0)&&(mt=Math.sqrt(It*It+rt),It<0&&(mt=-mt),mt=rt/(It+mt));for(var ft=(Z+R)*(Z-R)+mt,St=Z*st,et=V;et<s-1;et++){var pt=d.hypot(ft,St),lt=ft/pt,$=St/pt;et!==V&&(e[et-1]=pt),ft=lt*this.s[et]+$*e[et],e[et]=lt*e[et]-$*this.s[et],St=$*this.s[et+1],this.s[et+1]=lt*this.s[et+1];for(var gt=0;gt<this.n;gt++)pt=lt*this.V[gt][et]+$*this.V[gt][et+1],this.V[gt][et+1]=-$*this.V[gt][et]+lt*this.V[gt][et+1],this.V[gt][et]=pt;if(lt=ft/(pt=d.hypot(ft,St)),$=St/pt,this.s[et]=pt,ft=lt*e[et]+$*this.s[et+1],this.s[et+1]=-$*e[et]+lt*this.s[et+1],St=$*e[et+1],e[et+1]=lt*e[et+1],et<this.m-1)for(var Nt=0;Nt<this.m;Nt++)pt=lt*this.U[Nt][et]+$*this.U[Nt][et+1],this.U[Nt][et+1]=-$*this.U[Nt][et]+lt*this.U[Nt][et+1],this.U[Nt][et]=pt}e[s-2]=ft;break;case 4:if(this.s[V]<=0){this.s[V]=this.s[V]<0?-this.s[V]:0;for(var at=0;at<=j;at++)this.V[at][V]=-this.V[at][V]}for(;V<j&&!(this.s[V]>=this.s[V+1]);){var Ft=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=Ft,V<this.n-1)for(var bt=0;bt<this.n;bt++)Ft=this.V[bt][V+1],this.V[bt][V+1]=this.V[bt][V],this.V[bt][V]=Ft;if(V<this.m-1)for(var Dt=0;Dt<this.m;Dt++)Ft=this.U[Dt][V+1],this.U[Dt][V+1]=this.U[Dt][V],this.U[Dt][V]=Ft;V++}s--}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(r,a){var e=void 0;return Math.abs(r)>Math.abs(a)?(e=a/r,e=Math.abs(r)*Math.sqrt(1+e*e)):a!=0?(e=r/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},T.exports=d},function(T,L,E){var d=function(){function a(e,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,n,i){return n&&a(e.prototype,n),i&&a(e,i),e}}(),r=function(){function a(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")})(this,a),this.sequence1=e,this.sequence2=n,this.match_score=i,this.mismatch_penalty=o,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[h][g]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var o=1;o<this.jMax;o++){var t=[this.sequence1[i-1]===this.sequence2[o-1]?this.grid[i-1][o-1]+this.match_score:this.grid[i-1][o-1]+this.mismatch_penalty,this.grid[i-1][o]+this.gap_penalty,this.grid[i][o-1]+this.gap_penalty],h=this.arrayAllMaxIndexes(t);this.grid[i][o]=t[h[0]],this.tracebackGrid[i][o]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var n=e[0],i=this.tracebackGrid[n.pos[0]][n.pos[1]];i[0]&&e.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),i[1]&&e.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),i[2]&&e.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,n){for(var i=[],o=-1;(o=e.indexOf(n,o+1))!==-1;)i.push(o);return i}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),a}();T.exports=r},function(T,L,E){var d=function(){};d.FDLayout=E(18),d.FDLayoutConstants=E(4),d.FDLayoutEdge=E(19),d.FDLayoutNode=E(20),d.DimensionD=E(21),d.HashMap=E(22),d.HashSet=E(23),d.IGeometry=E(8),d.IMath=E(9),d.Integer=E(10),d.Point=E(12),d.PointD=E(5),d.RandomSeed=E(16),d.RectangleD=E(13),d.Transform=E(17),d.UniqueIDGeneretor=E(14),d.Quicksort=E(25),d.LinkedList=E(11),d.LGraphObject=E(2),d.LGraph=E(6),d.LEdge=E(1),d.LGraphManager=E(7),d.LNode=E(3),d.Layout=E(15),d.LayoutConstants=E(0),d.NeedlemanWunsch=E(27),d.Matrix=E(24),d.SVD=E(26),T.exports=d},function(T,L,E){function d(){this.listeners=[]}var r=d.prototype;r.addListener=function(a,e){this.listeners.push({event:a,callback:e})},r.removeListener=function(a,e){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===a&&i.callback===e&&this.listeners.splice(n,1)}},r.emit=function(a,e){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];a===i.event&&i.callback(e)}},T.exports=d}])},we.exports=C());var C}var Le;function dn(){return Le?Ae.exports:(Le=1,C=function(T){return L={45:(r,a,e)=>{var n={};n.layoutBase=e(551),n.CoSEConstants=e(806),n.CoSEEdge=e(767),n.CoSEGraph=e(880),n.CoSEGraphManager=e(578),n.CoSELayout=e(765),n.CoSENode=e(991),n.ConstraintHandler=e(902),r.exports=n},806:(r,a,e)=>{var n=e(551).FDLayoutConstants;function i(){}for(var o in n)i[o]=n[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.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,r.exports=i},767:(r,a,e)=>{var n=e(551).FDLayoutEdge;function i(t,h,g){n.call(this,t,h,g)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},880:(r,a,e)=>{var n=e(551).LGraph;function i(t,h,g){n.call(this,t,h,g)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},578:(r,a,e)=>{var n=e(551).LGraphManager;function i(t){n.call(this,t)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},765:(r,a,e)=>{var n=e(551).FDLayout,i=e(578),o=e(880),t=e(991),h=e(767),g=e(806),c=e(902),l=e(551).FDLayoutConstants,y=e(551).LayoutConstants,v=e(551).Point,N=e(551).PointD,A=e(551).DimensionD,M=e(551).Layout,P=e(551).Integer,b=e(551).IGeometry,Y=e(551).LGraph,H=e(551).Transform,q=e(551).LinkedList;function _(){n.call(this),this.toBeTiled={},this.constraints={}}for(var B in _.prototype=Object.create(n.prototype),n)_[B]=n[B];_.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},_.prototype.newGraph=function(s){return new o(null,this.graphManager,s)},_.prototype.newNode=function(s){return new t(this.graphManager,s)},_.prototype.newEdge=function(s){return new h(null,null,s)},_.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(g.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},_.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},_.prototype.layout=function(){return y.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},_.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)g.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return m.has(p)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return m.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),g.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},_.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(f){return s.has(f)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),g.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},_.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),m={},u=0;u<s.length;u++){var p=s[u].rect,f=s[u].id;m[f]={id:f,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return m},_.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},_.prototype.moveNodes=function(){for(var s=this.getAllNodes(),m=0;m<s.length;m++)s[m].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),m=0;m<s.length;m++)s[m].move()},_.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var p=m[u];this.idToNodeMap.set(p.id,p)}var f=function O(X){for(var j,K=X.getChild().getNodes(),it=0,V=0;V<K.length;V++)(j=K[V]).getChild()==null?s.fixedNodeSet.has(j.id)&&(it+=100):it+=O(j);return it};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(O){s.fixedNodeSet.add(O.nodeId)}),m=this.graphManager.getAllNodes(),u=0;u<m.length;u++)if((p=m[u]).getChild()!=null){var w=f(p);w>0&&(p.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var I=new Map,x=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){s.fixedNodesOnHorizontal.add(O),s.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var F=this.constraints.alignmentConstraint.vertical;for(u=0;u<F.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),F[u].forEach(function(O){I.set(O,"dummy"+u),s.dummyToNodeForVerticalAlignment.get("dummy"+u).push(O),s.fixedNodeSet.has(O)&&s.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var G=this.constraints.alignmentConstraint.horizontal;for(u=0;u<G.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),G[u].forEach(function(O){x.set(O,"dummy"+u),s.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(O),s.fixedNodeSet.has(O)&&s.fixedNodesOnVertical.add("dummy"+u)})}}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,j,K;for(K=O.length-1;K>=2*O.length/3;K--)X=Math.floor(Math.random()*(K+1)),j=O[K],O[K]=O[X],O[X]=j;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 X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;s.nodesInRelativeHorizontal.includes(X)||(s.nodesInRelativeHorizontal.push(X),s.nodeToRelativeConstraintMapHorizontal.set(X,[]),s.dummyToNodeForVerticalAlignment.has(X)?s.nodeToTempPositionMapHorizontal.set(X,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(X,s.idToNodeMap.get(X).getCenterX())),s.nodesInRelativeHorizontal.includes(j)||(s.nodesInRelativeHorizontal.push(j),s.nodeToRelativeConstraintMapHorizontal.set(j,[]),s.dummyToNodeForVerticalAlignment.has(j)?s.nodeToTempPositionMapHorizontal.set(j,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(j)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(j,s.idToNodeMap.get(j).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(X).push({right:j,gap:O.gap}),s.nodeToRelativeConstraintMapHorizontal.get(j).push({left:X,gap:O.gap})}else{var K=x.has(O.top)?x.get(O.top):O.top,it=x.has(O.bottom)?x.get(O.bottom):O.bottom;s.nodesInRelativeVertical.includes(K)||(s.nodesInRelativeVertical.push(K),s.nodeToRelativeConstraintMapVertical.set(K,[]),s.dummyToNodeForHorizontalAlignment.has(K)?s.nodeToTempPositionMapVertical.set(K,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(K,s.idToNodeMap.get(K).getCenterY())),s.nodesInRelativeVertical.includes(it)||(s.nodesInRelativeVertical.push(it),s.nodeToRelativeConstraintMapVertical.set(it,[]),s.dummyToNodeForHorizontalAlignment.has(it)?s.nodeToTempPositionMapVertical.set(it,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(it)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(it,s.idToNodeMap.get(it).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(K).push({bottom:it,gap:O.gap}),s.nodeToRelativeConstraintMapVertical.get(it).push({top:K,gap:O.gap})}});else{var S=new Map,D=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;S.has(X)?S.get(X).push(j):S.set(X,[j]),S.has(j)?S.get(j).push(X):S.set(j,[X])}else{var K=x.has(O.top)?x.get(O.top):O.top,it=x.has(O.bottom)?x.get(O.bottom):O.bottom;D.has(K)?D.get(K).push(it):D.set(K,[it]),D.has(it)?D.get(it).push(K):D.set(it,[K])}});var z=function(O,X){var j=[],K=[],it=new q,V=new Set,yt=0;return O.forEach(function(Lt,Ut){if(!V.has(Ut)){j[yt]=[],K[yt]=!1;var Rt=Ut;for(it.push(Rt),V.add(Rt),j[yt].push(Rt);it.length!=0;)Rt=it.shift(),X.has(Rt)&&(K[yt]=!0),O.get(Rt).forEach(function(J){V.has(J)||(it.push(J),V.add(J),j[yt].push(J))});yt++}}),{components:j,isFixed:K}},W=z(S,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=W.components,this.fixedComponentsOnHorizontal=W.isFixed;var U=z(D,s.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},_.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var O=s.idToNodeMap.get(U.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var p=0,f=0;f<m[u].length;f++){if(this.fixedNodeSet.has(m[u][f])){p=0;break}p+=this.idToNodeMap.get(m[u][f]).displacementX}var w=p/m[u].length;for(f=0;f<m[u].length;f++)this.idToNodeMap.get(m[u][f]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal){var I=this.constraints.alignmentConstraint.horizontal;for(u=0;u<I.length;u++){var x=0;for(f=0;f<I[u].length;f++){if(this.fixedNodeSet.has(I[u][f])){x=0;break}x+=this.idToNodeMap.get(I[u][f]).displacementY}var F=x/I[u].length;for(f=0;f<I[u].length;f++)this.idToNodeMap.get(I[u][f]).displacementY=F}}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!s.fixedNodesOnHorizontal.has(U)){var O=0;O=s.dummyToNodeForVerticalAlignment.has(U)?s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:s.idToNodeMap.get(U).displacementX,s.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(X){var j;X.right?(j=s.nodeToTempPositionMapHorizontal.get(X.right)-s.nodeToTempPositionMapHorizontal.get(U)-O)<X.gap&&(O-=X.gap-j):(j=s.nodeToTempPositionMapHorizontal.get(U)-s.nodeToTempPositionMapHorizontal.get(X.left)+O)<X.gap&&(O+=X.gap-j)}),s.nodeToTempPositionMapHorizontal.set(U,s.nodeToTempPositionMapHorizontal.get(U)+O),s.dummyToNodeForVerticalAlignment.has(U)?s.dummyToNodeForVerticalAlignment.get(U).forEach(function(X){s.idToNodeMap.get(X).displacementX=O}):s.idToNodeMap.get(U).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(U){if(!s.fixedNodesOnHorizontal.has(U)){var O=0;O=s.dummyToNodeForHorizontalAlignment.has(U)?s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:s.idToNodeMap.get(U).displacementY,s.nodeToRelativeConstraintMapVertical.get(U).forEach(function(X){var j;X.bottom?(j=s.nodeToTempPositionMapVertical.get(X.bottom)-s.nodeToTempPositionMapVertical.get(U)-O)<X.gap&&(O-=X.gap-j):(j=s.nodeToTempPositionMapVertical.get(U)-s.nodeToTempPositionMapVertical.get(X.top)+O)<X.gap&&(O+=X.gap-j)}),s.nodeToTempPositionMapVertical.set(U,s.nodeToTempPositionMapVertical.get(U)+O),s.dummyToNodeForHorizontalAlignment.has(U)?s.dummyToNodeForHorizontalAlignment.get(U).forEach(function(X){s.idToNodeMap.get(X).displacementY=O}):s.idToNodeMap.get(U).displacementY=O}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var G=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?this.dummyToNodeForVerticalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(G[f]).displacementX=0;else{var S=0,D=0;for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?(S+=(W=this.dummyToNodeForVerticalAlignment.get(G[f])).length*this.idToNodeMap.get(W[0]).displacementX,D+=W.length):(S+=this.idToNodeMap.get(G[f]).displacementX,D++);var z=S/D;for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?this.dummyToNodeForVerticalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementX=z}):this.idToNodeMap.get(G[f]).displacementX=z}}for(u=0;u<this.componentsOnVertical.length;u++)if(G=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(f=0;f<G.length;f++)this.dummyToNodeForHorizontalAlignment.has(G[f])?this.dummyToNodeForHorizontalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(G[f]).displacementY=0;else{for(S=0,D=0,f=0;f<G.length;f++){var W;this.dummyToNodeForHorizontalAlignment.has(G[f])?(S+=(W=this.dummyToNodeForHorizontalAlignment.get(G[f])).length*this.idToNodeMap.get(W[0]).displacementY,D+=W.length):(S+=this.idToNodeMap.get(G[f]).displacementY,D++)}for(z=S/D,f=0;f<G.length;f++)this.dummyToNodeForHorizontalAlignment.has(G[f])?this.dummyToNodeForHorizontalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementY=z}):this.idToNodeMap.get(G[f]).displacementY=z}}},_.prototype.calculateNodesToApplyGravitationTo=function(){var s,m,u=[],p=this.graphManager.getGraphs(),f=p.length;for(m=0;m<f;m++)(s=p[m]).updateConnected(),s.isConnected||(u=u.concat(s.getNodes()));return u},_.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var m,u=new Set;for(m=0;m<s.length;m++){var p=s[m];if(!u.has(p)){var f=p.getSource(),w=p.getTarget();if(f==w)p.getBendpoints().push(new N),p.getBendpoints().push(new N),this.createDummyNodesForBendpoints(p),u.add(p);else{var I=[];if(I=(I=I.concat(f.getEdgeListToNode(w))).concat(w.getEdgeListToNode(f)),!u.has(I[0])){var x;if(I.length>1)for(x=0;x<I.length;x++){var F=I[x];F.getBendpoints().push(new N),this.createDummyNodesForBendpoints(F)}I.forEach(function(G){u.add(G)})}}}if(u.size==s.length)break}},_.prototype.positionNodesRadially=function(s){for(var m=new v(0,0),u=Math.ceil(Math.sqrt(s.length)),p=0,f=0,w=0,I=new N(0,0),x=0;x<s.length;x++){x%u==0&&(w=0,f=p,x!=0&&(f+=g.DEFAULT_COMPONENT_SEPERATION),p=0);var F=s[x],G=M.findCenterOfTree(F);m.x=w,m.y=f,(I=_.radialLayout(F,G,m)).y>p&&(p=Math.floor(I.y)),w=Math.floor(I.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(y.WORLD_CENTER_X-I.x/2,y.WORLD_CENTER_Y-I.y/2))},_.radialLayout=function(s,m,u){var p=Math.max(this.maxDiagonalInTree(s),g.DEFAULT_RADIAL_SEPARATION);_.branchRadialLayout(m,null,0,359,0,p);var f=Y.calculateBounds(s),w=new H;w.setDeviceOrgX(f.getMinX()),w.setDeviceOrgY(f.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var I=0;I<s.length;I++)s[I].transform(w);var x=new N(f.getMaxX(),f.getMaxY());return w.inverseTransformPoint(x)},_.branchRadialLayout=function(s,m,u,p,f,w){var I=(p-u+1)/2;I<0&&(I+=180);var x=(I+u)%360*b.TWO_PI/360,F=f*Math.cos(x),G=f*Math.sin(x);s.setCenter(F,G);var S=[],D=(S=S.concat(s.getEdges())).length;m!=null&&D--;for(var z,W=0,U=S.length,O=s.getEdgesBetween(m);O.length>1;){var X=O[0];O.splice(0,1);var j=S.indexOf(X);j>=0&&S.splice(j,1),U--,D--}z=m!=null?(S.indexOf(O[0])+1)%U:0;for(var K=Math.abs(p-u)/D,it=z;W!=D;it=++it%U){var V=S[it].getOtherEnd(s);if(V!=m){var yt=(u+W*K)%360,Lt=(yt+K)%360;_.branchRadialLayout(V,s,yt,Lt,f+w,w),W++}}},_.maxDiagonalInTree=function(s){for(var m=P.MIN_VALUE,u=0;u<s.length;u++){var p=s[u].getDiagonal();p>m&&(m=p)}return m},_.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},_.prototype.groupZeroDegreeMembers=function(){var s=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),f=0;f<p.length;f++){var w=(I=p[f]).getParent();this.getNodeDegreeWithChildren(I)!==0||w.id!=null&&this.getToBeTiled(w)||u.push(I)}for(f=0;f<u.length;f++){var I,x=(I=u[f]).getParent().id;m[x]===void 0&&(m[x]=[]),m[x]=m[x].concat(I)}Object.keys(m).forEach(function(F){if(m[F].length>1){var G="DummyCompound_"+F;s.memberGroups[G]=m[F];var S=m[F][0].getParent(),D=new t(s.graphManager);D.id=G,D.paddingLeft=S.paddingLeft||0,D.paddingRight=S.paddingRight||0,D.paddingBottom=S.paddingBottom||0,D.paddingTop=S.paddingTop||0,s.idToDummyNode[G]=D;var z=s.getGraphManager().add(s.newGraph(),D),W=S.getChild();W.add(D);for(var U=0;U<m[F].length;U++){var O=m[F][U];W.remove(O),z.add(O)}}})},_.prototype.clearCompounds=function(){var s={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],s[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,m)},_.prototype.clearZeroDegreeMembers=function(){var s=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var p=s.idToDummyNode[u];if(m[u]=s.tileNodes(s.memberGroups[u],p.paddingLeft+p.paddingRight),p.rect.width=m[u].width,p.rect.height=m[u].height,p.setCenter(m[u].centerX,m[u].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var f=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(f+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>f?(p.rect.x-=(p.labelWidth-f)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-f)/2):p.labelPosHorizontal=="right"&&p.setWidth(f+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},_.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var m=this.compoundOrder[s],u=m.id,p=m.paddingLeft,f=m.paddingTop,w=m.labelMarginLeft,I=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,p,f,w,I)}},_.prototype.repopulateZeroDegreeMembers=function(){var s=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var p=s.idToDummyNode[u],f=p.paddingLeft,w=p.paddingTop,I=p.labelMarginLeft,x=p.labelMarginTop;s.adjustLocations(m[u],p.rect.x,p.rect.y,f,w,I,x)})},_.prototype.getToBeTiled=function(s){var m=s.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=s.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var p=u.getNodes(),f=0;f<p.length;f++){var w=p[f];if(this.getNodeDegree(w)>0)return this.toBeTiled[m]=!1,!1;if(w.getChild()!=null){if(!this.getToBeTiled(w))return this.toBeTiled[m]=!1,!1}else this.toBeTiled[w.id]=!1}return this.toBeTiled[m]=!0,!0},_.prototype.getNodeDegree=function(s){s.id;for(var m=s.getEdges(),u=0,p=0;p<m.length;p++){var f=m[p];f.getSource().id!==f.getTarget().id&&(u+=1)}return u},_.prototype.getNodeDegreeWithChildren=function(s){var m=this.getNodeDegree(s);if(s.getChild()==null)return m;for(var u=s.getChild().getNodes(),p=0;p<u.length;p++){var f=u[p];m+=this.getNodeDegreeWithChildren(f)}return m},_.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},_.prototype.fillCompexOrderByDFS=function(s){for(var m=0;m<s.length;m++){var u=s[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},_.prototype.adjustLocations=function(s,m,u,p,f,w,I){u+=f+I;for(var x=m+=p+w,F=0;F<s.rows.length;F++){var G=s.rows[F];m=x;for(var S=0,D=0;D<G.length;D++){var z=G[D];z.rect.x=m,z.rect.y=u,m+=z.rect.width+s.horizontalPadding,z.rect.height>S&&(S=z.rect.height)}u+=S+s.verticalPadding}},_.prototype.tileCompoundMembers=function(s,m){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var f=m[p];if(u.tiledMemberPack[p]=u.tileNodes(s[p],f.paddingLeft+f.paddingRight),f.rect.width=u.tiledMemberPack[p].width,f.rect.height=u.tiledMemberPack[p].height,f.setCenter(u.tiledMemberPack[p].centerX,u.tiledMemberPack[p].centerY),f.labelMarginLeft=0,f.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var w=f.rect.width,I=f.rect.height;f.labelWidth&&(f.labelPosHorizontal=="left"?(f.rect.x-=f.labelWidth,f.setWidth(w+f.labelWidth),f.labelMarginLeft=f.labelWidth):f.labelPosHorizontal=="center"&&f.labelWidth>w?(f.rect.x-=(f.labelWidth-w)/2,f.setWidth(f.labelWidth),f.labelMarginLeft=(f.labelWidth-w)/2):f.labelPosHorizontal=="right"&&f.setWidth(w+f.labelWidth)),f.labelHeight&&(f.labelPosVertical=="top"?(f.rect.y-=f.labelHeight,f.setHeight(I+f.labelHeight),f.labelMarginTop=f.labelHeight):f.labelPosVertical=="center"&&f.labelHeight>I?(f.rect.y-=(f.labelHeight-I)/2,f.setHeight(f.labelHeight),f.labelMarginTop=(f.labelHeight-I)/2):f.labelPosVertical=="bottom"&&f.setHeight(I+f.labelHeight))}})},_.prototype.tileNodes=function(s,m){var u=this.tileNodesByFavoringDim(s,m,!0),p=this.tileNodesByFavoringDim(s,m,!1),f=this.getOrgRatio(u);return this.getOrgRatio(p)<f?p:u},_.prototype.getOrgRatio=function(s){var m=s.width/s.height;return m<1&&(m=1/m),m},_.prototype.calcIdealRowWidth=function(s,m){var u=g.TILING_PADDING_VERTICAL,p=g.TILING_PADDING_HORIZONTAL,f=s.length,w=0,I=0,x=0;s.forEach(function(U){w+=U.getWidth(),I+=U.getHeight(),U.getWidth()>x&&(x=U.getWidth())});var F,G=w/f,S=I/f,D=Math.pow(u-p,2)+4*(G+p)*(S+u)*f,z=(p-u+Math.sqrt(D))/(2*(G+p));m?(F=Math.ceil(z))==z&&F++:F=Math.floor(z);var W=F*(G+p)-p;return x>W&&(W=x),W+=2*p},_.prototype.tileNodesByFavoringDim=function(s,m,u){var p=g.TILING_PADDING_VERTICAL,f=g.TILING_PADDING_HORIZONTAL,w=g.TILING_COMPARE_BY,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:p,horizontalPadding:f,centerX:0,centerY:0};w&&(I.idealRowWidth=this.calcIdealRowWidth(s,u));var x=function(U){return U.rect.width*U.rect.height},F=function(U,O){return x(O)-x(U)};s.sort(function(U,O){var X=F;return I.idealRowWidth?(X=w)(U.id,O.id):X(U,O)});for(var G=0,S=0,D=0;D<s.length;D++)G+=(z=s[D]).getCenterX(),S+=z.getCenterY();for(I.centerX=G/s.length,I.centerY=S/s.length,D=0;D<s.length;D++){var z=s[D];if(I.rows.length==0)this.insertNodeToRow(I,z,0,m);else if(this.canAddHorizontal(I,z.rect.width,z.rect.height)){var W=I.rows.length-1;I.idealRowWidth||(W=this.getShortestRowIndex(I)),this.insertNodeToRow(I,z,W,m)}else this.insertNodeToRow(I,z,I.rows.length,m);this.shiftToLastRow(I)}return I},_.prototype.insertNodeToRow=function(s,m,u,p){var f=p;u==s.rows.length&&(s.rows.push([]),s.rowWidth.push(f),s.rowHeight.push(0));var w=s.rowWidth[u]+m.rect.width;s.rows[u].length>0&&(w+=s.horizontalPadding),s.rowWidth[u]=w,s.width<w&&(s.width=w);var I=m.rect.height;u>0&&(I+=s.verticalPadding);var x=0;I>s.rowHeight[u]&&(x=s.rowHeight[u],s.rowHeight[u]=I,x=s.rowHeight[u]-x),s.height+=x,s.rows[u].push(m)},_.prototype.getShortestRowIndex=function(s){for(var m=-1,u=Number.MAX_VALUE,p=0;p<s.rows.length;p++)s.rowWidth[p]<u&&(m=p,u=s.rowWidth[p]);return m},_.prototype.getLongestRowIndex=function(s){for(var m=-1,u=Number.MIN_VALUE,p=0;p<s.rows.length;p++)s.rowWidth[p]>u&&(m=p,u=s.rowWidth[p]);return m},_.prototype.canAddHorizontal=function(s,m,u){if(s.idealRowWidth){var p=s.rows.length-1;return s.rowWidth[p]+m+s.horizontalPadding<=s.idealRowWidth}var f=this.getShortestRowIndex(s);if(f<0)return!0;var w=s.rowWidth[f];if(w+s.horizontalPadding+m<=s.width)return!0;var I,x,F=0;return s.rowHeight[f]<u&&f>0&&(F=u+s.verticalPadding-s.rowHeight[f]),I=s.width-w>=m+s.horizontalPadding?(s.height+F)/(w+m+s.horizontalPadding):(s.height+F)/s.width,F=u+s.verticalPadding,(x=s.width<m?(s.height+F)/m:(s.height+F)/s.width)<1&&(x=1/x),I<1&&(I=1/I),I<x},_.prototype.shiftToLastRow=function(s){var m=this.getLongestRowIndex(s),u=s.rowWidth.length-1,p=s.rows[m],f=p[p.length-1],w=f.width+s.horizontalPadding;if(s.width-s.rowWidth[u]>w&&m!=u){p.splice(-1,1),s.rows[u].push(f),s.rowWidth[m]=s.rowWidth[m]-w,s.rowWidth[u]=s.rowWidth[u]+w,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var I=Number.MIN_VALUE,x=0;x<p.length;x++)p[x].height>I&&(I=p[x].height);m>0&&(I+=s.verticalPadding);var F=s.rowHeight[m]+s.rowHeight[u];s.rowHeight[m]=I,s.rowHeight[u]<f.height+s.verticalPadding&&(s.rowHeight[u]=f.height+s.verticalPadding);var G=s.rowHeight[m]+s.rowHeight[u];s.height+=G-F,this.shiftToLastRow(s)}},_.prototype.tilingPreLayout=function(){g.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},_.prototype.tilingPostLayout=function(){g.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},_.prototype.reduceTrees=function(){for(var s,m=[],u=!0;u;){var p=this.graphManager.getAllNodes(),f=[];u=!1;for(var w=0;w<p.length;w++)if((s=p[w]).getEdges().length==1&&!s.getEdges()[0].isInterGraph&&s.getChild()==null){if(g.PURE_INCREMENTAL){var I=s.getEdges()[0].getOtherEnd(s),x=new A(s.getCenterX()-I.getCenterX(),s.getCenterY()-I.getCenterY());f.push([s,s.getEdges()[0],s.getOwner(),x])}else f.push([s,s.getEdges()[0],s.getOwner()]);u=!0}if(u==1){for(var F=[],G=0;G<f.length;G++)f[G][0].getEdges().length==1&&(F.push(f[G]),f[G][0].getOwner().remove(f[G][0]));m.push(F),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=m},_.prototype.growTree=function(s){for(var m,u=s[s.length-1],p=0;p<u.length;p++)m=u[p],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},_.prototype.findPlaceforPrunedNode=function(s){var m,u,p=s[0];if(u=p==s[1].source?s[1].target:s[1].source,g.PURE_INCREMENTAL)p.setCenter(u.getCenterX()+s[3].getWidth(),u.getCenterY()+s[3].getHeight());else{var f=u.startX,w=u.finishX,I=u.startY,x=u.finishY,F=[0,0,0,0];if(I>0)for(var G=f;G<=w;G++)F[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(w<this.grid.length-1)for(G=I;G<=x;G++)F[1]+=this.grid[w+1][G].length+this.grid[w][G].length-1;if(x<this.grid[0].length-1)for(G=f;G<=w;G++)F[2]+=this.grid[G][x+1].length+this.grid[G][x].length-1;if(f>0)for(G=I;G<=x;G++)F[3]+=this.grid[f-1][G].length+this.grid[f][G].length-1;for(var S,D,z=P.MAX_VALUE,W=0;W<F.length;W++)F[W]<z?(z=F[W],S=1,D=W):F[W]==z&&S++;if(S==3&&z==0)F[0]==0&&F[1]==0&&F[2]==0?m=1:F[0]==0&&F[1]==0&&F[3]==0?m=0:F[0]==0&&F[2]==0&&F[3]==0?m=3:F[1]==0&&F[2]==0&&F[3]==0&&(m=2);else if(S==2&&z==0){var U=Math.floor(2*Math.random());m=F[0]==0&&F[1]==0?U==0?0:1:F[0]==0&&F[2]==0?U==0?0:2:F[0]==0&&F[3]==0?U==0?0:3:F[1]==0&&F[2]==0?U==0?1:2:F[1]==0&&F[3]==0?U==0?1:3:U==0?2:3}else m=S==4&&z==0?U=Math.floor(4*Math.random()):D;m==0?p.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-p.getHeight()/2):m==1?p.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+p.getWidth()/2,u.getCenterY()):m==2?p.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-p.getWidth()/2,u.getCenterY())}},r.exports=_},991:(r,a,e)=>{var n=e(551).FDLayoutNode,i=e(551).IMath;function o(h,g,c,l){n.call(this,h,g,c,l)}for(var t in o.prototype=Object.create(n.prototype),n)o[t]=n[t];o.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(h,g){for(var c,l=this.getChild().getNodes(),y=0;y<l.length;y++)(c=l[y]).getChild()==null?(c.displacementX+=h,c.displacementY+=g):c.propogateDisplacementToChildren(h,g)},o.prototype.move=function(){var h=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),h.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},o.prototype.setPred1=function(h){this.pred1=h},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(h){this.next=h},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(h){this.processed=h},o.prototype.isProcessed=function(){return processed},r.exports=o},902:(r,a,e)=>{function n(c){if(Array.isArray(c)){for(var l=0,y=Array(c.length);l<c.length;l++)y[l]=c[l];return y}return Array.from(c)}var i=e(806),o=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function g(){}g.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var y=new Map,v=new Map,N=[],A=[],M=c.getAllNodes(),P=0,b=0;b<M.length;b++){var Y=M[b];Y.getChild()==null&&(v.set(Y.id,P++),N.push(Y.getCenterX()),A.push(Y.getCenterY()),y.set(Y.id,Y))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(R){R.gap||R.gap==0||(R.left?R.gap=i.DEFAULT_EDGE_LENGTH+y.get(R.left).getWidth()/2+y.get(R.right).getWidth()/2:R.gap=i.DEFAULT_EDGE_LENGTH+y.get(R.top).getHeight()/2+y.get(R.bottom).getHeight()/2)});var H=function(R){var k=0,Q=0;return R.forEach(function(Z){k+=N[v.get(Z)],Q+=A[v.get(Z)]}),{x:k/R.size,y:Q/R.size}},q=function(R,k,Q,Z,st){var It=new Map;R.forEach(function(lt,$){It.set($,0)}),R.forEach(function(lt,$){lt.forEach(function(gt){It.set(gt.id,It.get(gt.id)+1)})});var rt=new Map,mt=new Map,ft=new o;It.forEach(function(lt,$){lt==0?(ft.push($),Q||(k=="horizontal"?rt.set($,v.has($)?N[v.get($)]:Z.get($)):rt.set($,v.has($)?A[v.get($)]:Z.get($)))):rt.set($,Number.NEGATIVE_INFINITY),Q&&mt.set($,new Set([$]))}),Q&&st.forEach(function(lt){var $=[];if(lt.forEach(function(at){Q.has(at)&&$.push(at)}),$.length>0){var gt=0;$.forEach(function(at){k=="horizontal"?(rt.set(at,v.has(at)?N[v.get(at)]:Z.get(at)),gt+=rt.get(at)):(rt.set(at,v.has(at)?A[v.get(at)]:Z.get(at)),gt+=rt.get(at))}),gt/=$.length,lt.forEach(function(at){Q.has(at)||rt.set(at,gt)})}else{var Nt=0;lt.forEach(function(at){Nt+=k=="horizontal"?v.has(at)?N[v.get(at)]:Z.get(at):v.has(at)?A[v.get(at)]:Z.get(at)}),Nt/=lt.length,lt.forEach(function(at){rt.set(at,Nt)})}});for(var St=function(){var lt=ft.shift();R.get(lt).forEach(function($){if(rt.get($.id)<rt.get(lt)+$.gap)if(Q&&Q.has($.id)){var gt=void 0;if(gt=k=="horizontal"?v.has($.id)?N[v.get($.id)]:Z.get($.id):v.has($.id)?A[v.get($.id)]:Z.get($.id),rt.set($.id,gt),gt<rt.get(lt)+$.gap){var Nt=rt.get(lt)+$.gap-gt;mt.get(lt).forEach(function(at){rt.set(at,rt.get(at)-Nt)})}}else rt.set($.id,rt.get(lt)+$.gap);It.set($.id,It.get($.id)-1),It.get($.id)==0&&ft.push($.id),Q&&mt.set($.id,function(at,Ft){var bt=new Set(at),Dt=!0,At=!1,ct=void 0;try{for(var Gt,Ct=Ft[Symbol.iterator]();!(Dt=(Gt=Ct.next()).done);Dt=!0){var Yt=Gt.value;bt.add(Yt)}}catch(Xt){At=!0,ct=Xt}finally{try{!Dt&&Ct.return&&Ct.return()}finally{if(At)throw ct}}return bt}(mt.get(lt),mt.get($.id)))})};ft.length!=0;)St();if(Q){var et=new Set;R.forEach(function(lt,$){lt.length==0&&et.add($)});var pt=[];mt.forEach(function(lt,$){if(et.has($)){var gt=!1,Nt=!0,at=!1,Ft=void 0;try{for(var bt,Dt=lt[Symbol.iterator]();!(Nt=(bt=Dt.next()).done);Nt=!0){var At=bt.value;Q.has(At)&&(gt=!0)}}catch(Ct){at=!0,Ft=Ct}finally{try{!Nt&&Dt.return&&Dt.return()}finally{if(at)throw Ft}}if(!gt){var ct=!1,Gt=void 0;pt.forEach(function(Ct,Yt){Ct.has([].concat(n(lt))[0])&&(ct=!0,Gt=Yt)}),ct?lt.forEach(function(Ct){pt[Gt].add(Ct)}):pt.push(new Set(lt))}}}),pt.forEach(function(lt,$){var gt=Number.POSITIVE_INFINITY,Nt=Number.POSITIVE_INFINITY,at=Number.NEGATIVE_INFINITY,Ft=Number.NEGATIVE_INFINITY,bt=!0,Dt=!1,At=void 0;try{for(var ct,Gt=lt[Symbol.iterator]();!(bt=(ct=Gt.next()).done);bt=!0){var Ct=ct.value,Yt=void 0;Yt=k=="horizontal"?v.has(Ct)?N[v.get(Ct)]:Z.get(Ct):v.has(Ct)?A[v.get(Ct)]:Z.get(Ct);var Xt=rt.get(Ct);Yt<gt&&(gt=Yt),Yt>at&&(at=Yt),Xt<Nt&&(Nt=Xt),Xt>Ft&&(Ft=Xt)}}catch(Wt){Dt=!0,At=Wt}finally{try{!bt&&Gt.return&&Gt.return()}finally{if(Dt)throw At}}var ne=(gt+at)/2-(Nt+Ft)/2,Jt=!0,Bt=!1,jt=void 0;try{for(var qt,Vt=lt[Symbol.iterator]();!(Jt=(qt=Vt.next()).done);Jt=!0){var te=qt.value;rt.set(te,rt.get(te)+ne)}}catch(Wt){Bt=!0,jt=Wt}finally{try{!Jt&&Vt.return&&Vt.return()}finally{if(Bt)throw jt}}})}return rt},_=function(R){var k=0,Q=0,Z=0,st=0;if(R.forEach(function(ft){ft.left?N[v.get(ft.left)]-N[v.get(ft.right)]>=0?k++:Q++:A[v.get(ft.top)]-A[v.get(ft.bottom)]>=0?Z++:st++}),k>Q&&Z>st)for(var It=0;It<v.size;It++)N[It]=-1*N[It],A[It]=-1*A[It];else if(k>Q)for(var rt=0;rt<v.size;rt++)N[rt]=-1*N[rt];else if(Z>st)for(var mt=0;mt<v.size;mt++)A[mt]=-1*A[mt]},B=function(R){var k=[],Q=new o,Z=new Set,st=0;return R.forEach(function(It,rt){if(!Z.has(rt)){k[st]=[];var mt=rt;for(Q.push(mt),Z.add(mt),k[st].push(mt);Q.length!=0;)mt=Q.shift(),R.get(mt).forEach(function(ft){Z.has(ft.id)||(Q.push(ft.id),Z.add(ft.id),k[st].push(ft.id))});st++}}),k},s=function(R){var k=new Map;return R.forEach(function(Q,Z){k.set(Z,[])}),R.forEach(function(Q,Z){Q.forEach(function(st){k.get(Z).push(st),k.get(st.id).push({id:Z,gap:st.gap,direction:st.direction})})}),k},m=function(R){var k=new Map;return R.forEach(function(Q,Z){k.set(Z,[])}),R.forEach(function(Q,Z){Q.forEach(function(st){k.get(st.id).push({id:Z,gap:st.gap,direction:st.direction})})}),k},u=[],p=[],f=!1,w=!1,I=new Set,x=new Map,F=new Map,G=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(R){I.add(R.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(R){R.left?(x.has(R.left)?x.get(R.left).push({id:R.right,gap:R.gap,direction:"horizontal"}):x.set(R.left,[{id:R.right,gap:R.gap,direction:"horizontal"}]),x.has(R.right)||x.set(R.right,[])):(x.has(R.top)?x.get(R.top).push({id:R.bottom,gap:R.gap,direction:"vertical"}):x.set(R.top,[{id:R.bottom,gap:R.gap,direction:"vertical"}]),x.has(R.bottom)||x.set(R.bottom,[]))}),F=s(x),G=B(F)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(R,k){u[k]=[R.position.x,R.position.y],p[k]=[N[v.get(R.nodeId)],A[v.get(R.nodeId)]]}),f=!0;else if(l.alignmentConstraint)(function(){var R=0;if(l.alignmentConstraint.vertical){for(var k=l.alignmentConstraint.vertical,Q=function(mt){var ft=new Set;k[mt].forEach(function(pt){ft.add(pt)});var St=new Set([].concat(n(ft)).filter(function(pt){return I.has(pt)})),et=void 0;et=St.size>0?N[v.get(St.values().next().value)]:H(ft).x,k[mt].forEach(function(pt){u[R]=[et,A[v.get(pt)]],p[R]=[N[v.get(pt)],A[v.get(pt)]],R++})},Z=0;Z<k.length;Z++)Q(Z);f=!0}if(l.alignmentConstraint.horizontal){for(var st=l.alignmentConstraint.horizontal,It=function(mt){var ft=new Set;st[mt].forEach(function(pt){ft.add(pt)});var St=new Set([].concat(n(ft)).filter(function(pt){return I.has(pt)})),et=void 0;et=St.size>0?N[v.get(St.values().next().value)]:H(ft).y,st[mt].forEach(function(pt){u[R]=[N[v.get(pt)],et],p[R]=[N[v.get(pt)],A[v.get(pt)]],R++})},rt=0;rt<st.length;rt++)It(rt);f=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var S=0,D=0,z=0;z<G.length;z++)G[z].length>S&&(S=G[z].length,D=z);if(S<F.size/2)_(l.relativePlacementConstraint),f=!1,w=!1;else{var W=new Map,U=new Map,O=[];G[D].forEach(function(R){x.get(R).forEach(function(k){k.direction=="horizontal"?(W.has(R)?W.get(R).push(k):W.set(R,[k]),W.has(k.id)||W.set(k.id,[]),O.push({left:R,right:k.id})):(U.has(R)?U.get(R).push(k):U.set(R,[k]),U.has(k.id)||U.set(k.id,[]),O.push({top:R,bottom:k.id}))})}),_(O),w=!1;var X=q(W,"horizontal"),j=q(U,"vertical");G[D].forEach(function(R,k){p[k]=[N[v.get(R)],A[v.get(R)]],u[k]=[],X.has(R)?u[k][0]=X.get(R):u[k][0]=N[v.get(R)],j.has(R)?u[k][1]=j.get(R):u[k][1]=A[v.get(R)]}),f=!0}}if(f){for(var K,it=t.transpose(u),V=t.transpose(p),yt=0;yt<it.length;yt++)it[yt]=t.multGamma(it[yt]),V[yt]=t.multGamma(V[yt]);var Lt=t.multMat(it,t.transpose(V)),Ut=h.svd(Lt);K=t.multMat(Ut.V,t.transpose(Ut.U));for(var Rt=0;Rt<v.size;Rt++){var J=[N[Rt],A[Rt]],ot=[K[0][0],K[1][0]],ut=[K[0][1],K[1][1]];N[Rt]=t.dotProduct(J,ot),A[Rt]=t.dotProduct(J,ut)}w&&_(l.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var dt={x:0,y:0};l.fixedNodeConstraint.forEach(function(R,k){var Q,Z,st={x:N[v.get(R.nodeId)],y:A[v.get(R.nodeId)]},It=R.position,rt=(Z=st,{x:(Q=It).x-Z.x,y:Q.y-Z.y});dt.x+=rt.x,dt.y+=rt.y}),dt.x/=l.fixedNodeConstraint.length,dt.y/=l.fixedNodeConstraint.length,N.forEach(function(R,k){N[k]+=dt.x}),A.forEach(function(R,k){A[k]+=dt.y}),l.fixedNodeConstraint.forEach(function(R){N[v.get(R.nodeId)]=R.position.x,A[v.get(R.nodeId)]=R.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var vt=l.alignmentConstraint.vertical,Et=function(R){var k=new Set;vt[R].forEach(function(st){k.add(st)});var Q=new Set([].concat(n(k)).filter(function(st){return I.has(st)})),Z=void 0;Z=Q.size>0?N[v.get(Q.values().next().value)]:H(k).x,k.forEach(function(st){I.has(st)||(N[v.get(st)]=Z)})},ht=0;ht<vt.length;ht++)Et(ht);if(l.alignmentConstraint.horizontal)for(var Tt=l.alignmentConstraint.horizontal,_t=function(R){var k=new Set;Tt[R].forEach(function(st){k.add(st)});var Q=new Set([].concat(n(k)).filter(function(st){return I.has(st)})),Z=void 0;Z=Q.size>0?A[v.get(Q.values().next().value)]:H(k).y,k.forEach(function(st){I.has(st)||(A[v.get(st)]=Z)})},Ot=0;Ot<Tt.length;Ot++)_t(Ot)}l.relativePlacementConstraint&&function(){var R=new Map,k=new Map,Q=new Map,Z=new Map,st=new Map,It=new Map,rt=new Set,mt=new Set;if(I.forEach(function(tt){rt.add(tt),mt.add(tt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var ft=l.alignmentConstraint.vertical,St=function(tt){Q.set("dummy"+tt,[]),ft[tt].forEach(function(wt){R.set(wt,"dummy"+tt),Q.get("dummy"+tt).push(wt),I.has(wt)&&rt.add("dummy"+tt)}),st.set("dummy"+tt,N[v.get(ft[tt][0])])},et=0;et<ft.length;et++)St(et);if(l.alignmentConstraint.horizontal)for(var pt=l.alignmentConstraint.horizontal,lt=function(tt){Z.set("dummy"+tt,[]),pt[tt].forEach(function(wt){k.set(wt,"dummy"+tt),Z.get("dummy"+tt).push(wt),I.has(wt)&&mt.add("dummy"+tt)}),It.set("dummy"+tt,A[v.get(pt[tt][0])])},$=0;$<pt.length;$++)lt($)}var gt=new Map,Nt=new Map,at=function(tt){x.get(tt).forEach(function(wt){var kt=void 0,Ht=void 0;wt.direction=="horizontal"?(kt=R.get(tt)?R.get(tt):tt,Ht=R.get(wt.id)?{id:R.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,gt.has(kt)?gt.get(kt).push(Ht):gt.set(kt,[Ht]),gt.has(Ht.id)||gt.set(Ht.id,[])):(kt=k.get(tt)?k.get(tt):tt,Ht=k.get(wt.id)?{id:k.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,Nt.has(kt)?Nt.get(kt).push(Ht):Nt.set(kt,[Ht]),Nt.has(Ht.id)||Nt.set(Ht.id,[]))})},Ft=!0,bt=!1,Dt=void 0;try{for(var At,ct=x.keys()[Symbol.iterator]();!(Ft=(At=ct.next()).done);Ft=!0)at(At.value)}catch(tt){bt=!0,Dt=tt}finally{try{!Ft&&ct.return&&ct.return()}finally{if(bt)throw Dt}}var Gt=s(gt),Ct=s(Nt),Yt=B(Gt),Xt=B(Ct),ne=m(gt),Jt=m(Nt),Bt=[],jt=[];Yt.forEach(function(tt,wt){Bt[wt]=[],tt.forEach(function(kt){ne.get(kt).length==0&&Bt[wt].push(kt)})}),Xt.forEach(function(tt,wt){jt[wt]=[],tt.forEach(function(kt){Jt.get(kt).length==0&&jt[wt].push(kt)})});var qt=q(gt,"horizontal",rt,st,Bt),Vt=q(Nt,"vertical",mt,It,jt),te=function(tt){Q.get(tt)?Q.get(tt).forEach(function(wt){N[v.get(wt)]=qt.get(tt)}):N[v.get(tt)]=qt.get(tt)},Wt=!0,ce=!1,ue=void 0;try{for(var fe,re=qt.keys()[Symbol.iterator]();!(Wt=(fe=re.next()).done);Wt=!0)te(fe.value)}catch(tt){ce=!0,ue=tt}finally{try{!Wt&&re.return&&re.return()}finally{if(ce)throw ue}}var Xe=function(tt){Z.get(tt)?Z.get(tt).forEach(function(wt){A[v.get(wt)]=Vt.get(tt)}):A[v.get(tt)]=Vt.get(tt)},ie=!0,pe=!1,me=void 0;try{for(var ve,oe=Vt.keys()[Symbol.iterator]();!(ie=(ve=oe.next()).done);ie=!0)Xe(ve.value)}catch(tt){pe=!0,me=tt}finally{try{!ie&&oe.return&&oe.return()}finally{if(pe)throw me}}}()}for(var Mt=0;Mt<M.length;Mt++){var xt=M[Mt];xt.getChild()==null&&xt.setCenter(N[v.get(xt.id)],A[v.get(xt.id)])}},r.exports=g},551:r=>{r.exports=T}},E={},d=function r(a){var e=E[a];if(e!==void 0)return e.exports;var n=E[a]={exports:{}};return L[a](n,n.exports,r),n.exports}(45),d;var L,E,d},Ae.exports=C(ln()));var C}var Ie,Ce,Me,le;const gn=an(Ie?Te.exports:(Ie=1,Te.exports=(Ce=dn(),Me={658:C=>{C.exports=Object.assign!=null?Object.assign.bind(Object):function(T){for(var L=arguments.length,E=Array(L>1?L-1:0),d=1;d<L;d++)E[d-1]=arguments[d];return E.forEach(function(r){Object.keys(r).forEach(function(a){return T[a]=r[a]})}),T}},548:(C,T,L)=>{var E=function(a,e){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return function(n,i){var o=[],t=!0,h=!1,g=void 0;try{for(var c,l=n[Symbol.iterator]();!(t=(c=l.next()).done)&&(o.push(c.value),!i||o.length!==i);t=!0);}catch(y){h=!0,g=y}finally{try{!t&&l.return&&l.return()}finally{if(h)throw g}}return o}(a,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},d=L(140).layoutBase.LinkedList,r={getTopMostNodes:function(a){for(var e={},n=0;n<a.length;n++)e[a[n].id()]=!0;var i=a.filter(function(o,t){typeof o=="number"&&(o=t);for(var h=o.parent()[0];h!=null;){if(e[h.id()])return!1;h=h.parent()[0]}return!0});return i},connectComponents:function(a,e,n,i){var o=new d,t=new Set,h=[],g=void 0,c=void 0,l=void 0,y=!1,v=1,N=[],A=[],M=function(){var P=a.collection();A.push(P);var b=n[0],Y=a.collection();Y.merge(b).merge(b.descendants().intersection(e)),h.push(b),Y.forEach(function(_){o.push(_),t.add(_),P.merge(_)});for(var H=function(){b=o.shift();var _=a.collection();b.neighborhood().nodes().forEach(function(m){e.intersection(b.edgesWith(m)).length>0&&_.merge(m)});for(var B=0;B<_.length;B++){var s=_[B];(g=n.intersection(s.union(s.ancestors())))==null||t.has(g[0])||g.union(g.descendants()).forEach(function(m){o.push(m),t.add(m),P.merge(m),n.has(m)&&h.push(m)})}};o.length!=0;)H();if(P.forEach(function(_){e.intersection(_.connectedEdges()).forEach(function(B){P.has(B.source())&&P.has(B.target())&&P.merge(B)})}),h.length==n.length&&(y=!0),!y||y&&v>1){c=h[0],l=c.connectedEdges().length,h.forEach(function(_){_.connectedEdges().length<l&&(l=_.connectedEdges().length,c=_)}),N.push(c.id());var q=a.collection();q.merge(h[0]),h.forEach(function(_){q.merge(_)}),h=[],n=n.difference(q),v++}};do M();while(!y);return i&&N.length>0&&i.set("dummy"+(i.size+1),N),A},relocateComponent:function(a,e,n){if(!n.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(n.quality=="draft"){var g=!0,c=!1,l=void 0;try{for(var y,v=e.nodeIndexes[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var N=y.value,A=E(N,2),M=A[0],P=A[1],b=n.cy.getElementById(M);if(b){var Y=b.boundingBox(),H=e.xCoords[P]-Y.w/2,q=e.xCoords[P]+Y.w/2,_=e.yCoords[P]-Y.h/2,B=e.yCoords[P]+Y.h/2;H<i&&(i=H),q>o&&(o=q),_<t&&(t=_),B>h&&(h=B)}}}catch(f){c=!0,l=f}finally{try{!g&&v.return&&v.return()}finally{if(c)throw l}}var s=a.x-(o+i)/2,m=a.y-(h+t)/2;e.xCoords=e.xCoords.map(function(f){return f+s}),e.yCoords=e.yCoords.map(function(f){return f+m})}else{Object.keys(e).forEach(function(f){var w=e[f],I=w.getRect().x,x=w.getRect().x+w.getRect().width,F=w.getRect().y,G=w.getRect().y+w.getRect().height;I<i&&(i=I),x>o&&(o=x),F<t&&(t=F),G>h&&(h=G)});var u=a.x-(o+i)/2,p=a.y-(h+t)/2;Object.keys(e).forEach(function(f){var w=e[f];w.setCenter(w.getCenterX()+u,w.getCenterY()+p)})}}},calcBoundingBox:function(a,e,n,i){for(var o=Number.MAX_SAFE_INTEGER,t=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,g=Number.MIN_SAFE_INTEGER,c=void 0,l=void 0,y=void 0,v=void 0,N=a.descendants().not(":parent"),A=N.length,M=0;M<A;M++){var P=N[M];o>(c=e[i.get(P.id())]-P.width()/2)&&(o=c),t<(l=e[i.get(P.id())]+P.width()/2)&&(t=l),h>(y=n[i.get(P.id())]-P.height()/2)&&(h=y),g<(v=n[i.get(P.id())]+P.height()/2)&&(g=v)}var b={};return b.topLeftX=o,b.topLeftY=h,b.width=t-o,b.height=g-h,b},calcParentsWithoutChildren:function(a,e){var n=a.collection();return e.nodes(":parent").forEach(function(i){var o=!1;i.children().forEach(function(t){t.css("display")!="none"&&(o=!0)}),o||n.merge(i)}),n}};C.exports=r},816:(C,T,L)=>{var E=L(548),d=L(140).CoSELayout,r=L(140).CoSENode,a=L(140).layoutBase.PointD,e=L(140).layoutBase.DimensionD,n=L(140).layoutBase.LayoutConstants,i=L(140).layoutBase.FDLayoutConstants,o=L(140).CoSEConstants;C.exports={coseLayout:function(t,h){var g=t.cy,c=t.eles,l=c.nodes(),y=c.edges(),v=void 0,N=void 0,A=void 0,M={};t.randomize&&(v=h.nodeIndexes,N=h.xCoords,A=h.yCoords);var P=function(_){return typeof _=="function"},b=function(_,B){return P(_)?_(B):_},Y=E.calcParentsWithoutChildren(g,c);t.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),t.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),t.numIter!=null&&(o.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),t.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),t.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),t.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),t.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),t.tilingCompareBy!=null&&(o.TILING_COMPARE_BY=t.tilingCompareBy),t.quality=="proof"?n.QUALITY=2:n.QUALITY=0,o.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical=="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal=="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!0,o.PURE_INCREMENTAL=!t.randomize,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,t.step=="transformed"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!1),t.step=="enforced"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!1),t.step=="cose"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!0),t.step=="all"&&(t.randomize?o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?o.TREE_REDUCTION_ON_INCREMENTAL=!1:o.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new d,q=H.newGraphManager();return function _(B,s,m,u){for(var p=s.length,f=0;f<p;f++){var w=s[f],I=null;w.intersection(Y).length==0&&(I=w.children());var x=void 0,F=w.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null)if(u.randomize)if(w.isParent()){var G=E.calcBoundingBox(w,N,A,v);x=w.intersection(Y).length==0?B.add(new r(m.graphManager,new a(G.topLeftX,G.topLeftY),new e(G.width,G.height))):B.add(new r(m.graphManager,new a(G.topLeftX,G.topLeftY),new e(parseFloat(F.w),parseFloat(F.h))))}else x=B.add(new r(m.graphManager,new a(N[v.get(w.id())]-F.w/2,A[v.get(w.id())]-F.h/2),new e(parseFloat(F.w),parseFloat(F.h))));else x=B.add(new r(m.graphManager,new a(w.position("x")-F.w/2,w.position("y")-F.h/2),new e(parseFloat(F.w),parseFloat(F.h))));else x=B.add(new r(this.graphManager));x.id=w.data("id"),x.nodeRepulsion=b(u.nodeRepulsion,w),x.paddingLeft=parseInt(w.css("padding")),x.paddingTop=parseInt(w.css("padding")),x.paddingRight=parseInt(w.css("padding")),x.paddingBottom=parseInt(w.css("padding")),u.nodeDimensionsIncludeLabels&&(x.labelWidth=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,x.labelHeight=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,x.labelPosVertical=w.css("text-valign"),x.labelPosHorizontal=w.css("text-halign")),M[w.data("id")]=x,isNaN(x.rect.x)&&(x.rect.x=0),isNaN(x.rect.y)&&(x.rect.y=0),I!=null&&I.length>0&&_(m.getGraphManager().add(m.newGraph(),x),I,m,u)}}(q.addRoot(),E.getTopMostNodes(l),H,t),function(_,B,s){for(var m=0,u=0,p=0;p<s.length;p++){var f=s[p],w=M[f.data("source")],I=M[f.data("target")];if(w&&I&&w!==I&&w.getEdgesBetween(I).length==0){var x=B.add(_.newEdge(),w,I);x.id=f.id(),x.idealLength=b(t.idealEdgeLength,f),x.edgeElasticity=b(t.edgeElasticity,f),m+=x.idealLength,u++}}t.idealEdgeLength!=null&&(u>0?o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=m/u:P(t.idealEdgeLength)?o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=50:o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,o.MIN_REPULSION_DIST=i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,o.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH)}(H,q,y),function(_,B){B.fixedNodeConstraint&&(_.constraints.fixedNodeConstraint=B.fixedNodeConstraint),B.alignmentConstraint&&(_.constraints.alignmentConstraint=B.alignmentConstraint),B.relativePlacementConstraint&&(_.constraints.relativePlacementConstraint=B.relativePlacementConstraint)}(H,t),H.runLayout(),M}}},212:(C,T,L)=>{var E=function(){function o(t,h){for(var g=0;g<h.length;g++){var c=h[g];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}return function(t,h,g){return h&&o(t.prototype,h),g&&o(t,g),t}}(),d=L(658),r=L(548),a=L(657).spectralLayout,e=L(816).coseLayout,n=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(o){return 4500},idealEdgeLength:function(o){return 50},edgeElasticity:function(o){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(){}}),i=function(){function o(t){(function(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,o),this.options=d({},n,t)}return E(o,[{key:"run",value:function(){var t=this.options,h=t.cy,g=t.eles,c=[],l=[],y=void 0,v=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&t.fixedNodeConstraint.length!=0||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&t.alignmentConstraint.vertical.length!=0||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&t.alignmentConstraint.horizontal.length!=0||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&t.relativePlacementConstraint.length!=0||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var N=void 0,A=!1;if(h.layoutUtilities&&t.packComponents&&((N=h.layoutUtilities("get"))||(N=h.layoutUtilities()),A=!0),g.nodes().length>0)if(A){var M=r.getTopMostNodes(t.eles.nodes());if((y=r.connectComponents(h,t.eles,M)).forEach(function(S){var D=S.boundingBox();v.push({x:D.x1+D.w/2,y:D.y1+D.h/2})}),t.randomize&&y.forEach(function(S){t.eles=S,c.push(a(t))}),t.quality=="default"||t.quality=="proof"){var P=h.collection();if(t.tile){var b=new Map,Y=0,H={nodeIndexes:b,xCoords:[],yCoords:[]},q=[];if(y.forEach(function(S,D){S.edges().length==0&&(S.nodes().forEach(function(z,W){P.merge(S.nodes()[W]),z.isParent()||(H.nodeIndexes.set(S.nodes()[W].id(),Y++),H.xCoords.push(S.nodes()[0].position().x),H.yCoords.push(S.nodes()[0].position().y))}),q.push(D))}),P.length>1){var _=P.boundingBox();v.push({x:_.x1+_.w/2,y:_.y1+_.h/2}),y.push(P),c.push(H);for(var B=q.length-1;B>=0;B--)y.splice(q[B],1),c.splice(q[B],1),v.splice(q[B],1)}}y.forEach(function(S,D){t.eles=S,l.push(e(t,c[D])),r.relocateComponent(v[D],l[D],t)})}else y.forEach(function(S,D){r.relocateComponent(v[D],c[D],t)});var s=new Set;if(y.length>1){var m=[],u=g.filter(function(S){return S.css("display")=="none"});y.forEach(function(S,D){var z=void 0;if(t.quality=="draft"&&(z=c[D].nodeIndexes),S.nodes().not(u).length>0){var W={edges:[],nodes:[]},U=void 0;S.nodes().not(u).forEach(function(O){if(t.quality=="draft")if(O.isParent()){var X=r.calcBoundingBox(O,c[D].xCoords,c[D].yCoords,z);W.nodes.push({x:X.topLeftX,y:X.topLeftY,width:X.width,height:X.height})}else U=z.get(O.id()),W.nodes.push({x:c[D].xCoords[U]-O.boundingbox().w/2,y:c[D].yCoords[U]-O.boundingbox().h/2,width:O.boundingbox().w,height:O.boundingbox().h});else l[D][O.id()]&&W.nodes.push({x:l[D][O.id()].getLeft(),y:l[D][O.id()].getTop(),width:l[D][O.id()].getWidth(),height:l[D][O.id()].getHeight()})}),S.edges().forEach(function(O){var X=O.source(),j=O.target();if(X.css("display")!="none"&&j.css("display")!="none")if(t.quality=="draft"){var K=z.get(X.id()),it=z.get(j.id()),V=[],yt=[];if(X.isParent()){var Lt=r.calcBoundingBox(X,c[D].xCoords,c[D].yCoords,z);V.push(Lt.topLeftX+Lt.width/2),V.push(Lt.topLeftY+Lt.height/2)}else V.push(c[D].xCoords[K]),V.push(c[D].yCoords[K]);if(j.isParent()){var Ut=r.calcBoundingBox(j,c[D].xCoords,c[D].yCoords,z);yt.push(Ut.topLeftX+Ut.width/2),yt.push(Ut.topLeftY+Ut.height/2)}else yt.push(c[D].xCoords[it]),yt.push(c[D].yCoords[it]);W.edges.push({startX:V[0],startY:V[1],endX:yt[0],endY:yt[1]})}else l[D][X.id()]&&l[D][j.id()]&&W.edges.push({startX:l[D][X.id()].getCenterX(),startY:l[D][X.id()].getCenterY(),endX:l[D][j.id()].getCenterX(),endY:l[D][j.id()].getCenterY()})}),W.nodes.length>0&&(m.push(W),s.add(D))}});var p=N.packComponents(m,t.randomize).shifts;if(t.quality=="draft")c.forEach(function(S,D){var z=S.xCoords.map(function(U){return U+p[D].dx}),W=S.yCoords.map(function(U){return U+p[D].dy});S.xCoords=z,S.yCoords=W});else{var f=0;s.forEach(function(S){Object.keys(l[S]).forEach(function(D){var z=l[S][D];z.setCenter(z.getCenterX()+p[f].dx,z.getCenterY()+p[f].dy)}),f++})}}}else{var w=t.eles.boundingBox();if(v.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),t.randomize){var I=a(t);c.push(I)}t.quality=="default"||t.quality=="proof"?(l.push(e(t,c[0])),r.relocateComponent(v[0],l[0],t)):r.relocateComponent(v[0],c[0],t)}var x=function(S,D){if(t.quality=="default"||t.quality=="proof"){typeof S=="number"&&(S=D);var z=void 0,W=void 0,U=S.data("id");return l.forEach(function(X){U in X&&(z={x:X[U].getRect().getCenterX(),y:X[U].getRect().getCenterY()},W=X[U])}),t.nodeDimensionsIncludeLabels&&(W.labelWidth&&(W.labelPosHorizontal=="left"?z.x+=W.labelWidth/2:W.labelPosHorizontal=="right"&&(z.x-=W.labelWidth/2)),W.labelHeight&&(W.labelPosVertical=="top"?z.y+=W.labelHeight/2:W.labelPosVertical=="bottom"&&(z.y-=W.labelHeight/2))),z==null&&(z={x:S.position("x"),y:S.position("y")}),{x:z.x,y:z.y}}var O=void 0;return c.forEach(function(X){var j=X.nodeIndexes.get(S.id());j!=null&&(O={x:X.xCoords[j],y:X.yCoords[j]})}),O==null&&(O={x:S.position("x"),y:S.position("y")}),{x:O.x,y:O.y}};if(t.quality=="default"||t.quality=="proof"||t.randomize){var F=r.calcParentsWithoutChildren(h,g),G=g.filter(function(S){return S.css("display")=="none"});t.eles=g.not(G),g.nodes().not(":parent").not(G).layoutPositions(this,t,x),F.length>0&&F.forEach(function(S){S.position(x(S))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();C.exports=i},657:(C,T,L)=>{var E=L(548),d=L(140).layoutBase.Matrix,r=L(140).layoutBase.SVD;C.exports={spectralLayout:function(a){var e=a.cy,n=a.eles,i=n.nodes(),o=n.nodes(":parent"),t=new Map,h=new Map,g=new Map,c=[],l=[],y=[],v=[],N=[],A=[],M=[],P=[],b=void 0,Y=1e8,H=1e-9,q=a.piTol,_=a.samplingType,B=a.nodeSeparation,s=void 0,m=function(J,ot,ut){for(var dt=[],vt=0,Et=0,ht=0,Tt=void 0,_t=[],Ot=0,Mt=1,xt=0;xt<b;xt++)_t[xt]=Y;for(dt[Et]=J,_t[J]=0;Et>=vt;){ht=dt[vt++];for(var R=c[ht],k=0;k<R.length;k++)_t[Tt=h.get(R[k])]==Y&&(_t[Tt]=_t[ht]+1,dt[++Et]=Tt);A[ht][ot]=_t[ht]*B}if(ut){for(var Q=0;Q<b;Q++)A[Q][ot]<N[Q]&&(N[Q]=A[Q][ot]);for(var Z=0;Z<b;Z++)N[Z]>Ot&&(Ot=N[Z],Mt=Z)}return Mt};E.connectComponents(e,n,E.getTopMostNodes(i),t),o.forEach(function(J){E.connectComponents(e,n,E.getTopMostNodes(J.descendants().intersection(n)),t)});for(var u=0,p=0;p<i.length;p++)i[p].isParent()||h.set(i[p].id(),u++);var f=!0,w=!1,I=void 0;try{for(var x,F=t.keys()[Symbol.iterator]();!(f=(x=F.next()).done);f=!0){var G=x.value;h.set(G,u++)}}catch(J){w=!0,I=J}finally{try{!f&&F.return&&F.return()}finally{if(w)throw I}}for(var S=0;S<h.size;S++)c[S]=[];o.forEach(function(J){for(var ot=J.children().intersection(n);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(n);var ut=0,dt=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(vt,Et){vt.connectedEdges().length<dt&&(dt=vt.connectedEdges().length,ut=Et)}),g.set(J.id(),ot.nodes(":childless")[ut].id())}),i.forEach(function(J){var ot=void 0;ot=J.isParent()?h.get(g.get(J.id())):h.get(J.id()),J.neighborhood().nodes().forEach(function(ut){n.intersection(J.edgesWith(ut)).length>0&&(ut.isParent()?c[ot].push(g.get(ut.id())):c[ot].push(ut.id()))})});var D=function(J){var ot=h.get(J),ut=void 0;t.get(J).forEach(function(dt){ut=e.getElementById(dt).isParent()?g.get(dt):dt,c[ot].push(ut),c[h.get(ut)].push(J)})},z=!0,W=!1,U=void 0;try{for(var O,X=t.keys()[Symbol.iterator]();!(z=(O=X.next()).done);z=!0)D(O.value)}catch(J){W=!0,U=J}finally{try{!z&&X.return&&X.return()}finally{if(W)throw U}}var j=void 0;if((b=h.size)>2){s=b<a.sampleSize?b:a.sampleSize;for(var K=0;K<b;K++)A[K]=[];for(var it=0;it<s;it++)P[it]=[];return a.quality=="draft"||a.step=="all"?(function(J){var ot=void 0;if(J){ot=Math.floor(Math.random()*b);for(var ut=0;ut<b;ut++)N[ut]=Y;for(var dt=0;dt<s;dt++)v[dt]=ot,ot=m(ot,dt,J)}else{(function(){for(var Mt=0,xt=0,R=!1;xt<s;){Mt=Math.floor(Math.random()*b),R=!1;for(var k=0;k<xt;k++)if(v[k]==Mt){R=!0;break}R||(v[xt]=Mt,xt++)}})();for(var vt=0;vt<s;vt++)m(v[vt],vt,J)}for(var Et=0;Et<b;Et++)for(var ht=0;ht<s;ht++)A[Et][ht]*=A[Et][ht];for(var Tt=0;Tt<s;Tt++)M[Tt]=[];for(var _t=0;_t<s;_t++)for(var Ot=0;Ot<s;Ot++)M[_t][Ot]=A[v[Ot]][_t]}(_),function(){for(var J=r.svd(M),ot=J.S,ut=J.U,dt=J.V,vt=ot[0]*ot[0]*ot[0],Et=[],ht=0;ht<s;ht++){Et[ht]=[];for(var Tt=0;Tt<s;Tt++)Et[ht][Tt]=0,ht==Tt&&(Et[ht][Tt]=ot[ht]/(ot[ht]*ot[ht]+vt/(ot[ht]*ot[ht])))}P=d.multMat(d.multMat(dt,Et),d.transpose(ut))}(),function(){for(var J=void 0,ot=void 0,ut=[],dt=[],vt=[],Et=[],ht=0;ht<b;ht++)ut[ht]=Math.random(),dt[ht]=Math.random();ut=d.normalize(ut),dt=d.normalize(dt);for(var Tt=H,_t=H,Ot=void 0;;){for(var Mt=0;Mt<b;Mt++)vt[Mt]=ut[Mt];if(ut=d.multGamma(d.multL(d.multGamma(vt),A,P)),J=d.dotProduct(vt,ut),ut=d.normalize(ut),Tt=d.dotProduct(vt,ut),(Ot=Math.abs(Tt/_t))<=1+q&&Ot>=1)break;_t=Tt}for(var xt=0;xt<b;xt++)vt[xt]=ut[xt];for(_t=H;;){for(var R=0;R<b;R++)Et[R]=dt[R];if(Et=d.minusOp(Et,d.multCons(vt,d.dotProduct(vt,Et))),dt=d.multGamma(d.multL(d.multGamma(Et),A,P)),ot=d.dotProduct(Et,dt),dt=d.normalize(dt),Tt=d.dotProduct(Et,dt),(Ot=Math.abs(Tt/_t))<=1+q&&Ot>=1)break;_t=Tt}for(var k=0;k<b;k++)Et[k]=dt[k];l=d.multCons(vt,Math.sqrt(Math.abs(J))),y=d.multCons(Et,Math.sqrt(Math.abs(ot)))}(),j={nodeIndexes:h,xCoords:l,yCoords:y}):(h.forEach(function(J,ot){l.push(e.getElementById(ot).position("x")),y.push(e.getElementById(ot).position("y"))}),j={nodeIndexes:h,xCoords:l,yCoords:y}),j}var V=h.keys(),yt=e.getElementById(V.next().value),Lt=yt.position(),Ut=yt.outerWidth();if(l.push(Lt.x),y.push(Lt.y),b==2){var Rt=e.getElementById(V.next().value).outerWidth();l.push(Lt.x+Ut/2+Rt/2+a.idealEdgeLength),y.push(Lt.y)}return j={nodeIndexes:h,xCoords:l,yCoords:y}}}},579:(C,T,L)=>{var E=L(212),d=function(r){r&&r("layout","fcose",E)};typeof cytoscape<"u"&&d(cytoscape),C.exports=d},140:C=>{C.exports=Ce}},le={},function C(T){var L=le[T];if(L!==void 0)return L.exports;var E=le[T]={exports:{}};return Me[T](E,E.exports,C),E.exports}(579))));var xe={L:"left",R:"right",T:"top",B:"bottom"},_e={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},ee={L:nt((C,T)=>C-T+2,"L"),R:nt((C,T)=>C-2,"R"),T:nt((C,T)=>C-T+2,"T"),B:nt((C,T)=>C-2,"B")},cn=nt(function(C){return Pt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Oe=nt(function(C){return C==="L"||C==="R"||C==="T"||C==="B"},"isArchitectureDirection"),Pt=nt(function(C){return C==="L"||C==="R"},"isArchitectureDirectionX"),zt=nt(function(C){return C==="T"||C==="B"},"isArchitectureDirectionY"),de=nt(function(C,T){const L=Pt(C)&&zt(T),E=zt(C)&&Pt(T);return L||E},"isArchitectureDirectionXY"),un=nt(function(C){const T=C[0],L=C[1],E=Pt(T)&&zt(L),d=zt(T)&&Pt(L);return E||d},"isArchitecturePairXY"),fn=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),ge=nt(function(C,T){const L=`${C}${T}`;return fn(L)?L:void 0},"getArchitectureDirectionPair"),pn=nt(function([C,T],L){const E=L[0],d=L[1];return Pt(E)?zt(d)?[C+(E==="L"?-1:1),T+(d==="T"?1:-1)]:[C+(E==="L"?-1:1),T]:Pt(d)?[C+(d==="L"?1:-1),T+(E==="T"?1:-1)]:[C,T+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mn=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),vn=nt(function(C,T){return de(C,T)?"bend":Pt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),yn=nt(function(C){return C.type==="service"},"isArchitectureService"),En=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),De=nt(C=>C.data(),"edgeData"),$t=nt(C=>C.data(),"nodeData"),Nn=tn.architecture,Re=(Qt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=We,this.getAccTitle=Be,this.setDiagramTitle=je,this.getDiagramTitle=qe,this.getAccDescription=$e,this.setAccDescription=Ze,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Qe()}addService({id:T,icon:L,in:E,title:d,iconText:r}){if(this.registeredIds[T]!==void 0)throw new Error(`The service id [${T}] is already in use by another ${this.registeredIds[T]}`);if(E!==void 0){if(T===E)throw new Error(`The service [${T}] cannot be placed within itself`);if(this.registeredIds[E]===void 0)throw new Error(`The service [${T}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[E]==="node")throw new Error(`The service [${T}]'s parent is not a group`)}this.registeredIds[T]="node",this.nodes[T]={id:T,type:"service",icon:L,iconText:r,title:d,edges:[],in:E}}getServices(){return Object.values(this.nodes).filter(yn)}addJunction({id:T,in:L}){this.registeredIds[T]="node",this.nodes[T]={id:T,type:"junction",edges:[],in:L}}getJunctions(){return Object.values(this.nodes).filter(En)}getNodes(){return Object.values(this.nodes)}getNode(T){return this.nodes[T]??null}addGroup({id:T,icon:L,in:E,title:d}){var r,a,e;if(((r=this.registeredIds)==null?void 0:r[T])!==void 0)throw new Error(`The group id [${T}] is already in use by another ${this.registeredIds[T]}`);if(E!==void 0){if(T===E)throw new Error(`The group [${T}] cannot be placed within itself`);if(((a=this.registeredIds)==null?void 0:a[E])===void 0)throw new Error(`The group [${T}]'s parent does not exist. Please make sure the parent is created before this group`);if(((e=this.registeredIds)==null?void 0:e[E])==="node")throw new Error(`The group [${T}]'s parent is not a group`)}this.registeredIds[T]="group",this.groups[T]={id:T,icon:L,title:d,in:E}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:T,rhsId:L,lhsDir:E,rhsDir:d,lhsInto:r,rhsInto:a,lhsGroup:e,rhsGroup:n,title:i}){if(!Oe(E))throw new Error(`Invalid direction given for left hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${String(E)}`);if(!Oe(d))throw new Error(`Invalid direction given for right hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${String(d)}`);if(this.nodes[T]===void 0&&this.groups[T]===void 0)throw new Error(`The left-hand id [${T}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The right-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[T].in,t=this.nodes[L].in;if(e&&o&&t&&o==t)throw new Error(`The left-hand id [${T}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&o&&t&&o==t)throw new Error(`The right-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const h={lhsId:T,lhsDir:E,lhsInto:r,lhsGroup:e,rhsId:L,rhsDir:d,rhsInto:a,rhsGroup:n,title:i};this.edges.push(h),this.nodes[T]&&this.nodes[L]&&(this.nodes[T].edges.push(this.edges[this.edges.length-1]),this.nodes[L].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const T={},L=Object.entries(this.nodes).reduce((n,[i,o])=>(n[i]=o.edges.reduce((t,h)=>{var l,y;const g=(l=this.getNode(h.lhsId))==null?void 0:l.in,c=(y=this.getNode(h.rhsId))==null?void 0:y.in;if(g&&c&&g!==c){const v=vn(h.lhsDir,h.rhsDir);v!=="bend"&&(T[g]??(T[g]={}),T[g][c]=v,T[c]??(T[c]={}),T[c][g]=v)}if(h.lhsId===i){const v=ge(h.lhsDir,h.rhsDir);v&&(t[v]=h.rhsId)}else{const v=ge(h.rhsDir,h.lhsDir);v&&(t[v]=h.lhsId)}return t},{}),n),{}),E=Object.keys(L)[0],d={[E]:1},r=Object.keys(L).reduce((n,i)=>i===E?n:{...n,[i]:1},{}),a=nt(n=>{const i={[n]:[0,0]},o=[n];for(;o.length>0;){const t=o.shift();if(t){d[t]=1,delete r[t];const h=L[t],[g,c]=i[t];Object.entries(h).forEach(([l,y])=>{d[y]||(i[y]=pn([g,c],l),o.push(y))})}}return i},"BFS"),e=[a(E)];for(;Object.keys(r).length>0;)e.push(a(Object.keys(r)[0]));this.dataStructures={adjList:L,spatialMaps:e,groupAlignments:T}}return this.dataStructures}setElementForId(T,L){this.elements[T]=L}getElementById(T){return this.elements[T]}getConfig(){return Je({...Nn,...Ke().architecture})}getConfigField(T){return this.getConfig()[T]}},nt(Qt,"ArchitectureDB"),Qt),Tn=nt((C,T)=>{on(C,T),C.groups.map(L=>T.addGroup(L)),C.services.map(L=>T.addService({...L,type:"service"})),C.junctions.map(L=>T.addJunction({...L,type:"junction"})),C.edges.map(L=>T.addEdge(L))},"populateDb"),be={parser:{yy:void 0},parse:nt(async C=>{var E;const T=await sn("architecture",C);ye.debug(T);const L=(E=be.parser)==null?void 0:E.yy;if(!(L instanceof Re))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.");Tn(T,L)},"parse")},An=nt(C=>`
1
+ var Qt;import{_ as nt,I as ze,T as Ve,l as ye,b as We,a as Be,p as je,q as qe,g as $e,s as Ze,y as Qe,E as Je,F as Ke,G as tn,c as se,a4 as ae,am as he,h as en,an as nn,ao as rn}from"./mermaid-CEpdDmik.js";import{p as on}from"./chunk-ANTBXLJU-CyFpCIAD.js";import{p as sn}from"./treemap-75Q7IDZK-C6t8vi8s.js";import{c as Ee}from"./cytoscape.esm-UcEO6FGL.js";import{z as an}from"./index-DMvScaq6.js";import{s as hn}from"./transform-B8bpuzxV.js";import"./step-BwsUM5iJ.js";import"./_baseEach-CnK_W3-W.js";import"./_baseUniq-DsEUejTO.js";import"./min-CH9RTxJs.js";import"./_baseMap-CIc0IDdl.js";import"./clone-CYXehyk_.js";import"./_createAggregator-xSD3e6yX.js";import"./timer-BwIYMJWC.js";var Ne,Te={exports:{}},Ae={exports:{}},we={exports:{}};function ln(){return Ne?we.exports:(Ne=1,C=function(){return function(T){var L={};function E(d){if(L[d])return L[d].exports;var r=L[d]={i:d,l:!1,exports:{}};return T[d].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=T,E.c=L,E.i=function(d){return d},E.d=function(d,r,a){E.o(d,r)||Object.defineProperty(d,r,{configurable:!1,enumerable:!0,get:a})},E.n=function(d){var r=d&&d.__esModule?function(){return d.default}:function(){return d};return E.d(r,"a",r),r},E.o=function(d,r){return Object.prototype.hasOwnProperty.call(d,r)},E.p="",E(E.s=28)}([function(T,L,E){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,T.exports=d},function(T,L,E){var d=E(2),r=E(8),a=E(9);function e(i,o,t){d.call(this,t),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=t,this.bendpoints=[],this.source=i,this.target=o}for(var n in e.prototype=Object.create(d.prototype),d)e[n]=d[n];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(i){if(this.source===i)return this.target;if(this.target===i)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(i,o){for(var t=this.getOtherEnd(i),h=o.getGraphManager().getRoot();;){if(t.getOwner()==o)return t;if(t.getOwner()==h)break;t=t.getOwner().getParent()}return null},e.prototype.updateLength=function(){var i=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),i),this.isOverlapingSourceAndTarget||(this.lengthX=i[0]-i[2],this.lengthY=i[1]-i[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)},T.exports=e},function(T,L,E){T.exports=function(d){this.vGraphObject=d}},function(T,L,E){var d=E(2),r=E(10),a=E(13),e=E(0),n=E(16),i=E(5);function o(h,g,c,l){c==null&&l==null&&(l=g),d.call(this,l),h.graphManager!=null&&(h=h.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=l,this.edges=[],this.graphManager=h,this.rect=c!=null&&g!=null?new a(g.x,g.y,c.width,c.height):new a}for(var t in o.prototype=Object.create(d.prototype),d)o[t]=d[t];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(h){this.rect.width=h},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(h){this.rect.height=h},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new i(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new i(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(h,g){this.rect.x=h.x,this.rect.y=h.y,this.rect.width=g.width,this.rect.height=g.height},o.prototype.setCenter=function(h,g){this.rect.x=h-this.rect.width/2,this.rect.y=g-this.rect.height/2},o.prototype.setLocation=function(h,g){this.rect.x=h,this.rect.y=g},o.prototype.moveBy=function(h,g){this.rect.x+=h,this.rect.y+=g},o.prototype.getEdgeListToNode=function(h){var g=[],c=this;return c.edges.forEach(function(l){if(l.target==h){if(l.source!=c)throw"Incorrect edge source!";g.push(l)}}),g},o.prototype.getEdgesBetween=function(h){var g=[],c=this;return c.edges.forEach(function(l){if(l.source!=c&&l.target!=c)throw"Incorrect edge source and/or target";l.target!=h&&l.source!=h||g.push(l)}),g},o.prototype.getNeighborsList=function(){var h=new Set,g=this;return g.edges.forEach(function(c){if(c.source==g)h.add(c.target);else{if(c.target!=g)throw"Incorrect incidency!";h.add(c.source)}}),h},o.prototype.withChildren=function(){var h=new Set;if(h.add(this),this.child!=null)for(var g=this.child.getNodes(),c=0;c<g.length;c++)g[c].withChildren().forEach(function(l){h.add(l)});return h},o.prototype.getNoOfChildren=function(){var h=0;if(this.child==null)h=1;else for(var g=this.child.getNodes(),c=0;c<g.length;c++)h+=g[c].getNoOfChildren();return h==0&&(h=1),h},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.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)},o.prototype.scatter=function(){var h,g,c=-e.INITIAL_WORLD_BOUNDARY,l=e.INITIAL_WORLD_BOUNDARY;h=e.WORLD_CENTER_X+n.nextDouble()*(l-c)+c;var y=-e.INITIAL_WORLD_BOUNDARY,v=e.INITIAL_WORLD_BOUNDARY;g=e.WORLD_CENTER_Y+n.nextDouble()*(v-y)+y,this.rect.x=h,this.rect.y=g},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var h=this.getChild();if(h.updateBounds(!0),this.rect.x=h.getLeft(),this.rect.y=h.getTop(),this.setWidth(h.getRight()-h.getLeft()),this.setHeight(h.getBottom()-h.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var g=h.getRight()-h.getLeft(),c=h.getBottom()-h.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(g+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>g?(this.rect.x-=(this.labelWidth-g)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(g+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>c?(this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(c+this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(h){var g=this.rect.x;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var c=this.rect.y;c>e.WORLD_BOUNDARY?c=e.WORLD_BOUNDARY:c<-e.WORLD_BOUNDARY&&(c=-e.WORLD_BOUNDARY);var l=new i(g,c),y=h.inverseTransformPoint(l);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},T.exports=o},function(T,L,E){var d=E(0);function r(){}for(var a in d)r[a]=d[a];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,T.exports=r},function(T,L,E){function d(r,a){r==null&&a==null?(this.x=0,this.y=0):(this.x=r,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(r){this.x=r},d.prototype.setY=function(r){this.y=r},d.prototype.getDifference=function(r){return new DimensionD(this.x-r.x,this.y-r.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(r){return this.x+=r.width,this.y+=r.height,this},T.exports=d},function(T,L,E){var d=E(2),r=E(10),a=E(0),e=E(7),n=E(3),i=E(1),o=E(13),t=E(12),h=E(11);function g(l,y,v){d.call(this,v),this.estimatedSize=r.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=l,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var c in g.prototype=Object.create(d.prototype),d)g[c]=d[c];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(l,y,v){if(y==null&&v==null){var N=l;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(N)>-1)throw"Node already in graph!";return N.owner=this,this.getNodes().push(N),N}var A=l;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(y.owner!=v.owner||y.owner!=this)throw"Both owners must be this graph!";return y.owner!=v.owner?null:(A.source=y,A.target=v,A.isInterGraph=!1,this.getEdges().push(A),y.edges.push(A),v!=y&&v.edges.push(A),A)},g.prototype.remove=function(l){var y=l;if(l instanceof n){if(y==null)throw"Node is null!";if(y.owner==null||y.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),N=v.length,A=0;A<N;A++)(M=v[A]).isInterGraph?this.graphManager.remove(M):M.source.owner.remove(M);if((P=this.nodes.indexOf(y))==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(l instanceof i){var M;if((M=l)==null)throw"Edge is null!";if(M.source==null||M.target==null)throw"Source and/or target is null!";if(M.source.owner==null||M.target.owner==null||M.source.owner!=this||M.target.owner!=this)throw"Source and/or target owner is invalid!";var P,b=M.source.edges.indexOf(M),Y=M.target.edges.indexOf(M);if(!(b>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";if(M.source.edges.splice(b,1),M.target!=M.source&&M.target.edges.splice(Y,1),(P=M.source.owner.getEdges().indexOf(M))==-1)throw"Not in owner's edge list!";M.source.owner.getEdges().splice(P,1)}},g.prototype.updateLeftTop=function(){for(var l,y,v,N=r.MAX_VALUE,A=r.MAX_VALUE,M=this.getNodes(),P=M.length,b=0;b<P;b++){var Y=M[b];N>(l=Y.getTop())&&(N=l),A>(y=Y.getLeft())&&(A=y)}return N==r.MAX_VALUE?null:(v=M[0].getParent().paddingLeft!=null?M[0].getParent().paddingLeft:this.margin,this.left=A-v,this.top=N-v,new t(this.left,this.top))},g.prototype.updateBounds=function(l){for(var y,v,N,A,M,P=r.MAX_VALUE,b=-r.MAX_VALUE,Y=r.MAX_VALUE,H=-r.MAX_VALUE,q=this.nodes,_=q.length,B=0;B<_;B++){var s=q[B];l&&s.child!=null&&s.updateBounds(),P>(y=s.getLeft())&&(P=y),b<(v=s.getRight())&&(b=v),Y>(N=s.getTop())&&(Y=N),H<(A=s.getBottom())&&(H=A)}var m=new o(P,Y,b-P,H-Y);P==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),M=q[0].getParent().paddingLeft!=null?q[0].getParent().paddingLeft:this.margin,this.left=m.x-M,this.right=m.x+m.width+M,this.top=m.y-M,this.bottom=m.y+m.height+M},g.calculateBounds=function(l){for(var y,v,N,A,M=r.MAX_VALUE,P=-r.MAX_VALUE,b=r.MAX_VALUE,Y=-r.MAX_VALUE,H=l.length,q=0;q<H;q++){var _=l[q];M>(y=_.getLeft())&&(M=y),P<(v=_.getRight())&&(P=v),b>(N=_.getTop())&&(b=N),Y<(A=_.getBottom())&&(Y=A)}return new o(M,b,P-M,Y-b)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var l=0,y=this.nodes,v=y.length,N=0;N<v;N++)l+=y[N].calcEstimatedSize();return this.estimatedSize=l==0?a.EMPTY_COMPOUND_NODE_SIZE:l/Math.sqrt(this.nodes.length),this.estimatedSize},g.prototype.updateConnected=function(){var l=this;if(this.nodes.length!=0){var y,v,N=new h,A=new Set,M=this.nodes[0];for(M.withChildren().forEach(function(H){N.push(H),A.add(H)});N.length!==0;)for(var P=(y=(M=N.shift()).getEdges()).length,b=0;b<P;b++)(v=y[b].getOtherEndInGraph(M,this))==null||A.has(v)||v.withChildren().forEach(function(H){N.push(H),A.add(H)});if(this.isConnected=!1,A.size>=this.nodes.length){var Y=0;A.forEach(function(H){H.owner==l&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},T.exports=g},function(T,L,E){var d,r=E(1);function a(e){d=E(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),n=this.layout.newNode(null),i=this.add(e,n);return this.setRootGraph(i),this.rootGraph},a.prototype.add=function(e,n,i,o,t){if(i==null&&o==null&&t==null){if(e==null)throw"Graph is null!";if(n==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(n.child!=null)throw"Already has a child!";return e.parent=n,n.child=e,e}t=i,i=e;var h=(o=n).getOwner(),g=t.getOwner();if(h==null||h.getGraphManager()!=this)throw"Source not in this graph mgr!";if(g==null||g.getGraphManager()!=this)throw"Target not in this graph mgr!";if(h==g)return i.isInterGraph=!1,h.add(i,o,t);if(i.isInterGraph=!0,i.source=o,i.target=t,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),i.source==null||i.target==null)throw"Edge source and/or target is null!";if(i.source.edges.indexOf(i)!=-1||i.target.edges.indexOf(i)!=-1)throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},a.prototype.remove=function(e){if(e instanceof d){var n=e;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],t=(o=o.concat(n.getEdges())).length,h=0;h<t;h++)i=o[h],n.remove(i);var g,c=[];for(t=(c=c.concat(n.getNodes())).length,h=0;h<t;h++)g=c[h],n.remove(g);n==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(n);this.graphs.splice(l,1),n.parent=null}else if(e instanceof r){if((i=e)==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!";if(l=i.source.edges.indexOf(i),i.source.edges.splice(l,1),l=i.target.edges.indexOf(i),i.target.edges.splice(l,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!";l=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(l,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=[],n=this.getGraphs(),i=n.length,o=0;o<i;o++)e=e.concat(n[o].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=[],n=this.getGraphs();n.length;for(var i=0;i<n.length;i++)e=e.concat(n[i].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,n){if(e==null||n==null)throw"assert failed";if(e==n)return!0;for(var i,o=e.getOwner();(i=o.getParent())!=null;){if(i==n)return!0;if((o=i.getOwner())==null)break}for(o=n.getOwner();(i=o.getParent())!=null;){if(i==e)return!0;if((o=i.getOwner())==null)break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,n,i,o,t,h=this.getAllEdges(),g=h.length,c=0;c<g;c++)if(n=(e=h[c]).source,i=e.target,e.lca=null,e.sourceInLca=n,e.targetInLca=i,n!=i){for(o=n.getOwner();e.lca==null;){for(e.targetInLca=i,t=i.getOwner();e.lca==null;){if(t==o){e.lca=t;break}if(t==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=t.getParent(),t=e.targetInLca.getOwner()}if(o==this.rootGraph)break;e.lca==null&&(e.sourceInLca=o.getParent(),o=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}else e.lca=n.getOwner()},a.prototype.calcLowestCommonAncestor=function(e,n){if(e==n)return e.getOwner();for(var i=e.getOwner();i!=null;){for(var o=n.getOwner();o!=null;){if(o==i)return o;o=o.getParent().getOwner()}i=i.getParent().getOwner()}return i},a.prototype.calcInclusionTreeDepths=function(e,n){var i;e==null&&n==null&&(e=this.rootGraph,n=1);for(var o=e.getNodes(),t=o.length,h=0;h<t;h++)(i=o[h]).inclusionTreeDepth=n,i.child!=null&&this.calcInclusionTreeDepths(i.child,n+1)},a.prototype.includesInvalidEdge=function(){for(var e,n=[],i=this.edges.length,o=0;o<i;o++)e=this.edges[o],this.isOneAncestorOfOther(e.source,e.target)&&n.push(e);for(o=0;o<n.length;o++)this.remove(n[o]);return!1},T.exports=a},function(T,L,E){var d=E(12);function r(){}r.calcSeparationAmount=function(a,e,n,i){if(!a.intersects(e))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,o),n[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),n[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?n[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var t=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(t=1);var h=t*n[0],g=n[1]/t;n[0]<g?g=n[0]:h=n[1],n[0]=-1*o[0]*(g/2+i),n[1]=-1*o[1]*(h/2+i)},r.decideDirectionsForOverlappingNodes=function(a,e,n){a.getCenterX()<e.getCenterX()?n[0]=-1:n[0]=1,a.getCenterY()<e.getCenterY()?n[1]=-1:n[1]=1},r.getIntersection2=function(a,e,n){var i=a.getCenterX(),o=a.getCenterY(),t=e.getCenterX(),h=e.getCenterY();if(a.intersects(e))return n[0]=i,n[1]=o,n[2]=t,n[3]=h,!0;var g=a.getX(),c=a.getY(),l=a.getRight(),y=a.getX(),v=a.getBottom(),N=a.getRight(),A=a.getWidthHalf(),M=a.getHeightHalf(),P=e.getX(),b=e.getY(),Y=e.getRight(),H=e.getX(),q=e.getBottom(),_=e.getRight(),B=e.getWidthHalf(),s=e.getHeightHalf(),m=!1,u=!1;if(i===t){if(o>h)return n[0]=i,n[1]=c,n[2]=t,n[3]=q,!1;if(o<h)return n[0]=i,n[1]=v,n[2]=t,n[3]=b,!1}else if(o===h){if(i>t)return n[0]=g,n[1]=o,n[2]=Y,n[3]=h,!1;if(i<t)return n[0]=l,n[1]=o,n[2]=P,n[3]=h,!1}else{var p=a.height/a.width,f=e.height/e.width,w=(h-o)/(t-i),I=void 0,x=void 0,F=void 0,G=void 0,S=void 0,D=void 0;if(-p===w?i>t?(n[0]=y,n[1]=v,m=!0):(n[0]=l,n[1]=c,m=!0):p===w&&(i>t?(n[0]=g,n[1]=c,m=!0):(n[0]=N,n[1]=v,m=!0)),-f===w?t>i?(n[2]=H,n[3]=q,u=!0):(n[2]=Y,n[3]=b,u=!0):f===w&&(t>i?(n[2]=P,n[3]=b,u=!0):(n[2]=_,n[3]=q,u=!0)),m&&u)return!1;if(i>t?o>h?(I=this.getCardinalDirection(p,w,4),x=this.getCardinalDirection(f,w,2)):(I=this.getCardinalDirection(-p,w,3),x=this.getCardinalDirection(-f,w,1)):o>h?(I=this.getCardinalDirection(-p,w,1),x=this.getCardinalDirection(-f,w,3)):(I=this.getCardinalDirection(p,w,2),x=this.getCardinalDirection(f,w,4)),!m)switch(I){case 1:G=c,F=i+-M/w,n[0]=F,n[1]=G;break;case 2:F=N,G=o+A*w,n[0]=F,n[1]=G;break;case 3:G=v,F=i+M/w,n[0]=F,n[1]=G;break;case 4:F=y,G=o+-A*w,n[0]=F,n[1]=G}if(!u)switch(x){case 1:D=b,S=t+-s/w,n[2]=S,n[3]=D;break;case 2:S=_,D=h+B*w,n[2]=S,n[3]=D;break;case 3:D=q,S=t+s/w,n[2]=S,n[3]=D;break;case 4:S=H,D=h+-B*w,n[2]=S,n[3]=D}}return!1},r.getCardinalDirection=function(a,e,n){return a>e?n:1+n%4},r.getIntersection=function(a,e,n,i){if(i==null)return this.getIntersection2(a,e,n);var o,t,h,g,c,l,y,v=a.x,N=a.y,A=e.x,M=e.y,P=n.x,b=n.y,Y=i.x,H=i.y;return(y=(o=M-N)*(g=P-Y)-(t=H-b)*(h=v-A))===0?null:new d((h*(l=Y*b-P*H)-g*(c=A*N-v*M))/y,(t*c-o*l)/y)},r.angleOfVector=function(a,e,n,i){var o=void 0;return a!==n?(o=Math.atan((i-e)/(n-a)),n<a?o+=Math.PI:i<e&&(o+=this.TWO_PI)):o=i<e?this.ONE_AND_HALF_PI:this.HALF_PI,o},r.doIntersect=function(a,e,n,i){var o=a.x,t=a.y,h=e.x,g=e.y,c=n.x,l=n.y,y=i.x,v=i.y,N=(h-o)*(v-l)-(y-c)*(g-t);if(N===0)return!1;var A=((v-l)*(y-o)+(c-y)*(v-t))/N,M=((t-g)*(y-o)+(h-o)*(v-t))/N;return 0<A&&A<1&&0<M&&M<1},r.findCircleLineIntersections=function(a,e,n,i,o,t,h){var g=(n-a)*(n-a)+(i-e)*(i-e),c=2*((a-o)*(n-a)+(e-t)*(i-e)),l=(a-o)*(a-o)+(e-t)*(e-t)-h*h;if(c*c-4*g*l>=0){var y=(-c+Math.sqrt(c*c-4*g*l))/(2*g),v=(-c-Math.sqrt(c*c-4*g*l))/(2*g);return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:null}return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,T.exports=r},function(T,L,E){function d(){}d.sign=function(r){return r>0?1:r<0?-1:0},d.floor=function(r){return r<0?Math.ceil(r):Math.floor(r)},d.ceil=function(r){return r<0?Math.floor(r):Math.ceil(r)},T.exports=d},function(T,L,E){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,T.exports=d},function(T,L,E){var d=function(){function i(o,t){for(var h=0;h<t.length;h++){var g=t[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}return function(o,t,h){return t&&i(o.prototype,t),h&&i(o,h),o}}(),r=function(i){return{value:i,next:null,prev:null}},a=function(i,o,t,h){return i!==null?i.next=o:h.head=o,t!==null?t.prev=o:h.tail=o,o.prev=i,o.next=t,h.length++,o},e=function(i,o){var t=i.prev,h=i.next;return t!==null?t.next=h:o.head=h,h!==null?h.prev=t:o.tail=t,i.prev=i.next=null,o.length--,i},n=function(){function i(o){var t=this;(function(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,i),this.length=0,this.head=null,this.tail=null,o!=null&&o.forEach(function(h){return t.push(h)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,t){return a(t.prev,r(o),t,this)}},{key:"insertAfter",value:function(o,t){return a(t,r(o),t.next,this)}},{key:"insertNodeBefore",value:function(o,t){return a(t.prev,o,t,this)}},{key:"insertNodeAfter",value:function(o,t){return a(t,o,t.next,this)}},{key:"push",value:function(o){return a(this.tail,r(o),null,this)}},{key:"unshift",value:function(o){return a(null,r(o),this.head,this)}},{key:"remove",value:function(o){return e(o,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(o){if(o<=this.length()){for(var t=1,h=this.head;t<o;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(o,t){if(o<=this.length()){for(var h=1,g=this.head;h<o;)g=g.next,h++;g.value=t}}}]),i}();T.exports=n},function(T,L,E){function d(r,a,e){this.x=null,this.y=null,r==null&&a==null&&e==null?(this.x=0,this.y=0):typeof r=="number"&&typeof a=="number"&&e==null?(this.x=r,this.y=a):r.constructor.name=="Point"&&a==null&&e==null&&(e=r,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(r,a,e){r.constructor.name=="Point"&&a==null&&e==null?(e=r,this.setLocation(e.x,e.y)):typeof r=="number"&&typeof a=="number"&&e==null&&(parseInt(r)==r&&parseInt(a)==a?this.move(r,a):(this.x=Math.floor(r+.5),this.y=Math.floor(a+.5)))},d.prototype.move=function(r,a){this.x=r,this.y=a},d.prototype.translate=function(r,a){this.x+=r,this.y+=a},d.prototype.equals=function(r){if(r.constructor.name=="Point"){var a=r;return this.x==a.x&&this.y==a.y}return this==r},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},T.exports=d},function(T,L,E){function d(r,a,e,n){this.x=0,this.y=0,this.width=0,this.height=0,r!=null&&a!=null&&e!=null&&n!=null&&(this.x=r,this.y=a,this.width=e,this.height=n)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(r){this.x=r},d.prototype.getY=function(){return this.y},d.prototype.setY=function(r){this.y=r},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(r){this.width=r},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(r){this.height=r},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(r){return!(this.getRight()<r.x||this.getBottom()<r.y||r.getRight()<this.x||r.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},T.exports=d},function(T,L,E){var d=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 r(){}r.lastID=0,r.createID=function(a){return r.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=r.getString(),r.lastID++),a.uniqueID)},r.getString=function(a){return a==null&&(a=r.lastID),"Object#"+a},r.isPrimitive=function(a){var e=a===void 0?"undefined":d(a);return a==null||e!="object"&&e!="function"},T.exports=r},function(T,L,E){function d(c){if(Array.isArray(c)){for(var l=0,y=Array(c.length);l<c.length;l++)y[l]=c[l];return y}return Array.from(c)}var r=E(0),a=E(7),e=E(3),n=E(1),i=E(6),o=E(5),t=E(17),h=E(29);function g(c){h.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null&&(this.isRemoteUse=c)}g.RANDOM_SEED=1,g.prototype=Object.create(h.prototype),g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},g.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},g.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},g.prototype.newGraphManager=function(){var c=new a(this);return this.graphManager=c,c},g.prototype.newGraph=function(c){return new i(null,this.graphManager,c)},g.prototype.newNode=function(c){return new e(this.graphManager,c)},g.prototype.newEdge=function(c){return new n(null,null,c)},g.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},g.prototype.runLayout=function(){var c;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),c=!this.checkLayoutSuccess()&&this.layout(),r.ANIMATE!=="during"&&(c&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,c)},g.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},g.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var c=this.graphManager.getAllEdges(),l=0;l<c.length;l++)c[l];var y=this.graphManager.getRoot().getNodes();for(l=0;l<y.length;l++)y[l];this.update(this.graphManager.getRoot())}},g.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof e){var l=c;if(l.getChild()!=null)for(var y=l.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);l.vGraphObject!=null&&l.vGraphObject.update(l)}else if(c instanceof n){var N=c;N.vGraphObject!=null&&N.vGraphObject.update(N)}else if(c instanceof i){var A=c;A.vGraphObject!=null&&A.vGraphObject.update(A)}},g.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},g.prototype.transform=function(c){if(c==null)this.transform(new o(0,0));else{var l=new t,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){l.setWorldOrgX(c.x),l.setWorldOrgY(c.y),l.setDeviceOrgX(y.x),l.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),N=0;N<v.length;N++)v[N].transform(l)}}},g.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var l,y,v=c.getNodes(),N=0;N<v.length;N++)(y=(l=v[N]).getChild())==null||y.getNodes().length==0?l.scatter():(this.positionNodesRandomly(y),l.updateBounds())},g.prototype.getFlatForest=function(){for(var c=[],l=!0,y=this.graphManager.getRoot().getNodes(),v=!0,N=0;N<y.length;N++)y[N].getChild()!=null&&(v=!1);if(!v)return c;var A=new Set,M=[],P=new Map,b=[];for(b=b.concat(y);b.length>0&&l;){for(M.push(b[0]);M.length>0&&l;){var Y=M[0];M.splice(0,1),A.add(Y);var H=Y.getEdges();for(N=0;N<H.length;N++){var q=H[N].getOtherEnd(Y);if(P.get(Y)!=q){if(A.has(q)){l=!1;break}M.push(q),P.set(q,Y)}}}if(l){var _=[].concat(d(A));for(c.push(_),N=0;N<_.length;N++){var B=_[N],s=b.indexOf(B);s>-1&&b.splice(s,1)}A=new Set,P=new Map}else c=[]}return c},g.prototype.createDummyNodesForBendpoints=function(c){for(var l=[],y=c.source,v=this.graphManager.calcLowestCommonAncestor(c.source,c.target),N=0;N<c.bendpoints.length;N++){var A=this.newNode(null);A.setRect(new Point(0,0),new Dimension(1,1)),v.add(A);var M=this.newEdge(null);this.graphManager.add(M,y,A),l.add(A),y=A}return M=this.newEdge(null),this.graphManager.add(M,y,c.target),this.edgeToDummyNodes.set(c,l),c.isInterGraph()?this.graphManager.remove(c):v.remove(c),l},g.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(d(this.edgeToDummyNodes.keys())).concat(c);for(var l=0;l<c.length;l++){var y=c[l];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),N=0;N<v.length;N++){var A=v[N],M=new o(A.getCenterX(),A.getCenterY()),P=y.bendpoints.get(N);P.x=M.x,P.y=M.y,A.getOwner().remove(A)}this.graphManager.add(y,y.source,y.target)}}},g.transform=function(c,l,y,v){if(y!=null&&v!=null){var N=l;return c<=50?N-=(l-l/y)/50*(50-c):N+=(l*v-l)/50*(c-50),N}var A,M;return c<=50?(A=9*l/500,M=l/10):(A=9*l/50,M=-8*l),A*c+M},g.findCenterOfTree=function(c){var l=[];l=l.concat(c);var y=[],v=new Map,N=!1,A=null;l.length!=1&&l.length!=2||(N=!0,A=l[0]);for(var M=0;M<l.length;M++){var P=(H=l[M]).getNeighborsList().size;v.set(H,H.getNeighborsList().size),P==1&&y.push(H)}var b=[];for(b=b.concat(y);!N;){var Y=[];for(Y=Y.concat(b),b=[],M=0;M<l.length;M++){var H=l[M],q=l.indexOf(H);q>=0&&l.splice(q,1),H.getNeighborsList().forEach(function(_){if(y.indexOf(_)<0){var B=v.get(_)-1;B==1&&b.push(_),v.set(_,B)}})}y=y.concat(b),l.length!=1&&l.length!=2||(N=!0,A=l[0])}return A},g.prototype.setGraphManager=function(c){this.graphManager=c},T.exports=g},function(T,L,E){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=1e4*Math.sin(d.seed++),d.x-Math.floor(d.x)},T.exports=d},function(T,L,E){var d=E(5);function r(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}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(a){this.lworldExtX=a},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(a){this.lworldExtY=a},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},r.prototype.transformX=function(a){var e=0,n=this.lworldExtX;return n!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),e},r.prototype.transformY=function(a){var e=0,n=this.lworldExtY;return n!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),e},r.prototype.inverseTransformX=function(a){var e=0,n=this.ldeviceExtX;return n!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),e},r.prototype.inverseTransformY=function(a){var e=0,n=this.ldeviceExtY;return n!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),e},r.prototype.inverseTransformPoint=function(a){return new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},T.exports=r},function(T,L,E){var d=E(15),r=E(4),a=E(0),e=E(8),n=E(9);function i(){d.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var o in i.prototype=Object.create(d.prototype),d)i[o]=d[o];i.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,h,g,c,l,y,v,N=this.getGraphManager().getAllEdges(),A=0;A<N.length;A++)h=(t=N[A]).idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),y=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=y+v-2*a.SIMPLE_NODE_SIZE),g=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*g))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>r.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t,h=this.getAllEdges(),g=0;g<h.length;g++)t=h[g],this.calcSpringForce(t,t.idealLength)},i.prototype.calcRepulsionForces=function(){var t,h,g,c,l,y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],v=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&y&&this.updateGrid(),l=new Set,t=0;t<N.length;t++)g=N[t],this.calculateRepulsionForceOfANode(g,l,y,v),l.add(g);else for(t=0;t<N.length;t++)for(g=N[t],h=t+1;h<N.length;h++)c=N[h],g.getOwner()==c.getOwner()&&this.calcRepulsionForce(g,c)},i.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),g=0;g<h.length;g++)t=h[g],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},i.prototype.calcSpringForce=function(t,h){var g,c,l,y,v=t.getSource(),N=t.getTarget();if(this.uniformLeafNodeSizes&&v.getChild()==null&&N.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;(g=t.getLength())!=0&&(l=(c=t.edgeElasticity*(g-h))*(t.lengthX/g),y=c*(t.lengthY/g),v.springForceX+=l,v.springForceY+=y,N.springForceX-=l,N.springForceY-=y)},i.prototype.calcRepulsionForce=function(t,h){var g,c,l,y,v,N,A,M=t.getRect(),P=h.getRect(),b=new Array(2),Y=new Array(4);if(M.intersects(P)){e.calcSeparationAmount(M,P,b,r.DEFAULT_EDGE_LENGTH/2),N=2*b[0],A=2*b[1];var H=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=H*N,t.repulsionForceY-=H*A,h.repulsionForceX+=H*N,h.repulsionForceY+=H*A}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(g=P.getCenterX()-M.getCenterX(),c=P.getCenterY()-M.getCenterY()):(e.getIntersection(M,P,Y),g=Y[2]-Y[0],c=Y[3]-Y[1]),Math.abs(g)<r.MIN_REPULSION_DIST&&(g=n.sign(g)*r.MIN_REPULSION_DIST),Math.abs(c)<r.MIN_REPULSION_DIST&&(c=n.sign(c)*r.MIN_REPULSION_DIST),l=g*g+c*c,y=Math.sqrt(l),N=(v=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/l)*g/y,A=v*c/y,t.repulsionForceX-=N,t.repulsionForceY-=A,h.repulsionForceX+=N,h.repulsionForceY+=A},i.prototype.calcGravitationalForce=function(t){var h,g,c,l,y,v,N,A;g=((h=t.getOwner()).getRight()+h.getLeft())/2,c=(h.getTop()+h.getBottom())/2,l=t.getCenterX()-g,y=t.getCenterY()-c,v=Math.abs(l)+t.getWidth()/2,N=Math.abs(y)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(v>(A=h.getEstimatedSize()*this.gravityRangeFactor)||N>A)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*y):(v>(A=h.getEstimatedSize()*this.compoundGravityRangeFactor)||N>A)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant)},i.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},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,h=this.graphManager.getAllNodes(),g=0;g<h.length;g++)(t=h[g]).noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var h,g;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(h),l=0;l<h;l++)c[l]=new Array(g);for(l=0;l<h;l++)for(var y=0;y<g;y++)c[l][y]=new Array;return c},i.prototype.addNodeToGrid=function(t,h,g){var c,l,y,v;c=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((t.getRect().y-g)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-g)/this.repulsionRange));for(var N=c;N<=l;N++)for(var A=y;A<=v;A++)this.grid[N][A].push(t),t.setGridCoordinates(c,l,y,v)},i.prototype.updateGrid=function(){var t,h,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<g.length;t++)h=g[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,h,g,c){if(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&g||c){var l,y=new Set;t.surrounding=new Array;for(var v=this.grid,N=t.startX-1;N<t.finishX+2;N++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(N<0||A<0||N>=v.length||A>=v[0].length)){for(var M=0;M<v[N][A].length;M++)if(l=v[N][A][M],t.getOwner()==l.getOwner()&&t!=l&&!h.has(l)&&!y.has(l)){var P=Math.abs(t.getCenterX()-l.getCenterX())-(t.getWidth()/2+l.getWidth()/2),b=Math.abs(t.getCenterY()-l.getCenterY())-(t.getHeight()/2+l.getHeight()/2);P<=this.repulsionRange&&b<=this.repulsionRange&&y.add(l)}}t.surrounding=[].concat(function(Y){if(Array.isArray(Y)){for(var H=0,q=Array(Y.length);H<Y.length;H++)q[H]=Y[H];return q}return Array.from(Y)}(y))}for(N=0;N<t.surrounding.length;N++)this.calcRepulsionForce(t,t.surrounding[N])},i.prototype.calcRepulsionRange=function(){return 0},T.exports=i},function(T,L,E){var d=E(1),r=E(4);function a(n,i,o){d.call(this,n,i,o),this.idealLength=r.DEFAULT_EDGE_LENGTH,this.edgeElasticity=r.DEFAULT_SPRING_STRENGTH}for(var e in a.prototype=Object.create(d.prototype),d)a[e]=d[e];T.exports=a},function(T,L,E){var d=E(3),r=E(4);function a(n,i,o,t){d.call(this,n,i,o,t),this.nodeRepulsion=r.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=[]}for(var e in a.prototype=Object.create(d.prototype),d)a[e]=d[e];a.prototype.setGridCoordinates=function(n,i,o,t){this.startX=n,this.finishX=i,this.startY=o,this.finishY=t},T.exports=a},function(T,L,E){function d(r,a){this.width=0,this.height=0,r!==null&&a!==null&&(this.height=a,this.width=r)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(r){this.width=r},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(r){this.height=r},T.exports=d},function(T,L,E){var d=E(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(a,e){var n=d.createID(a);this.contains(n)||(this.map[n]=e,this.keys.push(a))},r.prototype.contains=function(a){return d.createID(a),this.map[a]!=null},r.prototype.get=function(a){var e=d.createID(a);return this.map[e]},r.prototype.keySet=function(){return this.keys},T.exports=r},function(T,L,E){var d=E(14);function r(){this.set={}}r.prototype.add=function(a){var e=d.createID(a);this.contains(e)||(this.set[e]=a)},r.prototype.remove=function(a){delete this.set[d.createID(a)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(a){return this.set[d.createID(a)]==a},r.prototype.isEmpty=function(){return this.size()===0},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),n=e.length,i=0;i<n;i++)a.push(this.set[e[i]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(a){for(var e=a.length,n=0;n<e;n++){var i=a[n];this.add(i)}},T.exports=r},function(T,L,E){function d(){}d.multMat=function(r,a){for(var e=[],n=0;n<r.length;n++){e[n]=[];for(var i=0;i<a[0].length;i++){e[n][i]=0;for(var o=0;o<r[0].length;o++)e[n][i]+=r[n][o]*a[o][i]}}return e},d.transpose=function(r){for(var a=[],e=0;e<r[0].length;e++){a[e]=[];for(var n=0;n<r.length;n++)a[e][n]=r[n][e]}return a},d.multCons=function(r,a){for(var e=[],n=0;n<r.length;n++)e[n]=r[n]*a;return e},d.minusOp=function(r,a){for(var e=[],n=0;n<r.length;n++)e[n]=r[n]-a[n];return e},d.dotProduct=function(r,a){for(var e=0,n=0;n<r.length;n++)e+=r[n]*a[n];return e},d.mag=function(r){return Math.sqrt(this.dotProduct(r,r))},d.normalize=function(r){for(var a=[],e=this.mag(r),n=0;n<r.length;n++)a[n]=r[n]/e;return a},d.multGamma=function(r){for(var a=[],e=0,n=0;n<r.length;n++)e+=r[n];e*=-1/r.length;for(var i=0;i<r.length;i++)a[i]=e+r[i];return a},d.multL=function(r,a,e){for(var n=[],i=[],o=[],t=0;t<a[0].length;t++){for(var h=0,g=0;g<a.length;g++)h+=-.5*a[g][t]*r[g];i[t]=h}for(var c=0;c<e.length;c++){for(var l=0,y=0;y<e.length;y++)l+=e[c][y]*i[y];o[c]=l}for(var v=0;v<a.length;v++){for(var N=0,A=0;A<a[0].length;A++)N+=a[v][A]*o[A];n[v]=N}return n},T.exports=d},function(T,L,E){var d=function(){function e(n,i){for(var o=0;o<i.length;o++){var t=i[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,o){return i&&e(n.prototype,i),o&&e(n,o),n}}(),r=E(11),a=function(){function e(n,i){(function(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),i===null&&i===void 0||(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=n instanceof r?n.size():n.length,this._quicksort(n,0,o-1)}return d(e,[{key:"_quicksort",value:function(n,i,o){if(i<o){var t=this._partition(n,i,o);this._quicksort(n,i,t),this._quicksort(n,t+1,o)}}},{key:"_partition",value:function(n,i,o){for(var t=this._get(n,i),h=i,g=o;;){for(;this.compareFunction(t,this._get(n,g));)g--;for(;this.compareFunction(this._get(n,h),t);)h++;if(!(h<g))return g;this._swap(n,h,g),h++,g--}}},{key:"_get",value:function(n,i){return n instanceof r?n.get_object_at(i):n[i]}},{key:"_set",value:function(n,i,o){n instanceof r?n.set_object_at(i,o):n[i]=o}},{key:"_swap",value:function(n,i,o){var t=this._get(n,i);this._set(n,i,this._get(n,o)),this._set(n,o,t)}},{key:"_defaultCompareFunction",value:function(n,i){return i>n}}]),e}();T.exports=a},function(T,L,E){function d(){}d.svd=function(r){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=r.length,this.n=r[0].length;var a=Math.min(this.m,this.n);this.s=function(At){for(var ct=[];At-- >0;)ct.push(0);return ct}(Math.min(this.m+1,this.n)),this.U=function At(ct){if(ct.length==0)return 0;for(var Gt=[],Ct=0;Ct<ct[0];Ct++)Gt.push(At(ct.slice(1)));return Gt}([this.m,a]),this.V=function(At){return function ct(Gt){if(Gt.length==0)return 0;for(var Ct=[],Yt=0;Yt<Gt[0];Yt++)Ct.push(ct(Gt.slice(1)));return Ct}(At)}([this.n,this.n]);for(var e=function(At){for(var ct=[];At-- >0;)ct.push(0);return ct}(this.n),n=function(At){for(var ct=[];At-- >0;)ct.push(0);return ct}(this.m),i=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,o);t++){if(t<i){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=d.hypot(this.s[t],r[h][t]);if(this.s[t]!==0){r[t][t]<0&&(this.s[t]=-this.s[t]);for(var g=t;g<this.m;g++)r[g][t]/=this.s[t];r[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if(function(At,ct){return At&&ct}(t<i,this.s[t]!==0)){for(var l=0,y=t;y<this.m;y++)l+=r[y][t]*r[y][c];l=-l/r[t][t];for(var v=t;v<this.m;v++)r[v][c]+=l*r[v][t]}e[c]=r[t][c]}if(function(At,ct){return ct}(0,t<i))for(var N=t;N<this.m;N++)this.U[N][t]=r[N][t];if(t<o){e[t]=0;for(var A=t+1;A<this.n;A++)e[t]=d.hypot(e[t],e[A]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var M=t+1;M<this.n;M++)e[M]/=e[t];e[t+1]+=1}if(e[t]=-e[t],function(At,ct){return At&&ct}(t+1<this.m,e[t]!==0)){for(var P=t+1;P<this.m;P++)n[P]=0;for(var b=t+1;b<this.n;b++)for(var Y=t+1;Y<this.m;Y++)n[Y]+=e[b]*r[Y][b];for(var H=t+1;H<this.n;H++)for(var q=-e[H]/e[t+1],_=t+1;_<this.m;_++)r[_][H]+=q*n[_]}for(var B=t+1;B<this.n;B++)this.V[B][t]=e[B]}}var s=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=r[i][i]),this.m<s&&(this.s[s-1]=0),o+1<s&&(e[o]=r[o][s-1]),e[s-1]=0;for(var m=i;m<a;m++){for(var u=0;u<this.m;u++)this.U[u][m]=0;this.U[m][m]=1}for(var p=i-1;p>=0;p--)if(this.s[p]!==0){for(var f=p+1;f<a;f++){for(var w=0,I=p;I<this.m;I++)w+=this.U[I][p]*this.U[I][f];w=-w/this.U[p][p];for(var x=p;x<this.m;x++)this.U[x][f]+=w*this.U[x][p]}for(var F=p;F<this.m;F++)this.U[F][p]=-this.U[F][p];this.U[p][p]=1+this.U[p][p];for(var G=0;G<p-1;G++)this.U[G][p]=0}else{for(var S=0;S<this.m;S++)this.U[S][p]=0;this.U[p][p]=1}for(var D=this.n-1;D>=0;D--){if(function(At,ct){return At&&ct}(D<o,e[D]!==0))for(var z=D+1;z<a;z++){for(var W=0,U=D+1;U<this.n;U++)W+=this.V[U][D]*this.V[U][z];W=-W/this.V[D+1][D];for(var O=D+1;O<this.n;O++)this.V[O][z]+=W*this.V[O][D]}for(var X=0;X<this.n;X++)this.V[X][D]=0;this.V[D][D]=1}for(var j=s-1,K=Math.pow(2,-52),it=Math.pow(2,-966);s>0;){var V=void 0,yt=void 0;for(V=s-2;V>=-1&&V!==-1;V--)if(Math.abs(e[V])<=it+K*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){e[V]=0;break}if(V===s-2)yt=4;else{var Lt=void 0;for(Lt=s-1;Lt>=V&&Lt!==V;Lt--){var Ut=(Lt!==s?Math.abs(e[Lt]):0)+(Lt!==V+1?Math.abs(e[Lt-1]):0);if(Math.abs(this.s[Lt])<=it+K*Ut){this.s[Lt]=0;break}}Lt===V?yt=3:Lt===s-1?yt=1:(yt=2,V=Lt)}switch(V++,yt){case 1:var Rt=e[s-2];e[s-2]=0;for(var J=s-2;J>=V;J--){var ot=d.hypot(this.s[J],Rt),ut=this.s[J]/ot,dt=Rt/ot;this.s[J]=ot,J!==V&&(Rt=-dt*e[J-1],e[J-1]=ut*e[J-1]);for(var vt=0;vt<this.n;vt++)ot=ut*this.V[vt][J]+dt*this.V[vt][s-1],this.V[vt][s-1]=-dt*this.V[vt][J]+ut*this.V[vt][s-1],this.V[vt][J]=ot}break;case 2:var Et=e[V-1];e[V-1]=0;for(var ht=V;ht<s;ht++){var Tt=d.hypot(this.s[ht],Et),_t=this.s[ht]/Tt,Ot=Et/Tt;this.s[ht]=Tt,Et=-Ot*e[ht],e[ht]=_t*e[ht];for(var Mt=0;Mt<this.m;Mt++)Tt=_t*this.U[Mt][ht]+Ot*this.U[Mt][V-1],this.U[Mt][V-1]=-Ot*this.U[Mt][ht]+_t*this.U[Mt][V-1],this.U[Mt][ht]=Tt}break;case 3:var xt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[s-1]),Math.abs(this.s[s-2])),Math.abs(e[s-2])),Math.abs(this.s[V])),Math.abs(e[V])),R=this.s[s-1]/xt,k=this.s[s-2]/xt,Q=e[s-2]/xt,Z=this.s[V]/xt,st=e[V]/xt,It=((k+R)*(k-R)+Q*Q)/2,rt=R*Q*(R*Q),mt=0;(function(At,ct){return At||ct})(It!==0,rt!==0)&&(mt=Math.sqrt(It*It+rt),It<0&&(mt=-mt),mt=rt/(It+mt));for(var ft=(Z+R)*(Z-R)+mt,St=Z*st,et=V;et<s-1;et++){var pt=d.hypot(ft,St),lt=ft/pt,$=St/pt;et!==V&&(e[et-1]=pt),ft=lt*this.s[et]+$*e[et],e[et]=lt*e[et]-$*this.s[et],St=$*this.s[et+1],this.s[et+1]=lt*this.s[et+1];for(var gt=0;gt<this.n;gt++)pt=lt*this.V[gt][et]+$*this.V[gt][et+1],this.V[gt][et+1]=-$*this.V[gt][et]+lt*this.V[gt][et+1],this.V[gt][et]=pt;if(lt=ft/(pt=d.hypot(ft,St)),$=St/pt,this.s[et]=pt,ft=lt*e[et]+$*this.s[et+1],this.s[et+1]=-$*e[et]+lt*this.s[et+1],St=$*e[et+1],e[et+1]=lt*e[et+1],et<this.m-1)for(var Nt=0;Nt<this.m;Nt++)pt=lt*this.U[Nt][et]+$*this.U[Nt][et+1],this.U[Nt][et+1]=-$*this.U[Nt][et]+lt*this.U[Nt][et+1],this.U[Nt][et]=pt}e[s-2]=ft;break;case 4:if(this.s[V]<=0){this.s[V]=this.s[V]<0?-this.s[V]:0;for(var at=0;at<=j;at++)this.V[at][V]=-this.V[at][V]}for(;V<j&&!(this.s[V]>=this.s[V+1]);){var Ft=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=Ft,V<this.n-1)for(var bt=0;bt<this.n;bt++)Ft=this.V[bt][V+1],this.V[bt][V+1]=this.V[bt][V],this.V[bt][V]=Ft;if(V<this.m-1)for(var Dt=0;Dt<this.m;Dt++)Ft=this.U[Dt][V+1],this.U[Dt][V+1]=this.U[Dt][V],this.U[Dt][V]=Ft;V++}s--}}return{U:this.U,V:this.V,S:this.s}},d.hypot=function(r,a){var e=void 0;return Math.abs(r)>Math.abs(a)?(e=a/r,e=Math.abs(r)*Math.sqrt(1+e*e)):a!=0?(e=r/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},T.exports=d},function(T,L,E){var d=function(){function a(e,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,n,i){return n&&a(e.prototype,n),i&&a(e,i),e}}(),r=function(){function a(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")})(this,a),this.sequence1=e,this.sequence2=n,this.match_score=i,this.mismatch_penalty=o,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[h][g]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var o=1;o<this.jMax;o++){var t=[this.sequence1[i-1]===this.sequence2[o-1]?this.grid[i-1][o-1]+this.match_score:this.grid[i-1][o-1]+this.mismatch_penalty,this.grid[i-1][o]+this.gap_penalty,this.grid[i][o-1]+this.gap_penalty],h=this.arrayAllMaxIndexes(t);this.grid[i][o]=t[h[0]],this.tracebackGrid[i][o]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var n=e[0],i=this.tracebackGrid[n.pos[0]][n.pos[1]];i[0]&&e.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),i[1]&&e.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),i[2]&&e.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,n){for(var i=[],o=-1;(o=e.indexOf(n,o+1))!==-1;)i.push(o);return i}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),a}();T.exports=r},function(T,L,E){var d=function(){};d.FDLayout=E(18),d.FDLayoutConstants=E(4),d.FDLayoutEdge=E(19),d.FDLayoutNode=E(20),d.DimensionD=E(21),d.HashMap=E(22),d.HashSet=E(23),d.IGeometry=E(8),d.IMath=E(9),d.Integer=E(10),d.Point=E(12),d.PointD=E(5),d.RandomSeed=E(16),d.RectangleD=E(13),d.Transform=E(17),d.UniqueIDGeneretor=E(14),d.Quicksort=E(25),d.LinkedList=E(11),d.LGraphObject=E(2),d.LGraph=E(6),d.LEdge=E(1),d.LGraphManager=E(7),d.LNode=E(3),d.Layout=E(15),d.LayoutConstants=E(0),d.NeedlemanWunsch=E(27),d.Matrix=E(24),d.SVD=E(26),T.exports=d},function(T,L,E){function d(){this.listeners=[]}var r=d.prototype;r.addListener=function(a,e){this.listeners.push({event:a,callback:e})},r.removeListener=function(a,e){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===a&&i.callback===e&&this.listeners.splice(n,1)}},r.emit=function(a,e){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];a===i.event&&i.callback(e)}},T.exports=d}])},we.exports=C());var C}var Le;function dn(){return Le?Ae.exports:(Le=1,C=function(T){return L={45:(r,a,e)=>{var n={};n.layoutBase=e(551),n.CoSEConstants=e(806),n.CoSEEdge=e(767),n.CoSEGraph=e(880),n.CoSEGraphManager=e(578),n.CoSELayout=e(765),n.CoSENode=e(991),n.ConstraintHandler=e(902),r.exports=n},806:(r,a,e)=>{var n=e(551).FDLayoutConstants;function i(){}for(var o in n)i[o]=n[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.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,r.exports=i},767:(r,a,e)=>{var n=e(551).FDLayoutEdge;function i(t,h,g){n.call(this,t,h,g)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},880:(r,a,e)=>{var n=e(551).LGraph;function i(t,h,g){n.call(this,t,h,g)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},578:(r,a,e)=>{var n=e(551).LGraphManager;function i(t){n.call(this,t)}for(var o in i.prototype=Object.create(n.prototype),n)i[o]=n[o];r.exports=i},765:(r,a,e)=>{var n=e(551).FDLayout,i=e(578),o=e(880),t=e(991),h=e(767),g=e(806),c=e(902),l=e(551).FDLayoutConstants,y=e(551).LayoutConstants,v=e(551).Point,N=e(551).PointD,A=e(551).DimensionD,M=e(551).Layout,P=e(551).Integer,b=e(551).IGeometry,Y=e(551).LGraph,H=e(551).Transform,q=e(551).LinkedList;function _(){n.call(this),this.toBeTiled={},this.constraints={}}for(var B in _.prototype=Object.create(n.prototype),n)_[B]=n[B];_.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},_.prototype.newGraph=function(s){return new o(null,this.graphManager,s)},_.prototype.newNode=function(s){return new t(this.graphManager,s)},_.prototype.newEdge=function(s){return new h(null,null,s)},_.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(g.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=g.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=g.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},_.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},_.prototype.layout=function(){return y.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},_.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)g.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return m.has(p)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return m.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),g.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},_.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(f){return s.has(f)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),g.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),g.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},_.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),m={},u=0;u<s.length;u++){var p=s[u].rect,f=s[u].id;m[f]={id:f,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return m},_.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},_.prototype.moveNodes=function(){for(var s=this.getAllNodes(),m=0;m<s.length;m++)s[m].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),m=0;m<s.length;m++)s[m].move()},_.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var p=m[u];this.idToNodeMap.set(p.id,p)}var f=function O(X){for(var j,K=X.getChild().getNodes(),it=0,V=0;V<K.length;V++)(j=K[V]).getChild()==null?s.fixedNodeSet.has(j.id)&&(it+=100):it+=O(j);return it};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(O){s.fixedNodeSet.add(O.nodeId)}),m=this.graphManager.getAllNodes(),u=0;u<m.length;u++)if((p=m[u]).getChild()!=null){var w=f(p);w>0&&(p.fixedNodeWeight=w)}}if(this.constraints.relativePlacementConstraint){var I=new Map,x=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){s.fixedNodesOnHorizontal.add(O),s.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var F=this.constraints.alignmentConstraint.vertical;for(u=0;u<F.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),F[u].forEach(function(O){I.set(O,"dummy"+u),s.dummyToNodeForVerticalAlignment.get("dummy"+u).push(O),s.fixedNodeSet.has(O)&&s.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var G=this.constraints.alignmentConstraint.horizontal;for(u=0;u<G.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),G[u].forEach(function(O){x.set(O,"dummy"+u),s.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(O),s.fixedNodeSet.has(O)&&s.fixedNodesOnVertical.add("dummy"+u)})}}if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,j,K;for(K=O.length-1;K>=2*O.length/3;K--)X=Math.floor(Math.random()*(K+1)),j=O[K],O[K]=O[X],O[X]=j;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 X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;s.nodesInRelativeHorizontal.includes(X)||(s.nodesInRelativeHorizontal.push(X),s.nodeToRelativeConstraintMapHorizontal.set(X,[]),s.dummyToNodeForVerticalAlignment.has(X)?s.nodeToTempPositionMapHorizontal.set(X,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(X,s.idToNodeMap.get(X).getCenterX())),s.nodesInRelativeHorizontal.includes(j)||(s.nodesInRelativeHorizontal.push(j),s.nodeToRelativeConstraintMapHorizontal.set(j,[]),s.dummyToNodeForVerticalAlignment.has(j)?s.nodeToTempPositionMapHorizontal.set(j,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(j)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(j,s.idToNodeMap.get(j).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(X).push({right:j,gap:O.gap}),s.nodeToRelativeConstraintMapHorizontal.get(j).push({left:X,gap:O.gap})}else{var K=x.has(O.top)?x.get(O.top):O.top,it=x.has(O.bottom)?x.get(O.bottom):O.bottom;s.nodesInRelativeVertical.includes(K)||(s.nodesInRelativeVertical.push(K),s.nodeToRelativeConstraintMapVertical.set(K,[]),s.dummyToNodeForHorizontalAlignment.has(K)?s.nodeToTempPositionMapVertical.set(K,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(K,s.idToNodeMap.get(K).getCenterY())),s.nodesInRelativeVertical.includes(it)||(s.nodesInRelativeVertical.push(it),s.nodeToRelativeConstraintMapVertical.set(it,[]),s.dummyToNodeForHorizontalAlignment.has(it)?s.nodeToTempPositionMapVertical.set(it,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(it)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(it,s.idToNodeMap.get(it).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(K).push({bottom:it,gap:O.gap}),s.nodeToRelativeConstraintMapVertical.get(it).push({top:K,gap:O.gap})}});else{var S=new Map,D=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=I.has(O.left)?I.get(O.left):O.left,j=I.has(O.right)?I.get(O.right):O.right;S.has(X)?S.get(X).push(j):S.set(X,[j]),S.has(j)?S.get(j).push(X):S.set(j,[X])}else{var K=x.has(O.top)?x.get(O.top):O.top,it=x.has(O.bottom)?x.get(O.bottom):O.bottom;D.has(K)?D.get(K).push(it):D.set(K,[it]),D.has(it)?D.get(it).push(K):D.set(it,[K])}});var z=function(O,X){var j=[],K=[],it=new q,V=new Set,yt=0;return O.forEach(function(Lt,Ut){if(!V.has(Ut)){j[yt]=[],K[yt]=!1;var Rt=Ut;for(it.push(Rt),V.add(Rt),j[yt].push(Rt);it.length!=0;)Rt=it.shift(),X.has(Rt)&&(K[yt]=!0),O.get(Rt).forEach(function(J){V.has(J)||(it.push(J),V.add(J),j[yt].push(J))});yt++}}),{components:j,isFixed:K}},W=z(S,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=W.components,this.fixedComponentsOnHorizontal=W.isFixed;var U=z(D,s.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},_.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var O=s.idToNodeMap.get(U.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var p=0,f=0;f<m[u].length;f++){if(this.fixedNodeSet.has(m[u][f])){p=0;break}p+=this.idToNodeMap.get(m[u][f]).displacementX}var w=p/m[u].length;for(f=0;f<m[u].length;f++)this.idToNodeMap.get(m[u][f]).displacementX=w}if(this.constraints.alignmentConstraint.horizontal){var I=this.constraints.alignmentConstraint.horizontal;for(u=0;u<I.length;u++){var x=0;for(f=0;f<I[u].length;f++){if(this.fixedNodeSet.has(I[u][f])){x=0;break}x+=this.idToNodeMap.get(I[u][f]).displacementY}var F=x/I[u].length;for(f=0;f<I[u].length;f++)this.idToNodeMap.get(I[u][f]).displacementY=F}}}if(this.constraints.relativePlacementConstraint)if(g.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!s.fixedNodesOnHorizontal.has(U)){var O=0;O=s.dummyToNodeForVerticalAlignment.has(U)?s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:s.idToNodeMap.get(U).displacementX,s.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(X){var j;X.right?(j=s.nodeToTempPositionMapHorizontal.get(X.right)-s.nodeToTempPositionMapHorizontal.get(U)-O)<X.gap&&(O-=X.gap-j):(j=s.nodeToTempPositionMapHorizontal.get(U)-s.nodeToTempPositionMapHorizontal.get(X.left)+O)<X.gap&&(O+=X.gap-j)}),s.nodeToTempPositionMapHorizontal.set(U,s.nodeToTempPositionMapHorizontal.get(U)+O),s.dummyToNodeForVerticalAlignment.has(U)?s.dummyToNodeForVerticalAlignment.get(U).forEach(function(X){s.idToNodeMap.get(X).displacementX=O}):s.idToNodeMap.get(U).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(U){if(!s.fixedNodesOnHorizontal.has(U)){var O=0;O=s.dummyToNodeForHorizontalAlignment.has(U)?s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:s.idToNodeMap.get(U).displacementY,s.nodeToRelativeConstraintMapVertical.get(U).forEach(function(X){var j;X.bottom?(j=s.nodeToTempPositionMapVertical.get(X.bottom)-s.nodeToTempPositionMapVertical.get(U)-O)<X.gap&&(O-=X.gap-j):(j=s.nodeToTempPositionMapVertical.get(U)-s.nodeToTempPositionMapVertical.get(X.top)+O)<X.gap&&(O+=X.gap-j)}),s.nodeToTempPositionMapVertical.set(U,s.nodeToTempPositionMapVertical.get(U)+O),s.dummyToNodeForHorizontalAlignment.has(U)?s.dummyToNodeForHorizontalAlignment.get(U).forEach(function(X){s.idToNodeMap.get(X).displacementY=O}):s.idToNodeMap.get(U).displacementY=O}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var G=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?this.dummyToNodeForVerticalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(G[f]).displacementX=0;else{var S=0,D=0;for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?(S+=(W=this.dummyToNodeForVerticalAlignment.get(G[f])).length*this.idToNodeMap.get(W[0]).displacementX,D+=W.length):(S+=this.idToNodeMap.get(G[f]).displacementX,D++);var z=S/D;for(f=0;f<G.length;f++)this.dummyToNodeForVerticalAlignment.has(G[f])?this.dummyToNodeForVerticalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementX=z}):this.idToNodeMap.get(G[f]).displacementX=z}}for(u=0;u<this.componentsOnVertical.length;u++)if(G=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(f=0;f<G.length;f++)this.dummyToNodeForHorizontalAlignment.has(G[f])?this.dummyToNodeForHorizontalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(G[f]).displacementY=0;else{for(S=0,D=0,f=0;f<G.length;f++){var W;this.dummyToNodeForHorizontalAlignment.has(G[f])?(S+=(W=this.dummyToNodeForHorizontalAlignment.get(G[f])).length*this.idToNodeMap.get(W[0]).displacementY,D+=W.length):(S+=this.idToNodeMap.get(G[f]).displacementY,D++)}for(z=S/D,f=0;f<G.length;f++)this.dummyToNodeForHorizontalAlignment.has(G[f])?this.dummyToNodeForHorizontalAlignment.get(G[f]).forEach(function(U){s.idToNodeMap.get(U).displacementY=z}):this.idToNodeMap.get(G[f]).displacementY=z}}},_.prototype.calculateNodesToApplyGravitationTo=function(){var s,m,u=[],p=this.graphManager.getGraphs(),f=p.length;for(m=0;m<f;m++)(s=p[m]).updateConnected(),s.isConnected||(u=u.concat(s.getNodes()));return u},_.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var m,u=new Set;for(m=0;m<s.length;m++){var p=s[m];if(!u.has(p)){var f=p.getSource(),w=p.getTarget();if(f==w)p.getBendpoints().push(new N),p.getBendpoints().push(new N),this.createDummyNodesForBendpoints(p),u.add(p);else{var I=[];if(I=(I=I.concat(f.getEdgeListToNode(w))).concat(w.getEdgeListToNode(f)),!u.has(I[0])){var x;if(I.length>1)for(x=0;x<I.length;x++){var F=I[x];F.getBendpoints().push(new N),this.createDummyNodesForBendpoints(F)}I.forEach(function(G){u.add(G)})}}}if(u.size==s.length)break}},_.prototype.positionNodesRadially=function(s){for(var m=new v(0,0),u=Math.ceil(Math.sqrt(s.length)),p=0,f=0,w=0,I=new N(0,0),x=0;x<s.length;x++){x%u==0&&(w=0,f=p,x!=0&&(f+=g.DEFAULT_COMPONENT_SEPERATION),p=0);var F=s[x],G=M.findCenterOfTree(F);m.x=w,m.y=f,(I=_.radialLayout(F,G,m)).y>p&&(p=Math.floor(I.y)),w=Math.floor(I.x+g.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(y.WORLD_CENTER_X-I.x/2,y.WORLD_CENTER_Y-I.y/2))},_.radialLayout=function(s,m,u){var p=Math.max(this.maxDiagonalInTree(s),g.DEFAULT_RADIAL_SEPARATION);_.branchRadialLayout(m,null,0,359,0,p);var f=Y.calculateBounds(s),w=new H;w.setDeviceOrgX(f.getMinX()),w.setDeviceOrgY(f.getMinY()),w.setWorldOrgX(u.x),w.setWorldOrgY(u.y);for(var I=0;I<s.length;I++)s[I].transform(w);var x=new N(f.getMaxX(),f.getMaxY());return w.inverseTransformPoint(x)},_.branchRadialLayout=function(s,m,u,p,f,w){var I=(p-u+1)/2;I<0&&(I+=180);var x=(I+u)%360*b.TWO_PI/360,F=f*Math.cos(x),G=f*Math.sin(x);s.setCenter(F,G);var S=[],D=(S=S.concat(s.getEdges())).length;m!=null&&D--;for(var z,W=0,U=S.length,O=s.getEdgesBetween(m);O.length>1;){var X=O[0];O.splice(0,1);var j=S.indexOf(X);j>=0&&S.splice(j,1),U--,D--}z=m!=null?(S.indexOf(O[0])+1)%U:0;for(var K=Math.abs(p-u)/D,it=z;W!=D;it=++it%U){var V=S[it].getOtherEnd(s);if(V!=m){var yt=(u+W*K)%360,Lt=(yt+K)%360;_.branchRadialLayout(V,s,yt,Lt,f+w,w),W++}}},_.maxDiagonalInTree=function(s){for(var m=P.MIN_VALUE,u=0;u<s.length;u++){var p=s[u].getDiagonal();p>m&&(m=p)}return m},_.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},_.prototype.groupZeroDegreeMembers=function(){var s=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),f=0;f<p.length;f++){var w=(I=p[f]).getParent();this.getNodeDegreeWithChildren(I)!==0||w.id!=null&&this.getToBeTiled(w)||u.push(I)}for(f=0;f<u.length;f++){var I,x=(I=u[f]).getParent().id;m[x]===void 0&&(m[x]=[]),m[x]=m[x].concat(I)}Object.keys(m).forEach(function(F){if(m[F].length>1){var G="DummyCompound_"+F;s.memberGroups[G]=m[F];var S=m[F][0].getParent(),D=new t(s.graphManager);D.id=G,D.paddingLeft=S.paddingLeft||0,D.paddingRight=S.paddingRight||0,D.paddingBottom=S.paddingBottom||0,D.paddingTop=S.paddingTop||0,s.idToDummyNode[G]=D;var z=s.getGraphManager().add(s.newGraph(),D),W=S.getChild();W.add(D);for(var U=0;U<m[F].length;U++){var O=m[F][U];W.remove(O),z.add(O)}}})},_.prototype.clearCompounds=function(){var s={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],s[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,m)},_.prototype.clearZeroDegreeMembers=function(){var s=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var p=s.idToDummyNode[u];if(m[u]=s.tileNodes(s.memberGroups[u],p.paddingLeft+p.paddingRight),p.rect.width=m[u].width,p.rect.height=m[u].height,p.setCenter(m[u].centerX,m[u].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var f=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(f+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>f?(p.rect.x-=(p.labelWidth-f)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-f)/2):p.labelPosHorizontal=="right"&&p.setWidth(f+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},_.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var m=this.compoundOrder[s],u=m.id,p=m.paddingLeft,f=m.paddingTop,w=m.labelMarginLeft,I=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,p,f,w,I)}},_.prototype.repopulateZeroDegreeMembers=function(){var s=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var p=s.idToDummyNode[u],f=p.paddingLeft,w=p.paddingTop,I=p.labelMarginLeft,x=p.labelMarginTop;s.adjustLocations(m[u],p.rect.x,p.rect.y,f,w,I,x)})},_.prototype.getToBeTiled=function(s){var m=s.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=s.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var p=u.getNodes(),f=0;f<p.length;f++){var w=p[f];if(this.getNodeDegree(w)>0)return this.toBeTiled[m]=!1,!1;if(w.getChild()!=null){if(!this.getToBeTiled(w))return this.toBeTiled[m]=!1,!1}else this.toBeTiled[w.id]=!1}return this.toBeTiled[m]=!0,!0},_.prototype.getNodeDegree=function(s){s.id;for(var m=s.getEdges(),u=0,p=0;p<m.length;p++){var f=m[p];f.getSource().id!==f.getTarget().id&&(u+=1)}return u},_.prototype.getNodeDegreeWithChildren=function(s){var m=this.getNodeDegree(s);if(s.getChild()==null)return m;for(var u=s.getChild().getNodes(),p=0;p<u.length;p++){var f=u[p];m+=this.getNodeDegreeWithChildren(f)}return m},_.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},_.prototype.fillCompexOrderByDFS=function(s){for(var m=0;m<s.length;m++){var u=s[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},_.prototype.adjustLocations=function(s,m,u,p,f,w,I){u+=f+I;for(var x=m+=p+w,F=0;F<s.rows.length;F++){var G=s.rows[F];m=x;for(var S=0,D=0;D<G.length;D++){var z=G[D];z.rect.x=m,z.rect.y=u,m+=z.rect.width+s.horizontalPadding,z.rect.height>S&&(S=z.rect.height)}u+=S+s.verticalPadding}},_.prototype.tileCompoundMembers=function(s,m){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var f=m[p];if(u.tiledMemberPack[p]=u.tileNodes(s[p],f.paddingLeft+f.paddingRight),f.rect.width=u.tiledMemberPack[p].width,f.rect.height=u.tiledMemberPack[p].height,f.setCenter(u.tiledMemberPack[p].centerX,u.tiledMemberPack[p].centerY),f.labelMarginLeft=0,f.labelMarginTop=0,g.NODE_DIMENSIONS_INCLUDE_LABELS){var w=f.rect.width,I=f.rect.height;f.labelWidth&&(f.labelPosHorizontal=="left"?(f.rect.x-=f.labelWidth,f.setWidth(w+f.labelWidth),f.labelMarginLeft=f.labelWidth):f.labelPosHorizontal=="center"&&f.labelWidth>w?(f.rect.x-=(f.labelWidth-w)/2,f.setWidth(f.labelWidth),f.labelMarginLeft=(f.labelWidth-w)/2):f.labelPosHorizontal=="right"&&f.setWidth(w+f.labelWidth)),f.labelHeight&&(f.labelPosVertical=="top"?(f.rect.y-=f.labelHeight,f.setHeight(I+f.labelHeight),f.labelMarginTop=f.labelHeight):f.labelPosVertical=="center"&&f.labelHeight>I?(f.rect.y-=(f.labelHeight-I)/2,f.setHeight(f.labelHeight),f.labelMarginTop=(f.labelHeight-I)/2):f.labelPosVertical=="bottom"&&f.setHeight(I+f.labelHeight))}})},_.prototype.tileNodes=function(s,m){var u=this.tileNodesByFavoringDim(s,m,!0),p=this.tileNodesByFavoringDim(s,m,!1),f=this.getOrgRatio(u);return this.getOrgRatio(p)<f?p:u},_.prototype.getOrgRatio=function(s){var m=s.width/s.height;return m<1&&(m=1/m),m},_.prototype.calcIdealRowWidth=function(s,m){var u=g.TILING_PADDING_VERTICAL,p=g.TILING_PADDING_HORIZONTAL,f=s.length,w=0,I=0,x=0;s.forEach(function(U){w+=U.getWidth(),I+=U.getHeight(),U.getWidth()>x&&(x=U.getWidth())});var F,G=w/f,S=I/f,D=Math.pow(u-p,2)+4*(G+p)*(S+u)*f,z=(p-u+Math.sqrt(D))/(2*(G+p));m?(F=Math.ceil(z))==z&&F++:F=Math.floor(z);var W=F*(G+p)-p;return x>W&&(W=x),W+=2*p},_.prototype.tileNodesByFavoringDim=function(s,m,u){var p=g.TILING_PADDING_VERTICAL,f=g.TILING_PADDING_HORIZONTAL,w=g.TILING_COMPARE_BY,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:p,horizontalPadding:f,centerX:0,centerY:0};w&&(I.idealRowWidth=this.calcIdealRowWidth(s,u));var x=function(U){return U.rect.width*U.rect.height},F=function(U,O){return x(O)-x(U)};s.sort(function(U,O){var X=F;return I.idealRowWidth?(X=w)(U.id,O.id):X(U,O)});for(var G=0,S=0,D=0;D<s.length;D++)G+=(z=s[D]).getCenterX(),S+=z.getCenterY();for(I.centerX=G/s.length,I.centerY=S/s.length,D=0;D<s.length;D++){var z=s[D];if(I.rows.length==0)this.insertNodeToRow(I,z,0,m);else if(this.canAddHorizontal(I,z.rect.width,z.rect.height)){var W=I.rows.length-1;I.idealRowWidth||(W=this.getShortestRowIndex(I)),this.insertNodeToRow(I,z,W,m)}else this.insertNodeToRow(I,z,I.rows.length,m);this.shiftToLastRow(I)}return I},_.prototype.insertNodeToRow=function(s,m,u,p){var f=p;u==s.rows.length&&(s.rows.push([]),s.rowWidth.push(f),s.rowHeight.push(0));var w=s.rowWidth[u]+m.rect.width;s.rows[u].length>0&&(w+=s.horizontalPadding),s.rowWidth[u]=w,s.width<w&&(s.width=w);var I=m.rect.height;u>0&&(I+=s.verticalPadding);var x=0;I>s.rowHeight[u]&&(x=s.rowHeight[u],s.rowHeight[u]=I,x=s.rowHeight[u]-x),s.height+=x,s.rows[u].push(m)},_.prototype.getShortestRowIndex=function(s){for(var m=-1,u=Number.MAX_VALUE,p=0;p<s.rows.length;p++)s.rowWidth[p]<u&&(m=p,u=s.rowWidth[p]);return m},_.prototype.getLongestRowIndex=function(s){for(var m=-1,u=Number.MIN_VALUE,p=0;p<s.rows.length;p++)s.rowWidth[p]>u&&(m=p,u=s.rowWidth[p]);return m},_.prototype.canAddHorizontal=function(s,m,u){if(s.idealRowWidth){var p=s.rows.length-1;return s.rowWidth[p]+m+s.horizontalPadding<=s.idealRowWidth}var f=this.getShortestRowIndex(s);if(f<0)return!0;var w=s.rowWidth[f];if(w+s.horizontalPadding+m<=s.width)return!0;var I,x,F=0;return s.rowHeight[f]<u&&f>0&&(F=u+s.verticalPadding-s.rowHeight[f]),I=s.width-w>=m+s.horizontalPadding?(s.height+F)/(w+m+s.horizontalPadding):(s.height+F)/s.width,F=u+s.verticalPadding,(x=s.width<m?(s.height+F)/m:(s.height+F)/s.width)<1&&(x=1/x),I<1&&(I=1/I),I<x},_.prototype.shiftToLastRow=function(s){var m=this.getLongestRowIndex(s),u=s.rowWidth.length-1,p=s.rows[m],f=p[p.length-1],w=f.width+s.horizontalPadding;if(s.width-s.rowWidth[u]>w&&m!=u){p.splice(-1,1),s.rows[u].push(f),s.rowWidth[m]=s.rowWidth[m]-w,s.rowWidth[u]=s.rowWidth[u]+w,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var I=Number.MIN_VALUE,x=0;x<p.length;x++)p[x].height>I&&(I=p[x].height);m>0&&(I+=s.verticalPadding);var F=s.rowHeight[m]+s.rowHeight[u];s.rowHeight[m]=I,s.rowHeight[u]<f.height+s.verticalPadding&&(s.rowHeight[u]=f.height+s.verticalPadding);var G=s.rowHeight[m]+s.rowHeight[u];s.height+=G-F,this.shiftToLastRow(s)}},_.prototype.tilingPreLayout=function(){g.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},_.prototype.tilingPostLayout=function(){g.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},_.prototype.reduceTrees=function(){for(var s,m=[],u=!0;u;){var p=this.graphManager.getAllNodes(),f=[];u=!1;for(var w=0;w<p.length;w++)if((s=p[w]).getEdges().length==1&&!s.getEdges()[0].isInterGraph&&s.getChild()==null){if(g.PURE_INCREMENTAL){var I=s.getEdges()[0].getOtherEnd(s),x=new A(s.getCenterX()-I.getCenterX(),s.getCenterY()-I.getCenterY());f.push([s,s.getEdges()[0],s.getOwner(),x])}else f.push([s,s.getEdges()[0],s.getOwner()]);u=!0}if(u==1){for(var F=[],G=0;G<f.length;G++)f[G][0].getEdges().length==1&&(F.push(f[G]),f[G][0].getOwner().remove(f[G][0]));m.push(F),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=m},_.prototype.growTree=function(s){for(var m,u=s[s.length-1],p=0;p<u.length;p++)m=u[p],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},_.prototype.findPlaceforPrunedNode=function(s){var m,u,p=s[0];if(u=p==s[1].source?s[1].target:s[1].source,g.PURE_INCREMENTAL)p.setCenter(u.getCenterX()+s[3].getWidth(),u.getCenterY()+s[3].getHeight());else{var f=u.startX,w=u.finishX,I=u.startY,x=u.finishY,F=[0,0,0,0];if(I>0)for(var G=f;G<=w;G++)F[0]+=this.grid[G][I-1].length+this.grid[G][I].length-1;if(w<this.grid.length-1)for(G=I;G<=x;G++)F[1]+=this.grid[w+1][G].length+this.grid[w][G].length-1;if(x<this.grid[0].length-1)for(G=f;G<=w;G++)F[2]+=this.grid[G][x+1].length+this.grid[G][x].length-1;if(f>0)for(G=I;G<=x;G++)F[3]+=this.grid[f-1][G].length+this.grid[f][G].length-1;for(var S,D,z=P.MAX_VALUE,W=0;W<F.length;W++)F[W]<z?(z=F[W],S=1,D=W):F[W]==z&&S++;if(S==3&&z==0)F[0]==0&&F[1]==0&&F[2]==0?m=1:F[0]==0&&F[1]==0&&F[3]==0?m=0:F[0]==0&&F[2]==0&&F[3]==0?m=3:F[1]==0&&F[2]==0&&F[3]==0&&(m=2);else if(S==2&&z==0){var U=Math.floor(2*Math.random());m=F[0]==0&&F[1]==0?U==0?0:1:F[0]==0&&F[2]==0?U==0?0:2:F[0]==0&&F[3]==0?U==0?0:3:F[1]==0&&F[2]==0?U==0?1:2:F[1]==0&&F[3]==0?U==0?1:3:U==0?2:3}else m=S==4&&z==0?U=Math.floor(4*Math.random()):D;m==0?p.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-l.DEFAULT_EDGE_LENGTH-p.getHeight()/2):m==1?p.setCenter(u.getCenterX()+u.getWidth()/2+l.DEFAULT_EDGE_LENGTH+p.getWidth()/2,u.getCenterY()):m==2?p.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+l.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(u.getCenterX()-u.getWidth()/2-l.DEFAULT_EDGE_LENGTH-p.getWidth()/2,u.getCenterY())}},r.exports=_},991:(r,a,e)=>{var n=e(551).FDLayoutNode,i=e(551).IMath;function o(h,g,c,l){n.call(this,h,g,c,l)}for(var t in o.prototype=Object.create(n.prototype),n)o[t]=n[t];o.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(h,g){for(var c,l=this.getChild().getNodes(),y=0;y<l.length;y++)(c=l[y]).getChild()==null?(c.displacementX+=h,c.displacementY+=g):c.propogateDisplacementToChildren(h,g)},o.prototype.move=function(){var h=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),h.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},o.prototype.setPred1=function(h){this.pred1=h},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(h){this.next=h},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(h){this.processed=h},o.prototype.isProcessed=function(){return processed},r.exports=o},902:(r,a,e)=>{function n(c){if(Array.isArray(c)){for(var l=0,y=Array(c.length);l<c.length;l++)y[l]=c[l];return y}return Array.from(c)}var i=e(806),o=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function g(){}g.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var y=new Map,v=new Map,N=[],A=[],M=c.getAllNodes(),P=0,b=0;b<M.length;b++){var Y=M[b];Y.getChild()==null&&(v.set(Y.id,P++),N.push(Y.getCenterX()),A.push(Y.getCenterY()),y.set(Y.id,Y))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(R){R.gap||R.gap==0||(R.left?R.gap=i.DEFAULT_EDGE_LENGTH+y.get(R.left).getWidth()/2+y.get(R.right).getWidth()/2:R.gap=i.DEFAULT_EDGE_LENGTH+y.get(R.top).getHeight()/2+y.get(R.bottom).getHeight()/2)});var H=function(R){var k=0,Q=0;return R.forEach(function(Z){k+=N[v.get(Z)],Q+=A[v.get(Z)]}),{x:k/R.size,y:Q/R.size}},q=function(R,k,Q,Z,st){var It=new Map;R.forEach(function(lt,$){It.set($,0)}),R.forEach(function(lt,$){lt.forEach(function(gt){It.set(gt.id,It.get(gt.id)+1)})});var rt=new Map,mt=new Map,ft=new o;It.forEach(function(lt,$){lt==0?(ft.push($),Q||(k=="horizontal"?rt.set($,v.has($)?N[v.get($)]:Z.get($)):rt.set($,v.has($)?A[v.get($)]:Z.get($)))):rt.set($,Number.NEGATIVE_INFINITY),Q&&mt.set($,new Set([$]))}),Q&&st.forEach(function(lt){var $=[];if(lt.forEach(function(at){Q.has(at)&&$.push(at)}),$.length>0){var gt=0;$.forEach(function(at){k=="horizontal"?(rt.set(at,v.has(at)?N[v.get(at)]:Z.get(at)),gt+=rt.get(at)):(rt.set(at,v.has(at)?A[v.get(at)]:Z.get(at)),gt+=rt.get(at))}),gt/=$.length,lt.forEach(function(at){Q.has(at)||rt.set(at,gt)})}else{var Nt=0;lt.forEach(function(at){Nt+=k=="horizontal"?v.has(at)?N[v.get(at)]:Z.get(at):v.has(at)?A[v.get(at)]:Z.get(at)}),Nt/=lt.length,lt.forEach(function(at){rt.set(at,Nt)})}});for(var St=function(){var lt=ft.shift();R.get(lt).forEach(function($){if(rt.get($.id)<rt.get(lt)+$.gap)if(Q&&Q.has($.id)){var gt=void 0;if(gt=k=="horizontal"?v.has($.id)?N[v.get($.id)]:Z.get($.id):v.has($.id)?A[v.get($.id)]:Z.get($.id),rt.set($.id,gt),gt<rt.get(lt)+$.gap){var Nt=rt.get(lt)+$.gap-gt;mt.get(lt).forEach(function(at){rt.set(at,rt.get(at)-Nt)})}}else rt.set($.id,rt.get(lt)+$.gap);It.set($.id,It.get($.id)-1),It.get($.id)==0&&ft.push($.id),Q&&mt.set($.id,function(at,Ft){var bt=new Set(at),Dt=!0,At=!1,ct=void 0;try{for(var Gt,Ct=Ft[Symbol.iterator]();!(Dt=(Gt=Ct.next()).done);Dt=!0){var Yt=Gt.value;bt.add(Yt)}}catch(Xt){At=!0,ct=Xt}finally{try{!Dt&&Ct.return&&Ct.return()}finally{if(At)throw ct}}return bt}(mt.get(lt),mt.get($.id)))})};ft.length!=0;)St();if(Q){var et=new Set;R.forEach(function(lt,$){lt.length==0&&et.add($)});var pt=[];mt.forEach(function(lt,$){if(et.has($)){var gt=!1,Nt=!0,at=!1,Ft=void 0;try{for(var bt,Dt=lt[Symbol.iterator]();!(Nt=(bt=Dt.next()).done);Nt=!0){var At=bt.value;Q.has(At)&&(gt=!0)}}catch(Ct){at=!0,Ft=Ct}finally{try{!Nt&&Dt.return&&Dt.return()}finally{if(at)throw Ft}}if(!gt){var ct=!1,Gt=void 0;pt.forEach(function(Ct,Yt){Ct.has([].concat(n(lt))[0])&&(ct=!0,Gt=Yt)}),ct?lt.forEach(function(Ct){pt[Gt].add(Ct)}):pt.push(new Set(lt))}}}),pt.forEach(function(lt,$){var gt=Number.POSITIVE_INFINITY,Nt=Number.POSITIVE_INFINITY,at=Number.NEGATIVE_INFINITY,Ft=Number.NEGATIVE_INFINITY,bt=!0,Dt=!1,At=void 0;try{for(var ct,Gt=lt[Symbol.iterator]();!(bt=(ct=Gt.next()).done);bt=!0){var Ct=ct.value,Yt=void 0;Yt=k=="horizontal"?v.has(Ct)?N[v.get(Ct)]:Z.get(Ct):v.has(Ct)?A[v.get(Ct)]:Z.get(Ct);var Xt=rt.get(Ct);Yt<gt&&(gt=Yt),Yt>at&&(at=Yt),Xt<Nt&&(Nt=Xt),Xt>Ft&&(Ft=Xt)}}catch(Wt){Dt=!0,At=Wt}finally{try{!bt&&Gt.return&&Gt.return()}finally{if(Dt)throw At}}var ne=(gt+at)/2-(Nt+Ft)/2,Jt=!0,Bt=!1,jt=void 0;try{for(var qt,Vt=lt[Symbol.iterator]();!(Jt=(qt=Vt.next()).done);Jt=!0){var te=qt.value;rt.set(te,rt.get(te)+ne)}}catch(Wt){Bt=!0,jt=Wt}finally{try{!Jt&&Vt.return&&Vt.return()}finally{if(Bt)throw jt}}})}return rt},_=function(R){var k=0,Q=0,Z=0,st=0;if(R.forEach(function(ft){ft.left?N[v.get(ft.left)]-N[v.get(ft.right)]>=0?k++:Q++:A[v.get(ft.top)]-A[v.get(ft.bottom)]>=0?Z++:st++}),k>Q&&Z>st)for(var It=0;It<v.size;It++)N[It]=-1*N[It],A[It]=-1*A[It];else if(k>Q)for(var rt=0;rt<v.size;rt++)N[rt]=-1*N[rt];else if(Z>st)for(var mt=0;mt<v.size;mt++)A[mt]=-1*A[mt]},B=function(R){var k=[],Q=new o,Z=new Set,st=0;return R.forEach(function(It,rt){if(!Z.has(rt)){k[st]=[];var mt=rt;for(Q.push(mt),Z.add(mt),k[st].push(mt);Q.length!=0;)mt=Q.shift(),R.get(mt).forEach(function(ft){Z.has(ft.id)||(Q.push(ft.id),Z.add(ft.id),k[st].push(ft.id))});st++}}),k},s=function(R){var k=new Map;return R.forEach(function(Q,Z){k.set(Z,[])}),R.forEach(function(Q,Z){Q.forEach(function(st){k.get(Z).push(st),k.get(st.id).push({id:Z,gap:st.gap,direction:st.direction})})}),k},m=function(R){var k=new Map;return R.forEach(function(Q,Z){k.set(Z,[])}),R.forEach(function(Q,Z){Q.forEach(function(st){k.get(st.id).push({id:Z,gap:st.gap,direction:st.direction})})}),k},u=[],p=[],f=!1,w=!1,I=new Set,x=new Map,F=new Map,G=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(R){I.add(R.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(R){R.left?(x.has(R.left)?x.get(R.left).push({id:R.right,gap:R.gap,direction:"horizontal"}):x.set(R.left,[{id:R.right,gap:R.gap,direction:"horizontal"}]),x.has(R.right)||x.set(R.right,[])):(x.has(R.top)?x.get(R.top).push({id:R.bottom,gap:R.gap,direction:"vertical"}):x.set(R.top,[{id:R.bottom,gap:R.gap,direction:"vertical"}]),x.has(R.bottom)||x.set(R.bottom,[]))}),F=s(x),G=B(F)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(R,k){u[k]=[R.position.x,R.position.y],p[k]=[N[v.get(R.nodeId)],A[v.get(R.nodeId)]]}),f=!0;else if(l.alignmentConstraint)(function(){var R=0;if(l.alignmentConstraint.vertical){for(var k=l.alignmentConstraint.vertical,Q=function(mt){var ft=new Set;k[mt].forEach(function(pt){ft.add(pt)});var St=new Set([].concat(n(ft)).filter(function(pt){return I.has(pt)})),et=void 0;et=St.size>0?N[v.get(St.values().next().value)]:H(ft).x,k[mt].forEach(function(pt){u[R]=[et,A[v.get(pt)]],p[R]=[N[v.get(pt)],A[v.get(pt)]],R++})},Z=0;Z<k.length;Z++)Q(Z);f=!0}if(l.alignmentConstraint.horizontal){for(var st=l.alignmentConstraint.horizontal,It=function(mt){var ft=new Set;st[mt].forEach(function(pt){ft.add(pt)});var St=new Set([].concat(n(ft)).filter(function(pt){return I.has(pt)})),et=void 0;et=St.size>0?N[v.get(St.values().next().value)]:H(ft).y,st[mt].forEach(function(pt){u[R]=[N[v.get(pt)],et],p[R]=[N[v.get(pt)],A[v.get(pt)]],R++})},rt=0;rt<st.length;rt++)It(rt);f=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var S=0,D=0,z=0;z<G.length;z++)G[z].length>S&&(S=G[z].length,D=z);if(S<F.size/2)_(l.relativePlacementConstraint),f=!1,w=!1;else{var W=new Map,U=new Map,O=[];G[D].forEach(function(R){x.get(R).forEach(function(k){k.direction=="horizontal"?(W.has(R)?W.get(R).push(k):W.set(R,[k]),W.has(k.id)||W.set(k.id,[]),O.push({left:R,right:k.id})):(U.has(R)?U.get(R).push(k):U.set(R,[k]),U.has(k.id)||U.set(k.id,[]),O.push({top:R,bottom:k.id}))})}),_(O),w=!1;var X=q(W,"horizontal"),j=q(U,"vertical");G[D].forEach(function(R,k){p[k]=[N[v.get(R)],A[v.get(R)]],u[k]=[],X.has(R)?u[k][0]=X.get(R):u[k][0]=N[v.get(R)],j.has(R)?u[k][1]=j.get(R):u[k][1]=A[v.get(R)]}),f=!0}}if(f){for(var K,it=t.transpose(u),V=t.transpose(p),yt=0;yt<it.length;yt++)it[yt]=t.multGamma(it[yt]),V[yt]=t.multGamma(V[yt]);var Lt=t.multMat(it,t.transpose(V)),Ut=h.svd(Lt);K=t.multMat(Ut.V,t.transpose(Ut.U));for(var Rt=0;Rt<v.size;Rt++){var J=[N[Rt],A[Rt]],ot=[K[0][0],K[1][0]],ut=[K[0][1],K[1][1]];N[Rt]=t.dotProduct(J,ot),A[Rt]=t.dotProduct(J,ut)}w&&_(l.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var dt={x:0,y:0};l.fixedNodeConstraint.forEach(function(R,k){var Q,Z,st={x:N[v.get(R.nodeId)],y:A[v.get(R.nodeId)]},It=R.position,rt=(Z=st,{x:(Q=It).x-Z.x,y:Q.y-Z.y});dt.x+=rt.x,dt.y+=rt.y}),dt.x/=l.fixedNodeConstraint.length,dt.y/=l.fixedNodeConstraint.length,N.forEach(function(R,k){N[k]+=dt.x}),A.forEach(function(R,k){A[k]+=dt.y}),l.fixedNodeConstraint.forEach(function(R){N[v.get(R.nodeId)]=R.position.x,A[v.get(R.nodeId)]=R.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var vt=l.alignmentConstraint.vertical,Et=function(R){var k=new Set;vt[R].forEach(function(st){k.add(st)});var Q=new Set([].concat(n(k)).filter(function(st){return I.has(st)})),Z=void 0;Z=Q.size>0?N[v.get(Q.values().next().value)]:H(k).x,k.forEach(function(st){I.has(st)||(N[v.get(st)]=Z)})},ht=0;ht<vt.length;ht++)Et(ht);if(l.alignmentConstraint.horizontal)for(var Tt=l.alignmentConstraint.horizontal,_t=function(R){var k=new Set;Tt[R].forEach(function(st){k.add(st)});var Q=new Set([].concat(n(k)).filter(function(st){return I.has(st)})),Z=void 0;Z=Q.size>0?A[v.get(Q.values().next().value)]:H(k).y,k.forEach(function(st){I.has(st)||(A[v.get(st)]=Z)})},Ot=0;Ot<Tt.length;Ot++)_t(Ot)}l.relativePlacementConstraint&&function(){var R=new Map,k=new Map,Q=new Map,Z=new Map,st=new Map,It=new Map,rt=new Set,mt=new Set;if(I.forEach(function(tt){rt.add(tt),mt.add(tt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var ft=l.alignmentConstraint.vertical,St=function(tt){Q.set("dummy"+tt,[]),ft[tt].forEach(function(wt){R.set(wt,"dummy"+tt),Q.get("dummy"+tt).push(wt),I.has(wt)&&rt.add("dummy"+tt)}),st.set("dummy"+tt,N[v.get(ft[tt][0])])},et=0;et<ft.length;et++)St(et);if(l.alignmentConstraint.horizontal)for(var pt=l.alignmentConstraint.horizontal,lt=function(tt){Z.set("dummy"+tt,[]),pt[tt].forEach(function(wt){k.set(wt,"dummy"+tt),Z.get("dummy"+tt).push(wt),I.has(wt)&&mt.add("dummy"+tt)}),It.set("dummy"+tt,A[v.get(pt[tt][0])])},$=0;$<pt.length;$++)lt($)}var gt=new Map,Nt=new Map,at=function(tt){x.get(tt).forEach(function(wt){var kt=void 0,Ht=void 0;wt.direction=="horizontal"?(kt=R.get(tt)?R.get(tt):tt,Ht=R.get(wt.id)?{id:R.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,gt.has(kt)?gt.get(kt).push(Ht):gt.set(kt,[Ht]),gt.has(Ht.id)||gt.set(Ht.id,[])):(kt=k.get(tt)?k.get(tt):tt,Ht=k.get(wt.id)?{id:k.get(wt.id),gap:wt.gap,direction:wt.direction}:wt,Nt.has(kt)?Nt.get(kt).push(Ht):Nt.set(kt,[Ht]),Nt.has(Ht.id)||Nt.set(Ht.id,[]))})},Ft=!0,bt=!1,Dt=void 0;try{for(var At,ct=x.keys()[Symbol.iterator]();!(Ft=(At=ct.next()).done);Ft=!0)at(At.value)}catch(tt){bt=!0,Dt=tt}finally{try{!Ft&&ct.return&&ct.return()}finally{if(bt)throw Dt}}var Gt=s(gt),Ct=s(Nt),Yt=B(Gt),Xt=B(Ct),ne=m(gt),Jt=m(Nt),Bt=[],jt=[];Yt.forEach(function(tt,wt){Bt[wt]=[],tt.forEach(function(kt){ne.get(kt).length==0&&Bt[wt].push(kt)})}),Xt.forEach(function(tt,wt){jt[wt]=[],tt.forEach(function(kt){Jt.get(kt).length==0&&jt[wt].push(kt)})});var qt=q(gt,"horizontal",rt,st,Bt),Vt=q(Nt,"vertical",mt,It,jt),te=function(tt){Q.get(tt)?Q.get(tt).forEach(function(wt){N[v.get(wt)]=qt.get(tt)}):N[v.get(tt)]=qt.get(tt)},Wt=!0,ce=!1,ue=void 0;try{for(var fe,re=qt.keys()[Symbol.iterator]();!(Wt=(fe=re.next()).done);Wt=!0)te(fe.value)}catch(tt){ce=!0,ue=tt}finally{try{!Wt&&re.return&&re.return()}finally{if(ce)throw ue}}var Xe=function(tt){Z.get(tt)?Z.get(tt).forEach(function(wt){A[v.get(wt)]=Vt.get(tt)}):A[v.get(tt)]=Vt.get(tt)},ie=!0,pe=!1,me=void 0;try{for(var ve,oe=Vt.keys()[Symbol.iterator]();!(ie=(ve=oe.next()).done);ie=!0)Xe(ve.value)}catch(tt){pe=!0,me=tt}finally{try{!ie&&oe.return&&oe.return()}finally{if(pe)throw me}}}()}for(var Mt=0;Mt<M.length;Mt++){var xt=M[Mt];xt.getChild()==null&&xt.setCenter(N[v.get(xt.id)],A[v.get(xt.id)])}},r.exports=g},551:r=>{r.exports=T}},E={},d=function r(a){var e=E[a];if(e!==void 0)return e.exports;var n=E[a]={exports:{}};return L[a](n,n.exports,r),n.exports}(45),d;var L,E,d},Ae.exports=C(ln()));var C}var Ie,Ce,Me,le;const gn=an(Ie?Te.exports:(Ie=1,Te.exports=(Ce=dn(),Me={658:C=>{C.exports=Object.assign!=null?Object.assign.bind(Object):function(T){for(var L=arguments.length,E=Array(L>1?L-1:0),d=1;d<L;d++)E[d-1]=arguments[d];return E.forEach(function(r){Object.keys(r).forEach(function(a){return T[a]=r[a]})}),T}},548:(C,T,L)=>{var E=function(a,e){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return function(n,i){var o=[],t=!0,h=!1,g=void 0;try{for(var c,l=n[Symbol.iterator]();!(t=(c=l.next()).done)&&(o.push(c.value),!i||o.length!==i);t=!0);}catch(y){h=!0,g=y}finally{try{!t&&l.return&&l.return()}finally{if(h)throw g}}return o}(a,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},d=L(140).layoutBase.LinkedList,r={getTopMostNodes:function(a){for(var e={},n=0;n<a.length;n++)e[a[n].id()]=!0;var i=a.filter(function(o,t){typeof o=="number"&&(o=t);for(var h=o.parent()[0];h!=null;){if(e[h.id()])return!1;h=h.parent()[0]}return!0});return i},connectComponents:function(a,e,n,i){var o=new d,t=new Set,h=[],g=void 0,c=void 0,l=void 0,y=!1,v=1,N=[],A=[],M=function(){var P=a.collection();A.push(P);var b=n[0],Y=a.collection();Y.merge(b).merge(b.descendants().intersection(e)),h.push(b),Y.forEach(function(_){o.push(_),t.add(_),P.merge(_)});for(var H=function(){b=o.shift();var _=a.collection();b.neighborhood().nodes().forEach(function(m){e.intersection(b.edgesWith(m)).length>0&&_.merge(m)});for(var B=0;B<_.length;B++){var s=_[B];(g=n.intersection(s.union(s.ancestors())))==null||t.has(g[0])||g.union(g.descendants()).forEach(function(m){o.push(m),t.add(m),P.merge(m),n.has(m)&&h.push(m)})}};o.length!=0;)H();if(P.forEach(function(_){e.intersection(_.connectedEdges()).forEach(function(B){P.has(B.source())&&P.has(B.target())&&P.merge(B)})}),h.length==n.length&&(y=!0),!y||y&&v>1){c=h[0],l=c.connectedEdges().length,h.forEach(function(_){_.connectedEdges().length<l&&(l=_.connectedEdges().length,c=_)}),N.push(c.id());var q=a.collection();q.merge(h[0]),h.forEach(function(_){q.merge(_)}),h=[],n=n.difference(q),v++}};do M();while(!y);return i&&N.length>0&&i.set("dummy"+(i.size+1),N),A},relocateComponent:function(a,e,n){if(!n.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(n.quality=="draft"){var g=!0,c=!1,l=void 0;try{for(var y,v=e.nodeIndexes[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var N=y.value,A=E(N,2),M=A[0],P=A[1],b=n.cy.getElementById(M);if(b){var Y=b.boundingBox(),H=e.xCoords[P]-Y.w/2,q=e.xCoords[P]+Y.w/2,_=e.yCoords[P]-Y.h/2,B=e.yCoords[P]+Y.h/2;H<i&&(i=H),q>o&&(o=q),_<t&&(t=_),B>h&&(h=B)}}}catch(f){c=!0,l=f}finally{try{!g&&v.return&&v.return()}finally{if(c)throw l}}var s=a.x-(o+i)/2,m=a.y-(h+t)/2;e.xCoords=e.xCoords.map(function(f){return f+s}),e.yCoords=e.yCoords.map(function(f){return f+m})}else{Object.keys(e).forEach(function(f){var w=e[f],I=w.getRect().x,x=w.getRect().x+w.getRect().width,F=w.getRect().y,G=w.getRect().y+w.getRect().height;I<i&&(i=I),x>o&&(o=x),F<t&&(t=F),G>h&&(h=G)});var u=a.x-(o+i)/2,p=a.y-(h+t)/2;Object.keys(e).forEach(function(f){var w=e[f];w.setCenter(w.getCenterX()+u,w.getCenterY()+p)})}}},calcBoundingBox:function(a,e,n,i){for(var o=Number.MAX_SAFE_INTEGER,t=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,g=Number.MIN_SAFE_INTEGER,c=void 0,l=void 0,y=void 0,v=void 0,N=a.descendants().not(":parent"),A=N.length,M=0;M<A;M++){var P=N[M];o>(c=e[i.get(P.id())]-P.width()/2)&&(o=c),t<(l=e[i.get(P.id())]+P.width()/2)&&(t=l),h>(y=n[i.get(P.id())]-P.height()/2)&&(h=y),g<(v=n[i.get(P.id())]+P.height()/2)&&(g=v)}var b={};return b.topLeftX=o,b.topLeftY=h,b.width=t-o,b.height=g-h,b},calcParentsWithoutChildren:function(a,e){var n=a.collection();return e.nodes(":parent").forEach(function(i){var o=!1;i.children().forEach(function(t){t.css("display")!="none"&&(o=!0)}),o||n.merge(i)}),n}};C.exports=r},816:(C,T,L)=>{var E=L(548),d=L(140).CoSELayout,r=L(140).CoSENode,a=L(140).layoutBase.PointD,e=L(140).layoutBase.DimensionD,n=L(140).layoutBase.LayoutConstants,i=L(140).layoutBase.FDLayoutConstants,o=L(140).CoSEConstants;C.exports={coseLayout:function(t,h){var g=t.cy,c=t.eles,l=c.nodes(),y=c.edges(),v=void 0,N=void 0,A=void 0,M={};t.randomize&&(v=h.nodeIndexes,N=h.xCoords,A=h.yCoords);var P=function(_){return typeof _=="function"},b=function(_,B){return P(_)?_(B):_},Y=E.calcParentsWithoutChildren(g,c);t.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),t.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),t.numIter!=null&&(o.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),t.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),t.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),t.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),t.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),t.tilingCompareBy!=null&&(o.TILING_COMPARE_BY=t.tilingCompareBy),t.quality=="proof"?n.QUALITY=2:n.QUALITY=0,o.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical=="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal=="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!0,o.PURE_INCREMENTAL=!t.randomize,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,t.step=="transformed"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!1),t.step=="enforced"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!1),t.step=="cose"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!0),t.step=="all"&&(t.randomize?o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?o.TREE_REDUCTION_ON_INCREMENTAL=!1:o.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new d,q=H.newGraphManager();return function _(B,s,m,u){for(var p=s.length,f=0;f<p;f++){var w=s[f],I=null;w.intersection(Y).length==0&&(I=w.children());var x=void 0,F=w.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(w.outerWidth()!=null&&w.outerHeight()!=null)if(u.randomize)if(w.isParent()){var G=E.calcBoundingBox(w,N,A,v);x=w.intersection(Y).length==0?B.add(new r(m.graphManager,new a(G.topLeftX,G.topLeftY),new e(G.width,G.height))):B.add(new r(m.graphManager,new a(G.topLeftX,G.topLeftY),new e(parseFloat(F.w),parseFloat(F.h))))}else x=B.add(new r(m.graphManager,new a(N[v.get(w.id())]-F.w/2,A[v.get(w.id())]-F.h/2),new e(parseFloat(F.w),parseFloat(F.h))));else x=B.add(new r(m.graphManager,new a(w.position("x")-F.w/2,w.position("y")-F.h/2),new e(parseFloat(F.w),parseFloat(F.h))));else x=B.add(new r(this.graphManager));x.id=w.data("id"),x.nodeRepulsion=b(u.nodeRepulsion,w),x.paddingLeft=parseInt(w.css("padding")),x.paddingTop=parseInt(w.css("padding")),x.paddingRight=parseInt(w.css("padding")),x.paddingBottom=parseInt(w.css("padding")),u.nodeDimensionsIncludeLabels&&(x.labelWidth=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,x.labelHeight=w.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,x.labelPosVertical=w.css("text-valign"),x.labelPosHorizontal=w.css("text-halign")),M[w.data("id")]=x,isNaN(x.rect.x)&&(x.rect.x=0),isNaN(x.rect.y)&&(x.rect.y=0),I!=null&&I.length>0&&_(m.getGraphManager().add(m.newGraph(),x),I,m,u)}}(q.addRoot(),E.getTopMostNodes(l),H,t),function(_,B,s){for(var m=0,u=0,p=0;p<s.length;p++){var f=s[p],w=M[f.data("source")],I=M[f.data("target")];if(w&&I&&w!==I&&w.getEdgesBetween(I).length==0){var x=B.add(_.newEdge(),w,I);x.id=f.id(),x.idealLength=b(t.idealEdgeLength,f),x.edgeElasticity=b(t.edgeElasticity,f),m+=x.idealLength,u++}}t.idealEdgeLength!=null&&(u>0?o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=m/u:P(t.idealEdgeLength)?o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=50:o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,o.MIN_REPULSION_DIST=i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,o.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH)}(H,q,y),function(_,B){B.fixedNodeConstraint&&(_.constraints.fixedNodeConstraint=B.fixedNodeConstraint),B.alignmentConstraint&&(_.constraints.alignmentConstraint=B.alignmentConstraint),B.relativePlacementConstraint&&(_.constraints.relativePlacementConstraint=B.relativePlacementConstraint)}(H,t),H.runLayout(),M}}},212:(C,T,L)=>{var E=function(){function o(t,h){for(var g=0;g<h.length;g++){var c=h[g];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}return function(t,h,g){return h&&o(t.prototype,h),g&&o(t,g),t}}(),d=L(658),r=L(548),a=L(657).spectralLayout,e=L(816).coseLayout,n=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(o){return 4500},idealEdgeLength:function(o){return 50},edgeElasticity:function(o){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(){}}),i=function(){function o(t){(function(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")})(this,o),this.options=d({},n,t)}return E(o,[{key:"run",value:function(){var t=this.options,h=t.cy,g=t.eles,c=[],l=[],y=void 0,v=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&t.fixedNodeConstraint.length!=0||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&t.alignmentConstraint.vertical.length!=0||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&t.alignmentConstraint.horizontal.length!=0||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&t.relativePlacementConstraint.length!=0||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var N=void 0,A=!1;if(h.layoutUtilities&&t.packComponents&&((N=h.layoutUtilities("get"))||(N=h.layoutUtilities()),A=!0),g.nodes().length>0)if(A){var M=r.getTopMostNodes(t.eles.nodes());if((y=r.connectComponents(h,t.eles,M)).forEach(function(S){var D=S.boundingBox();v.push({x:D.x1+D.w/2,y:D.y1+D.h/2})}),t.randomize&&y.forEach(function(S){t.eles=S,c.push(a(t))}),t.quality=="default"||t.quality=="proof"){var P=h.collection();if(t.tile){var b=new Map,Y=0,H={nodeIndexes:b,xCoords:[],yCoords:[]},q=[];if(y.forEach(function(S,D){S.edges().length==0&&(S.nodes().forEach(function(z,W){P.merge(S.nodes()[W]),z.isParent()||(H.nodeIndexes.set(S.nodes()[W].id(),Y++),H.xCoords.push(S.nodes()[0].position().x),H.yCoords.push(S.nodes()[0].position().y))}),q.push(D))}),P.length>1){var _=P.boundingBox();v.push({x:_.x1+_.w/2,y:_.y1+_.h/2}),y.push(P),c.push(H);for(var B=q.length-1;B>=0;B--)y.splice(q[B],1),c.splice(q[B],1),v.splice(q[B],1)}}y.forEach(function(S,D){t.eles=S,l.push(e(t,c[D])),r.relocateComponent(v[D],l[D],t)})}else y.forEach(function(S,D){r.relocateComponent(v[D],c[D],t)});var s=new Set;if(y.length>1){var m=[],u=g.filter(function(S){return S.css("display")=="none"});y.forEach(function(S,D){var z=void 0;if(t.quality=="draft"&&(z=c[D].nodeIndexes),S.nodes().not(u).length>0){var W={edges:[],nodes:[]},U=void 0;S.nodes().not(u).forEach(function(O){if(t.quality=="draft")if(O.isParent()){var X=r.calcBoundingBox(O,c[D].xCoords,c[D].yCoords,z);W.nodes.push({x:X.topLeftX,y:X.topLeftY,width:X.width,height:X.height})}else U=z.get(O.id()),W.nodes.push({x:c[D].xCoords[U]-O.boundingbox().w/2,y:c[D].yCoords[U]-O.boundingbox().h/2,width:O.boundingbox().w,height:O.boundingbox().h});else l[D][O.id()]&&W.nodes.push({x:l[D][O.id()].getLeft(),y:l[D][O.id()].getTop(),width:l[D][O.id()].getWidth(),height:l[D][O.id()].getHeight()})}),S.edges().forEach(function(O){var X=O.source(),j=O.target();if(X.css("display")!="none"&&j.css("display")!="none")if(t.quality=="draft"){var K=z.get(X.id()),it=z.get(j.id()),V=[],yt=[];if(X.isParent()){var Lt=r.calcBoundingBox(X,c[D].xCoords,c[D].yCoords,z);V.push(Lt.topLeftX+Lt.width/2),V.push(Lt.topLeftY+Lt.height/2)}else V.push(c[D].xCoords[K]),V.push(c[D].yCoords[K]);if(j.isParent()){var Ut=r.calcBoundingBox(j,c[D].xCoords,c[D].yCoords,z);yt.push(Ut.topLeftX+Ut.width/2),yt.push(Ut.topLeftY+Ut.height/2)}else yt.push(c[D].xCoords[it]),yt.push(c[D].yCoords[it]);W.edges.push({startX:V[0],startY:V[1],endX:yt[0],endY:yt[1]})}else l[D][X.id()]&&l[D][j.id()]&&W.edges.push({startX:l[D][X.id()].getCenterX(),startY:l[D][X.id()].getCenterY(),endX:l[D][j.id()].getCenterX(),endY:l[D][j.id()].getCenterY()})}),W.nodes.length>0&&(m.push(W),s.add(D))}});var p=N.packComponents(m,t.randomize).shifts;if(t.quality=="draft")c.forEach(function(S,D){var z=S.xCoords.map(function(U){return U+p[D].dx}),W=S.yCoords.map(function(U){return U+p[D].dy});S.xCoords=z,S.yCoords=W});else{var f=0;s.forEach(function(S){Object.keys(l[S]).forEach(function(D){var z=l[S][D];z.setCenter(z.getCenterX()+p[f].dx,z.getCenterY()+p[f].dy)}),f++})}}}else{var w=t.eles.boundingBox();if(v.push({x:w.x1+w.w/2,y:w.y1+w.h/2}),t.randomize){var I=a(t);c.push(I)}t.quality=="default"||t.quality=="proof"?(l.push(e(t,c[0])),r.relocateComponent(v[0],l[0],t)):r.relocateComponent(v[0],c[0],t)}var x=function(S,D){if(t.quality=="default"||t.quality=="proof"){typeof S=="number"&&(S=D);var z=void 0,W=void 0,U=S.data("id");return l.forEach(function(X){U in X&&(z={x:X[U].getRect().getCenterX(),y:X[U].getRect().getCenterY()},W=X[U])}),t.nodeDimensionsIncludeLabels&&(W.labelWidth&&(W.labelPosHorizontal=="left"?z.x+=W.labelWidth/2:W.labelPosHorizontal=="right"&&(z.x-=W.labelWidth/2)),W.labelHeight&&(W.labelPosVertical=="top"?z.y+=W.labelHeight/2:W.labelPosVertical=="bottom"&&(z.y-=W.labelHeight/2))),z==null&&(z={x:S.position("x"),y:S.position("y")}),{x:z.x,y:z.y}}var O=void 0;return c.forEach(function(X){var j=X.nodeIndexes.get(S.id());j!=null&&(O={x:X.xCoords[j],y:X.yCoords[j]})}),O==null&&(O={x:S.position("x"),y:S.position("y")}),{x:O.x,y:O.y}};if(t.quality=="default"||t.quality=="proof"||t.randomize){var F=r.calcParentsWithoutChildren(h,g),G=g.filter(function(S){return S.css("display")=="none"});t.eles=g.not(G),g.nodes().not(":parent").not(G).layoutPositions(this,t,x),F.length>0&&F.forEach(function(S){S.position(x(S))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();C.exports=i},657:(C,T,L)=>{var E=L(548),d=L(140).layoutBase.Matrix,r=L(140).layoutBase.SVD;C.exports={spectralLayout:function(a){var e=a.cy,n=a.eles,i=n.nodes(),o=n.nodes(":parent"),t=new Map,h=new Map,g=new Map,c=[],l=[],y=[],v=[],N=[],A=[],M=[],P=[],b=void 0,Y=1e8,H=1e-9,q=a.piTol,_=a.samplingType,B=a.nodeSeparation,s=void 0,m=function(J,ot,ut){for(var dt=[],vt=0,Et=0,ht=0,Tt=void 0,_t=[],Ot=0,Mt=1,xt=0;xt<b;xt++)_t[xt]=Y;for(dt[Et]=J,_t[J]=0;Et>=vt;){ht=dt[vt++];for(var R=c[ht],k=0;k<R.length;k++)_t[Tt=h.get(R[k])]==Y&&(_t[Tt]=_t[ht]+1,dt[++Et]=Tt);A[ht][ot]=_t[ht]*B}if(ut){for(var Q=0;Q<b;Q++)A[Q][ot]<N[Q]&&(N[Q]=A[Q][ot]);for(var Z=0;Z<b;Z++)N[Z]>Ot&&(Ot=N[Z],Mt=Z)}return Mt};E.connectComponents(e,n,E.getTopMostNodes(i),t),o.forEach(function(J){E.connectComponents(e,n,E.getTopMostNodes(J.descendants().intersection(n)),t)});for(var u=0,p=0;p<i.length;p++)i[p].isParent()||h.set(i[p].id(),u++);var f=!0,w=!1,I=void 0;try{for(var x,F=t.keys()[Symbol.iterator]();!(f=(x=F.next()).done);f=!0){var G=x.value;h.set(G,u++)}}catch(J){w=!0,I=J}finally{try{!f&&F.return&&F.return()}finally{if(w)throw I}}for(var S=0;S<h.size;S++)c[S]=[];o.forEach(function(J){for(var ot=J.children().intersection(n);ot.nodes(":childless").length==0;)ot=ot.nodes()[0].children().intersection(n);var ut=0,dt=ot.nodes(":childless")[0].connectedEdges().length;ot.nodes(":childless").forEach(function(vt,Et){vt.connectedEdges().length<dt&&(dt=vt.connectedEdges().length,ut=Et)}),g.set(J.id(),ot.nodes(":childless")[ut].id())}),i.forEach(function(J){var ot=void 0;ot=J.isParent()?h.get(g.get(J.id())):h.get(J.id()),J.neighborhood().nodes().forEach(function(ut){n.intersection(J.edgesWith(ut)).length>0&&(ut.isParent()?c[ot].push(g.get(ut.id())):c[ot].push(ut.id()))})});var D=function(J){var ot=h.get(J),ut=void 0;t.get(J).forEach(function(dt){ut=e.getElementById(dt).isParent()?g.get(dt):dt,c[ot].push(ut),c[h.get(ut)].push(J)})},z=!0,W=!1,U=void 0;try{for(var O,X=t.keys()[Symbol.iterator]();!(z=(O=X.next()).done);z=!0)D(O.value)}catch(J){W=!0,U=J}finally{try{!z&&X.return&&X.return()}finally{if(W)throw U}}var j=void 0;if((b=h.size)>2){s=b<a.sampleSize?b:a.sampleSize;for(var K=0;K<b;K++)A[K]=[];for(var it=0;it<s;it++)P[it]=[];return a.quality=="draft"||a.step=="all"?(function(J){var ot=void 0;if(J){ot=Math.floor(Math.random()*b);for(var ut=0;ut<b;ut++)N[ut]=Y;for(var dt=0;dt<s;dt++)v[dt]=ot,ot=m(ot,dt,J)}else{(function(){for(var Mt=0,xt=0,R=!1;xt<s;){Mt=Math.floor(Math.random()*b),R=!1;for(var k=0;k<xt;k++)if(v[k]==Mt){R=!0;break}R||(v[xt]=Mt,xt++)}})();for(var vt=0;vt<s;vt++)m(v[vt],vt,J)}for(var Et=0;Et<b;Et++)for(var ht=0;ht<s;ht++)A[Et][ht]*=A[Et][ht];for(var Tt=0;Tt<s;Tt++)M[Tt]=[];for(var _t=0;_t<s;_t++)for(var Ot=0;Ot<s;Ot++)M[_t][Ot]=A[v[Ot]][_t]}(_),function(){for(var J=r.svd(M),ot=J.S,ut=J.U,dt=J.V,vt=ot[0]*ot[0]*ot[0],Et=[],ht=0;ht<s;ht++){Et[ht]=[];for(var Tt=0;Tt<s;Tt++)Et[ht][Tt]=0,ht==Tt&&(Et[ht][Tt]=ot[ht]/(ot[ht]*ot[ht]+vt/(ot[ht]*ot[ht])))}P=d.multMat(d.multMat(dt,Et),d.transpose(ut))}(),function(){for(var J=void 0,ot=void 0,ut=[],dt=[],vt=[],Et=[],ht=0;ht<b;ht++)ut[ht]=Math.random(),dt[ht]=Math.random();ut=d.normalize(ut),dt=d.normalize(dt);for(var Tt=H,_t=H,Ot=void 0;;){for(var Mt=0;Mt<b;Mt++)vt[Mt]=ut[Mt];if(ut=d.multGamma(d.multL(d.multGamma(vt),A,P)),J=d.dotProduct(vt,ut),ut=d.normalize(ut),Tt=d.dotProduct(vt,ut),(Ot=Math.abs(Tt/_t))<=1+q&&Ot>=1)break;_t=Tt}for(var xt=0;xt<b;xt++)vt[xt]=ut[xt];for(_t=H;;){for(var R=0;R<b;R++)Et[R]=dt[R];if(Et=d.minusOp(Et,d.multCons(vt,d.dotProduct(vt,Et))),dt=d.multGamma(d.multL(d.multGamma(Et),A,P)),ot=d.dotProduct(Et,dt),dt=d.normalize(dt),Tt=d.dotProduct(Et,dt),(Ot=Math.abs(Tt/_t))<=1+q&&Ot>=1)break;_t=Tt}for(var k=0;k<b;k++)Et[k]=dt[k];l=d.multCons(vt,Math.sqrt(Math.abs(J))),y=d.multCons(Et,Math.sqrt(Math.abs(ot)))}(),j={nodeIndexes:h,xCoords:l,yCoords:y}):(h.forEach(function(J,ot){l.push(e.getElementById(ot).position("x")),y.push(e.getElementById(ot).position("y"))}),j={nodeIndexes:h,xCoords:l,yCoords:y}),j}var V=h.keys(),yt=e.getElementById(V.next().value),Lt=yt.position(),Ut=yt.outerWidth();if(l.push(Lt.x),y.push(Lt.y),b==2){var Rt=e.getElementById(V.next().value).outerWidth();l.push(Lt.x+Ut/2+Rt/2+a.idealEdgeLength),y.push(Lt.y)}return j={nodeIndexes:h,xCoords:l,yCoords:y}}}},579:(C,T,L)=>{var E=L(212),d=function(r){r&&r("layout","fcose",E)};typeof cytoscape<"u"&&d(cytoscape),C.exports=d},140:C=>{C.exports=Ce}},le={},function C(T){var L=le[T];if(L!==void 0)return L.exports;var E=le[T]={exports:{}};return Me[T](E,E.exports,C),E.exports}(579))));var xe={L:"left",R:"right",T:"top",B:"bottom"},_e={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},ee={L:nt((C,T)=>C-T+2,"L"),R:nt((C,T)=>C-2,"R"),T:nt((C,T)=>C-T+2,"T"),B:nt((C,T)=>C-2,"B")},cn=nt(function(C){return Pt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Oe=nt(function(C){return C==="L"||C==="R"||C==="T"||C==="B"},"isArchitectureDirection"),Pt=nt(function(C){return C==="L"||C==="R"},"isArchitectureDirectionX"),zt=nt(function(C){return C==="T"||C==="B"},"isArchitectureDirectionY"),de=nt(function(C,T){const L=Pt(C)&&zt(T),E=zt(C)&&Pt(T);return L||E},"isArchitectureDirectionXY"),un=nt(function(C){const T=C[0],L=C[1],E=Pt(T)&&zt(L),d=zt(T)&&Pt(L);return E||d},"isArchitecturePairXY"),fn=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),ge=nt(function(C,T){const L=`${C}${T}`;return fn(L)?L:void 0},"getArchitectureDirectionPair"),pn=nt(function([C,T],L){const E=L[0],d=L[1];return Pt(E)?zt(d)?[C+(E==="L"?-1:1),T+(d==="T"?1:-1)]:[C+(E==="L"?-1:1),T]:Pt(d)?[C+(d==="L"?1:-1),T+(E==="T"?1:-1)]:[C,T+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mn=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),vn=nt(function(C,T){return de(C,T)?"bend":Pt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),yn=nt(function(C){return C.type==="service"},"isArchitectureService"),En=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),De=nt(C=>C.data(),"edgeData"),$t=nt(C=>C.data(),"nodeData"),Nn=tn.architecture,Re=(Qt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=We,this.getAccTitle=Be,this.setDiagramTitle=je,this.getDiagramTitle=qe,this.getAccDescription=$e,this.setAccDescription=Ze,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},Qe()}addService({id:T,icon:L,in:E,title:d,iconText:r}){if(this.registeredIds[T]!==void 0)throw new Error(`The service id [${T}] is already in use by another ${this.registeredIds[T]}`);if(E!==void 0){if(T===E)throw new Error(`The service [${T}] cannot be placed within itself`);if(this.registeredIds[E]===void 0)throw new Error(`The service [${T}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[E]==="node")throw new Error(`The service [${T}]'s parent is not a group`)}this.registeredIds[T]="node",this.nodes[T]={id:T,type:"service",icon:L,iconText:r,title:d,edges:[],in:E}}getServices(){return Object.values(this.nodes).filter(yn)}addJunction({id:T,in:L}){this.registeredIds[T]="node",this.nodes[T]={id:T,type:"junction",edges:[],in:L}}getJunctions(){return Object.values(this.nodes).filter(En)}getNodes(){return Object.values(this.nodes)}getNode(T){return this.nodes[T]??null}addGroup({id:T,icon:L,in:E,title:d}){var r,a,e;if(((r=this.registeredIds)==null?void 0:r[T])!==void 0)throw new Error(`The group id [${T}] is already in use by another ${this.registeredIds[T]}`);if(E!==void 0){if(T===E)throw new Error(`The group [${T}] cannot be placed within itself`);if(((a=this.registeredIds)==null?void 0:a[E])===void 0)throw new Error(`The group [${T}]'s parent does not exist. Please make sure the parent is created before this group`);if(((e=this.registeredIds)==null?void 0:e[E])==="node")throw new Error(`The group [${T}]'s parent is not a group`)}this.registeredIds[T]="group",this.groups[T]={id:T,icon:L,title:d,in:E}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:T,rhsId:L,lhsDir:E,rhsDir:d,lhsInto:r,rhsInto:a,lhsGroup:e,rhsGroup:n,title:i}){if(!Oe(E))throw new Error(`Invalid direction given for left hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${String(E)}`);if(!Oe(d))throw new Error(`Invalid direction given for right hand side of edge ${T}--${L}. Expected (L,R,T,B) got ${String(d)}`);if(this.nodes[T]===void 0&&this.groups[T]===void 0)throw new Error(`The left-hand id [${T}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The right-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[T].in,t=this.nodes[L].in;if(e&&o&&t&&o==t)throw new Error(`The left-hand id [${T}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&o&&t&&o==t)throw new Error(`The right-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const h={lhsId:T,lhsDir:E,lhsInto:r,lhsGroup:e,rhsId:L,rhsDir:d,rhsInto:a,rhsGroup:n,title:i};this.edges.push(h),this.nodes[T]&&this.nodes[L]&&(this.nodes[T].edges.push(this.edges[this.edges.length-1]),this.nodes[L].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const T={},L=Object.entries(this.nodes).reduce((n,[i,o])=>(n[i]=o.edges.reduce((t,h)=>{var l,y;const g=(l=this.getNode(h.lhsId))==null?void 0:l.in,c=(y=this.getNode(h.rhsId))==null?void 0:y.in;if(g&&c&&g!==c){const v=vn(h.lhsDir,h.rhsDir);v!=="bend"&&(T[g]??(T[g]={}),T[g][c]=v,T[c]??(T[c]={}),T[c][g]=v)}if(h.lhsId===i){const v=ge(h.lhsDir,h.rhsDir);v&&(t[v]=h.rhsId)}else{const v=ge(h.rhsDir,h.lhsDir);v&&(t[v]=h.lhsId)}return t},{}),n),{}),E=Object.keys(L)[0],d={[E]:1},r=Object.keys(L).reduce((n,i)=>i===E?n:{...n,[i]:1},{}),a=nt(n=>{const i={[n]:[0,0]},o=[n];for(;o.length>0;){const t=o.shift();if(t){d[t]=1,delete r[t];const h=L[t],[g,c]=i[t];Object.entries(h).forEach(([l,y])=>{d[y]||(i[y]=pn([g,c],l),o.push(y))})}}return i},"BFS"),e=[a(E)];for(;Object.keys(r).length>0;)e.push(a(Object.keys(r)[0]));this.dataStructures={adjList:L,spatialMaps:e,groupAlignments:T}}return this.dataStructures}setElementForId(T,L){this.elements[T]=L}getElementById(T){return this.elements[T]}getConfig(){return Je({...Nn,...Ke().architecture})}getConfigField(T){return this.getConfig()[T]}},nt(Qt,"ArchitectureDB"),Qt),Tn=nt((C,T)=>{on(C,T),C.groups.map(L=>T.addGroup(L)),C.services.map(L=>T.addService({...L,type:"service"})),C.junctions.map(L=>T.addJunction({...L,type:"junction"})),C.edges.map(L=>T.addEdge(L))},"populateDb"),be={parser:{yy:void 0},parse:nt(async C=>{var E;const T=await sn("architecture",C);ye.debug(T);const L=(E=be.parser)==null?void 0:E.yy;if(!(L instanceof Re))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.");Tn(T,L)},"parse")},An=nt(C=>`
2
2
  .edge {
3
3
  stroke-width: ${C.archEdgeWidth};
4
4
  stroke: ${C.archEdgeColor};