@doocs/md-cli 0.1.0 → 0.1.1

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 (79) hide show
  1. package/dist/index.html +10 -3
  2. package/dist/static/css/md-index-CauIE2on.css +1 -0
  3. package/dist/static/js/md-_basePickBy-Cb6-6-lL.js +1 -0
  4. package/dist/static/js/md-_baseUniq-CHUNGaZE.js +1 -0
  5. package/dist/static/js/md-arc-Dl7hc4JH.js +1 -0
  6. package/dist/static/js/md-architectureDiagram-UYN6MBPD-BsfugCQZ.js +36 -0
  7. package/dist/{assets/blockDiagram-ZHA2E4KO-CiU20dMM.js → static/js/md-blockDiagram-ZHA2E4KO-Boab3IaL.js} +4 -4
  8. package/dist/static/js/md-c4Diagram-6F5ED5ID-B3qEK0C5.js +10 -0
  9. package/dist/static/js/md-channel-B2uTlvSS.js +1 -0
  10. package/dist/static/js/md-chunk-5HRBRIJM-C6skLdDj.js +1 -0
  11. package/dist/{assets/chunk-7U56Z5CX-B_jf4yM1.js → static/js/md-chunk-7U56Z5CX-DZ4n3OFG.js} +3 -3
  12. package/dist/static/js/md-chunk-ASOPGD6M-CallTSla.js +1 -0
  13. package/dist/static/js/md-chunk-KFBOBJHC-CJ2pQPUy.js +1 -0
  14. package/dist/{assets/chunk-T2TOU4HS-DaQkcO8l.js → static/js/md-chunk-T2TOU4HS-DUKDlyux.js} +3 -3
  15. package/dist/static/js/md-chunk-TMUBEWPD-Bl6Lf2Ar.js +1 -0
  16. package/dist/static/js/md-classDiagram-LNE6IOMH-COr2eZZ2.js +1 -0
  17. package/dist/static/js/md-classDiagram-v2-MQ7JQ4JX-COr2eZZ2.js +1 -0
  18. package/dist/static/js/md-clone-D_hm8a6u.js +1 -0
  19. package/dist/static/js/md-cytoscape.esm-DuDZPaa3.js +191 -0
  20. package/dist/static/js/md-dagre-4EVJKHTY-DBODts7f.js +4 -0
  21. package/dist/static/js/md-diagram-QW4FP2JN-BFcdTabT.js +24 -0
  22. package/dist/{assets/erDiagram-6RL3IURR-Bpls8wMr.js → static/js/md-erDiagram-6RL3IURR-B5cU8-B6.js} +2 -2
  23. package/dist/{assets/flowDiagram-7ASYPVHJ-CsqPAVyd.js → static/js/md-flowDiagram-7ASYPVHJ-tkZlwCwS.js} +5 -5
  24. package/dist/static/js/md-ganttDiagram-NTVNEXSI-CyBbN-rN.js +257 -0
  25. package/dist/static/js/md-gitGraph-YCYPL57B-LxIrSWbS.js +127 -0
  26. package/dist/static/js/md-gitGraphDiagram-NRZ2UAAF-CE-Xg02-.js +65 -0
  27. package/dist/static/js/md-graph-CvEXTPIT.js +1 -0
  28. package/dist/static/js/md-index-C3xyzq32.js +1278 -0
  29. package/dist/static/js/md-infoDiagram-A4XQUW5V-B1stz61R.js +2 -0
  30. package/dist/{assets/journeyDiagram-G5WM74LC-DYR6cC-s.js → static/js/md-journeyDiagram-G5WM74LC-BPJmIf4f.js} +4 -4
  31. package/dist/{assets/kanban-definition-QRCXZQQD-ezm_tqbx.js → static/js/md-kanban-definition-QRCXZQQD-BM-gWUBH.js} +6 -6
  32. package/dist/static/js/md-katex-ClWsnYYX.js +261 -0
  33. package/dist/static/js/md-layout-BZEjand-.js +1 -0
  34. package/dist/static/js/md-linear-DfnwxBwO.js +1 -0
  35. package/dist/static/js/md-mindmap-definition-GWI6TPTV-CWkAo1Vk.js +95 -0
  36. package/dist/static/js/md-ordinal-CxVaQH2l.js +1 -0
  37. package/dist/static/js/md-pieDiagram-YF2LJOPJ-BnUt91RH.js +30 -0
  38. package/dist/{assets/quadrantDiagram-OS5C2QUG-Dg7FdgdA.js → static/js/md-quadrantDiagram-OS5C2QUG-BkkOgTG7.js} +3 -3
  39. package/dist/{assets/requirementDiagram-MIRIMTAZ-BuEAITWt.js → static/js/md-requirementDiagram-MIRIMTAZ-5I5hl3Vs.js} +3 -3
  40. package/dist/static/js/md-sankeyDiagram-Y46BX6SQ-1mUzyBKB.js +8 -0
  41. package/dist/static/js/md-sequenceDiagram-G6AWOVSC-CQZdGLUn.js +122 -0
  42. package/dist/static/js/md-stateDiagram-MAYHULR4-CZYM9JLA.js +1 -0
  43. package/dist/static/js/md-stateDiagram-v2-4JROLMXI-BFVaU9yH.js +1 -0
  44. package/dist/{assets/timeline-definition-U7ZMHBDA-CFUr8oxY.js → static/js/md-timeline-definition-U7ZMHBDA-ZIMfwQaV.js} +2 -2
  45. package/dist/{assets/xychartDiagram-6QU3TZC5-1eIFlZC0.js → static/js/md-xychartDiagram-6QU3TZC5-BIcWUW65.js} +4 -4
  46. package/package.json +5 -5
  47. package/dist/assets/_baseUniq-C9pACY90.js +0 -1
  48. package/dist/assets/arc-Dt-qQ_Qa.js +0 -1
  49. package/dist/assets/architectureDiagram-UYN6MBPD-eQ3ue1yv.js +0 -36
  50. package/dist/assets/c4Diagram-6F5ED5ID-DydCfZqU.js +0 -10
  51. package/dist/assets/channel-CIM8s-Ce.js +0 -1
  52. package/dist/assets/chunk-5HRBRIJM-DXTR6P-w.js +0 -1
  53. package/dist/assets/chunk-ASOPGD6M-Baxn6fVh.js +0 -1
  54. package/dist/assets/chunk-KFBOBJHC-B3cQtr5m.js +0 -1
  55. package/dist/assets/chunk-TMUBEWPD-CdlicptE.js +0 -1
  56. package/dist/assets/classDiagram-LNE6IOMH-x1rZGxlE.js +0 -1
  57. package/dist/assets/classDiagram-v2-MQ7JQ4JX-x1rZGxlE.js +0 -1
  58. package/dist/assets/cytoscape.esm-Cf37IWrM.js +0 -16
  59. package/dist/assets/dagre-4EVJKHTY-BAwPnbGP.js +0 -4
  60. package/dist/assets/diagram-QW4FP2JN-BYm73VUI.js +0 -24
  61. package/dist/assets/ganttDiagram-NTVNEXSI-CfoHnWm5.js +0 -257
  62. package/dist/assets/gitGraph-YCYPL57B-DCiujpCk.js +0 -127
  63. package/dist/assets/gitGraphDiagram-NRZ2UAAF-BJnqdx6Y.js +0 -65
  64. package/dist/assets/graph-DAxtJ2Hp.js +0 -1
  65. package/dist/assets/index-8UlDWK5q.js +0 -1130
  66. package/dist/assets/index-D2qrAKKP.css +0 -1
  67. package/dist/assets/infoDiagram-A4XQUW5V-DzmkLdw9.js +0 -2
  68. package/dist/assets/katex-DAk0vv_m.js +0 -261
  69. package/dist/assets/layout-DqWbY1S4.js +0 -1
  70. package/dist/assets/linear-B7i3QH2W.js +0 -1
  71. package/dist/assets/min-0RZFbtb7.js +0 -1
  72. package/dist/assets/mindmap-definition-GWI6TPTV-BQ01ES3l.js +0 -95
  73. package/dist/assets/ordinal-Cboi1Yqb.js +0 -1
  74. package/dist/assets/pieDiagram-YF2LJOPJ-DAeaTPWf.js +0 -30
  75. package/dist/assets/sankeyDiagram-Y46BX6SQ-B_U7C-Gh.js +0 -8
  76. package/dist/assets/sequenceDiagram-G6AWOVSC-DZbxDwIR.js +0 -122
  77. package/dist/assets/stateDiagram-MAYHULR4-CxGPwllk.js +0 -1
  78. package/dist/assets/stateDiagram-v2-4JROLMXI-B6VJPe0v.js +0 -1
  79. /package/dist/{assets/init-Gi6I4Gst.js → static/js/md-init-Gi6I4Gst.js} +0 -0
