m&&(O.dx*=m/C,O.dy*=m/C),S.fromGraph(r,N)?O.fixed=!0:(O.x+=O.dx,O.y+=O.dy,O.fixed=!1)}return{converged:x}},Am}var Id={},VN;function K4(){return VN||(VN=1,Id.assignLayoutChanges=function(e,t,n){const{nodeXAttribute:r,nodeYAttribute:a}=n;e.updateEachNodeAttributes((o,s)=>{const u=t[o];return!u||u.fixed||(s[r]=u.x,s[a]=u.y),s},{attributes:["x","y"]})},Id.collectLayoutChanges=function(e){const t={};for(const n in e){const r=e[n];t[n]={x:r.x,y:r.y}}return t}),Id}var Rm,WN;function X4(){return WN||(WN=1,Rm={nodeXAttribute:"x",nodeYAttribute:"y",isNodeFixed:"fixed",shouldSkipNode:null,shouldSkipEdge:null,settings:{attraction:5e-4,repulsion:.1,gravity:1e-4,inertia:.6,maxMove:200}}),Rm}var Cm,YN;function Nne(){if(YN)return Cm;YN=1;const e=ua(),t=tc(),n=Y4(),r=K4(),a=X4();function o(u,c,d){if(!e(c))throw new Error("graphology-layout-force: the given graph is not a valid graphology instance.");typeof d=="number"?d={maxIterations:d}:d=d||{};const p=d.maxIterations;if(d=t(d,a),typeof p!="number"||p<=0)throw new Error("graphology-layout-force: you should provide a positive number of maximum iterations.");const g={};let m=null,b;for(b=0;bthis.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},_m=o,_m}var Lne=Dne();const Mne=cn(Lne);function Pne(e={maxIterations:100}){return el(Ine,e)}function Fne(e={}){return vT(Mne,e)}var Nm,XN;function zne(){if(XN)return Nm;XN=1;var e=0,t=1,n=2,r=3,a=4,o=5,s=6,u=7,c=8,d=9,p=0,g=1,m=2,b=0,y=1,S=2,k=3,R=4,x=5,A=6,N=7,O=8,C=3,_=10,P=3,D=9,L=10;return Nm=function($,U,W){var Z,j,G,z,Y,I,V,B,M,K,ee=U.length,Q=W.length,J=$.adjustSizes,ae=$.barnesHutTheta*$.barnesHutTheta,ye,ie,Ee,Se,De,Ce,we,te=[];for(G=0;GNe?(me-=(he-Ne)/2,xe=me+he):(fe-=(Ne-he)/2,Te=fe+Ne),te[0+b]=-1,te[0+y]=(fe+Te)/2,te[0+S]=(me+xe)/2,te[0+k]=Math.max(Te-fe,xe-me),te[0+R]=-1,te[0+x]=-1,te[0+A]=0,te[0+N]=0,te[0+O]=0,Z=1,G=0;G=0){U[G+e]=0)if(Ce=Math.pow(U[G+e]-te[j+N],2)+Math.pow(U[G+t]-te[j+O],2),K=te[j+k],4*K*K/Ce0?(we=ie*U[G+s]*te[j+A]/Ce,U[G+n]+=Ee*we,U[G+r]+=Se*we):Ce<0&&(we=-ie*U[G+s]*te[j+A]/Math.sqrt(Ce),U[G+n]+=Ee*we,U[G+r]+=Se*we):Ce>0&&(we=ie*U[G+s]*te[j+A]/Ce,U[G+n]+=Ee*we,U[G+r]+=Se*we),j=te[j+R],j<0)break;continue}else{j=te[j+x];continue}else{if(I=te[j+b],I>=0&&I!==G&&(Ee=U[G+e]-U[I+e],Se=U[G+t]-U[I+t],Ce=Ee*Ee+Se*Se,J===!0?Ce>0?(we=ie*U[G+s]*U[I+s]/Ce,U[G+n]+=Ee*we,U[G+r]+=Se*we):Ce<0&&(we=-ie*U[G+s]*U[I+s]/Math.sqrt(Ce),U[G+n]+=Ee*we,U[G+r]+=Se*we):Ce>0&&(we=ie*U[G+s]*U[I+s]/Ce,U[G+n]+=Ee*we,U[G+r]+=Se*we)),j=te[j+R],j<0)break;continue}else for(ie=$.scalingRatio,z=0;z0?(we=ie*U[z+s]*U[Y+s]/Ce/Ce,U[z+n]+=Ee*we,U[z+r]+=Se*we,U[Y+n]-=Ee*we,U[Y+r]-=Se*we):Ce<0&&(we=100*ie*U[z+s]*U[Y+s],U[z+n]+=Ee*we,U[z+r]+=Se*we,U[Y+n]-=Ee*we,U[Y+r]-=Se*we)):(Ce=Math.sqrt(Ee*Ee+Se*Se),Ce>0&&(we=ie*U[z+s]*U[Y+s]/Ce/Ce,U[z+n]+=Ee*we,U[z+r]+=Se*we,U[Y+n]-=Ee*we,U[Y+r]-=Se*we));for(M=$.gravity/$.scalingRatio,ie=$.scalingRatio,G=0;G0&&(we=ie*U[G+s]*M):Ce>0&&(we=ie*U[G+s]*M/Ce),U[G+n]-=Ee*we,U[G+r]-=Se*we;for(ie=1*($.outboundAttractionDistribution?ye:1),V=0;V0&&(we=-ie*De*Math.log(1+Ce)/Ce/U[z+s]):Ce>0&&(we=-ie*De*Math.log(1+Ce)/Ce):$.outboundAttractionDistribution?Ce>0&&(we=-ie*De/U[z+s]):Ce>0&&(we=-ie*De)):(Ce=Math.sqrt(Math.pow(Ee,2)+Math.pow(Se,2)),$.linLogMode?$.outboundAttractionDistribution?Ce>0&&(we=-ie*De*Math.log(1+Ce)/Ce/U[z+s]):Ce>0&&(we=-ie*De*Math.log(1+Ce)/Ce):$.outboundAttractionDistribution?(Ce=1,we=-ie*De/U[z+s]):(Ce=1,we=-ie*De)),Ce>0&&(U[z+n]+=Ee*we,U[z+r]+=Se*we,U[Y+n]-=Ee*we,U[Y+r]-=Se*we);var ne,ce,_e,Fe,We,yt;if(J===!0)for(G=0;GL&&(U[G+n]=U[G+n]*L/ne,U[G+r]=U[G+r]*L/ne),ce=U[G+s]*Math.sqrt((U[G+a]-U[G+n])*(U[G+a]-U[G+n])+(U[G+o]-U[G+r])*(U[G+o]-U[G+r])),_e=Math.sqrt((U[G+a]+U[G+n])*(U[G+a]+U[G+n])+(U[G+o]+U[G+r])*(U[G+o]+U[G+r]))/2,Fe=.1*Math.log(1+_e)/(1+Math.sqrt(ce)),We=U[G+e]+U[G+n]*(Fe/$.slowDown),U[G+e]=We,yt=U[G+t]+U[G+r]*(Fe/$.slowDown),U[G+t]=yt);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},Ia.graphToByteArrays=function(n,r){var a=n.order,o=n.size,s={},u,c=new Float32Array(a*e),d=new Float32Array(o*t);return u=0,n.forEachNode(function(p,g){s[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,m,b,y,S,k){var R=s[m],x=s[b],A=r(p,g,m,b,y,S,k);c[R+6]+=A,c[x+6]+=A,d[u]=R,d[u+1]=x,d[u+2]=A,u+=t}),{nodes:c,edges:d}},Ia.assignLayoutChanges=function(n,r,a){var o=0;n.updateEachNodeAttributes(function(s,u){return u.x=r[o],u.y=r[o+1],o+=e,a?a(s,u):u})},Ia.readGraphPositions=function(n,r){var a=0;n.forEachNode(function(o,s){r[a]=s.x,r[a+1]=s.y,a+=e})},Ia.collectLayoutChanges=function(n,r,a){for(var o=n.nodes(),s={},u=0,c=0,d=r.length;u2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(d)}}var u=o.bind(null,!1);return u.assign=o.bind(null,!0),u.inferSettings=s,Im=u,Im}var Une=Bne();const jne=cn(Une);var Dm,eO;function Gne(){return eO||(eO=1,Dm=function(){var t,n,r={};(function(){var o=0,s=1,u=2,c=3,d=4,p=5,g=6,m=7,b=8,y=9,S=0,k=1,R=2,x=0,A=1,N=2,O=3,C=4,_=5,P=6,D=7,L=8,H=3,$=10,U=3,W=9,Z=10;r.exports=function(G,z,Y){var I,V,B,M,K,ee,Q,J,ae,ye,ie=z.length,Ee=Y.length,Se=G.adjustSizes,De=G.barnesHutTheta*G.barnesHutTheta,Ce,we,te,fe,Te,me,xe,le=[];for(B=0;B