@logan-jun/cd1-rag-chat 0.3.1 → 0.4.0

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 (58) hide show
  1. package/dist/assets/arc-scm8MMJs.js +1 -0
  2. package/dist/assets/architectureDiagram-3BPJPVTR-B4HnSePg.js +36 -0
  3. package/dist/assets/blockDiagram-GPEHLZMM-Br570MCp.js +132 -0
  4. package/dist/assets/c4Diagram-AAUBKEIU-DkTSnj0d.js +10 -0
  5. package/dist/assets/channel-DiZdOJ9B.js +1 -0
  6. package/dist/assets/chunk-2J33WTMH-CrTr9xzl.js +1 -0
  7. package/dist/assets/chunk-4BX2VUAB-D0wgG8xH.js +1 -0
  8. package/dist/assets/chunk-55IACEB6-Duov_Htw.js +1 -0
  9. package/dist/assets/chunk-727SXJPM-DDvX-nhe.js +206 -0
  10. package/dist/assets/chunk-AQP2D5EJ-09XyW5jk.js +231 -0
  11. package/dist/assets/chunk-FMBD7UC4-C8_DpYrt.js +15 -0
  12. package/dist/assets/chunk-ND2GUHAM-BeN_xln2.js +1 -0
  13. package/dist/assets/chunk-QZHKN3VN-vOMf7cyc.js +1 -0
  14. package/dist/assets/classDiagram-4FO5ZUOK-DDDJcc4H.js +1 -0
  15. package/dist/assets/classDiagram-v2-Q7XG4LA2-DDDJcc4H.js +1 -0
  16. package/dist/assets/cose-bilkent-S5V4N54A-pK2cAyHP.js +1 -0
  17. package/dist/assets/cytoscape.esm-C6a136cz.js +331 -0
  18. package/dist/assets/dagre-BM42HDAG-kL6GF6jg.js +4 -0
  19. package/dist/assets/defaultLocale-CrowFXzY.js +1 -0
  20. package/dist/assets/diagram-2AECGRRQ-dykDFI_K.js +43 -0
  21. package/dist/assets/diagram-5GNKFQAL-WJvXRiuM.js +10 -0
  22. package/dist/assets/diagram-KO2AKTUF-D2favLYT.js +3 -0
  23. package/dist/assets/diagram-LMA3HP47-CXVuETL_.js +24 -0
  24. package/dist/assets/diagram-OG6HWLK6-BcJzKfoj.js +24 -0
  25. package/dist/assets/erDiagram-TEJ5UH35-thR4lGNd.js +85 -0
  26. package/dist/assets/flowDiagram-I6XJVG4X-BxfwGe_r.js +162 -0
  27. package/dist/assets/ganttDiagram-6RSMTGT7-fwLip5Nh.js +292 -0
  28. package/dist/assets/gitGraphDiagram-PVQCEYII-D-oFePm0.js +106 -0
  29. package/dist/assets/graph-BB0J4w4c.js +1 -0
  30. package/dist/assets/index-CbSmh0fl.js +86 -0
  31. package/dist/assets/index-DDQloFPo.css +1 -0
  32. package/dist/assets/infoDiagram-5YYISTIA-D4MiRb75.js +2 -0
  33. package/dist/assets/init-Gi6I4Gst.js +1 -0
  34. package/dist/assets/ishikawaDiagram-YF4QCWOH-BXo0XBC7.js +70 -0
  35. package/dist/assets/journeyDiagram-JHISSGLW-CqScJnKj.js +139 -0
  36. package/dist/assets/kanban-definition-UN3LZRKU-MV47OAPx.js +89 -0
  37. package/dist/assets/katex-DOa3rsiF.js +257 -0
  38. package/dist/assets/layout-X4aHIIHH.js +1 -0
  39. package/dist/assets/linear-DLYnUT7M.js +1 -0
  40. package/dist/assets/mermaid.core-DuagT3S2.js +307 -0
  41. package/dist/assets/mindmap-definition-RKZ34NQL-HJXV2iNz.js +96 -0
  42. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  43. package/dist/assets/pieDiagram-4H26LBE5-BVHq2F8U.js +30 -0
  44. package/dist/assets/quadrantDiagram-W4KKPZXB-BUPck4BP.js +7 -0
  45. package/dist/assets/requirementDiagram-4Y6WPE33-DQl89ON9.js +84 -0
  46. package/dist/assets/sankeyDiagram-5OEKKPKP-DD5N52ZQ.js +40 -0
  47. package/dist/assets/sequenceDiagram-3UESZ5HK-zctcDLCC.js +162 -0
  48. package/dist/assets/stateDiagram-AJRCARHV-Vyn0aDZv.js +1 -0
  49. package/dist/assets/stateDiagram-v2-BHNVJYJU-BY6pmmBt.js +1 -0
  50. package/dist/assets/timeline-definition-PNZ67QCA-1XNXDgjy.js +120 -0
  51. package/dist/assets/vennDiagram-CIIHVFJN-DZ1fF_Rg.js +34 -0
  52. package/dist/assets/wardley-L42UT6IY-DsEWk1n9.js +173 -0
  53. package/dist/assets/wardleyDiagram-YWT4CUSO-CpQIM9KB.js +78 -0
  54. package/dist/assets/xychartDiagram-2RQKCTM6-CIryoW2U.js +7 -0
  55. package/dist/index.html +2 -2
  56. package/package.json +18 -4
  57. package/dist/assets/index-BpgvSxpC.js +0 -89
  58. package/dist/assets/index-C4j9DEAI.css +0 -1
