>>1,D=j[X];if(0>>1;X 0&&M.length>z&&!M.warned){M.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(N)+" listeners added. Use emitter.setMaxListeners() to increase limit");H.name="MaxListenersExceededWarning",H.emitter=C,H.type=N,H.count=M.length,r(H)}return C}i.prototype.addListener=function(N,_){return f(this,N,_,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(N,_){return f(this,N,_,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(C,N,_){var O={fired:!1,wrapFn:void 0,target:C,type:N,listener:_},z=p.bind(O);return z.listener=_,O.wrapFn=z,z}i.prototype.once=function(N,_){return u(_),this.on(N,g(this,N,_)),this},i.prototype.prependOnceListener=function(N,_){return u(_),this.prependListener(N,g(this,N,_)),this},i.prototype.removeListener=function(N,_){var O,z,I,M,H;if(u(_),z=this._events,z===void 0)return this;if(O=z[N],O===void 0)return this;if(O===_||O.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete z[N],z.removeListener&&this.emit("removeListener",N,O.listener||_));else if(typeof O!="function"){for(I=-1,M=O.length-1;M>=0;M--)if(O[M]===_||O[M].listener===_){H=O[M].listener,I=M;break}if(I<0)return this;I===0?O.shift():v(O,I),O.length===1&&(z[N]=O[0]),z.removeListener!==void 0&&this.emit("removeListener",N,H||_)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(N){var _,O,z;if(O=this._events,O===void 0)return this;if(O.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):O[N]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete O[N]),this;if(arguments.length===0){var I=Object.keys(O),M;for(z=0;z this.runFrame())},i.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},i.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},i.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},Hh=i,Hh}var _Q=TQ();const RQ=an(_Q);function CQ(e={maxIterations:100}){return Il(AQ,e)}function NQ(e={}){return v0(RQ,e)}var $h,GC;function OQ(){if(GC)return $h;GC=1;var e=0,t=1,n=2,r=3,a=4,i=5,l=6,u=7,c=8,f=9,p=0,g=1,b=2,m=0,S=1,v=2,A=3,R=4,x=5,_=6,C=7,N=8,T=3,O=10,z=3,I=9,M=10;return $h=function(q,U,W){var Z,j,G,P,X,D,V,B,L,Y,Q=U.length,se=W.length,re=q.adjustSizes,le=q.barnesHutTheta*q.barnesHutTheta,Ae,ae,we,xe,Ie,Ce,Ee,J=[];for(G=0;G this.runFrame())},i.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},i.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},i.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},Hh=i,Hh}var _Q=TQ();const RQ=an(_Q);function CQ(e={maxIterations:100}){return Ll(AQ,e)}function NQ(e={}){return S0(RQ,e)}var $h,HC;function OQ(){if(HC)return $h;HC=1;var e=0,t=1,n=2,r=3,a=4,i=5,l=6,u=7,c=8,f=9,p=0,g=1,b=2,m=0,S=1,v=2,A=3,R=4,x=5,T=6,C=7,N=8,_=3,O=10,z=3,I=9,M=10;return $h=function(q,P,W){var Z,j,G,B,X,D,V,U,L,Y,Q=P.length,se=W.length,re=q.adjustSizes,le=q.barnesHutTheta*q.barnesHutTheta,Ae,ae,we,xe,Ie,Ce,Ee,J=[];for(G=0;GW<=0)){var H,q;const W=(((H=i.flip)==null?void 0:H.index)||0)+1,Z=O[W];if(Z)return{data:{index:W,overflows:M},reset:{placement:Z}};let j=(q=M.filter(G=>G.overflows[0]<=0).sort((G,P)=>G.overflows[1]-P.overflows[1])[0])==null?void 0:q.placement;if(!j)switch(m){case"bestFit":{var U;const G=(U=M.filter(P=>{if(T){const X=vo(P.placement);return X===x||X==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(X=>X>0).reduce((X,D)=>X+D,0)]).sort((P,X)=>P[1]-X[1])[0])==null?void 0:U[0];G&&(j=G);break}case"initialPlacement":j=u;break}if(a!==j)return{reset:{placement:j}}}return{}}}};function PR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BR(e){return J7.some(t=>e[t]>=0)}const cV=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Da(e,t);switch(r){case"referenceHidden":{const i=await Js(t,{...a,elementContext:"reference"}),l=PR(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:BR(l)}}}case"escaped":{const i=await Js(t,{...a,altBoundary:!0}),l=PR(i,n.floating);return{data:{escapedOffsets:l,escaped:BR(l)}}}default:return{}}}}};async function dV(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ia(n),u=_l(n),c=vo(n)==="y",f=["left","top"].includes(l)?-1:1,p=i&&c?-1:1,g=Da(t,e);let{mainAxis:b,crossAxis:m,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof S=="number"&&(m=u==="end"?S*-1:S),c?{x:m*p,y:b*f}:{x:b*f,y:m*p}}const fV=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:l,middlewareData:u}=t,c=await dV(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:l}}}}},pV=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:R,y:x}=A;return{x:R,y:x}}},...c}=Da(e,t),f={x:n,y:r},p=await Js(t,c),g=vo(Ia(a)),b=Hk(g);let m=f[b],S=f[g];if(i){const A=b==="y"?"top":"left",R=b==="y"?"bottom":"right",x=m+p[A],_=m-p[R];m=Ax(x,m,_)}if(l){const A=g==="y"?"top":"left",R=g==="y"?"bottom":"right",x=S+p[A],_=S-p[R];S=Ax(x,S,_)}const v=u.fn({...t,[b]:m,[g]:S});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[b]:i,[g]:l}}}}}},gV=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=Da(e,t),p={x:n,y:r},g=vo(a),b=Hk(g);let m=p[b],S=p[g];const v=Da(u,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const _=b==="y"?"height":"width",C=i.reference[b]-i.floating[_]+A.mainAxis,N=i.reference[b]+i.reference[_]-A.mainAxis;m
W<=0)){var H,q;const W=(((H=i.flip)==null?void 0:H.index)||0)+1,Z=O[W];if(Z)return{data:{index:W,overflows:M},reset:{placement:Z}};let j=(q=M.filter(G=>G.overflows[0]<=0).sort((G,B)=>G.overflows[1]-B.overflows[1])[0])==null?void 0:q.placement;if(!j)switch(m){case"bestFit":{var P;const G=(P=M.filter(B=>{if(_){const X=vo(B.placement);return X===x||X==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(X=>X>0).reduce((X,D)=>X+D,0)]).sort((B,X)=>B[1]-X[1])[0])==null?void 0:P[0];G&&(j=G);break}case"initialPlacement":j=u;break}if(a!==j)return{reset:{placement:j}}}return{}}}};function BR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UR(e){return J7.some(t=>e[t]>=0)}const cV=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Da(e,t);switch(r){case"referenceHidden":{const i=await eu(t,{...a,elementContext:"reference"}),l=BR(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:UR(l)}}}case"escaped":{const i=await eu(t,{...a,altBoundary:!0}),l=BR(i,n.floating);return{data:{escapedOffsets:l,escaped:UR(l)}}}default:return{}}}}};async function dV(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ia(n),u=Rl(n),c=vo(n)==="y",f=["left","top"].includes(l)?-1:1,p=i&&c?-1:1,g=Da(t,e);let{mainAxis:b,crossAxis:m,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof S=="number"&&(m=u==="end"?S*-1:S),c?{x:m*p,y:b*f}:{x:b*f,y:m*p}}const fV=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:l,middlewareData:u}=t,c=await dV(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:l}}}}},pV=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:R,y:x}=A;return{x:R,y:x}}},...c}=Da(e,t),f={x:n,y:r},p=await eu(t,c),g=vo(Ia(a)),b=$k(g);let m=f[b],S=f[g];if(i){const A=b==="y"?"top":"left",R=b==="y"?"bottom":"right",x=m+p[A],T=m-p[R];m=Tx(x,m,T)}if(l){const A=g==="y"?"top":"left",R=g==="y"?"bottom":"right",x=S+p[A],T=S-p[R];S=Tx(x,S,T)}const v=u.fn({...t,[b]:m,[g]:S});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[b]:i,[g]:l}}}}}},gV=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=Da(e,t),p={x:n,y:r},g=vo(a),b=$k(g);let m=p[b],S=p[g];const v=Da(u,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const T=b==="y"?"height":"width",C=i.reference[b]-i.floating[T]+A.mainAxis,N=i.reference[b]+i.reference[T]-A.mainAxis;m
Ne?(me-=(he-Ne)/2,ve=me+he):(fe-=(Ne-he)/2,ke=fe+Ne),J[0+m]=-1,J[0+S]=(fe+ke)/2,J[0+v]=(me+ve)/2,J[0+A]=Math.max(ke-fe,ve-me),J[0+R]=-1,J[0+x]=-1,J[0+_]=0,J[0+C]=0,J[0+N]=0,Z=1,G=0;G
=0){U[G+e]
0?(Ee=ae*U[P+l]*U[X+l]/Ce/Ce,U[P+n]+=we*Ee,U[P+r]+=xe*Ee,U[X+n]-=we*Ee,U[X+r]-=xe*Ee):Ce<0&&(Ee=100*ae*U[P+l]*U[X+l],U[P+n]+=we*Ee,U[P+r]+=xe*Ee,U[X+n]-=we*Ee,U[X+r]-=xe*Ee)):(Ce=Math.sqrt(we*we+xe*xe),Ce>0&&(Ee=ae*U[P+l]*U[X+l]/Ce/Ce,U[P+n]+=we*Ee,U[P+r]+=xe*Ee,U[X+n]-=we*Ee,U[X+r]-=xe*Ee));for(L=q.gravity/q.scalingRatio,ae=q.scalingRatio,G=0;G
0&&(Ee=ae*U[G+l]*L):Ce>0&&(Ee=ae*U[G+l]*L/Ce),U[G+n]-=we*Ee,U[G+r]-=xe*Ee;for(ae=1*(q.outboundAttractionDistribution?Ae:1),V=0;V
M&&(U[G+n]=U[G+n]*M/ee,U[G+r]=U[G+r]*M/ee),ce=U[G+l]*Math.sqrt((U[G+a]-U[G+n])*(U[G+a]-U[G+n])+(U[G+i]-U[G+r])*(U[G+i]-U[G+r])),Re=Math.sqrt((U[G+a]+U[G+n])*(U[G+a]+U[G+n])+(U[G+i]+U[G+r])*(U[G+i]+U[G+r]))/2,Fe=.1*Math.log(1+Re)/(1+Math.sqrt(ce)),qe=U[G+e]+U[G+n]*(Fe/q.slowDown),U[G+e]=qe,mt=U[G+t]+U[G+r]*(Fe/q.slowDown),U[G+t]=mt);else for(G=0;G
=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in n&&typeof n.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in n&&!(typeof n.gravity=="number"&&n.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in n&&!(typeof n.slowDown=="number"||n.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in n&&typeof n.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in n&&!(typeof n.barnesHutTheta=="number"&&n.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},xa.graphToByteArrays=function(n,r){var a=n.order,i=n.size,l={},u,c=new Float32Array(a*e),f=new Float32Array(i*t);return u=0,n.forEachNode(function(p,g){l[p]=u,c[u]=g.x,c[u+1]=g.y,c[u+2]=0,c[u+3]=0,c[u+4]=0,c[u+5]=0,c[u+6]=1,c[u+7]=1,c[u+8]=g.size||1,c[u+9]=g.fixed?1:0,u+=e}),u=0,n.forEachEdge(function(p,g,b,m,S,v,A){var R=l[b],x=l[m],_=r(p,g,b,m,S,v,A);c[R+6]+=_,c[x+6]+=_,f[u]=R,f[u+1]=x,f[u+2]=_,u+=t}),{nodes:c,edges:f}},xa.assignLayoutChanges=function(n,r,a){var i=0;n.updateEachNodeAttributes(function(l,u){return u.x=r[i],u.y=r[i+1],i+=e,a?a(l,u):u})},xa.readGraphPositions=function(n,r){var a=0;n.forEachNode(function(i,l){r[a]=l.x,r[a+1]=l.y,a+=e})},xa.collectLayoutChanges=function(n,r,a){for(var i=n.nodes(),l={},u=0,c=0,f=r.length;u
Ne?(me-=(he-Ne)/2,ve=me+he):(fe-=(Ne-he)/2,ke=fe+Ne),J[0+m]=-1,J[0+S]=(fe+ke)/2,J[0+v]=(me+ve)/2,J[0+A]=Math.max(ke-fe,ve-me),J[0+R]=-1,J[0+x]=-1,J[0+T]=0,J[0+C]=0,J[0+N]=0,Z=1,G=0;G
=0){P[G+e]
0?(Ee=ae*P[B+l]*P[X+l]/Ce/Ce,P[B+n]+=we*Ee,P[B+r]+=xe*Ee,P[X+n]-=we*Ee,P[X+r]-=xe*Ee):Ce<0&&(Ee=100*ae*P[B+l]*P[X+l],P[B+n]+=we*Ee,P[B+r]+=xe*Ee,P[X+n]-=we*Ee,P[X+r]-=xe*Ee)):(Ce=Math.sqrt(we*we+xe*xe),Ce>0&&(Ee=ae*P[B+l]*P[X+l]/Ce/Ce,P[B+n]+=we*Ee,P[B+r]+=xe*Ee,P[X+n]-=we*Ee,P[X+r]-=xe*Ee));for(L=q.gravity/q.scalingRatio,ae=q.scalingRatio,G=0;G
0&&(Ee=ae*P[G+l]*L):Ce>0&&(Ee=ae*P[G+l]*L/Ce),P[G+n]-=we*Ee,P[G+r]-=xe*Ee;for(ae=1*(q.outboundAttractionDistribution?Ae:1),V=0;V
M&&(P[G+n]=P[G+n]*M/ee,P[G+r]=P[G+r]*M/ee),ce=P[G+l]*Math.sqrt((P[G+a]-P[G+n])*(P[G+a]-P[G+n])+(P[G+i]-P[G+r])*(P[G+i]-P[G+r])),Re=Math.sqrt((P[G+a]+P[G+n])*(P[G+a]+P[G+n])+(P[G+i]+P[G+r])*(P[G+i]+P[G+r]))/2,Fe=.1*Math.log(1+Re)/(1+Math.sqrt(ce)),qe=P[G+e]+P[G+n]*(Fe/q.slowDown),P[G+e]=qe,mt=P[G+t]+P[G+r]*(Fe/q.slowDown),P[G+t]=mt);else for(G=0;G
=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in n&&typeof n.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in n&&!(typeof n.gravity=="number"&&n.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in n&&!(typeof n.slowDown=="number"||n.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in n&&typeof n.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in n&&!(typeof n.barnesHutTheta=="number"&&n.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},xa.graphToByteArrays=function(n,r){var a=n.order,i=n.size,l={},u,c=new Float32Array(a*e),f=new Float32Array(i*t);return u=0,n.forEachNode(function(p,g){l[p]=u,c[u]=g.x,c[u+1]=g.y,c[u+2]=0,c[u+3]=0,c[u+4]=0,c[u+5]=0,c[u+6]=1,c[u+7]=1,c[u+8]=g.size||1,c[u+9]=g.fixed?1:0,u+=e}),u=0,n.forEachEdge(function(p,g,b,m,S,v,A){var R=l[b],x=l[m],T=r(p,g,b,m,S,v,A);c[R+6]+=T,c[x+6]+=T,f[u]=R,f[u+1]=x,f[u+2]=T,u+=t}),{nodes:c,edges:f}},xa.assignLayoutChanges=function(n,r,a){var i=0;n.updateEachNodeAttributes(function(l,u){return u.x=r[i],u.y=r[i+1],i+=e,a?a(l,u):u})},xa.readGraphPositions=function(n,r){var a=0;n.forEachNode(function(i,l){r[a]=l.x,r[a+1]=l.y,a+=e})},xa.collectLayoutChanges=function(n,r,a){for(var i=n.nodes(),l={},u=0,c=0,f=r.length;u