@@ -1,36 +0,0 @@
1
- import{aL as Te,aM as ke,B as qe,_ as nt,aN as Je,aO as Qe,p as Ke,q as je,s as _e,g as tr,c as er,b as rr,d as fe,l as Se,j as ir,v as ar,G as nr,V as or,aj as Ne,aP as Ee}from"./index-8UlDWK5q.js";import{p as sr}from"./chunk-TMUBEWPD-CdlicptE.js";import{I as hr}from"./chunk-KFBOBJHC-B3cQtr5m.js";import{p as lr}from"./gitGraph-YCYPL57B-DCiujpCk.js";import{c as Fe}from"./cytoscape.esm-Cf37IWrM.js";import"./min-0RZFbtb7.js";import"./_baseUniq-C9pACY90.js";var be={exports:{}},pe={exports:{}},ye={exports:{}},Oe;function fr(){return Oe||(Oe=1,function(M,Y){(function(G,N){M.exports=N()})(Te,function(){return function(C){var G={};function N(g){if(G[g])return G[g].exports;var s=G[g]={i:g,l:!1,exports:{}};return C[g].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return N.m=C,N.c=G,N.i=function(g){return g},N.d=function(g,s,i){N.o(g,s)||Object.defineProperty(g,s,{configurable:!1,enumerable:!0,get:i})},N.n=function(g){var s=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(s,"a",s),s},N.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},N.p="",N(N.s=28)}([function(C,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,C.exports=g},function(C,G,N){var g=N(2),s=N(8),i=N(9);function r(f,a,y){g.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=f,this.target=a}r.prototype=Object.create(g.prototype);for(var e in g)r[e]=g[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,a){for(var y=this.getOtherEnd(f),t=a.getGraphManager().getRoot();;){if(y.getOwner()==a)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r},function(C,G,N){function g(s){this.vGraphObject=s}C.exports=g},function(C,G,N){var g=N(2),s=N(10),i=N(13),r=N(0),e=N(16),f=N(5);function a(t,h,o,c){o==null&&c==null&&(c=h),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&h!=null?this.rect=new i(h.x,h.y,o.width,o.height):this.rect=new i}a.prototype=Object.create(g.prototype);for(var y in g)a[y]=g[y];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(t){this.rect.width=t},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(t){this.rect.height=t},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(t,h){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=h.width,this.rect.height=h.height},a.prototype.setCenter=function(t,h){this.rect.x=t-this.rect.width/2,this.rect.y=h-this.rect.height/2},a.prototype.setLocation=function(t,h){this.rect.x=t,this.rect.y=h},a.prototype.moveBy=function(t,h){this.rect.x+=t,this.rect.y+=h},a.prototype.getEdgeListToNode=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";h.push(c)}}),h},a.prototype.getEdgesBetween=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&h.push(c)}),h},a.prototype.getNeighborsList=function(){var t=new Set,h=this;return h.edges.forEach(function(o){if(o.source==h)t.add(o.target);else{if(o.target!=h)throw"Incorrect incidency!";t.add(o.source)}}),t},a.prototype.withChildren=function(){var t=new Set,h,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)h=c[l],o=h.withChildren(),o.forEach(function(T){t.add(T)});return t},a.prototype.getNoOfChildren=function(){var t=0,h;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)h=o[c],t+=h.getNoOfChildren();return t==0&&(t=1),t},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.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)},a.prototype.scatter=function(){var t,h,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+e.nextDouble()*(c-o)+o;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;h=r.WORLD_CENTER_Y+e.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=h},a.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var h=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(h+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>h?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=a},function(C,G,N){var g=N(0);function s(){}for(var i in g)s[i]=g[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=s},function(C,G,N){function g(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},C.exports=g},function(C,G,N){var g=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),a=N(13),y=N(12),t=N(11);function h(c,l,T){g.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(g.prototype);for(var o in g)h[o]=g[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var v=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(v.source=l,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),l.edges.push(v),T!=l&&T.edges.push(v),v)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,v=T.length,L=0;L<v;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var F=this.nodes.indexOf(l);if(F==-1)throw"Node not in owner node list!";this.nodes.splice(F,1)}else if(c instanceof f){var u=c;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var A=u.source.edges.indexOf(u),P=u.target.edges.indexOf(u);if(!(A>-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(A,1),u.target!=u.source&&u.target.edges.splice(P,1);var F=u.source.owner.getEdges().indexOf(u);if(F==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,u,v,L=this.getNodes(),F=L.length,A=0;A<F;A++){var P=L[A];T=P.getTop(),u=P.getLeft(),c>T&&(c=T),l>u&&(l=u)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,v=-s.MAX_VALUE,L,F,A,P,J,V=this.nodes,Q=V.length,D=0;D<Q;D++){var rt=V[D];c&&rt.child!=null&&rt.updateBounds(),L=rt.getLeft(),F=rt.getRight(),A=rt.getTop(),P=rt.getBottom(),l>L&&(l=L),T<F&&(T=F),u>A&&(u=A),v<P&&(v=P)}var n=new a(l,u,T-l,v-u);l==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),V[0].getParent().paddingLeft!=null?J=V[0].getParent().paddingLeft:J=this.margin,this.left=n.x-J,this.right=n.x+n.width+J,this.top=n.y-J,this.bottom=n.y+n.height+J},h.calculateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,v=-s.MAX_VALUE,L,F,A,P,J=c.length,V=0;V<J;V++){var Q=c[V];L=Q.getLeft(),F=Q.getRight(),A=Q.getTop(),P=Q.getBottom(),l>L&&(l=L),T<F&&(T=F),u>A&&(u=A),v<P&&(v=P)}var D=new a(l,u,T-l,v-u);return D},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,u=0;u<T;u++){var v=l[u];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,u=this.nodes[0],v,L,F=u.withChildren();for(F.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){u=l.shift(),v=u.getEdges();for(var A=v.length,P=0;P<A;P++){var J=v[P];if(L=J.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var V=L.withChildren();V.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},C.exports=h},function(C,G,N){var g,s=N(1);function i(r){g=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,a,y){if(f==null&&a==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,a=e,f=r;var t=a.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,a,y);if(f.isInterGraph=!0,f.source=a,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var a,y=f.length,t=0;t<y;t++)a=f[t],e.remove(a);var h=[];h=h.concat(e.getNodes());var o;y=h.length;for(var t=0;t<y;t++)o=h[t],e.remove(o);e==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(e);this.graphs.splice(c,1),e.parent=null}else if(r instanceof s){if(a=r,a==null)throw"Edge is null!";if(!a.isInterGraph)throw"Not an inter-graph edge!";if(!(a.source!=null&&a.target!=null))throw"Source and/or target is null!";if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw"Source and/or target doesn't know this edge!";var c=a.source.edges.indexOf(a);if(a.source.edges.splice(c,1),c=a.target.edges.indexOf(a),a.target.edges.splice(c,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw"Not in owner graph manager's edge list!";var c=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(c,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],e=this.getGraphs(),f=e.length,a=0;a<f;a++)r=r.concat(e[a].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],e=this.getGraphs();e.length;for(var f=0;f<e.length;f++)r=r.concat(e[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,e){if(!(r!=null&&e!=null))throw"assert failed";if(r==e)return!0;var f=r.getOwner(),a;do{if(a=f.getParent(),a==null)break;if(a==e)return!0;if(f=a.getOwner(),f==null)break}while(!0);f=e.getOwner();do{if(a=f.getParent(),a==null)break;if(a==r)return!0;if(f=a.getOwner(),f==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,e,f,a,y,t=this.getAllEdges(),h=t.length,o=0;o<h;o++){if(r=t[o],e=r.source,f=r.target,r.lca=null,r.sourceInLca=e,r.targetInLca=f,e==f){r.lca=e.getOwner();continue}for(a=e.getOwner();r.lca==null;){for(r.targetInLca=f,y=f.getOwner();r.lca==null;){if(y==a){r.lca=y;break}if(y==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=y.getParent(),y=r.targetInLca.getOwner()}if(a==this.rootGraph)break;r.lca==null&&(r.sourceInLca=a.getParent(),a=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(r,e){if(r==e)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var a=e.getOwner();do{if(a==null)break;if(a==f)return a;a=a.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},i.prototype.calcInclusionTreeDepths=function(r,e){r==null&&e==null&&(r=this.rootGraph,e=1);for(var f,a=r.getNodes(),y=a.length,t=0;t<y;t++)f=a[t],f.inclusionTreeDepth=e,f.child!=null&&this.calcInclusionTreeDepths(f.child,e+1)},i.prototype.includesInvalidEdge=function(){for(var r,e=[],f=this.edges.length,a=0;a<f;a++)r=this.edges[a],this.isOneAncestorOfOther(r.source,r.target)&&e.push(r);for(var a=0;a<e.length;a++)this.remove(e[a]);return!1},C.exports=i},function(C,G,N){var g=N(12);function s(){}s.calcSeparationAmount=function(i,r,e,f){if(!i.intersects(r))throw"assert failed";var a=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,a),e[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),e[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]<h?h=e[0]:t=e[1],e[0]=-1*a[0]*(h/2+f),e[1]=-1*a[1]*(t/2+f)},s.decideDirectionsForOverlappingNodes=function(i,r,e){i.getCenterX()<r.getCenterX()?e[0]=-1:e[0]=1,i.getCenterY()<r.getCenterY()?e[1]=-1:e[1]=1},s.getIntersection2=function(i,r,e){var f=i.getCenterX(),a=i.getCenterY(),y=r.getCenterX(),t=r.getCenterY();if(i.intersects(r))return e[0]=f,e[1]=a,e[2]=y,e[3]=t,!0;var h=i.getX(),o=i.getY(),c=i.getRight(),l=i.getX(),T=i.getBottom(),u=i.getRight(),v=i.getWidthHalf(),L=i.getHeightHalf(),F=r.getX(),A=r.getY(),P=r.getRight(),J=r.getX(),V=r.getBottom(),Q=r.getRight(),D=r.getWidthHalf(),rt=r.getHeightHalf(),n=!1,m=!1;if(f===y){if(a>t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(a<t)return e[0]=f,e[1]=T,e[2]=y,e[3]=A,!1}else if(a===t){if(f>y)return e[0]=h,e[1]=a,e[2]=P,e[3]=t,!1;if(f<y)return e[0]=c,e[1]=a,e[2]=F,e[3]=t,!1}else{var d=i.height/i.width,E=r.height/r.width,p=(t-a)/(y-f),R=void 0,w=void 0,I=void 0,H=void 0,x=void 0,k=void 0;if(-d===p?f>y?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):d===p&&(f>y?(e[0]=h,e[1]=o,n=!0):(e[0]=u,e[1]=T,n=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=A,m=!0):E===p&&(y>f?(e[2]=F,e[3]=A,m=!0):(e[2]=Q,e[3]=V,m=!0)),n&&m)return!1;if(f>y?a>t?(R=this.getCardinalDirection(d,p,4),w=this.getCardinalDirection(E,p,2)):(R=this.getCardinalDirection(-d,p,3),w=this.getCardinalDirection(-E,p,1)):a>t?(R=this.getCardinalDirection(-d,p,1),w=this.getCardinalDirection(-E,p,3)):(R=this.getCardinalDirection(d,p,2),w=this.getCardinalDirection(E,p,4)),!n)switch(R){case 1:H=o,I=f+-L/p,e[0]=I,e[1]=H;break;case 2:I=u,H=a+v*p,e[0]=I,e[1]=H;break;case 3:H=T,I=f+L/p,e[0]=I,e[1]=H;break;case 4:I=l,H=a+-v*p,e[0]=I,e[1]=H;break}if(!m)switch(w){case 1:k=A,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=void 0,v=void 0,L=void 0,F=void 0,A=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,A=a-t,J=t*y-a*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*A,Q===0?null:(u=(A*V-P*J)/Q,v=(F*J-L*V)/Q,new g(u,v))},s.angleOfVector=function(i,r,e,f){var a=void 0;return i!==e?(a=Math.atan((f-r)/(e-i)),e<i?a+=Math.PI:f<r&&(a+=this.TWO_PI)):f<r?a=this.ONE_AND_HALF_PI:a=this.HALF_PI,a},s.doIntersect=function(i,r,e,f){var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=(t-a)*(T-c)-(l-o)*(h-y);if(u===0)return!1;var v=((T-c)*(l-a)+(o-l)*(T-y))/u,L=((y-h)*(l-a)+(t-a)*(T-y))/u;return 0<v&&v<1&&0<L&&L<1},s.findCircleLineIntersections=function(i,r,e,f,a,y,t){var h=(e-i)*(e-i)+(f-r)*(f-r),o=2*((i-a)*(e-i)+(r-y)*(f-r)),c=(i-a)*(i-a)+(r-y)*(r-y)-t*t,l=o*o-4*h*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),u=(-o-Math.sqrt(o*o-4*h*c))/(2*h),v=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:v}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,C.exports=s},function(C,G,N){function g(){}g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},C.exports=g},function(C,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,C.exports=g},function(C,G,N){var g=function(){function a(y,t){for(var h=0;h<t.length;h++){var o=t[h];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(y,o.key,o)}}return function(y,t,h){return t&&a(y.prototype,t),h&&a(y,h),y}}();function s(a,y){if(!(a instanceof y))throw new TypeError("Cannot call a class as a function")}var i=function(y){return{value:y,next:null,prev:null}},r=function(y,t,h,o){return y!==null?y.next=t:o.head=t,h!==null?h.prev=t:o.tail=t,t.prev=y,t.next=h,o.length++,t},e=function(y,t){var h=y.prev,o=y.next;return h!==null?h.next=o:t.head=o,o!==null?o.prev=h:t.tail=h,y.prev=y.next=null,t.length--,y},f=function(){function a(y){var t=this;s(this,a),this.length=0,this.head=null,this.tail=null,y!=null&&y.forEach(function(h){return t.push(h)})}return g(a,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,h){return r(h.prev,i(t),h,this)}},{key:"insertAfter",value:function(t,h){return r(h,i(t),h.next,this)}},{key:"insertNodeBefore",value:function(t,h){return r(h.prev,t,h,this)}},{key:"insertNodeAfter",value:function(t,h){return r(h,t,h.next,this)}},{key:"push",value:function(t){return r(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return r(null,i(t),this.head,this)}},{key:"remove",value:function(t){return e(t,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(t){if(t<=this.length()){for(var h=1,o=this.head;h<t;)o=o.next,h++;return o.value}}},{key:"set_object_at",value:function(t,h){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=h}}}]),a}();C.exports=f},function(C,G,N){function g(s,i,r){this.x=null,this.y=null,s==null&&i==null&&r==null?(this.x=0,this.y=0):typeof s=="number"&&typeof i=="number"&&r==null?(this.x=s,this.y=i):s.constructor.name=="Point"&&i==null&&r==null&&(r=s,this.x=r.x,this.y=r.y)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.getLocation=function(){return new g(this.x,this.y)},g.prototype.setLocation=function(s,i,r){s.constructor.name=="Point"&&i==null&&r==null?(r=s,this.setLocation(r.x,r.y)):typeof s=="number"&&typeof i=="number"&&r==null&&(parseInt(s)==s&&parseInt(i)==i?this.move(s,i):(this.x=Math.floor(s+.5),this.y=Math.floor(i+.5)))},g.prototype.move=function(s,i){this.x=s,this.y=i},g.prototype.translate=function(s,i){this.x+=s,this.y+=i},g.prototype.equals=function(s){if(s.constructor.name=="Point"){var i=s;return this.x==i.x&&this.y==i.y}return this==s},g.prototype.toString=function(){return new g().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=g},function(C,G,N){function g(s,i,r,e){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&i!=null&&r!=null&&e!=null&&(this.x=s,this.y=i,this.width=r,this.height=e)}g.prototype.getX=function(){return this.x},g.prototype.setX=function(s){this.x=s},g.prototype.getY=function(){return this.y},g.prototype.setY=function(s){this.y=s},g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(s){this.width=s},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(s){this.height=s},g.prototype.getRight=function(){return this.x+this.width},g.prototype.getBottom=function(){return this.y+this.height},g.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},g.prototype.getCenterX=function(){return this.x+this.width/2},g.prototype.getMinX=function(){return this.getX()},g.prototype.getMaxX=function(){return this.getX()+this.width},g.prototype.getCenterY=function(){return this.y+this.height/2},g.prototype.getMinY=function(){return this.getY()},g.prototype.getMaxY=function(){return this.getY()+this.height},g.prototype.getWidthHalf=function(){return this.width/2},g.prototype.getHeightHalf=function(){return this.height/2},C.exports=g},function(C,G,N){var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function s(){}s.lastID=0,s.createID=function(i){return s.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=s.getString(),s.lastID++),i.uniqueID)},s.getString=function(i){return i==null&&(i=s.lastID),"Object#"+i},s.isPrimitive=function(i){var r=typeof i>"u"?"undefined":g(i);return i==null||r!="object"&&r!="function"},C.exports=s},function(C,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var s=N(0),i=N(7),r=N(3),e=N(1),f=N(6),a=N(5),y=N(17),t=N(29);function h(o){t.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}h.RANDOM_SEED=1,h.prototype=Object.create(t.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var o=new i(this);return this.graphManager=o,o},h.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},h.prototype.newNode=function(o){return new r(this.graphManager,o)},h.prototype.newEdge=function(o){return new e(null,null,o)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),s.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},h.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(o instanceof e){var v=o;if(v.vGraphObject!=null){var L=v.vGraphObject;L.update(v)}}else if(o instanceof f){var F=o;if(F.vGraphObject!=null){var A=F.vGraphObject;A.update(F)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(o){if(o==null)this.transform(new a(0,0));else{var c=new y,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),u,v=0;v<T.length;v++)u=T[v],u.transform(c)}}},h.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),u=0;u<T.length;u++)c=T[u],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},h.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<l.length;u++)l[u].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,L=[],F=new Map,A=[];for(A=A.concat(l);A.length>0&&c;){for(L.push(A[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),v.add(P);for(var J=P.getEdges(),u=0;u<J.length;u++){var V=J[u].getOtherEnd(P);if(F.get(P)!=V)if(!v.has(V))L.push(V),F.set(V,P);else{c=!1;break}}}if(!c)o=[];else{var Q=[].concat(g(v));o.push(Q);for(var u=0;u<Q.length;u++){var D=Q[u],rt=A.indexOf(D);rt>-1&&A.splice(rt,1)}v=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u<o.bendpoints.length;u++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var L=this.newEdge(null);this.graphManager.add(L,l,v),c.add(v),l=v}var L=this.newEdge(null);return this.graphManager.add(L,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},h.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(g(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),u=0;u<T.length;u++){var v=T[u],L=new a(v.getCenterX(),v.getCenterY()),F=l.bendpoints.get(u);F.x=L.x,F.y=L.y,v.getOwner().remove(v)}this.graphManager.add(l,l.source,l.target)}}},h.transform=function(o,c,l,T){if(l!=null&&T!=null){var u=c;if(o<=50){var v=c/l;u-=(c-v)/50*(50-o)}else{var L=c*T;u+=(L-c)/50*(o-50)}return u}else{var F,A;return o<=50?(F=9*c/500,A=c/10):(F=9*c/50,A=-8*c),F*o+A}},h.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,u=!1,v=null;(c.length==1||c.length==2)&&(u=!0,v=c[0]);for(var L=0;L<c.length;L++){var F=c[L],A=F.getNeighborsList().size;T.set(F,F.getNeighborsList().size),A==1&&l.push(F)}var P=[];for(P=P.concat(l);!u;){var J=[];J=J.concat(P),P=[];for(var L=0;L<c.length;L++){var F=c[L],V=c.indexOf(F);V>=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),d=m-1;d==1&&P.push(n),T.set(n,d)}})}l=l.concat(P),(c.length==1||c.length==2)&&(u=!0,v=c[0])}return v},h.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=h},function(C,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},C.exports=g},function(C,G,N){var g=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new g(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},C.exports=s},function(C,G,N){function g(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);h<t.length;h++)o[h]=t[h];return o}else return Array.from(t)}var s=N(15),i=N(4),r=N(0),e=N(8),f=N(9);function a(){s.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}a.prototype=Object.create(s.prototype);for(var y in s)a[y]=s[y];a.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var t,h,o,c,l,T,u,v=this.getGraphManager().getAllEdges(),L=0;L<v.length;L++)t=v[L],h=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},a.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o<t.length;o++)h=t[o],this.calcSpringForce(h,h.idealLength)},a.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<u.length;o++)l=u[o],this.calculateRepulsionForceOfANode(l,v,t,h),v.add(l);else for(o=0;o<u.length;o++)for(l=u[o],c=o+1;c<u.length;c++)T=u[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},a.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),o=0;o<h.length;o++)t=h[o],this.calcGravitationalForce(t)},a.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h,o=0;o<t.length;o++)h=t[o],h.move()},a.prototype.calcSpringForce=function(t,h){var o=t.getSource(),c=t.getTarget(),l,T,u,v;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-h),u=T*(t.lengthX/l),v=T*(t.lengthY/l),o.springForceX+=u,o.springForceY+=v,c.springForceX-=u,c.springForceY-=v)},a.prototype.calcRepulsionForce=function(t,h){var o=t.getRect(),c=h.getRect(),l=new Array(2),T=new Array(4),u,v,L,F,A,P,J;if(o.intersects(c)){e.calcSeparationAmount(o,c,l,i.DEFAULT_EDGE_LENGTH/2),P=2*l[0],J=2*l[1];var V=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=V*P,t.repulsionForceY-=V*J,h.repulsionForceX+=V*P,h.repulsionForceY+=V*J}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(u=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(e.getIntersection(o,c,T),u=T[2]-T[0],v=T[3]-T[1]),Math.abs(u)<i.MIN_REPULSION_DIST&&(u=f.sign(u)*i.MIN_REPULSION_DIST),Math.abs(v)<i.MIN_REPULSION_DIST&&(v=f.sign(v)*i.MIN_REPULSION_DIST),L=u*u+v*v,F=Math.sqrt(L),A=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/L,P=A*u/F,J=A*v/F,t.repulsionForceX-=P,t.repulsionForceY-=J,h.repulsionForceX+=P,h.repulsionForceY+=J},a.prototype.calcGravitationalForce=function(t){var h,o,c,l,T,u,v,L;h=t.getOwner(),o=(h.getRight()+h.getLeft())/2,c=(h.getTop()+h.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,u=Math.abs(l)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=h.getEstimatedSize()*this.gravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},a.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},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),o=0;o<h.length;o++)t=h[o],t.noOfChildren=t.getNoOfChildren()},a.prototype.calcGrid=function(t){var h=0,o=0;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(h),l=0;l<h;l++)c[l]=new Array(o);for(var l=0;l<h;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},a.prototype.addNodeToGrid=function(t,h,o){var c=0,l=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=l;v++)for(var L=T;L<=u;L++)this.grid[v][L].push(t),t.setGridCoordinates(c,l,T,u)},a.prototype.updateGrid=function(){var t,h,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)h=o[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(t,h,o,c){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,u=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(v<0||L<0||v>=u.length||L>=u[0].length)){for(var F=0;F<u[v][L].length;F++)if(T=u[v][L][F],!(t.getOwner()!=T.getOwner()||t==T)&&!h.has(T)&&!l.has(T)){var A=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);A<=this.repulsionRange&&P<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(g(l))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},a.prototype.calcRepulsionRange=function(){return 0},C.exports=a},function(C,G,N){var g=N(1),s=N(4);function i(e,f,a){g.call(this,e,f,a),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}i.prototype=Object.create(g.prototype);for(var r in g)i[r]=g[r];C.exports=i},function(C,G,N){var g=N(3),s=N(4);function i(e,f,a,y){g.call(this,e,f,a,y),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}i.prototype=Object.create(g.prototype);for(var r in g)i[r]=g[r];i.prototype.setGridCoordinates=function(e,f,a,y){this.startX=e,this.finishX=f,this.startY=a,this.finishY=y},C.exports=i},function(C,G,N){function g(s,i){this.width=0,this.height=0,s!==null&&i!==null&&(this.height=i,this.width=s)}g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(s){this.width=s},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(s){this.height=s},C.exports=g},function(C,G,N){var g=N(14);function s(){this.map={},this.keys=[]}s.prototype.put=function(i,r){var e=g.createID(i);this.contains(e)||(this.map[e]=r,this.keys.push(i))},s.prototype.contains=function(i){return g.createID(i),this.map[i]!=null},s.prototype.get=function(i){var r=g.createID(i);return this.map[r]},s.prototype.keySet=function(){return this.keys},C.exports=s},function(C,G,N){var g=N(14);function s(){this.set={}}s.prototype.add=function(i){var r=g.createID(i);this.contains(r)||(this.set[r]=i)},s.prototype.remove=function(i){delete this.set[g.createID(i)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(i){return this.set[g.createID(i)]==i},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),e=r.length,f=0;f<e;f++)i.push(this.set[r[f]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(i){for(var r=i.length,e=0;e<r;e++){var f=i[e];this.add(f)}},C.exports=s},function(C,G,N){function g(){}g.multMat=function(s,i){for(var r=[],e=0;e<s.length;e++){r[e]=[];for(var f=0;f<i[0].length;f++){r[e][f]=0;for(var a=0;a<s[0].length;a++)r[e][f]+=s[e][a]*i[a][f]}}return r},g.transpose=function(s){for(var i=[],r=0;r<s[0].length;r++){i[r]=[];for(var e=0;e<s.length;e++)i[r][e]=s[e][r]}return i},g.multCons=function(s,i){for(var r=[],e=0;e<s.length;e++)r[e]=s[e]*i;return r},g.minusOp=function(s,i){for(var r=[],e=0;e<s.length;e++)r[e]=s[e]-i[e];return r},g.dotProduct=function(s,i){for(var r=0,e=0;e<s.length;e++)r+=s[e]*i[e];return r},g.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},g.normalize=function(s){for(var i=[],r=this.mag(s),e=0;e<s.length;e++)i[e]=s[e]/r;return i},g.multGamma=function(s){for(var i=[],r=0,e=0;e<s.length;e++)r+=s[e];r*=-1/s.length;for(var f=0;f<s.length;f++)i[f]=r+s[f];return i},g.multL=function(s,i,r){for(var e=[],f=[],a=[],y=0;y<i[0].length;y++){for(var t=0,h=0;h<i.length;h++)t+=-.5*i[h][y]*s[h];f[y]=t}for(var o=0;o<r.length;o++){for(var c=0,l=0;l<r.length;l++)c+=r[o][l]*f[l];a[o]=c}for(var T=0;T<i.length;T++){for(var u=0,v=0;v<i[0].length;v++)u+=i[T][v]*a[v];e[T]=u}return e},C.exports=g},function(C,G,N){var g=function(){function e(f,a){for(var y=0;y<a.length;y++){var t=a[y];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,a,y){return a&&e(f.prototype,a),y&&e(f,y),f}}();function s(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function")}var i=N(11),r=function(){function e(f,a){s(this,e),(a!==null||a!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var y=void 0;f instanceof i?y=f.size():y=f.length,this._quicksort(f,0,y-1)}return g(e,[{key:"_quicksort",value:function(a,y,t){if(y<t){var h=this._partition(a,y,t);this._quicksort(a,y,h),this._quicksort(a,h+1,t)}}},{key:"_partition",value:function(a,y,t){for(var h=this._get(a,y),o=y,c=t;;){for(;this.compareFunction(h,this._get(a,c));)c--;for(;this.compareFunction(this._get(a,o),h);)o++;if(o<c)this._swap(a,o,c),o++,c--;else return c}}},{key:"_get",value:function(a,y){return a instanceof i?a.get_object_at(y):a[y]}},{key:"_set",value:function(a,y,t){a instanceof i?a.set_object_at(y,t):a[y]=t}},{key:"_swap",value:function(a,y,t){var h=this._get(a,y);this._set(a,y,this._get(a,t)),this._set(a,t,h)}},{key:"_defaultCompareFunction",value:function(a,y){return y>a}}]),e}();C.exports=r},function(C,G,N){function g(){}g.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(Math.min(this.m+1,this.n)),this.U=function(Nt){var At=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft<Gt[0];Ft++)$t.push(Zt(Gt.slice(1)));return $t};return At(Nt)}([this.m,i]),this.V=function(Nt){var At=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft<Gt[0];Ft++)$t.push(Zt(Gt.slice(1)));return $t};return At(Nt)}([this.n,this.n]);for(var r=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(this.n),e=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(this.m),f=!0,a=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(a,y);t++){if(t<a){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=g.hypot(this.s[t],s[h][t]);if(this.s[t]!==0){s[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)s[o][t]/=this.s[t];s[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if(function(Nt,At){return Nt&&At}(t<a,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=s[T][t]*s[T][c];l=-l/s[t][t];for(var u=t;u<this.m;u++)s[u][c]+=l*s[u][t]}r[c]=s[t][c]}if(function(Nt,At){return At}(f,t<a))for(var v=t;v<this.m;v++)this.U[v][t]=s[v][t];if(t<y){r[t]=0;for(var L=t+1;L<this.n;L++)r[t]=g.hypot(r[t],r[L]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var F=t+1;F<this.n;F++)r[F]/=r[t];r[t+1]+=1}if(r[t]=-r[t],function(Nt,At){return Nt&&At}(t+1<this.m,r[t]!==0)){for(var A=t+1;A<this.m;A++)e[A]=0;for(var P=t+1;P<this.n;P++)for(var J=t+1;J<this.m;J++)e[J]+=r[P]*s[J][P];for(var V=t+1;V<this.n;V++)for(var Q=-r[V]/r[t+1],D=t+1;D<this.m;D++)s[D][V]+=Q*e[D]}for(var rt=t+1;rt<this.n;rt++)this.V[rt][t]=r[rt]}}var n=Math.min(this.n,this.m+1);a<this.n&&(this.s[a]=s[a][a]),this.m<n&&(this.s[n-1]=0),y+1<n&&(r[y]=s[y][n-1]),r[n-1]=0;{for(var m=a;m<i;m++){for(var d=0;d<this.m;d++)this.U[d][m]=0;this.U[m][m]=1}for(var E=a-1;E>=0;E--)if(this.s[E]!==0){for(var p=E+1;p<i;p++){for(var R=0,w=E;w<this.m;w++)R+=this.U[w][E]*this.U[w][p];R=-R/this.U[E][E];for(var I=E;I<this.m;I++)this.U[I][p]+=R*this.U[I][E]}for(var H=E;H<this.m;H++)this.U[H][E]=-this.U[H][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var k=0;k<this.m;k++)this.U[k][E]=0;this.U[E][E]=1}}for(var W=this.n-1;W>=0;W--){if(function(Nt,At){return Nt&&At}(W<y,r[W]!==0))for(var U=W+1;U<i;U++){for(var et=0,z=W+1;z<this.n;z++)et+=this.V[z][W]*this.V[z][U];et=-et/this.V[W+1][W];for(var O=W+1;O<this.n;O++)this.V[O][U]+=et*this.V[O][W]}for(var X=0;X<this.n;X++)this.V[X][W]=0;this.V[W][W]=1}for(var B=n-1,_=Math.pow(2,-52),lt=Math.pow(2,-966);n>0;){var q=void 0,It=void 0;for(q=n-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===n-2)It=4;else{var Lt=void 0;for(Lt=n-1;Lt>=q&&Lt!==q;Lt--){var dt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*dt){this.s[Lt]=0;break}}Lt===q?It=3:Lt===n-1?It=1:(It=2,q=Lt)}switch(q++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=q;ut--){var Tt=g.hypot(this.s[ut],it),Ct=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==q&&(it=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt<this.n;mt++)Tt=Ct*this.V[mt][ut]+Dt*this.V[mt][n-1],this.V[mt][n-1]=-Dt*this.V[mt][ut]+Ct*this.V[mt][n-1],this.V[mt][ut]=Tt}}break;case 2:{var xt=r[q-1];r[q-1]=0;for(var St=q;St<n;St++){var Vt=g.hypot(this.s[St],xt),Xt=this.s[St]/Vt,Ut=xt/Vt;this.s[St]=Vt,xt=-Ut*r[St],r[St]=Xt*r[St];for(var bt=0;bt<this.m;bt++)Vt=Xt*this.U[bt][St]+Ut*this.U[bt][q-1],this.U[bt][q-1]=-Ut*this.U[bt][St]+Xt*this.U[bt][q-1],this.U[bt][St]=Vt}}break;case 3:{var Ht=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[q])),Math.abs(r[q])),Bt=this.s[n-1]/Ht,S=this.s[n-2]/Ht,b=r[n-2]/Ht,$=this.s[q]/Ht,K=r[q]/Ht,Z=((S+Bt)*(S-Bt)+b*b)/2,at=Bt*b*(Bt*b),gt=0;(function(Nt,At){return Nt||At})(Z!==0,at!==0)&&(gt=Math.sqrt(Z*Z+at),Z<0&&(gt=-gt),gt=at/(Z+gt));for(var ot=($+Bt)*($-Bt)+gt,tt=$*K,j=q;j<n-1;j++){var vt=g.hypot(ot,tt),wt=ot/vt,yt=tt/vt;j!==q&&(r[j-1]=vt),ot=wt*this.s[j]+yt*r[j],r[j]=wt*r[j]-yt*this.s[j],tt=yt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var Rt=0;Rt<this.n;Rt++)vt=wt*this.V[Rt][j]+yt*this.V[Rt][j+1],this.V[Rt][j+1]=-yt*this.V[Rt][j]+wt*this.V[Rt][j+1],this.V[Rt][j]=vt;if(vt=g.hypot(ot,tt),wt=ot/vt,yt=tt/vt,this.s[j]=vt,ot=wt*r[j]+yt*this.s[j+1],this.s[j+1]=-yt*r[j]+wt*this.s[j+1],tt=yt*r[j+1],r[j+1]=wt*r[j+1],j<this.m-1)for(var ft=0;ft<this.m;ft++)vt=wt*this.U[ft][j]+yt*this.U[ft][j+1],this.U[ft][j+1]=-yt*this.U[ft][j]+wt*this.U[ft][j+1],this.U[ft][j]=vt}r[n-2]=ot}break;case 4:{if(this.s[q]<=0){this.s[q]=this.s[q]<0?-this.s[q]:0;for(var st=0;st<=B;st++)this.V[st][q]=-this.V[st][q]}for(;q<B&&!(this.s[q]>=this.s[q+1]);){var Mt=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Mt,q<this.n-1)for(var ct=0;ct<this.n;ct++)Mt=this.V[ct][q+1],this.V[ct][q+1]=this.V[ct][q],this.V[ct][q]=Mt;if(q<this.m-1)for(var ht=0;ht<this.m;ht++)Mt=this.U[ht][q+1],this.U[ht][q+1]=this.U[ht][q],this.U[ht][q]=Mt;q++}n--}break}}var Wt={U:this.U,V:this.V,S:this.s};return Wt},g.hypot=function(s,i){var r=void 0;return Math.abs(s)>Math.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},C.exports=g},function(C,G,N){var g=function(){function r(e,f){for(var a=0;a<f.length;a++){var y=f[a];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(e,y.key,y)}}return function(e,f,a){return f&&r(e.prototype,f),a&&r(e,a),e}}();function s(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function r(e,f){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=a,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.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 o=0;o<this.jMax;o++)this.grid[h][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return g(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var y=1;y<this.iMax;y++)for(var t=1;t<this.jMax;t++){var h=void 0;this.sequence1[y-1]===this.sequence2[t-1]?h=this.grid[y-1][t-1]+this.match_score:h=this.grid[y-1][t-1]+this.mismatch_penalty;var o=this.grid[y-1][t]+this.gap_penalty,c=this.grid[y][t-1]+this.gap_penalty,l=[h,o,c],T=this.arrayAllMaxIndexes(l);this.grid[y][t]=l[T[0]],this.tracebackGrid[y][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var a=f[0],y=this.tracebackGrid[a.pos[0]][a.pos[1]];y[0]&&f.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),y[1]&&f.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2}),y[2]&&f.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),a.pos[0]===0&&a.pos[1]===0&&this.alignments.push({sequence1:a.seq1,sequence2:a.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,a){for(var y=[],t=-1;(t=f.indexOf(a,t+1))!==-1;)y.push(t);return y}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r}();C.exports=i},function(C,G,N){var g=function(){};g.FDLayout=N(18),g.FDLayoutConstants=N(4),g.FDLayoutEdge=N(19),g.FDLayoutNode=N(20),g.DimensionD=N(21),g.HashMap=N(22),g.HashSet=N(23),g.IGeometry=N(8),g.IMath=N(9),g.Integer=N(10),g.Point=N(12),g.PointD=N(5),g.RandomSeed=N(16),g.RectangleD=N(13),g.Transform=N(17),g.UniqueIDGeneretor=N(14),g.Quicksort=N(25),g.LinkedList=N(11),g.LGraphObject=N(2),g.LGraph=N(6),g.LEdge=N(1),g.LGraphManager=N(7),g.LNode=N(3),g.Layout=N(15),g.LayoutConstants=N(0),g.NeedlemanWunsch=N(27),g.Matrix=N(24),g.SVD=N(26),C.exports=g},function(C,G,N){function g(){this.listeners=[]}var s=g.prototype;s.addListener=function(i,r){this.listeners.push({event:i,callback:r})},s.removeListener=function(i,r){for(var e=this.listeners.length;e>=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e<this.listeners.length;e++){var f=this.listeners[e];i===f.event&&f.callback(r)}},C.exports=g}])})}(ye)),ye.exports}var De;function cr(){return De||(De=1,function(M,Y){(function(G,N){M.exports=N(fr())})(Te,function(C){return(()=>{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function a(){}for(var y in f)a[y]=f[y];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,i.exports=a},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},880:(i,r,e)=>{var f=e(551).LGraph;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},578:(i,r,e)=>{var f=e(551).LGraphManager;function a(t){f.call(this,t)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},765:(i,r,e)=>{var f=e(551).FDLayout,a=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,v=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,A=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new a(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new y(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new h(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=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)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(R){return m.has(R)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return n.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.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()),o.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 d=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},d=0;d<n.length;d++){var E=n[d].rect,p=n[d].id;m[p]={id:p,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,d=0;d<n.length;d++)m=n[d],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var d=0;d<n.length;d++)m=n[d],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),d=0;d<m.length;d++){var E=m[d];this.idToNodeMap.set(E.id,E)}var p=function O(X){for(var B=X.getChild().getNodes(),_,lt=0,q=0;q<B.length;q++)_=B[q],_.getChild()==null?n.fixedNodeSet.has(_.id)&&(lt+=100):lt+=O(_);return lt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(B){n.fixedNodeSet.add(B.nodeId)});for(var m=this.graphManager.getAllNodes(),E,d=0;d<m.length;d++)if(E=m[d],E.getChild()!=null){var R=p(E);R>0&&(E.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,I=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,d=0;d<H.length;d++)this.dummyToNodeForVerticalAlignment.set("dummy"+d,[]),H[d].forEach(function(X){w.set(X,"dummy"+d),n.dummyToNodeForVerticalAlignment.get("dummy"+d).push(X),n.fixedNodeSet.has(X)&&n.fixedNodesOnHorizontal.add("dummy"+d)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,d=0;d<x.length;d++)this.dummyToNodeForHorizontalAlignment.set("dummy"+d,[]),x[d].forEach(function(X){I.set(X,"dummy"+d),n.dummyToNodeForHorizontalAlignment.get("dummy"+d).push(X),n.fixedNodeSet.has(X)&&n.fixedNodesOnVertical.add("dummy"+d)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,B,_;for(_=O.length-1;_>=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;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=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(X)||(n.nodesInRelativeHorizontal.push(X),n.nodeToRelativeConstraintMapHorizontal.set(X,[]),n.dummyToNodeForVerticalAlignment.has(X)?n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(X).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=I.has(O.top)?I.get(O.top):O.top,lt=I.has(O.bottom)?I.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=I.has(O.top)?I.get(O.top):O.top,lt=I.has(O.bottom)?I.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,It=new Set,Lt=0;return X.forEach(function(dt,it){if(!It.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(q.push(ut),It.add(ut),_[Lt].push(ut);q.length!=0;){ut=q.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=X.get(ut);Tt.forEach(function(Ct){It.has(Ct)||(q.push(Ct),It.add(Ct),_[Lt].push(Ct))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d<m.length;d++){for(var E=0,p=0;p<m[d].length;p++){if(this.fixedNodeSet.has(m[d][p])){E=0;break}E+=this.idToNodeMap.get(m[d][p]).displacementX}for(var R=E/m[d].length,p=0;p<m[d].length;p++)this.idToNodeMap.get(m[d][p]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,d=0;d<w.length;d++){for(var I=0,p=0;p<w[d].length;p++){if(this.fixedNodeSet.has(w[d][p])){I=0;break}I+=this.idToNodeMap.get(w[d][p]).displacementY}for(var H=I/w[d].length,p=0;p<w[d].length;p++)this.idToNodeMap.get(w[d][p]).displacementY=H}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForVerticalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX:O=n.idToNodeMap.get(z).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(X){if(X.right){var B=n.nodeToTempPositionMapHorizontal.get(X.right)-n.nodeToTempPositionMapHorizontal.get(z)-O;B<X.gap&&(O-=X.gap-B)}else{var B=n.nodeToTempPositionMapHorizontal.get(z)-n.nodeToTempPositionMapHorizontal.get(X.left)+O;B<X.gap&&(O+=X.gap-B)}}),n.nodeToTempPositionMapHorizontal.set(z,n.nodeToTempPositionMapHorizontal.get(z)+O),n.dummyToNodeForVerticalAlignment.has(z)?n.dummyToNodeForVerticalAlignment.get(z).forEach(function(X){n.idToNodeMap.get(X).displacementX=O}):n.idToNodeMap.get(z).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForHorizontalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY:O=n.idToNodeMap.get(z).displacementY,n.nodeToRelativeConstraintMapVertical.get(z).forEach(function(X){if(X.bottom){var B=n.nodeToTempPositionMapVertical.get(X.bottom)-n.nodeToTempPositionMapVertical.get(z)-O;B<X.gap&&(O-=X.gap-B)}else{var B=n.nodeToTempPositionMapVertical.get(z)-n.nodeToTempPositionMapVertical.get(X.top)+O;B<X.gap&&(O+=X.gap-B)}}),n.nodeToTempPositionMapVertical.set(z,n.nodeToTempPositionMapVertical.get(z)+O),n.dummyToNodeForHorizontalAlignment.has(z)?n.dummyToNodeForHorizontalAlignment.get(z).forEach(function(X){n.idToNodeMap.get(X).displacementY=O}):n.idToNodeMap.get(z).displacementY=O}});else{for(var d=0;d<this.componentsOnHorizontal.length;d++){var x=this.componentsOnHorizontal[d];if(this.fixedComponentsOnHorizontal[d])for(var p=0;p<x.length;p++)this.dummyToNodeForVerticalAlignment.has(x[p])?this.dummyToNodeForVerticalAlignment.get(x[p]).forEach(function(X){n.idToNodeMap.get(X).displacementX=0}):this.idToNodeMap.get(x[p]).displacementX=0;else{for(var k=0,W=0,p=0;p<x.length;p++)if(this.dummyToNodeForVerticalAlignment.has(x[p])){var U=this.dummyToNodeForVerticalAlignment.get(x[p]);k+=U.length*this.idToNodeMap.get(U[0]).displacementX,W+=U.length}else k+=this.idToNodeMap.get(x[p]).displacementX,W++;for(var et=k/W,p=0;p<x.length;p++)this.dummyToNodeForVerticalAlignment.has(x[p])?this.dummyToNodeForVerticalAlignment.get(x[p]).forEach(function(X){n.idToNodeMap.get(X).displacementX=et}):this.idToNodeMap.get(x[p]).displacementX=et}}for(var d=0;d<this.componentsOnVertical.length;d++){var x=this.componentsOnVertical[d];if(this.fixedComponentsOnVertical[d])for(var p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.has(x[p])?this.dummyToNodeForHorizontalAlignment.get(x[p]).forEach(function(B){n.idToNodeMap.get(B).displacementY=0}):this.idToNodeMap.get(x[p]).displacementY=0;else{for(var k=0,W=0,p=0;p<x.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(x[p])){var U=this.dummyToNodeForHorizontalAlignment.get(x[p]);k+=U.length*this.idToNodeMap.get(U[0]).displacementY,W+=U.length}else k+=this.idToNodeMap.get(x[p]).displacementY,W++;for(var et=k/W,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.has(x[p])?this.dummyToNodeForHorizontalAlignment.get(x[p]).forEach(function(q){n.idToNodeMap.get(q).displacementY=et}):this.idToNodeMap.get(x[p]).displacementY=et}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,d=this.graphManager.getGraphs(),E=d.length,p;for(p=0;p<E;p++)m=d[p],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,d;for(d=0;d<n.length;d++){var E=n[d];if(!m.has(E)){var p=E.getSource(),R=E.getTarget();if(p==R)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(p.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(p)),!m.has(w[0])){if(w.length>1){var I;for(I=0;I<w.length;I++){var H=w[I];H.getBendpoints().push(new v),this.createDummyNodesForBendpoints(H)}}w.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new u(0,0),d=Math.ceil(Math.sqrt(n.length)),E=0,p=0,R=0,w=new v(0,0),I=0;I<n.length;I++){I%d==0&&(R=0,p=E,I!=0&&(p+=o.DEFAULT_COMPONENT_SEPERATION),E=0);var H=n[I],x=F.findCenterOfTree(H);m.x=R,m.y=p,w=D.radialLayout(H,x,m),w.y>E&&(E=Math.floor(w.y)),R=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,d){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(n),R=new V;R.setDeviceOrgX(p.getMinX()),R.setDeviceOrgY(p.getMinY()),R.setWorldOrgX(d.x),R.setWorldOrgY(d.y);for(var w=0;w<n.length;w++){var I=n[w];I.transform(R)}var H=new v(p.getMaxX(),p.getMaxY());return R.inverseTransformPoint(H)},D.branchRadialLayout=function(n,m,d,E,p,R){var w=(E-d+1)/2;w<0&&(w+=180);var I=(w+d)%360,H=I*P.TWO_PI/360,x=p*Math.cos(H),k=p*Math.sin(H);n.setCenter(x,k);var W=[];W=W.concat(n.getEdges());var U=W.length;m!=null&&U--;for(var et=0,z=W.length,O,X=n.getEdgesBetween(m);X.length>1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-d)/U,q=O;et!=U;q=++q%z){var It=W[q].getOtherEnd(n);if(It!=m){var Lt=(d+et*lt)%360,dt=(Lt+lt)%360;D.branchRadialLayout(It,n,Lt,dt,p+R,R),et++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,d=0;d<n.length;d++){var E=n[d],p=E.getDiagonal();p>m&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var R=E[p],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&d.push(R)}for(var p=0;p<d.length;p++){var R=d[p],I=R.getParent().id;typeof m[I]>"u"&&(m[I]=[]),m[I]=m[I].concat(R)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;n.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(n.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,n.idToDummyNode[x]=W;var U=n.getGraphManager().add(n.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;z<m[H].length;z++){var O=m[H][z];et.remove(O),U.add(O)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var d=0;d<this.compoundOrder.length;d++)m[this.compoundOrder[d].id]=this.compoundOrder[d],n[this.compoundOrder[d].id]=[].concat(this.compoundOrder[d].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[d].getChild()),this.compoundOrder[d].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(d){var E=n.idToDummyNode[d];if(m[d]=n.tileNodes(n.memberGroups[d],E.paddingLeft+E.paddingRight),E.rect.width=m[d].width,E.rect.height=m[d].height,E.setCenter(m[d].centerX,m[d].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var p=E.rect.width,R=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(p+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>p?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(R+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>R?(E.rect.y-=(E.labelHeight-R)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-R)/2):E.labelPosVertical=="bottom"&&E.setHeight(R+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],d=m.id,E=m.paddingLeft,p=m.paddingTop,R=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,E,p,R,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var E=n.idToDummyNode[d],p=E.paddingLeft,R=E.paddingTop,w=E.labelMarginLeft,I=E.labelMarginTop;n.adjustLocations(m[d],E.rect.x,E.rect.y,p,R,w,I)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=n.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var E=d.getNodes(),p=0;p<E.length;p++){var R=E[p];if(this.getNodeDegree(R)>0)return this.toBeTiled[m]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),d=0,E=0;E<m.length;E++){var p=m[E];p.getSource().id!==p.getTarget().id&&(d=d+1)}return d},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var d=n.getChild().getNodes(),E=0;E<d.length;E++){var p=d[E];m+=this.getNodeDegreeWithChildren(p)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var d=n[m];d.getChild()!=null&&this.fillCompexOrderByDFS(d.getChild().getNodes()),this.getToBeTiled(d)&&this.compoundOrder.push(d)}},D.prototype.adjustLocations=function(n,m,d,E,p,R,w){m+=E+R,d+=p+w;for(var I=m,H=0;H<n.rows.length;H++){var x=n.rows[H];m=I;for(var k=0,W=0;W<x.length;W++){var U=x[W];U.rect.x=m,U.rect.y=d,m+=U.rect.width+n.horizontalPadding,U.rect.height>k&&(k=U.rect.height)}d+=k+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var d=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var p=m[E];if(d.tiledMemberPack[E]=d.tileNodes(n[E],p.paddingLeft+p.paddingRight),p.rect.width=d.tiledMemberPack[E].width,p.rect.height=d.tiledMemberPack[E].height,p.setCenter(d.tiledMemberPack[E].centerX,d.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var R=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(R+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>R?(p.rect.x-=(p.labelWidth-R)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-R)/2):p.labelPosHorizontal=="right"&&p.setWidth(R+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(n,m){var d=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),p=this.getOrgRatio(d),R=this.getOrgRatio(E),w;return R<p?w=E:w=d,w},D.prototype.getOrgRatio=function(n){var m=n.width,d=n.height,E=m/d;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var d=o.TILING_PADDING_VERTICAL,E=o.TILING_PADDING_HORIZONTAL,p=n.length,R=0,w=0,I=0;n.forEach(function(z){R+=z.getWidth(),w+=z.getHeight(),z.getWidth()>I&&(I=z.getWidth())});var H=R/p,x=w/p,k=Math.pow(d-E,2)+4*(H+E)*(x+d)*p,W=(E-d+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return I>et&&(et=I),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,d){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,R=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(n,d));var I=function(O){return O.rect.width*O.rect.height},H=function(O,X){return I(X)-I(O)};n.sort(function(z,O){var X=H;return w.idealRowWidth?(X=R,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W<n.length;W++){var U=n[W];x+=U.getCenterX(),k+=U.getCenterY()}w.centerX=x/n.length,w.centerY=k/n.length;for(var W=0;W<n.length;W++){var U=n[W];if(w.rows.length==0)this.insertNodeToRow(w,U,0,m);else if(this.canAddHorizontal(w,U.rect.width,U.rect.height)){var et=w.rows.length-1;w.idealRowWidth||(et=this.getShortestRowIndex(w)),this.insertNodeToRow(w,U,et,m)}else this.insertNodeToRow(w,U,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(n,m,d,E){var p=E;if(d==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(p),n.rowHeight.push(0)}var w=n.rowWidth[d]+m.rect.width;n.rows[d].length>0&&(w+=n.horizontalPadding),n.rowWidth[d]=w,n.width<w&&(n.width=w);var I=m.rect.height;d>0&&(I+=n.verticalPadding);var H=0;I>n.rowHeight[d]&&(H=n.rowHeight[d],n.rowHeight[d]=I,H=n.rowHeight[d]-H),n.height+=H,n.rows[d].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,d=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<d&&(m=E,d=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,d=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>d&&(m=E,d=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,d){if(n.idealRowWidth){var E=n.rows.length-1,p=n.rowWidth[E];return p+m+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var w=n.rowWidth[R];if(w+n.horizontalPadding+m<=n.width)return!0;var I=0;n.rowHeight[R]<d&&R>0&&(I=d+n.verticalPadding-n.rowHeight[R]);var H;n.width-w>=m+n.horizontalPadding?H=(n.height+I)/(w+m+n.horizontalPadding):H=(n.height+I)/n.width,I=d+n.verticalPadding;var x;return n.width<m?x=(n.height+I)/m:x=(n.height+I)/n.width,x<1&&(x=1/x),H<1&&(H=1/H),H<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),d=n.rowWidth.length-1,E=n.rows[m],p=E[E.length-1],R=p.width+n.horizontalPadding;if(n.width-n.rowWidth[d]>R&&m!=d){E.splice(-1,1),n.rows[d].push(p),n.rowWidth[m]=n.rowWidth[m]-R,n.rowWidth[d]=n.rowWidth[d]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,I=0;I<E.length;I++)E[I].height>w&&(w=E[I].height);m>0&&(w+=n.verticalPadding);var H=n.rowHeight[m]+n.rowHeight[d];n.rowHeight[m]=w,n.rowHeight[d]<p.height+n.verticalPadding&&(n.rowHeight[d]=p.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[d];n.height+=x-H,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,d;m;){var E=this.graphManager.getAllNodes(),p=[];m=!1;for(var R=0;R<E.length;R++)if(d=E[R],d.getEdges().length==1&&!d.getEdges()[0].isInterGraph&&d.getChild()==null){if(o.PURE_INCREMENTAL){var w=d.getEdges()[0].getOtherEnd(d),I=new L(d.getCenterX()-w.getCenterX(),d.getCenterY()-w.getCenterY());p.push([d,d.getEdges()[0],d.getOwner(),I])}else p.push([d,d.getEdges()[0],d.getOwner()]);m=!0}if(m==!0){for(var H=[],x=0;x<p.length;x++)p[x][0].getEdges().length==1&&(H.push(p[x]),p[x][0].getOwner().remove(p[x][0]));n.push(H),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,d=n[m-1],E,p=0;p<d.length;p++)E=d[p],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,d,E=n[0];if(E==n[1].source?d=n[1].target:d=n[1].source,o.PURE_INCREMENTAL)E.setCenter(d.getCenterX()+n[3].getWidth(),d.getCenterY()+n[3].getHeight());else{var p=d.startX,R=d.finishX,w=d.startY,I=d.finishY,H=0,x=0,k=0,W=0,U=[H,k,x,W];if(w>0)for(var et=p;et<=R;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(R<this.grid.length-1)for(var et=w;et<=I;et++)U[1]+=this.grid[R+1][et].length+this.grid[R][et].length-1;if(I<this.grid[0].length-1)for(var et=p;et<=R;et++)U[2]+=this.grid[et][I+1].length+this.grid[et][I].length-1;if(p>0)for(var et=w;et<=I;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=A.MAX_VALUE,O,X,B=0;B<U.length;B++)U[B]<z?(z=U[B],O=1,X=B):U[B]==z&&O++;if(O==3&&z==0)U[0]==0&&U[1]==0&&U[2]==0?m=1:U[0]==0&&U[1]==0&&U[3]==0?m=0:U[0]==0&&U[2]==0&&U[3]==0?m=3:U[1]==0&&U[2]==0&&U[3]==0&&(m=2);else if(O==2&&z==0){var _=Math.floor(Math.random()*2);U[0]==0&&U[1]==0?_==0?m=0:m=1:U[0]==0&&U[2]==0?_==0?m=0:m=2:U[0]==0&&U[3]==0?_==0?m=0:m=3:U[1]==0&&U[2]==0?_==0?m=1:m=2:U[1]==0&&U[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&z==0){var _=Math.floor(Math.random()*4);m=_}else m=X;m==0?E.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(d.getCenterX()+d.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,d.getCenterY()):m==2?E.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(d.getCenterX()-d.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,d.getCenterY())}},i.exports=D},991:(i,r,e)=>{var f=e(551).FDLayoutNode,a=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.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*a.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=h,l.displacementY+=o):l.propogateDisplacementToChildren(h,o)},y.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},y.prototype.setPred1=function(h){this.pred1=h},y.prototype.getPred1=function(){return pred1},y.prototype.getPred2=function(){return pred2},y.prototype.setNext=function(h){this.next=h},y.prototype.getNext=function(){return next},y.prototype.setProcessed=function(h){this.processed=h},y.prototype.isProcessed=function(){return processed},i.exports=y},902:(i,r,e)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var a=e(806),y=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,v=[],L=[],F=c.getAllNodes(),A=0,P=0;P<F.length;P++){var J=F[P];J.getChild()==null&&(u.set(J.id,A++),v.push(J.getCenterX()),L.push(J.getCenterY()),T.set(J.id,J))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(S){!S.gap&&S.gap!=0&&(S.left?S.gap=a.DEFAULT_EDGE_LENGTH+T.get(S.left).getWidth()/2+T.get(S.right).getWidth()/2:S.gap=a.DEFAULT_EDGE_LENGTH+T.get(S.top).getHeight()/2+T.get(S.bottom).getHeight()/2)});var V=function(b,$){return{x:b.x-$.x,y:b.y-$.y}},Q=function(b){var $=0,K=0;return b.forEach(function(Z){$+=v[u.get(Z)],K+=L[u.get(Z)]}),{x:$/b.size,y:K/b.size}},D=function(b,$,K,Z,at){function gt(ft,st){var Mt=new Set(ft),ct=!0,ht=!1,Wt=void 0;try{for(var Nt=st[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var Zt=At.value;Mt.add(Zt)}}catch(Gt){ht=!0,Wt=Gt}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Wt}}return Mt}var ot=new Map;b.forEach(function(ft,st){ot.set(st,0)}),b.forEach(function(ft,st){ft.forEach(function(Mt){ot.set(Mt.id,ot.get(Mt.id)+1)})});var tt=new Map,j=new Map,vt=new y;ot.forEach(function(ft,st){ft==0?(vt.push(st),K||($=="horizontal"?tt.set(st,u.has(st)?v[u.get(st)]:Z.get(st)):tt.set(st,u.has(st)?L[u.get(st)]:Z.get(st)))):tt.set(st,Number.NEGATIVE_INFINITY),K&&j.set(st,new Set([st]))}),K&&at.forEach(function(ft){var st=[];if(ft.forEach(function(ht){K.has(ht)&&st.push(ht)}),st.length>0){var Mt=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,u.has(ht)?v[u.get(ht)]:Z.get(ht)),Mt+=tt.get(ht)):(tt.set(ht,u.has(ht)?L[u.get(ht)]:Z.get(ht)),Mt+=tt.get(ht))}),Mt=Mt/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Mt)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=u.has(ht)?v[u.get(ht)]:Z.get(ht):ct+=u.has(ht)?L[u.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=vt.shift(),Mt=b.get(st);Mt.forEach(function(ct){if(tt.get(ct.id)<tt.get(st)+ct.gap)if(K&&K.has(ct.id)){var ht=void 0;if($=="horizontal"?ht=u.has(ct.id)?v[u.get(ct.id)]:Z.get(ct.id):ht=u.has(ct.id)?L[u.get(ct.id)]:Z.get(ct.id),tt.set(ct.id,ht),ht<tt.get(st)+ct.gap){var Wt=tt.get(st)+ct.gap-ht;j.get(st).forEach(function(Nt){tt.set(Nt,tt.get(Nt)-Wt)})}}else tt.set(ct.id,tt.get(st)+ct.gap);ot.set(ct.id,ot.get(ct.id)-1),ot.get(ct.id)==0&&vt.push(ct.id),K&&j.set(ct.id,gt(j.get(st),j.get(ct.id)))})};vt.length!=0;)wt();if(K){var yt=new Set;b.forEach(function(ft,st){ft.length==0&&yt.add(st)});var Rt=[];j.forEach(function(ft,st){if(yt.has(st)){var Mt=!1,ct=!0,ht=!1,Wt=void 0;try{for(var Nt=ft[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var Zt=At.value;K.has(Zt)&&(Mt=!0)}}catch(Ft){ht=!0,Wt=Ft}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Wt}}if(!Mt){var Gt=!1,$t=void 0;Rt.forEach(function(Ft,qt){Ft.has([].concat(f(ft))[0])&&(Gt=!0,$t=qt)}),Gt?ft.forEach(function(Ft){Rt[$t].add(Ft)}):Rt.push(new Set(ft))}}}),Rt.forEach(function(ft,st){var Mt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.NEGATIVE_INFINITY,Wt=Number.NEGATIVE_INFINITY,Nt=!0,At=!1,Zt=void 0;try{for(var Gt=ft[Symbol.iterator](),$t;!(Nt=($t=Gt.next()).done);Nt=!0){var Ft=$t.value,qt=void 0;$=="horizontal"?qt=u.has(Ft)?v[u.get(Ft)]:Z.get(Ft):qt=u.has(Ft)?L[u.get(Ft)]:Z.get(Ft);var _t=tt.get(Ft);qt<Mt&&(Mt=qt),qt>ht&&(ht=qt),_t<ct&&(ct=_t),_t>Wt&&(Wt=_t)}}catch(ie){At=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(At)throw Zt}}var ce=(Mt+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?v[u.get(j.left)]-v[u.get(j.right)]>=0?$++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gt<u.size;gt++)v[gt]=-1*v[gt],L[gt]=-1*L[gt];else if($>K)for(var ot=0;ot<u.size;ot++)v[ot]=-1*v[ot];else if(Z>at)for(var tt=0;tt<u.size;tt++)L[tt]=-1*L[tt]},n=function(b){var $=[],K=new y,Z=new Set,at=0;return b.forEach(function(gt,ot){if(!Z.has(ot)){$[at]=[];var tt=ot;for(K.push(tt),Z.add(tt),$[at].push(tt);K.length!=0;){tt=K.shift();var j=b.get(tt);j.forEach(function(vt){Z.has(vt.id)||(K.push(vt.id),Z.add(vt.id),$[at].push(vt.id))})}at++}}),$},m=function(b){var $=new Map;return b.forEach(function(K,Z){$.set(Z,[])}),b.forEach(function(K,Z){K.forEach(function(at){$.get(Z).push(at),$.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),$},d=function(b){var $=new Map;return b.forEach(function(K,Z){$.set(Z,[])}),b.forEach(function(K,Z){K.forEach(function(at){$.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),$},E=[],p=[],R=!1,w=!1,I=new Set,H=new Map,x=new Map,k=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(S){I.add(S.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(S){S.left?(H.has(S.left)?H.get(S.left).push({id:S.right,gap:S.gap,direction:"horizontal"}):H.set(S.left,[{id:S.right,gap:S.gap,direction:"horizontal"}]),H.has(S.right)||H.set(S.right,[])):(H.has(S.top)?H.get(S.top).push({id:S.bottom,gap:S.gap,direction:"vertical"}):H.set(S.top,[{id:S.bottom,gap:S.gap,direction:"vertical"}]),H.has(S.bottom)||H.set(S.bottom,[]))}),x=m(H),k=n(x)),a.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[v[u.get(S.nodeId)],L[u.get(S.nodeId)]]}),R=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var vt=new Set([].concat(f(j)).filter(function(yt){return I.has(yt)})),wt=void 0;vt.size>0?wt=v[u.get(vt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[u.get(yt)]],p[S]=[v[u.get(yt)],L[u.get(yt)]],S++})},K=0;K<b.length;K++)$(K);R=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,at=function(tt){var j=new Set;Z[tt].forEach(function(yt){j.add(yt)});var vt=new Set([].concat(f(j)).filter(function(yt){return I.has(yt)})),wt=void 0;vt.size>0?wt=v[u.get(vt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[v[u.get(yt)],wt],p[S]=[v[u.get(yt)],L[u.get(yt)]],S++})},gt=0;gt<Z.length;gt++)at(gt);R=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var W=0,U=0,et=0;et<k.length;et++)k[et].length>W&&(W=k[et].length,U=et);if(W<x.size/2)rt(l.relativePlacementConstraint),R=!1,w=!1;else{var z=new Map,O=new Map,X=[];k[U].forEach(function(S){H.get(S).forEach(function(b){b.direction=="horizontal"?(z.has(S)?z.get(S).push(b):z.set(S,[b]),z.has(b.id)||z.set(b.id,[]),X.push({left:S,right:b.id})):(O.has(S)?O.get(S).push(b):O.set(S,[b]),O.has(b.id)||O.set(b.id,[]),X.push({top:S,bottom:b.id}))})}),rt(X),w=!1;var B=D(z,"horizontal"),_=D(O,"vertical");k[U].forEach(function(S,b){p[b]=[v[u.get(S)],L[u.get(S)]],E[b]=[],B.has(S)?E[b][0]=B.get(S):E[b][0]=v[u.get(S)],_.has(S)?E[b][1]=_.get(S):E[b][1]=L[u.get(S)]}),R=!0}}if(R){for(var lt=void 0,q=t.transpose(E),It=t.transpose(p),Lt=0;Lt<q.length;Lt++)q[Lt]=t.multGamma(q[Lt]),It[Lt]=t.multGamma(It[Lt]);var dt=t.multMat(q,t.transpose(It)),it=h.svd(dt);lt=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<u.size;ut++){var Tt=[v[ut],L[ut]],Ct=[lt[0][0],lt[1][0]],Dt=[lt[0][1],lt[1][1]];v[ut]=t.dotProduct(Tt,Ct),L[ut]=t.dotProduct(Tt,Dt)}w&&rt(l.relativePlacementConstraint)}}if(a.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:v[u.get(S.nodeId)],y:L[u.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,v.forEach(function(S,b){v[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){v[u.get(S.nodeId)]=S.position.x,L[u.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return I.has(at)})),Z=void 0;K.size>0?Z=v[u.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(at){I.has(at)||(v[u.get(at)]=Z)})},Vt=0;Vt<xt.length;Vt++)St(Vt);if(l.alignmentConstraint.horizontal)for(var Xt=l.alignmentConstraint.horizontal,Ut=function(b){var $=new Set;Xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return I.has(at)})),Z=void 0;K.size>0?Z=L[u.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(at){I.has(at)||(L[u.get(at)]=Z)})},bt=0;bt<Xt.length;bt++)Ut(bt)}l.relativePlacementConstraint&&function(){var S=new Map,b=new Map,$=new Map,K=new Map,Z=new Map,at=new Map,gt=new Set,ot=new Set;if(I.forEach(function(Yt){gt.add(Yt),ot.add(Yt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var tt=l.alignmentConstraint.vertical,j=function(Et){$.set("dummy"+Et,[]),tt[Et].forEach(function(Ot){S.set(Ot,"dummy"+Et),$.get("dummy"+Et).push(Ot),I.has(Ot)&&gt.add("dummy"+Et)}),Z.set("dummy"+Et,v[u.get(tt[Et][0])])},vt=0;vt<tt.length;vt++)j(vt);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,yt=function(Et){K.set("dummy"+Et,[]),wt[Et].forEach(function(Ot){b.set(Ot,"dummy"+Et),K.get("dummy"+Et).push(Ot),I.has(Ot)&&ot.add("dummy"+Et)}),at.set("dummy"+Et,L[u.get(wt[Et][0])])},Rt=0;Rt<wt.length;Rt++)yt(Rt)}var ft=new Map,st=new Map,Mt=function(Et){H.get(Et).forEach(function(Ot){var Jt=void 0,kt=void 0;Ot.direction=="horizontal"?(Jt=S.get(Et)?S.get(Et):Et,S.get(Ot.id)?kt={id:S.get(Ot.id),gap:Ot.gap,direction:Ot.direction}:kt=Ot,ft.has(Jt)?ft.get(Jt).push(kt):ft.set(Jt,[kt]),ft.has(kt.id)||ft.set(kt.id,[])):(Jt=b.get(Et)?b.get(Et):Et,b.get(Ot.id)?kt={id:b.get(Ot.id),gap:Ot.gap,direction:Ot.direction}:kt=Ot,st.has(Jt)?st.get(Jt).push(kt):st.set(Jt,[kt]),st.has(kt.id)||st.set(kt.id,[]))})},ct=!0,ht=!1,Wt=void 0;try{for(var Nt=H.keys()[Symbol.iterator](),At;!(ct=(At=Nt.next()).done);ct=!0){var Zt=At.value;Mt(Zt)}}catch(Yt){ht=!0,Wt=Yt}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(ht)throw Wt}}var Gt=m(ft),$t=m(st),Ft=n(Gt),qt=n($t),_t=d(ft),ce=d(st),Kt=[],te=[];Ft.forEach(function(Yt,Et){Kt[Et]=[],Yt.forEach(function(Ot){_t.get(Ot).length==0&&Kt[Et].push(Ot)})}),qt.forEach(function(Yt,Et){te[Et]=[],Yt.forEach(function(Ot){ce.get(Ot).length==0&&te[Et].push(Ot)})});var ee=D(ft,"horizontal",gt,Z,Kt),jt=D(st,"vertical",ot,at,te),se=function(Et){$.get(Et)?$.get(Et).forEach(function(Ot){v[u.get(Ot)]=ee.get(Et)}):v[u.get(Et)]=ee.get(Et)},re=!0,ie=!1,Le=void 0;try{for(var ge=ee.keys()[Symbol.iterator](),Me;!(re=(Me=ge.next()).done);re=!0){var ue=Me.value;se(ue)}}catch(Yt){ie=!0,Le=Yt}finally{try{!re&&ge.return&&ge.return()}finally{if(ie)throw Le}}var Ze=function(Et){K.get(Et)?K.get(Et).forEach(function(Ot){L[u.get(Ot)]=jt.get(Et)}):L[u.get(Et)]=jt.get(Et)},ve=!0,Ae=!1,Ce=void 0;try{for(var de=jt.keys()[Symbol.iterator](),we;!(ve=(we=de.next()).done);ve=!0){var ue=we.value;Ze(ue)}}catch(Yt){Ae=!0,Ce=Yt}finally{try{!ve&&de.return&&de.return()}finally{if(Ae)throw Ce}}}()}for(var Ht=0;Ht<F.length;Ht++){var Bt=F[Ht];Bt.getChild()==null&&Bt.setCenter(v[u.get(Bt.id)],L[u.get(Bt.id)])}},i.exports=o},551:i=>{i.exports=C}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(45);return s})()})}(pe)),pe.exports}(function(M,Y){(function(G,N){M.exports=N(cr())})(Te,function(C){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),a=1;a<e;a++)f[a-1]=arguments[a];return f.forEach(function(y){Object.keys(y).forEach(function(t){return r[t]=y[t]})}),r}},548:(i,r,e)=>{var f=function(){function t(h,o){var c=[],l=!0,T=!1,u=void 0;try{for(var v=h[Symbol.iterator](),L;!(l=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,u=F}finally{try{!l&&v.return&&v.return()}finally{if(T)throw u}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o<t.length;o++)h[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var u=l.parent()[0];u!=null;){if(h[u.id()])return!1;u=u.parent()[0]}return!0});return c},y.connectComponents=function(t,h,o,c){var l=new a,T=new Set,u=[],v=void 0,L=void 0,F=void 0,A=!1,P=1,J=[],V=[],Q=function(){var rt=t.collection();V.push(rt);var n=o[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(h)),u.push(n),m.forEach(function(p){l.push(p),T.add(p),rt.merge(p)});for(var d=function(){n=l.shift();var R=t.collection();n.neighborhood().nodes().forEach(function(x){h.intersection(n.edgesWith(x)).length>0&&R.merge(x)});for(var w=0;w<R.length;w++){var I=R[w];if(v=o.intersection(I.union(I.ancestors())),v!=null&&!T.has(v[0])){var H=v.union(v.descendants());H.forEach(function(x){l.push(x),T.add(x),rt.merge(x),o.has(x)&&u.push(x)})}}};l.length!=0;)d();if(rt.forEach(function(p){h.intersection(p.connectedEdges()).forEach(function(R){rt.has(R.source())&&rt.has(R.target())&&rt.merge(R)})}),u.length==o.length&&(A=!0),!A||A&&P>1){L=u[0],F=L.connectedEdges().length,u.forEach(function(p){p.connectedEdges().length<F&&(F=p.connectedEdges().length,L=p)}),J.push(L.id());var E=t.collection();E.merge(u[0]),u.forEach(function(p){E.merge(p)}),u=[],o=o.difference(E),P++}};do Q();while(!A);return c&&J.length>0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,F=void 0;try{for(var A=h.nodeIndexes[Symbol.iterator](),P;!(v=(P=A.next()).done);v=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var n=rt.boundingBox(),m=h.xCoords[D]-n.w/2,d=h.xCoords[D]+n.w/2,E=h.yCoords[D]-n.h/2,p=h.yCoords[D]+n.h/2;m<c&&(c=m),d>l&&(l=d),E<T&&(T=E),p>u&&(u=p)}}}catch(x){L=!0,F=x}finally{try{!v&&A.return&&A.return()}finally{if(L)throw F}}var R=t.x-(l+c)/2,w=t.y-(u+T)/2;h.xCoords=h.xCoords.map(function(x){return x+R}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;W<c&&(c=W),U>l&&(l=U),et<T&&(T=et),z>u&&(u=z)});var I=t.x-(l+c)/2,H=t.y-(u+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+I,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,A=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;Q<V;Q++){var D=J[Q];L=h[c.get(D.id())]-D.width()/2,F=h[c.get(D.id())]+D.width()/2,A=o[c.get(D.id())]-D.height()/2,P=o[c.get(D.id())]+D.height()/2,l>L&&(l=L),T<F&&(T=F),u>A&&(u=A),v<P&&(v=P)}var rt={};return rt.topLeftX=l,rt.topLeftY=u,rt.width=T-l,rt.height=v-u,rt},y.calcParentsWithoutChildren=function(t,h){var o=t.collection();return h.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},i.exports=y},816:(i,r,e)=>{var f=e(548),a=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(v,L){var F=v.cy,A=v.eles,P=A.nodes(),J=A.edges(),V=void 0,Q=void 0,D=void 0,rt={};v.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,k){return n(x)?x(k):x},d=f.calcParentsWithoutChildren(F,A),E=function H(x,k,W,U){for(var et=k.length,z=0;z<et;z++){var O=k[z],X=null;O.intersection(d).length==0&&(X=O.children());var B=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:U.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(U.randomize)if(!O.isParent())B=x.add(new y(W.graphManager,new t(Q[V.get(O.id())]-_.w/2,D[V.get(O.id())]-_.h/2),new h(parseFloat(_.w),parseFloat(_.h))));else{var lt=f.calcBoundingBox(O,Q,D,V);O.intersection(d).length==0?B=x.add(new y(W.graphManager,new t(lt.topLeftX,lt.topLeftY),new h(lt.width,lt.height))):B=x.add(new y(W.graphManager,new t(lt.topLeftX,lt.topLeftY),new h(parseFloat(_.w),parseFloat(_.h))))}else B=x.add(new y(W.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new h(parseFloat(_.w),parseFloat(_.h))));else B=x.add(new y(this.graphManager));if(B.id=O.data("id"),B.nodeRepulsion=m(U.nodeRepulsion,O),B.paddingLeft=parseInt(O.css("padding")),B.paddingTop=parseInt(O.css("padding")),B.paddingRight=parseInt(O.css("padding")),B.paddingBottom=parseInt(O.css("padding")),U.nodeDimensionsIncludeLabels&&(B.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,B.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,B.labelPosVertical=O.css("text-valign"),B.labelPosHorizontal=O.css("text-halign")),rt[O.data("id")]=B,isNaN(B.rect.x)&&(B.rect.x=0),isNaN(B.rect.y)&&(B.rect.y=0),X!=null&&X.length>0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z<W.length;z++){var O=W[z],X=rt[O.data("source")],B=rt[O.data("target")];if(X&&B&&X!==B&&X.getEdgesBetween(B).length==0){var _=k.add(x.newEdge(),X,B);_.id=O.id(),_.idealLength=m(v.idealEdgeLength,O),_.edgeElasticity=m(v.edgeElasticity,O),U+=_.idealLength,et++}}v.idealEdgeLength!=null&&(et>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(v.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},R=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};v.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,l.TILE=v.tile,l.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),v.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),v.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new a,I=w.newGraphManager();return E(I.addRoot(),f.getTopMostNodes(P),w,v),p(w,I,J),R(w,v),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function v(L,F){for(var A=0;A<F.length;A++){var P=F[A];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,F,A){return F&&v(L.prototype,F),A&&v(L,A),L}}();function a(v,L){if(!(v instanceof L))throw new TypeError("Cannot call a class as a function")}var y=e(658),t=e(548),h=e(657),o=h.spectralLayout,c=e(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),u=function(){function v(L){a(this,v),this.options=y({},T,L)}return f(v,[{key:"run",value:function(){var F=this,A=this.options,P=A.cy,J=A.eles,V=[],Q=[],D=void 0,rt=[];A.fixedNodeConstraint&&(!Array.isArray(A.fixedNodeConstraint)||A.fixedNodeConstraint.length==0)&&(A.fixedNodeConstraint=void 0),A.alignmentConstraint&&(A.alignmentConstraint.vertical&&(!Array.isArray(A.alignmentConstraint.vertical)||A.alignmentConstraint.vertical.length==0)&&(A.alignmentConstraint.vertical=void 0),A.alignmentConstraint.horizontal&&(!Array.isArray(A.alignmentConstraint.horizontal)||A.alignmentConstraint.horizontal.length==0)&&(A.alignmentConstraint.horizontal=void 0)),A.relativePlacementConstraint&&(!Array.isArray(A.relativePlacementConstraint)||A.relativePlacementConstraint.length==0)&&(A.relativePlacementConstraint=void 0);var n=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;n&&(A.tile=!1,A.packComponents=!1);var m=void 0,d=!1;if(P.layoutUtilities&&A.packComponents&&(m=P.layoutUtilities("get"),m||(m=P.layoutUtilities()),d=!0),J.nodes().length>0)if(d){var R=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(P,A.eles,R),D.forEach(function(dt){var it=dt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(dt){A.eles=dt,V.push(o(A))}),A.quality=="default"||A.quality=="proof"){var w=P.collection();if(A.tile){var I=new Map,H=[],x=[],k=0,W={nodeIndexes:I,xCoords:H,yCoords:x},U=[];if(D.forEach(function(dt,it){dt.edges().length==0&&(dt.nodes().forEach(function(ut,Tt){w.merge(dt.nodes()[Tt]),ut.isParent()||(W.nodeIndexes.set(dt.nodes()[Tt].id(),k++),W.xCoords.push(dt.nodes()[0].position().x),W.yCoords.push(dt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(dt,it){A.eles=dt,Q.push(l(A,V[it])),t.relocateComponent(rt[it],Q[it],A)})}else D.forEach(function(dt,it){t.relocateComponent(rt[it],V[it],A)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(dt){return dt.css("display")=="none"});D.forEach(function(dt,it){var ut=void 0;if(A.quality=="draft"&&(ut=V[it].nodeIndexes),dt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var Ct=void 0;dt.nodes().not(B).forEach(function(Dt){if(A.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[Ct]-Dt.boundingbox().w/2,y:V[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),dt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(A.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,A.randomize).shifts;if(A.quality=="draft")V.forEach(function(dt,it){var ut=dt.xCoords.map(function(Ct){return Ct+_[it].dx}),Tt=dt.yCoords.map(function(Ct){return Ct+_[it].dy});dt.xCoords=ut,dt.yCoords=Tt});else{var lt=0;O.forEach(function(dt){Object.keys(Q[dt]).forEach(function(it){var ut=Q[dt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=A.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var p=o(A);V.push(p)}A.quality=="default"||A.quality=="proof"?(Q.push(l(A,V[0])),t.relocateComponent(rt[0],Q[0],A)):t.relocateComponent(rt[0],V[0],A)}var q=function(it,ut){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,Ct=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},Ct=xt[Dt])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Tt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Tt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Tt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Tt.y-=Ct.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(dt){return dt.css("display")=="none"});A.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,A,q),It.length>0&&It.forEach(function(dt){dt.position(q(dt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v}();i.exports=u},657:(i,r,e)=>{var f=e(548),a=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),v=new Map,L=new Map,F=new Map,A=[],P=[],J=[],V=[],Q=[],D=[],rt=[],n=[],m=void 0,d=1e8,E=1e-9,p=o.piTol,R=o.samplingType,w=o.nodeSeparation,I=void 0,H=function(){for(var b=0,$=0,K=!1;$<I;){b=Math.floor(Math.random()*m),K=!1;for(var Z=0;Z<$;Z++)if(V[Z]==b){K=!0;break}if(!K)V[$]=b,$++;else continue}},x=function(b,$,K){for(var Z=[],at=0,gt=0,ot=0,tt=void 0,j=[],vt=0,wt=1,yt=0;yt<m;yt++)j[yt]=d;for(Z[gt]=b,j[b]=0;gt>=at;){ot=Z[at++];for(var Rt=A[ot],ft=0;ft<Rt.length;ft++)tt=L.get(Rt[ft]),j[tt]==d&&(j[tt]=j[ot]+1,Z[++gt]=tt);D[ot][$]=j[ot]*w}if(K){for(var st=0;st<m;st++)D[st][$]<Q[st]&&(Q[st]=D[st][$]);for(var Mt=0;Mt<m;Mt++)Q[Mt]>vt&&(vt=Q[Mt],wt=Mt)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z<m;Z++)Q[Z]=d;for(var at=0;at<I;at++)V[at]=$,$=x($,at,b)}else{H();for(var K=0;K<I;K++)x(V[K],K,b)}for(var gt=0;gt<m;gt++)for(var ot=0;ot<I;ot++)D[gt][ot]*=D[gt][ot];for(var tt=0;tt<I;tt++)rt[tt]=[];for(var j=0;j<I;j++)for(var vt=0;vt<I;vt++)rt[j][vt]=D[V[vt]][j]},W=function(){for(var b=y.svd(rt),$=b.S,K=b.U,Z=b.V,at=$[0]*$[0]*$[0],gt=[],ot=0;ot<I;ot++){gt[ot]=[];for(var tt=0;tt<I;tt++)gt[ot][tt]=0,ot==tt&&(gt[ot][tt]=$[ot]/($[ot]*$[ot]+at/($[ot]*$[ot])))}n=a.multMat(a.multMat(Z,gt),a.transpose(K))},U=function(){for(var b=void 0,$=void 0,K=[],Z=[],at=[],gt=[],ot=0;ot<m;ot++)K[ot]=Math.random(),Z[ot]=Math.random();K=a.normalize(K),Z=a.normalize(Z);for(var tt=E,j=E,vt=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=a.multGamma(a.multL(a.multGamma(at),D,n)),b=a.dotProduct(at,K),K=a.normalize(K),tt=a.dotProduct(at,K),vt=Math.abs(tt/j),vt<=1+p&&vt>=1)break;j=tt}for(var yt=0;yt<m;yt++)at[yt]=K[yt];for(j=E;;){for(var Rt=0;Rt<m;Rt++)gt[Rt]=Z[Rt];if(gt=a.minusOp(gt,a.multCons(at,a.dotProduct(at,gt))),Z=a.multGamma(a.multL(a.multGamma(gt),D,n)),$=a.dotProduct(gt,Z),Z=a.normalize(Z),tt=a.dotProduct(gt,Z),vt=Math.abs(tt/j),vt<=1+p&&vt>=1)break;j=tt}for(var ft=0;ft<m;ft++)gt[ft]=Z[ft];P=a.multCons(at,Math.sqrt(Math.abs(b))),J=a.multCons(gt,Math.sqrt(Math.abs($)))};f.connectComponents(c,l,f.getTopMostNodes(T),v),u.forEach(function(S){f.connectComponents(c,l,f.getTopMostNodes(S.descendants().intersection(l)),v)});for(var et=0,z=0;z<T.length;z++)T[z].isParent()||L.set(T[z].id(),et++);var O=!0,X=!1,B=void 0;try{for(var _=v.keys()[Symbol.iterator](),lt;!(O=(lt=_.next()).done);O=!0){var q=lt.value;L.set(q,et++)}}catch(S){X=!0,B=S}finally{try{!O&&_.return&&_.return()}finally{if(X)throw B}}for(var It=0;It<L.size;It++)A[It]=[];u.forEach(function(S){for(var b=S.children().intersection(l);b.nodes(":childless").length==0;)b=b.nodes()[0].children().intersection(l);var $=0,K=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,$=at)}),F.set(S.id(),b.nodes(":childless")[$].id())}),T.forEach(function(S){var b=void 0;S.isParent()?b=L.get(F.get(S.id())):b=L.get(S.id()),S.neighborhood().nodes().forEach(function($){l.intersection(S.edgesWith($)).length>0&&($.isParent()?A[b].push(F.get($.id())):A[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;v.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,A[$].push(K),A[L.get(K)].push(b)})},dt=!0,it=!1,ut=void 0;try{for(var Tt=v.keys()[Symbol.iterator](),Ct;!(dt=(Ct=Tt.next()).done);dt=!0){var Dt=Ct.value;Lt(Dt)}}catch(S){it=!0,ut=S}finally{try{!dt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){I=m<o.sampleSize?m:o.sampleSize;for(var xt=0;xt<m;xt++)D[xt]=[];for(var St=0;St<I;St++)n[St]=[];return o.quality=="draft"||o.step=="all"?(k(R),W(),U(),mt={nodeIndexes:L,xCoords:P,yCoords:J}):(L.forEach(function(S,b){P.push(c.getElementById(b).position("x")),J.push(c.getElementById(b).position("y"))}),mt={nodeIndexes:L,xCoords:P,yCoords:J}),mt}else{var Vt=L.keys(),Xt=c.getElementById(Vt.next().value),Ut=Xt.position(),bt=Xt.outerWidth();if(P.push(Ut.x),J.push(Ut.y),m==2){var Ht=c.getElementById(Vt.next().value),Bt=Ht.outerWidth();P.push(Ut.x+bt/2+Bt/2+o.idealEdgeLength),J.push(Ut.y)}return mt={nodeIndexes:L,xCoords:P,yCoords:J},mt}};i.exports={spectralLayout:t}},579:(i,r,e)=>{var f=e(212),a=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&a(cytoscape),i.exports=a},140:i=>{i.exports=C}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(579);return s})()})})(be);var gr=be.exports;const ur=ke(gr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Re={L:nt(M=>`${M},${M/2} 0,${M} 0,0`,"L"),R:nt(M=>`0,${M/2} ${M},0 ${M},${M}`,"R"),T:nt(M=>`0,0 ${M},0 ${M/2},${M}`,"T"),B:nt(M=>`${M/2},0 ${M},${M} 0,${M}`,"B")},he={L:nt((M,Y)=>M-Y+2,"L"),R:nt((M,Y)=>M-2,"R"),T:nt((M,Y)=>M-Y+2,"T"),B:nt((M,Y)=>M-2,"B")},vr=nt(function(M){return zt(M)?M==="L"?"R":"L":M==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=nt(function(M){const Y=M;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=nt(function(M){const Y=M;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=nt(function(M){const Y=M;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=nt(function(M,Y){const C=zt(M)&&Qt(Y),G=Qt(M)&&zt(Y);return C||G},"isArchitectureDirectionXY"),dr=nt(function(M){const Y=M[0],C=M[1],G=zt(Y)&&Qt(C),N=Qt(Y)&&zt(C);return G||N},"isArchitecturePairXY"),pr=nt(function(M){return M!=="LL"&&M!=="RR"&&M!=="TT"&&M!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(M,Y){const C=`${M}${Y}`;return pr(C)?C:void 0},"getArchitectureDirectionPair"),yr=nt(function([M,Y],C){const G=C[0],N=C[1];return zt(G)?Qt(N)?[M+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[M+(G==="L"?-1:1),Y]:zt(N)?[M+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[M,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=nt(function(M){return M==="LT"||M==="TL"?[1,1]:M==="BL"||M==="LB"?[1,-1]:M==="BR"||M==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=nt(function(M){return M.type==="service"},"isArchitectureService"),Tr=nt(function(M){return M.type==="junction"},"isArchitectureJunction"),Ge=nt(M=>M.data(),"edgeData"),ne=nt(M=>M.data(),"nodeData"),Ue=qe.architecture,pt=new hr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=nt(()=>{pt.reset(),ar()},"clear"),Lr=nt(function({id:M,icon:Y,in:C,title:G,iconText:N}){if(pt.records.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${pt.records.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The service [${M}] cannot be placed within itself`);if(pt.records.registeredIds[C]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[C]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}pt.records.registeredIds[M]="node",pt.records.nodes[M]={id:M,type:"service",icon:Y,iconText:N,title:G,edges:[],in:C}},"addService"),Mr=nt(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Ar=nt(function({id:M,in:Y}){pt.records.registeredIds[M]="node",pt.records.nodes[M]={id:M,type:"junction",edges:[],in:Y}},"addJunction"),Cr=nt(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Or=nt(M=>pt.records.nodes[M],"getNode"),Dr=nt(function({id:M,icon:Y,in:C,title:G}){if(pt.records.registeredIds[M]!==void 0)throw new Error(`The group id [${M}] is already in use by another ${pt.records.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The group [${M}] cannot be placed within itself`);if(pt.records.registeredIds[C]===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[C]==="node")throw new Error(`The group [${M}]'s parent is not a group`)}pt.records.registeredIds[M]="group",pt.records.groups[M]={id:M,icon:Y,title:G,in:C}},"addGroup"),xr=nt(()=>Object.values(pt.records.groups),"getGroups"),Rr=nt(function({lhsId:M,rhsId:Y,lhsDir:C,rhsDir:G,lhsInto:N,rhsInto:g,lhsGroup:s,rhsGroup:i,title:r}){if(!Ie(C))throw new Error(`Invalid direction given for left hand side of edge ${M}--${Y}. Expected (L,R,T,B) got ${C}`);if(!Ie(G))throw new Error(`Invalid direction given for right hand side of edge ${M}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[M]===void 0&&pt.records.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[M]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[M].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:M,lhsDir:C,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:g,rhsGroup:i,title:r};pt.records.edges.push(a),pt.records.nodes[M]&&pt.records.nodes[Y]&&(pt.records.nodes[M].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Ir=nt(()=>pt.records.edges,"getEdges"),Sr=nt(()=>{if(pt.records.dataStructures===void 0){const M=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const a=me(f.lhsDir,f.rhsDir);a&&(e[a]=f.rhsId)}else{const a=me(f.rhsDir,f.lhsDir);a&&(e[a]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(M)[0],C={[Y]:1},G=Object.keys(M).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=nt(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){C[e]=1,delete G[e];const f=M[e],[a,y]=i[e];Object.entries(f).forEach(([t,h])=>{C[h]||(i[h]=yr([a,y],t),r.push(h))})}}return i},"BFS"),g=[N(Y)];for(;Object.keys(G).length>0;)g.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:M,spatialMaps:g}}return pt.records.dataStructures},"getDataStructures"),Fr=nt((M,Y)=>{pt.records.elements[M]=Y},"setElementForId"),br=nt(M=>pt.records.elements[M],"getElementById"),le={clear:Nr,setDiagramTitle:Ke,getDiagramTitle:je,setAccTitle:_e,getAccTitle:tr,setAccDescription:er,getAccDescription:rr,addService:Lr,getServices:Mr,addJunction:Ar,getJunctions:Cr,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Rr,getEdges:Ir,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(M){const Y=fe().architecture;return Y!=null&&Y[M]?Y[M]:Ue[M]}nt(Pt,"getConfigField");var Pr=nt((M,Y)=>{sr(M,Y),M.groups.map(Y.addGroup),M.services.map(C=>Y.addService({...C,type:"service"})),M.junctions.map(C=>Y.addJunction({...C,type:"junction"})),M.edges.map(Y.addEdge)},"populateDb"),Gr={parse:nt(async M=>{const Y=await lr("architecture",M);Se.debug(Y),Pr(Y,le)},"parse")},Ur=nt(M=>`
2
- .edge {
3
- stroke-width: ${M.archEdgeWidth};
4
- stroke: ${M.archEdgeColor};
5
- fill: none;
6
- }
7
-
8
- .arrow {
9
- fill: ${M.archEdgeArrowColor};
10
- }
11
-
12
- .node-bkg {
13
- fill: none;
14
- stroke: ${M.archGroupBorderColor};
15
- stroke-width: ${M.archGroupBorderWidth};
16
- stroke-dasharray: 8;
17
- }
18
- .node-icon-text {
19
- display: flex;
20
- align-items: center;
21
- }
22
-
23
- .node-icon-text > div {
24
- color: #fff;
25
- margin: 1px;
26
- height: fit-content;
27
- text-align: center;
28
- overflow: hidden;
29
- display: -webkit-box;
30
- -webkit-box-orient: vertical;
31
- }
32
- `,"getStyles"),Yr=Ur,ae=nt(M=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${M}</g>`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ae('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:ae('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:ae('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:ae('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:ae('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Je,blank:{body:ae("")}}},Xr=nt(async function(M,Y){const C=Pt("padding"),G=Pt("iconSize"),N=G/2,g=G/6,s=g/2;await Promise.all(Y.edges().map(async i=>{var P,J;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:a,target:y,targetDir:t,targetArrow:h,targetGroup:o,label:c}=Ge(i);let{x:l,y:T}=i[0].sourceEndpoint();const{x:u,y:v}=i[0].midpoint();let{x:L,y:F}=i[0].targetEndpoint();const A=C+4;if(a&&(zt(e)?l+=e==="L"?-A:A:T+=e==="T"?-A:A+18),o&&(zt(t)?L+=t==="L"?-A:A:F+=t==="T"?-A:A+18),!a&&((P=le.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?l+=e==="L"?N:-N:T+=e==="T"?N:-N),!o&&((J=le.getNode(y))==null?void 0:J.type)==="junction"&&(zt(t)?L+=t==="L"?N:-N:F+=t==="T"?N:-N),i[0]._private.rscratch){const V=M.insert("g");if(V.insert("path").attr("d",`M ${l},${T} L ${u},${v} L${L},${F} `).attr("class","edge"),f){const Q=zt(e)?he[e](l,g):l-s,D=Qt(e)?he[e](T,g):T-s;V.insert("polygon").attr("points",Re[e](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(h){const Q=zt(t)?he[t](L,g):L-s,D=Qt(t)?he[t](F,g):F-s;V.insert("polygon").attr("points",Re[t](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(c){const Q=Pe(e,t)?"XY":zt(e)?"X":"Y";let D=0;Q==="X"?D=Math.abs(l-L):Q==="Y"?D=Math.abs(T-F)/1.5:D=Math.abs(l-L)/2;const rt=V.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},fe()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Q==="X")rt.attr("transform","translate("+u+", "+v+")");else if(Q==="Y")rt.attr("transform","translate("+u+", "+v+") rotate(-90)");else if(Q==="XY"){const n=me(e,t);if(n&&dr(n)){const m=rt.node().getBoundingClientRect(),[d,E]=Er(n);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*d*E*45})`);const p=rt.node().getBoundingClientRect();rt.attr("transform",`
33
- translate(${u}, ${v-m.height/2})
34
- translate(${d*p.width/2}, ${E*p.height/2})
35
- rotate(${-1*d*E*45}, 0, ${m.height/2})
36
- `)}}}}}))},"drawEdges"),Hr=nt(async function(M,Y){const G=Pt("padding")*.75,N=Pt("fontSize"),s=Pt("iconSize")/2;await Promise.all(Y.nodes().map(async i=>{const r=ne(i);if(r.type==="group"){const{h:e,w:f,x1:a,y1:y}=i.boundingBox();M.append("rect").attr("x",a+s).attr("y",y+s).attr("width",f).attr("height",e).attr("class","node-bkg");const t=M.append("g");let h=a,o=y;if(r.icon){const c=t.append("g");c.html(`<g>${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}</g>`),c.attr("transform","translate("+(h+s+1)+", "+(o+s+1)+")"),h+=G,o+=N/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},fe()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(h+s+4)+", "+(o+s+2)+")")}}}))},"drawGroups"),Wr=nt(async function(M,Y,C){for(const G of C){const N=Y.append("g"),g=Pt("iconSize");if(G.title){const e=N.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:g*1.5,classes:"architecture-service-label"},fe()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+g/2+", "+g+")")}const s=N.append("g");if(G.icon)s.html(`<g>${await Ee(G.icon,{height:g,width:g,fallbackPrefix:oe.prefix})}</g>`);else if(G.iconText){s.html(`<g>${await Ee("blank",{height:g,width:g,fallbackPrefix:oe.prefix})}</g>`);const a=s.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html(G.iconText),y=parseInt(window.getComputedStyle(a.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;a.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/y)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);N.attr("class","architecture-service");const{width:i,height:r}=N._groups[0][0].getBBox();G.width=i,G.height=r,M.setElementForId(G.id,N)}return 0},"drawServices"),Vr=nt(function(M,Y,C){C.forEach(G=>{const N=Y.append("g"),g=Pt("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",g).attr("height",g),N.attr("class","architecture-junction");const{width:i,height:r}=N._groups[0][0].getBBox();N.width=i,N.height=r,M.setElementForId(G.id,N)})},"drawJunctions");Qe([{name:oe.prefix,icons:oe}]);Fe.use(ur);function Ye(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"service",id:C.id,icon:C.icon,label:C.title,parent:C.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}nt(Ye,"addServices");function Xe(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"junction",id:C.id,parent:C.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}nt(Xe,"addJunctions");function He(M,Y){Y.nodes().map(C=>{const G=ne(C);if(G.type==="group")return;G.x=C.position().x,G.y=C.position().y,M.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}nt(He,"positionNodes");function We(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}nt(We,"addGroups");function Ve(M,Y){M.forEach(C=>{const{lhsId:G,rhsId:N,lhsInto:g,lhsGroup:s,rhsInto:i,lhsDir:r,rhsDir:e,rhsGroup:f,title:a}=C,y=Pe(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:a,source:G,sourceDir:r,sourceArrow:g,sourceGroup:s,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:i,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};Y.add({group:"edges",data:t,classes:y})})}nt(Ve,"addEdges");function ze(M){const Y=M.map(N=>{const g={},s={};return Object.entries(N).forEach(([i,[r,e]])=>{g[e]||(g[e]=[]),s[r]||(s[r]=[]),g[e].push(i),s[r].push(i)}),{horiz:Object.values(g).filter(i=>i.length>1),vert:Object.values(s).filter(i=>i.length>1)}}),[C,G]=Y.reduce(([N,g],{horiz:s,vert:i})=>[[...N,...s],[...g,...i]],[[],[]]);return{horizontal:C,vertical:G}}nt(ze,"getAlignments");function Be(M){const Y=[],C=nt(N=>`${N[0]},${N[1]}`,"posToStr"),G=nt(N=>N.split(",").map(g=>parseInt(g)),"strToPos");return M.forEach(N=>{const g=Object.fromEntries(Object.entries(N).map(([e,f])=>[C(f),e])),s=[C([0,0])],i={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const e=s.shift();if(e){i[e]=1;const f=g[e];if(f){const a=G(e);Object.entries(r).forEach(([y,t])=>{const h=C([a[0]+t[0],a[1]+t[1]]),o=g[h];o&&!i[h]&&(s.push(h),Y.push({[xe[y]]:o,[xe[vr(y)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),Y}nt(Be,"getRelativeConstraints");function $e(M,Y,C,G,{spatialMaps:N}){return new Promise(g=>{const s=ir("body").append("div").attr("id","cy").attr("style","display:none"),i=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});s.remove(),We(C,i),Ye(M,i),Xe(Y,i),Ve(G,i);const r=ze(N),e=Be(N),f=i.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?.45:.001},alignmentConstraint:r,relativePlacementConstraint:e});f.one("layoutstop",()=>{var y;function a(t,h,o,c){let l,T;const{x:u,y:v}=t,{x:L,y:F}=h;T=(c-v+(u-o)*(v-F)/(u-L))/Math.sqrt(1+Math.pow((v-F)/(u-L),2)),l=Math.sqrt(Math.pow(c-v,2)+Math.pow(o-u,2)-Math.pow(T,2));const A=Math.sqrt(Math.pow(L-u,2)+Math.pow(F-v,2));l=l/A;let P=(L-u)*(c-v)-(F-v)*(o-u);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}let J=(L-u)*(o-u)+(F-v)*(c-v);switch(!0){case J>=0:J=1;break;case J<0:J=-1;break}return T=Math.abs(T)*P,l=l*J,{distances:T,weights:l}}nt(a,"getSegmentWeights"),i.startBatch();for(const t of Object.values(i.edges()))if((y=t.data)!=null&&y.call(t)){const{x:h,y:o}=t.source().position(),{x:c,y:l}=t.target().position();if(h!==c&&o!==l){const T=t.sourceEndpoint(),u=t.targetEndpoint(),{sourceDir:v}=Ge(t),[L,F]=Qt(v)?[T.x,u.y]:[u.x,T.y],{weights:A,distances:P}=a(T,u,L,F);t.style("segment-distances",P),t.style("segment-weights",A)}}i.endBatch(),f.run()}),f.run(),i.ready(a=>{Se.info("Ready",a),g(i)})})}nt($e,"layoutArchitecture");var zr=nt(async(M,Y,C,G)=>{const N=G.db,g=N.getServices(),s=N.getJunctions(),i=N.getGroups(),r=N.getEdges(),e=N.getDataStructures(),f=nr(Y),a=f.append("g");a.attr("class","architecture-edges");const y=f.append("g");y.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Wr(N,y,g),Vr(N,y,s);const h=await $e(g,s,i,r,e);await Xr(a,h),await Hr(t,h),He(N,h),or(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),Br={draw:zr},jr={parser:Gr,db:le,renderer:Br,styles:Yr};export{jr as diagram};
@@ -1,10 +0,0 @@
1
- import{d as Se,g as De}from"./chunk-ASOPGD6M-Baxn6fVh.js";import{_ as g,a as Pe,s as Be,g as Ie,b as Me,c as Le,d as Bt,w as Ne,e as $t,f as de,h as Tt,i as ge,j as jt,l as fe,k as Ye,m as je}from"./index-8UlDWK5q.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
2
- `+D.showPosition()+`
3
- Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
5
- `+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;h<R.length;h++)if(v=this._input.match(this.rules[R[h]]),v&&(!m||v[0].length>m[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,a,r,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]={text:y}}else u.descr={text:a};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]=y}else u.tags=n;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.link=i;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,a,r){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.tags=a;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.link=r;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,a,r,n,i,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.shadowing=a;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.techn=i;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,a,r){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(a);if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const a=Object.values(t)[0];o=parseInt(a)}else o=parseInt(t);if(typeof s=="object"){const a=Object.values(s)[0];l=parseInt(a)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),a0=g(function(){return B},"getCurrentBoundaryParse"),i0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),n0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ie},"getTitle"),c0=g(function(e){ne=e},"setWrap"),mt=g(function(){return ne},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ie=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Be,getAccTitle:Ie,getAccDescription:Me,setAccDescription:Le,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return Se(e,t)},"drawRect"),me=g(function(e,t,s,o,l,a){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let n=a.startsWith("data:image/png;base64")?a:je(a);r.attr("xlink:href",n)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",n=a.lineColor?a.lineColor:"#444444",i=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",a.startPoint.x),y.attr("y1",a.startPoint.y),y.attr("x2",a.endPoint.x),y.attr("y2",a.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",n),y.style("fill","none"),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",n).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(a.label.text,o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:r},f),a.techn&&a.techn.text!==""&&(f=s.messageFont(),Q(s)("["+a.techn.text+"]",o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};re(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=De();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},re(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=a,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,a,r,n,i,u,d){const f=a.append("text").attr("x",r+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,a,r,n,i,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P<S.length;P++){const M=P*y-y*(S.length-1)/2,U=a.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",y).style("font-weight",O).style("font-family",E);U.append("tspan").attr("dy",M).text(S[P]).attr("alignment-baseline","mathematical"),o(U,d)}}g(t,"byTspan");function s(l,a,r,n,i,u,d,f){const y=a.append("switch"),O=y.append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");O.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(l),t(l,y,r,n,i,u,d,f),o(O,d)}g(s,"byFo");function o(l,a){for(const r in a)a.hasOwnProperty(r)&&l.attr(r,a[r])}return g(o,"_setTextAttrs"),function(l){return l.textPlacement==="fo"?s:l.textPlacement==="old"?e:t}}(),z={drawRect:re,drawBoundary:g0,drawC4Shape:b0,drawRels:y0,drawImage:me,insertArrowHead:v0,insertArrowEnd:E0,insertArrowFilledHead:k0,insertDynamicNumber:A0,insertArrowCrossHead:C0,insertDatabaseIcon:_0,insertComputerIcon:x0,insertClockIcon:m0},Xt=0,Wt=0,ve=4,ee=2;Ft.yy=te;var _={},Ot,Ee=(Ot=class{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,ae(t.db.getConfig())}setData(t,s,o,l){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=s,this.nextData.starty=this.data.starty=o,this.nextData.stopy=this.data.stopy=l}updateVal(t,s,o,l){t[s]===void 0?t[s]=o:t[s]=l(o,t[s])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let s=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,o=s+t.width,l=this.nextData.starty+t.margin*2,a=l+t.height;(s>=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ae=g(function(e){Pe(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=Ne(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=de(t[e].text,o);else{let a=t[e].text.split($t.lineBreakRegex);t[e].textLines=a.length;let r=0;t[e].height=0,t[e].width=0;for(const n of a)t[e].width=Math.max(Tt(n,o),t[e].width),r=de(n,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let a=Tt(t.label.text,l);j("label",t,o,l,a),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const a of o){l=0;const r=s[a];let n=Pt(_,r.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",n),r.typeC4Shape.height=n.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let i=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,i,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,i,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,i,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,i,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,a=t.y,r=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-a),d=u/i,f=e.height/e.width,y=null;return o==a&&s<l?y=new Y(s+e.width,n):o==a&&s>l?y=new Y(s,n):s==l&&o<a?y=new Y(r,o+e.height):s==l&&o>a&&(y=new Y(r,o)),s>l&&o<a?f>=d?y=new Y(s,n+d*e.width/2):y=new Y(r-i/u*e.height/2,o+e.height):s<l&&o<a?f>=d?y=new Y(s+e.width,n+d*e.width/2):y=new Y(r+i/u*e.height/2,o+e.height):s<l&&o>a?f>=d?y=new Y(s+e.width,n-d*e.width/2):y=new Y(r+e.height/2*i/u,o):s>l&&o>a&&(f>=d?y=new Y(s,n-e.width/2*d):y=new Y(r-e.height/2*i/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let a of t){l=l+1;let r=a.wrap&&_.wrap,n=T0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=l+": "+a.label.text);let u=Tt(a.label.text,n);j("label",a,r,n,u),a.techn&&a.techn.text!==""&&(u=Tt(a.techn.text,n),j("techn",a,r,n,u)),a.descr&&a.descr.text!==""&&(u=Tt(a.descr.text,n),j("descr",a,r,n,u));let d=s(a.from),f=s(a.to),y=O0(d,f);a.startPoint=y.startPoint,a.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let a=new Ee(l);a.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,a.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,a.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,a.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;a.setData(O,O,S,S)}else{let O=a.data.stopx!==a.data.startx?a.data.stopx+_.diagramMarginX:a.data.startx,S=a.data.starty;a.setData(O,O,S,S)}a.name=n.alias;let f=l.db.getC4ShapeArray(n.alias),y=l.db.getC4ShapeKeys(n.alias);y.length>0&&Ae(a,e,f,y),t=n.alias;let E=l.db.getBoundarys(t);E.length>0&&se(e,t,a,E,l),n.alias!=="global"&&ke(e,n,a),s.data.stopy=Math.max(a.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(a.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let a;l==="sandbox"&&(a=jt("#i"+t));const r=l==="sandbox"?jt(a.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),fe.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i),z.insertDatabaseIcon(i),z.insertClockIcon(i);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundarys("");se(i,"",u,f,o),z.insertArrowHead(i),z.insertArrowEnd(i),z.insertArrowCrossHead(i),z.insertArrowFilledHead(i),R0(i,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Ye(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),fe.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ae,draw:S0},D0=g(e=>`.person {
7
- stroke: ${e.personBorder};
8
- fill: ${e.personBkg};
9
- }
10
- `,"getStyles"),P0=D0,M0={parser:Ue,db:te,renderer:ye,styles:P0,init:g(({c4:e,wrap:t})=>{ye.setConf(e),te.setWrap(t)},"init")};export{M0 as diagram};
@@ -1 +0,0 @@
1
- import{ap as o,aq as n}from"./index-8UlDWK5q.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};