1(self.webpackChunkSlideSquad=self.webpackChunkSlideSquad||[]).push([[6861],{7236:function(kt,gt,Mt){var S;kt.exports=(S=Mt(47988),(()=>{"use strict";var y={658:n=>{n.exports=null!=Object.assign?Object.assign.bind(Object):function(c){for(var e=arguments.length,v=Array(e>1?e-1:0),t=1;t<e;t++)v[t-1]=arguments[t];return v.forEach(function(a){Object.keys(a).forEach(function(h){return c[h]=a[h]})}),c}},548:(n,c,e)=>{var v=function(){return function(g,u){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return function h(g,u){var m=[],f=!0,C=!1,T=void 0;try{for(var x,L=g[Symbol.iterator]();!(f=(x=L.next()).done)&&(m.push(x.value),!u||m.length!==u);f=!0);}catch(j){C=!0,T=j}finally{try{!f&&L.return&&L.return()}finally{if(C)throw T}}return m}(g,u);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t=e(140).layoutBase.LinkedList;n.exports={getTopMostNodes:function(h){for(var g={},u=0;u<h.length;u++)g[h[u].id()]=!0;return h.filter(function(f,C){"number"==typeof f&&(f=C);for(var T=f.parent()[0];null!=T;){if(g[T.id()])return!1;T=T.parent()[0]}return!0})},connectComponents:function(h,g,u,m){var f=new t,C=new Set,T=[],L=void 0,x=void 0,j=void 0,I=!1,nt=1,pt=[],ut=[],Dt=function(){var Z=
1h.collection();ut.push(Z);var r=u[0],E=h.collection();E.merge(r).merge(r.descendants().intersection(g)),T.push(r),E.forEach(function(d){f.push(d),C.add(d),Z.merge(d)});for(var l=function(){r=f.shift();var R=h.collection();r.neighborhood().nodes().forEach(function(G){g.intersection(r.edgesWith(G)).length>0&&R.merge(G)});for(var D=0;D<R.length;D++){var U=R[D];null==(L=u.intersection(U.union(U.ancestors())))||C.has(L[0])||L.union(L.descendants()).forEach(function(G){f.push(G),C.add(G),Z.merge(G),u.has(G)&&T.push(G)})}};0!=f.length;)l();if(Z.forEach(function(d){g.intersection(d.connectedEdges()).forEach(function(R){Z.has(R.source())&&Z.has(R.target())&&Z.merge(R)})}),T.length==u.length&&(I=!0),!I||I&&nt>1){j=(x=T[0]).connectedEdges().length,T.forEach(function(d){d.connectedEdges().length<j&&(j=d.connectedEdges().length,x=d)}),pt.push(x.id());var p=h.collection();p.merge(T[0]),T.forEach(function(d){p.merge(d)}),T=[],u=u.difference(p),nt++}};do{Dt()}while(!I);return m&&pt.length>0&&m.set("dummy"+(m.size+1),pt),ut},relocateComponent:function(h,g,u){if(!u.fixedNodeConstraint){var m=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY;if("draft"==u.quality){var L=!0,x=!1,j=void 0;try{for(var nt,I=g.nodeIndexes[Symbol.iterator]();!(L=(nt=I.next()).done);L=!0){var ut=v(nt.value,2),P=ut[1],Z=u.cy.getElementById(ut[0]);if(Z){var r=Z.boundingBox(),E=g.xCoords[P]-r.w/2,l=g.xCoords[P]+r.w/2,p=g.yCoords[P]-r.h/2,d=g.yCoords[P]+r.h/2;E<m&&(m=E),l>f&&(f=l),p<C&&(C=p),d>T&&(T=d)}}}catch(G){x=!0,j=G}finally{try{!L&&I.return&&I.return()}finally{if(x)throw j}}var R=h.x-(f+m)/2,D=h.y-(T+C)/2;g.xCoords=g.xCoords.map(function(G){return G+R}),g.yCoords=g.yCoords.map(function(G){return G+D})}else{Object.keys(g).forEach(function(G){var q=g[G],ft=q.getRect().x,V=q.getRect().x+q.getRect().width,ht=q.getRect().y,J=q.getRect().y+q.getRect().height;ft<m&&(m=ft),V>f&&(f=V),ht<C&&(C=ht),J>T&&(T=J)});var U=h.x-(f+m)/2,Y=h.y-(T+C)/2;Object.keys(g).forEach(function(G){var q=g[G];q.setCenter(q.getCenterX()+U,q.getCenterY()+Y)})}}},calcBoundingBox:function(h,g,u,m){for(var f=Number.MAX_SAFE_INTEGER,C=Number.MIN_SAFE_INTEGER,T=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,x=void 0,j=void 0,I=void 0,nt=void 0,pt=h.descendants().not(":parent"),ut=pt.length,Dt=0;Dt<ut;Dt++){var P=pt[Dt];f>(x=g[m.get(P.id())]-P.width()/2)&&(f=x),C<(j=g[m.get(P.id())]+P.width()/2)&&(C=j),T>(I=u[m.get(P.id())]-P.height()/2)&&(T=I),L<(nt=u[m.get(P.id())]+P.height()/2)&&(L=nt)}var Z={};return Z.topLeftX=f,Z.topLeftY=T,Z.width=C-f,Z.height=L-T,Z},calcParentsWithoutChildren:function(h,g){var u=h.collection();return g.nodes(":parent").forEach(function(m){var f=!1;
1m.children().forEach(function(C){"none"!=C.css("display")&&(f=!0)}),f||u.merge(m)}),u}}},816:(n,c,e)=>{var v=e(548),t=e(140).CoSELayout,a=e(140).CoSENode,h=e(140).layoutBase.PointD,g=e(140).layoutBase.DimensionD,u=e(140).layoutBase.LayoutConstants,m=e(140).layoutBase.FDLayoutConstants,f=e(140).CoSEConstants;n.exports={coseLayout:function(L,x){var j=L.cy,I=L.eles,nt=I.nodes(),pt=I.edges(),ut=void 0,Dt=void 0,P=void 0,Z={};L.randomize&&(ut=x.nodeIndexes,Dt=x.xCoords,P=x.yCoords);var r=function(G){return"function"==typeof G},E=function(G,q){return r(G)?G(q):G},l=v.calcParentsWithoutChildren(j,I);null!=L.nestingFactor&&(f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=L.nestingFactor),null!=L.gravity&&(f.DEFAULT_GRAVITY_STRENGTH=m.DEFAULT_GRAVITY_STRENGTH=L.gravity),null!=L.numIter&&(f.MAX_ITERATIONS=m.MAX_ITERATIONS=L.numIter),null!=L.gravityRange&&(f.DEFAULT_GRAVITY_RANGE_FACTOR=m.DEFAULT_GRAVITY_RANGE_FACTOR=L.gravityRange),null!=L.gravityCompound&&(f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=L.gravityCompound),null!=L.gravityRangeCompound&&(f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=L.gravityRangeCompound),null!=L.initialEnergyOnIncremental&&(f.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.DEFAULT_COOLING_FACTOR_INCREMENTAL=L.initialEnergyOnIncremental),null!=L.tilingCompareBy&&(f.TILING_COMPARE_BY=L.tilingCompareBy),u.QUALITY="proof"==L.quality?2:0,f.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=L.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!L.randomize,f.ANIMATE=m.ANIMATE=u.ANIMATE=L.animate,f.TILE=L.tile,f.TILING_PADDING_VERTICAL="function"==typeof L.tilingPaddingVertical?L.tilingPaddingVertical.call():L.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL="function"==typeof L.tilingPaddingHorizontal?L.tilingPaddingHorizontal.call():L.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!L.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=L.uniformNodeDimensions,"transformed"==L.step&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1),"enforced"==L.step&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1),"cose"==L.step&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0),"all"==L.step&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!!L.randomize,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0),f.TREE_REDUCTION_ON_INCREMENTAL=!(L.fixedNodeConstraint||L.alignmentConstraint||L.relativePlacementConstraint);var G,q,D=new t,U=D.newGraphManager();return function Y(G,q,ft,V){for(var ht=q.length,J=0;J<ht;J++){var O=q[J],z=null;0==O.intersection(l).length&&(z=O.children());var B=void 0,ot=O.layoutDimensions({nodeDimensionsIncludeLabels:V.nodeDimensionsIncludeLabels});if(null!=O.outerWidth()&&null!=O.outerHeight())if(V.randomize)if(O.isParent()){var wt=v.calcBoundingBox(O,Dt,P,ut);B=0==O.intersection(l).length?G.add(new a(ft.graphManager,new h(wt.topLeftX,wt.topLeftY),new g(wt.width,wt.height))):G.add(new a(ft.graphManager,new h(wt.topLeftX,wt.topLeftY),new g(parseFloat(ot.w),parseFloat(ot.h))))}else B=G.add(new a(ft.graphManager,new h(Dt[ut.get(O.id())]-ot.w/2,P[ut.get(O.id())]-ot.h/2),new g(parseFloat(ot.w),parseFloat(ot.h))));else B=G.add(new a(ft.graphManager,new h(O.position("x")-ot.w/2,O.position("y")-ot.h/2),new g(parseFloat(ot.w),parseFloat(ot.h))));else B=G.add(new a(this.graphManager));B.id=O.data("id"),B.nodeRepulsion=E(V.nodeRepulsion,O),B.paddingLeft=parseInt(O.css("padding")),B.paddingTop=parseInt(O.css("padding")),B.paddingRight=parseInt(O.css("padding")),B.paddingBottom=parseInt(O.css("padding")),V.nodeDimensionsIncludeLabels&&(B.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,B.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,B.labelPosVertical=O.css("text-valign"),B.labelPosHorizontal=O.css("text-halign")),Z[O.data("id")]=B,isNaN(B.rect.x)&&(B.rect.x=0),isNaN(B.rect.y)&&(B.rect.y=0),null!=z&&z.length>0&&Y(ft.getGraphManager().add(ft.newGraph(),B),z,ft,V)}}(U.addRoot(),v.getTopMostNodes(nt),D,L),function(G,q,ft){for(var V=0,ht=0,J=0;J<ft.length;J++){var O=ft[J],z=Z[O.data("source")],B=Z[O.data("target")];if(z&&B&&z!==B&&0==z.getEdgesBetween(B).length){var ot=q.add(G.newEdge(),z,B);ot.id=O.id(),ot.idealLength=E(L.idealEdgeLength,O),ot.edgeElasticity=E(L.edgeElasticity,O),V+=ot.idealLength,ht++}}null!=L.idealEdgeLength&&(f.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=ht>0?V/ht:r(L.idealEdgeLength)?50:L.idealEdgeLength,f.MIN_REPULSION_DIST=m.MIN_REPULSION_DIST=m.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=m.DEFAULT_EDGE_LENGTH)}(D,U,pt),G=D,(q=L).fixedNodeConstraint&&(G.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(G.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(G.constraints.relativePlacementConstraint=q.relativePlacementConstraint),D.runLayout(),Z}}},212:(n,c,e)=>{var v=function(){function L(x,j){for(var I=0;I<j.length;I++){var nt=j[I];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(x,nt.key,nt)}}return function(x,j,I){return j&&L(x.prototype,j),I&&L(x,I),x}}();var a=e(658),h=e(548),u=e(657).spectralLayout,f=e(816).coseLayout,C=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(x){return 4500},idealEdgeLength:function(x){return 50},edgeElasticity:function(x){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,
1initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function L(x){(function t(L,x){if(!(L instanceof x))throw new TypeError("Cannot call a class as a function")})(this,L),this.options=a({},C,x)}return v(L,[{key:"run",value:function(){var I=this.options,nt=I.cy,pt=I.eles,ut=[],Z=[],r=void 0,E=[];I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||0==I.fixedNodeConstraint.length)&&(I.fixedNodeConstraint=void 0),I.alignmentConstraint&&(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||0==I.alignmentConstraint.vertical.length)&&(I.alignmentConstraint.vertical=void 0),I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||0==I.alignmentConstraint.horizontal.length)&&(I.alignmentConstraint.horizontal=void 0)),I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||0==I.relativePlacementConstraint.length)&&(I.relativePlacementConstraint=void 0),(I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint)&&(I.tile=!1,I.packComponents=!1);var p=void 0,d=!1;if(nt.layoutUtilities&&I.packComponents&&((p=nt.layoutUtilities("get"))||(p=nt.layoutUtilities()),d=!0),pt.nodes().length>0)if(d){var U=h.getTopMostNodes(I.eles.nodes());if((r=h.connectComponents(nt,I.eles,U)).forEach(function(A){var M=A.boundingBox();E.push({x:M.x1+M.w/2,y:M.y1+M.h/2})}),I.randomize&&r.forEach(function(A){I.eles=A,ut.push(u(I))}),"default"==I.quality||"proof"==I.quality){var Y=nt.collection();if(I.tile){var V=0,ht={nodeIndexes:new Map,xCoords:[],yCoords:[]},J=[];if(r.forEach(function(A,M){0==A.edges().length&&(A.nodes().forEach(function(W,it){Y.merge(A.nodes()[it]),W.isParent()||(ht.nodeIndexes.set(A.nodes()[it].id(),V++),ht.xCoords.push(A.nodes()[0].position().x),ht.yCoords.push(A.nodes()[0].position().y))}),J.push(M))}),Y.length>1){var O=Y.boundingBox();E.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),r.push(Y),ut.push(ht);for(var z=J.length-1;z>=0;z--)r.splice(J[z],1),ut.splice(J[z],1),E.splice(J[z],1)}}r.forEach(function(A,M){I.eles=A,Z.push(f(I,ut[M])),h.relocateComponent(E[M],Z[M],I)})}else r.forEach(function(A,M){h.relocateComponent(E[M],ut[M],I)});var B=new Set;if(r.length>1){var ot=[],wt=pt.filter(function(A){return"none"==A.css("display")});r.forEach(function(A,M){var W=void 0;if("draft"==I.quality&&(W=ut[M].nodeIndexes),A.nodes().not(wt).length>0){var it={edges:[],nodes:[]},et=void 0;A.nodes().not(wt).forEach(function(st){if("draft"==I.quality)if(st.isParent()){var rt=h.calcBoundingBox(st,ut[M].xCoords,ut[M].yCoords,W);it.nodes.push({x:rt.topLeftX,y:rt.topLeftY,width:rt.width,height:rt.height})}else et=W.get(st.id()),it.nodes.push({x:ut[M].xCoords[et]-st.boundingbox().w/2,y:ut[M].yCoords[et]-st.boundingbox().h/2,width:st.boundingbox().w,height:st.boundingbox().h});else Z[M][st.id()]&&it.nodes.push({x:Z[M][st.id()].getLeft(),y:Z[M][st.id()].getTop(),width:Z[M][st.id()].getWidth(),height:Z[M][st.id()].getHeight()})}
1),A.edges().forEach(function(st){var rt=st.source(),k=st.target();if("none"!=rt.css("display")&&"none"!=k.css("display"))if("draft"==I.quality){var tt=W.get(rt.id()),yt=W.get(k.id()),ct=[],mt=[];if(rt.isParent()){var lt=h.calcBoundingBox(rt,ut[M].xCoords,ut[M].yCoords,W);ct.push(lt.topLeftX+lt.width/2),ct.push(lt.topLeftY+lt.height/2)}else ct.push(ut[M].xCoords[tt]),ct.push(ut[M].yCoords[tt]);if(k.isParent()){var w=h.calcBoundingBox(k,ut[M].xCoords,ut[M].yCoords,W);mt.push(w.topLeftX+w.width/2),mt.push(w.topLeftY+w.height/2)}else mt.push(ut[M].xCoords[yt]),mt.push(ut[M].yCoords[yt]);it.edges.push({startX:ct[0],startY:ct[1],endX:mt[0],endY:mt[1]})}else Z[M][rt.id()]&&Z[M][k.id()]&&it.edges.push({startX:Z[M][rt.id()].getCenterX(),startY:Z[M][rt.id()].getCenterY(),endX:Z[M][k.id()].getCenterX(),endY:Z[M][k.id()].getCenterY()})}),it.nodes.length>0&&(ot.push(it),B.add(M))}});var _=p.packComponents(ot,I.randomize).shifts;if("draft"==I.quality)ut.forEach(function(A,M){var W=A.xCoords.map(function(et){return et+_[M].dx}),it=A.yCoords.map(function(et){return et+_[M].dy});A.xCoords=W,A.yCoords=it});else{var Pt=0;B.forEach(function(A){Object.keys(Z[A]).forEach(function(M){var W=Z[A][M];W.setCenter(W.getCenterX()+_[Pt].dx,W.getCenterY()+_[Pt].dy)}),Pt++})}}}else{var R=I.eles.boundingBox();if(E.push({x:R.x1+R.w/2,y:R.y1+R.h/2}),I.randomize){var D=u(I);ut.push(D)}"default"==I.quality||"proof"==I.quality?(Z.push(f(I,ut[0])),h.relocateComponent(E[0],Z[0],I)):h.relocateComponent(E[0],ut[0],I)}var Rt=function(M,W){if("default"==I.quality||"proof"==I.quality){"number"==typeof M&&(M=W);var it=void 0,et=void 0,st=M.data("id");return Z.forEach(function(k){st in k&&(it={x:k[st].getRect().getCenterX(),y:k[st].getRect().getCenterY()},et=k[st])}),I.nodeDimensionsIncludeLabels&&(et.labelWidth&&("left"==et.labelPosHorizontal?it.x+=et.labelWidth/2:"right"==et.labelPosHorizontal&&(it.x-=et.labelWidth/2)),et.labelHeight&&("top"==et.labelPosVertical?it.y+=et.labelHeight/2:"bottom"==et.labelPosVertical&&(it.y-=et.labelHeight/2))),null==it&&(it={x:M.position("x"),y:M.position("y")}),{x:it.x,y:it.y}}var rt=void 0;return ut.forEach(function(k){var tt=k.nodeIndexes.get(M.id());null!=tt&&(rt={x:k.xCoords[tt],y:k.yCoords[tt]})}),null==rt&&(rt={x:M.position("x"),y:M.position("y")}),{x:rt.x,y:rt.y}};if("default"==I.quality||"proof"==I.quality||I.randomize){var Wt=h.calcParentsWithoutChildren(nt,pt),N=pt.filter(function(A){return"none"==A.css("display")});I.eles=pt.not(N),pt.nodes().not(":parent").not(N).layoutPositions(this,I,Rt),Wt.length>0&&Wt.forEach(function(A){A.position(Rt(A))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),L}();n.exports=T},657:(n,c,e)=>{var v=e(548),t=e(140).layoutBase.Matrix,a=e(140).layoutBase.SVD;n.exports={spectralLayout:function(u){var m=u.cy,f=u.eles,C=f.nodes(),T=f.nodes(":parent"),L=new Map,x=new Map,j=new Map,I=[],nt=[],pt=[],ut=[],Dt=[],P=[],Z=[],r=[],l=void 0,p=1e8,d=1e-9,R=u.piTol,D=u.samplingType,U=u.nodeSeparation,Y=void 0,q=function(X,b,H){for(var $=[],dt=0,at=0,K=0,Q=void 0,Tt=[],Nt=0,Lt=1,Ft=0;Ft<l;Ft++)Tt[Ft]=p;for($[at]=X,Tt[X]=0;at>=dt;){K=$[dt++];for(var At=I[K],vt=0;vt<At.length;vt++)Tt[Q=x.get(At[vt])]==p&&(Tt[Q]=Tt[K]+1,$[++at]=Q);P[K][b]=Tt[K]*U}if(H){for(var Ot=0;Ot<l;Ot++)P[Ot][b]<Dt[Ot]&&(Dt[Ot]=P[Ot][b]);for(var Et=0;Et<l;Et++)Dt[Et]>Nt&&(Nt=Dt[Et],Lt=Et)}return Lt};v.connectComponents(m,f,v.getTopMostNodes(C),L),T.forEach(function(F){v.connectComponents(m,f,v.getTopMostNodes(F.descendants().intersection(f)),L)});for(var J=0,O=0;O<C.length;O++)C[O].isParent()||x.set(C[O].id(),J++);var z=!0,B=!1,ot=void 0;try{for(var _,wt=L.keys()[Symbol.iterator]();!(z=(_=wt.next()).done);z=!0)x.set(_.value,J++)}catch(F){B=!0,ot=F}finally{try{!z&&wt.return&&wt.return()}finally{if(B)throw ot}}for(var Rt=0;Rt<x.size;Rt++)I[Rt]=[];T.forEach(function(F){for(var X=F.children().intersection(f);0==X.nodes(":childless").length;)X=X.nodes()[0].children().intersection(f);var b=0,H=X.nodes(":childless")[0].connectedEdges().length;X.nodes(":childless").forEach(function($,dt){$.connectedEdges().length<H&&(H=$.connectedEdges().length,b=dt)}),j.set(F.id(),X.nodes(":childless")[b].id())}
1),C.forEach(function(F){var X;X=F.isParent()?x.get(j.get(F.id())):x.get(F.id()),F.neighborhood().nodes().forEach(function(b){f.intersection(F.edgesWith(b)).length>0&&(b.isParent()?I[X].push(j.get(b.id())):I[X].push(b.id()))})});var Wt=function(X){var b=x.get(X),H=void 0;L.get(X).forEach(function($){H=m.getElementById($).isParent()?j.get($):$,I[b].push(H),I[x.get(H)].push(X)})},N=!0,A=!1,M=void 0;try{for(var it,W=L.keys()[Symbol.iterator]();!(N=(it=W.next()).done);N=!0)Wt(it.value)}catch(F){A=!0,M=F}finally{try{!N&&W.return&&W.return()}finally{if(A)throw M}}var st=void 0;if((l=x.size)>2){Y=l<u.sampleSize?l:u.sampleSize;for(var rt=0;rt<l;rt++)P[rt]=[];for(var k=0;k<Y;k++)r[k]=[];return"draft"==u.quality||"all"==u.step?(function(X){var b=void 0;if(X){b=Math.floor(Math.random()*l);for(var $=0;$<l;$++)Dt[$]=p;for(var dt=0;dt<Y;dt++)ut[dt]=b,b=q(b,dt,X)}else{!function(){for(var X=0,b=0,H=!1;b<Y;){X=Math.floor(Math.random()*l),H=!1;for(var $=0;$<b;$++)if(ut[$]==X){H=!0;break}H||(ut[b]=X,b++)}}();for(var H=0;H<Y;H++)q(ut[H],H,X)}for(var at=0;at<l;at++)for(var K=0;K<Y;K++)P[at][K]*=P[at][K];for(var Q=0;Q<Y;Q++)Z[Q]=[];for(var Tt=0;Tt<Y;Tt++)for(var Nt=0;Nt<Y;Nt++)Z[Tt][Nt]=P[ut[Nt]][Tt]}(D),function(){for(var X=a.svd(Z),b=X.S,H=X.U,$=X.V,dt=b[0]*b[0]*b[0],at=[],K=0;K<Y;K++){at[K]=[];for(var Q=0;Q<Y;Q++)at[K][Q]=0,K==Q&&(at[K][Q]=b[K]/(b[K]*b[K]+dt/(b[K]*b[K])))}r=t.multMat(t.multMat($,at),t.transpose(H))}(),function(){for(var X=void 0,b=void 0,H=[],$=[],dt=[],at=[],K=0;K<l;K++)H[K]=Math.random(),$[K]=Math.random();H=t.normalize(H),$=t.normalize($);for(var Tt=d,Nt=d,Lt=void 0;;){for(var Ft=0;Ft<l;Ft++)dt[Ft]=H[Ft];if(H=t.multGamma(t.multL(t.multGamma(dt),P,r)),X=t.dotProduct(dt,H),H=t.normalize(H),Tt=t.dotProduct(dt,H),(Lt=Math.abs(Tt/Nt))<=1+R&&Lt>=1)break;Nt=Tt}for(var At=0;At<l;At++)dt[At]=H[At];for(Nt=d;;){for(var vt=0;vt<l;vt++)at[vt]=$[vt];if(at=t.minusOp(at,t.multCons(dt,t.dotProduct(dt,at))),$=t.multGamma(t.multL(t.multGamma(at),P,r)),b=t.dotProduct(at,$),$=t.normalize($),Tt=t.dotProduct(at,$),(Lt=Math.abs(Tt/Nt))<=1+R&&Lt>=1)break;Nt=Tt}for(var Ot=0;Ot<l;Ot++)at[Ot]=$[Ot];nt=t.multCons(dt,Math.sqrt(Math.abs(X))),pt=t.multCons(at,Math.sqrt(Math.abs(b)))}(),st={nodeIndexes:x,xCoords:nt,yCoords:pt}):(x.forEach(function(F,X){nt.push(m.getElementById(X).position("x")),pt.push(m.getElementById(X).position("y"))}),st={nodeIndexes:x,xCoords:nt,yCoords:pt}),st}var tt=x.keys(),yt=m.getElementById(tt.next().value),ct=yt.position(),mt=yt.outerWidth();if(nt.push(ct.x),pt.push(ct.y),2==l){var w=m.getElementById(tt.next().value).outerWidth();nt.push(ct.x+mt/2+w/2+u.idealEdgeLength),pt.push(ct.y)}return{nodeIndexes:x,xCoords:nt,yCoords:pt}}}},579:(n,c,e)=>{var v=e(212),t=function(h){h&&h("layout","fcose",v)};typeof cytoscape<"u"&&t(cytoscape),n.exports=t},140:n=>{n.exports=S}},o={};return function s(n){var c=o[n];if(void 0!==c)return c.exports;var e=o[n]={exports:{}};return y[n](e,e.exports,s),e.exports}(579)})())},47988:function(kt,gt,Mt){var S;kt.exports=(S=Mt(46148),(()=>{"use strict";var y={45:(n,c,e)=>{var v={};v.layoutBase=e(551),v.CoSEConstants=e(806),v.CoSEEdge=e(767),v.CoSEGraph=e(880),v.CoSEGraphManager=e(578),v.CoSELayout=e(765),v.CoSENode=e(991),v.ConstraintHandler=e(902),n.exports=v},806:(n,c,e)=>{var v=e(551).FDLayoutConstants;function t(){}for(var a in v)t[a]=v[a];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=v.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,t.ENFORCE_CONSTRAINTS=!0,t.APPLY_LAYOUT=!0,t.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,t.TREE_REDUCTION_ON_INCREMENTAL=!0,t.PURE_INCREMENTAL=t.DEFAULT_INCREMENTAL,n.exports=t},767:(n,c,e)=>{var v=e(551).FDLayoutEdge;function t(h,g,u){v.call(this,h,g,u)}for(var a in t.prototype=Object.create(v.prototype),v)t[a]=v[a];n.exports=t},880:(n,c,e)=>{var v=e(551).LGraph;function t(h,g,u){v.call(this,h,g,u)}for(var a in t.prototype=Object.create(v.prototype),v)t[a]=v[a];n.exports=t},578:(n,c,e)=>{var v=e(551).LGraphManager;function t(h){v.call(this,h)}for(var a in t.prototype=Object.create(v.prototype),v)t[a]=v[a];n.exports=t},765:(n,c,e)=>{var v=e(551).FDLayout,t=e(578),a=e(880),h=e(991),g=e(767),u=e(806),m=e(902),f=e(551).FDLayoutConstants,C=e(551).LayoutConstants,T=e(551).Point,
1L=e(551).PointD,x=e(551).DimensionD,j=e(551).Layout,I=e(551).Integer,nt=e(551).IGeometry,pt=e(551).LGraph,ut=e(551).Transform,Dt=e(551).LinkedList;function P(){v.call(this),this.toBeTiled={},this.constraints={}}for(var Z in P.prototype=Object.create(v.prototype),v)P[Z]=v[Z];P.prototype.newGraphManager=function(){var r=new t(this);return this.graphManager=r,r},P.prototype.newGraph=function(r){return new a(null,this.graphManager,r)},P.prototype.newNode=function(r){return new h(this.graphManager,r)},P.prototype.newEdge=function(r){return new g(null,null,r)},P.prototype.initParameters=function(){v.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH<10?10:u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},P.prototype.initSpringEmbedder=function(){v.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},P.prototype.layout=function(){return C.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},P.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(u.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),l=this.nodesWithGravity.filter(function(R){return E.has(R)});this.graphManager.setAllNodesToApplyGravitation(l)}}else{var r=this.getFlatForest();r.length>0?this.positionNodesRadially(r):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),E=new Set(this.getAllNodes()),l=this.nodesWithGravity.filter(function(p){return E.has(p)}),this.graphManager.setAllNodesToApplyGravitation(l),this.positionNodesRandomly())}return Object.keys(this.constraints).length>0&&(m.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),u.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},P.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 r=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(d){return r.has(d)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.PURE_INCREMENTAL?f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:f.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()),this.coolingFactor=u.PURE_INCREMENTAL?f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var l=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(l,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},P.prototype.getPositionsData=function(){for(var r=this.graphManager.getAllNodes(),E={},l=0;l<r.length;l++){var p=r[l].rect,d=r[l].id;E[d]={id:d,x:p.getCenterX(),y:p.getCenterY(),w:p.width,h:p.height}}return E},P.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var r=!1;
1if("during"===f.ANIMATE)this.emit("layoutstarted");else{for(;!r;)r=this.tick();this.graphManager.updateBounds()}},P.prototype.moveNodes=function(){for(var r=this.getAllNodes(),l=0;l<r.length;l++)r[l].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),l=0;l<r.length;l++)r[l].move()},P.prototype.initConstraintVariables=function(){var r=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),l=0;l<E.length;l++)this.idToNodeMap.set((p=E[l]).id,p);var p,d=function O(z){for(var ot,B=z.getChild().getNodes(),wt=0,_=0;_<B.length;_++)null==(ot=B[_]).getChild()?r.fixedNodeSet.has(ot.id)&&(wt+=100):wt+=O(ot);return wt};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach(function(B){r.fixedNodeSet.add(B.nodeId)}),E=this.graphManager.getAllNodes(),l=0;l<E.length;l++)if(null!=(p=E[l]).getChild()){var R=d(p);R>0&&(p.fixedNodeWeight=R)}if(this.constraints.relativePlacementConstraint){var D=new Map,U=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){r.fixedNodesOnHorizontal.add(O),r.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var Y=this.constraints.alignmentConstraint.vertical;for(l=0;l<Y.length;l++)this.dummyToNodeForVerticalAlignment.set("dummy"+l,[]),Y[l].forEach(function(z){D.set(z,"dummy"+l),r.dummyToNodeForVerticalAlignment.get("dummy"+l).push(z),r.fixedNodeSet.has(z)&&r.fixedNodesOnHorizontal.add("dummy"+l)})}if(this.constraints.alignmentConstraint.horizontal){var G=this.constraints.alignmentConstraint.horizontal;for(l=0;l<G.length;l++)this.dummyToNodeForHorizontalAlignment.set("dummy"+l,[]),G[l].forEach(function(z){U.set(z,"dummy"+l),r.dummyToNodeForHorizontalAlignment.get("dummy"+l).push(z),r.fixedNodeSet.has(z)&&r.fixedNodesOnVertical.add("dummy"+l)})}}if(u.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var z,B,ot;for(ot=O.length-1;ot>=2*O.length/3;ot--)z=Math.floor(Math.random()*(ot+1)),B=O[ot],O[ot]=O[z],O[z]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var z=D.has(O.left)?D.get(O.left):O.left,B=D.has(O.right)?D.get(O.right):O.right;r.nodesInRelativeHorizontal.includes(z)||(r.nodesInRelativeHorizontal.push(z),r.nodeToRelativeConstraintMapHorizontal.set(z,[]),r.dummyToNodeForVerticalAlignment.has(z)?r.nodeToTempPositionMapHorizontal.set(z,r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(z)[0]).getCenterX()):r.nodeToTempPositionMapHorizontal.set(z,r.idToNodeMap.get(z).getCenterX())),r.nodesInRelativeHorizontal.includes(B)||(r.nodesInRelativeHorizontal.push(B),r.nodeToRelativeConstraintMapHorizontal.set(B,[]),r.dummyToNodeForVerticalAlignment.has(B)?r.nodeToTempPositionMapHorizontal.set(B,r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):r.nodeToTempPositionMapHorizontal.set(B,r.idToNodeMap.get(B).getCenterX())),r.nodeToRelativeConstraintMapHorizontal.get(z).push({right:B,gap:O.gap}),r.nodeToRelativeConstraintMapHorizontal.get(B).push({left:z,gap:O.gap})}else{var ot=U.has(O.top)?U.get(O.top):O.top,wt=U.has(O.bottom)?U.get(O.bottom):O.bottom;r.nodesInRelativeVertical.includes(ot)||(r.nodesInRelativeVertical.push(ot),r.nodeToRelativeConstraintMapVertical.set(ot,[]),r.dummyToNodeForHorizontalAlignment.has(ot)?r.nodeToTempPositionMapVertical.set(ot,r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(ot)[0]).getCenterY()):r.nodeToTempPositionMapVertical.set(ot,r.idToNodeMap.get(ot).getCenterY())),r.nodesInRelativeVertical.includes(wt)||(r.nodesInRelativeVertical.push(wt),r.nodeToRelativeConstraintMapVertical.set(wt,[]),r.dummyToNodeForHorizontalAlignment.has(wt)?r.nodeToTempPositionMapVertical.set(wt,r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(wt)[0]).getCenterY()):r.nodeToTempPositionMapVertical.set(wt,r.idToNodeMap.get(wt).getCenterY())),r.nodeToRelativeConstraintMapVertical.get(ot).push({bottom:wt,gap:O.gap}),r.nodeToRelativeConstraintMapVertical.get(wt).push({top:ot,gap:O.gap})}});else{var q=new Map,ft=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var z=D.has(O.left)?D.get(O.left):O.left,B=D.has(O.right)?D.get(O.right):O.right;q.has(z)?q.get(z).push(B):q.set(z,[B]),q.has(B)?q.get(B).push(z):q.set(B,[z])}else{var ot=U.has(O.top)?U.get(O.top):O.top,wt=U.has(O.bottom)?U.get(O.bottom):O.bottom;ft.has(ot)?ft.get(ot).push(wt):ft.set(ot,[wt]),ft.has(wt)?ft.get(wt).push(ot):ft.set(wt,[ot])}});var V=function(z,B){var ot=[],wt=[],_=new Dt,Pt=new Set,Rt=0;return z.forEach(function(Wt,N){if(!Pt.has(N)){ot[Rt]=[],wt[Rt]=!1;var A=N;for(_.push(A),Pt.add(A),ot[Rt].push(A);0!=_.length;)A=_.shift(),B.has(A)&&(wt[Rt]=!0),z.get(A).forEach(function(W){Pt.has(W)||(_.push(W),Pt.add(W),ot[Rt].push(W))});Rt++}}),{components:ot,isFixed:wt}},ht=V(q,r.fixedNodesOnHorizontal);this.componentsOnHorizontal=ht.components,this.fixedComponentsOnHorizontal=ht.isFixed;var J=V(ft,r.fixedNodesOnVertical);this.componentsOnVertical=J.components,this.fixedComponentsOnVertical=J.isFixed}}},P.prototype.updateDisplacements=function(){var r=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(J){var O=r.idToNodeMap.get(J.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,l=0;l<E.length;l++){for(var p=0,d=0;d<E[l].length;d++){if(this.fixedNodeSet.has(E[l][d])){p=0;break}p+=this.idToNodeMap.get(E[l][d]).displacementX}var R=p/E[l].length;for(d=0;d<E[l].length;d++)this.idToNodeMap.get(E[l][d]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal){var D=this.constraints.alignmentConstraint.horizontal;for(l=0;l<D.length;l++){var U=0;for(d=0;d<D[l].length;d++){if(this.fixedNodeSet.has(D[l][d])){U=0;break}U+=this.idToNodeMap.get(D[l][d]).displacementY}var Y=U/D[l].length;for(d=0;d<D[l].length;d++)this.idToNodeMap.get(D[l][d]).displacementY=Y}}}if(this.constraints.relativePlacementConstraint)if(u.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(J){if(!r.fixedNodesOnHorizontal.has(J)){var O=0;O=r.dummyToNodeForVerticalAlignment.has(J)?r.idToNodeMap.get(r.dummyToNodeForVerticalAlignment.get(J)[0]).displacementX:r.idToNodeMap.get(J).displacementX,r.nodeToRelativeConstraintMapHorizontal.get(J).forEach(function(z){var B;z.right?(B=r.nodeToTempPositionMapHorizontal.get(z.right)-r.nodeToTempPositionMapHorizontal.get(J)-O)<z.gap&&(O-=z.gap-B):(B=r.nodeToTempPositionMapHorizontal.get(J)-r.nodeToTempPositionMapHorizontal.get(z.left)+O)<z.gap&&(O+=z.gap-B)}),r.nodeToTempPositionMapHorizontal.set(J,r.nodeToTempPositionMapHorizontal.get(J)+O),r.dummyToNodeForVerticalAlignment.has(J)?r.dummyToNodeForVerticalAlignment.get(J).forEach(function(z){r.idToNodeMap.get(z).displacementX=O}):r.idToNodeMap.get(J).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(J){if(!r.fixedNodesOnHorizontal.has(J)){var O=0;O=r.dummyToNodeForHorizontalAlignment.has(J)?r.idToNodeMap.get(r.dummyToNodeForHorizontalAlignment.get(J)[0]).displacementY:r.idToNodeMap.get(J).displacementY,r.nodeToRelativeConstraintMapVertical.get(J).forEach(function(z){var B;z.bottom?(B=r.nodeToTempPositionMapVertical.get(z.bottom)-r.nodeToTempPositionMapVertical.get(J)-O)<z.gap&&(O-=z.gap-B):(B=r.nodeToTempPositionMapVertical.get(J)-r.nodeToTempPositionMapVertical.get(z.top)+O)<z.gap&&(O+=z.gap-B)}),r.nodeToTempPositionMapVertical.set(J,r.nodeToTempPositionMapVertical.get(J)+O),r.dummyToNodeForHorizontalAlignment.has(J)?r.dummyToNodeForHorizontalAlignment.get(J).forEach(function(z){r.idToNodeMap.get(z).displacementY=O}):r.idToNodeMap.get(J).displacementY=O}});else{for(l=0;l<this.componentsOnHorizontal.length;l++){var G=this.componentsOnHorizontal[l];
1if(this.fixedComponentsOnHorizontal[l])for(d=0;d<G.length;d++)this.dummyToNodeForVerticalAlignment.has(G[d])?this.dummyToNodeForVerticalAlignment.get(G[d]).forEach(function(z){r.idToNodeMap.get(z).displacementX=0}):this.idToNodeMap.get(G[d]).displacementX=0;else{var q=0,ft=0;for(d=0;d<G.length;d++)this.dummyToNodeForVerticalAlignment.has(G[d])?(q+=(V=this.dummyToNodeForVerticalAlignment.get(G[d])).length*this.idToNodeMap.get(V[0]).displacementX,ft+=V.length):(q+=this.idToNodeMap.get(G[d]).displacementX,ft++);var ht=q/ft;for(d=0;d<G.length;d++)this.dummyToNodeForVerticalAlignment.has(G[d])?this.dummyToNodeForVerticalAlignment.get(G[d]).forEach(function(z){r.idToNodeMap.get(z).displacementX=ht}):this.idToNodeMap.get(G[d]).displacementX=ht}}for(l=0;l<this.componentsOnVertical.length;l++)if(G=this.componentsOnVertical[l],this.fixedComponentsOnVertical[l])for(d=0;d<G.length;d++)this.dummyToNodeForHorizontalAlignment.has(G[d])?this.dummyToNodeForHorizontalAlignment.get(G[d]).forEach(function(B){r.idToNodeMap.get(B).displacementY=0}):this.idToNodeMap.get(G[d]).displacementY=0;else{for(q=0,ft=0,d=0;d<G.length;d++)if(this.dummyToNodeForHorizontalAlignment.has(G[d])){var V;q+=(V=this.dummyToNodeForHorizontalAlignment.get(G[d])).length*this.idToNodeMap.get(V[0]).displacementY,ft+=V.length}else q+=this.idToNodeMap.get(G[d]).displacementY,ft++;for(ht=q/ft,d=0;d<G.length;d++)this.dummyToNodeForHorizontalAlignment.has(G[d])?this.dummyToNodeForHorizontalAlignment.get(G[d]).forEach(function(_){r.idToNodeMap.get(_).displacementY=ht}):this.idToNodeMap.get(G[d]).displacementY=ht}}},P.prototype.calculateNodesToApplyGravitationTo=function(){var E,d,r=[],l=this.graphManager.getGraphs(),p=l.length;for(d=0;d<p;d++)(E=l[d]).updateConnected(),E.isConnected||(r=r.concat(E.getNodes()));return r},P.prototype.createBendpoints=function(){var r=[];r=r.concat(this.graphManager.getAllEdges());var l,E=new Set;for(l=0;l<r.length;l++){var p=r[l];if(!E.has(p)){var d=p.getSource(),R=p.getTarget();if(d==R)p.getBendpoints().push(new L),p.getBendpoints().push(new L),this.createDummyNodesForBendpoints(p),E.add(p);else{var D=[];if(D=(D=D.concat(d.getEdgeListToNode(R))).concat(R.getEdgeListToNode(d)),!E.has(D[0])){var U;if(D.length>1)for(U=0;U<D.length;U++){var Y=D[U];Y.getBendpoints().push(new L),this.createDummyNodesForBendpoints(Y)}D.forEach(function(G){E.add(G)})}}}if(E.size==r.length)break}},P.prototype.positionNodesRadially=function(r){for(var E=new T(0,0),l=Math.ceil(Math.sqrt(r.length)),p=0,d=0,R=0,D=new L(0,0),U=0;U<r.length;U++){U%l==0&&(R=0,d=p,0!=U&&(d+=u.DEFAULT_COMPONENT_SEPERATION),p=0);var Y=r[U],G=j.findCenterOfTree(Y);E.x=R,E.y=d,(D=P.radialLayout(Y,G,E)).y>p&&(p=Math.floor(D.y)),R=Math.floor(D.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new L(C.WORLD_CENTER_X-D.x/2,C.WORLD_CENTER_Y-D.y/2))},P.radialLayout=function(r,E,l){var p=Math.max(this.maxDiagonalInTree(r),u.DEFAULT_RADIAL_SEPARATION);P.branchRadialLayout(E,null,0,359,0,p);var d=pt.calculateBounds(r),R=new ut;R.setDeviceOrgX(d.getMinX()),R.setDeviceOrgY(d.getMinY()),R.setWorldOrgX(l.x),R.setWorldOrgY(l.y);for(var D=0;D<r.length;D++)r[D].transform(R);var Y=new L(d.getMaxX(),d.getMaxY());return R.inverseTransformPoint(Y)},P.branchRadialLayout=function(r,E,l,p,d,R){var D=(p-l+1)/2;D<0&&(D+=180);var Y=(D+l)%360*nt.TWO_PI/360,q=(Math.cos(Y),d*Math.cos(Y)),ft=d*Math.sin(Y);r.setCenter(q,ft);var V=[],ht=(V=V.concat(r.getEdges())).length;null!=E&&ht--;for(var z,J=0,O=V.length,B=r.getEdgesBetween(E);B.length>1;){var ot=B[0];B.splice(0,1);var wt=V.indexOf(ot);wt>=0&&V.splice(wt,1),O--,ht--}z=null!=E?(V.indexOf(B[0])+1)%O:0;for(var _=Math.abs(p-l)/ht,Pt=z;J!=ht;Pt=++Pt%O){var Rt=V[Pt].getOtherEnd(r);if(Rt!=E){var Wt=(l+J*_)%360;P.branchRadialLayout(Rt,r,Wt,(Wt+_)%360,d+R,R),J++}}},P.maxDiagonalInTree=function(r){for(var E=I.MIN_VALUE,l=0;l<r.length;l++){var d=r[l].getDiagonal();d>E&&(E=d)}return E},P.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},P.prototype.groupZeroDegreeMembers=function(){var r=this,E={};this.memberGroups={},this.idToDummyNode={};for(var l=[],p=this.graphManager.getAllNodes(),d=0;d<p.length;d++){var D=(R=p[d]).getParent();0===this.getNodeDegreeWithChildren(R)&&(null==D.id||!this.getToBeTiled(D))&&l.push(R)}for(d=0;d<l.length;d++){var R,U=(R=l[d]).getParent().id;typeof E[U]>"u"&&(E[U]=[]),E[U]=E[U].concat(R)}
1Object.keys(E).forEach(function(Y){if(E[Y].length>1){var G="DummyCompound_"+Y;r.memberGroups[G]=E[Y];var q=E[Y][0].getParent(),ft=new h(r.graphManager);ft.id=G,ft.paddingLeft=q.paddingLeft||0,ft.paddingRight=q.paddingRight||0,ft.paddingBottom=q.paddingBottom||0,ft.paddingTop=q.paddingTop||0,r.idToDummyNode[G]=ft;var V=r.getGraphManager().add(r.newGraph(),ft),ht=q.getChild();ht.add(ft);for(var J=0;J<E[Y].length;J++){var O=E[Y][J];ht.remove(O),V.add(O)}}})},P.prototype.clearCompounds=function(){var r={},E={};this.performDFSOnCompounds();for(var l=0;l<this.compoundOrder.length;l++)E[this.compoundOrder[l].id]=this.compoundOrder[l],r[this.compoundOrder[l].id]=[].concat(this.compoundOrder[l].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[l].getChild()),this.compoundOrder[l].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(r,E)},P.prototype.clearZeroDegreeMembers=function(){var r=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(l){var p=r.idToDummyNode[l];if(E[l]=r.tileNodes(r.memberGroups[l],p.paddingLeft+p.paddingRight),p.rect.width=E[l].width,p.rect.height=E[l].height,p.setCenter(E[l].centerX,E[l].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,u.NODE_DIMENSIONS_INCLUDE_LABELS){var d=p.rect.width,R=p.rect.height;p.labelWidth&&("left"==p.labelPosHorizontal?(p.rect.x-=p.labelWidth,p.setWidth(d+p.labelWidth),p.labelMarginLeft=p.labelWidth):"center"==p.labelPosHorizontal&&p.labelWidth>d?(p.rect.x-=(p.labelWidth-d)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-d)/2):"right"==p.labelPosHorizontal&&p.setWidth(d+p.labelWidth)),p.labelHeight&&("top"==p.labelPosVertical?(p.rect.y-=p.labelHeight,p.setHeight(R+p.labelHeight),p.labelMarginTop=p.labelHeight):"center"==p.labelPosVertical&&p.labelHeight>
1R?(p.rect.y-=(p.labelHeight-R)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-R)/2):"bottom"==p.labelPosVertical&&p.setHeight(R+p.labelHeight))}})},P.prototype.repopulateCompounds=function(){for(var r=this.compoundOrder.length-1;r>=0;r--){var E=this.compoundOrder[r];this.adjustLocations(this.tiledMemberPack[E.id],E.rect.x,E.rect.y,E.paddingLeft,E.paddingTop,E.labelMarginLeft,E.labelMarginTop)}},P.prototype.repopulateZeroDegreeMembers=function(){var r=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(l){var p=r.idToDummyNode[l];r.adjustLocations(E[l],p.rect.x,p.rect.y,p.paddingLeft,p.paddingTop,p.labelMarginLeft,p.labelMarginTop)})},P.prototype.getToBeTiled=function(r){var E=r.id;if(null!=this.toBeTiled[E])return this.toBeTiled[E];var l=r.getChild();if(null==l)return this.toBeTiled[E]=!1,!1;for(var p=l.getNodes(),d=0;d<p.length;d++){var R=p[d];if(this.getNodeDegree(R)>0)return this.toBeTiled[E]=!1,!1;if(null!=R.getChild()){if(!this.getToBeTiled(R))return this.toBeTiled[E]=!1,!1}else this.toBeTiled[R.id]=!1}return this.toBeTiled[E]=!0,!0},P.prototype.getNodeDegree=function(r){for(var l=r.getEdges(),p=0,d=0;d<l.length;d++){var R=l[d];R.getSource().id!==R.getTarget().id&&(p+=1)}return p},P.prototype.getNodeDegreeWithChildren=function(r){var E=this.getNodeDegree(r);if(null==r.getChild())return E;for(var l=r.getChild().getNodes(),p=0;p<l.length;p++)E+=this.getNodeDegreeWithChildren(l[p]);return E},P.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},P.prototype.fillCompexOrderByDFS=function(r){for(var E=0;E<r.length;E++){var l=r[E];null!=l.getChild()&&this.fillCompexOrderByDFS(l.getChild().getNodes()),this.getToBeTiled(l)&&this.compoundOrder.push(l)}},P.prototype.adjustLocations=function(r,E,l,p,d,R,D){l+=d+D;for(var U=E+=p+R,Y=0;Y<r.rows.length;Y++){var G=r.rows[Y];E=U;for(var q=0,ft=0;ft<G.length;ft++){var V=G[ft];V.rect.x=E,V.rect.y=l,E+=V.rect.width+r.horizontalPadding,V.rect.height>q&&(q=V.rect.height)}l+=q+r.verticalPadding}},P.prototype.tileCompoundMembers=function(r,E){var l=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(p){var d=E[p];if(l.tiledMemberPack[p]=l.tileNodes(r[p],d.paddingLeft+d.paddingRight),d.rect.width=l.tiledMemberPack[p].width,d.rect.height=l.tiledMemberPack[p].height,d.setCenter(l.tiledMemberPack[p].centerX,l.tiledMemberPack[p].centerY),d.labelMarginLeft=0,d.labelMarginTop=0,u.NODE_DIMENSIONS_INCLUDE_LABELS){var R=d.rect.width,D=d.rect.height;d.labelWidth&&("left"==d.labelPosHorizontal?(d.rect.x-=d.labelWidth,d.setWidth(R+d.labelWidth),d.labelMarginLeft=d.labelWidth):"center"==d.labelPosHorizontal&&d.labelWidth>R?(d.rect.x-=(d.labelWidth-R)/2,d.setWidth(d.labelWidth),d.labelMarginLeft=(d.labelWidth-R)/2):"right"==d.labelPosHorizontal&&d.setWidth(R+d.labelWidth)),d.labelHeight&&("top"==d.labelPosVertical?(d.rect.y-=d.labelHeight,d.setHeight(D+d.labelHeight),d.labelMarginTop=d.labelHeight):"center"==d.labelPosVertical&&d.labelHeight>D?(d.rect.y-=(d.labelHeight-D)/2,d.setHeight(d.labelHeight),d.labelMarginTop=(d.labelHeight-D)/2):"bottom"==d.labelPosVertical&&d.setHeight(D+d.labelHeight))}})},P.prototype.tileNodes=function(r,E){var l=this.tileNodesByFavoringDim(r,E,!0),p=this.tileNodesByFavoringDim(r,E,!1),d=this.getOrgRatio(l);return this.getOrgRatio(p)<d?p:l},P.prototype.getOrgRatio=function(r){var p=r.width/r.height;return p<1&&(p=1/p),p},P.prototype.calcIdealRowWidth=function(r,E){var l=u.TILING_PADDING_VERTICAL,p=u.TILING_PADDING_HORIZONTAL,d=r.length,R=0,D=0,U=0;r.forEach(function(J){R+=J.getWidth(),D+=J.getHeight(),J.getWidth()>U&&(U=J.getWidth())});var V,Y=R/d,G=D/d,q=Math.pow(l-p,2)+4*(Y+p)*(G+l)*d,ft=(p-l+Math.sqrt(q))/(2*(Y+p));E?(V=Math.ceil(ft))==ft&&V++:V=Math.floor(ft);var ht=V*(Y+p)-p;return U>ht&&(ht=U),ht+2*p},P.prototype.tileNodesByFavoringDim=function(r,E,l){var R=u.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL,centerX:0,centerY:0};R&&(D.idealRowWidth=this.calcIdealRowWidth(r,l));var U=function(O){return O.rect.width*O.rect.height},Y=function(O,z){return U(z)-U(O)};r.sort(function(J,O){var z=Y;return D.idealRowWidth?(z=R)(J.id,O.id):z(J,O)});for(var G=0,q=0,ft=0;ft<r.length;ft++)G+=(V=r[ft]).getCenterX(),q+=V.getCenterY();for(D.centerX=G/r.length,D.centerY=q/r.length,ft=0;ft<r.length;ft++){var V=r[ft];if(0==D.rows.length)this.insertNodeToRow(D,V,0,E);else if(this.canAddHorizontal(D,V.rect.width,V.rect.height)){var ht=D.rows.length-1;D.idealRowWidth||(ht=this.getShortestRowIndex(D)),this.insertNodeToRow(D,V,ht,E)}else this.insertNodeToRow(D,V,D.rows.length,E);this.shiftToLastRow(D)}return D}
1,P.prototype.insertNodeToRow=function(r,E,l,p){var d=p;l==r.rows.length&&(r.rows.push([]),r.rowWidth.push(d),r.rowHeight.push(0));var D=r.rowWidth[l]+E.rect.width;r.rows[l].length>0&&(D+=r.horizontalPadding),r.rowWidth[l]=D,r.width<D&&(r.width=D);var U=E.rect.height;l>0&&(U+=r.verticalPadding);var Y=0;U>r.rowHeight[l]&&(Y=r.rowHeight[l],r.rowHeight[l]=U,Y=r.rowHeight[l]-Y),r.height+=Y,r.rows[l].push(E)},P.prototype.getShortestRowIndex=function(r){for(var E=-1,l=Number.MAX_VALUE,p=0;p<r.rows.length;p++)r.rowWidth[p]<l&&(E=p,l=r.rowWidth[p]);return E},P.prototype.getLongestRowIndex=function(r){for(var E=-1,l=Number.MIN_VALUE,p=0;p<r.rows.length;p++)r.rowWidth[p]>l&&(E=p,l=r.rowWidth[p]);return E},P.prototype.canAddHorizontal=function(r,E,l){if(r.idealRowWidth)return r.rowWidth[r.rows.length-1]+E+r.horizontalPadding<=r.idealRowWidth;var R=this.getShortestRowIndex(r);if(R<0)return!0;var D=r.rowWidth[R];if(D+r.horizontalPadding+E<=r.width)return!0;var Y,G,U=0;return r.rowHeight[R]<l&&R>0&&(U=l+r.verticalPadding-r.rowHeight[R]),Y=r.width-D>=E+r.horizontalPadding?(r.height+U)/(D+E+r.horizontalPadding):(r.height+U)/r.width,U=l+r.verticalPadding,(G=r.width<E?(r.height+U)/E:(r.height+U)/r.width)<1&&(G=1/G),Y<1&&(Y=1/Y),Y<G},P.prototype.shiftToLastRow=function(r){var E=this.getLongestRowIndex(r),l=r.rowWidth.length-1,p=r.rows[E],d=p[p.length-1],R=d.width+r.horizontalPadding;if(r.width-r.rowWidth[l]>R&&E!=l){p.splice(-1,1),r.rows[l].push(d),r.rowWidth[E]=r.rowWidth[E]-R,r.rowWidth[l]=r.rowWidth[l]+R,r.width=r.rowWidth[instance.getLongestRowIndex(r)];for(var D=Number.MIN_VALUE,U=0;U<p.length;U++)p[U].height>D&&(D=p[U].height);E>0&&(D+=r.verticalPadding);var Y=r.rowHeight[E]+r.rowHeight[l];r.rowHeight[E]=D,r.rowHeight[l]<d.height+r.verticalPadding&&(r.rowHeight[l]=d.height+r.verticalPadding),r.height+=r.rowHeight[E]+r.rowHeight[l]-Y,this.shiftToLastRow(r)}},P.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},P.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},P.prototype.reduceTrees=function(){for(var l,r=[],E=!0;E;){var p=this.graphManager.getAllNodes(),d=[];E=!1;for(var R=0;R<p.length;R++)if(1==(l=p[R]).getEdges().length&&!l.getEdges()[0].isInterGraph&&null==l.getChild()){if(u.PURE_INCREMENTAL){var D=l.getEdges()[0].getOtherEnd(l),U=new x(l.getCenterX()-D.getCenterX(),l.getCenterY()-D.getCenterY());d.push([l,l.getEdges()[0],l.getOwner(),U])}else d.push([l,l.getEdges()[0],l.getOwner()]);E=!0}if(1==E){for(var Y=[],G=0;G<d.length;G++)1==d[G][0].getEdges().length&&(Y.push(d[G]),d[G][0].getOwner().remove(d[G][0]));r.push(Y),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=r},P.prototype.growTree=function(r){for(var p,l=r[r.length-1],d=0;d<l.length;d++)this.findPlaceforPrunedNode(p=l[d]),p[2].add(p[0]),p[2].add(p[1],p[1].source,p[1].target);r.splice(r.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},P.prototype.findPlaceforPrunedNode=function(r){var E,l,p=r[0];if(l=p==r[1].source?r[1].target:r[1].source,u.PURE_INCREMENTAL)p.setCenter(l.getCenterX()+r[3].getWidth(),l.getCenterY()+r[3].getHeight());else{var d=l.startX,R=l.finishX,D=l.startY,U=l.finishY,V=[0,0,0,0];if(D>0)for(var ht=d;ht<=R;ht++)V[0]+=this.grid[ht][D-1].length+this.grid[ht][D].length-1;if(R<this.grid.length-1)for(ht=D;ht<=U;ht++)V[1]+=this.grid[R+1][ht].length+this.grid[R][ht].length-1;if(U<this.grid[0].length-1)for(ht=d;ht<=R;ht++)V[2]+=this.grid[ht][U+1].length+this.grid[ht][U].length-1;if(d>0)for(ht=D;ht<=U;ht++)V[3]+=this.grid[d-1][ht].length+this.grid[d][ht].length-1;for(var O,z,J=I.MAX_VALUE,B=0;B<V.length;B++)V[B]<J?(J=V[B],O=1,z=B):V[B]==J&&O++;if(3==O&&0==J)0==V[0]&&0==V[1]&&0==V[2]?E=1:0==V[0]&&0==V[1]&&0==V[3]?E=0:0==V[0]&&0==V[2]&&0==V[3]?E=3:0==V[1]&&0==V[2]&&0==V[3]&&(E=2);else if(2==O&&0==J){var ot=Math.floor(2*Math.random());E=0==V[0]&&0==V[1]?0==ot?0:1:0==V[0]&&0==V[2]?0==ot?0:2:0==V[0]&&0==V[3]?0==ot?0:3:0==V[1]&&0==V[2]?0==ot?1:2:0==V[1]&&0==V[3]?0==ot?1:3:0==ot?2:3}else E=4==O&&0==J?ot=Math.floor(4*Math.random()):z;0==E?p.setCenter(l.getCenterX(),l.getCenterY()-l.getHeight()/2-f.DEFAULT_EDGE_LENGTH-p.getHeight()/2):1==E?p.setCenter(l.getCenterX()+l.getWidth()/2+f.DEFAULT_EDGE_LENGTH+p.getWidth()/2,l.getCenterY()):2==E?p.setCenter(l.getCenterX(),l.getCenterY()+l.getHeight()/2+f.DEFAULT_EDGE_LENGTH+p.getHeight()/2):p.setCenter(l.getCenterX()-l.getWidth()/2-f.DEFAULT_EDGE_LENGTH-p.getWidth()/2,l.getCenterY())}},n.exports=P},991:(n,c,e)=>{var v=e(551).FDLayoutNode,t=e(551).IMath;function a(g,u,m,f){v.call(this,g,u,m,f)}for(var h in a.prototype=Object.create(v.prototype),v)a[h]=v[h];a.prototype.calculateDisplacement=function(){var g=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(g,u){for(var f,m=this.getChild().getNodes(),C=0;C<m.length;C++)null==(f=m[C]).getChild()?(f.displacementX+=g,f.displacementY+=u):f.propogateDisplacementToChildren(g,u)},a.prototype.move=function(){var g=this.graphManager.getLayout();(null==this.child||0==this.child.getNodes().length)&&(this.moveBy(this.displacementX,this.displacementY),g.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},a.prototype.setPred1=function(g){this.pred1=g},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(g){this.next=g},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(g){this.processed=g},a.prototype.isProcessed=function(){return processed},n.exports=a},902:(n,c,e)=>{function v(m){if(Array.isArray(m)){for(var f=0,C=Array(m.length);f<m.length;f++)C[f]=m[f];return C}return Array.from(m)}var t=e(806),a=e(551).LinkedList,h=e(551).Matrix,g=e(551).SVD;function u(){}u.handleConstraints=function(m){var f={};f.fixedNodeConstraint=m.constraints.fixedNodeConstraint,f.alignmentConstraint=m.constraints.alignmentConstraint,f.relativePlacementConstraint=m.constraints.relativePlacementConstraint;for(var C=new Map,T=new Map,L=[],x=[],j=m.getAllNodes(),I=0,nt=0;nt<j.length;nt++){var pt=j[nt];null==pt.getChild()&&(T.set(pt.id,I++),L.push(pt.getCenterX()),x.push(pt.getCenterY()),C.set(pt.id,pt))}f.relativePlacementConstraint&&f.relativePlacementConstraint.forEach(function(w){!w.gap&&0!=w.gap&&
1(w.gap=w.left?t.DEFAULT_EDGE_LENGTH+C.get(w.left).getWidth()/2+C.get(w.right).getWidth()/2:t.DEFAULT_EDGE_LENGTH+C.get(w.top).getHeight()/2+C.get(w.bottom).getHeight()/2)});var Dt=function(F){var X=0,b=0;return F.forEach(function(H){X+=L[T.get(H)],b+=x[T.get(H)]}),{x:X/F.size,y:b/F.size}},P=function(F,X,b,H,$){var at=new Map;F.forEach(function(At,vt){at.set(vt,0)}),F.forEach(function(At,vt){At.forEach(function(Ot){at.set(Ot.id,at.get(Ot.id)+1)})});var K=new Map,Q=new Map,Tt=new a;at.forEach(function(At,vt){0==At?(Tt.push(vt),b||K.set(vt,"horizontal"==X?T.has(vt)?L[T.get(vt)]:H.get(vt):T.has(vt)?x[T.get(vt)]:H.get(vt))):K.set(vt,Number.NEGATIVE_INFINITY),b&&Q.set(vt,new Set([vt]))}),b&&$.forEach(function(At){var vt=[];if(At.forEach(function(Ct){b.has(Ct)&&vt.push(Ct)}),vt.length>0){var Ot=0;vt.forEach(function(Ct){"horizontal"==X?(K.set(Ct,T.has(Ct)?L[T.get(Ct)]:H.get(Ct)),Ot+=K.get(Ct)):(K.set(Ct,T.has(Ct)?x[T.get(Ct)]:H.get(Ct)),Ot+=K.get(Ct))}),Ot/=vt.length,At.forEach(function(Ct){b.has(Ct)||K.set(Ct,Ot)})}else{var Et=0;At.forEach(function(Ct){Et+="horizontal"==X?T.has(Ct)?L[T.get(Ct)]:H.get(Ct):T.has(Ct)?x[T.get(Ct)]:H.get(Ct)}),Et/=At.length,At.forEach(function(Ct){K.set(Ct,Et)})}});for(var Nt=function(){var vt=Tt.shift();F.get(vt).forEach(function(Et){if(K.get(Et.id)<K.get(vt)+Et.gap)if(b&&b.has(Et.id)){var Ct;if(Ct="horizontal"==X?T.has(Et.id)?L[T.get(Et.id)]:H.get(Et.id):T.has(Et.id)?x[T.get(Et.id)]:H.get(Et.id),K.set(Et.id,Ct),Ct<K.get(vt)+Et.gap){var Ut=K.get(vt)+Et.gap-Ct;Q.get(vt).forEach(function(xt){K.set(xt,K.get(xt)-Ut)})}}else K.set(Et.id,K.get(vt)+Et.gap);at.set(Et.id,at.get(Et.id)-1),0==at.get(Et.id)&&Tt.push(Et.id),b&&Q.set(Et.id,function dt(At,vt){var Ot=new Set(At),Et=!0,Ct=!1,Ut=void 0;try{for(var St,xt=vt[Symbol.iterator]();!(Et=(St=xt.next()).done);Et=!0)Ot.add(St.value)}catch(Yt){Ct=!0,Ut=Yt}finally{try{!Et&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}return Ot}(Q.get(vt),Q.get(Et.id)))})};0!=Tt.length;)Nt();if(b){var Lt=new Set;F.forEach(function(At,vt){0==At.length&&Lt.add(vt)});var Ft=[];Q.forEach(function(At,vt){if(Lt.has(vt)){var Ot=!1,Et=!0,Ct=!1,Ut=void 0;try{for(var St,xt=At[Symbol.iterator]();!(Et=(St=xt.next()).done);Et=!0)b.has(St.value)&&(Ot=!0)}catch(Gt){Ct=!0,Ut=Gt}finally{try{!Et&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}if(!Ot){var Yt=!1,Vt=void 0;Ft.forEach(function(Gt,Bt){Gt.has([].concat(v(At))[0])&&(Yt=!0,Vt=Bt)}),Yt?At.forEach(function(Gt){Ft[Vt].add(Gt)}):Ft.push(new Set(At))}}}),Ft.forEach(function(At,vt){var Ot=Number.POSITIVE_INFINITY,Et=Number.POSITIVE_INFINITY,Ct=Number.NEGATIVE_INFINITY,Ut=Number.NEGATIVE_INFINITY,xt=!0,St=!1,Ht=void 0;try{for(var Vt,Yt=At[Symbol.iterator]();!(xt=(Vt=Yt.next()).done);xt=!0){var Bt,Gt=Vt.value;Bt="horizontal"==X?T.has(Gt)?L[T.get(Gt)]:H.get(Gt):T.has(Gt)?x[T.get(Gt)]:H.get(Gt);var Qt=K.get(Gt);Bt<Ot&&(Ot=Bt),Bt>Ct&&(Ct=Bt),Qt<Et&&(Et=Qt),Qt>Ut&&(Ut=Qt)}}catch(_t){St=!0,Ht=_t}finally{try{!xt&&Yt.return&&Yt.return()}finally{if(St)throw Ht}}var ee=(Ot+Ct)/2-(Et+Ut)/2,Kt=!0,Jt=!1,qt=void 0;try{for(var te,Zt=At[Symbol.iterator]();!(Kt=(te=Zt.next()).done);Kt=!0){var jt=te.value;K.set(jt,K.get(jt)+ee)}}catch(_t){Jt=!0,qt=_t}finally{try{!Kt&&Zt.return&&Zt.return()}finally{if(Jt)throw qt}}})}return K},Z=function(F){var X=0,b=0,H=0,$=0;if(F.forEach(function(Q){Q.left?L[T.get(Q.left)]-L[T.get(Q.right)]>=0?X++:b++:x[T.get(Q.top)]-x[T.get(Q.bottom)]>=0?H++:$++}),X>b&&H>$)for(var dt=0;dt<T.size;dt++)L[dt]=-1*L[dt],x[dt]=-1*x[dt];else if(X>b)for(var at=0;at<T.size;at++)L[at]=-1*L[at];else if(H>$)for(var K=0;K<T.size;K++)x[K]=-1*x[K]},r=function(F){var X=[],b=new a,H=new Set,$=0;return F.forEach(function(dt,at){if(!H.has(at)){X[$]=[];var K=at;for(b.push(K),H.add(K),X[$].push(K);0!=b.length;)K=b.shift(),F.get(K).forEach(function(Tt){H.has(Tt.id)||(b.push(Tt.id),H.add(Tt.id),X[$].push(Tt.id))});$++}}),X},E=function(F){var X=new Map;return F.forEach(function(b,H){X.set(H,[])}),F.forEach(function(b,H){b.forEach(function($){X.get(H).push($),X.get($.id).push({id:H,gap:$.gap,direction:$.direction})})}),X},l=function(F){var X=new Map;return F.forEach(function(b,H){X.set(H,[])}),F.forEach(function(b,H){b.forEach(function($){X.get($.id).push({id:H,gap:$.gap,direction:$.direction})})}),X},p=[],d=[],R=!1,D=!1,U=new Set,Y=new Map,G=new Map,q=[];if(f.fixedNodeConstraint&&f.fixedNodeConstraint.forEach(function(w){U.add(w.nodeId)}),f.relativePlacementConstraint&&(f.relativePlacementConstraint.forEach(function(w){
1w.left?(Y.has(w.left)?Y.get(w.left).push({id:w.right,gap:w.gap,direction:"horizontal"}):Y.set(w.left,[{id:w.right,gap:w.gap,direction:"horizontal"}]),Y.has(w.right)||Y.set(w.right,[])):(Y.has(w.top)?Y.get(w.top).push({id:w.bottom,gap:w.gap,direction:"vertical"}):Y.set(w.top,[{id:w.bottom,gap:w.gap,direction:"vertical"}]),Y.has(w.bottom)||Y.set(w.bottom,[]))}),G=E(Y),q=r(G)),t.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(w,F){p[F]=[w.position.x,w.position.y],d[F]=[L[T.get(w.nodeId)],x[T.get(w.nodeId)]]}),R=!0;else if(f.alignmentConstraint)!function(){var w=0;if(f.alignmentConstraint.vertical){for(var F=f.alignmentConstraint.vertical,X=function(K){var Q=new Set;F[K].forEach(function(Lt){Q.add(Lt)});var Nt,Tt=new Set([].concat(v(Q)).filter(function(Lt){return U.has(Lt)}));Nt=Tt.size>0?L[T.get(Tt.values().next().value)]:Dt(Q).x,F[K].forEach(function(Lt){p[w]=[Nt,x[T.get(Lt)]],d[w]=[L[T.get(Lt)],x[T.get(Lt)]],w++})},b=0;b<F.length;b++)X(b);R=!0}if(f.alignmentConstraint.horizontal){for(var H=f.alignmentConstraint.horizontal,$=function(K){var Q=new Set;
1H[K].forEach(function(Lt){Q.add(Lt)});var Nt,Tt=new Set([].concat(v(Q)).filter(function(Lt){return U.has(Lt)}));Nt=Tt.size>0?L[T.get(Tt.values().next().value)]:Dt(Q).y,H[K].forEach(function(Lt){p[w]=[L[T.get(Lt)],Nt],d[w]=[L[T.get(Lt)],x[T.get(Lt)]],w++})},dt=0;dt<H.length;dt++)$(dt);R=!0}f.relativePlacementConstraint&&(D=!0)}();else if(f.relativePlacementConstraint){for(var ft=0,V=0,ht=0;ht<q.length;ht++)q[ht].length>ft&&(ft=q[ht].length,V=ht);if(ft<G.size/2)Z(f.relativePlacementConstraint),R=!1,D=!1;else{var J=new Map,O=new Map,z=[];q[V].forEach(function(w){Y.get(w).forEach(function(F){"horizontal"==F.direction?(J.has(w)?J.get(w).push(F):J.set(w,[F]),J.has(F.id)||J.set(F.id,[]),z.push({left:w,right:F.id})):(O.has(w)?O.get(w).push(F):O.set(w,[F]),O.has(F.id)||O.set(F.id,[]),z.push({top:w,bottom:F.id}))})}),Z(z),D=!1;var B=P(J,"horizontal"),ot=P(O,"vertical");q[V].forEach(function(w,F){d[F]=[L[T.get(w)],x[T.get(w)]],p[F]=[],p[F][0]=B.has(w)?B.get(w):L[T.get(w)],p[F][1]=ot.has(w)?ot.get(w):x[T.get(w)]}),R=!0}}if(R){for(var wt,_=h.transpose(p),Pt=h.transpose(d),Rt=0;Rt<_.length;Rt++)_[Rt]=h.multGamma(_[Rt]),Pt[Rt]=h.multGamma(Pt[Rt]);var Wt=h.multMat(_,h.transpose(Pt)),N=g.svd(Wt);wt=h.multMat(N.V,h.transpose(N.U));for(var A=0;A<T.size;A++){var M=[L[A],x[A]],it=[wt[0][1],wt[1][1]];L[A]=h.dotProduct(M,[wt[0][0],wt[1][0]]),x[A]=h.dotProduct(M,it)}D&&Z(f.relativePlacementConstraint)}}if(t.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var et={x:0,y:0};f.fixedNodeConstraint.forEach(function(w,F){var X={x:L[T.get(w.nodeId)],y:x[T.get(w.nodeId)]},H=function(F,X){return{x:F.x-X.x,y:F.y-X.y}}(w.position,X);et.x+=H.x,et.y+=H.y}),et.x/=f.fixedNodeConstraint.length,et.y/=f.fixedNodeConstraint.length,L.forEach(function(w,F){L[F]+=et.x}),x.forEach(function(w,F){x[F]+=et.y}),f.fixedNodeConstraint.forEach(function(w){L[T.get(w.nodeId)]=w.position.x,x[T.get(w.nodeId)]=w.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var st=f.alignmentConstraint.vertical,rt=function(F){var X=new Set;st[F].forEach(function($){X.add($)});var H,b=new Set([].concat(v(X)).filter(function($){return U.has($)}));H=b.size>0?L[T.get(b.values().next().value)]:Dt(X).x,X.forEach(function($){U.has($)||(L[T.get($)]=H)})},k=0;k<st.length;k++)rt(k);if(f.alignmentConstraint.horizontal)for(var tt=f.alignmentConstraint.horizontal,yt=function(F){var X=new Set;tt[F].forEach(function($){X.add($)});var H,b=new Set([].concat(v(X)).filter(function($){return U.has($)}));H=b.size>0?x[T.get(b.values().next().value)]:Dt(X).y,X.forEach(function($){U.has($)||(x[T.get($)]=H)})},ct=0;ct<tt.length;ct++)yt(ct)}f.relativePlacementConstraint&&function(){var w=new Map,F=new Map,X=new Map,b=new Map,H=new Map,$=new Map,dt=new Set,at=new Set;if(U.forEach(function(Xt){dt.add(Xt),at.add(Xt)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var K=f.alignmentConstraint.vertical,Q=function(It){X.set("dummy"+It,[]),K[It].forEach(function(bt){w.set(bt,"dummy"+It),X.get("dummy"+It).push(bt),U.has(bt)&&dt.add("dummy"+It)}),H.set("dummy"+It,L[T.get(K[It][0])])},Tt=0;Tt<K.length;Tt++)Q(Tt);if(f.alignmentConstraint.horizontal)for(var Nt=f.alignmentConstraint.horizontal,Lt=function(It){b.set("dummy"+It,[]),Nt[It].forEach(function(bt){F.set(bt,"dummy"+It),b.get("dummy"+It).push(bt),U.has(bt)&&at.add("dummy"+It)}),$.set("dummy"+It,x[T.get(Nt[It][0])])},Ft=0;Ft<Nt.length;Ft++)Lt(Ft)}var At=new Map,vt=new Map,Ot=function(It){Y.get(It).forEach(function(bt){var $t=void 0,zt=void 0;"horizontal"==bt.direction?($t=w.get(It)?w.get(It):It,zt=w.get(bt.id)?{id:w.get(bt.id),gap:bt.gap,direction:bt.direction}:bt,At.has($t)?At.get($t).push(zt):At.set($t,[zt]),At.has(zt.id)||At.set(zt.id,[])):($t=F.get(It)?F.get(It):It,zt=F.get(bt.id)?{id:F.get(bt.id),gap:bt.gap,direction:bt.direction}:bt,vt.has($t)?vt.get($t).push(zt):vt.set($t,[zt]),vt.has(zt.id)||vt.set(zt.id,[]))})},Et=!0,Ct=!1,Ut=void 0;try{for(var St,xt=Y.keys()[Symbol.iterator]();!(Et=(St=xt.next()).done);Et=!0)Ot(St.value)}catch(Xt){Ct=!0,Ut=Xt}finally{try{!Et&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}var Yt=E(At),Vt=E(vt),Gt=r(Yt),Bt=r(Vt),Qt=l(At),ee=l(vt),Kt=[],Jt=[];Gt.forEach(function(Xt,It){Kt[It]=[],Xt.forEach(function(bt){0==Qt.get(bt).length&&Kt[It].push(bt)})}),Bt.forEach(function(Xt,It){Jt[It]=[],Xt.forEach(function(bt){0==ee.get(bt).length&&Jt[It].push(bt)})});var qt=P(At,"horizontal",dt,H,Kt),Zt=P(vt,"vertical",at,$,Jt),te=function(It){X.get(It)?X.get(It).forEach(function(bt){L[T.get(bt)]=qt.get(It)}):L[T.get(It)]=qt.get(It)},jt=!0,_t=!1,oe=void 0;try{for(var se,re=qt.keys()[Symbol.iterator]();!(jt=(se=re.next()).done);
1jt=!0)te(se.value)}catch(Xt){_t=!0,oe=Xt}finally{try{!jt&&re.return&&re.return()}finally{if(_t)throw oe}}var ce=function(It){b.get(It)?b.get(It).forEach(function(bt){x[T.get(bt)]=Zt.get(It)}):x[T.get(It)]=Zt.get(It)},ae=!0,he=!1,le=void 0;try{for(var fe,ne=Zt.keys()[Symbol.iterator]();!(ae=(fe=ne.next()).done);ae=!0)ce(fe.value)}catch(Xt){he=!0,le=Xt}finally{try{!ae&&ne.return&&ne.return()}finally{if(he)throw le}}}()}for(var mt=0;mt<j.length;mt++){var lt=j[mt];null==lt.getChild()&<.setCenter(L[T.get(lt.id)],x[T.get(lt.id)])}},n.exports=u},551:n=>{n.exports=S}},o={};return function s(n){var c=o[n];if(void 0!==c)return c.exports;var e=o[n]={exports:{}};return y[n](e,e.exports,s),e.exports}(45)})())},46148:function(kt){kt.exports=function(gt){var Mt={};function S(y){if(Mt[y])return Mt[y].exports;var o=Mt[y]={i:y,l:!1,exports:{}};return gt[y].call(o.exports,o,o.exports,S),o.l=!0,o.exports}return S.m=gt,S.c=Mt,S.i=function(y){return y},S.d=function(y,o,s){S.o(y,o)||Object.defineProperty(y,o,{configurable:!1,enumerable:!0,get:s})},S.n=function(y){var o=y&&y.__esModule?function(){return y.default}:function(){return y};return S.d(o,"a",o),o},S.o=function(y,o){return Object.prototype.hasOwnProperty.call(y,o)},S.p="",S(S.s=28)}([function(gt,Mt,S){"use strict";function y(){}y.QUALITY=1,y.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,y.DEFAULT_INCREMENTAL=!1,y.DEFAULT_ANIMATION_ON_LAYOUT=!0,y.DEFAULT_ANIMATION_DURING_LAYOUT=!1,y.DEFAULT_ANIMATION_PERIOD=50,y.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,y.DEFAULT_GRAPH_MARGIN=15,y.NODE_DIMENSIONS_INCLUDE_LABELS=!1,y.SIMPLE_NODE_HALF_SIZE=(y.SIMPLE_NODE_SIZE=40)/2,y.EMPTY_COMPOUND_NODE_SIZE=40,y.MIN_EDGE_LENGTH=1,y.INITIAL_WORLD_BOUNDARY=(y.WORLD_BOUNDARY=1e6)/1e3,y.WORLD_CENTER_X=1200,y.WORLD_CENTER_Y=900,gt.exports=y},function(gt,Mt,S){"use strict";var y=S(2),o=S(8),s=S(9);function i(c,e,v){y.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=c,this.target=e}for(var n in i.prototype=Object.create(y.prototype),y)i[n]=y[n];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(c){if(this.source===c)return this.target;if(this.target===c)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(c,e){for(var v=this.getOtherEnd(c),t=e.getGraphManager().getRoot();;){if(v.getOwner()==e)return v;if(v.getOwner()==t)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var c=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),c),this.isOverlapingSourceAndTarget||(this.lengthX=c[0]-c[2],this.lengthY=c[1]-c[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},gt.exports=i},function(gt,Mt,S){"use strict";gt.exports=function y(o){this.vGraphObject=o}},function(gt,Mt,S){"use strict";var y=S(2),o=S(10),s=S(13),i=S(0),n=S(16),c=S(5);function e(t,a,h,g){null==h&&null==g&&(g=a),y.call(this,g),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=t,this.rect=null!=h&&null!=a?new s(a.x,a.y,h.width,h.height):new s}for(var v in e.prototype=Object.create(y.prototype),y)e[v]=y[v];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,a){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=a.width,this.rect.height=a.height},e.prototype.setCenter=function(t,a){this.rect.x=t-this.rect.width/2,this.rect.y=a-this.rect.height/2},e.prototype.setLocation=function(t,a){this.rect.x=t,this.rect.y=a},e.prototype.moveBy=function(t,a){this.rect.x+=t,this.rect.y+=a},e.prototype.getEdgeListToNode=function(t){var a=[],g=this;
1return g.edges.forEach(function(u){if(u.target==t){if(u.source!=g)throw"Incorrect edge source!";a.push(u)}}),a},e.prototype.getEdgesBetween=function(t){var a=[],g=this;return g.edges.forEach(function(u){if(u.source!=g&&u.target!=g)throw"Incorrect edge source and/or target";(u.target==t||u.source==t)&&a.push(u)}),a},e.prototype.getNeighborsList=function(){var t=new Set,a=this;return a.edges.forEach(function(h){if(h.source==a)t.add(h.target);else{if(h.target!=a)throw"Incorrect incidency!";t.add(h.source)}}),t},e.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var g=this.child.getNodes(),u=0;u<g.length;u++)g[u].withChildren().forEach(function(m){t.add(m)});return t},e.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var h=this.child.getNodes(),g=0;g<h.length;g++)t+=h[g].getNoOfChildren();return 0==t&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){return null==this.child?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)},e.prototype.scatter=function(){var t,a,h=-i.INITIAL_WORLD_BOUNDARY,g=i.INITIAL_WORLD_BOUNDARY;t=i.WORLD_CENTER_X+n.nextDouble()*(g-h)+h;var u=-i.INITIAL_WORLD_BOUNDARY,m=i.INITIAL_WORLD_BOUNDARY;a=i.WORLD_CENTER_Y+n.nextDouble()*(m-u)+u,this.rect.x=t,this.rect.y=a},e.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){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()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var a=t.getRight()-t.getLeft(),h=t.getBottom()-t.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(a+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>a?(this.rect.x-=(this.labelWidth-a)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(a+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(h+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>h?(this.rect.y-=(this.labelHeight-h)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(h+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var a=this.rect.x;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var h=this.rect.y;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var g=new c(a,h),u=t.inverseTransformPoint(g);this.setLocation(u.x,u.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},gt.exports=e},function(gt,Mt,S){"use strict";var y=S(0);function o(){}for(var s in y)o[s]=y[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT=3*(o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,gt.exports=o},function(gt,Mt,S){"use strict";function y(o,s){null==o&&null==s?(this.x=0,this.y=0):(this.x=o,this.y=s)}y.prototype.getX=function(){return this.x},y.prototype.getY=function(){return this.y},y.prototype.setX=function(o){this.x=o},y.prototype.setY=function(o){this.y=o},y.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},y.prototype.getCopy=function(){return new y(this.x,this.y)},y.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},gt.exports=y},function(gt,Mt,S){"use strict";var y=S(2),o=S(10),s=S(0),i=S(7),n=S(3),c=S(1),e=S(13),v=S(12),t=S(11);function a(g,u,m){y.call(this,m),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,null!=u&&u instanceof i?this.graphManager=u:null!=u&&u instanceof Layout&&(this.graphManager=u.graphManager)}for(var h in a.prototype=Object.create(y.prototype),y)a[h]=y[h];a.prototype.getNodes=function(){return this.nodes},a.prototype.getEdges=function(){return this.edges},a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getParent=function(){return this.parent},a.prototype.getLeft=function(){return this.left},a.prototype.getRight=function(){return this.right},a.prototype.getTop=function(){return this.top},a.prototype.getBottom=function(){return this.bottom},a.prototype.isConnected=function(){return this.isConnected},a.prototype.add=function(g,u,m){if(null==u&&null==m){var f=g;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(f)>-1)throw"Node already in graph!";return f.owner=this,this.getNodes().push(f),f}var C=g;if(!(this.getNodes().indexOf(u)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(u.owner!=m.owner||u.owner!=this)throw"Both owners must be this graph!";return u.owner!=m.owner?null:(C.source=u,C.target=m,C.isInterGraph=!1,this.getEdges().push(C),u.edges.push(C),m!=u&&m.edges.push(C),C)},a.prototype.remove=function(g){var u=g;if(g instanceof n){if(null==u)throw"Node is null!";
1if(null==u.owner||u.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var m=u.edges.slice(),C=m.length,T=0;T<C;T++)(f=m[T]).isInterGraph?this.graphManager.remove(f):f.source.owner.remove(f);if(-1==(L=this.nodes.indexOf(u)))throw"Node not in owner node list!";this.nodes.splice(L,1)}else if(g instanceof c){var f;if(null==(f=g))throw"Edge is null!";if(null==f.source||null==f.target)throw"Source and/or target is null!";if(null==f.source.owner||null==f.target.owner||f.source.owner!=this||f.target.owner!=this)throw"Source and/or target owner is invalid!";var L,x=f.source.edges.indexOf(f),j=f.target.edges.indexOf(f);if(!(x>-1&&j>-1))throw"Source and/or target doesn't know this edge!";if(f.source.edges.splice(x,1),f.target!=f.source&&f.target.edges.splice(j,1),-1==(L=f.source.owner.getEdges().indexOf(f)))throw"Not in owner's edge list!";f.source.owner.getEdges().splice(L,1)}},a.prototype.updateLeftTop=function(){for(var m,f,C,g=o.MAX_VALUE,u=o.MAX_VALUE,T=this.getNodes(),L=T.length,x=0;x<L;x++){var j=T[x];g>(m=j.getTop())&&(g=m),u>(f=j.getLeft())&&(u=f)}return g==o.MAX_VALUE?null:(C=null!=T[0].getParent().paddingLeft?T[0].getParent().paddingLeft:this.margin,this.left=u-C,this.top=g-C,new v(this.left,this.top))},a.prototype.updateBounds=function(g){for(var T,L,x,j,I,u=o.MAX_VALUE,m=-o.MAX_VALUE,f=o.MAX_VALUE,C=-o.MAX_VALUE,nt=this.nodes,pt=nt.length,ut=0;ut<pt;ut++){var Dt=nt[ut];g&&null!=Dt.child&&Dt.updateBounds(),u>(T=Dt.getLeft())&&(u=T),m<(L=Dt.getRight())&&(m=L),f>(x=Dt.getTop())&&(f=x),C<(j=Dt.getBottom())&&(C=j)}var P=new e(u,f,m-u,C-f);u==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),I=null!=nt[0].getParent().paddingLeft?nt[0].getParent().paddingLeft:this.margin,this.left=P.x-I,this.right=P.x+P.
1width+I,this.top=P.y-I,this.bottom=P.y+P.height+I},a.calculateBounds=function(g){for(var T,L,x,j,u=o.MAX_VALUE,m=-o.MAX_VALUE,f=o.MAX_VALUE,C=-o.MAX_VALUE,I=g.length,nt=0;nt<I;nt++){var pt=g[nt];u>(T=pt.getLeft())&&(u=T),m<(L=pt.getRight())&&(m=L),f>(x=pt.getTop())&&(f=x),C<(j=pt.getBottom())&&(C=j)}return new e(u,f,m-u,C-f)},a.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){for(var g=0,u=this.nodes,m=u.length,f=0;f<m;f++)g+=u[f].calcEstimatedSize();return this.estimatedSize=0==g?s.EMPTY_COMPOUND_NODE_SIZE:g/Math.sqrt(this.nodes.length),this.estimatedSize},a.prototype.updateConnected=function(){var g=this;if(0!=this.nodes.length){var C,T,u=new t,m=new Set,f=this.nodes[0];for(f.withChildren().forEach(function(ut){u.push(ut),m.add(ut)});0!==u.length;)for(var x=(C=(f=u.shift()).getEdges()).length,j=0;j<x;j++)null==(T=C[j].getOtherEndInGraph(f,this))||m.has(T)||T.withChildren().forEac
1h(function(ut){u.push(ut),m.add(ut)});if(this.isConnected=!1,m.size>=this.nodes.length){var pt=0;m.forEach(function(ut){ut.owner==g&&pt++}),pt==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},gt.exports=a},function(gt,Mt,S){"use strict";var y,o=S(1);function s(i){y=S(6),this.layout=i,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var i=this.layout.newGraph(),n=this.layout.newNode(null),c=this.add(i,n);return this.setRootGraph(c),this.rootGraph},s.prototype.add=function(i,n,c,e,v){if(null==c&&null==e&&null==v){if(null==i)throw"Graph is null!";if(null==n)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),null!=i.parent)throw"Already has a parent!";if(null!=n.child)throw"Already has a child!";return i.parent=n,n.child=i,i}v=c,c=i;var t=(e=n).getOwner(),a=v.getOwner();if(null==t||t.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(t==a)return c.isInterGraph=!1,t.add(c,e,v);if(c.isInterGraph=!0,c.source=e,c.target=v,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),null==c.source||null==c.target)throw"Edge source and/or target is null!";if(-1!=c.source.edges.indexOf(c)||-1!=c.target.edges.indexOf(c))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c},s.prototype.remove=function(i){if(i instanceof y){var n=i;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(null==n.parent||n.parent.graphManager!=this))throw"Invalid parent node!";for(var e,c=[],v=(c=c.concat(n.getEdges())).length,t=0;t<v;t++)n.remove(e=c[t]);var a=[];for(v=(a=a.concat(n.getNodes())).length,t=0;t<v;t++)n.remove(a[t]);n==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(n);this.graphs.splice(g,1),n.parent=null}else if(i instanceof o){if(null==(e=i))throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(null==e.source||null==e.target)throw"Source and/or target is null!";if(-1==e.source.edges.indexOf(e)||-1==e.target.edges.indexOf(e))throw"Source and/or target doesn't know this edge!";if(g=e.source.edges.indexOf(e),e.source.edges.splice(g,1),g=e.target.edges.indexOf(e),e.target.edges.splice(g,1),null==e.source.owner||null==e.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==e.source.owner.getGraphManager().edges.indexOf(e))throw"Not in owner graph manager's edge list!";g=e.source.owner.getGraphManager().edges.indexOf(e),e.source.owner.getGraphManager().edges.splice(g,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(null==this.allNodes){for(var i=[],n=this.getGraphs(),c=n.length,e=0;e<c;e++)i=i.concat(n[e].getNodes());this.allNodes=i}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(null==this.allEdges){for(var i=[],n=this.getGraphs(),e=0;e<n.length;e++)i=i.concat(n[e].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(i){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=i},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,null==i.parent&&(i.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(i,n){if(null==i||null==n)throw"assert failed";if(i==n)return!0;for(var e,c=i.getOwner();null!=(e=c.getParent());){if(e==n)return!0;if(null==(c=e.getOwner()))break}for(c=n.getOwner();null!=(e=c.getParent());){if(e==i)return!0;
1if(null==(c=e.getOwner()))break}return!1},s.prototype.calcLowestCommonAncestors=function(){for(var i,n,c,e,v,t=this.getAllEdges(),a=t.length,h=0;h<a;h++)if(n=(i=t[h]).source,c=i.target,i.lca=null,i.sourceInLca=n,i.targetInLca=c,n!=c){for(e=n.getOwner();null==i.lca;){for(i.targetInLca=c,v=c.getOwner();null==i.lca;){if(v==e){i.lca=v;break}if(v==this.rootGraph)break;if(null!=i.lca)throw"assert failed";i.targetInLca=v.getParent(),v=i.targetInLca.getOwner()}if(e==this.rootGraph)break;null==i.lca&&(i.sourceInLca=e.getParent(),e=i.sourceInLca.getOwner())}if(null==i.lca)throw"assert failed"}else i.lca=n.getOwner()},s.prototype.calcLowestCommonAncestor=function(i,n){if(i==n)return i.getOwner();for(var c=i.getOwner();null!=c;){for(var e=n.getOwner();null!=e;){if(e==c)return e;e=e.getParent().getOwner()}c=c.getParent().getOwner()}return c},s.prototype.calcInclusionTreeDepths=function(i,n){null==i&&null==n&&(i=this.rootGraph,n=1);for(var c,e=i.getNodes(),v=e.length,t=0;t<v;t++)(c=e[t]).inclusionTreeDepth=n,null!=c.child&&this.calcInclusionTreeDepths(c.child,n+1)},s.prototype.includesInvalidEdge=function(){for(var i,n=[],c=this.edges.length,e=0;e<c;e++)this.isOneAncestorOfOther((i=this.edges[e]).source,i.target)&&n.push(i);for(e=0;e<n.length;e++)this.remove(n[e]);return!1},gt.exports=s},function(gt,Mt,S){"use strict";var y=S(12);function o(){}o.calcSeparationAmount=function(s,i,n,c){if(!s.intersects(i))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(s,i,e),n[0]=Math.min(s.getRight(),i.getRight())-Math.max(s.x,i.x),n[1]=Math.min(s.getBottom(),i.getBottom())-Math.max(s.y,i.y),s.getX()<=i.getX()&&s.getRight()>=i.getRight()?n[0]+=Math.min(i.getX()-s.getX(),s.getRight()-i.getRight()):i.getX()<=s.getX()&&i.getRight()>=s.getRight()&&(n[0]+=Math.min(s.getX()-i.getX(),i.getRight()-s.getRight())),s.getY()<=i.getY()&&s.getBottom()>=i.getBottom()?n[1]+=Math.min(i.getY()-s.getY(),s.getBottom()-i.getBottom()):i.getY()<=s.getY()&&i.getBottom()>=s.getBottom()&&(n[1]+=Math.min(s.getY()-i.getY(),i.getBottom()-s.getBottom()));var v=Math.abs((i.getCenterY()-s.getCenterY())/(i.getCenterX()-s.getCenterX()));i.getCenterY()===s.getCenterY()&&i.getCenterX()===s.getCenterX()&&(v=1);var t=v*n[0],a=n[1]/v;n[0]<a?a=n[0]:t=n[1],n[0]=-1*e[0]*(a/2+c),n[1]=-1*e[1]*(t/2+c)},o.decideDirectionsForOverlappingNodes=function(s,i,n){n[0]=s.getCenterX()<i.getCenterX()?-1:1,n[1]=s.getCenterY()<i.getCenterY()?-1:1},o.getIntersection2=function(s,i,n){var c=s.getCenterX(),e=s.getCenterY(),v=i.getCenterX(),t=i.getCenterY();if(s.intersects(i))return n[0]=c,n[1]=e,n[2]=v,n[3]=t,!0;var a=s.getX(),h=s.getY(),g=s.getRight(),u=s.getX(),m=s.getBottom(),f=s.getRight(),C=s.getWidthHalf(),T=s.getHeightHalf(),L=i.getX(),x=i.getY(),j=i.getRight(),I=i.getX(),nt=i.getBottom(),pt=i.getRight(),ut=i.getWidthHalf(),Dt=i.getHeightHalf(),P=!1,Z=!1;if(c===v){if(e>t)return n[0]=c,n[1]=h,n[2]=v,n[3]=nt,!1;if(e<t)return n[0]=c,n[1]=m,n[2]=v,n[3]=x,!1}else if(e===t){if(c>v)return n[0]=a,n[1]=e,n[2]=j,n[3]=t,!1;if(c<v)return n[0]=g,n[1]=e,n[2]=L,n[3]=t,!1}else{var r=s.height/s.width,E=i.height/i.width,l=(t-e)/(v-c),p=void 0,d=void 0,D=void 0,Y=void 0;if(-r===l?c>v?(n[0]=u,n[1]=m,P=!0):(n[0]=g,n[1]=h,P=!0):r===l&&(c>v?(n[0]=a,n[1]=h,P=!0):(n[0]=f,n[1]=m,P=!0)),-E===l?v>c?(n[2]=I,n[3]=nt,Z=!0):(n[2]=j,n[3]=x,Z=!0):E===l&&(v>c?(n[2]=L,n[3]=x,Z=!0):(n[2]=pt,n[3]=nt,Z=!0)),P&&Z)return!1;if(c>v?e>t?(p=this.getCardinalDirection(r,l,4),d=this.getCardinalDirection(E,l,2)):(p=this.getCardinalDirection(-r,l,3),d=this.getCardinalDirection(-E,l,1)):e>t?(p=this.getCardinalDirection(-r,l,1),d=this.getCardinalDirection(-E,l,3)):(p=this.getCardinalDirection(r,l,2),d=this.getCardinalDirection(E,l,4)),!P)switch(p){case 1:D=h,n[0]=c+-T/l,n[1]=D;break;case 2:D=e+C*l,n[0]=f,n[1]=D;break;case 3:D=m,n[0]=c+T/l,n[1]=D;break;case 4:D=e+-C*l,n[0]=u,n[1]=D}if(!Z)switch(d){case 1:Y=x,n[2]=v+-Dt/l,n[3]=Y;break;case 2:Y=t+ut*l,n[2]=pt,n[3]=Y;break;case 3:Y=nt,n[2]=v+Dt/l,n[3]=Y;break;case 4:Y=t+-ut*l,n[2]=I,n[3]=Y}}return!1},o.getCardinalDirection=function(s,i,n){return s>i?n:1+n%4},o.getIntersection=function(s,i,n,c){if(null==c)return this.getIntersection2(s,i,n);var T,L,x,j,I,nt,pt,e=s.x,v=s.y,t=i.x,a=i.y,h=n.x,g=n.y,u=c.x,m=c.y;return I=t*v-e*a,nt=u*g-h*m,0==(pt=(T=a-v)*(j=h-u)-(L=m-g)*(x=e-t))?null:new y((x*nt-j*I)/pt,(L*I-T*nt)/pt)},o.angleOfVector=function(s,i,n,c){var e=void 0;return s!==n?(e=Math.atan((c-i)/(n-s)),n<s?e+=Math.PI:c<i&&(e+=this.TWO_PI)):e=c<i?this.ONE_AND_HALF_PI:this.HALF_PI,e},o.doIntersect=function(s,i,n,c){var e=s.x,v=s.y,t=i.x,a=i.y,h=n.x,g=n.y,u=c.x,m=c.y,f=(t-e)*(m-g)-(u-h)*(a-v);if(0===f)return!1;var C=((m-g)*(u-e)+(h-u)*(m-v))/f,T=((v-a)*(u-e)+(t-e)*(m-v))/f;return 0<C&&C<1&&0<T&&T<1},o.findCircleLineIntersections=function(s,i,n,c,e,v,t){var a=(n-s)*(n-s)+(c-i)*(c-i),h=2*((s-e)*(n-s)+(i-v)*(c-i)),g=(s-e)*(s-e)+(i-v)*(i-v)-t*t;if(h*h-4*a*g>=0){var m=(-h+Math.sqrt(h*h-4*a*g))/(2*a),f=(-h-Math.sqrt(h*h-4*a*g))/(2*a);return m>=0&&m<=1?[m]:f>=0&&f<=1?[f]:null}return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,gt.exports=o},function(gt,Mt,S){"use strict";function y(){}y.sign=function(o){return o>0?1:o<0?-1:0},y.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},y.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},gt.exports=y},function(gt,Mt,S){"use strict";function y(){}y.MAX_VALUE=2147483647,y.MIN_VALUE=-2147483648,gt.exports=y},function(gt,Mt,S){"use strict";var y=function(){function e(v,t){for(var a=0;a<t.length;a++){var h=t[a];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}return function(v,t,a){return t&&e(v.prototype,t),a&&e(v,a),v}}();var s=function(v){return{value:v,next:null,prev:null}},i=function(v,t,a,h){return null!==v?v.next=t:h.head=t,null!==a?a.prev=t:h.tail=t,t.prev=v,t.next=a,h.length++,t},n=function(v,t){var a=v.prev,h=v.next;return null!==a?a.next=h:t.head=h,null!==h?h.prev=a:t.tail=a,v.prev=v.next=null,t.length--,v},c=function(){function e(v){var t=this;(function o(e,v){if(!(e instanceof v))throw new TypeError("Cannot call a class as a function")})(this,e),this.length=0,this.head=null,this.tail=null,v?.forEach(function(a){return t.push(a)})}return y(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,a){return i(a.prev,s(t),a,this)}},{key:"insertAfter",value:function(t,a){return i(a,s(t),a.next,this)}},{key:"insertNodeBefore",value:function(t,a){return i(a.prev,t,a,this)}},{key:"insertNodeAfter",value:function(t,a){return i(a,t,a.next,this)}},{key:"push",value:function(t){return i(this.tail,s(t),null,this)}},{key:"unshift",value:function(t){return i(null,s(t),this.head,this)}},{key:"remove",value:function(t){return n(t,this)}},{key:"pop",value:function(){return n(this.tail,this).value}},{key:"popNode",value:function(){return n(this.tail,this)}},{key:"shift",value:function(){return n(this.head,this).value}},{key:"shiftNode",value:function(){return n(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var a=1,h=this.head;a<t;)h=h.next,a++;return h.value}}},{key:"set_object_at",value:function(t,a){if(t<=this.length()){for(var h=1,g=this.head;h<t;)g=g.next,h++;g.value=a}}}]),e}();gt.exports=c},function(gt,Mt,S){"use strict";function y(o,s,i){this.x=null,this.y=null,null==o&&null==s&&null==i?(this.x=0,this.y=0):"number"==typeof o&&"number"==typeof s&&null==i?(this.x=o,this.y=s):"Point"==o.constructor.name&&null==s&&null==i&&(this.x=(i=o).x,this.y=i.y)}y.prototype.getX=function(){return this.x},y.prototype.getY=function(){return this.y},y.prototype.getLocation=function(){return new y(this.x,this.y)},y.prototype.setLocation=function(o,s,i){"Point"==o.constructor.name&&null==s&&null==i?this.setLocation((i=o).x,i.y):"number"==typeof o&&"number"==typeof s&&null==i&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},y.prototype.move=function(o,s){this.x=o,this.y=s},y.prototype.translate=function(o,s){this.x+=o,this.y+=s},y.prototype.equals=function(o){return"Point"==o.constructor.name?this.x==o.x&&this.y==o.y:this==o},y.prototype.toString=function(){return(new y).constructor.name+"[x="+this.x+",y="+this.y+"]"},gt.exports=y},function(gt,Mt,S){"use strict";function y(o,s,i,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=o&&null!=s&&null!=i&&null!=n&&(this.x=o,this.y=s,this.width=i,this.height=n)}y.prototype.getX=function(){return this.x},y.prototype.setX=function(o){this.x=o},y.prototype.getY=function(){return this.y},y.prototype.setY=function(o){this.y=o},y.prototype.getWidth=function(){return this.width},y.prototype.setWidth=function(o){this.width=o},y.prototype.getHeight=function(){return this.height},y.prototype.setHeight=function(o){this.height=o},y.prototype.getRight=function(){return this.x+this.width},y.prototype.getBottom=function(){return this.y+this.height},y.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},y.prototype.getCenterX=function(){return this.x+this.width/2},y.prototype.getMinX=function(){return this.getX()},y.prototype.getMaxX=function(){return this.getX()+this.width},y.prototype.getCenterY=function(){return this.y+this.height/2},y.prototype.getMinY=function(){return this.getY()},y.prototype.getMaxY=function(){return this.getY()+this.height},y.prototype.getWidthHalf=function(){return this.width/2},y.prototype.getHeightHalf=function(){return this.height/2},gt.exports=y},function(gt,Mt,S){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(null!=s.uniqueID||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return null==s&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var i=typeof s>"u"?"undefined":y(s);return null==s||"object"!=i&&"function"!=i},gt.exports=o},function(gt,Mt,S){"use strict";function y(h){if(Array.isArray(h)){for(var g=0,u=Array(h.length);g<h.length;g++)u[g]=h[g];return u}return Array.from(h)}var o=S(0),s=S(7),i=S(3),n=S(1),c=S(6),e=S(5),v=S(17),t=S(29);function a(h){t.call(this),this.layoutQuality=o.QUALITY,this.createBen
1dsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=h&&(this.isRemoteUse=h)}a.RANDOM_SEED=1,(a.prototype=Object.create(t.prototype)).getGraphManager=function(){return this.graphManager},a.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},a.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},a.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},a.prototype.newGraphManager=function(){var h=new s(this);return this.graphManager=h,h},a.prototype.newGraph=function(h){return new c(null,this.graphManager,h)},a.prototype.newNode=function(h){return new i(this.graphManager,h)},a.prototype.newEdge=function(h){return new n(null,null,h)},a.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},a.prototype.runLayout=function(){var h;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),h=!this.checkLayoutSuccess()&&this.layout(),"during"!==o.ANIMATE&&(h&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,h)},a.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},a.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),u=0;u<g.length;u++);var f=this.graphManager.getRoot().getNodes();for(u=0;u<f.length;u++);this.update(this.graphManager.getRoot())}},a.prototype.update=function(h){if(null==h)this.update2();else if(h instanceof i){var g=h;if(null!=g.getChild())for(var u=g.getChild().getNodes(),m=0;m<u.length;m++)update(u[m]);null!=g.vGraphObject&&g.vGraphObject.update(g)}else h instanceof n?null!=h.vGraphObject&&h.vGraphObject.update(h):h instanceof c&&null!=h.vGraphObject&&h.vGraphObject.update(h)},a.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},a.prototype.transform=function(h){if(null==h)this.transform(new e(0,0));else{var g=new v,u=this.graphManager.getRoot().updateLeftTop();if(null!=u){g.setWorldOrgX(h.x),g.setWorldOrgY(h.y),g.setDeviceOrgX(u.x),g.setDeviceOrgY(u.y);for(var m=this.getAllNodes(),C=0;C<m.length;C++)m[C].transform(g)}}},a.prototype.positionNodesRandomly=function(h){if(null==h)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,u,m=h.getNodes(),f=0;f<m.length;f++)null==(u=(g=m[f]).getChild())||0==u.getNodes().length?g.scatter():(this.positionNodesRandomly(u),g.updateBounds())},a.prototype.getFlatForest=function(){for(var h=[],g=!0,u=this.graphManager.getRoot().getNodes(),m=!0,f=0;f<u.length;f++)null!=u[f].getChild()&&(m=!1);if(!m)return h;var C=new Set,T=[],L=new Map,x=[];for(x=x.concat(u);x.length>0&&g;){for(T.push(x[0]);T.length>0&&g;){var j=T[0];T.splice(0,1),C.add(j);var I=j.getEdges();for(f=0;f<I.length;f++){var nt=I[f].getOtherEnd(j);if(L.get(j)!=nt){if(C.has(nt)){g=!1;break}T.push(nt),L.set(nt,j)}}}if(g){var pt=[].concat(y(C));for(h.push(pt),f=0;f<pt.length;f++){var Dt=x.indexOf(pt[f]);Dt>-1&&x.splice(Dt,1)}C=new Set,L=new Map}else h=[]}return h},a.prototype.createDummyNodesForBendpoints=function(h){for(var g=[],u=h.source,m=this.graphManager.calcLowestCommonAncestor(h.source,h.target),f=0;f<h.bendpoints.length;f++){var C=this.newNode(null);C.setRect(new Point(0,0),new Dimension(1,1)),m.add(C);var T=this.newEdge(null);this.graphManager.add(T,u,C),g.add(C),u=C}return T=this.newEdge(null),this.graphManager.add(T,u,h.target),this.edgeToDummyNodes.set(h,g),h.isInterGraph()?this.graphManager.remove(h):m.remove(h),g}
1,a.prototype.createBendpointsFromDummyNodes=function(){var h=[];h=h.concat(this.graphManager.getAllEdges()),h=[].concat(y(this.edgeToDummyNodes.keys())).concat(h);for(var g=0;g<h.length;g++){var u=h[g];if(u.bendpoints.length>0){for(var m=this.edgeToDummyNodes.get(u),f=0;f<m.length;f++){var C=m[f],T=new e(C.getCenterX(),C.getCenterY()),L=u.bendpoints.get(f);L.x=T.x,L.y=T.y,C.getOwner().remove(C)}this.graphManager.add(u,u.source,u.target)}}},a.transform=function(h,g,u,m){if(null!=u&&null!=m){var f=g;return h<=50?f-=(g-g/u)/50*(50-h):f+=(g*m-g)/50*(h-50),f}var L,x;return h<=50?(L=9*g/500,x=g/10):(L=9*g/50,x=-8*g),L*h+x},a.findCenterOfTree=function(h){var g=[];g=g.concat(h);var u=[],m=new Map,f=!1,C=null;(1==g.length||2==g.length)&&(f=!0,C=g[0]);for(var T=0;T<g.length;T++){var x=(L=g[T]).getNeighborsList().size;m.set(L,L.getNeighborsList().size),1==x&&u.push(L)}var j=[];for(j=j.concat(u);!f;){var I=[];for(I=I.concat(j),j=[],T=0;T<g.length;T++){var L,nt=g.indexOf(L=g[T]);nt>=0&&g.splice(nt,1),L.getNeighborsList().forEach(function(P){if(u.indexOf(P)<0){var r=m.get(P)-1;1==r&&j.push(P),m.set(P,r)}})}u=u.concat(j),(1==g.length||2==g.length)&&(f=!0,C=g[0])}return C},a.prototype.setGraphManager=function(h){this.graphManager=h},gt.exports=a},function(gt,Mt,S){"use strict";function y(){}y.seed=1,y.x=0,y.nextDouble=function(){return(y.x=1e4*Math.sin(y.seed++))-Math.floor(y.x)},gt.exports=y},function(gt,Mt,S){"use strict";var y=S(5);function o(s,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var i=0,n=this.lworldExtX;return 0!=n&&(i=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/n),i},o.prototype.transformY=function(s){var i=0,n=this.lworldExtY;return 0!=n&&(i=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/n),i},o.prototype.inverseTransformX=function(s){var i=0,n=this.ldeviceExtX;return 0!=n&&(i=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/n),i},o.prototype.inverseTransformY=function(s){var i=0,n=this.ldeviceExtY;return 0!=n&&(i=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/n),i},o.prototype.inverseTransformPoint=function(s){return new y(this.inverseTransformX(s.x),this.inverseTransformY(s.y))},gt.exports=o},function(gt,Mt,S){"use strict";var o=S(15),s=S(4),i=S(0),n=S(8),c=S(9);function e(){o.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}for(var v in e.prototype=Object.create(o.prototype),o)e[v]=o[v];e.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]}
1,e.prototype.calcIdealEdgeLengths=function(){for(var t,a,h,g,u,m,f,C=this.getGraphManager().getAllEdges(),T=0;T<C.length;T++)a=(t=C[T]).idealLength,t.isInterGraph&&(g=t.getSource(),u=t.getTarget(),m=t.getSourceInLca().getEstimatedSize(),f=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=m+f-2*i.SIMPLE_NODE_SIZE),h=t.getLca().getInclusionTreeDepth(),t.idealLength+=a*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+u.getInclusionTreeDepth()-2*h))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>s.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=t>s.ADAPTATION_LOWER_NODE_LIMIT?Math.max(s.COOLING_ADAPTATION_FACTOR,1-(t-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var a,t=this.getAllEdges(),h=0;h<t.length;h++)this.calcSpringForce(a=t[h],a.idealLength)},e.prototype.calcRepulsionForces=function(){var h,g,u,m,C,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],f=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),C=new Set,h=0;h<f.length;h++)this.calculateRepulsionForceOfANode(u=f[h],C,t,a),C.add(u);else for(h=0;h<f.length;h++)for(u=f[h],g=h+1;g<f.length;g++)m=f[g],u.getOwner()==m.getOwner()&&this.calcRepulsionForce(u,m)},e.prototype.calcGravitationalForces=function(){for(var a=this.getAllNodesToApplyGravitation(),h=0;h<a.length;h++)this.calcGravitationalForce(a[h])},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},e.prototype.calcSpringForce=function(t,a){var u,m,f,C,h=t.getSource(),g=t.getTarget();if(this.uniformLeafNodeSizes&&null==h.getChild()&&null==g.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(u=t.getLength())&&(C=(m=t.edgeElasticity*(u-a))*(t.lengthY/u),h.springForceX+=f=m*(t.lengthX/u),h.springForceY+=C,g.springForceX-=f,g.springForceY-=C)},e.prototype.calcRepulsionForce=function(t,a){var f,C,T,L,x,j,I,h=t.getRect(),g=a.getRect(),u=new Array(2),m=new Array(4);if(h.intersects(g)){n.calcSeparationAmount(h,g,u,s.DEFAULT_EDGE_LENGTH/2),I=2*u[1];var nt=t.noOfChildren*a.noOfChildren/(t.noOfChildren+a.noOfChildren);t.repulsionForceX-=nt*(j=2*u[0]),t.repulsionForceY-=nt*I,a.repulsionForceX+=nt*j,a.repulsionForceY+=nt*I}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==a.getChild()?(f=g.getCenterX()-h.getCenterX(),C=g.getCenterY()-h.getCenterY()):(n.getIntersection(h,g,m),f=m[2]-m[0],C=m[3]-m[1]),Math.abs(f)<s.MIN_REPULSION_DIST&&(f=c.sign(f)*s.MIN_REPULSION_DIST),Math.abs(C)<s.MIN_REPULSION_DIST&&(C=c.sign(C)*s.MIN_REPULSION_DIST),T=f*f+C*C,L=Math.sqrt(T),I=(x=(t.nodeRepulsion/2+a.nodeRepulsion/2)*t.noOfChildren*a.noOfChildren/T)*C/L,t.repulsionForceX-=j=x*f/L,t.repulsionForceY-=I,a.repulsionForceX+=j,a.repulsionForceY+=I},e.prototype.calcGravitationalForce=function(t){var a,h,g,u,m,f,C,T;h=((a=t.getOwner()).getRight()+a.getLeft())/2,g=(a.getTop()+a.getBottom())/2,u=t.getCenterX()-h,m=t.getCenterY()-g,f=Math.abs(u)+t.getWidth()/2,C=Math.abs(m)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(f>
vendor: 14,262 bytes, line 1
1(T=a.getEstimatedSize()*this.gravityRangeFactor)||C>T)&&(t.gravitationForceX=-this.gravityConstant*u,t.gravitationForceY=-this.gravityConstant*m):(f>(T=a.getEstimatedSize()*this.compoundGravityRangeFactor)||C>T)&&(t.gravitationForceX=-this.gravityConstant*u*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*m*this.compoundGravityConstant)},e.prototype.isConverged=function(){var t,a=!1;return this.totalIterations>this.maxIterations/3&&(a=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||a},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,a=this.graphManager.getAllNodes(),h=0;h<a.length;h++)(t=a[h]).noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var a,h;a=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),h=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var g=new Array(a),u=0;u<a;u++)g[u]=new Array(h);for(u=0;u<a;u++)for(var m=0;m<h;m++)g[u][m]=new Array;return g},e.prototype.addNodeToGrid=function(t,a,h){var g,u,m,f;g=parseInt(Math.floor((t.getRect().x-a)/this.repulsionRange)),u=parseInt(Math.floor((t.getRect().width+t.getRect().x-a)/this.repulsionRange)),m=parseInt(Math.floor((t.getRect().y-h)/this.repulsionRange)),f=parseInt(Math.floor((t.getRect().height+t.getRect().y-h)/this.repulsionRange));for(var C=g;C<=u;C++)for(var T=m;T<=f;T++)this.grid[C][T].push(t),t.setGridCoordinates(g,u,m,f)},e.prototype.updateGrid=function(){var t,h=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<h.length;t++)this.addNodeToGrid(h[t],this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,a,h,g){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&h||g){var u=new Set;t.surrounding=new Array;for(var m,f=this.grid,C=t.startX-1;C<t.finishX+2;C++)for(var T=t.startY-1;T<t.finishY+2;T++)if(!(C<0||T<0||C>=f.length||T>=f[0].length))for(var L=0;L<f[C][T].length;L++)if(m=f[C][T][L],t.getOwner()==m.getOwner()&&t!=m&&!a.has(m)&&!u.has(m)){var x=Math.abs(t.getCenterX()-m.getCenterX())-(t.getWidth()/2+m.getWidth()/2),j=Math.abs(t.getCenterY()-m.getCenterY())-(t.getHeight()/2+m.getHeight()/2);x<=this.repulsionRange&&j<=this.repulsionRange&&u.add(m)}t.surrounding=[].concat(function y(t){if(Array.isArray(t)){for(var a=0,h=Array(t.length);a<t.length;a++)h[a]=t[a];return h}return Array.from(t)}(u))}for(C=0;C<t.surrounding.length;C++)this.calcRepulsionForce(t,t.surrounding[C])},e.prototype.calcRepulsionRange=function(){return 0},gt.exports=e},function(gt,Mt,S){"use strict";var y=S(1),o=S(4);function s(n,c,e){y.call(this,n,c,e),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}for(var i in s.prototype=Object.create(y.prototype),y)s[i]=y[i];gt.exports=s},function(gt,Mt,S){"use strict";var y=S(3),o=S(4);function s(n,c,e,v){y.call(this,n,c,e,v),this.nodeRepulsion=o.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var i in s.prototype=Object.create(y.prototype),y)s[i]=y[i];s.prototype.setGridCoordinates=function(n,c,e,v){this.startX=n,this.finishX=c,this.startY=e,this.finishY=v},gt.exports=s},function(gt,Mt,S){"use strict";function y(o,s){this.width=0,this.height=0,null!==o&&null!==s&&(this.height=s,this.width=o)}y.prototype.getWidth=function(){return this.width},y.prototype.setWidth=function(o){this.width=o},y.prototype.getHeight=function(){return this.height},y.prototype.setHeight=function(o){this.height=o},gt.exports=y},function(gt,Mt,S){"use strict";var y=S(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,i){var n=y.createID(s);this.contains(n)||(this.map[n]=i,this.keys.push(s))},o.prototype.contains=function(s){return y.createID(s),null!=this.map[s]},o.prototype.get=function(s){var i=y.createID(s);return this.map[i]},o.prototype.keySet=function(){return this.keys},gt.exports=o},function(gt,Mt,S){"use strict";var y=S(14);function o(){this.set={}}o.prototype.add=function(s){var i=y.createID(s);this.contains(i)||(this.set[i]=s)},o.prototype.remove=function(s){delete this.set[y.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[y.createID(s)]==s},o.prototype.isEmpty=function(){return 0===this.size()},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var i=Object.keys(this.set),n=i.length,c=0;c<n;c++)s.push(this.set[i[c]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var i=s.length,n=0;n<i;n++)this.add(s[n])},gt.exports=o},function(gt,Mt,S){"use strict";function y(){}y.multMat=function(o,s){for(var i=[],n=0;n<o.length;n++){i[n]=[];for(var c=0;c<s[0].length;c++){i[n][c]=0;for(var e=0;e<o[0].length;e++)i[n][c]+=o[n][e]*s[e][c]}}return i},y.transpose=function(o){for(var s=[],i=0;i<o[0].length;i++){s[i]=[];for(var n=0;n<o.length;n++)s[i][n]=o[n][i]}return s},y.multCons=function(o,s){for(var i=[],n=0;n<o.length;n++)i[n]=o[n]*s;return i},y.minusOp=function(o,s){for(var i=[],n=0;n<o.length;n++)i[n]=o[n]-s[n];return i},y.dotProduct=function(o,s){for(var i=0,n=0;n<o.length;n++)i+=o[n]*s[n];return i},y.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},y.normalize=function(o){for(var s=[],i=this.mag(o),n=0;n<o.length;n++)s[n]=o[n]/i;return s},y.multGamma=function(o){for(var s=[],i=0,n=0;n<o.length;n++)i+=o[n];i*=-1/o.length;for(var c=0;c<o.length;c++)s[c]=i+o[c];return s},y.multL=function(o,s,i){for(var n=[],c=[],e=[],v=0;v<s[0].length;v++){for(var t=0,a=0;a<s.length;a++)t+=-.5*s[a][v]*o[a];c[v]=t}for(var h=0;h<i.length;h++){for(var g=0,u=0;u<i.length;u++)g+=i[h][u]*c[u];e[h]=g}for(var m=0;m<s.length;m++){for(var f=0,C=0;C<s[0].length;C++)f+=s[m][C]*e[C];n[m]=f}return n},gt.exports=y},function(gt,Mt,S){"use strict";var y=function(){function n(c,e){for(var v=0;v<e.length;v++){var t=e[v];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(c,t.key,t)}}return function(c,e,v){return e&&n(c.prototype,e),v&&n(c,v),c}}();var s=S(11),i=function(){function n(c,e){(function o(n,c){if(!(n instanceof c))throw new TypeError("Cannot call a class as a function")})(this,n),(null!==e||void 0!==e)&&(this.compareFunction=this._defaultCompareFunction);var v;v=c instanceof s?c.size():c.length,this._quicksort(c,0,v-1)}return y(n,[{key:"_quicksort",value:function(e,v,t){if(v<t){var a=this._partition(e,v,t);this._quicksort(e,v,a),this._quicksort(e,a+1,t)}}},{key:"_partition",value:function(e,v,t){for(var a=this._get(e,v),h=v,g=t;;){for(;this.compareFunction(a,this._get(e,g));)g--;for(;this.compareFunction(this._get(e,h),a);)h++;if(!(h<g))return g;this._swap(e,h,g),h++,g--}}},{key:"_get",value:function(e,v){return e instanceof s?e.get_object_at(v):e[v]}},{key:"_set",value:function(e,v,t){e instanceof s?e.set_object_at(v,t):e[v]=t}},{key:"_swap",value:function(e,v,t){var a=this._get(e,v);this._set(e,v,this._get(e,t)),this._set(e,t,a)}},{key:"_defaultCompareFunction",value:function(e,v){return v>e}}]),n}();gt.exports=i},function(gt,Mt,S){"use strict";function y(){}y.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var s=Math.min(this.m,this.n);this.s=function(xt){for(var St=[];xt-- >0;)St.push(0);return St}(Math.min(this.m+1,this.n)),this.U=function Ht(Yt){if(0==Yt.length)return 0;for(var Vt=[],Gt=0;Gt<Yt[0];Gt++)Vt.push(Ht(Yt.slice(1)));return Vt}([this.m,s]),this.V=function Ht(Yt){if(0==Yt.length)return 0;for(var Vt=[],Gt=0;Gt<Yt[0];Gt++)Vt.push(Ht(Yt.slice(1)));return Vt}([this.n,this.n]);for(var i=function(xt){for(var St=[];xt-- >0;)St.push(0);return St}(this.n),n=function(xt){for(var St=[];xt-- >0;)St.push(0);return St}(this.m),e=!0,v=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(v,t);a++){if(a<v){this.s[a]=0;for(var h=a;h<this.m;h++)this.s[a]=y.hypot(this.s[a],o[h][a]);if(0!==this.s[a]){o[a][a]<0&&(this.s[a]=-this.s[a]);for(var g=a;g<this.m;g++)o[g][a]/=this.s[a];o[a][a]+=1}this.s[a]=-this.s[a]}for(var u=a+1;u<this.n;u++){if(function(xt,St){return xt&&St}(a<v,0!==this.s[a])){for(var m=0,f=a;f<this.m;f++)m+=o[f][a]*o[f][u];m=-m/o[a][a];for(var C=a;C<this.m;C++)o[C][u]+=m*o[C][a]}i[u]=o[a][u]}if(function(xt,St){return St}(0,a<v))for(var T=a;T<this.m;T++)this.U[T][a]=o[T][a];if(a<t){i[a]=0;for(var L=a+1;L<this.n;L++)i[a]=y.hypot(i[a],i[L]);if(0!==i[a]){i[a+1]<0&&(i[a]=-i[a]);for(var x=a+1;x<this.n;x++)i[x]/=i[a];i[a+1]+=1}if(i[a]=-i[a],function(xt,St){return xt&&St}(a+1<this.m,0!==i[a])){for(var j=a+1;j<this.m;j++)n[j]=0;for(var I=a+1;I<this.n;I++)for(var nt=a+1;nt<this.m;nt++)n[nt]+=i[I]*o[nt][I];for(var pt=a+1;pt<this.n;pt++)for(var ut=-i[pt]/i[a+1],Dt=a+1;Dt<this.m;Dt++)o[Dt][pt]+=ut*n[Dt]}for(var P=a+1;P<this.n;P++)this.V[P][a]=i[P]}}var Z=Math.min(this.n,this.m+1);v<this.n&&(this.s[v]=o[v][v]),this.m<Z&&(this.s[Z-1]=0),t+1<Z&&(i[t]=o[t][Z-1]),i[Z-1]=0;for(var r=v;r<s;r++){for(var E=0;E<this.m;E++)this.U[E][r]=0;this.U[r][r]=1}for(var l=v-1;l>=0;l--)if(0!==this.s[l]){for(var p=l+1;p<s;p++){for(var d=0,R=l;R<this.m;R++)d+=this.U[R][l]*this.U[R][p];d=-d/this.U[l][l];for(var D=l;D<this.m;D++)this.U[D][p]+=d*this.U[D][l]}for(var U=l;U<this.m;U++)this.U[U][l]=-this.U[U][l];this.U[l][l]=1+this.U[l][l];for(var Y=0;Y<l-1;Y++)this.U[Y][l]=0}else{for(var G=0;G<this.m;G++)this.U[G][l]=0;this.U[l][l]=1}for(var q=this.n-1;q>=0;q--){if(function(xt,St){return xt&&St}(q<t,0!==i[q]))for(var ft=q+1;ft<s;ft++){for(var V=0,ht=q+1;ht<this.n;ht++)V+=this.V[ht][q]*this.V[ht][ft];V=-V/this.V[q+1][q];for(var J=q+1;J<this.n;J++)this.V[J][ft]+=V*this.V[J][q]}for(var O=0;O<this.n;O++)this.V[O][q]=0;this.V[q][q]=1}for(var z=Z-1,ot=Math.pow(2,-52),wt=Math.pow(2,-966);Z>0;){var _=void 0,Pt=void 0;for(_=Z-2;_>=-1&&-1!==_;_--)if(Math.abs(i[_])<=wt+ot*(Math.abs(this.s[_])+Math.abs(this.s[_+1]))){i[_]=0;break}if(_===Z-2)Pt=4;else{var Rt=void 0;for(Rt=Z-1;Rt>=_&&Rt!==_;Rt--){var Wt=(Rt!==Z?Math.abs(i[Rt]):0)+(Rt!==_+1?Math.abs(i[Rt-1]):0);if(Math.abs(this.s[Rt])<=wt+ot*Wt){this.s[Rt]=0;break}}Rt===_?Pt=3:Rt===Z-1?Pt=1:(Pt=2,_=Rt)}switch(_++,Pt){case 1:var N=i[Z-2];i[Z-2]=0;for(var A=Z-2;A>=_;A--){var M=y.hypot(this.s[A],N),W=this.s[A]/M,it=N/M;this.s[A]=M,A!==_&&(N=-it*i[A-1],i[A-1]=W*i[A-1]);for(var et=0;et<this.n;et++)M=W*this.V[et][A]+it*this.V[et][Z-1],this.V[et][Z-1]=-it*this.V[et][A]+W*this.V[et][Z-1],this.V[et][A]=M}break;case 2:var st=i[_-1];i[_-1]=0;for(var rt=_;rt<Z;rt++){var k=y.hypot(this.s[rt],st),tt=this.s[rt]/k,yt=st/k;this.s[rt]=k,st=-yt*i[rt],i[rt]=tt*i[rt];for(var ct=0;ct<this.m;ct++)k=tt*this.U[ct][rt]+yt*this.U[ct][_-1],this.U[ct][_-1]=-yt*this.U[ct][rt]+tt*this.U[ct][_-1],this.U[ct][rt]=k}break;case 3:var mt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[Z-1]),Math.abs(this.s[Z-2])),Math.abs(i[Z-2])),Math.abs(this.s[_])),Math.abs(i[_])),lt=this.s[Z-1]/mt,w=this.s[Z-2]/mt,F=i[Z-2]/mt,X=this.s[_]/mt,b=i[_]/mt,H=((w+lt)*(w-lt)+F*F)/2,$=lt*F*(lt*F),dt=0;(function(xt,St){return xt||St})(0!==H,0!==$)&&(dt=Math.sqrt(H*H+$),H<0&&(dt=-dt),dt=$/(H+dt));for(var at=(X+lt)*(X-lt)+dt,K=X*b,Q=_;Q<Z-1;Q++){var Tt=y.hypot(at,K),Nt=at/Tt,Lt=K/Tt;Q!==_&&(i[Q-1]=Tt),at=Nt*this.s[Q]+Lt*i[Q],i[Q]=Nt*i[Q]-Lt*this.s[Q],K=Lt*this.s[Q+1],this.s[Q+1]=Nt*this.s[Q+1];for(var Ft=0;Ft<this.n;Ft++)Tt=Nt*this.V[Ft][Q]+Lt*this.V[Ft][Q+1],this.V[Ft][Q+1]=-Lt*this.V[Ft][Q]+Nt*this.V[Ft][Q+1],this.V[Ft][Q]=Tt;if(Nt=at/(Tt=y.hypot(at,K)),Lt=K/Tt,this.s[Q]=Tt,at=Nt*i[Q]+Lt*this.s[Q+1],this.s[Q+1]=-Lt*i[Q]+Nt*this.s[Q+1],K=Lt*i[Q+1],i[Q+1]=Nt*i[Q+1],Q<this.m-1)for(var At=0;At<this.m;At++)Tt=Nt*this.U[At][Q]+Lt*this.U[At][Q+1],this.U[At][Q+1]=-Lt*this.U[At][Q]+Nt*this.U[At][Q+1],this.U[At][Q]=Tt}i[Z-2]=at;break;case 4:if(this.s[_]<=0&&(this.s[_]=this.s[_]<0?-this.s[_]:0,e))for(var vt=0;vt<=z;vt++)this.V[vt][_]=-this.V[vt][_];for(;_<z&&!(this.s[_]>=this.s[_+1]);){var Ot=this.s[_];if(this.s[_]=this.s[_+1],this.s[_+1]=Ot,_<this.n-1)for(var Et=0;Et<this.n;Et++)Ot=this.V[Et][_+1],this.V[Et][_+1]=this.V[Et][_],this.V[Et][_]=Ot;if(_<this.m-1)for(var Ct=0;Ct<this.m;Ct++)Ot=this.U[Ct][_+1],this.U[Ct][_+1]=this.U[Ct][_],this.U[Ct][_]=Ot;_++}Z--}}return{U:this.U,V:this.V,S:this.s}},y.hypot=function(o,s){var i=void 0;return Math.abs(o)>Math.abs(s)?(i=s/o,i=Math.abs(o)*Math.sqrt(1+i*i)):0!=s?(i=o/s,i=Math.abs(s)*Math.sqrt(1+i*i)):i=0,i},gt.exports=y},function(gt,Mt,S){"use strict";var y=function(){function i(n,c){for(var e=0;e<c.length;e++){var v=c[e];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(n,v.key,v)}}return function(n,c,e){return c&&i(n.prototype,c),e&&i(n,e),n}}();var s=function(){function i(n,c){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;(function o(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")})(this,i),this.sequence1=n,this.sequence2=c,this.match_score=e,this.mismatch_penalty=v,this.gap_penalty=t,this.iMax=n.length+1,this.jMax=c.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var h=0;h<this.jMax;h++)this.grid[a][h]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var u=0;u<this.jMax;u++)this.tracebackGrid[g][u]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return y(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var c=1;c<this.jMax;c++)this.grid[0][c]=this.grid[0][c-1]+this.gap_penalty,this.tracebackGrid[0][c]=[!1,!1,
1!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var t=1;t<this.jMax;t++){var u=[this.sequence1[v-1]===this.sequence2[t-1]?this.grid[v-1][t-1]+this.match_score:this.grid[v-1][t-1]+this.mismatch_penalty,this.grid[v-1][t]+this.gap_penalty,this.grid[v][t-1]+this.gap_penalty],m=this.arrayAllMaxIndexes(u);this.grid[v][t]=u[m[0]],this.tracebackGrid[v][t]=[m.includes(0),m.includes(1),m.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var c=[];for(c.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});c[0];){var e=c[0],v=this.tracebackGrid[e.pos[0]][e.pos[1]];v[0]&&c.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),v[1]&&c.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),v[2]&&c.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),c.shift()}return this.alignments}},{key:"getAllIndexes",value:function(c,e){for(var v=[],t=-1;-1!==(t=c.indexOf(e,t+1));)v.push(t);return v}},{key:"arrayAllMaxIndexes",value:function(c){return this.getAllIndexes(c,Math.max.apply(null,c))}}]),i}();gt.exports=s},function(gt,Mt,S){"use strict";var y=function(){};y.FDLayout=S(18),y.FDLayoutConstants=S(4),y.FDLayoutEdge=S(19),y.FDLayoutNode=S(20),y.DimensionD=S(21),y.HashMap=S(22),y.HashSet=S(23),y.IGeometry=S(8),y.IMath=S(9),y.Integer=S(10),y.Point=S(12),y.PointD=S(5),y.RandomSeed=S(16),y.RectangleD=S(13),y.Transform=S(17),y.UniqueIDGeneretor=S(14),y.Quicksort=S(25),y.LinkedList=S(11),y.LGraphObject=S(2),y.LGraph=S(6),y.LEdge=S(1),y.LGraphManager=S(7),y.LNode=S(3),y.Layout=S(15),y.LayoutConstants=S(0),y.NeedlemanWunsch=S(27),y.Matrix=S(24),y.SVD=S(26),gt.exports=y},function(gt,Mt,S){"use strict";function y(){this.listeners=[]}var o=y.prototype;o.addListener=function(s,i){this.listeners.push({event:s,callback:i})},o.removeListener=function(s,i){for(var n=this.listeners.length;n>=0;n--){var c=this.listeners[n];c.event===s&&c.callback===i&&this.listeners.splice(n,1)}},o.emit=function(s,i){for(var n=0;n<this.listeners.length;n++){var c=this.listeners[n];s===c.event&&c.callback(i)}},gt.exports=y}])},66861:(kt,gt,Mt)=>{"use strict";Mt.r(gt),Mt.d(gt,{diagram:()=>Wt});var S=Mt(10467),y=Mt(39089),o=Mt(10139),s=Mt(63088),i=Mt(78485),n=Mt(99317),c=Mt(26526),e=Mt(44756),v=Mt(89516),t=Mt(7236),a=Mt(53390),h={L:"left",R:"right",T:"top",B:"bottom"},g={L:(0,c.K2)(N=>`${N},${N/2} 0,${N} 0,0`,"L"),R:(0,c.K2)(N=>`0,${N/2} ${N},0 ${N},${N}`,"R"),T:(0,c.K2)(N=>`0,0 ${N},0 ${N/2},${N}`,"T"),B:(0,c.K2)(N=>`${N/2},0 ${N},${N} 0,${N}`,"B")},u={L:(0,c.K2)((N,A)=>N-A+2,"L"),R:(0,c.K2)((N,A)=>N-2,"R"),T:(0,c.K2)((N,A)=>N-A+2,"T"),B:(0,c.K2)((N,A)=>N-2,"B")},m=(0,c.K2)(function(N){return C(N)?"L"===N?"R":"L":"T"===N?"B":"T"},"getOppositeArchitectureDirection"),f=(0,c.K2)(function(N){return"L"===N||"R"===N||"T"===N||"B"===N},"isArchitectureDirection"),C=(0,c.K2)(function(N){return"L"===N||"R"===N},"isArchitectureDirectionX"),T=(0,c.K2)(function(N){return"T"===N||"B"===N},"isArchitectureDirectionY"),L=(0,c.K2)(function(N,A){const M=C(N)&&T(A),W=T(N)&&C(A);return M||W},"isArchitectureDirectionXY"),x=(0,c.K2)(function(N){const A=N[0],M=N[1],W=C(A)&&T(M),it=T(A)&&C(M);return W||it},"isArchitecturePairXY"),j=(0,c.K2)(function(N){return"LL"!==N&&"RR"!==N&&"TT"!==N&&"BB"!==N},"isValidArchitectureDirectionPair"),I=(0,c.K2)(function(N,A){const M=`${N}${A}`;return j(M)?M:void 0},"getArchitectureDirectionPair"),nt=(0,c.K2)(function([N,A],M){const W=M[0],it=M[1];return C(W)?T(it)?[N+("L"===W?-1:1),A+("T"===it?1:-1)]:[N+("L"===W?-1:1),A]:C(it)?[N+("L"===it?1:-1),A+("T"===W?1:-1)]:[N,A+("T"===W?1:-1)]},"shiftPositionByArchitectureDirectionPair"),pt=(0,c.K2)(function(N){return"LT"===N||"TL"===N?[1,1]:"BL"===N||"LB"===N?[1,-1]:"BR"===N||"RB"===N?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),ut=(0,c.K2)(function(N,A){return L(N,A)?"bend":C(N)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dt=(0,c.K2)(function(N){return"service"===N.type},"isArchitectureService"),P=(0,c.K2)(function(N){return"junction"===N.type},"isArchitectureJunction"),Z=(0,c.K2)(N=>N.data(),"edgeData"),r=(0,c.K2)(N=>N.data(),"nodeData"),E=n.UI.architecture,l=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=n.SV,this.getAccTitle=n.iN,this.setDiagramTitle=n.ke,this.getDiagramTitle=n.ab,this.getAccDescription=n.m7,this.setAccDescription=n.EI,this.clear()}static{(0,c.K2)(this,"ArchitectureDB")}setDiagramId(N){this.diagramId=N}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,n.IU)()}addService({id:N,icon:A,in:M,title:W,iconText:it}){if(void 0!==this.registeredIds[N])throw new Error(`The service id [${N}] is already in use by another ${this.registeredIds[N]}`);if(void 0!==M){if(N===M)throw new Error(`The service [${N}] cannot be placed within itself`);if(void 0===this.registeredIds[M])throw new Error(`The service [${N}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[M])throw new Error(`The service [${N}]'s parent is not a group`)}this.registeredIds[N]="node",this.nodes[N]={id:N,type:"service",icon:A,iconText:it,title:W,edges:[],in:M}}getServices(){return Object.values(this.nodes).filter(Dt)}addJunction({id:N,in:A}){if(void 0!==this.registeredIds[N])throw new Error(`The junction id [${N}] is already in use by another ${this.registeredIds[N]}`);if(void 0!==A){if(N===A)throw new Error(`The junction [${N}] cannot be placed within itself`);if(void 0===this.registeredIds[A])throw new Error(`The junction [${N}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[A])throw new Error(`The junction [${N}]'s parent is not a group`)}this.registeredIds[N]="node",this.nodes[N]={id:N,type:"junction",edges:[],in:A}}getJunctions(){return Object.values(this.nodes).filter(P)}
1getNodes(){return Object.values(this.nodes)}getNode(N){return this.nodes[N]??null}addGroup({id:N,icon:A,in:M,title:W}){if(void 0!==this.registeredIds?.[N])throw new Error(`The group id [${N}] is already in use by another ${this.registeredIds[N]}`);if(void 0!==M){if(N===M)throw new Error(`The group [${N}] cannot be placed within itself`);if(void 0===this.registeredIds?.[M])throw new Error(`The group [${N}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[M])throw new Error(`The group [${N}]'s parent is not a group`)}this.registeredIds[N]="group",this.groups[N]={id:N,icon:A,title:W,in:M}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:N,rhsId:A,lhsDir:M,rhsDir:W,lhsInto:it,rhsInto:et,lhsGroup:st,rhsGroup:rt,title:k}){if(!f(M))throw new Error(`Invalid direction given for left hand side of edge ${N}--${A}. Expected (L,R,T,B) got ${String(M)}`);if(!f(W))throw new Error(`Invalid direction given for right hand side of edge ${N}--${A}. Expected (L,R,T,B) got ${String(W)}`);if(void 0===this.nodes[N]&&void 0===this.groups[N])throw new Error(`The left-hand id [${N}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[A]&&void 0===this.groups[A])throw new Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);const tt=this.nodes[N].in,yt=this.nodes[A].in;if(st&&tt&&yt&&tt==yt)throw new Error(`The left-hand id [${N}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(rt&&tt&&yt&&tt==yt)throw new Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:N,lhsDir:M,lhsInto:it,lhsGroup:st,rhsId:A,rhsDir:W,rhsInto:et,rhsGroup:rt,title:k}),this.nodes[N]&&this.nodes[A]&&(this.nodes[N].edges.push(this.edges[this.edges.length-1]),this.nodes[A].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){const N={},A=Object.entries(this.nodes).reduce((rt,[k,tt])=>(rt[k]=tt.edges.reduce((yt,ct)=>{const mt=this.getNode(ct.lhsId)?.in,lt=this.getNode(ct.rhsId)?.in;if(mt&<&&mt!==lt){const w=ut(ct.lhsDir,ct.rhsDir);"bend"!==w&&(N[mt]??={},N[mt][lt]=w,N[lt]??={},N[lt][mt]=w)}if(ct.lhsId===k){const w=I(ct.lhsDir,ct.rhsDir);w&&(yt[w]=ct.rhsId)}else{const w=I(ct.rhsDir,ct.lhsDir);w&&(yt[w]=ct.lhsId)}return yt},{}),rt),{}),M=Object.keys(A)[0],W={[M]:1},it=Object.keys(A).reduce((rt,k)=>k===M?rt:{...rt,[k]:1},{}),et=(0,c.K2)(rt=>{const k={[rt]:[0,0]},tt=[rt];for(;tt.length>0;){const yt=tt.shift();if(yt){W[yt]=1,delete it[yt];const ct=A[yt],[mt,lt]=k[yt];Object.entries(ct).forEach(([w,F])=>{W[F]||(k[F]=nt([mt,lt],w),tt.push(F))})}}return k},"BFS"),st=[et(M)];for(;Object.keys(it).length>0;)st.push(et(Object.keys(it)[0]));this.dataStructures={adjList:A,spatialMaps:st,groupAlignments:N}}return this.dataStructures}setElementForId(N,A){this.elements[N]=A}getElementById(N){return this.elements[N]}getConfig(){return(0,i.$t)({...E,...(0,n.zj)().architecture})}getConfigField(N){return this.getConfig()[N]}},p=(0,c.K2)((N,A)=>{(0,s.S)(N,A),N.groups.map(M=>A.addGroup(M)),N.services.map(M=>A.addService({...M,type:"service"})),N.junctions.map(M=>A.addJunction({...M,type:"junction"})),N.edges.map(M=>A.addEdge(M))},"populateDb"),d={parser:{yy:void 0},parse:(0,c.K2)(function(){var N=(0,S.A)(function*(A){const M=yield(0,e.qg)("architecture",A);c.Rm.debug(M);const W=d.parser?.yy;if(!(W instanceof l))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.");p(M,W)});return function(A){return N.apply(this,arguments)}}(),"parse")},D=(0,c.K2)(N=>`\n .edge {\n stroke-width: ${N.archEdgeWidth};\n stroke: ${N.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${N.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${N.archGroupBorderColor};\n stroke-width: ${N.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex;
1 \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),U=(0,c.K2)(N=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${N}</g>`,"wrapIcon"),Y={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:U('<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:U('<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:U('<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:U('<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:U('<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:o.Gc,blank:{body:U("")}}},G=(0,c.K2)(function(){var N=(0,S.A)(function*(A,M,W,it){const et=W.getConfigField("padding"),st=W.getConfigField("iconSize"),rt=st/2,k=st/6,tt=k/2;yield Promise.all(M.edges().map(function(){var yt=(0,S.A)(function*(ct){const{source:mt,sourceDir:lt,sourceArrow:w,sourceGroup:F,target:X,targetDir:b,targetArrow:H,targetGroup:$,label:dt}
1=Z(ct);let{x:at,y:K}=ct[0].sourceEndpoint();const{x:Q,y:Tt}=ct[0].midpoint();let{x:Nt,y:Lt}=ct[0].targetEndpoint();const Ft=et+4;if(F&&(C(lt)?at+="L"===lt?-Ft:Ft:K+="T"===lt?-Ft:Ft+18),$&&(C(b)?Nt+="L"===b?-Ft:Ft:Lt+="T"===b?-Ft:Ft+18),!F&&"junction"===W.getNode(mt)?.type&&(C(lt)?at+="L"===lt?rt:-rt:K+="T"===lt?rt:-rt),!$&&"junction"===W.getNode(X)?.type&&(C(b)?Nt+="L"===b?rt:-rt:Lt+="T"===b?rt:-rt),ct[0]._private.rscratch){const At=A.insert("g");if(At.insert("path").attr("d",`M ${at},${K} L ${Q},${Tt} L${Nt},${Lt} `).attr("class","edge").attr("id",`${it}-${(0,i.rY)(mt,X,{prefix:"L"})}`),w){const vt=C(lt)?u[lt](at,k):at-tt,Ot=T(lt)?u[lt](K,k):K-tt;At.insert("polygon").attr("points",g[lt](k)).attr("transform",`translate(${vt},${Ot})`).attr("class","arrow")}if(H){const vt=C(b)?u[b](Nt,k):Nt-tt,Ot=T(b)?u[b](Lt,k):Lt-tt;At.insert("polygon").attr("points",g[b](k)).attr("transform",`translate(${vt},${Ot})`).attr("class","arrow")}if(dt){const vt=L(lt,b)?"XY":C(lt)?"X":"Y";let Ot=0;Ot="X"===vt?Math.abs(at-Nt):"Y"===vt?Math.abs(K-Lt)/1.5:Math.abs(at-Nt)/2;const Et=At.append("g");if(yield(0,o.GZ)(Et,dt,{useHtmlLabels:!1,width:Ot,classes:"architecture-service-label"},(0,n.D7)()),Et.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===vt)Et.attr("transform","translate("+Q+", "+Tt+")");else if("Y"===vt)Et.attr("transform","translate("+Q+", "+Tt+") rotate(-90)");else if("XY"===vt){const Ct=I(lt,b);if(Ct&&x(Ct)){const Ut=Et.node().getBoundingClientRect(),[xt,St]=pt(Ct);Et.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*xt*St*45})`);const Ht=Et.node().getBoundingClientRect();Et.attr("transform",`\n translate(${Q}, ${Tt-Ut.height/2})\n translate(${xt*Ht.width/2}, ${St*Ht.height/2})\n rotate(${-1*xt*St*45}, 0, ${Ut.height/2})\n `)}}}}});return function(ct){return yt.apply(this,arguments)}}()))});return function(A,M,W,it){return N.apply(this,arguments)}}(),"drawEdges"),q=(0,c.K2)(function(){var N=(0,S.A)(function*(A,M,W,it){const st=.75*W.getConfigField("padding"),rt=W.getConfigField("fontSize"),tt=W.getConfigField("iconSize")/2;yield Promise.all(M.nodes().map(function(){var yt=(0,S.A)(function*(ct){const mt=r(ct);if("group"===mt.type){const{h:lt,w,x1:F,y1:X}=ct.boundingBox(),b=A.append("rect");b.attr("id",`${it}-group-${mt.id}`).attr("x",F+tt).attr("y",X+tt).attr("width",w).attr("height",lt).attr("class","node-bkg");const H=A.append("g");let $=F,dt=X;if(mt.icon){const at=H.append("g");at.html(`<g>${yield(0,o.WY)(mt.icon,{height:st,width:st,fallbackPrefix:Y.prefix})}</g>`),at.attr("transform","translate("+($+tt+1)+", "+(dt+tt+1)+")"),$+=st,dt+=rt/2-1-2}if(mt.label){const at=H.append("g");yield(0,o.GZ)(at,mt.label,{useHtmlLabels:!1,width:w,classes:"architecture-service-label"},(0,n.D7)()),at.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),at.attr("transform","translate("+($+tt+4)+", "+(dt+tt+2)+")")}W.setElementForId(mt.id,b)}});return function(ct){return yt.apply(this,arguments)}}()))});return function(A,M,W,it){return N.apply(this,arguments)}}(),"drawGroups"),ft=(0,c.K2)(function(){var N=(0,S.A)(function*(A,M,W,it){const et=(0,n.D7)();for(const st of W){const rt=M.append("g"),k=A.getConfigField("iconSize");if(st.title){const mt=rt.append("g");yield(0,o.GZ)(mt,st.title,{useHtmlLabels:!1,width:1.5*k,classes:"architecture-service-label"},et),mt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),mt.attr("transform","translate("+k/2+", "+k+")")}const tt=rt.append("g");if(st.icon)tt.html(`<g>${yield(0,o.WY)(st.icon,{height:k,width:k,fallbackPrefix:Y.prefix})}</g>`);else if(st.iconText){tt.html(`<g>${yield(0,o.WY)("blank",{height:k,width:k,fallbackPrefix:Y.prefix})}</g>`);const w=tt.append("g").append("foreignObject").attr("width",k).attr("height",k).append("div").attr("class","node-icon-text").attr("style",`height: ${k}px;`).append("div").html((0,n.jZ)(st.iconText,et)),F=parseInt(window.getComputedStyle(w.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;w.attr("style",`-webkit-line-clamp: ${Math.floor((k-2)/F)};`)}else tt.append("path").attr("class","node-bkg").attr("id",`${it}-node-${st.id}`).attr("d",`M0,${k} V5 Q0,0 5,0 H${k-5} Q${k},0 ${k},5 V${k} Z`);rt.attr("id",`${it}-service-${st.id}`).attr("class","architecture-service");const{width:yt,height:ct}=rt.node().getBBox();st.width=yt,st.height=ct,A.setElementForId(st.id,rt)}return 0});return function(A,M,W,it){return N.apply(this,arguments)}}(),"drawServices"),V=(0,c.K2)(function(N,A,M,W){M.forEach(it=>{const et=A.append("g"),st=N.getConfigField("iconSize");et.append("g").append("rect").attr("id",`${W}-node-${it.id}`).attr("fill-opacity","0").attr("width",st).attr("height",st),et.attr("class","architecture-junction");const{width:k,height:tt}=et._groups[0][0].getBBox();et.width=k,et.height=tt,N.setElementForId(it.id,et)})},"drawJunctions");
1function ht(N,A,M){N.forEach(W=>{A.add({group:"nodes",data:{type:"service",id:W.id,icon:W.icon,label:W.title,parent:W.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-service"})})}function J(N,A,M){N.forEach(W=>{A.add({group:"nodes",data:{type:"junction",id:W.id,parent:W.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-junction"})})}function O(N,A){A.nodes().map(M=>{const W=r(M);"group"!==W.type&&(W.x=M.position().x,W.y=M.position().y,N.getElementById(W.id).attr("transform","translate("+(W.x||0)+","+(W.y||0)+")"))})}function z(N,A){N.forEach(M=>{A.add({group:"nodes",data:{type:"group",id:M.id,icon:M.icon,label:M.title,parent:M.in},classes:"node-group"})})}function B(N,A){N.forEach(M=>{const{lhsId:W,rhsId:it,lhsInto:et,lhsGroup:st,rhsInto:rt,lhsDir:k,rhsDir:tt,rhsGroup:yt,title:ct}=M,mt=L(M.lhsDir,M.rhsDir)?"segments":"straight";A.add({group:"edges",data:{id:`${W}-${it}`,label:ct,source:W,sourceDir:k,sourceArrow:et,sourceGroup:st,sourceEndpoint:"L"===k?"0 50%":"R"===k?"100% 50%":"T"===k?"50% 0":"50% 100%",target:it,targetDir:tt,targetArrow:rt,targetGroup:yt,targetEndpoint:"L"===tt?"0 50%":"R"===tt?"100% 50%":"T"===tt?"50% 0":"50% 100%"},classes:mt})})}function ot(N,A,M){const W=(0,c.K2)((rt,k)=>Object.entries(rt).reduce((tt,[yt,ct])=>{let mt=0;const lt=Object.entries(ct);if(1===lt.length)return tt[yt]=lt[0][1],tt;for(let w=0;w<lt.length-1;w++)for(let F=w+1;F<lt.length;F++){const[X,b]=lt[w],[H,$]=lt[F];M[X]?.[H]===k||"default"===X||"default"===H?(tt[yt]??=[],tt[yt]=[...tt[yt],...b,...$]):(tt[`${yt}-${mt++}`]=b,tt[`${yt}-${mt++}`]=$)}return tt},{}),"flattenAlignments"),it=A.map(rt=>{const k={},tt={};return Object.entries(rt).forEach(([yt,[ct,mt]])=>{const lt=N.getNode(yt)?.in??"default";k[mt]??={},k[mt][lt]??=[],k[mt][lt].push(yt),tt[ct]??={},tt[ct][lt]??=[],tt[ct][lt].push(yt)}),{horiz:Object.values(W(k,"horizontal")).filter(yt=>yt.length>1),vert:Object.values(W(tt,"vertical")).filter(yt=>yt.length>1)}}),[et,st]=it.reduce(([rt,k],{horiz:tt,vert:yt})=>[[...rt,...tt],[...k,...yt]],[[],[]]);return{horizontal:et,vertical:st}}function wt(N,A){const M=[],W=(0,c.K2)(et=>`${et[0]},${et[1]}`,"posToStr"),it=(0,c.K2)(et=>et.split(",").map(st=>parseInt(st)),"strToPos");return N.forEach(et=>{const st=Object.fromEntries(Object.entries(et).map(([yt,ct])=>[W(ct),yt])),rt=[W([0,0])],k={},tt={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;rt.length>0;){const yt=rt.shift();if(yt){k[yt]=1;const ct=st[yt];if(ct){const mt=it(yt);Object.entries(tt).forEach(([lt,w])=>{const F=W([mt[0]+w[0],mt[1]+w[1]]),X=st[F];X&&!k[F]&&(rt.push(F),M.push({[h[lt]]:X,[h[m(lt)]]:ct,gap:1.5*A.getConfigField("iconSize")}))})}}}}),M}function _(N,A,M,W,it,{spatialMaps:et,groupAlignments:st}){return new Promise(rt=>{const k=(0,a.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),tt=(0,v.A)({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":`${it.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:`${it.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});k.remove(),z(M,tt),ht(N,tt,it),J(A,tt,it),B(W,tt);const yt=ot(it,et,st),ct=wt(et,it),mt=tt.layout({name:"fcose",quality:"proof",randomize:it.getConfigField("randomize"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(lt){const[w,F]=lt.connectedNodes(),{parent:X}=r(w),{parent:b}=r(F);return X===b?1.5*it.getConfigField("iconSize"):.5*it.getConfigField("iconSize")},edgeElasticity(lt){const[w,F]=lt.connectedNodes(),{parent:X}=r(w),{parent:b}=r(F);return X===b?.45:.001},alignmentConstraint:yt,relativePlacementConstraint:ct});mt.one("layoutstop",()=>{function lt(w,F,X,b){let H,$;const{x:dt,y:at}=w,{x:K,y:Q}=F;$=(b-at+(dt-X)*(at-Q)/(dt-K))/Math.sqrt(1+Math.pow((at-Q)/(dt-K),2)),H=Math.sqrt(Math.pow(b-at,2)+Math.pow(X-dt,2)-Math.pow($,2)),H/=Math.sqrt(Math.pow(K-dt,2)+Math.pow(Q-at,2));let Nt=(K-dt)*(b-at)-(Q-at)*(X-dt);switch(!0){case Nt>=0:Nt=1;break;case Nt<0:Nt=-1}let Lt=(K-dt)*(X-dt)+(Q-at)*(b-at);switch(!0){case Lt>=0:Lt=1;break;case Lt<0:Lt=-1}return $=Math.abs($)*Nt,H*=Lt,{distances:$,weights:H}}
1(0,c.K2)(lt,"getSegmentWeights"),tt.startBatch();for(const w of Object.values(tt.edges()))if(w.data?.()){const{x:F,y:X}=w.source().position(),{x:b,y:H}=w.target().position();if(F!==b&&X!==H){const $=w.sourceEndpoint(),dt=w.targetEndpoint(),{sourceDir:at}=Z(w),[K,Q]=T(at)?[$.x,dt.y]:[dt.x,$.y],{weights:Tt,distances:Nt}=lt($,dt,K,Q);w.style("segment-distances",Nt),w.style("segment-weights",Tt)}}tt.endBatch(),mt.run()}),mt.run(),tt.ready(lt=>{c.Rm.info("Ready",lt),rt(tt)})})}(0,o.pC)([{name:Y.prefix,icons:Y}]),v.A.use(t),(0,c.K2)(ht,"addServices"),(0,c.K2)(J,"addJunctions"),(0,c.K2)(O,"positionNodes"),(0,c.K2)(z,"addGroups"),(0,c.K2)(B,"addEdges"),(0,c.K2)(ot,"getAlignments"),(0,c.K2)(wt,"getRelativeConstraints"),(0,c.K2)(_,"layoutArchitecture");var Rt={draw:(0,c.K2)(function(){var N=(0,S.A)(function*(A,M,W,it){const et=it.db;et.setDiagramId(M);const st=et.getServices(),rt=et.getJunctions(),k=et.getGroups(),tt=et.getEdges(),yt=et.getDataStructures(),ct=(0,y.D)(M),mt=ct.append("g");mt.attr("class","architecture-edges");const lt=ct.append("g");lt.attr("class","architecture-services");const w=ct.append("g");w.attr("class","architecture-groups"),yield ft(et,lt,st,M),V(et,lt,rt,M);const F=yield _(st,rt,k,tt,et,yt);yield G(mt,F,et,M),yield q(w,F,et,M),O(et,F),(0,n.ot)(void 0,ct,et.getConfigField("padding"),et.getConfigField("useMaxWidth"))});return function(A,M,W,it){return N.apply(this,arguments)}}(),"draw")},Wt={parser:d,get db(){return new l},renderer:Rt,styles:D}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.