const e=require("./path-Kklx0M1v.cjs"),t=require("./math-G8rF7UWn.cjs");function n(e){return e.innerRadius}function r(e){return e.outerRadius}function i(e){return e.startAngle}function a(e){return e.endAngle}function o(e){return e&&e.padAngle}function s(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function c(e,n,r,i,a,o,s){var c=e-r,l=n-i,u=(s?o:-o)/t.f(c*c+l*l),d=u*l,f=-u*c,p=e+d,m=n+f,h=r+d,g=i+f,_=(p+h)/2,v=(m+g)/2,y=h-p,b=g-m,x=y*y+b*b,S=a-o,C=p*g-h*m,w=(b<0?-1:1)*t.f(t.c(0,S*S*x-C*C)),T=(C*b-y*w)/x,E=(-C*y-b*w)/x,D=(C*b+y*w)/x,O=(-C*y+b*w)/x,k=T-_,A=E-v,j=D-_,M=O-v;return k*k+A*A>j*j+M*M&&(T=D,E=O),{cx:T,cy:E,x01:-d,y01:-f,x11:T*(a/S-1),y11:E*(a/S-1)}}function l(){var l=n,u=r,d=e.n(0),f=null,p=i,m=a,h=o,g=null,_=e.t(v);function v(){var e,n,r=+l.apply(this,arguments),i=+u.apply(this,arguments),a=p.apply(this,arguments)-t.s,o=m.apply(this,arguments)-t.s,v=t.t(o-a),y=o>a;if(g||=e=_(),i<r&&(n=i,i=r,r=n),!(i>1e-12))g.moveTo(0,0);else if(v>t.p-1e-12)g.moveTo(i*t.a(a),i*t.d(a)),g.arc(0,0,i,a,o,!y),r>1e-12&&(g.moveTo(r*t.a(o),r*t.d(o)),g.arc(0,0,r,o,a,y));else{var b=a,x=o,S=a,C=o,w=v,T=v,E=h.apply(this,arguments)/2,D=E>1e-12&&(f?+f.apply(this,arguments):t.f(r*r+i*i)),O=t.l(t.t(i-r)/2,+d.apply(this,arguments)),k=O,A=O,j,M;if(D>1e-12){var N=t.r(D/r*t.d(E)),P=t.r(D/i*t.d(E));(w-=N*2)>1e-12?(N*=y?1:-1,S+=N,C-=N):(w=0,S=C=(a+o)/2),(T-=P*2)>1e-12?(P*=y?1:-1,b+=P,x-=P):(T=0,b=x=(a+o)/2)}var F=i*t.a(b),I=i*t.d(b),L=r*t.a(C),R=r*t.d(C);if(O>1e-12){var z=i*t.a(x),B=i*t.d(x),V=r*t.a(S),H=r*t.d(S),U;if(v<t.u)if(U=s(F,I,V,H,z,B,L,R)){var W=F-U[0],G=I-U[1],K=z-U[0],q=B-U[1],J=1/t.d(t.n((W*K+G*q)/(t.f(W*W+G*G)*t.f(K*K+q*q)))/2),Y=t.f(U[0]*U[0]+U[1]*U[1]);k=t.l(O,(r-Y)/(J-1)),A=t.l(O,(i-Y)/(J+1))}else k=A=0}T>1e-12?A>1e-12?(j=c(V,H,F,I,i,A,y),M=c(z,B,L,R,i,A,y),g.moveTo(j.cx+j.x01,j.cy+j.y01),A<O?g.arc(j.cx,j.cy,A,t.i(j.y01,j.x01),t.i(M.y01,M.x01),!y):(g.arc(j.cx,j.cy,A,t.i(j.y01,j.x01),t.i(j.y11,j.x11),!y),g.arc(0,0,i,t.i(j.cy+j.y11,j.cx+j.x11),t.i(M.cy+M.y11,M.cx+M.x11),!y),g.arc(M.cx,M.cy,A,t.i(M.y11,M.x11),t.i(M.y01,M.x01),!y))):(g.moveTo(F,I),g.arc(0,0,i,b,x,!y)):g.moveTo(F,I),!(r>1e-12)||!(w>1e-12)?g.lineTo(L,R):k>1e-12?(j=c(L,R,z,B,r,-k,y),M=c(F,I,V,H,r,-k,y),g.lineTo(j.cx+j.x01,j.cy+j.y01),k<O?g.arc(j.cx,j.cy,k,t.i(j.y01,j.x01),t.i(M.y01,M.x01),!y):(g.arc(j.cx,j.cy,k,t.i(j.y01,j.x01),t.i(j.y11,j.x11),!y),g.arc(0,0,r,t.i(j.cy+j.y11,j.cx+j.x11),t.i(M.cy+M.y11,M.cx+M.x11),y),g.arc(M.cx,M.cy,k,t.i(M.y11,M.x11),t.i(M.y01,M.x01),!y))):g.arc(0,0,r,C,S,y)}if(g.closePath(),e)return g=null,e+``||null}return v.centroid=function(){var e=(+l.apply(this,arguments)+ +u.apply(this,arguments))/2,n=(+p.apply(this,arguments)+ +m.apply(this,arguments))/2-t.u/2;return[t.a(n)*e,t.d(n)*e]},v.innerRadius=function(t){return arguments.length?(l=typeof t==`function`?t:e.n(+t),v):l},v.outerRadius=function(t){return arguments.length?(u=typeof t==`function`?t:e.n(+t),v):u},v.cornerRadius=function(t){return arguments.length?(d=typeof t==`function`?t:e.n(+t),v):d},v.padRadius=function(t){return arguments.length?(f=t==null?null:typeof t==`function`?t:e.n(+t),v):f},v.startAngle=function(t){return arguments.length?(p=typeof t==`function`?t:e.n(+t),v):p},v.endAngle=function(t){return arguments.length?(m=typeof t==`function`?t:e.n(+t),v):m},v.padAngle=function(t){return arguments.length?(h=typeof t==`function`?t:e.n(+t),v):h},v.context=function(e){return arguments.length?(g=e??null,v):g},v}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});