!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-path"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{},t.d3)}(this,(function(t,i){"use strict";function n(t){return function(){return t}}var e=Math.abs,s=Math.atan2,o=Math.cos,h=Math.max,_=Math.min,r=Math.sin,a=Math.sqrt,c=1e-12,l=Math.PI,u=l/2,f=2*l;function y(t){return t>1?0:t<-1?l:Math.acos(t)}function x(t){return t>=1?u:t<=-1?-u:Math.asin(t)}function p(t){return t.innerRadius}function v(t){return t.outerRadius}function d(t){return t.startAngle}function T(t){return t.endAngle}function g(t){return t&&t.padAngle}function b(t,i,n,e,s,o,h,_){var r=n-t,a=e-i,l=h-s,u=_-o,f=u*r-l*a;if(!(f*fO*O+R*R&&(M=E,S=A),{cx:M,cy:S,x01:-u,y01:-f,x11:M*(s/w-1),y11:S*(s/w-1)}}var w=Array.prototype.slice;function k(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function N(t){this._context=t}function M(t){return new N(t)}function S(t){return t[0]}function E(t){return t[1]}function A(t,e){var s=n(!0),o=null,h=M,_=null;function r(n){var r,a,c,l=(n=k(n)).length,u=!1;for(null==o&&(_=h(c=i.path())),r=0;r<=l;++r)!(r=l;--u)a.point(v[u],d[u]);a.lineEnd(),a.areaEnd()}p&&(v[c]=+t(f,c,n),d[c]=+e(f,c,n),a.point(o?+o(f,c,n):v[c],s?+s(f,c,n):d[c]))}if(y)return a=null,y+""||null}function l(){return A().defined(h).curve(r).context(_)}return t="function"==typeof t?t:void 0===t?S:n(+t),e="function"==typeof e?e:n(void 0===e?0:+e),s="function"==typeof s?s:void 0===s?E:n(+s),c.x=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),o=null,c):t},c.x0=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),c):t},c.x1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:n(+t),c):o},c.y=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),s=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),c):e},c.y1=function(t){return arguments.length?(s=null==t?null:"function"==typeof t?t:n(+t),c):s},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(s)},c.lineX1=function(){return l().x(o).y(e)},c.defined=function(t){return arguments.length?(h="function"==typeof t?t:n(!!t),c):h},c.curve=function(t){return arguments.length?(r=t,null!=_&&(a=r(_)),c):r},c.context=function(t){return arguments.length?(null==t?_=a=null:a=r(_=t),c):_},c}function C(t,i){return it?1:i>=t?0:NaN}function O(t){return t}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}};var R=z(M);function q(t){this._curve=t}function z(t){function i(i){return new q(t(i))}return i._curve=t,i}function X(t){var i=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?i(z(t)):i()._curve},t}function Y(){return X(A().curve(R))}function B(){var t=P().curve(R),i=t.curve,n=t.lineX0,e=t.lineX1,s=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return X(n())},delete t.lineX0,t.lineEndAngle=function(){return X(e())},delete t.lineX1,t.lineInnerRadius=function(){return X(s())},delete t.lineY0,t.lineOuterRadius=function(){return X(o())},delete t.lineY1,t.curve=function(t){return arguments.length?i(z(t)):i()._curve},t}function j(t,i){return[(i=+i)*Math.cos(t-=Math.PI/2),i*Math.sin(t)]}function I(t){return t.source}function D(t){return t.target}function L(t){var e=I,s=D,o=S,h=E,_=null;function r(){var n,r=w.call(arguments),a=e.apply(this,r),c=s.apply(this,r);if(_||(_=n=i.path()),t(_,+o.apply(this,(r[0]=a,r)),+h.apply(this,r),+o.apply(this,(r[0]=c,r)),+h.apply(this,r)),n)return _=null,n+""||null}return r.source=function(t){return arguments.length?(e=t,r):e},r.target=function(t){return arguments.length?(s=t,r):s},r.x=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),r):o},r.y=function(t){return arguments.length?(h="function"==typeof t?t:n(+t),r):h},r.context=function(t){return arguments.length?(_=null==t?null:t,r):_},r}function V(t,i,n,e,s){t.moveTo(i,n),t.bezierCurveTo(i=(i+e)/2,n,i,s,e,s)}function W(t,i,n,e,s){t.moveTo(i,n),t.bezierCurveTo(i,n=(n+s)/2,e,n,e,s)}function H(t,i,n,e,s){var o=j(i,n),h=j(i,n=(n+s)/2),_=j(e,n),r=j(e,s);t.moveTo(o[0],o[1]),t.bezierCurveTo(h[0],h[1],_[0],_[1],r[0],r[1])}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,i){this._curve.point(i*Math.sin(t),i*-Math.cos(t))}};var F={draw:function(t,i){var n=Math.sqrt(i/l);t.moveTo(n,0),t.arc(0,0,n,0,f)}},G={draw:function(t,i){var n=Math.sqrt(i/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},J=Math.sqrt(1/3),K=2*J,Q={draw:function(t,i){var n=Math.sqrt(i/K),e=n*J;t.moveTo(0,-n),t.lineTo(e,0),t.lineTo(0,n),t.lineTo(-e,0),t.closePath()}},U=Math.sin(l/10)/Math.sin(7*l/10),Z=Math.sin(f/10)*U,$=-Math.cos(f/10)*U,tt={draw:function(t,i){var n=Math.sqrt(.8908130915292852*i),e=Z*n,s=$*n;t.moveTo(0,-n),t.lineTo(e,s);for(var o=1;o<5;++o){var h=f*o/5,_=Math.cos(h),r=Math.sin(h);t.lineTo(r*n,-_*n),t.lineTo(_*e-r*s,r*e+_*s)}t.closePath()}},it={draw:function(t,i){var n=Math.sqrt(i),e=-n/2;t.rect(e,e,n,n)}},nt=Math.sqrt(3),et={draw:function(t,i){var n=-Math.sqrt(i/(3*nt));t.moveTo(0,2*n),t.lineTo(-nt*n,-n),t.lineTo(nt*n,-n),t.closePath()}},st=-.5,ot=Math.sqrt(3)/2,ht=1/Math.sqrt(12),_t=3*(ht/2+1),rt={draw:function(t,i){var n=Math.sqrt(i/_t),e=n/2,s=n*ht,o=e,h=n*ht+n,_=-o,r=h;t.moveTo(e,s),t.lineTo(o,h),t.lineTo(_,r),t.lineTo(st*e-ot*s,ot*e+st*s),t.lineTo(st*o-ot*h,ot*o+st*h),t.lineTo(st*_-ot*r,ot*_+st*r),t.lineTo(st*e+ot*s,st*s-ot*e),t.lineTo(st*o+ot*h,st*h-ot*o),t.lineTo(st*_+ot*r,st*r-ot*_),t.closePath()}},at=[F,G,Q,it,tt,et,rt];function ct(){}function lt(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function yt(t){this._context=t}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lt(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},ft.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:lt(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,e):this._context.moveTo(n,e);break;case 3:this._point=4;default:lt(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};class xt{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}}function pt(t,i){this._basis=new ut(t),this._beta=i}pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var e,s=t[0],o=i[0],h=t[n]-s,_=i[n]-o,r=-1;++r<=n;)e=r/n,this._basis.point(this._beta*t[r]+(1-this._beta)*(s+e*h),this._beta*i[r]+(1-this._beta)*(o+e*_));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};var vt=function t(i){function n(t){return 1===i?new ut(t):new pt(t,i)}return n.beta=function(i){return t(+i)},n}(.85);function dt(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Tt(t,i){this._context=t,this._k=(1-i)/6}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:dt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:dt(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var gt=function t(i){function n(t){return new Tt(t,i)}return n.tension=function(i){return t(+i)},n}(0);function bt(t,i){this._context=t,this._k=(1-i)/6}bt.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:dt(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var mt=function t(i){function n(t){return new bt(t,i)}return n.tension=function(i){return t(+i)},n}(0);function wt(t,i){this._context=t,this._k=(1-i)/6}wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:dt(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var kt=function t(i){function n(t){return new wt(t,i)}return n.tension=function(i){return t(+i)},n}(0);function Nt(t,i,n){var e=t._x1,s=t._y1,o=t._x2,h=t._y2;if(t._l01_a>c){var _=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,r=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*_-t._x0*t._l12_2a+t._x2*t._l01_2a)/r,s=(s*_-t._y0*t._l12_2a+t._y2*t._l01_2a)/r}if(t._l23_a>c){var a=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*a+t._x1*t._l23_2a-i*t._l12_2a)/l,h=(h*a+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(e,s,o,h,t._x2,t._y2)}function Mt(t,i){this._context=t,this._alpha=i}Mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:Nt(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var St=function t(i){function n(t){return i?new Mt(t,i):new Tt(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Et(t,i){this._context=t,this._alpha=i}Et.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Nt(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var At=function t(i){function n(t){return i?new Et(t,i):new bt(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Pt(t,i){this._context=t,this._alpha=i}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Nt(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var Ct=function t(i){function n(t){return i?new Pt(t,i):new wt(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Ot(t){this._context=t}function Rt(t){return t<0?-1:1}function qt(t,i,n){var e=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(e||s<0&&-0),h=(n-t._y1)/(s||e<0&&-0),_=(o*s+h*e)/(e+s);return(Rt(o)+Rt(h))*Math.min(Math.abs(o),Math.abs(h),.5*Math.abs(_))||0}function zt(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function Xt(t,i,n){var e=t._x0,s=t._y0,o=t._x1,h=t._y1,_=(o-e)/3;t._context.bezierCurveTo(e+_,s+_*i,o-_,h-_*n,o,h)}function Yt(t){this._context=t}function Bt(t){this._context=new jt(t)}function jt(t){this._context=t}function It(t){this._context=t}function Dt(t){var i,n,e=t.length-1,s=new Array(e),o=new Array(e),h=new Array(e);for(s[0]=0,o[0]=2,h[0]=t[0]+2*t[1],i=1;i=0;--i)s[i]=(h[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i1)for(var n,e,s,o=1,h=t[i[0]],_=h.length;o=0;)n[i]=i;return n}function Ht(t,i){return t[i]}function Ft(t){const i=[];return i.key=t,i}function Gt(t){var i=t.map(Jt);return Wt(t).sort((function(t,n){return i[t]-i[n]}))}function Jt(t){for(var i,n=-1,e=0,s=t.length,o=-1/0;++no&&(o=i,e=n);return e}function Kt(t){var i=t.map(Qt);return Wt(t).sort((function(t,n){return i[t]-i[n]}))}function Qt(t){for(var i,n=0,e=-1,s=t.length;++e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i}},t.arc=function(){var t=p,h=v,w=n(0),k=null,N=d,M=T,S=g,E=null;function A(){var n,p,v=+t.apply(this,arguments),d=+h.apply(this,arguments),T=N.apply(this,arguments)-u,g=M.apply(this,arguments)-u,A=e(g-T),P=g>T;if(E||(E=n=i.path()),dc)if(A>f-c)E.moveTo(d*o(T),d*r(T)),E.arc(0,0,d,T,g,!P),v>c&&(E.moveTo(v*o(g),v*r(g)),E.arc(0,0,v,g,T,P));else{var C,O,R=T,q=g,z=T,X=g,Y=A,B=A,j=S.apply(this,arguments)/2,I=j>c&&(k?+k.apply(this,arguments):a(v*v+d*d)),D=_(e(d-v)/2,+w.apply(this,arguments)),L=D,V=D;if(I>c){var W=x(I/v*r(j)),H=x(I/d*r(j));(Y-=2*W)>c?(z+=W*=P?1:-1,X-=W):(Y=0,z=X=(T+g)/2),(B-=2*H)>c?(R+=H*=P?1:-1,q-=H):(B=0,R=q=(T+g)/2)}var F=d*o(R),G=d*r(R),J=v*o(X),K=v*r(X);if(D>c){var Q,U=d*o(q),Z=d*r(q),$=v*o(z),tt=v*r(z);if(Ac?V>c?(C=m($,tt,F,G,d,V,P),O=m(U,Z,J,K,d,V,P),E.moveTo(C.cx+C.x01,C.cy+C.y01),Vc&&Y>c?L>c?(C=m(J,K,U,Z,v,-L,P),O=m(F,G,$,tt,v,-L,P),E.lineTo(C.cx+C.x01,C.cy+C.y01),L0&&(y+=l);for(null!=i?x.sort((function(t,n){return i(p[t],p[n])})):null!=e&&x.sort((function(t,i){return e(n[t],n[i])})),_=0,a=y?(d-u*g)/y:0;_0?l*a:0)+g,p[r]={data:n[r],index:_,value:l,startAngle:v,endAngle:c,padAngle:T};return p}return _.value=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),_):t},_.sortValues=function(t){return arguments.length?(i=t,e=null,_):i},_.sort=function(t){return arguments.length?(e=t,i=null,_):e},_.startAngle=function(t){return arguments.length?(s="function"==typeof t?t:n(+t),_):s},_.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),_):o},_.padAngle=function(t){return arguments.length?(h="function"==typeof t?t:n(+t),_):h},_},t.pointRadial=j,t.radialArea=B,t.radialLine=Y,t.stack=function(){var t=n([]),i=Wt,e=Vt,s=Ht;function o(n){var o,h,_=Array.from(t.apply(this,arguments),Ft),r=_.length,a=-1;for(const t of n)for(o=0,++a;o0)for(var n,e,s,o,h,_,r=0,a=t[i[0]].length;r0?(e[0]=o,e[1]=o+=s):s<0?(e[1]=h,e[0]=h+=s):(e[0]=0,e[1]=s)},t.stackOffsetExpand=function(t,i){if((e=t.length)>0){for(var n,e,s,o=0,h=t[0].length;o0){for(var n,e=0,s=t[i[0]],o=s.length;e0&&(e=(n=t[i[0]]).length)>0){for(var n,e,s,o=0,h=1;h