@@ -0,0 +1 @@
1
+ import{bm as ln,aP as an,I as z,b9 as w,G as J,ai as un,W as y,be as tn,ba as F,aJ as _,c as rn,m as o,aH as on,j as sn,d as fn}from"./mermaid.core-DuagT3S2.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function dn(l){return l&&l.padAngle}function pn(l,h,q,I,v,A,O,a){var D=q-l,i=I-h,n=O-v,m=a-A,u=m*D-n*i;if(!(u*u<y))return u=(n*(h-A)-m*(l-v))/u,[l+u*D,h+u*i]}function U(l,h,q,I,v,A,O){var a=l-q,D=h-I,i=(O?A:-A)/F(a*a+D*D),n=i*D,m=-i*a,u=l+n,s=h+m,f=q+n,c=I+m,S=(u+f)/2,t=(s+c)/2,d=f-u,g=c-s,R=d*d+g*g,T=v-A,P=u*c-f*s,E=(g<0?-1:1)*F(on(0,T*T*R-P*P)),G=(P*g-d*E)/R,H=(-P*d-g*E)/R,b=(P*g+d*E)/R,p=(-P*d+g*E)/R,x=G-S,e=H-t,r=b-S,W=p-t;return x*x+e*e>r*r+W*W&&(G=b,H=p),{cx:G,cy:H,x01:-n,y01:-m,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),I=null,v=gn,A=mn,O=dn,a=null,D=ln(i);function i(){var n,m,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,S=rn(c-f),t=c>f;if(a||(a=n=D()),s<u&&(m=s,s=u,u=m),!(s>y))a.moveTo(0,0);else if(S>tn-y)a.moveTo(s*z(f),s*w(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*z(c),u*w(c)),a.arc(0,0,u,c,f,t));else{var d=f,g=c,R=f,T=c,P=S,E=S,G=O.apply(this,arguments)/2,H=G>y&&(I?+I.apply(this,arguments):F(u*u+s*s)),b=_(rn(s-u)/2,+q.apply(this,arguments)),p=b,x=b,e,r;if(H>y){var W=sn(H/u*w(G)),K=sn(H/s*w(G));(P-=W*2)>y?(W*=t?1:-1,R+=W,T-=W):(P=0,R=T=(f+c)/2),(E-=K*2)>y?(K*=t?1:-1,d+=K,g-=K):(E=0,d=g=(f+c)/2)}var B=s*z(d),C=s*w(d),L=u*z(T),M=u*w(T);if(b>y){var N=s*z(g),Q=s*w(g),V=u*z(R),X=u*w(R),j;if(S<an)if(j=pn(B,C,V,X,N,Q,L,M)){var Y=B-j[0],Z=C-j[1],$=N-j[0],k=Q-j[1],nn=1/w(fn((Y*$+Z*k)/(F(Y*Y+Z*Z)*F($*$+k*k)))/2),en=F(j[0]*j[0]+j[1]*j[1]);p=_(b,(u-en)/(nn-1)),x=_(b,(s-en)/(nn+1))}else p=x=0}E>y?x>y?(e=U(V,X,B,C,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<b?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(B,C),a.arc(0,0,s,d,g,!t)):a.moveTo(B,C),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(B,C,V,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<b?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[z(m)*n,w(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:J(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:J(+n),i):A},i.padAngle=function(n){return arguments.length?(O=typeof n=="function"?n:J(+n),i):O},i.context=function(n){return arguments.length?(a=n==null?null:n,i):a},i}export{hn as d};
@@ -0,0 +1,36 @@
1
+ import{A as ye,a5 as Ze,b as dt,b0 as ke,b7 as qe,aE as Re,b2 as Qe,a2 as Je,b4 as Ke,a6 as je,a1 as _e,b1 as tr,t as er,s as rr,a3 as ir,T as ar,a4 as Ee,K as me,a9 as ve,aZ as nr,a$ as or,a7 as sr,aU as hr,bj as lr}from"./mermaid.core-DuagT3S2.js";import{p as fr}from"./chunk-4BX2VUAB-D0wgG8xH.js";import{p as cr}from"./wardley-L42UT6IY-DsEWk1n9.js";import{c as Se}from"./cytoscape.esm-C6a136cz.js";import"./index-CbSmh0fl.js";var Fe={exports:{}},ue={exports:{}},de={exports:{}},Me;function gr(){return Me||(Me=1,function(R,M){(function(b,L){R.exports=L()})(ye,function(){return function(C){var b={};function L(d){if(b[d])return b[d].exports;var h=b[d]={i:d,l:!1,exports:{}};return C[d].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=C,L.c=b,L.i=function(d){return d},L.d=function(d,h,n){L.o(d,h)||Object.defineProperty(d,h,{configurable:!1,enumerable:!0,get:n})},L.n=function(d){var h=d&&d.__esModule?function(){return d.default}:function(){return d};return L.d(h,"a",h),h},L.o=function(d,h){return Object.prototype.hasOwnProperty.call(d,h)},L.p="",L(L.s=28)}([function(C,b,L){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,C.exports=d},function(C,b,L){var d=L(2),h=L(8),n=L(9);function e(f,i,u){d.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=i}e.prototype=Object.create(d.prototype);for(var r in d)e[r]=d[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,i){for(var u=this.getOtherEnd(f),t=i.getGraphManager().getRoot();;){if(u.getOwner()==i)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=e},function(C,b,L){function d(h){this.vGraphObject=h}C.exports=d},function(C,b,L){var d=L(2),h=L(10),n=L(13),e=L(0),r=L(16),f=L(5);function i(t,s,o,c){o==null&&c==null&&(c=s),d.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}i.prototype=Object.create(d.prototype);for(var u in d)i[u]=d[u];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var t,s,o=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(c-o)+o;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;s=e.WORLD_CENTER_Y+r.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=i},function(C,b,L){var d=L(0);function h(){}for(var n in d)h[n]=d[n];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=h},function(C,b,L){function d(h,n){h==null&&n==null?(this.x=0,this.y=0):(this.x=h,this.y=n)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(h){this.x=h},d.prototype.setY=function(h){this.y=h},d.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},C.exports=d},function(C,b,L){var d=L(2),h=L(10),n=L(0),e=L(7),r=L(3),f=L(1),i=L(13),u=L(12),t=L(11);function s(c,l,T){d.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(d.prototype);for(var o in d)s[o]=d[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(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)}},s.prototype.remove=function(c){var l=c;if(c instanceof r){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(),g,v=T.length,N=0;N<v;N++)g=T[N],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var G=this.nodes.indexOf(l);if(G==-1)throw"Node not in owner node list!";this.nodes.splice(G,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var A=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(A>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(P,1);var G=g.source.owner.getEdges().indexOf(g);if(G==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(G,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,v,N=this.getNodes(),G=N.length,A=0;A<G;A++){var P=N[A];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?v=N[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,N,G,A,P,H,Y=this.nodes,J=Y.length,D=0;D<J;D++){var tt=Y[D];c&&tt.child!=null&&tt.updateBounds(),N=tt.getLeft(),G=tt.getRight(),A=tt.getTop(),P=tt.getBottom(),l>N&&(l=N),T<G&&(T=G),g>A&&(g=A),v<P&&(v=P)}var a=new i(l,g,T-l,v-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?H=Y[0].getParent().paddingLeft:H=this.margin,this.left=a.x-H,this.right=a.x+a.width+H,this.top=a.y-H,this.bottom=a.y+a.height+H},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,N,G,A,P,H=c.length,Y=0;Y<H;Y++){var J=c[Y];N=J.getLeft(),G=J.getRight(),A=J.getTop(),P=J.getBottom(),l>N&&(l=N),T<G&&(T=G),g>A&&(g=A),v<P&&(v=P)}var D=new i(l,g,T-l,v-g);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var v=l[g];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],v,N,G=g.withChildren();for(G.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){g=l.shift(),v=g.getEdges();for(var A=v.length,P=0;P<A;P++){var H=v[P];if(N=H.getOtherEndInGraph(g,this),N!=null&&!T.has(N)){var Y=N.withChildren();Y.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},C.exports=s},function(C,b,L){var d,h=L(1);function n(e){d=L(6),this.layout=e,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),f=this.add(e,r);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(e,r,f,i,u){if(f==null&&i==null&&u==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{u=f,i=r,f=e;var t=i.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,u);if(f.isInterGraph=!0,f.source=i,f.target=u,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}},n.prototype.remove=function(e){if(e instanceof d){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(r.getEdges());for(var i,u=f.length,t=0;t<u;t++)i=f[t],r.remove(i);var s=[];s=s.concat(r.getNodes());var o;u=s.length;for(var t=0;t<u;t++)o=s[t],r.remove(o);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(e instanceof h){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),f=r.length,i=0;i<f;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var f=0;f<r.length;f++)e=e.concat(r[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var f=e.getOwner(),i;do{if(i=f.getParent(),i==null)break;if(i==r)return!0;if(f=i.getOwner(),f==null)break}while(!0);f=r.getOwner();do{if(i=f.getParent(),i==null)break;if(i==e)return!0;if(f=i.getOwner(),f==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,r,f,i,u,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(e=t[o],r=e.source,f=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=f,r==f){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=f,u=f.getOwner();e.lca==null;){if(u==i){e.lca=u;break}if(u==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=u.getParent(),u=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var i=r.getOwner();do{if(i==null)break;if(i==f)return i;i=i.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},n.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var f,i=e.getNodes(),u=i.length,t=0;t<u;t++)f=i[t],f.inclusionTreeDepth=r,f.child!=null&&this.calcInclusionTreeDepths(f.child,r+1)},n.prototype.includesInvalidEdge=function(){for(var e,r=[],f=this.edges.length,i=0;i<f;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},C.exports=n},function(C,b,L){var d=L(12);function h(){}h.calcSeparationAmount=function(n,e,r,f){if(!n.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(n,e,i),r[0]=Math.min(n.getRight(),e.getRight())-Math.max(n.x,e.x),r[1]=Math.min(n.getBottom(),e.getBottom())-Math.max(n.y,e.y),n.getX()<=e.getX()&&n.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-n.getX(),n.getRight()-e.getRight()):e.getX()<=n.getX()&&e.getRight()>=n.getRight()&&(r[0]+=Math.min(n.getX()-e.getX(),e.getRight()-n.getRight())),n.getY()<=e.getY()&&n.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-n.getY(),n.getBottom()-e.getBottom()):e.getY()<=n.getY()&&e.getBottom()>=n.getBottom()&&(r[1]+=Math.min(n.getY()-e.getY(),e.getBottom()-n.getBottom()));var u=Math.abs((e.getCenterY()-n.getCenterY())/(e.getCenterX()-n.getCenterX()));e.getCenterY()===n.getCenterY()&&e.getCenterX()===n.getCenterX()&&(u=1);var t=u*r[0],s=r[1]/u;r[0]<s?s=r[0]:t=r[1],r[0]=-1*i[0]*(s/2+f),r[1]=-1*i[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(n,e,r){n.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,n.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},h.getIntersection2=function(n,e,r){var f=n.getCenterX(),i=n.getCenterY(),u=e.getCenterX(),t=e.getCenterY();if(n.intersects(e))return r[0]=f,r[1]=i,r[2]=u,r[3]=t,!0;var s=n.getX(),o=n.getY(),c=n.getRight(),l=n.getX(),T=n.getBottom(),g=n.getRight(),v=n.getWidthHalf(),N=n.getHeightHalf(),G=e.getX(),A=e.getY(),P=e.getRight(),H=e.getX(),Y=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),tt=e.getHeightHalf(),a=!1,m=!1;if(f===u){if(i>t)return r[0]=f,r[1]=o,r[2]=u,r[3]=Y,!1;if(i<t)return r[0]=f,r[1]=T,r[2]=u,r[3]=A,!1}else if(i===t){if(f>u)return r[0]=s,r[1]=i,r[2]=P,r[3]=t,!1;if(f<u)return r[0]=c,r[1]=i,r[2]=G,r[3]=t,!1}else{var p=n.height/n.width,E=e.height/e.width,y=(t-i)/(u-f),I=void 0,w=void 0,S=void 0,V=void 0,x=void 0,q=void 0;if(-p===y?f>u?(r[0]=l,r[1]=T,a=!0):(r[0]=c,r[1]=o,a=!0):p===y&&(f>u?(r[0]=s,r[1]=o,a=!0):(r[0]=g,r[1]=T,a=!0)),-E===y?u>f?(r[2]=H,r[3]=Y,m=!0):(r[2]=P,r[3]=A,m=!0):E===y&&(u>f?(r[2]=G,r[3]=A,m=!0):(r[2]=J,r[3]=Y,m=!0)),a&&m)return!1;if(f>u?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!a)switch(I){case 1:V=o,S=f+-N/y,r[0]=S,r[1]=V;break;case 2:S=g,V=i+v*y,r[0]=S,r[1]=V;break;case 3:V=T,S=f+N/y,r[0]=S,r[1]=V;break;case 4:S=l,V=i+-v*y,r[0]=S,r[1]=V;break}if(!m)switch(w){case 1:q=A,x=u+-tt/y,r[2]=x,r[3]=q;break;case 2:x=J,q=t+D*y,r[2]=x,r[3]=q;break;case 3:q=Y,x=u+tt/y,r[2]=x,r[3]=q;break;case 4:x=H,q=t+-D*y,r[2]=x,r[3]=q;break}}return!1},h.getCardinalDirection=function(n,e,r){return n>e?r:1+r%4},h.getIntersection=function(n,e,r,f){if(f==null)return this.getIntersection2(n,e,r);var i=n.x,u=n.y,t=e.x,s=e.y,o=r.x,c=r.y,l=f.x,T=f.y,g=void 0,v=void 0,N=void 0,G=void 0,A=void 0,P=void 0,H=void 0,Y=void 0,J=void 0;return N=s-u,A=i-t,H=t*u-i*s,G=T-c,P=o-l,Y=l*c-o*T,J=N*P-G*A,J===0?null:(g=(A*Y-P*H)/J,v=(G*H-N*Y)/J,new d(g,v))},h.angleOfVector=function(n,e,r,f){var i=void 0;return n!==r?(i=Math.atan((f-e)/(r-n)),r<n?i+=Math.PI:f<e&&(i+=this.TWO_PI)):f<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},h.doIntersect=function(n,e,r,f){var i=n.x,u=n.y,t=e.x,s=e.y,o=r.x,c=r.y,l=f.x,T=f.y,g=(t-i)*(T-c)-(l-o)*(s-u);if(g===0)return!1;var v=((T-c)*(l-i)+(o-l)*(T-u))/g,N=((u-s)*(l-i)+(t-i)*(T-u))/g;return 0<v&&v<1&&0<N&&N<1},h.findCircleLineIntersections=function(n,e,r,f,i,u,t){var s=(r-n)*(r-n)+(f-e)*(f-e),o=2*((n-i)*(r-n)+(e-u)*(f-e)),c=(n-i)*(n-i)+(e-u)*(e-u)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,C.exports=h},function(C,b,L){function d(){}d.sign=function(h){return h>0?1:h<0?-1:0},d.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},d.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},C.exports=d},function(C,b,L){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,C.exports=d},function(C,b,L){var d=function(){function i(u,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,t,s){return t&&i(u.prototype,t),s&&i(u,s),u}}();function h(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}var n=function(u){return{value:u,next:null,prev:null}},e=function(u,t,s,o){return u!==null?u.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=u,t.next=s,o.length++,t},r=function(u,t){var s=u.prev,o=u.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,u.prev=u.next=null,t.length--,u},f=function(){function i(u){var t=this;h(this,i),this.length=0,this.head=null,this.tail=null,u!=null&&u.forEach(function(s){return t.push(s)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return e(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return e(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return e(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return e(s,t,s.next,this)}},{key:"push",value:function(t){return e(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return e(null,n(t),this.head,this)}},{key:"remove",value:function(t){return r(t,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),i}();C.exports=f},function(C,b,L){function d(h,n,e){this.x=null,this.y=null,h==null&&n==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof n=="number"&&e==null?(this.x=h,this.y=n):h.constructor.name=="Point"&&n==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(h,n,e){h.constructor.name=="Point"&&n==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof n=="number"&&e==null&&(parseInt(h)==h&&parseInt(n)==n?this.move(h,n):(this.x=Math.floor(h+.5),this.y=Math.floor(n+.5)))},d.prototype.move=function(h,n){this.x=h,this.y=n},d.prototype.translate=function(h,n){this.x+=h,this.y+=n},d.prototype.equals=function(h){if(h.constructor.name=="Point"){var n=h;return this.x==n.x&&this.y==n.y}return this==h},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=d},function(C,b,L){function d(h,n,e,r){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&n!=null&&e!=null&&r!=null&&(this.x=h,this.y=n,this.width=e,this.height=r)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(h){this.x=h},d.prototype.getY=function(){return this.y},d.prototype.setY=function(h){this.y=h},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},C.exports=d},function(C,b,L){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function h(){}h.lastID=0,h.createID=function(n){return h.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=h.getString(),h.lastID++),n.uniqueID)},h.getString=function(n){return n==null&&(n=h.lastID),"Object#"+n},h.isPrimitive=function(n){var e=typeof n=="undefined"?"undefined":d(n);return n==null||e!="object"&&e!="function"},C.exports=h},function(C,b,L){function d(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 h=L(0),n=L(7),e=L(3),r=L(1),f=L(6),i=L(5),u=L(17),t=L(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new n(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new e(this.graphManager,o)},s.prototype.newEdge=function(o){return new r(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof e){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof r){var v=o;if(v.vGraphObject!=null){var N=v.vGraphObject;N.update(v)}}else if(o instanceof f){var G=o;if(G.vGraphObject!=null){var A=G.vGraphObject;A.update(G)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new i(0,0));else{var c=new u,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(),g,v=0;v<T.length;v++)g=T[v],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var v=new Set,N=[],G=new Map,A=[];for(A=A.concat(l);A.length>0&&c;){for(N.push(A[0]);N.length>0&&c;){var P=N[0];N.splice(0,1),v.add(P);for(var H=P.getEdges(),g=0;g<H.length;g++){var Y=H[g].getOtherEnd(P);if(G.get(P)!=Y)if(!v.has(Y))N.push(Y),G.set(Y,P);else{c=!1;break}}}if(!c)o=[];else{var J=[].concat(d(v));o.push(J);for(var g=0;g<J.length;g++){var D=J[g],tt=A.indexOf(D);tt>-1&&A.splice(tt,1)}v=new Set,G=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var N=this.newEdge(null);this.graphManager.add(N,l,v),c.add(v),l=v}var N=this.newEdge(null);return this.graphManager.add(N,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(d(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),g=0;g<T.length;g++){var v=T[g],N=new i(v.getCenterX(),v.getCenterY()),G=l.bendpoints.get(g);G.x=N.x,G.y=N.y,v.getOwner().remove(v)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var v=c/l;g-=(c-v)/50*(50-o)}else{var N=c*T;g+=(N-c)/50*(o-50)}return g}else{var G,A;return o<=50?(G=9*c/500,A=c/10):(G=9*c/50,A=-8*c),G*o+A}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,v=null;(c.length==1||c.length==2)&&(g=!0,v=c[0]);for(var N=0;N<c.length;N++){var G=c[N],A=G.getNeighborsList().size;T.set(G,G.getNeighborsList().size),A==1&&l.push(G)}var P=[];for(P=P.concat(l);!g;){var H=[];H=H.concat(P),P=[];for(var N=0;N<c.length;N++){var G=c[N],Y=c.indexOf(G);Y>=0&&c.splice(Y,1);var J=G.getNeighborsList();J.forEach(function(a){if(l.indexOf(a)<0){var m=T.get(a),p=m-1;p==1&&P.push(a),T.set(a,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},s.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=s},function(C,b,L){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},C.exports=d},function(C,b,L){var d=L(5);function h(n,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(n){this.lworldExtX=n},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(n){this.lworldExtY=n},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},h.prototype.transformX=function(n){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/r),e},h.prototype.transformY=function(n){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/r),e},h.prototype.inverseTransformX=function(n){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/r),e},h.prototype.inverseTransformY=function(n){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/r),e},h.prototype.inverseTransformPoint=function(n){var e=new d(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return e},C.exports=h},function(C,b,L){function d(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=L(15),n=L(4),e=L(0),r=L(8),f=L(9);function i(){h.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}i.prototype=Object.create(h.prototype);for(var u in h)i[u]=h[u];i.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,v=this.getGraphManager().getAllEdges(),N=0;N<v.length;N++)t=v[N],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,v,t,s),v.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},i.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},i.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,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-s),g=T*(t.lengthX/l),v=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=v,c.springForceX-=g,c.springForceY-=v)},i.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,v,N,G,A,P,H;if(o.intersects(c)){r.calcSeparationAmount(o,c,l,n.DEFAULT_EDGE_LENGTH/2),P=2*l[0],H=2*l[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*H,s.repulsionForceX+=Y*P,s.repulsionForceY+=Y*H}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),v=c.getCenterY()-o.getCenterY()):(r.getIntersection(o,c,T),g=T[2]-T[0],v=T[3]-T[1]),Math.abs(g)<n.MIN_REPULSION_DIST&&(g=f.sign(g)*n.MIN_REPULSION_DIST),Math.abs(v)<n.MIN_REPULSION_DIST&&(v=f.sign(v)*n.MIN_REPULSION_DIST),N=g*g+v*v,G=Math.sqrt(N),A=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/N,P=A*g/G,H=A*v/G,t.repulsionForceX-=P,t.repulsionForceY-=H,s.repulsionForceX+=P,s.repulsionForceY+=H},i.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,v,N;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(N=s.getEstimatedSize()*this.gravityRangeFactor,(g>N||v>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||v>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var v=c;v<=l;v++)for(var N=T;N<=g;N++)this.grid[v][N].push(t),t.setGridCoordinates(c,l,T,g)},i.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var N=t.startY-1;N<t.finishY+2;N++)if(!(v<0||N<0||v>=g.length||N>=g[0].length)){for(var G=0;G<g[v][N].length;G++)if(T=g[v][N][G],!(t.getOwner()!=T.getOwner()||t==T)&&!s.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(d(l))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},i.prototype.calcRepulsionRange=function(){return 0},C.exports=i},function(C,b,L){var d=L(1),h=L(4);function n(r,f,i){d.call(this,r,f,i),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(d.prototype);for(var e in d)n[e]=d[e];C.exports=n},function(C,b,L){var d=L(3),h=L(4);function n(r,f,i,u){d.call(this,r,f,i,u),this.nodeRepulsion=h.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=[]}n.prototype=Object.create(d.prototype);for(var e in d)n[e]=d[e];n.prototype.setGridCoordinates=function(r,f,i,u){this.startX=r,this.finishX=f,this.startY=i,this.finishY=u},C.exports=n},function(C,b,L){function d(h,n){this.width=0,this.height=0,h!==null&&n!==null&&(this.height=n,this.width=h)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},C.exports=d},function(C,b,L){var d=L(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(n,e){var r=d.createID(n);this.contains(r)||(this.map[r]=e,this.keys.push(n))},h.prototype.contains=function(n){return d.createID(n),this.map[n]!=null},h.prototype.get=function(n){var e=d.createID(n);return this.map[e]},h.prototype.keySet=function(){return this.keys},C.exports=h},function(C,b,L){var d=L(14);function h(){this.set={}}h.prototype.add=function(n){var e=d.createID(n);this.contains(e)||(this.set[e]=n)},h.prototype.remove=function(n){delete this.set[d.createID(n)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(n){return this.set[d.createID(n)]==n},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(n){for(var e=Object.keys(this.set),r=e.length,f=0;f<r;f++)n.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(n){for(var e=n.length,r=0;r<e;r++){var f=n[r];this.add(f)}},C.exports=h},function(C,b,L){function d(){}d.multMat=function(h,n){for(var e=[],r=0;r<h.length;r++){e[r]=[];for(var f=0;f<n[0].length;f++){e[r][f]=0;for(var i=0;i<h[0].length;i++)e[r][f]+=h[r][i]*n[i][f]}}return e},d.transpose=function(h){for(var n=[],e=0;e<h[0].length;e++){n[e]=[];for(var r=0;r<h.length;r++)n[e][r]=h[r][e]}return n},d.multCons=function(h,n){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]*n;return e},d.minusOp=function(h,n){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]-n[r];return e},d.dotProduct=function(h,n){for(var e=0,r=0;r<h.length;r++)e+=h[r]*n[r];return e},d.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},d.normalize=function(h){for(var n=[],e=this.mag(h),r=0;r<h.length;r++)n[r]=h[r]/e;return n},d.multGamma=function(h){for(var n=[],e=0,r=0;r<h.length;r++)e+=h[r];e*=-1/h.length;for(var f=0;f<h.length;f++)n[f]=e+h[f];return n},d.multL=function(h,n,e){for(var r=[],f=[],i=[],u=0;u<n[0].length;u++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][u]*h[s];f[u]=t}for(var o=0;o<e.length;o++){for(var c=0,l=0;l<e.length;l++)c+=e[o][l]*f[l];i[o]=c}for(var T=0;T<n.length;T++){for(var g=0,v=0;v<n[0].length;v++)g+=n[T][v]*i[v];r[T]=g}return r},C.exports=d},function(C,b,L){var d=function(){function r(f,i){for(var u=0;u<i.length;u++){var t=i[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,i,u){return i&&r(f.prototype,i),u&&r(f,u),f}}();function h(r,f){if(!(r instanceof f))throw new TypeError("Cannot call a class as a function")}var n=L(11),e=function(){function r(f,i){h(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;f instanceof n?u=f.size():u=f.length,this._quicksort(f,0,u-1)}return d(r,[{key:"_quicksort",value:function(i,u,t){if(u<t){var s=this._partition(i,u,t);this._quicksort(i,u,s),this._quicksort(i,s+1,t)}}},{key:"_partition",value:function(i,u,t){for(var s=this._get(i,u),o=u,c=t;;){for(;this.compareFunction(s,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,o),s);)o++;if(o<c)this._swap(i,o,c),o++,c--;else return c}}},{key:"_get",value:function(i,u){return i instanceof n?i.get_object_at(u):i[u]}},{key:"_set",value:function(i,u,t){i instanceof n?i.set_object_at(u,t):i[u]=t}},{key:"_swap",value:function(i,u,t){var s=this._get(i,u);this._set(i,u,this._get(i,t)),this._set(i,t,s)}},{key:"_defaultCompareFunction",value:function(i,u){return u>i}}]),r}();C.exports=e},function(C,b,L){function d(){}d.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var n=Math.min(this.m,this.n);this.s=function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct}(Math.min(this.m+1,this.n)),this.U=function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)}([this.m,n]),this.V=function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)}([this.n,this.n]);for(var e=function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct}(this.n),r=function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct}(this.m),f=!0,i=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,u);t++){if(t<i){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=d.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if(function(Tt,Ct){return Tt&&Ct}(t<i,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}e[c]=h[t][c]}if(function(Tt,Ct){return Ct}(f,t<i))for(var v=t;v<this.m;v++)this.U[v][t]=h[v][t];if(t<u){e[t]=0;for(var N=t+1;N<this.n;N++)e[t]=d.hypot(e[t],e[N]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var G=t+1;G<this.n;G++)e[G]/=e[t];e[t+1]+=1}if(e[t]=-e[t],function(Tt,Ct){return Tt&&Ct}(t+1<this.m,e[t]!==0)){for(var A=t+1;A<this.m;A++)r[A]=0;for(var P=t+1;P<this.n;P++)for(var H=t+1;H<this.m;H++)r[H]+=e[P]*h[H][P];for(var Y=t+1;Y<this.n;Y++)for(var J=-e[Y]/e[t+1],D=t+1;D<this.m;D++)h[D][Y]+=J*r[D]}for(var tt=t+1;tt<this.n;tt++)this.V[tt][t]=e[tt]}}var a=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=h[i][i]),this.m<a&&(this.s[a-1]=0),u+1<a&&(e[u]=h[u][a-1]),e[a-1]=0;{for(var m=i;m<n;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=i-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<n;y++){for(var I=0,w=E;w<this.m;w++)I+=this.U[w][E]*this.U[w][y];I=-I/this.U[E][E];for(var S=E;S<this.m;S++)this.U[S][y]+=I*this.U[S][E]}for(var V=E;V<this.m;V++)this.U[V][E]=-this.U[V][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var q=0;q<this.m;q++)this.U[q][E]=0;this.U[E][E]=1}}for(var z=this.n-1;z>=0;z--){if(function(Tt,Ct){return Tt&&Ct}(z<u,e[z]!==0))for(var X=z+1;X<n;X++){for(var rt=0,B=z+1;B<this.n;B++)rt+=this.V[B][z]*this.V[B][X];rt=-rt/this.V[z+1][z];for(var O=z+1;O<this.n;O++)this.V[O][X]+=rt*this.V[O][z]}for(var W=0;W<this.n;W++)this.V[W][z]=0;this.V[z][z]=1}for(var $=a-1,_=Math.pow(2,-52),ht=Math.pow(2,-966);a>0;){var Q=void 0,It=void 0;for(Q=a-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===a-2)It=4;else{var Nt=void 0;for(Nt=a-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==a?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===a-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var it=e[a-2];e[a-2]=0;for(var gt=a-2;gt>=Q;gt--){var mt=d.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==Q&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][a-1],this.V[Et][a-1]=-Ot*this.V[Et][gt]+At*this.V[Et][a-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<a;Rt++){var Ht=d.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a-1]),Math.abs(this.s[a-2])),Math.abs(e[a-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Vt=this.s[a-1]/Yt,F=this.s[a-2]/Yt,U=e[a-2]/Yt,Z=this.s[Q]/Yt,K=e[Q]/Yt,k=((F+Vt)*(F-Vt)+U*U)/2,at=Vt*U*(Vt*U),ct=0;(function(Tt,Ct){return Tt||Ct})(k!==0,at!==0)&&(ct=Math.sqrt(k*k+at),k<0&&(ct=-ct),ct=at/(k+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=Q;j<a-1;j++){var ut=d.hypot(nt,et),wt=nt/ut,pt=et/ut;j!==Q&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=d.hypot(nt,et),wt=nt/ut,pt=et/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],et=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[a-2]=nt}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var ot=0;ot<=$;ot++)this.V[ot][Q]=-this.V[ot][Q]}for(;Q<$&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][Q+1],this.V[ft][Q+1]=this.V[ft][Q],this.V[ft][Q]=Lt;if(Q<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][Q+1],this.U[st][Q+1]=this.U[st][Q],this.U[st][Q]=Lt;Q++}a--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},d.hypot=function(h,n){var e=void 0;return Math.abs(h)>Math.abs(n)?(e=n/h,e=Math.abs(h)*Math.sqrt(1+e*e)):n!=0?(e=h/n,e=Math.abs(n)*Math.sqrt(1+e*e)):e=0,e},C.exports=d},function(C,b,L){var d=function(){function e(r,f){for(var i=0;i<f.length;i++){var u=f[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}return function(r,f,i){return f&&e(r.prototype,f),i&&e(r,i),r}}();function h(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var n=function(){function e(r,f){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=r,this.sequence2=f,this.match_score=i,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[u-1]===this.sequence2[t-1]?s=this.grid[u-1][t-1]+this.match_score:s=this.grid[u-1][t-1]+this.mismatch_penalty;var o=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[u][t]=l[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var i=f[0],u=this.tracebackGrid[i.pos[0]][i.pos[1]];u[0]&&f.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),u[1]&&f.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),u[2]&&f.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,i){for(var u=[],t=-1;(t=f.indexOf(i,t+1))!==-1;)u.push(t);return u}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e}();C.exports=n},function(C,b,L){var d=function(){};d.FDLayout=L(18),d.FDLayoutConstants=L(4),d.FDLayoutEdge=L(19),d.FDLayoutNode=L(20),d.DimensionD=L(21),d.HashMap=L(22),d.HashSet=L(23),d.IGeometry=L(8),d.IMath=L(9),d.Integer=L(10),d.Point=L(12),d.PointD=L(5),d.RandomSeed=L(16),d.RectangleD=L(13),d.Transform=L(17),d.UniqueIDGeneretor=L(14),d.Quicksort=L(25),d.LinkedList=L(11),d.LGraphObject=L(2),d.LGraph=L(6),d.LEdge=L(1),d.LGraphManager=L(7),d.LNode=L(3),d.Layout=L(15),d.LayoutConstants=L(0),d.NeedlemanWunsch=L(27),d.Matrix=L(24),d.SVD=L(26),C.exports=d},function(C,b,L){function d(){this.listeners=[]}var h=d.prototype;h.addListener=function(n,e){this.listeners.push({event:n,callback:e})},h.removeListener=function(n,e){for(var r=this.listeners.length;r>=0;r--){var f=this.listeners[r];f.event===n&&f.callback===e&&this.listeners.splice(r,1)}},h.emit=function(n,e){for(var r=0;r<this.listeners.length;r++){var f=this.listeners[r];n===f.event&&f.callback(e)}},C.exports=d}])})}(de)),de.exports}var Oe;function ur(){return Oe||(Oe=1,function(R,M){(function(b,L){R.exports=L(gr())})(ye,function(C){return(()=>{var b={45:(n,e,r)=>{var f={};f.layoutBase=r(551),f.CoSEConstants=r(806),f.CoSEEdge=r(767),f.CoSEGraph=r(880),f.CoSEGraphManager=r(578),f.CoSELayout=r(765),f.CoSENode=r(991),f.ConstraintHandler=r(902),n.exports=f},806:(n,e,r)=>{var f=r(551).FDLayoutConstants;function i(){}for(var u in f)i[u]=f[u];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,n.exports=i},767:(n,e,r)=>{var f=r(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var u in f)i[u]=f[u];n.exports=i},880:(n,e,r)=>{var f=r(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var u in f)i[u]=f[u];n.exports=i},578:(n,e,r)=>{var f=r(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var u in f)i[u]=f[u];n.exports=i},765:(n,e,r)=>{var f=r(551).FDLayout,i=r(578),u=r(880),t=r(991),s=r(767),o=r(806),c=r(902),l=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,v=r(551).PointD,N=r(551).DimensionD,G=r(551).Layout,A=r(551).Integer,P=r(551).IGeometry,H=r(551).LGraph,Y=r(551).Transform,J=r(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var tt in f)D[tt]=f[tt];D.prototype.newGraphManager=function(){var a=new i(this);return this.graphManager=a,a},D.prototype.newGraph=function(a){return new u(null,this.graphManager,a)},D.prototype.newNode=function(a){return new t(this.graphManager,a)},D.prototype.newEdge=function(a){return new s(null,null,a)},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 a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%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 a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return a.has(y)});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 p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},p=0;p<a.length;p++){var E=a[p].rect,y=a[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var a=this.getAllNodes(),m,p=0;p<a.length;p++)m=a[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<a.length;p++)m=a[p],m.move()},D.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function O(W){for(var $=W.getChild().getNodes(),_,ht=0,Q=0;Q<$.length;Q++)_=$[Q],_.getChild()==null?a.fixedNodeSet.has(_.id)&&(ht+=100):ht+=O(_);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){a.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var I=y(E);I>0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,p=0;p<V.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),V[p].forEach(function(W){w.set(W,"dummy"+p),a.dummyToNodeForVerticalAlignment.get("dummy"+p).push(W),a.fixedNodeSet.has(W)&&a.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(W){S.set(W,"dummy"+p),a.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(W),a.fixedNodeSet.has(W)&&a.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var W,$,_;for(_=O.length-1;_>=2*O.length/3;_--)W=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[W],O[W]=$;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 W=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(W)||(a.nodesInRelativeHorizontal.push(W),a.nodeToRelativeConstraintMapHorizontal.set(W,[]),a.dummyToNodeForVerticalAlignment.has(W)?a.nodeToTempPositionMapHorizontal.set(W,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(W)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(W,a.idToNodeMap.get(W).getCenterX())),a.nodesInRelativeHorizontal.includes($)||(a.nodesInRelativeHorizontal.push($),a.nodeToRelativeConstraintMapHorizontal.set($,[]),a.dummyToNodeForVerticalAlignment.has($)?a.nodeToTempPositionMapHorizontal.set($,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set($,a.idToNodeMap.get($).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(W).push({right:$,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get($).push({left:W,gap:O.gap})}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(_)||(a.nodesInRelativeVertical.push(_),a.nodeToRelativeConstraintMapVertical.set(_,[]),a.dummyToNodeForHorizontalAlignment.has(_)?a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(_).getCenterY())),a.nodesInRelativeVertical.includes(ht)||(a.nodesInRelativeVertical.push(ht),a.nodeToRelativeConstraintMapVertical.set(ht,[]),a.dummyToNodeForHorizontalAlignment.has(ht)?a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(ht).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var W=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;q.has(W)?q.get(W).push($):q.set(W,[$]),q.has($)?q.get($).push(W):q.set($,[W])}else{var _=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(_)?z.get(_).push(ht):z.set(_,[ht]),z.has(ht)?z.get(ht).push(_):z.set(ht,[_])}});var X=function(W,$){var _=[],ht=[],Q=new J,It=new Set,Nt=0;return W.forEach(function(vt,it){if(!It.has(it)){_[Nt]=[],ht[Nt]=!1;var gt=it;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=W.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},rt=X(q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,a.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},D.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=a.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var I=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var S=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){S=0;break}S+=this.idToNodeMap.get(w[p][y]).displacementY}for(var V=S/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=V}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(B){if(!a.fixedNodesOnHorizontal.has(B)){var O=0;a.dummyToNodeForVerticalAlignment.has(B)?O=a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).displacementX:O=a.idToNodeMap.get(B).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(B).forEach(function(W){if(W.right){var $=a.nodeToTempPositionMapHorizontal.get(W.right)-a.nodeToTempPositionMapHorizontal.get(B)-O;$<W.gap&&(O-=W.gap-$)}else{var $=a.nodeToTempPositionMapHorizontal.get(B)-a.nodeToTempPositionMapHorizontal.get(W.left)+O;$<W.gap&&(O+=W.gap-$)}}),a.nodeToTempPositionMapHorizontal.set(B,a.nodeToTempPositionMapHorizontal.get(B)+O),a.dummyToNodeForVerticalAlignment.has(B)?a.dummyToNodeForVerticalAlignment.get(B).forEach(function(W){a.idToNodeMap.get(W).displacementX=O}):a.idToNodeMap.get(B).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(B){if(!a.fixedNodesOnHorizontal.has(B)){var O=0;a.dummyToNodeForHorizontalAlignment.has(B)?O=a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(B)[0]).displacementY:O=a.idToNodeMap.get(B).displacementY,a.nodeToRelativeConstraintMapVertical.get(B).forEach(function(W){if(W.bottom){var $=a.nodeToTempPositionMapVertical.get(W.bottom)-a.nodeToTempPositionMapVertical.get(B)-O;$<W.gap&&(O-=W.gap-$)}else{var $=a.nodeToTempPositionMapVertical.get(B)-a.nodeToTempPositionMapVertical.get(W.top)+O;$<W.gap&&(O+=W.gap-$)}}),a.nodeToTempPositionMapVertical.set(B,a.nodeToTempPositionMapVertical.get(B)+O),a.dummyToNodeForHorizontalAlignment.has(B)?a.dummyToNodeForHorizontalAlignment.get(B).forEach(function(W){a.idToNodeMap.get(W).displacementY=O}):a.idToNodeMap.get(B).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(W){a.idToNodeMap.get(W).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(W){a.idToNodeMap.get(W).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($){a.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){a.idToNodeMap.get(Q).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(a=a.concat(m.getNodes()));return a},D.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<a.length;p++){var E=a[p];if(!m.has(E)){var y=E.getSource(),I=E.getTarget();if(y==I)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(y.getEdgeListToNode(I)),w=w.concat(I.getEdgeListToNode(y)),!m.has(w[0])){if(w.length>1){var S;for(S=0;S<w.length;S++){var V=w[S];V.getBendpoints().push(new v),this.createDummyNodesForBendpoints(V)}}w.forEach(function(x){m.add(x)})}}}if(m.size==a.length)break}},D.prototype.positionNodesRadially=function(a){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(a.length)),E=0,y=0,I=0,w=new v(0,0),S=0;S<a.length;S++){S%p==0&&(I=0,y=E,S!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),E=0);var V=a[S],x=G.findCenterOfTree(V);m.x=I,m.y=y,w=D.radialLayout(V,x,m),w.y>E&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(a,m,p){var E=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=H.calculateBounds(a),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w<a.length;w++){var S=a[w];S.transform(I)}var V=new v(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(V)},D.branchRadialLayout=function(a,m,p,E,y,I){var w=(E-p+1)/2;w<0&&(w+=180);var S=(w+p)%360,V=S*P.TWO_PI/360,x=y*Math.cos(V),q=y*Math.sin(V);a.setCenter(x,q);var z=[];z=z.concat(a.getEdges());var X=z.length;m!=null&&X--;for(var rt=0,B=z.length,O,W=a.getEdgesBetween(m);W.length>1;){var $=W[0];W.splice(0,1);var _=z.indexOf($);_>=0&&z.splice(_,1),B--,X--}m!=null?O=(z.indexOf(W[0])+1)%B:O=0;for(var ht=Math.abs(E-p)/X,Q=O;rt!=X;Q=++Q%B){var It=z[Q].getOtherEnd(a);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,a,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(a){for(var m=A.MIN_VALUE,p=0;p<a.length;p++){var E=a[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var I=E[y],w=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],S=I.getParent().id;typeof m[S]=="undefined"&&(m[S]=[]),m[S]=m[S].concat(I)}Object.keys(m).forEach(function(V){if(m[V].length>1){var x="DummyCompound_"+V;a.memberGroups[x]=m[V];var q=m[V][0].getParent(),z=new t(a.graphManager);z.id=x,z.paddingLeft=q.paddingLeft||0,z.paddingRight=q.paddingRight||0,z.paddingBottom=q.paddingBottom||0,z.paddingTop=q.paddingTop||0,a.idToDummyNode[x]=z;var X=a.getGraphManager().add(a.newGraph(),z),rt=q.getChild();rt.add(z);for(var B=0;B<m[V].length;B++){var O=m[V][B];rt.remove(O),X.add(O)}}})},D.prototype.clearCompounds=function(){var a={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],a[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,m)},D.prototype.clearZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=a.idToDummyNode[p];if(m[p]=a.tileNodes(a.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,I=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=a.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,S=E.labelMarginTop;a.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,S)})},D.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=a.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var I=E[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(a){var m=this.getNodeDegree(a);if(a.getChild()==null)return m;for(var p=a.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(a){for(var m=0;m<a.length;m++){var p=a[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(a,m,p,E,y,I,w){m+=E+I,p+=y+w;for(var S=m,V=0;V<a.rows.length;V++){var x=a.rows[V];m=S;for(var q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=m,X.rect.y=p,m+=X.rect.width+a.horizontalPadding,X.rect.height>q&&(q=X.rect.height)}p+=q+a.verticalPadding}},D.prototype.tileCompoundMembers=function(a,m){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(a[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(a,m){var p=this.tileNodesByFavoringDim(a,m,!0),E=this.tileNodesByFavoringDim(a,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return I<y?w=E:w=p,w},D.prototype.getOrgRatio=function(a){var m=a.width,p=a.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(a,m){var p=o.TILING_PADDING_VERTICAL,E=o.TILING_PADDING_HORIZONTAL,y=a.length,I=0,w=0,S=0;a.forEach(function(B){I+=B.getWidth(),w+=B.getHeight(),B.getWidth()>S&&(S=B.getWidth())});var V=I/y,x=w/y,q=Math.pow(p-E,2)+4*(V+E)*(x+p)*y,z=(E-p+Math.sqrt(q))/(2*(V+E)),X;m?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(V+E)-E;return S>rt&&(rt=S),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(a,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(a,p));var S=function(O){return O.rect.width*O.rect.height},V=function(O,W){return S(W)-S(O)};a.sort(function(B,O){var W=V;return w.idealRowWidth?(W=I,W(B.id,O.id)):W(B,O)});for(var x=0,q=0,z=0;z<a.length;z++){var X=a[z];x+=X.getCenterX(),q+=X.getCenterY()}w.centerX=x/a.length,w.centerY=q/a.length;for(var z=0;z<a.length;z++){var X=a[z];if(w.rows.length==0)this.insertNodeToRow(w,X,0,m);else if(this.canAddHorizontal(w,X.rect.width,X.rect.height)){var rt=w.rows.length-1;w.idealRowWidth||(rt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,X,rt,m)}else this.insertNodeToRow(w,X,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(a,m,p,E){var y=E;if(p==a.rows.length){var I=[];a.rows.push(I),a.rowWidth.push(y),a.rowHeight.push(0)}var w=a.rowWidth[p]+m.rect.width;a.rows[p].length>0&&(w+=a.horizontalPadding),a.rowWidth[p]=w,a.width<w&&(a.width=w);var S=m.rect.height;p>0&&(S+=a.verticalPadding);var V=0;S>a.rowHeight[p]&&(V=a.rowHeight[p],a.rowHeight[p]=S,V=a.rowHeight[p]-V),a.height+=V,a.rows[p].push(m)},D.prototype.getShortestRowIndex=function(a){for(var m=-1,p=Number.MAX_VALUE,E=0;E<a.rows.length;E++)a.rowWidth[E]<p&&(m=E,p=a.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(a){for(var m=-1,p=Number.MIN_VALUE,E=0;E<a.rows.length;E++)a.rowWidth[E]>p&&(m=E,p=a.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(a,m,p){if(a.idealRowWidth){var E=a.rows.length-1,y=a.rowWidth[E];return y+m+a.horizontalPadding<=a.idealRowWidth}var I=this.getShortestRowIndex(a);if(I<0)return!0;var w=a.rowWidth[I];if(w+a.horizontalPadding+m<=a.width)return!0;var S=0;a.rowHeight[I]<p&&I>0&&(S=p+a.verticalPadding-a.rowHeight[I]);var V;a.width-w>=m+a.horizontalPadding?V=(a.height+S)/(w+m+a.horizontalPadding):V=(a.height+S)/a.width,S=p+a.verticalPadding;var x;return a.width<m?x=(a.height+S)/m:x=(a.height+S)/a.width,x<1&&(x=1/x),V<1&&(V=1/V),V<x},D.prototype.shiftToLastRow=function(a){var m=this.getLongestRowIndex(a),p=a.rowWidth.length-1,E=a.rows[m],y=E[E.length-1],I=y.width+a.horizontalPadding;if(a.width-a.rowWidth[p]>I&&m!=p){E.splice(-1,1),a.rows[p].push(y),a.rowWidth[m]=a.rowWidth[m]-I,a.rowWidth[p]=a.rowWidth[p]+I,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var w=Number.MIN_VALUE,S=0;S<E.length;S++)E[S].height>w&&(w=E[S].height);m>0&&(w+=a.verticalPadding);var V=a.rowHeight[m]+a.rowHeight[p];a.rowHeight[m]=w,a.rowHeight[p]<y.height+a.verticalPadding&&(a.rowHeight[p]=y.height+a.verticalPadding);var x=a.rowHeight[m]+a.rowHeight[p];a.height+=x-V,this.shiftToLastRow(a)}},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 a=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var I=0;I<E.length;I++)if(p=E[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),S=new N(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),S])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var V=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(V.push(y[x]),y[x][0].getOwner().remove(y[x][0]));a.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},D.prototype.growTree=function(a){for(var m=a.length,p=a[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(a){var m,p,E=a[0];if(E==a[1].source?p=a[1].target:p=a[1].source,o.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+a[3].getWidth(),p.getCenterY()+a[3].getHeight());else{var y=p.startX,I=p.finishX,w=p.startY,S=p.finishY,V=0,x=0,q=0,z=0,X=[V,q,x,z];if(w>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][w-1].length+this.grid[rt][w].length-1;if(I<this.grid.length-1)for(var rt=w;rt<=S;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(S<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][S+1].length+this.grid[rt][S].length-1;if(y>0)for(var rt=w;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=A.MAX_VALUE,O,W,$=0;$<X.length;$++)X[$]<B?(B=X[$],O=1,W=$):X[$]==B&&O++;if(O==3&&B==0)X[0]==0&&X[1]==0&&X[2]==0?m=1:X[0]==0&&X[1]==0&&X[3]==0?m=0:X[0]==0&&X[2]==0&&X[3]==0?m=3:X[1]==0&&X[2]==0&&X[3]==0&&(m=2);else if(O==2&&B==0){var _=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?_==0?m=0:m=1:X[0]==0&&X[2]==0?_==0?m=0:m=2:X[0]==0&&X[3]==0?_==0?m=0:m=3:X[1]==0&&X[2]==0?_==0?m=1:m=2:X[1]==0&&X[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&B==0){var _=Math.floor(Math.random()*4);m=_}else m=W;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},n.exports=D},991:(n,e,r)=>{var f=r(551).FDLayoutNode,i=r(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},u.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.setPred1=function(s){this.pred1=s},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(s){this.next=s},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(s){this.processed=s},u.prototype.isProcessed=function(){return processed},n.exports=u},902:(n,e,r)=>{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 i=r(806),u=r(551).LinkedList,t=r(551).Matrix,s=r(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,g=new Map,v=[],N=[],G=c.getAllNodes(),A=0,P=0;P<G.length;P++){var H=G[P];H.getChild()==null&&(g.set(H.id,A++),v.push(H.getCenterX()),N.push(H.getCenterY()),T.set(H.id,H))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=i.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var Y=function(U,Z){return{x:U.x-Z.x,y:U.y-Z.y}},J=function(U){var Z=0,K=0;return U.forEach(function(k){Z+=v[g.get(k)],K+=N[g.get(k)]}),{x:Z/U.size,y:K/U.size}},D=function(U,Z,K,k,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;U.forEach(function(lt,ot){nt.set(ot,0)}),U.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,ut=new u;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(Z=="horizontal"?et.set(ot,g.has(ot)?v[g.get(ot)]:k.get(ot)):et.set(ot,g.has(ot)?N[g.get(ot)]:k.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?v[g.get(st)]:k.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?N[g.get(st)]:k.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?v[g.get(st)]:k.get(st):ft+=g.has(st)?N[g.get(st)]:k.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=g.has(ft.id)?v[g.get(ft.id)]:k.get(ft.id):st=g.has(ft.id)?N[g.get(ft.id)]:k.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;U.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,Zt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=Zt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,Zt=void 0;Z=="horizontal"?Zt=g.has(St)?v[g.get(St)]:k.get(St):Zt=g.has(St)?N[g.get(St)]:k.get(St);var Kt=et.get(St);Zt<Lt&&(Lt=Zt),Zt>st&&(st=Zt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var he=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+he)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},tt=function(U){var Z=0,K=0,k=0,at=0;if(U.forEach(function(j){j.left?v[g.get(j.left)]-v[g.get(j.right)]>=0?Z++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?k++:at++}),Z>K&&k>at)for(var ct=0;ct<g.size;ct++)v[ct]=-1*v[ct],N[ct]=-1*N[ct];else if(Z>K)for(var nt=0;nt<g.size;nt++)v[nt]=-1*v[nt];else if(k>at)for(var et=0;et<g.size;et++)N[et]=-1*N[et]},a=function(U){var Z=[],K=new u,k=new Set,at=0;return U.forEach(function(ct,nt){if(!k.has(nt)){Z[at]=[];var et=nt;for(K.push(et),k.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=U.get(et);j.forEach(function(ut){k.has(ut.id)||(K.push(ut.id),k.add(ut.id),Z[at].push(ut.id))})}at++}}),Z},m=function(U){var Z=new Map;return U.forEach(function(K,k){Z.set(k,[])}),U.forEach(function(K,k){K.forEach(function(at){Z.get(k).push(at),Z.get(at.id).push({id:k,gap:at.gap,direction:at.direction})})}),Z},p=function(U){var Z=new Map;return U.forEach(function(K,k){Z.set(k,[])}),U.forEach(function(K,k){K.forEach(function(at){Z.get(at.id).push({id:k,gap:at.gap,direction:at.direction})})}),Z},E=[],y=[],I=!1,w=!1,S=new Set,V=new Map,x=new Map,q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){S.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(V.has(F.left)?V.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):V.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),V.has(F.right)||V.set(F.right,[])):(V.has(F.top)?V.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):V.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),V.has(F.bottom)||V.set(F.bottom,[]))}),x=m(V),q=a(x)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(F,U){E[U]=[F.position.x,F.position.y],y[U]=[v[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).x,U[et].forEach(function(pt){E[F]=[wt,N[g.get(pt)]],y[F]=[v[g.get(pt)],N[g.get(pt)]],F++})},K=0;K<U.length;K++)Z(K);I=!0}if(l.alignmentConstraint.horizontal){for(var k=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;k[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),wt=void 0;ut.size>0?wt=v[g.get(ut.values().next().value)]:wt=J(j).y,k[et].forEach(function(pt){E[F]=[v[g.get(pt)],wt],y[F]=[v[g.get(pt)],N[g.get(pt)]],F++})},ct=0;ct<k.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(w=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<q.length;rt++)q[rt].length>z&&(z=q[rt].length,X=rt);if(z<x.size/2)tt(l.relativePlacementConstraint),I=!1,w=!1;else{var B=new Map,O=new Map,W=[];q[X].forEach(function(F){V.get(F).forEach(function(U){U.direction=="horizontal"?(B.has(F)?B.get(F).push(U):B.set(F,[U]),B.has(U.id)||B.set(U.id,[]),W.push({left:F,right:U.id})):(O.has(F)?O.get(F).push(U):O.set(F,[U]),O.has(U.id)||O.set(U.id,[]),W.push({top:F,bottom:U.id}))})}),tt(W),w=!1;var $=D(B,"horizontal"),_=D(O,"vertical");q[X].forEach(function(F,U){y[U]=[v[g.get(F)],N[g.get(F)]],E[U]=[],$.has(F)?E[U][0]=$.get(F):E[U][0]=v[g.get(F)],_.has(F)?E[U][1]=_.get(F):E[U][1]=N[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,Q=t.transpose(E),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<g.size;gt++){var mt=[v[gt],N[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];v[gt]=t.dotProduct(mt,At),N[gt]=t.dotProduct(mt,Ot)}w&&tt(l.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,U){var Z={x:v[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,k=Y(K,Z);Et.x+=k.x,Et.y+=k.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,v.forEach(function(F,U){v[U]+=Et.x}),N.forEach(function(F,U){N[U]+=Et.y}),l.fixedNodeConstraint.forEach(function(F){v[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Dt[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),k=void 0;K.size>0?k=v[g.get(K.values().next().value)]:k=J(Z).x,Z.forEach(function(at){S.has(at)||(v[g.get(at)]=k)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(U){var Z=new Set;Ut[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),k=void 0;K.size>0?k=N[g.get(K.values().next().value)]:k=J(Z).y,Z.forEach(function(at){S.has(at)||(N[g.get(at)]=k)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&function(){var F=new Map,U=new Map,Z=new Map,K=new Map,k=new Map,at=new Map,ct=new Set,nt=new Set;if(S.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),S.has(Mt)&&ct.add("dummy"+yt)}),k.set("dummy"+yt,v[g.get(et[yt][0])])},ut=0;ut<et.length;ut++)j(ut);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){U.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),S.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,N[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){V.get(yt).forEach(function(Mt){var kt=void 0,$t=void 0;Mt.direction=="horizontal"?(kt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(kt)?lt.get(kt).push($t):lt.set(kt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(kt=U.get(yt)?U.get(yt):yt,U.get(Mt.id)?$t={id:U.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(kt)?ot.get(kt).push($t):ot.set(kt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=V.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=a(bt),Zt=a(zt),Kt=p(lt),he=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),Zt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){he.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,k,Qt),Jt=D(ot,"vertical",nt,at,jt),oe=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){v[g.get(Mt)]=_t.get(yt)}):v[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var le=_t.keys()[Symbol.iterator](),Le;!(te=(Le=le.next()).done);te=!0){var fe=Le.value;oe(fe)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&le.return&&le.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){N[g.get(Mt)]=Jt.get(yt)}):N[g.get(yt)]=Jt.get(yt)},ce=!0,Ce=!1,Ae=void 0;try{for(var ge=Jt.keys()[Symbol.iterator](),we;!(ce=(we=ge.next()).done);ce=!0){var fe=we.value;$e(fe)}}catch(Gt){Ce=!0,Ae=Gt}finally{try{!ce&&ge.return&&ge.return()}finally{if(Ce)throw Ae}}}()}for(var Yt=0;Yt<G.length;Yt++){var Vt=G[Yt];Vt.getChild()==null&&Vt.setCenter(v[g.get(Vt.id)],N[g.get(Vt.id)])}},n.exports=o},551:n=>{n.exports=C}},L={};function d(n){var e=L[n];if(e!==void 0)return e.exports;var r=L[n]={exports:{}};return b[n](r,r.exports,d),r.exports}var h=d(45);return h})()})}(ue)),ue.exports}(function(R,M){(function(b,L){R.exports=L(ur())})(ye,function(C){return(()=>{var b={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,f=Array(r>1?r-1:0),i=1;i<r;i++)f[i-1]=arguments[i];return f.forEach(function(u){Object.keys(u).forEach(function(t){return e[t]=u[t]})}),e}},548:(n,e,r)=>{var f=function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var v=s[Symbol.iterator](),N;!(l=(N=v.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(G){T=!0,g=G}finally{try{!l&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=r(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,s,o,c){var l=new i,T=new Set,g=[],v=void 0,N=void 0,G=void 0,A=!1,P=1,H=[],Y=[],J=function(){var tt=t.collection();Y.push(tt);var a=o[0],m=t.collection();m.merge(a).merge(a.descendants().intersection(s)),g.push(a),m.forEach(function(y){l.push(y),T.add(y),tt.merge(y)});for(var p=function(){a=l.shift();var I=t.collection();a.neighborhood().nodes().forEach(function(x){s.intersection(a.edgesWith(x)).length>0&&I.merge(x)});for(var w=0;w<I.length;w++){var S=I[w];if(v=o.intersection(S.union(S.ancestors())),v!=null&&!T.has(v[0])){var V=v.union(v.descendants());V.forEach(function(x){l.push(x),T.add(x),tt.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(tt.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){tt.has(I.source())&&tt.has(I.target())&&tt.merge(I)})}),g.length==o.length&&(A=!0),!A||A&&P>1){N=g[0],G=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<G&&(G=y.connectedEdges().length,N=y)}),H.push(N.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],o=o.difference(E),P++}};do J();while(!A);return c&&H.length>0&&c.set("dummy"+(c.size+1),H),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,N=!1,G=void 0;try{for(var A=s.nodeIndexes[Symbol.iterator](),P;!(v=(P=A.next()).done);v=!0){var H=P.value,Y=f(H,2),J=Y[0],D=Y[1],tt=o.cy.getElementById(J);if(tt){var a=tt.boundingBox(),m=s.xCoords[D]-a.w/2,p=s.xCoords[D]+a.w/2,E=s.yCoords[D]-a.h/2,y=s.yCoords[D]+a.h/2;m<c&&(c=m),p>l&&(l=p),E<T&&(T=E),y>g&&(g=y)}}}catch(x){N=!0,G=x}finally{try{!v&&A.return&&A.return()}finally{if(N)throw G}}var I=t.x-(l+c)/2,w=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],z=q.getRect().x,X=q.getRect().x+q.getRect().width,rt=q.getRect().y,B=q.getRect().y+q.getRect().height;z<c&&(c=z),X>l&&(l=X),rt<T&&(T=rt),B>g&&(g=B)});var S=t.x-(l+c)/2,V=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+S,q.getCenterY()+V)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,N=void 0,G=void 0,A=void 0,P=void 0,H=t.descendants().not(":parent"),Y=H.length,J=0;J<Y;J++){var D=H[J];N=s[c.get(D.id())]-D.width()/2,G=s[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>N&&(l=N),T<G&&(T=G),g>A&&(g=A),v<P&&(v=P)}var tt={};return tt.topLeftX=l,tt.topLeftY=g,tt.width=T-l,tt.height=v-g,tt},u.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},n.exports=u},816:(n,e,r)=>{var f=r(548),i=r(140).CoSELayout,u=r(140).CoSENode,t=r(140).layoutBase.PointD,s=r(140).layoutBase.DimensionD,o=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,l=r(140).CoSEConstants,T=function(v,N){var G=v.cy,A=v.eles,P=A.nodes(),H=A.edges(),Y=void 0,J=void 0,D=void 0,tt={};v.randomize&&(Y=N.nodeIndexes,J=N.xCoords,D=N.yCoords);var a=function(x){return typeof x=="function"},m=function(x,q){return a(x)?x(q):x},p=f.calcParentsWithoutChildren(G,A),E=function V(x,q,z,X){for(var rt=q.length,B=0;B<rt;B++){var O=q[B],W=null;O.intersection(p).length==0&&(W=O.children());var $=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(X.randomize)if(!O.isParent())$=x.add(new u(z.graphManager,new t(J[Y.get(O.id())]-_.w/2,D[Y.get(O.id())]-_.h/2),new s(parseFloat(_.w),parseFloat(_.h))));else{var ht=f.calcBoundingBox(O,J,D,Y);O.intersection(p).length==0?$=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):$=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(_.w),parseFloat(_.h))))}else $=x.add(new u(z.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new s(parseFloat(_.w),parseFloat(_.h))));else $=x.add(new u(this.graphManager));if($.id=O.data("id"),$.nodeRepulsion=m(X.nodeRepulsion,O),$.paddingLeft=parseInt(O.css("padding")),$.paddingTop=parseInt(O.css("padding")),$.paddingRight=parseInt(O.css("padding")),$.paddingBottom=parseInt(O.css("padding")),X.nodeDimensionsIncludeLabels&&($.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=O.css("text-valign"),$.labelPosHorizontal=O.css("text-halign")),tt[O.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),W!=null&&W.length>0){var Q=void 0;Q=z.getGraphManager().add(z.newGraph(),$),V(Q,W,z,X)}}},y=function(x,q,z){for(var X=0,rt=0,B=0;B<z.length;B++){var O=z[B],W=tt[O.data("source")],$=tt[O.data("target")];if(W&&$&&W!==$&&W.getEdgesBetween($).length==0){var _=q.add(x.newEdge(),W,$);_.id=O.id(),_.idealLength=m(v.idealEdgeLength,O),_.edgeElasticity=m(v.edgeElasticity,O),X+=_.idealLength,rt++}}v.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:a(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)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(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 i,S=w.newGraphManager();return E(S.addRoot(),f.getTopMostNodes(P),w,v),y(w,S,H),I(w,v),w.runLayout(),tt};n.exports={coseLayout:T}},212:(n,e,r)=>{var f=function(){function v(N,G){for(var A=0;A<G.length;A++){var P=G[A];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(N,P.key,P)}}return function(N,G,A){return G&&v(N.prototype,G),A&&v(N,A),N}}();function i(v,N){if(!(v instanceof N))throw new TypeError("Cannot call a class as a function")}var u=r(658),t=r(548),s=r(657),o=s.spectralLayout,c=r(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(N){return 4500},idealEdgeLength:function(N){return 50},edgeElasticity:function(N){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=function(){function v(N){i(this,v),this.options=u({},T,N)}return f(v,[{key:"run",value:function(){var G=this,A=this.options,P=A.cy,H=A.eles,Y=[],J=[],D=void 0,tt=[];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 a=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;a&&(A.tile=!1,A.packComponents=!1);var m=void 0,p=!1;if(P.layoutUtilities&&A.packComponents&&(m=P.layoutUtilities("get"),m||(m=P.layoutUtilities()),p=!0),H.nodes().length>0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(P,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();tt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,Y.push(o(A))}),A.quality=="default"||A.quality=="proof"){var w=P.collection();if(A.tile){var S=new Map,V=[],x=[],q=0,z={nodeIndexes:S,xCoords:V,yCoords:x},X=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),w.length>1){var rt=w.boundingBox();tt.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(w),Y.push(z);for(var B=X.length-1;B>=0;B--)D.splice(X[B],1),Y.splice(X[B],1),tt.splice(X[B],1)}}D.forEach(function(vt,it){A.eles=vt,J.push(l(A,Y[it])),t.relocateComponent(tt[it],J[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(tt[it],Y[it],A)});var O=new Set;if(D.length>1){var W=[],$=H.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=Y[it].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:Y[it].xCoords[At]-Ot.boundingbox().w/2,y:Y[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else J[it][Ot.id()]&&mt.nodes.push({x:J[it][Ot.id()].getLeft(),y:J[it][Ot.id()].getTop(),width:J[it][Ot.id()].getWidth(),height:J[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,Y[it].xCoords,Y[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(Y[it].xCoords[Ht]),Pt.push(Y[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[it][Et.id()]&&J[it][Dt.id()]&&mt.edges.push({startX:J[it][Et.id()].getCenterX(),startY:J[it][Et.id()].getCenterY(),endX:J[it][Dt.id()].getCenterX(),endY:J[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(W.push(mt),O.add(it))}});var _=m.packComponents(W,A.randomize).shifts;if(A.quality=="draft")Y.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),mt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(J[vt]).forEach(function(it){var gt=J[vt][it];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(tt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=o(A);Y.push(y)}A.quality=="default"||A.quality=="proof"?(J.push(l(A,Y[0])),t.relocateComponent(tt[0],J[0],A)):t.relocateComponent(tt[0],Y[0],A)}var Q=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return J.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return Y.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(P,H),Nt=H.filter(function(vt){return vt.css("display")=="none"});A.eles=H.not(Nt),H.nodes().not(":parent").not(Nt).layoutPositions(G,A,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v}();n.exports=g},657:(n,e,r)=>{var f=r(548),i=r(140).layoutBase.Matrix,u=r(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),v=new Map,N=new Map,G=new Map,A=[],P=[],H=[],Y=[],J=[],D=[],tt=[],a=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,S=void 0,V=function(){for(var U=0,Z=0,K=!1;Z<S;){U=Math.floor(Math.random()*m),K=!1;for(var k=0;k<Z;k++)if(Y[k]==U){K=!0;break}if(!K)Y[Z]=U,Z++;else continue}},x=function(U,Z,K){for(var k=[],at=0,ct=0,nt=0,et=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(k[ct]=U,j[U]=0;ct>=at;){nt=k[at++];for(var xt=A[nt],lt=0;lt<xt.length;lt++)et=N.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,k[++ct]=et);D[nt][Z]=j[nt]*w}if(K){for(var ot=0;ot<m;ot++)D[ot][Z]<J[ot]&&(J[ot]=D[ot][Z]);for(var Lt=0;Lt<m;Lt++)J[Lt]>ut&&(ut=J[Lt],wt=Lt)}return wt},q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*m);for(var k=0;k<m;k++)J[k]=p;for(var at=0;at<S;at++)Y[at]=Z,Z=x(Z,at,U)}else{V();for(var K=0;K<S;K++)x(Y[K],K,U)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<S;nt++)D[ct][nt]*=D[ct][nt];for(var et=0;et<S;et++)tt[et]=[];for(var j=0;j<S;j++)for(var ut=0;ut<S;ut++)tt[j][ut]=D[Y[ut]][j]},z=function(){for(var U=u.svd(tt),Z=U.S,K=U.U,k=U.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<S;nt++){ct[nt]=[];for(var et=0;et<S;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}a=i.multMat(i.multMat(k,ct),i.transpose(K))},X=function(){for(var U=void 0,Z=void 0,K=[],k=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),k[nt]=Math.random();K=i.normalize(K),k=i.normalize(k);for(var et=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=i.multGamma(i.multL(i.multGamma(at),D,a)),U=i.dotProduct(at,K),K=i.normalize(K),et=i.dotProduct(at,K),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=k[xt];if(ct=i.minusOp(ct,i.multCons(at,i.dotProduct(at,ct))),k=i.multGamma(i.multL(i.multGamma(ct),D,a)),Z=i.dotProduct(ct,k),k=i.normalize(k),et=i.dotProduct(ct,k),ut=Math.abs(et/j),ut<=1+y&&ut>=1)break;j=et}for(var lt=0;lt<m;lt++)ct[lt]=k[lt];P=i.multCons(at,Math.sqrt(Math.abs(U))),H=i.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),v),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),v)});for(var rt=0,B=0;B<T.length;B++)T[B].isParent()||N.set(T[B].id(),rt++);var O=!0,W=!1,$=void 0;try{for(var _=v.keys()[Symbol.iterator](),ht;!(O=(ht=_.next()).done);O=!0){var Q=ht.value;N.set(Q,rt++)}}catch(F){W=!0,$=F}finally{try{!O&&_.return&&_.return()}finally{if(W)throw $}}for(var It=0;It<N.size;It++)A[It]=[];g.forEach(function(F){for(var U=F.children().intersection(l);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(l);var Z=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(k,at){k.connectedEdges().length<K&&(K=k.connectedEdges().length,Z=at)}),G.set(F.id(),U.nodes(":childless")[Z].id())}),T.forEach(function(F){var U=void 0;F.isParent()?U=N.get(G.get(F.id())):U=N.get(F.id()),F.neighborhood().nodes().forEach(function(Z){l.intersection(F.edgesWith(Z)).length>0&&(Z.isParent()?A[U].push(G.get(Z.id())):A[U].push(Z.id()))})});var Nt=function(U){var Z=N.get(U),K=void 0;v.get(U).forEach(function(k){c.getElementById(k).isParent()?K=G.get(k):K=k,A[Z].push(K),A[N.get(K)].push(U)})},vt=!0,it=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){S=m<o.sampleSize?m:o.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<S;Rt++)a[Rt]=[];return o.quality=="draft"||o.step=="all"?(q(I),z(),X(),Et={nodeIndexes:N,xCoords:P,yCoords:H}):(N.forEach(function(F,U){P.push(c.getElementById(U).position("x")),H.push(c.getElementById(U).position("y"))}),Et={nodeIndexes:N,xCoords:P,yCoords:H}),Et}else{var Ht=N.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),H.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),H.push(Pt.y)}return Et={nodeIndexes:N,xCoords:P,yCoords:H},Et}};n.exports={spectralLayout:t}},579:(n,e,r)=>{var f=r(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape!="undefined"&&i(cytoscape),n.exports=i},140:n=>{n.exports=C}},L={};function d(n){var e=L[n];if(e!==void 0)return e.exports;var r=L[n]={exports:{}};return b[n](r,r.exports,d),r.exports}var h=d(579);return h})()})})(Fe);var dr=Fe.exports;const vr=Ze(dr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(R=>`${R},${R/2} 0,${R} 0,0`,"L"),R:dt(R=>`0,${R/2} ${R},0 ${R},${R}`,"R"),T:dt(R=>`0,0 ${R},0 ${R/2},${R}`,"T"),B:dt(R=>`${R/2},0 ${R},${R} 0,${R}`,"B")},se={L:dt((R,M)=>R-M+2,"L"),R:dt((R,M)=>R-2,"R"),T:dt((R,M)=>R-M+2,"T"),B:dt((R,M)=>R-2,"B")},pr=dt(function(R){return Wt(R)?R==="L"?"R":"L":R==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(R){const M=R;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=dt(function(R){const M=R;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=dt(function(R){const M=R;return M==="T"||M==="B"},"isArchitectureDirectionY"),Te=dt(function(R,M){const C=Wt(R)&&qt(M),b=qt(R)&&Wt(M);return C||b},"isArchitectureDirectionXY"),yr=dt(function(R){const M=R[0],C=R[1],b=Wt(M)&&qt(C),L=qt(M)&&Wt(C);return b||L},"isArchitecturePairXY"),Er=dt(function(R){return R!=="LL"&&R!=="RR"&&R!=="TT"&&R!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(R,M){const C=`${R}${M}`;return Er(C)?C:void 0},"getArchitectureDirectionPair"),mr=dt(function([R,M],C){const b=C[0],L=C[1];return Wt(b)?qt(L)?[R+(b==="L"?-1:1),M+(L==="T"?1:-1)]:[R+(b==="L"?-1:1),M]:Wt(L)?[R+(L==="L"?1:-1),M+(b==="T"?1:-1)]:[R,M+(b==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Tr=dt(function(R){return R==="LT"||R==="TL"?[1,1]:R==="BL"||R==="LB"?[1,-1]:R==="BR"||R==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Nr=dt(function(R,M){return Te(R,M)?"bend":Wt(R)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Lr=dt(function(R){return R.type==="service"},"isArchitectureService"),Cr=dt(function(R){return R.type==="junction"},"isArchitectureJunction"),be=dt(R=>R.data(),"edgeData"),ie=dt(R=>R.data(),"nodeData"),Ar=ar.architecture,ae,Pe=(ae=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:M,icon:C,in:b,title:L,iconText:d}){if(this.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The service [${M}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[b]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"service",icon:C,iconText:d,title:L,edges:[],in:b}}getServices(){return Object.values(this.nodes).filter(Lr)}addJunction({id:M,in:C}){if(this.registeredIds[M]!==void 0)throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The junction [${M}] cannot be placed within itself`);if(this.registeredIds[C]===void 0)throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[C]==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds[M]="node",this.nodes[M]={id:M,type:"junction",edges:[],in:C}}getJunctions(){return Object.values(this.nodes).filter(Cr)}getNodes(){return Object.values(this.nodes)}getNode(M){var C;return(C=this.nodes[M])!=null?C:null}addGroup({id:M,icon:C,in:b,title:L}){var d,h,n;if(((d=this.registeredIds)==null?void 0:d[M])!==void 0)throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds[M]}`);if(b!==void 0){if(M===b)throw new Error(`The group [${M}] cannot be placed within itself`);if(((h=this.registeredIds)==null?void 0:h[b])===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(((n=this.registeredIds)==null?void 0:n[b])==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds[M]="group",this.groups[M]={id:M,icon:C,title:L,in:b}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:M,rhsId:C,lhsDir:b,rhsDir:L,lhsInto:d,rhsInto:h,lhsGroup:n,rhsGroup:e,title:r}){if(!Ie(b))throw new Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(b)}`);if(!Ie(L))throw new Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(L)}`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes[M].in,i=this.nodes[C].in;if(n&&f&&i&&f==i)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&f&&i&&f==i)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const u={lhsId:M,lhsDir:b,lhsInto:d,lhsGroup:n,rhsId:C,rhsDir:L,rhsInto:h,rhsGroup:e,title:r};this.edges.push(u),this.nodes[M]&&this.nodes[C]&&(this.nodes[M].edges.push(this.edges[this.edges.length-1]),this.nodes[C].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const M={},C=Object.entries(this.nodes).reduce((e,[r,f])=>(e[r]=f.edges.reduce((i,u)=>{var o,c,l,T;const t=(o=this.getNode(u.lhsId))==null?void 0:o.in,s=(c=this.getNode(u.rhsId))==null?void 0:c.in;if(t&&s&&t!==s){const g=Nr(u.lhsDir,u.rhsDir);g!=="bend"&&((l=M[t])!=null||(M[t]={}),M[t][s]=g,(T=M[s])!=null||(M[s]={}),M[s][t]=g)}if(u.lhsId===r){const g=pe(u.lhsDir,u.rhsDir);g&&(i[g]=u.rhsId)}else{const g=pe(u.rhsDir,u.lhsDir);g&&(i[g]=u.lhsId)}return i},{}),e),{}),b=Object.keys(C)[0],L={[b]:1},d=Object.keys(C).reduce((e,r)=>r===b?e:{...e,[r]:1},{}),h=dt(e=>{const r={[e]:[0,0]},f=[e];for(;f.length>0;){const i=f.shift();if(i){L[i]=1,delete d[i];const u=C[i],[t,s]=r[i];Object.entries(u).forEach(([o,c])=>{L[c]||(r[c]=mr([t,s],o),f.push(c))})}}return r},"BFS"),n=[h(b)];for(;Object.keys(d).length>0;)n.push(h(Object.keys(d)[0]));this.dataStructures={adjList:C,spatialMaps:n,groupAlignments:M}}return this.dataStructures}setElementForId(M,C){this.elements[M]=C}getElementById(M){return this.elements[M]}getConfig(){return rr({...Ar,...ir().architecture})}getConfigField(M){return this.getConfig()[M]}},dt(ae,"ArchitectureDB"),ae),wr=dt((R,M)=>{fr(R,M),R.groups.map(C=>M.addGroup(C)),R.services.map(C=>M.addService({...C,type:"service"})),R.junctions.map(C=>M.addJunction({...C,type:"junction"})),R.edges.map(C=>M.addEdge(C))},"populateDb"),Ge={parser:{yy:void 0},parse:dt(async R=>{var b;const M=await cr("architecture",R);Re.debug(M);const C=(b=Ge.parser)==null?void 0:b.yy;if(!(C instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");wr(M,C)},"parse")},Mr=dt(R=>`
2
+ .edge {
3
+ stroke-width: ${R.archEdgeWidth};
4
+ stroke: ${R.archEdgeColor};
5
+ fill: none;
6
+ }
7
+
8
+ .arrow {
9
+ fill: ${R.archEdgeArrowColor};
10
+ }
11
+
12
+ .node-bkg {
13
+ fill: none;
14
+ stroke: ${R.archGroupBorderColor};
15
+ stroke-width: ${R.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"),Or=Mr,re=dt(R=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${R}</g>`,"wrapIcon"),ne={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('<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:re('<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:re('<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:re('<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:re('<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:lr,blank:{body:re("")}}},Dr=dt(async function(R,M,C,b){const L=C.getConfigField("padding"),d=C.getConfigField("iconSize"),h=d/2,n=d/6,e=n/2;await Promise.all(M.edges().map(async r=>{var Y,J;const{source:f,sourceDir:i,sourceArrow:u,sourceGroup:t,target:s,targetDir:o,targetArrow:c,targetGroup:l,label:T}=be(r);let{x:g,y:v}=r[0].sourceEndpoint();const{x:N,y:G}=r[0].midpoint();let{x:A,y:P}=r[0].targetEndpoint();const H=L+4;if(t&&(Wt(i)?g+=i==="L"?-H:H:v+=i==="T"?-H:H+18),l&&(Wt(o)?A+=o==="L"?-H:H:P+=o==="T"?-H:H+18),!t&&((Y=C.getNode(f))==null?void 0:Y.type)==="junction"&&(Wt(i)?g+=i==="L"?h:-h:v+=i==="T"?h:-h),!l&&((J=C.getNode(s))==null?void 0:J.type)==="junction"&&(Wt(o)?A+=o==="L"?h:-h:P+=o==="T"?h:-h),r[0]._private.rscratch){const D=R.insert("g");if(D.insert("path").attr("d",`M ${g},${v} L ${N},${G} L${A},${P} `).attr("class","edge").attr("id",`${b}-${sr(f,s,{prefix:"L"})}`),u){const tt=Wt(i)?se[i](g,n):g-e,a=qt(i)?se[i](v,n):v-e;D.insert("polygon").attr("points",xe[i](n)).attr("transform",`translate(${tt},${a})`).attr("class","arrow")}if(c){const tt=Wt(o)?se[o](A,n):A-e,a=qt(o)?se[o](P,n):P-e;D.insert("polygon").attr("points",xe[o](n)).attr("transform",`translate(${tt},${a})`).attr("class","arrow")}if(T){const tt=Te(i,o)?"XY":Wt(i)?"X":"Y";let a=0;tt==="X"?a=Math.abs(g-A):tt==="Y"?a=Math.abs(v-P)/1.5:a=Math.abs(g-A)/2;const m=D.append("g");if(await me(m,T,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},Ee()),m.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),tt==="X")m.attr("transform","translate("+N+", "+G+")");else if(tt==="Y")m.attr("transform","translate("+N+", "+G+") rotate(-90)");else if(tt==="XY"){const p=pe(i,o);if(p&&yr(p)){const E=m.node().getBoundingClientRect(),[y,I]=Tr(p);m.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*I*45})`);const w=m.node().getBoundingClientRect();m.attr("transform",`
33
+ translate(${N}, ${G-E.height/2})
34
+ translate(${y*w.width/2}, ${I*w.height/2})
35
+ rotate(${-1*y*I*45}, 0, ${E.height/2})
36
+ `)}}}}}))},"drawEdges"),xr=dt(async function(R,M,C,b){const d=C.getConfigField("padding")*.75,h=C.getConfigField("fontSize"),e=C.getConfigField("iconSize")/2;await Promise.all(M.nodes().map(async r=>{const f=ie(r);if(f.type==="group"){const{h:i,w:u,x1:t,y1:s}=r.boundingBox(),o=R.append("rect");o.attr("id",`${b}-group-${f.id}`).attr("x",t+e).attr("y",s+e).attr("width",u).attr("height",i).attr("class","node-bkg");const c=R.append("g");let l=t,T=s;if(f.icon){const g=c.append("g");g.html(`<g>${await ve(f.icon,{height:d,width:d,fallbackPrefix:ne.prefix})}</g>`),g.attr("transform","translate("+(l+e+1)+", "+(T+e+1)+")"),l+=d,T+=h/2-1-2}if(f.label){const g=c.append("g");await me(g,f.label,{useHtmlLabels:!1,width:u,classes:"architecture-service-label"},Ee()),g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),g.attr("transform","translate("+(l+e+4)+", "+(T+e+2)+")")}C.setElementForId(f.id,o)}}))},"drawGroups"),Ir=dt(async function(R,M,C,b){var d;const L=Ee();for(const h of C){const n=M.append("g"),e=R.getConfigField("iconSize");if(h.title){const u=n.append("g");await me(u,h.title,{useHtmlLabels:!1,width:e*1.5,classes:"architecture-service-label"},L),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),u.attr("transform","translate("+e/2+", "+e+")")}const r=n.append("g");if(h.icon)r.html(`<g>${await ve(h.icon,{height:e,width:e,fallbackPrefix:ne.prefix})}</g>`);else if(h.iconText){r.html(`<g>${await ve("blank",{height:e,width:e,fallbackPrefix:ne.prefix})}</g>`);const s=r.append("g").append("foreignObject").attr("width",e).attr("height",e).append("div").attr("class","node-icon-text").attr("style",`height: ${e}px;`).append("div").html(nr(h.iconText,L)),o=(d=parseInt(window.getComputedStyle(s.node(),null).getPropertyValue("font-size").replace(/\D/g,"")))!=null?d:16;s.attr("style",`-webkit-line-clamp: ${Math.floor((e-2)/o)};`)}else r.append("path").attr("class","node-bkg").attr("id",`${b}-node-${h.id}`).attr("d",`M0,${e} V5 Q0,0 5,0 H${e-5} Q${e},0 ${e},5 V${e} Z`);n.attr("id",`${b}-service-${h.id}`).attr("class","architecture-service");const{width:f,height:i}=n.node().getBBox();h.width=f,h.height=i,R.setElementForId(h.id,n)}return 0},"drawServices"),Rr=dt(function(R,M,C,b){C.forEach(L=>{const d=M.append("g"),h=R.getConfigField("iconSize");d.append("g").append("rect").attr("id",`${b}-node-${L.id}`).attr("fill-opacity","0").attr("width",h).attr("height",h),d.attr("class","architecture-junction");const{width:e,height:r}=d._groups[0][0].getBBox();d.width=e,d.height=r,R.setElementForId(L.id,d)})},"drawJunctions");hr([{name:ne.prefix,icons:ne}]);Se.use(vr);function Ue(R,M,C){R.forEach(b=>{M.add({group:"nodes",data:{type:"service",id:b.id,icon:b.icon,label:b.title,parent:b.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-service"})})}dt(Ue,"addServices");function Ye(R,M,C){R.forEach(b=>{M.add({group:"nodes",data:{type:"junction",id:b.id,parent:b.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ye,"addJunctions");function Xe(R,M){M.nodes().map(C=>{const b=ie(C);if(b.type==="group")return;b.x=C.position().x,b.y=C.position().y,R.getElementById(b.id).attr("transform","translate("+(b.x||0)+","+(b.y||0)+")")})}dt(Xe,"positionNodes");function He(R,M){R.forEach(C=>{M.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}dt(He,"addGroups");function We(R,M){R.forEach(C=>{const{lhsId:b,rhsId:L,lhsInto:d,lhsGroup:h,rhsInto:n,lhsDir:e,rhsDir:r,rhsGroup:f,title:i}=C,u=Te(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${b}-${L}`,label:i,source:b,sourceDir:e,sourceArrow:d,sourceGroup:h,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:L,targetDir:r,targetArrow:n,targetGroup:f,targetEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%"};M.add({group:"edges",data:t,classes:u})})}dt(We,"addEdges");function Ve(R,M,C){const b=dt((n,e)=>Object.entries(n).reduce((r,[f,i])=>{var s,o,c;let u=0;const t=Object.entries(i);if(t.length===1)return r[f]=t[0][1],r;for(let l=0;l<t.length-1;l++)for(let T=l+1;T<t.length;T++){const[g,v]=t[l],[N,G]=t[T];if(((s=C[g])==null?void 0:s[N])===e)(o=r[f])!=null||(r[f]=[]),r[f]=[...r[f],...v,...G];else if(g==="default"||N==="default")(c=r[f])!=null||(r[f]=[]),r[f]=[...r[f],...v,...G];else{const P=`${f}-${u++}`;r[P]=v;const H=`${f}-${u++}`;r[H]=G}}return r},{}),"flattenAlignments"),L=M.map(n=>{const e={},r={};return Object.entries(n).forEach(([f,[i,u]])=>{var s,o,c,l,T,g,v,N;const t=(o=(s=R.getNode(f))==null?void 0:s.in)!=null?o:"default";(c=e[u])!=null||(e[u]={}),(T=(l=e[u])[t])!=null||(l[t]=[]),e[u][t].push(f),(g=r[i])!=null||(r[i]={}),(N=(v=r[i])[t])!=null||(v[t]=[]),r[i][t].push(f)}),{horiz:Object.values(b(e,"horizontal")).filter(f=>f.length>1),vert:Object.values(b(r,"vertical")).filter(f=>f.length>1)}}),[d,h]=L.reduce(([n,e],{horiz:r,vert:f})=>[[...n,...r],[...e,...f]],[[],[]]);return{horizontal:d,vertical:h}}dt(Ve,"getAlignments");function ze(R,M){const C=[],b=dt(d=>`${d[0]},${d[1]}`,"posToStr"),L=dt(d=>d.split(",").map(h=>parseInt(h)),"strToPos");return R.forEach(d=>{const h=Object.fromEntries(Object.entries(d).map(([f,i])=>[b(i),f])),n=[b([0,0])],e={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){const f=n.shift();if(f){e[f]=1;const i=h[f];if(i){const u=L(f);Object.entries(r).forEach(([t,s])=>{const o=b([u[0]+s[0],u[1]+s[1]]),c=h[o];c&&!e[o]&&(n.push(o),C.push({[De[t]]:c,[De[pr(t)]]:i,gap:1.5*M.getConfigField("iconSize")}))})}}}}),C}dt(ze,"getRelativeConstraints");function Be(R,M,C,b,L,{spatialMaps:d,groupAlignments:h}){return new Promise(n=>{const e=or("body").append("div").attr("id","cy").attr("style","display:none"),r=Se({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{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":`${L.getConfigField("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:`${L.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),He(C,r),Ue(R,r,L),Ye(M,r,L),We(b,r);const f=Ve(L,d,h),i=ze(d,L),u=L.getConfigField("iconSize"),t=L.getConfigField("idealEdgeLengthMultiplier")*u,s=.5*u,o=L.getConfigField("edgeElasticity"),c=r.layout({name:"fcose",quality:"proof",randomize:L.getConfigField("randomize"),nodeSeparation:L.getConfigField("nodeSeparation"),numIter:L.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(l){const[T,g]=l.connectedNodes(),{parent:v}=ie(T),{parent:N}=ie(g);return v===N?t:s},edgeElasticity(l){const[T,g]=l.connectedNodes(),{parent:v}=ie(T),{parent:N}=ie(g);return v===N?o:.001},alignmentConstraint:f,relativePlacementConstraint:i});c.one("layoutstop",()=>{var T;function l(g,v,N,G){let A,P;const{x:H,y:Y}=g,{x:J,y:D}=v;P=(G-Y+(H-N)*(Y-D)/(H-J))/Math.sqrt(1+Math.pow((Y-D)/(H-J),2)),A=Math.sqrt(Math.pow(G-Y,2)+Math.pow(N-H,2)-Math.pow(P,2));const tt=Math.sqrt(Math.pow(J-H,2)+Math.pow(D-Y,2));A=A/tt;let a=(J-H)*(G-Y)-(D-Y)*(N-H);switch(!0){case a>=0:a=1;break;case a<0:a=-1;break}let m=(J-H)*(N-H)+(D-Y)*(G-Y);switch(!0){case m>=0:m=1;break;case m<0:m=-1;break}return P=Math.abs(P)*a,A=A*m,{distances:P,weights:A}}dt(l,"getSegmentWeights"),r.startBatch();for(const g of Object.values(r.edges()))if((T=g.data)!=null&&T.call(g)){const{x:v,y:N}=g.source().position(),{x:G,y:A}=g.target().position();if(v!==G&&N!==A){const P=g.sourceEndpoint(),H=g.targetEndpoint(),{sourceDir:Y}=be(g),[J,D]=qt(Y)?[P.x,H.y]:[H.x,P.y],{weights:tt,distances:a}=l(P,H,J,D);g.style("segment-distances",a),g.style("segment-weights",tt)}}r.endBatch(),c.run()}),c.run(),r.ready(l=>{Re.info("Ready",l),n(r)})})}dt(Be,"layoutArchitecture");var Sr=dt(async(R,M,C,b)=>{const L=b.db;L.setDiagramId(M);const d=L.getServices(),h=L.getJunctions(),n=L.getGroups(),e=L.getEdges(),r=L.getDataStructures(),f=ke(M),i=f.append("g");i.attr("class","architecture-edges");const u=f.append("g");u.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Ir(L,u,d,M),Rr(L,u,h,M);const s=await Be(d,h,n,e,L,r);await Dr(i,s,L,M),await xr(t,s,L,M),Xe(L,s),qe(void 0,f,L.getConfigField("padding"),L.getConfigField("useMaxWidth"))},"draw"),Fr={draw:Sr},Xr={parser:Ge,get db(){return new Pe},renderer:Fr,styles:Or};export{Xr as diagram};