import{M as on,N as rn,O as l,P as un,Q as I,R as M,S,T as an,V as cn,W as k,X as y,Y as V,Z as sn,$ as yn,a0 as en}from"./mermaid.core-DbXixP4-.chunk.mjs";function fn(o){return o.innerRadius}function ln(o){return o.outerRadius}function pn(o){return o.startAngle}function gn(o){return o.endAngle}function xn(o){return o&&o.padAngle}function mn(o,v,Y,N,d,T,_,r){var j=Y-o,s=N-v,n=_-d,g=r-T,a=g*j-n*s;if(!(a*a<l))return a=(n*(v-T)-g*(o-d))/a,[o+a*j,v+a*s]}function B(o,v,Y,N,d,T,_){var r=o-Y,j=v-N,s=(_?T:-T)/k(r*r+j*j),n=s*j,g=-s*r,a=o+n,i=v+g,e=Y+n,f=N+g,D=(a+e)/2,u=(i+f)/2,x=e-a,p=f-i,R=x*x+p*p,q=d-T,A=a*f-e*i,H=(p<0?-1:1)*k(en(0,q*q*R-A*A)),O=(A*p-x*H)/R,P=(-A*x-p*H)/R,W=(A*p+x*H)/R,m=(-A*x+p*H)/R,h=O-D,t=P-u,c=W-D,E=m-u;return h*h+t*t>c*c+E*E&&(O=W,P=m),{cx:O,cy:P,x01:-n,y01:-g,x11:O*(d/q-1),y11:P*(d/q-1)}}function vn(){var o=fn,v=ln,Y=V(0),N=null,d=pn,T=gn,_=xn,r=null,j=on(s);function s(){var n,g,a=+o.apply(this,arguments),i=+v.apply(this,arguments),e=d.apply(this,arguments)-rn,f=T.apply(this,arguments)-rn,D=an(f-e),u=f>e;if(r||(r=n=j()),i<a&&(g=i,i=a,a=g),!(i>l))r.moveTo(0,0);else if(D>un-l)r.moveTo(i*I(e),i*M(e)),r.arc(0,0,i,e,f,!u),a>l&&(r.moveTo(a*I(f),a*M(f)),r.arc(0,0,a,f,e,u));else{var x=e,p=f,R=e,q=f,A=D,H=D,O=_.apply(this,arguments)/2,P=O>l&&(N?+N.apply(this,arguments):k(a*a+i*i)),W=S(an(i-a)/2,+Y.apply(this,arguments)),m=W,h=W,t,c;if(P>l){var E=sn(P/a*M(O)),J=sn(P/i*M(O));(A-=E*2)>l?(E*=u?1:-1,R+=E,q-=E):(A=0,R=q=(e+f)/2),(H-=J*2)>l?(J*=u?1:-1,x+=J,p-=J):(H=0,x=p=(e+f)/2)}var X=i*I(x),b=i*M(x),K=a*I(q),L=a*M(q);if(W>l){var U=i*I(p),z=i*M(p),C=a*I(R),F=a*M(R),Q;if(D<cn)if(Q=mn(X,b,C,F,U,z,K,L)){var G=X-Q[0],Z=b-Q[1],$=U-Q[0],w=z-Q[1],nn=1/M(yn((G*$+Z*w)/(k(G*G+Z*Z)*k($*$+w*w)))/2),tn=k(Q[0]*Q[0]+Q[1]*Q[1]);m=S(W,(a-tn)/(nn-1)),h=S(W,(i-tn)/(nn+1))}else m=h=0}H>l?h>l?(t=B(C,F,X,b,i,h,u),c=B(U,z,K,L,i,h,u),r.moveTo(t.cx+t.x01,t.cy+t.y01),h<W?r.arc(t.cx,t.cy,h,y(t.y01,t.x01),y(c.y01,c.x01),!u):(r.arc(t.cx,t.cy,h,y(t.y01,t.x01),y(t.y11,t.x11),!u),r.arc(0,0,i,y(t.cy+t.y11,t.cx+t.x11),y(c.cy+c.y11,c.cx+c.x11),!u),r.arc(c.cx,c.cy,h,y(c.y11,c.x11),y(c.y01,c.x01),!u))):(r.moveTo(X,b),r.arc(0,0,i,x,p,!u)):r.moveTo(X,b),!(a>l)||!(A>l)?r.lineTo(K,L):m>l?(t=B(K,L,U,z,a,-m,u),c=B(X,b,C,F,a,-m,u),r.lineTo(t.cx+t.x01,t.cy+t.y01),m<W?r.arc(t.cx,t.cy,m,y(t.y01,t.x01),y(c.y01,c.x01),!u):(r.arc(t.cx,t.cy,m,y(t.y01,t.x01),y(t.y11,t.x11),!u),r.arc(0,0,a,y(t.cy+t.y11,t.cx+t.x11),y(c.cy+c.y11,c.cx+c.x11),u),r.arc(c.cx,c.cy,m,y(c.y11,c.x11),y(c.y01,c.x01),!u))):r.arc(0,0,a,q,R,u)}if(r.closePath(),n)return r=null,n+""||null}return s.centroid=function(){var n=(+o.apply(this,arguments)+ +v.apply(this,arguments))/2,g=(+d.apply(this,arguments)+ +T.apply(this,arguments))/2-cn/2;return[I(g)*n,M(g)*n]},s.innerRadius=function(n){return arguments.length?(o=typeof n=="function"?n:V(+n),s):o},s.outerRadius=function(n){return arguments.length?(v=typeof n=="function"?n:V(+n),s):v},s.cornerRadius=function(n){return arguments.length?(Y=typeof n=="function"?n:V(+n),s):Y},s.padRadius=function(n){return arguments.length?(N=n==null?null:typeof n=="function"?n:V(+n),s):N},s.startAngle=function(n){return arguments.length?(d=typeof n=="function"?n:V(+n),s):d},s.endAngle=function(n){return arguments.length?(T=typeof n=="function"?n:V(+n),s):T},s.padAngle=function(n){return arguments.length?(_=typeof n=="function"?n:V(+n),s):_},s.context=function(n){return arguments.length?(r=n??null,s):r},s}export{vn as d};
//# sourceMappingURL=arc-B7SkWO2v.chunk.mjs.map
