// https://d3js.org/d3-geo-projection/ Version 2.4.0. Copyright 2018 Mike Bostock.
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("d3-geo"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-geo","d3-array"],r):r(n.d3=n.d3||{},n.d3,n.d3)}(this,function(n,r,e){"use strict";function t(n){return n>1?Ar:n<-1?-Ar:Math.asin(n)}function o(n){return n>1?0:n<-1?Er:Math.acos(n)}function i(n){return n>0?Math.sqrt(n):0}function u(n){return(sr(n)-sr(-n))/2}function a(n){return(sr(n)+sr(-n))/2}function c(n){function r(n,r){var e=vr(n),t=vr(r),i=Rr(r),u=t*e,a=-((1-u?hr((1+u)/2)/(1-u):-.5)+o/(1+u));return[a*t*Rr(n),a*i]}var e=br(n/2),o=2*hr(vr(n/2))/(e*e);return r.invert=function(r,e){var u,a=i(r*r+e*e),c=-n/2,f=50;if(!a)return[0,0];do{var l=c/2,g=vr(l),v=Rr(l),s=br(l),p=hr(1/g);c-=u=(2/s*p-o*s-a)/(-p/(v*v)+1-o/(2*g*g))}while(fr(u)>jr&&--f>0);var h=Rr(c);return[gr(r*h,a*vr(c)),t(e*h/a)]},r}function f(n,r){var e=vr(r),t=function(n){return n?n/Math.sin(n):1}(o(e*vr(n/=2)));return[2*e*Rr(n)*t,Rr(r)*t]}function l(n){function r(n,r){var a=vr(r),c=vr(n/=2);return[(1+a)*Rr(n),(o*r>-gr(c,i)-.001?0:10*-o)+u+Rr(r)*t-(1+a)*e*c]}var e=Rr(n),t=vr(n),o=n>=0?1:-1,i=br(o*n),u=(1+e-t)/2;return r.invert=function(n,r){var a=0,c=0,f=50;do{var l=vr(a),g=Rr(a),v=vr(c),s=Rr(c),p=1+v,h=p*g-n,d=u+s*t-p*e*l-r,w=p*l/2,y=-g*s,m=e*p*g/2,P=t*v+e*l*s,R=y*m-P*w,b=(d*y-h*P)/R/2,j=(h*m-d*w)/R;a-=b,c-=j}while((fr(b)>jr||fr(j)>jr)&&--f>0);return o*c>-gr(vr(a),i)-.001?[2*a,c]:null},r}function g(n,r){var e=br(r/2),t=i(1-e*e),o=1+t*vr(n/=2),u=Rr(n)*t/o,a=e/o,c=u*u,f=a*a;return[4/3*u*(3+c-3*f),4/3*a*(3+3*c-f)]}function v(n,r){var e=fr(r);return e<Sr?[n,hr(br(Sr+r/2))]:[n*vr(e)*(2*xr-1/Rr(e)),Pr(r)*(2*xr*(e-Sr)-hr(br(e/2)))]}function s(n){function e(n,e){var o=r.geoAzimuthalEquidistantRaw(n,e);if(fr(n)>Ar){var a=gr(o[1],o[0]),c=i(o[0]*o[0]+o[1]*o[1]),f=u*mr((a-Ar)/u)+Ar,l=gr(Rr(a-=f),2-vr(a));a=f+t(Er/c*Rr(l))-l,o[0]=c*vr(a),o[1]=c*Rr(a)}return o}var u=2*Er/n;return e.invert=function(n,e){var t=i(n*n+e*e);if(t>Ar){var a=gr(e,n),c=u*mr((a-Ar)/u)+Ar,f=a>c?-1:1,l=t*vr(c-a),g=1/br(f*o((l-Er)/i(Er*(Er-2*l)+t*t)));a=c+2*lr((g+f*i(g*g-3))/3),n=t*vr(a),e=t*Rr(a)}return r.geoAzimuthalEquidistantRaw.invert(n,e)},e}function p(n,e){function t(t,o){var i=r.geoAzimuthalEqualAreaRaw(t/e,o);return i[0]*=n,i}return arguments.length<2&&(e=n),1===e?r.geoAzimuthalEqualAreaRaw:e===1/0?h:(t.invert=function(t,o){var i=r.geoAzimuthalEqualAreaRaw.invert(t/n,o);return i[0]*=e,i},t)}function h(n,r){return[n*vr(r)/vr(r/=2),2*Rr(r)]}function d(){var n=p(1.68,2);return function(r,e){if(r+e<-1.4){var t=(r-e+1.6)*(r+e+1.4)/8;r+=t,e-=.8*t*Rr(e+Er/2)}var o=n(r,e),i=(1-vr(r*e))/12;return o[1]<0&&(o[0]*=1+i),o[1]>0&&(o[1]*=1+i/1.5*o[0]*o[0]),o}}function w(n,r){var e,t=n*Rr(r),o=30;do{r-=e=(r+Rr(r)-t)/(1+vr(r))}while(fr(e)>jr&&--o>0);return r/2}function y(n,r,e){function o(t,o){return[n*t*vr(o=w(e,o)),r*Rr(o)]}return o.invert=function(o,i){return i=t(i/r),[o/(n*vr(i)),t((2*i+Rr(2*i))/e)]},o}function m(n,r){var e=w(Er,r);return[Br*n/(1/vr(r)+Hr/vr(e)),(r+xr*Rr(e))/Br]}function P(n,r){return[n*vr(r),r]}function R(n){function r(r,t){var o=e+n-t,i=o?r*vr(t)/o:o;return[o*Rr(i),e-o*vr(i)]}if(!n)return P;var e=1/br(n);return r.invert=function(r,t){var o=i(r*r+(t=e-t)*t),u=e+n-o;return[o/vr(u)*gr(r,t),u]},r}function b(n){function r(r,e){var t=Ar-e,o=t?r*n*Rr(t)/t:t;return[t*Rr(o)/n,Ar-t*vr(o)]}return r.invert=function(r,e){var t=r*n,o=Ar-e,u=i(t*t+o*o),a=gr(t,o);return[(u?u/Rr(u):1)*a/n,Ar-u]},r}function j(n,r,e,u,a,c){var f,l=vr(c);if(fr(n)>1||fr(c)>1)f=o(e*a+r*u*l);else{var g=Rr(n/2),v=Rr(c/2);f=2*t(i(g*g+r*u*v*v))}return fr(f)>jr?[f,gr(u*Rr(c),r*a-e*u*l)]:[0,0]}function M(n,r,e){return o((n*n+r*r-e*e)/(2*n*r))}function E(n){return n-2*Er*pr((n+Er)/(2*Er))}function A(n,r,e){for(var t,o=[[n[0],n[1],Rr(n[1]),vr(n[1])],[r[0],r[1],Rr(r[1]),vr(r[1])],[e[0],e[1],Rr(e[1]),vr(e[1])]],i=o[2],u=0;u<3;++u,i=t)t=o[u],i.v=j(t[1]-i[1],i[3],i[2],t[3],t[2],t[0]-i[0]),i.point=[0,0];var a=M(o[0].v[0],o[2].v[0],o[1].v[0]),c=M(o[0].v[0],o[1].v[0],o[2].v[0]),f=Er-a;o[2].point[1]=0,o[0].point[0]=-(o[1].point[0]=o[0].v[0]/2);var l=[o[2].point[0]=o[0].point[0]+o[2].v[0]*vr(a),2*(o[0].point[1]=o[1].point[1]=o[2].v[0]*Rr(a))];return function(n,r){var e,t=Rr(r),i=vr(r),u=new Array(3);for(e=0;e<3;++e){var a=o[e];if(u[e]=j(r-a[1],a[3],a[2],i,t,n-a[0]),!u[e][0])return a.point;u[e][1]=E(u[e][1]-a.v[1])}var g=l.slice();for(e=0;e<3;++e){var v=2==e?0:e+1,s=M(o[e].v[0],u[e][0],u[v][0]);u[e][1]<0&&(s=-s),e?1==e?(s=c-s,g[0]-=u[e][0]*vr(s),g[1]-=u[e][0]*Rr(s)):(s=f-s,g[0]+=u[e][0]*vr(s),g[1]+=u[e][0]*Rr(s)):(g[0]+=u[e][0]*vr(s),g[1]-=u[e][0]*Rr(s))}return g[0]/=3,g[1]/=3,g}}function S(n){return n[0]*=Fr,n[1]*=Fr,n}function k(n,e,t){var o=r.geoCentroid({type:"MultiPoint",coordinates:[n,e,t]}),i=[-o[0],-o[1]],u=r.geoRotation(i),a=r.geoProjection(A(S(u(n)),S(u(e)),S(u(t)))).rotate(i),c=a.center;return delete a.rotate,a.center=function(n){return arguments.length?c(u(n)):u.invert(c())},a.clipAngle(90)}function x(n,r){var e=i(1-Rr(r));return[2/Gr*n*e,Gr*(1-e)]}function G(n){function r(n,r){return[n,(n?n/Rr(n):1)*(Rr(r)*vr(n)-e*vr(r))]}var e=br(n);return r.invert=e?function(n,r){n&&(r*=Rr(n)/n);var t=vr(n);return[n,2*gr(i(t*t+e*e-r*r)-t,e-r)]}:function(n,r){return[n,t(n?r*br(n)/n:r)]},r}function C(n,r){return[Dr*n*(2*vr(2*r/3)-1)/Gr,Dr*Gr*Rr(r/3)]}function z(n){function r(n,r){return[n*e,Rr(r)/e]}var e=vr(n);return r.invert=function(n,r){return[n/e,t(r*e)]},r}function F(n){function r(n,r){return[n*e,(1+e)*br(r/2)]}var e=vr(n);return r.invert=function(n,r){return[n/e,2*lr(r/(1+e))]},r}function N(n,r){var e=i(8/(3*Er));return[e*n*(1-fr(r)/Er),e*r]}function L(n,r){var e=i(4-3*Rr(fr(r)));return[2/i(6*Er)*n*e,Pr(r)*i(2*Er/3)*(2-e)]}function q(n,r){var e=i(Er*(4+Er));return[2/e*n*(1+i(1-4*r*r/(Er*Er))),4/e*r]}function B(n,r){var e=(2+Ar)*Rr(r);r/=2;for(var t=0,o=1/0;t<10&&fr(o)>jr;t++){var u=vr(r);r-=o=(r+Rr(r)*(u+2)-e)/(2*u*(1+u))}return[2/i(Er*(4+Er))*n*(1+vr(r)),2*i(Er/(4+Er))*Rr(r)]}function H(n,r){return[n*(1+vr(r))/i(2+Er),2*r/i(2+Er)]}function I(n,r){for(var e=(1+Ar)*Rr(r),t=0,o=1/0;t<10&&fr(o)>jr;t++)r-=o=(r+Rr(r)-e)/(1+vr(r));return e=i(2+Er),[n*(1+vr(r))/e,2*r/e]}function W(n,r){var e=Rr(n/=2),t=vr(n),o=i(vr(r)),u=vr(r/=2),a=Rr(r)/(u+xr*t*o),c=i(2/(1+a*a)),f=i((xr*u+(t+e)*o)/(xr*u+(t-e)*o));return[Tr*(c*(f-1/f)-2*hr(f)),Tr*(c*a*(f+1/f)-2*lr(a))]}function D(n,r){var e=br(r/2);return[n*Qr*i(1-e*e),(1+Qr)*e]}function T(n,r){var e=r/2,t=vr(e);return[2*n/Gr*vr(r)*t*t,Gr*br(e)]}function Q(n){return[n[0]/2,t(br(n[1]/2*Fr))*zr]}function V(n){return[2*n[0],2*lr(Rr(n[1]*Fr))*zr]}function _(n,e){function t(e,t){var a=r.geoAzimuthalEquidistantRaw(e,t),c=a[0],f=a[1],l=c*c+f*f;if(l>u){var g=i(l),v=gr(f,c),s=o*mr(v/o),p=v-s,h=n*vr(p),d=(n*Rr(p)-p*Rr(h))/(Ar-h),w=K(p,d),y=(Er-n)/O(w,h,Er);c=g;var m,P=50;do{c-=m=(n+O(w,h,c)*y-g)/(w(c)*y)}while(fr(m)>jr&&--P>0);f=p*Rr(c),c<Ar&&(f-=d*(c-Ar));var R=Rr(s),b=vr(s);a[0]=c*b-f*R,a[1]=c*R+f*b}return a}var o=2*Er/e,u=n*n;return t.invert=function(e,t){var a=e*e+t*t;if(a>u){var c=i(a),f=gr(t,e),l=o*mr(f/o),g=f-l;e=c*vr(g),t=c*Rr(g);for(var v=e-Ar,s=Rr(e),p=t/s,h=e<Ar?1/0:0,d=10;;){var w=n*Rr(p),y=n*vr(p),m=Rr(y),P=Ar-y,R=(w-p*m)/P,b=K(p,R);if(fr(h)<Mr||!--d)break;p-=h=(p*s-R*v-t)/(s-2*v*(P*(y+p*w*vr(y)-m)-w*(w-p*m))/(P*P))}e=(c=n+O(b,y,e)*(Er-n)/O(b,y,Er))*vr(f=l+p),t=c*Rr(f)}return r.geoAzimuthalEquidistantRaw.invert(e,t)},t}function K(n,r){return function(e){var t=n*vr(e);return e<Ar&&(t-=r),i(1+t*t)}}function O(n,r,e){for(var t=(e-r)/50,o=n(r)+n(e),i=1,u=r;i<50;++i)o+=2*n(u+=t);return.5*o*t}function U(n,r){var e=n*n,t=r*r;return[n*(1-.162388*t)*(.87-952426e-9*e*e),r*(1+t/12)]}function J(n,r){var e=Pr(n),o=Pr(r),u=vr(r),a=vr(n)*u,c=Rr(n)*u,f=Rr(o*r);n=fr(gr(c,f)),r=t(a),fr(n-Ar)>jr&&(n%=Ar);var l=function(n,r){if(r===Ar)return[0,0];var e,o,u=Rr(r),a=u*u,c=a*a,f=1+c,l=1+3*c,g=1-c,v=t(1/i(f)),s=g+a*f*v,p=(1-u)/s,h=i(p),d=p*f,w=i(d),y=h*g;if(0===n)return[0,-(y+a*w)];var m,P=vr(r),R=1/P,b=2*u*P,j=(-s*P-(-3*a+v*l)*b*(1-u))/(s*s),M=-R*b,E=-R*(a*f*j+p*l*b),A=-2*R*(g*(.5*j/h)-2*a*h*b),S=4*n/Er;if(n>.222*Er||r<Er/4&&n>.175*Er){if(e=(y+a*i(d*(1+c)-y*y))/(1+c),n>Er/4)return[e,e];var k=e,x=.5*e;e=.5*(x+k),o=50;do{var G=i(d-e*e),C=e*(A+M*G)+E*t(e/w)-S;if(!C)break;C<0?x=e:k=e,e=.5*(x+k)}while(fr(k-x)>jr&&--o>0)}else{e=jr,o=25;do{var z=e*e,F=i(d-z),N=A+M*F,L=e*N+E*t(e/w)-S,q=N+(E-M*z)/F;e-=m=F?L/q:0}while(fr(m)>jr&&--o>0)}return[e,-y-a*i(d-e*e)]}(n>Er/4?Ar-n:n,r);return n>Er/4&&(f=l[0],l[0]=-l[1],l[1]=-f),l[0]*=e,l[1]*=-o,l}function X(n,r){var e,o,c,f,l;if(r<jr)return f=Rr(n),o=vr(n),e=r*(n-f*o)/4,[f-e*o,o+e*f,1-r*f*f/2,n-e];if(r>=1-jr)return e=(1-r)/4,o=a(n),f=function(n){return((n=sr(2*n))-1)/(n+1)}(n),c=1/o,l=o*u(n),[f+e*(l-n)/(o*o),c-e*f*c*(l-n),c+e*f*c*(l+n),2*lr(sr(n))-Ar+e*(l-n)/o];var g=[1,0,0,0,0,0,0,0,0],v=[i(r),0,0,0,0,0,0,0,0],s=0;for(o=i(1-r),l=1;fr(v[s]/g[s])>jr&&s<8;)e=g[s++],v[s]=(e-o)/2,g[s]=(e+o)/2,o=i(e*o),l*=2;c=l*g[s]*n;do{c=(t(f=v[s]*Rr(o=c)/g[s])+c)/2}while(--s);return[Rr(c),f=vr(c),f/vr(c-o),c]}function Y(n,r){if(!r)return n;if(1===r)return hr(br(n/2+Sr));for(var e=1,t=i(1-r),o=i(r),u=0;fr(o)>jr;u++){if(n%Er){var a=lr(t*br(n)/e);a<0&&(a+=Er),n+=a+~~(n/Er)*Er}else n+=n;o=(e+t)/2,t=i(e*t),o=((e=o)-t)/2}return n/(yr(2,u)*e)}function Z(n,r){var e=(xr-1)/(xr+1),t=i(1-e*e),o=Y(Ar,t*t),a=hr(br(Er/4+fr(r)/2)),c=sr(-1*a)/i(e),f=function(n,r){var e=n*n,t=r+1,o=1-e-r*r;return[.5*((n>=0?Ar:-Ar)-gr(o,2*n)),-.25*hr(o*o+4*e)+.5*hr(t*t+e)]}(c*vr(-1*n),c*Rr(-1*n)),l=function(n,r,e){var t=fr(n),o=u(fr(r));if(t){var a=1/Rr(t),c=1/(br(t)*br(t)),f=-(c+e*(o*o*a*a)-1+e),l=(-f+i(f*f-(e-1)*c*4))/2;return[Y(lr(1/i(l)),e)*Pr(n),Y(lr(i((l/c-1)/e)),1-e)*Pr(r)]}return[0,Y(lr(o),1-e)*Pr(r)]}(f[0],f[1],t*t);return[-l[1],(r>=0?1:-1)*(.5*o-l[0])]}function $(n){function r(n,r){var i=u(n,r);n=i[0],r=i[1];var a=Rr(r),c=vr(r),f=vr(n),l=o(e*a+t*c*f),g=Rr(l),v=fr(g)>jr?l/g:1;return[v*t*Rr(n),(fr(n)>Ar?v:-v)*(e*c-t*a*f)]}var e=Rr(n),t=vr(n),u=nn(n);return u.invert=nn(-n),r.invert=function(n,r){var t=i(n*n+r*r),o=-Rr(t),a=vr(t),c=t*a,f=-r*o,l=t*e,g=i(c*c+f*f-l*l),v=gr(c*l+f*g,f*l-c*g),s=(t>Ar?-1:1)*gr(n*o,t*vr(v)*a+r*Rr(v)*o);return u.invert(s,v)},r}function nn(n){var r=Rr(n),e=vr(n);return function(n,o){var i=vr(o),u=vr(n)*i,a=Rr(n)*i,c=Rr(o);return[gr(a,u*e-c*r),t(c*e+u*r)]}}function rn(n){function r(r,l){var g,v=fr(l);if(v>e){var s=wr(n-1,dr(0,pr((r+Er)/a)));(g=x(r+=Er*(n-1)/n-s*a,v))[0]=g[0]*Cr/t-Cr*(n-1)/(2*n)+s*Cr/n,g[1]=o+4*(g[1]-i)*u/Cr,l<0&&(g[1]=-g[1])}else g=Yr(r,l);return g[0]*=c,g[1]/=f,g}var e=Xr*Fr,t=x(Er,e)[0]-x(-Er,e)[0],o=Yr(0,e)[1],i=x(0,e)[1],u=Gr-i,a=Cr/n,c=4/Cr,f=o+u*u*4/Cr;return r.invert=function(r,e){r/=c;var l=fr(e*=f);if(l>o){var g=wr(n-1,dr(0,pr((r+Er)/a))),v=x.invert(r=(r+Er*(n-1)/n-g*a)*t/Cr,.25*(l-o)*Cr/u+i);return v[0]-=Er*(n-1)/n-g*a,e<0&&(v[1]=-v[1]),v}return Yr.invert(r,e)},r}function en(n){function r(r,t){var o,v,s=1-Rr(t);if(s&&s<2){var p,h=Ar-t,d=25;do{var w=Rr(h),y=vr(h),m=a+gr(w,u-y),P=1+g-2*u*y;h-=p=(h-l*a-u*w+P*m-.5*s*e)/(2*u*w*m)}while(fr(p)>Mr&&--d>0);o=c*i(P),v=r*m/Er}else o=c*(n+s),v=r*a/Er;return[o*Rr(v),f-o*vr(v)]}var e,u=1+n,a=t(Rr(1/u)),c=2*i(Er/(e=Er+4*a*u)),f=.5*c*(u+i(n*(2+n))),l=n*n,g=u*u;return r.invert=function(n,r){var v=n*n+(r-=f)*r,s=(1+g-v/(c*c))/(2*u),p=o(s),h=Rr(p),d=a+gr(h,u-s);return[t(n/i(v))*Er/d,t(1-2*(p-l*a-u*h+(1+g-2*u*s)*d)/e)]},r}function tn(n,r){return r>-Zr?(n=qr(n,r),n[1]+=$r,n):P(n,r)}function on(n,r){return fr(r)>Zr?(n=qr(n,r),n[1]-=r>0?$r:-$r,n):P(n,r)}function un(n,r,e,t,o,i,u,a,c,f,l){if(l.nanEncountered)return NaN;var g,v,s,p,h,d,w,y,m,P;if(g=e-r,v=n(r+.25*g),s=n(e-.25*g),isNaN(v))l.nanEncountered=!0;else{if(!isNaN(s))return p=g*(t+4*v+o)/12,h=g*(o+4*s+i)/12,d=p+h,P=(d-u)/15,f>c?(l.maxDepthCount++,d+P):Math.abs(P)<a?d+P:(w=r+.5*g,y=un(n,r,w,t,v,o,p,.5*a,c,f+1,l),isNaN(y)?(l.nanEncountered=!0,NaN):(m=un(n,w,e,o,s,i,h,.5*a,c,f+1,l),isNaN(m)?(l.nanEncountered=!0,NaN):y+m));l.nanEncountered=!0}}function an(n,r,e){function o(e){return n+(1-n)*yr(1-yr(e,r),1/r)}function i(n){return function(n,r,e,t,o){void 0===t&&(t=1e-8),void 0===o&&(o=20);var i=n(r),u=n(.5*(r+e)),a=n(e);return un(n,r,e,i,u,a,(i+4*u+a)*(e-r)/6,t,o,1,{maxDepthCount:0,nanEncountered:!1})}(o,0,n,1e-4)}function u(n){var r=0,e=c,t=c>>1;do{l[t]>n?e=t:r=t,t=r+e>>1}while(t>r);var o=l[t+1]-l[t];return o&&(o=(n-l[t+1])/o),(t+1+o)/c}for(var a=1/i(1),c=1e3,f=(1+1e-8)*a,l=[],g=0;g<=c;g++)l.push(i(g/c)*f);var v=2*u(1)/Er*a/e,s=function(n,r){var e=u(fr(Rr(r))),t=o(e)*n;return e/=v,[t,r>=0?e:-e]};return s.invert=function(n,r){var e;return r*=v,fr(r)<1&&(e=Pr(r)*t(i(fr(r))*a)),[n/o(fr(r)),e]},s}function cn(n,r){return fr(n[0]-r[0])<jr&&fr(n[1]-r[1])<jr}function fn(n,r){for(var e,t,o,i=-1,u=n.length,a=n[0],c=[];++i<u;){t=((e=n[i])[0]-a[0])/r,o=(e[1]-a[1])/r;for(var f=0;f<r;++f)c.push([a[0]+f*t,a[1]+f*o]);a=e}return c.push(e),c}function ln(n,r){return[3/Cr*n*i(Er*Er/3-r*r),r]}function gn(n){function r(r,e){if(fr(fr(e)-Ar)<jr)return[0,e<0?-2:2];var t=Rr(e),o=yr((1+t)/(1-t),n/2),i=.5*(o+1/o)+vr(r*=n);return[2*Rr(r)/i,(o-1/o)/i]}return r.invert=function(r,e){var o=fr(e);if(fr(o-2)<jr)return r?null:[0,Pr(e)*Ar];if(o>2)return null;var i=(r/=2)*r,u=(e/=2)*e,a=2*e/(1+i+u);return a=yr((1+a)/(1-a),1/n),[gr(2*r,1-i-u)/n,t((a-1)/(a+1))]},r}function vn(n,r){return[n*(1+i(vr(r)))/2,r/(vr(r/2)*vr(n/6))]}function sn(n,r){var e=n*n,t=r*r;return[n*(.975534+t*(-.0143059*e-.119161+-.0547009*t)),r*(1.00384+e*(.0802894+-.02855*t+199025e-9*e)+t*(.0998909+-.0491032*t))]}function pn(n,r){return[Rr(n)/vr(r),br(r)*vr(n)]}function hn(n){function r(r,o){var i=o-n,u=fr(i)<jr?r*e:fr(u=Sr+o/2)<jr||fr(fr(u)-Ar)<jr?0:r*i/hr(br(u)/t);return[u,i]}var e=vr(n),t=br(Sr+n/2);return r.invert=function(r,o){var i,u=o+n;return[fr(o)<jr?r/e:fr(i=Sr+u/2)<jr||fr(fr(i)-Ar)<jr?0:r*hr(br(i)/t)/o,u]},r}function dn(n,r){return[n,1.25*hr(br(Sr+.4*r))]}function wn(n){function r(r,t){for(var o,i=vr(t),u=2/(1+i*vr(r)),a=u*i*Rr(r),c=u*Rr(t),f=e,l=n[f],g=l[0],v=l[1];--f>=0;)g=(l=n[f])[0]+a*(o=g)-c*v,v=l[1]+a*v+c*o;return g=a*(o=g)-c*v,v=a*v+c*o,[g,v]}var e=n.length-1;return r.invert=function(r,o){var u=20,a=r,c=o;do{for(var f,l=e,g=n[l],v=g[0],s=g[1],p=0,h=0;--l>=0;)p=v+a*(f=p)-c*h,h=s+a*h+c*f,v=(g=n[l])[0]+a*(f=v)-c*s,s=g[1]+a*s+c*f;var d,w,y=(p=v+a*(f=p)-c*h)*p+(h=s+a*h+c*f)*h;a-=d=((v=a*(f=v)-c*s-r)*p+(s=a*s+c*f-o)*h)/y,c-=w=(s*p-v*h)/y}while(fr(d)+fr(w)>jr*jr&&--u>0);if(u){var m=i(a*a+c*c),P=2*lr(.5*m),R=Rr(P);return[gr(a*R,m*vr(P)),m?t(c*R/m):0]}},r}function yn(n,e){var t=r.geoProjection(wn(n)).rotate(e).clipAngle(90),o=r.geoRotation(e),i=t.center;return delete t.rotate,t.center=function(n){return arguments.length?i(o(n)):o.invert(i())},t}function mn(n,r){var e=t(7*Rr(r)/(3*se));return[se*n*(2*vr(2*e/3)-1)/pe,9*Rr(e/3)/pe]}function Pn(n,r){for(var e,t=(1+kr)*Rr(r),o=r,u=0;u<25&&(o-=e=(Rr(o/2)+Rr(o)-t)/(.5*vr(o/2)+vr(o)),!(fr(e)<jr));u++);return[n*(1+2*vr(o)/vr(o/2))/(3*xr),2*i(3)*Rr(o/2)/i(2+xr)]}function Rn(n,r){for(var e,t=i(6/(4+Er)),o=(1+Er/4)*Rr(r),u=r/2,a=0;a<25&&(u-=e=(u/2+Rr(u)-o)/(.5+vr(u)),!(fr(e)<jr));a++);return[t*(.5+vr(u))*n/1.5,t*u]}function bn(n,r){var e=r*r,t=e*e,o=e*t;return[n*(.84719-.13063*e+o*o*(.05494*e-.04515-.02326*t+.00331*o)),r*(1.01183+t*t*(.01926*e-.02625-.00396*t))]}function jn(n,r){return[n*(1+vr(r))/2,2*(r-br(r/2))]}function Mn(n,r){var e=r*r;return[n,r*(he+e*e*(de+e*(we+ye*e)))]}function En(n,r){if(fr(r)<jr)return[n,0];var e=br(r),t=n*Rr(r);return[Rr(t)/e,r+(1-vr(t))/e]}function An(n,r){return[n[0]*r[0]+n[1]*r[3],n[0]*r[1]+n[1]*r[4],n[0]*r[2]+n[1]*r[5]+n[2],n[3]*r[0]+n[4]*r[3],n[3]*r[1]+n[4]*r[4],n[3]*r[2]+n[4]*r[5]+n[5]]}function Sn(n,r){return[n[0]-r[0],n[1]-r[1]]}function kn(n){return i(n[0]*n[0]+n[1]*n[1])}function xn(n,e,t){var o,i,u=e.edges,a=u.length,c={type:"MultiPoint",coordinates:e.face},f=e.face.filter(function(n){return 90!==fr(n[1])}),l=r.geoBounds({type:"MultiPoint",coordinates:f}),g=!1,v=-1,s=l[1][0]-l[0][0],p=180===s||360===s?[(l[0][0]+l[1][0])/2,(l[0][1]+l[1][1])/2]:r.geoCentroid(c);if(t)for(;++v<a&&u[v]!==t;);++v;for(var h=0;h<a;++h)i=u[(h+v)%a],Array.isArray(i)?(g||(n.point((o=r.geoInterpolate(i[0],p)(jr))[0],o[1]),g=!0),n.point((o=r.geoInterpolate(i[1],p)(jr))[0],o[1])):(g=!1,i!==t&&xn(n,i,e))}function Gn(n,r){return n&&r&&n[0]===r[0]&&n[1]===r[1]}function Cn(n){return n.project.invert||n.children&&n.children.some(Cn)}function zn(n,r){var e=x(n,r);return[e[0]*ke,e[1]]}function Fn(n,r){for(var e=0,t=n.length,o=0;e<t;++e)o+=n[e]*r[e];return o}function Nn(n){return[gr(n[1],n[0])*zr,t(dr(-1,wr(1,n[2])))*zr]}function Ln(n){var r=n[0]*Fr,e=n[1]*Fr,t=vr(e);return[t*vr(r),t*Rr(r),Rr(e)]}function qn(n,r){return{type:"FeatureCollection",features:n.features.map(function(n){return Bn(n,r)})}}function Bn(n,r){return{type:"Feature",id:n.id,properties:n.properties,geometry:Hn(n.geometry,r)}}function Hn(n,e){if(!n)return null;if("GeometryCollection"===n.type)return function(n,r){return{type:"GeometryCollection",geometries:n.geometries.map(function(n){return Hn(n,r)})}}(n,e);var t;switch(n.type){case"Point":case"MultiPoint":t=ze;break;case"LineString":case"MultiLineString":t=Fe;break;case"Polygon":case"MultiPolygon":case"Sphere":t=Ne;break;default:return null}return r.geoStream(n,e(t)),t.result()}function In(n){function r(r,t){var o=e?br(r*e/2)/e:r/2;if(!t)return[2*o,-n];var i=2*lr(o*Rr(t)),u=1/br(t);return[Rr(i)*u,t+(1-vr(i))*u-n]}var e=Rr(n);return r.invert=function(r,i){if(fr(i+=n)<jr)return[e?2*lr(e*r/2)/e:r,0];var u,a=r*r+i*i,c=0,f=10;do{var l=br(c),g=1/vr(c),v=a-2*i*c+c*c;c-=u=(l*v+2*(c-i))/(2+v*g*g+2*(c-i)*l)}while(fr(u)>jr&&--f>0);var s=r*(l=br(c)),p=br(fr(i)<fr(c+1/l)?.5*t(s):.5*o(s)+Er/4)/Rr(c);return[e?2*lr(e*p)/e:2*p,c]},r}function Wn(n,r){var e,t=wr(18,36*fr(r)/Er),o=pr(t),i=t-o,u=(e=Be[o])[0],a=e[1],c=(e=Be[++o])[0],f=e[1],l=(e=Be[wr(19,++o)])[0],g=e[1];return[n*(c+i*(l-u)/2+i*i*(l-2*c+u)/2),(r>0?Ar:-Ar)*(f+i*(g-a)/2+i*i*(g-2*f+a)/2)]}function Dn(n,r){function e(r,e){var t=o(r,e),i=t[1],c=i*a/(n-1)+u;return[t[0]*u/c,i/c]}var o=function(n){function r(r,e){var t=vr(e),o=(n-1)/(n-t*vr(r));return[o*t*Rr(r),o*Rr(e)]}return r.invert=function(r,e){var o=r*r+e*e,u=i(o),a=(n-i(1-o*(n+1)/(n-1)))/((n-1)/u+u/(n-1));return[gr(r*a,u*i(1-a*a)),u?t(e*a/u):0]},r}(n);if(!r)return o;var u=vr(r),a=Rr(r);return e.invert=function(r,e){var t=(n-1)/(n-1-e*a);return o.invert(t*r,t*e*u)},e}function Tn(n){return n.length>0}function Qn(n){return n===Qe||n===_e?[0,n]:[Ie,function(n){return Math.floor(n*He)/He}(n)]}function Vn(n){var r=n[0],e=n[1],t=!1;return r<=We?(r=Ie,t=!0):r>=Te&&(r=De,t=!0),e<=Ve?(e=Qe,t=!0):e>=Ke&&(e=_e,t=!0),t?[r,e]:n}function _n(n){return n.map(Vn)}function Kn(n,r,e){for(var t=0,o=n.length;t<o;++t){var i=n[t].slice();e.push({index:-1,polygon:r,ring:i});for(var u=0,a=i.length;u<a;++u){var c=i[u],f=c[0],l=c[1];if(f<=We||f>=Te||l<=Ve||l>=Ke){i[u]=Vn(c);for(var g=u+1;g<a;++g){var v=i[g],s=v[0],p=v[1];if(s>We&&s<Te&&p>Ve&&p<Ke)break}if(g===u+1)continue;if(u){var h={index:-1,polygon:r,ring:i.slice(0,u+1)};h.ring[h.ring.length-1]=Qn(l),e[e.length-1]=h}else e.pop();if(g>=a)break;e.push({index:-1,polygon:r,ring:i=i.slice(g-1)}),i[0]=Qn(i[0][1]),u=-1,a=i.length}}}}function On(n){var r,e,t,o,i,u,a=n.length,c={},f={};for(r=0;r<a;++r)t=(e=n[r]).ring[0],i=e.ring[e.ring.length-1],t[0]!==i[0]||t[1]!==i[1]?(e.index=r,c[t]=f[i]=e):(e.polygon.push(e.ring),n[r]=null);for(r=0;r<a;++r)if(e=n[r]){if(t=e.ring[0],i=e.ring[e.ring.length-1],o=f[t],u=c[i],delete c[t],delete f[i],t[0]===i[0]&&t[1]===i[1]){e.polygon.push(e.ring);continue}o?(delete f[t],delete c[o.ring[0]],o.ring.pop(),n[o.index]=null,e={index:-1,polygon:o.polygon,ring:o.ring.concat(e.ring)},o===u?e.polygon.push(e.ring):(e.index=a++,n.push(c[e.ring[0]]=f[e.ring[e.ring.length-1]]=e))):u?(delete c[i],delete f[u.ring[u.ring.length-1]],e.ring.pop(),e={index:a++,polygon:u.polygon,ring:e.ring.concat(u.ring)},n[u.index]=null,n.push(c[e.ring[0]]=f[e.ring[e.ring.length-1]]=e)):(e.ring.push(e.ring[0]),e.polygon.push(e.ring))}}function Un(n){var r={type:"Feature",geometry:Jn(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),null!=n.properties&&(r.properties=n.properties),r}function Jn(n){if(null==n)return n;var r,e,t,o;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(Jn)};break;case"Point":r={type:"Point",coordinates:Vn(n.coordinates)};break;case"MultiPoint":case"LineString":r={type:n.type,coordinates:_n(n.coordinates)};break;case"MultiLineString":r={type:"MultiLineString",coordinates:n.coordinates.map(_n)};break;case"Polygon":var i=[];Kn(n.coordinates,i,e=[]),On(e),r={type:"Polygon",coordinates:i};break;case"MultiPolygon":e=[],t=-1,o=n.coordinates.length;for(var u=new Array(o);++t<o;)Kn(n.coordinates[t],u[t]=[],e);On(e),r={type:"MultiPolygon",coordinates:u.filter(Tn)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function Xn(n,r){var e=br(r/2),t=Rr(Sr*e);return[n*(.74482-.34588*t*t),1.70711*e]}function Yn(n){function e(n,e){var o=r.geoGnomonicRaw(n,e);return o[0]*=t,o}var t=vr(n);return e.invert=function(n,e){return r.geoGnomonicRaw.invert(n/t,e)},e}function Zn(n,r){return Oe(Yn,n,r)}function $n(n){function e(r,e){var c=o(vr(e)*vr(r-t)),f=o(vr(e)*vr(r-u));return c*=c,f*=f,[(c-f)/(2*n),(e<0?-1:1)*i(4*a*f-(a-c+f)*(a-c+f))/(2*n)]}if(!(n*=2))return r.geoAzimuthalEquidistantRaw;var t=-n/2,u=-t,a=n*n,c=br(u),f=.5/Rr(u);return e.invert=function(n,r){var e,a,l=r*r,g=vr(i(l+(e=n+t)*e)),v=vr(i(l+(e=n+u)*e));return[gr(a=g-v,e=(g+v)*c),(r<0?-1:1)*o(i(e*e+a*a)*f)]},e}function nr(n,r){return Oe($n,n,r)}function rr(n,r){if(fr(r)<jr)return[n,0];var e=fr(r/Ar),o=t(e);if(fr(n)<jr||fr(fr(r)-Ar)<jr)return[0,Pr(r)*Er*br(o/2)];var u=vr(o),a=fr(Er/n-n/Er)/2,c=a*a,f=u/(e+u-1),l=f*(2/e-1),g=l*l,v=g+c,s=f-g,p=c+f;return[Pr(n)*Er*(a*s+i(c*s*s-v*(f*f-g)))/v,Pr(r)*Er*(l*p-a*i((c+1)*v-p*p))/v]}function er(n,r){if(fr(r)<jr)return[n,0];var e=fr(r/Ar),o=t(e);if(fr(n)<jr||fr(fr(r)-Ar)<jr)return[0,Pr(r)*Er*br(o/2)];var u=vr(o),a=fr(Er/n-n/Er)/2,c=a*a,f=u*(i(1+c)-a*u)/(1+c*e*e);return[Pr(n)*Er*f,Pr(r)*Er*i(1-f*(2*a+f))]}function tr(n,r){if(fr(r)<jr)return[n,0];var e=r/Ar,o=t(e);if(fr(n)<jr||fr(fr(r)-Ar)<jr)return[0,Er*br(o/2)];var u=(Er/n-n/Er)/2,a=e/(1+vr(o));return[Er*(Pr(n)*i(u*u+1-a*a)-u),Er*a]}function or(n,r){if(!r)return[n,0];var e=fr(r);if(!n||e===Ar)return[0,r];var t=e/Ar,o=t*t,u=(8*t-o*(o+2)-5)/(2*o*(t-1)),a=u*u,c=t*u,f=o+a+2*c,l=t+3*u,g=n/Ar,v=g+1/g,s=Pr(fr(n)-Ar)*i(v*v-4),p=s*s,h=(s*(f+a-1)+2*i(f*(o+a*p-1)+(1-o)*(o*(l*l+4*a)+12*c*a+4*a*a)))/(4*f+p);return[Pr(n)*Ar*h,Pr(r)*Ar*i(1+s*fr(h)-h*h)]}function ir(n,r){return[n*i(1-3*r*r/(Er*Er)),r]}function ur(n,r){var e=.90631*Rr(r),t=i(1-e*e),o=i(2/(1+t*vr(n/=3)));return[2.66723*t*o*Rr(n),1.24104*e*o]}function ar(n,r){var e=vr(r),t=vr(n)*e,o=1-t,u=vr(n=gr(Rr(n)*e,-Rr(r))),a=Rr(n);return e=i(1-t*t),[a*e-u*o,-u*e-a*o]}function cr(n,r){var e=f(n,r);return[(e[0]+n/Ar)/2,(e[1]+r)/2]}var fr=Math.abs,lr=Math.atan,gr=Math.atan2,vr=Math.cos,sr=Math.exp,pr=Math.floor,hr=Math.log,dr=Math.max,wr=Math.min,yr=Math.pow,mr=Math.round,Pr=Math.sign||function(n){return n>0?1:n<0?-1:0},Rr=Math.sin,br=Math.tan,jr=1e-6,Mr=1e-12,Er=Math.PI,Ar=Er/2,Sr=Er/4,kr=Math.SQRT1_2,xr=i(2),Gr=i(Er),Cr=2*Er,zr=180/Er,Fr=Er/180;f.invert=function(n,r){if(!(n*n+4*r*r>Er*Er+jr)){var e=n,t=r,u=25;do{var a,c=Rr(e),f=Rr(e/2),l=vr(e/2),g=Rr(t),v=vr(t),s=Rr(2*t),p=g*g,h=v*v,d=f*f,w=1-h*l*l,y=w?o(v*l)*i(a=1/w):a=0,m=2*y*v*f-n,P=y*g-r,R=a*(h*d+y*v*l*p),b=a*(.5*c*s-2*y*g*f),j=.25*a*(s*f-y*g*h*c),M=a*(p*l+y*d*v),E=b*j-M*R;if(!E)break;var A=(P*b-m*M)/E,S=(m*j-P*R)/E;e-=A,t-=S}while((fr(A)>jr||fr(S)>jr)&&--u>0);return[e,t]}};g.invert=function(n,r){if(n*=3/8,r*=3/8,!n&&fr(r)>1)return null;var e=1+n*n+r*r,o=i((e-i(e*e-4*r*r))/2),c=t(o)/3,f=o?function(n){return hr(n+i(n*n-1))}(fr(r/o))/3:function(n){return hr(n+i(n*n+1))}(fr(n))/3,l=vr(c),g=a(f),v=g*g-l*l;return[2*Pr(n)*gr(u(f)*l,.25-v),2*Pr(r)*gr(g*Rr(c),.25+v)]};var Nr=i(8),Lr=hr(1+xr);v.invert=function(n,r){if((t=fr(r))<Lr)return[n,2*lr(sr(r))-Ar];var e,t,o=Sr,i=25;do{var u=vr(o/2),a=br(o/2);o-=e=(Nr*(o-Sr)-hr(a)-t)/(Nr-u*u/(2*a))}while(fr(e)>Mr&&--i>0);return[n/(vr(o)*(Nr-1/Rr(o))),Pr(r)*o]};h.invert=function(n,r){var e=2*t(r/2);return[n*vr(e/2)/vr(e),e]};var qr=y(xr/Ar,xr,Er),Br=2.00276,Hr=1.11072;m.invert=function(n,r){var e,t,o=Br*r,i=r<0?-Sr:Sr,u=25;do{t=o-xr*Rr(i),i-=e=(Rr(2*i)+2*i-Er*Rr(t))/(2*vr(2*i)+2+Er*vr(t)*xr*vr(i))}while(fr(e)>jr&&--u>0);return t=o-xr*Rr(i),[n*(1/vr(t)+Hr/vr(i))/Br,t]};var Ir=function(n){var e=0,t=r.geoProjectionMutator(n),o=t(e);return o.parallel=function(n){return arguments.length?t(e=n*Fr):e*zr},o};P.invert=function(n,r){return[n/vr(r),r]};var Wr=y(1,4/Er,Er);x.invert=function(n,r){var e=(e=r/Gr-1)*e;return[e>0?n*i(Er/e)/2:0,t(1-e)]};var Dr=i(3);C.invert=function(n,r){var e=3*t(r/(Dr*Gr));return[Gr*n/(Dr*(2*vr(2*e/3)-1)),e]};N.invert=function(n,r){var e=i(8/(3*Er)),t=r/e;return[n/(e*(1-fr(t)/Er)),t]};L.invert=function(n,r){var e=2-fr(r)/i(2*Er/3);return[n*i(6*Er)/(2*e),Pr(r)*t((4-e*e)/3)]};q.invert=function(n,r){var e=i(Er*(4+Er))/2;return[n*e/(1+i(1-r*r*(4+Er)/(4*Er))),r*e/2]};B.invert=function(n,r){var e=r*i((4+Er)/Er)/2,o=t(e),u=vr(o);return[n/(2/i(Er*(4+Er))*(1+u)),t((o+e*(u+2))/(2+Ar))]};H.invert=function(n,r){var e=i(2+Er),t=r*e/2;return[e*n/(1+vr(t)),t]};I.invert=function(n,r){var e=1+Ar,o=i(e/2);return[2*n*o/(1+vr(r*=o)),t((r+Rr(r))/e)]};var Tr=3+2*xr;W.invert=function(n,r){if(!(e=g.invert(n/1.2,1.065*r)))return null;var e,t=e[0],o=e[1],u=20;n/=Tr,r/=Tr;do{var a=t/2,c=o/2,f=Rr(a),l=vr(a),v=Rr(c),s=vr(c),p=vr(o),h=i(p),d=v/(s+xr*l*h),w=d*d,y=i(2/(1+w)),m=(xr*s+(l+f)*h)/(xr*s+(l-f)*h),P=i(m),R=P-1/P,b=P+1/P,j=y*R-2*hr(P)-n,M=y*d*b-2*lr(d)-r,E=v&&kr*h*f*w/v,A=(xr*l*s+h)/(2*(s+xr*l*h)*(s+xr*l*h)*h),S=-.5*d*y*y*y,k=S*E,x=S*A,G=(G=2*s+xr*h*(l-f))*G*P,C=(xr*l*s*h+p)/G,z=-xr*f*v/(h*G),F=R*k-2*C/P+y*(C+C/m),N=R*x-2*z/P+y*(z+z/m),L=d*b*k-2*E/(1+w)+y*b*E+y*d*(C-C/m),q=d*b*x-2*A/(1+w)+y*b*A+y*d*(z-z/m),B=N*L-q*F;if(!B)break;var H=(M*N-j*q)/B,I=(j*L-M*F)/B;t-=H,o=dr(-Ar,wr(Ar,o-I))}while((fr(H)>jr||fr(I)>jr)&&--u>0);return fr(fr(o)-Ar)<jr?[0,o]:u&&[t,o]};var Qr=vr(35*Fr);D.invert=function(n,r){var e=r/(1+Qr);return[n&&n/(Qr*i(1-e*e)),2*lr(e)]};T.invert=function(n,r){var e=lr(r/Gr),t=vr(e),o=2*e;return[n*Gr/2/(vr(o)*t*t),o]};var Vr=function(n,r,e,o,u,a,c,f){function l(i,l){if(!l)return[n*i/Er,0];var g=l*l,v=n+g*(r+g*(e+g*o)),s=l*(u-1+g*(a-f+g*c)),p=(v*v+s*s)/(2*s),h=i*t(v/p)/Er;return[p*Rr(h),l*(1+g*f)+p*(1-vr(h))]}return arguments.length<8&&(f=0),l.invert=function(l,g){var v,s,p=Er*l/n,h=g,d=50;do{var w=h*h,y=n+w*(r+w*(e+w*o)),m=h*(u-1+w*(a-f+w*c)),P=y*y+m*m,R=2*m,b=P/R,j=b*b,M=t(y/b)/Er,E=p*M,A=y*y,S=(2*r+w*(4*e+6*w*o))*h,k=u+w*(3*a+5*w*c),x=(2*(y*S+m*(k-1))*R-P*(2*(k-1)))/(R*R),G=vr(E),C=Rr(E),z=b*G,F=b*C,N=p/Er*(1/i(1-A/j))*(S*b-y*x)/j,L=F-l,q=h*(1+w*f)+b-z-g,B=x*C+z*N,H=z*M,I=1+x-(x*G-F*N),W=F*M,D=B*W-I*H;if(!D)break;p-=v=(q*B-L*I)/D,h-=s=(L*W-q*H)/D}while((fr(v)>jr||fr(s)>jr)&&--d>0);return[p,h]},l},_r=Vr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),Kr=Vr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),Or=Vr(5/6*Er,-.62636,-.0344,0,1.3493,-.05524,0,.045);U.invert=function(n,r){var e,t=n,o=r,i=50;do{var u=o*o;o-=e=(o*(1+u/12)-r)/(1+u/4)}while(fr(e)>jr&&--i>0);i=50,n/=1-.162388*u;do{var a=(a=t*t)*a;t-=e=(t*(.87-952426e-9*a)-n)/(.87-.00476213*a)}while(fr(e)>jr&&--i>0);return[t,o]};var Ur=Vr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762),Jr=function(n){function r(r,t){var o=r>0?-.5:.5,i=n(r+o*Er,t);return i[0]-=o*e,i}var e=n(Ar,0)[0]-n(-Ar,0)[0];return n.invert&&(r.invert=function(r,t){var o=r>0?-.5:.5,i=n.invert(r+o*e,t),u=i[0]-o*Er;return u<-Er?u+=2*Er:u>Er&&(u-=2*Er),i[0]=u,i}),r};J.invert=function(n,r){fr(n)>1&&(n=2*Pr(n)-n),fr(r)>1&&(r=2*Pr(r)-r);var e=Pr(n),o=Pr(r),u=-e*n,a=-o*r,c=a/u<1,f=function(n,r){for(var e=0,o=1,u=.5,a=50;;){var c=u*u,f=i(u),l=t(1/i(1+c)),g=1-c+u*(1+c)*l,v=(1-f)/g,s=i(v),p=v*(1+c),h=s*(1-c),d=i(p-n*n),w=r+h+u*d;if(fr(o-e)<Mr||0==--a||0===w)break;w>0?e=u:o=u,u=.5*(e+o)}if(!a)return null;var y=t(f),m=vr(y),P=1/m,R=2*f*m,b=(-g*m-(-3*u+l*(1+3*c))*R*(1-f))/(g*g);return[Er/4*(n*(-2*P*(.5*b/s*(1-c)-2*u*s*R)+-P*R*d)+-P*(u*(1+c)*b+v*(1+3*c)*R)*t(n/i(p))),y]}(c?a:u,c?u:a),l=f[0],g=f[1],v=vr(g);return c&&(l=-Ar-l),[e*(gr(Rr(l)*v,-Rr(g))+Er),o*t(vr(l)*v)]};Z.invert=function(n,r){var e=(xr-1)/(xr+1),t=i(1-e*e),o=function(n,r,e){var t,o,i;return n?(t=X(n,e),r?(o=X(r,1-e),i=o[1]*o[1]+e*t[0]*t[0]*o[0]*o[0],[[t[0]*o[2]/i,t[1]*t[2]*o[0]*o[1]/i],[t[1]*o[1]/i,-t[0]*t[2]*o[0]*o[2]/i],[t[2]*o[1]*o[2]/i,-e*t[0]*t[1]*o[0]/i]]):[[t[0],0],[t[1],0],[t[2],0]]):(o=X(r,1-e),[[0,o[0]/o[1]],[1/o[1],0],[o[2]/o[1],0]])}(.5*Y(Ar,t*t)-r,-n,t*t),u=function(n,r){var e=r[0]*r[0]+r[1]*r[1];return[(n[0]*r[0]+n[1]*r[1])/e,(n[1]*r[0]-n[0]*r[1])/e]}(o[0],o[1]);return[gr(u[1],u[0])/-1,2*lr(sr(-.5*hr(e*u[0]*u[0]+e*u[1]*u[1])))-Ar]};var Xr=41+48/36+37/3600,Yr=z(0),Zr=.7109889596207567,$r=.0528035274542;tn.invert=function(n,r){return r>-Zr?qr.invert(n,r-$r):P.invert(n,r)};on.invert=function(n,r){return fr(r)>Zr?qr.invert(n,r+(r>0?$r:-$r)):P.invert(n,r)};var ne=function(n,t){function o(r,e){for(var o=e<0?-1:1,i=t[+(e<0)],u=0,a=i.length-1;u<a&&r>i[u][2][0];++u);var c=n(r-i[u][1][0],e);return c[0]+=n(i[u][1][0],o*e>o*i[u][0][1]?i[u][0][1]:e)[0],c}var i,u;n.invert&&(o.invert=function(r,e){for(var i=u[+(e<0)],a=t[+(e<0)],c=0,f=i.length;c<f;++c){var l=i[c];if(l[0][0]<=r&&r<l[1][0]&&l[0][1]<=e&&e<l[1][1]){var g=n.invert(r-n(a[c][1][0],0)[0],e);return g[0]+=a[c][1][0],cn(o(g[0],g[1]),[r,e])?g:null}}});var a=r.geoProjection(o),c=a.stream;return a.stream=function(n){var e=a.rotate(),t=c(n),o=(a.rotate([0,0]),c(n));return a.rotate(e),t.sphere=function(){r.geoStream(i,o)},t},a.lobes=function(r){return arguments.length?(i=function(n){var r,t,o,i,u,a,c,f=[],l=n[0].length;for(c=0;c<l;++c)t=(r=n[0][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(fn([[t+jr,o+jr],[t+jr,i-jr],[u-jr,i-jr],[u-jr,a+jr]],30));for(c=n[1].length-1;c>=0;--c)t=(r=n[1][c])[0][0],o=r[0][1],i=r[1][1],u=r[2][0],a=r[2][1],f.push(fn([[u-jr,a-jr],[u-jr,i+jr],[t+jr,i+jr],[t+jr,o-jr]],30));return{type:"Polygon",coordinates:[e.merge(f)]}}(r),t=r.map(function(n){return n.map(function(n){return[[n[0][0]*Fr,n[0][1]*Fr],[n[1][0]*Fr,n[1][1]*Fr],[n[2][0]*Fr,n[2][1]*Fr]]})}),u=t.map(function(r){return r.map(function(r){var e,t=n(r[0][0],r[0][1])[0],o=n(r[2][0],r[2][1])[0],i=n(r[1][0],r[0][1])[1],u=n(r[1][0],r[1][1])[1];return i>u&&(e=i,i=u,u=e),[[t,i],[o,u]]})}),a):t.map(function(n){return n.map(function(n){return[[n[0][0]*zr,n[0][1]*zr],[n[1][0]*zr,n[1][1]*zr],[n[2][0]*zr,n[2][1]*zr]]})})},null!=t&&a.lobes(t),a},re=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ee=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],te=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],oe=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],ie=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],ue=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];ln.invert=function(n,r){return[Cr/3*n/i(Er*Er/3-r*r),r]};var ae=Er/xr;vn.invert=function(n,r){var e=fr(n),t=fr(r),u=jr,a=Ar;t<ae?a*=t/ae:u+=6*o(ae/t);for(var c=0;c<25;c++){var f=Rr(a),l=i(vr(a)),g=Rr(a/2),v=vr(a/2),s=Rr(u/6),p=vr(u/6),h=.5*u*(1+l)-e,d=a/(v*p)-t,w=l?-.25*u*f/l:0,y=.5*(1+l),m=(1+.5*a*g/v)/(v*p),P=a/v*(s/6)/(p*p),R=w*P-m*y,b=(h*P-d*y)/R,j=(d*w-h*m)/R;if(a-=b,u-=j,fr(b)<jr&&fr(j)<jr)break}return[n<0?-u:u,r<0?-a:a]};sn.invert=function(n,r){var e=Pr(n)*Er,t=r/2,o=50;do{var i=e*e,u=t*t,a=e*t,c=e*(.975534+u*(-.0143059*i-.119161+-.0547009*u))-n,f=t*(1.00384+i*(.0802894+-.02855*u+199025e-9*i)+u*(.0998909+-.0491032*u))-r,l=.975534-u*(.119161+3*i*.0143059+.0547009*u),g=-a*(.238322+.2188036*u+.0286118*i),v=a*(.1605788+7961e-7*i+-.0571*u),s=1.00384+i*(.0802894+199025e-9*i)+u*(3*(.0998909-.02855*i)-.245516*u),p=g*v-s*l,h=(f*g-c*s)/p,d=(c*v-f*l)/p;e-=h,t-=d}while((fr(h)>jr||fr(d)>jr)&&--o>0);return o&&[e,t]};pn.invert=function(n,r){var e=n*n,u=r*r+1,a=e+u,c=n?kr*i((a-i(a*a-4*e))/e):1/i(u);return[t(n*c),Pr(r)*o(c)]};dn.invert=function(n,r){return[n,2.5*lr(sr(.8*r))-.625*Er]};var ce=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],fe=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],le=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ge=[[.9245,0],[0,0],[.01943,0]],ve=[[.721316,0],[0,0],[-.00881625,-.00617325]],se=i(6),pe=i(7);mn.invert=function(n,r){var e=3*t(r*pe/9);return[n*pe/(se*(2*vr(2*e/3)-1)),t(3*Rr(e)*se/7)]};Pn.invert=function(n,r){var e=r*i(2+xr)/(2*i(3)),o=2*t(e);return[3*xr*n/(1+2*vr(o)/vr(o/2)),t((e+Rr(o))/(1+kr))]};Rn.invert=function(n,r){var e=i(6/(4+Er)),o=r/e;return fr(fr(o)-Ar)<jr&&(o=o<0?-Ar:Ar),[1.5*n/(e*(.5+vr(o))),t((o/2+Rr(o))/(1+Er/4))]};bn.invert=function(n,r){var e,t,o,i,u=r,a=25;do{u-=e=(u*(1.01183+(o=(t=u*u)*t)*o*(.01926*t-.02625-.00396*o))-r)/(1.01183+o*o*(.21186*t-.23625+-.05148*o))}while(fr(e)>Mr&&--a>0);return t=u*u,o=t*t,i=t*o,[n/(.84719-.13063*t+i*i*(.05494*t-.04515-.02326*o+.00331*i)),u]};jn.invert=function(n,r){for(var e=r/2,t=0,o=1/0;t<10&&fr(o)>jr;++t){var i=vr(r/2);r-=o=(r-br(r/2)-e)/(1-.5/(i*i))}return[2*n/(1+vr(r)),r]};var he=1.0148,de=.23185,we=-.14499,ye=.02406,me=he,Pe=5*de,Re=7*we,be=9*ye,je=1.790857183;Mn.invert=function(n,r){r>je?r=je:r<-je&&(r=-je);var e,t=r;do{var o=t*t;t-=e=(t*(he+o*o*(de+o*(we+ye*o)))-r)/(me+o*o*(Pe+o*(Re+be*o)))}while(fr(e)>jr);return[n,t]};En.invert=function(n,r){if(fr(r)<jr)return[n,0];var e,i=n*n+r*r,u=.5*r,a=10;do{var c=br(u),f=1/vr(u),l=i-2*r*u+u*u;u-=e=(c*l+2*(u-r))/(2+l*f*f+2*(u-r)*c)}while(fr(e)>jr&&--a>0);return c=br(u),[(fr(r)<fr(u+1/c)?t(n*c):Pr(n)*(o(fr(n*c))+Ar))/Rr(u),u]};var Me=function(n,r){var e=Sn(n[1],n[0]),t=Sn(r[1],r[0]),o=function(n,r){return gr(n[0]*r[1]-n[1]*r[0],n[0]*r[0]+n[1]*r[1])}(e,t),i=kn(e)/kn(t);return An([1,0,n[0][0],0,1,n[0][1]],An([i,0,0,0,i,0],An([vr(o),Rr(o),0,-Rr(o),vr(o),0],[1,0,-r[0][0],0,1,-r[0][1]])))},Ee=function(n,e,t){function o(n,r){if(n.edges=function(n){for(var r=n.length,e=[],t=n[r-1],o=0;o<r;++o)e.push([t,t=n[o]]);return e}(n.face),r.face){var e=n.shared=function(n,r){for(var e,t,o=n.length,i=null,u=0;u<o;++u){e=n[u];for(var a=r.length;--a>=0;)if(t=r[a],e[0]===t[0]&&e[1]===t[1]){if(i)return[i,e];i=e}}}(n.face,r.face),t=Me(e.map(r.project),e.map(n.project));n.transform=r.transform?An(r.transform,t):t;for(var i=r.edges,u=0,a=i.length;u<a;++u)Gn(e[0],i[u][1])&&Gn(e[1],i[u][0])&&(i[u]=n),Gn(e[0],i[u][0])&&Gn(e[1],i[u][1])&&(i[u]=n);for(u=0,a=(i=n.edges).length;u<a;++u)Gn(e[0],i[u][0])&&Gn(e[1],i[u][1])&&(i[u]=r),Gn(e[0],i[u][1])&&Gn(e[1],i[u][0])&&(i[u]=r)}else n.transform=r.transform;return n.children&&n.children.forEach(function(r){o(r,n)}),n}function i(n,r){var t,o=e(n,r),i=o.project([n*zr,r*zr]);return(t=o.transform)?[t[0]*i[0]+t[1]*i[1]+t[2],-(t[3]*i[0]+t[4]*i[1]+t[5])]:(i[1]=-i[1],i)}function u(n,r){var t=n.project.invert,o=n.transform,i=r;if(o&&(i=[(o=function(n){var r=1/(n[0]*n[4]-n[1]*n[3]);return[r*n[4],-r*n[1],r*(n[1]*n[5]-n[2]*n[4]),-r*n[3],r*n[0],r*(n[2]*n[3]-n[0]*n[5])]}(o))[0]*i[0]+o[1]*i[1]+o[2],o[3]*i[0]+o[4]*i[1]+o[5]]),t&&n===function(n){return e(n[0]*Fr,n[1]*Fr)}(a=t(i)))return a;for(var a,c=n.children,f=0,l=c&&c.length;f<l;++f)if(a=u(c[f],r))return a}o(n,{transform:null}),Cn(n)&&(i.invert=function(r,e){var t=u(n,[r,-e]);return t&&(t[0]*=Fr,t[1]*=Fr,t)});var a=r.geoProjection(i),c=a.stream;return a.stream=function(r){var e=a.rotate(),t=c(r),o=(a.rotate([0,0]),c(r));return a.rotate(e),t.sphere=function(){o.polygonStart(),o.lineStart(),xn(o,n),o.lineEnd(),o.polygonEnd()},t},a.angle(null==t?-30:t*zr)},Ae=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Se=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(n){return n.map(function(n){return Ae[n]})}),ke=2/i(3);zn.invert=function(n,r){return x.invert(n/ke,r)};var xe=function(){},Ge=[],Ce=[],ze={point:function(n,r){Ge.push([n,r])},result:function(){var n=Ge.length?Ge.length<2?{type:"Point",coordinates:Ge[0]}:{type:"MultiPoint",coordinates:Ge}:null;return Ge=[],n}},Fe={lineStart:xe,point:function(n,r){Ge.push([n,r])},lineEnd:function(){Ge.length&&(Ce.push(Ge),Ge=[])},result:function(){var n=Ce.length?Ce.length<2?{type:"LineString",coordinates:Ce[0]}:{type:"MultiLineString",coordinates:Ce}:null;return Ce=[],n}},Ne={polygonStart:xe,lineStart:xe,point:function(n,r){Ge.push([n,r])},lineEnd:function(){var n=Ge.length;if(n){do{Ge.push(Ge[0].slice())}while(++n<4);Ce.push(Ge),Ge=[]}},polygonEnd:xe,result:function(){if(!Ce.length)return null;var n=[],r=[];return Ce.forEach(function(e){!function(n){if((r=n.length)<4)return!1;for(var r,e=0,t=n[r-1][1]*n[0][0]-n[r-1][0]*n[0][1];++e<r;)t+=n[e-1][1]*n[e][0]-n[e-1][0]*n[e][1];return t<=0}(e)?r.push(e):n.push([e])}),r.forEach(function(r){var e=r[0];n.some(function(n){if(function(n,r){for(var e=r[0],t=r[1],o=!1,i=0,u=n.length,a=u-1;i<u;a=i++){var c=n[i],f=c[0],l=c[1],g=n[a],v=g[0],s=g[1];l>t^s>t&&e<(v-f)*(t-l)/(s-l)+f&&(o=!o)}return o}(n[0],e))return n.push(r),!0})||n.push([r])}),Ce=[],n.length?n.length>1?{type:"MultiPolygon",coordinates:n}:{type:"Polygon",coordinates:n[0]}:null}},Le=function(n){function e(r,e){var o=fr(r)<Ar,i=n(o?r:r>0?r-Er:r+Er,e),u=(i[0]-i[1])*kr,a=(i[0]+i[1])*kr;if(o)return[u,a];var c=t*kr,f=u>0^a>0?-1:1;return[f*u-Pr(a)*c,f*a-Pr(u)*c]}var t=n(Ar,0)[0]-n(-Ar,0)[0];return n.invert&&(e.invert=function(r,e){var o=(r+e)*kr,i=(e-r)*kr,u=fr(o)<.5*t&&fr(i)<.5*t;if(!u){var a=t*kr,c=o>0^i>0?-1:1,f=-c*r+(i>0?1:-1)*a,l=-c*e+(o>0?1:-1)*a;o=(-f-l)*kr,i=(f-l)*kr}var g=n.invert(o,i);return u||(g[0]+=o>0?Er:-Er),g}),r.geoProjection(e).rotate([-90,-90,45]).clipAngle(179.999)},qe=function(){return Le(Z).scale(111.48)},Be=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];Be.forEach(function(n){n[1]*=1.0144}),Wn.invert=function(n,r){var e=r/Ar,t=90*e,o=wr(18,fr(t/5)),i=dr(0,pr(o));do{var u=Be[i][1],a=Be[i+1][1],c=Be[wr(19,i+2)][1],f=c-u,l=c-2*a+u,g=2*(fr(e)-a)/f,v=l/f,s=g*(1-v*g*(1-2*v*g));if(s>=0||1===i){t=(r>=0?5:-5)*(s+o);var p,h=50;do{s=(o=wr(18,fr(t)/5))-(i=pr(o)),u=Be[i][1],a=Be[i+1][1],c=Be[wr(19,i+2)][1],t-=(p=(r>=0?Ar:-Ar)*(a+s*(c-u)/2+s*s*(c-2*a+u)/2)-r)*zr}while(fr(p)>Mr&&--h>0);break}}while(--i>=0);var d=Be[i][0],w=Be[i+1][0],y=Be[wr(19,i+2)][0];return[n/(w+s*(y-d)/2+s*s*(y-2*w+d)/2),t*Fr]};var He=1e4,Ie=-180,We=Ie+1e-4,De=180,Te=De-1e-4,Qe=-90,Ve=Qe+1e-4,_e=90,Ke=_e-1e-4;Xn.invert=function(n,r){var e=r/1.70711,t=Rr(Sr*e);return[n/(.74482-.34588*t*t),2*lr(e)]};var Oe=function(n,e,o){var i=r.geoInterpolate(e,o),u=i(.5),a=r.geoRotation([-u[0],-u[1]])(e),c=i.distance/2,f=-t(Rr(a[1]*Fr)/Rr(c)),l=[-u[0],-u[1],-(a[0]>0?Er-f:f)*zr],g=r.geoProjection(n(c)).rotate(l),v=r.geoRotation(l),s=g.center;return delete g.rotate,g.center=function(n){return arguments.length?s(v(n)):v.invert(s())},g.clipAngle(90)};rr.invert=function(n,r){if(fr(r)<jr)return[n,0];if(fr(n)<jr)return[0,Ar*Rr(2*lr(r/Er))];var e=(n/=Er)*n,t=(r/=Er)*r,u=e+t,a=u*u,c=-fr(r)*(1+u),f=c-2*t+e,l=-2*c+1+2*t+a,g=t/l+(2*f*f*f/(l*l*l)-9*c*f/(l*l))/27,v=(c-f*f/(3*l))/l,s=2*i(-v/3),p=o(3*g/(v*s))/3;return[Er*(u-1+i(1+2*(e-t)+a))/(2*n),Pr(r)*Er*(-s*vr(p+Er/3)-f/(3*l))]};er.invert=function(n,r){if(!n)return[0,Ar*Rr(2*lr(r/Er))];var e=fr(n/Er),t=(1-e*e-(r/=Er)*r)/(2*e),o=i(t*t+1);return[Pr(n)*Er*(o-t),Pr(r)*Ar*Rr(2*gr(i((1-2*t*e)*(t+o)-e),i(o+t+e)))]};tr.invert=function(n,r){if(!r)return[n,0];var e=r/Er,t=(Er*Er*(1-e*e)-n*n)/(2*Er*n);return[n?Er*(Pr(n)*i(t*t+1)-t):0,Ar*Rr(2*lr(e))]};or.invert=function(n,r){var e;if(!n||!r)return[n,r];r/=Er;var t=Pr(n)*n/Ar,o=(t*t-1+4*r*r)/fr(t),u=o*o,a=2*r,c=50;do{var f=a*a,l=(8*a-f*(f+2)-5)/(2*f*(a-1)),g=(3*a-f*a-10)/(2*f*a),v=l*l,s=a*l,p=a+l,h=p*p,d=a+3*l,w=-2*p*(4*s*v+(1-4*f+3*f*f)*(1+g)+v*(14*f-6-u+(8*f-8-2*u)*g)+s*(12*f-8+(10*f-10-u)*g)),y=i(h*(f+v*u-1)+(1-f)*(f*(d*d+4*v)+v*(12*s+4*v)));a-=e=(o*(h+v-1)+2*y-t*(4*h+u))/(o*(2*l*g+2*p*(1+g))+w/y-8*p*(o*(-1+v+h)+2*y)*(1+g)/(u+4*h))}while(e>jr&&--c>0);return[Pr(n)*(i(o*o+4)+o)*Er/4,Ar*a]};var Ue=4*Er+3*i(3),Je=2*i(2*Er*i(3)/Ue),Xe=y(Je*i(3)/Er,Je,Ue/6);ir.invert=function(n,r){return[n/i(1-3*r*r/(Er*Er)),r]};ur.invert=function(n,r){var e=n/2.66723,o=r/1.24104,u=i(e*e+o*o),a=2*t(u/2);return[3*gr(n*br(a),2.66723*u),u&&t(r*Rr(a)/(1.24104*.90631*u))]};ar.invert=function(n,r){var e=(n*n+r*r)/-2,o=i(-e*(2+e)),u=r*e+n*o,a=n*e-r*o,c=i(a*a+u*u);return[gr(o*u,c*(1+e)),c?-t(o*a/c):0]};cr.invert=function(n,r){var e=n,t=r,u=25;do{var a,c=vr(t),f=Rr(t),l=Rr(2*t),g=f*f,v=c*c,s=Rr(e),p=vr(e/2),h=Rr(e/2),d=h*h,w=1-v*p*p,y=w?o(c*p)*i(a=1/w):a=0,m=.5*(2*y*c*h+e/Ar)-n,P=.5*(y*f+t)-r,R=.5*a*(v*d+y*c*p*g)+.5/Ar,b=a*(s*l/4-y*f*h),j=.125*a*(l*h-y*f*v*s),M=.5*a*(g*p+y*d*c)+.5,E=b*j-M*R,A=(P*b-m*M)/E,S=(m*j-P*R)/E;e-=A,t-=S}while((fr(A)>jr||fr(S)>jr)&&--u>0);return[e,t]};n.geoAiry=function(){var n=Ar,e=r.geoProjectionMutator(c),t=e(n);return t.radius=function(r){return arguments.length?e(n=r*Fr):n*zr},t.scale(179.976).clipAngle(147)},n.geoAiryRaw=c,n.geoAitoff=function(){return r.geoProjection(f).scale(152.63)},n.geoAitoffRaw=f,n.geoArmadillo=function(){var n=20*Fr,e=n>=0?1:-1,t=br(e*n),o=r.geoProjectionMutator(l),i=o(n),u=i.stream;return i.parallel=function(r){return arguments.length?(t=br((e=(n=r*Fr)>=0?1:-1)*n),o(n)):n*zr},i.stream=function(r){var o=i.rotate(),a=u(r),c=(i.rotate([0,0]),u(r));return i.rotate(o),a.sphere=function(){c.polygonStart(),c.lineStart();for(var r=-180*e;e*r<180;r+=90*e)c.point(r,90*e);for(;e*(r-=n)>=-180;)c.point(r,e*-gr(vr(r*Fr/2),t)*zr);c.lineEnd(),c.polygonEnd()},a},i.scale(218.695).center([0,28.0974])},n.geoArmadilloRaw=l,n.geoAugust=function(){return r.geoProjection(g).scale(66.1603)},n.geoAugustRaw=g,n.geoBaker=function(){return r.geoProjection(v).scale(112.314)},n.geoBakerRaw=v,n.geoBerghaus=function(){var n=5,e=r.geoProjectionMutator(s),o=e(n),i=o.stream,u=-vr(.01*Fr),a=Rr(.01*Fr);return o.lobes=function(r){return arguments.length?e(n=+r):n},o.stream=function(r){var e=o.rotate(),c=i(r),f=(o.rotate([0,0]),i(r));return o.rotate(e),c.sphere=function(){f.polygonStart(),f.lineStart();for(var r=0,e=360/n,o=2*Er/n,i=90-180/n,c=Ar;r<n;++r,i-=e,c-=o)f.point(gr(a*vr(c),u)*zr,t(a*Rr(c))*zr),i<-90?(f.point(-90,-180-i-.01),f.point(-90,-180-i+.01)):(f.point(90,i+.01),f.point(90,i-.01));f.lineEnd(),f.polygonEnd()},c},o.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},n.geoBerghausRaw=s,n.geoBertin1953=function(){var n=r.geoProjection(d());return n.rotate([-16.5,-42]),delete n.rotate,n.scale(176.57).center([7.93,.09])},n.geoBertin1953Raw=d,n.geoBoggs=function(){return r.geoProjection(m).scale(160.857)},n.geoBoggsRaw=m,n.geoBonne=function(){return Ir(R).scale(123.082).center([0,26.1441]).parallel(45)},n.geoBonneRaw=R,n.geoBottomley=function(){var n=.5,e=r.geoProjectionMutator(b),t=e(n);return t.fraction=function(r){return arguments.length?e(n=+r):n},t.scale(158.837)},n.geoBottomleyRaw=b,n.geoBromley=function(){return r.geoProjection(Wr).scale(152.63)},n.geoBromleyRaw=Wr,n.geoChamberlin=k,n.geoChamberlinRaw=A,n.geoChamberlinAfrica=function(){return k([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},n.geoCollignon=function(){return r.geoProjection(x).scale(95.6464).center([0,30])},n.geoCollignonRaw=x,n.geoCraig=function(){return Ir(G).scale(249.828).clipAngle(90)},n.geoCraigRaw=G,n.geoCraster=function(){return r.geoProjection(C).scale(156.19)},n.geoCrasterRaw=C,n.geoCylindricalEqualArea=function(){return Ir(z).parallel(38.58).scale(195.044)},n.geoCylindricalEqualAreaRaw=z,n.geoCylindricalStereographic=function(){return Ir(F).scale(124.75)},n.geoCylindricalStereographicRaw=F,n.geoEckert1=function(){return r.geoProjection(N).scale(165.664)},n.geoEckert1Raw=N,n.geoEckert2=function(){return r.geoProjection(L).scale(165.664)},n.geoEckert2Raw=L,n.geoEckert3=function(){return r.geoProjection(q).scale(180.739)},n.geoEckert3Raw=q,n.geoEckert4=function(){return r.geoProjection(B).scale(180.739)},n.geoEckert4Raw=B,n.geoEckert5=function(){return r.geoProjection(H).scale(173.044)},n.geoEckert5Raw=H,n.geoEckert6=function(){return r.geoProjection(I).scale(173.044)},n.geoEckert6Raw=I,n.geoEisenlohr=function(){return r.geoProjection(W).scale(62.5271)},n.geoEisenlohrRaw=W,n.geoFahey=function(){return r.geoProjection(D).scale(137.152)},n.geoFaheyRaw=D,n.geoFoucaut=function(){return r.geoProjection(T).scale(135.264)},n.geoFoucautRaw=T,n.geoGilbert=function(n){function e(n){return i(Q(n))}function o(n){e[n]=function(r){return arguments.length?(i[n](r),e):i[n]()}}null==n&&(n=r.geoOrthographic);var i=n(),u=r.geoEquirectangular().scale(zr).precision(0).clipAngle(null).translate([0,0]);return i.invert&&(e.invert=function(n){return V(i.invert(n))}),e.stream=function(n){var r=i.stream(n),e=u.stream({point:function(n,e){r.point(n/2,t(br(-e/2*Fr))*zr)},lineStart:function(){r.lineStart()},lineEnd:function(){r.lineEnd()},polygonStart:function(){r.polygonStart()},polygonEnd:function(){r.polygonEnd()}});return e.sphere=r.sphere,e},e.rotate=function(n){return arguments.length?(u.rotate(n),e):u.rotate()},e.center=function(n){return arguments.length?(i.center(Q(n)),e):V(i.center())},o("angle"),o("clipAngle"),o("clipExtent"),o("scale"),o("translate"),o("precision"),e.scale(249.5)},n.geoGingery=function(){var n=6,e=30*Fr,o=vr(e),i=Rr(e),u=r.geoProjectionMutator(_),a=u(e,n),c=a.stream,f=-vr(.01*Fr),l=Rr(.01*Fr);return a.radius=function(r){return arguments.length?(o=vr(e=r*Fr),i=Rr(e),u(e,n)):e*zr},a.lobes=function(r){return arguments.length?u(e,n=+r):n},a.stream=function(r){var e=a.rotate(),u=c(r),g=(a.rotate([0,0]),c(r));return a.rotate(e),u.sphere=function(){g.polygonStart(),g.lineStart();for(var r=0,e=2*Er/n,u=0;r<n;++r,u-=e)g.point(gr(l*vr(u),f)*zr,t(l*Rr(u))*zr),g.point(gr(i*vr(u-e/2),o)*zr,t(i*Rr(u-e/2))*zr);g.lineEnd(),g.polygonEnd()},u},a.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},n.geoGingeryRaw=_,n.geoGinzburg4=function(){return r.geoProjection(_r).scale(149.995)},n.geoGinzburg4Raw=_r,n.geoGinzburg5=function(){return r.geoProjection(Kr).scale(153.93)},n.geoGinzburg5Raw=Kr,n.geoGinzburg6=function(){return r.geoProjection(Or).scale(130.945)},n.geoGinzburg6Raw=Or,n.geoGinzburg8=function(){return r.geoProjection(U).scale(131.747)},n.geoGinzburg8Raw=U,n.geoGinzburg9=function(){return r.geoProjection(Ur).scale(131.087)},n.geoGinzburg9Raw=Ur,n.geoGringorten=function(){return r.geoProjection(Jr(J)).scale(239.75)},n.geoGringortenRaw=J,n.geoGuyou=function(){return r.geoProjection(Jr(Z)).scale(151.496)},n.geoGuyouRaw=Z,n.geoHammer=function(){var n=2,e=r.geoProjectionMutator(p),t=e(n);return t.coefficient=function(r){return arguments.length?e(n=+r):n},t.scale(169.529)},n.geoHammerRaw=p,n.geoHammerRetroazimuthal=function(){var n=0,e=r.geoProjectionMutator($),t=e(n),o=t.rotate,i=t.stream,u=r.geoCircle();return t.parallel=function(r){if(!arguments.length)return n*zr;var o=t.rotate();return e(n=r*Fr).rotate(o)},t.rotate=function(r){return arguments.length?(o.call(t,[r[0],r[1]-n*zr]),u.center([-r[0],-r[1]]),t):(r=o.call(t),r[1]+=n*zr,r)},t.stream=function(n){return n=i(n),n.sphere=function(){n.polygonStart();var r,e=u.radius(89.99)().coordinates[0],t=e.length-1,o=-1;for(n.lineStart();++o<t;)n.point((r=e[o])[0],r[1]);for(n.lineEnd(),t=(e=u.radius(90.01)().coordinates[0]).length-1,n.lineStart();--o>=0;)n.point((r=e[o])[0],r[1]);n.lineEnd(),n.polygonEnd()},n},t.scale(79.4187).parallel(45).clipAngle(179.999)},n.geoHammerRetroazimuthalRaw=$,n.geoHealpix=function(){var n=4,t=r.geoProjectionMutator(rn),o=t(n),i=o.stream;return o.lobes=function(r){return arguments.length?t(n=+r):n},o.stream=function(t){var u=o.rotate(),a=i(t),c=(o.rotate([0,0]),i(t));return o.rotate(u),a.sphere=function(){r.geoStream(function(n){return{type:"Polygon",coordinates:[e.range(-180,180+n/2,n).map(function(n,r){return[n,1&r?90-1e-6:Xr]}).concat(e.range(180,-180-n/2,-n).map(function(n,r){return[n,1&r?1e-6-90:-Xr]}))]}}(180/n),c)},a},o.scale(239.75)},n.geoHealpixRaw=rn,n.geoHill=function(){var n=1,e=r.geoProjectionMutator(en),t=e(n);return t.ratio=function(r){return arguments.length?e(n=+r):n},t.scale(167.774).center([0,18.67])},n.geoHillRaw=en,n.geoHomolosine=function(){return r.geoProjection(on).scale(152.63)},n.geoHomolosineRaw=on,n.geoHyperelliptical=function(){var n=0,e=2.5,t=1.183136,o=r.geoProjectionMutator(an),i=o(n,e,t);return i.alpha=function(r){return arguments.length?o(n=+r,e,t):n},i.k=function(r){return arguments.length?o(n,e=+r,t):e},i.gamma=function(r){return arguments.length?o(n,e,t=+r):t},i.scale(152.63)},n.geoHyperellipticalRaw=an,n.geoInterrupt=ne,n.geoInterruptedBoggs=function(){return ne(m,re).scale(160.857)},n.geoInterruptedHomolosine=function(){return ne(on,ee).scale(152.63)},n.geoInterruptedMollweide=function(){return ne(qr,te).scale(169.529)},n.geoInterruptedMollweideHemispheres=function(){return ne(qr,oe).scale(169.529).rotate([20,0])},n.geoInterruptedSinuMollweide=function(){return ne(tn,ie).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoInterruptedSinusoidal=function(){return ne(P,ue).scale(152.63).rotate([-20,0])},n.geoKavrayskiy7=function(){return r.geoProjection(ln).scale(158.837)},n.geoKavrayskiy7Raw=ln,n.geoLagrange=function(){var n=.5,e=r.geoProjectionMutator(gn),t=e(n);return t.spacing=function(r){return arguments.length?e(n=+r):n},t.scale(124.75)},n.geoLagrangeRaw=gn,n.geoLarrivee=function(){return r.geoProjection(vn).scale(97.2672)},n.geoLarriveeRaw=vn,n.geoLaskowski=function(){return r.geoProjection(sn).scale(139.98)},n.geoLaskowskiRaw=sn,n.geoLittrow=function(){return r.geoProjection(pn).scale(144.049).clipAngle(89.999)},n.geoLittrowRaw=pn,n.geoLoximuthal=function(){return Ir(hn).parallel(40).scale(158.837)},n.geoLoximuthalRaw=hn,n.geoMiller=function(){return r.geoProjection(dn).scale(108.318)},n.geoMillerRaw=dn,n.geoModifiedStereographic=yn,n.geoModifiedStereographicRaw=wn,n.geoModifiedStereographicAlaska=function(){return yn(ce,[152,-64]).scale(1500).center([-160.908,62.4864]).clipAngle(25)},n.geoModifiedStereographicGs48=function(){return yn(fe,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},n.geoModifiedStereographicGs50=function(){return yn(le,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},n.geoModifiedStereographicMiller=function(){return yn(ge,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},n.geoModifiedStereographicLee=function(){return yn(ve,[165,10]).scale(250).clipAngle(130).center([-165,-10])},n.geoMollweide=function(){return r.geoProjection(qr).scale(169.529)},n.geoMollweideRaw=qr,n.geoMtFlatPolarParabolic=function(){return r.geoProjection(mn).scale(164.859)},n.geoMtFlatPolarParabolicRaw=mn,n.geoMtFlatPolarQuartic=function(){return r.geoProjection(Pn).scale(188.209)},n.geoMtFlatPolarQuarticRaw=Pn,n.geoMtFlatPolarSinusoidal=function(){return r.geoProjection(Rn).scale(166.518)},n.geoMtFlatPolarSinusoidalRaw=Rn,n.geoNaturalEarth=r.geoNaturalEarth1,n.geoNaturalEarthRaw=r.geoNaturalEarth1Raw,n.geoNaturalEarth2=function(){return r.geoProjection(bn).scale(175.295)},n.geoNaturalEarth2Raw=bn,n.geoNellHammer=function(){return r.geoProjection(jn).scale(152.63)},n.geoNellHammerRaw=jn,n.geoPatterson=function(){return r.geoProjection(Mn).scale(139.319)},n.geoPattersonRaw=Mn,n.geoPolyconic=function(){return r.geoProjection(En).scale(103.74)},n.geoPolyconicRaw=En,n.geoPolyhedral=Ee,n.geoPolyhedralButterfly=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=Se.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),Ee(e[0],function(n,r){return e[n<-Er/2?r<0?6:4:n<0?r<0?2:0:n<Er/2?r<0?3:1:r<0?7:5]}).angle(-30).scale(101.858).center([0,45])},n.geoPolyhedralCollignon=function(n){n=n||function(n){var e=r.geoCentroid({type:"MultiPoint",coordinates:n});return r.geoProjection(zn).translate([0,0]).scale(1).rotate(e[1]>0?[-e[0],0]:[180-e[0],180])};var e=Se.map(function(r){return{face:r,project:n(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(n,r){var t=e[n];t&&(t.children||(t.children=[])).push(e[r])}),Ee(e[0],function(n,r){return e[n<-Er/2?r<0?6:4:n<0?r<0?2:0:n<Er/2?r<0?3:1:r<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},n.geoPolyhedralWaterman=function(n){n=n||function(n){var e=6===n.length?r.geoCentroid({type:"MultiPoint",coordinates:n}):n[0];return r.geoGnomonic().scale(1).translate([0,0]).rotate([-e[0],-e[1]])};var e=Se.map(function(n){for(var r,e=n.map(Ln),t=e.length,o=e[t-1],i=[],u=0;u<t;++u)r=e[u],i.push(Nn([.9486832980505138*o[0]+.31622776601683794*r[0],.9486832980505138*o[1]+.31622776601683794*r[1],.9486832980505138*o[2]+.31622776601683794*r[2]]),Nn([.9486832980505138*r[0]+.31622776601683794*o[0],.9486832980505138*r[1]+.31622776601683794*o[1],.9486832980505138*r[2]+.31622776601683794*o[2]])),o=r;return i}),t=[],o=[-1,0,0,1,0,1,4,5];e.forEach(function(n,r){for(var i=Se[r],u=i.length,a=t[r]=[],c=0;c<u;++c)e.push([i[c],n[(2*c+2)%(2*u)],n[(2*c+1)%(2*u)]]),o.push(r),a.push(function(n,r){return[n[1]*r[2]-n[2]*r[1],n[2]*r[0]-n[0]*r[2],n[0]*r[1]-n[1]*r[0]]}(Ln(n[(2*c+2)%(2*u)]),Ln(n[(2*c+1)%(2*u)])))});var i=e.map(function(r){return{project:n(r),face:r}});return o.forEach(function(n,r){var e=i[n];e&&(e.children||(e.children=[])).push(i[r])}),Ee(i[0],function(n,r){var e=vr(r),o=[e*vr(n),e*Rr(n),Rr(r)],u=n<-Er/2?r<0?6:4:n<0?r<0?2:0:n<Er/2?r<0?3:1:r<0?7:5,a=t[u];return i[Fn(a[0],o)<0?8+3*u:Fn(a[1],o)<0?8+3*u+1:Fn(a[2],o)<0?8+3*u+2:u]}).angle(-30).scale(110.625).center([0,45])},n.geoProject=function(n,r){var e,t=r.stream;if(!t)throw new Error("invalid projection");switch(n&&n.type){case"Feature":e=Bn;break;case"FeatureCollection":e=qn;break;default:e=Hn}return e(n,t)},n.geoGringortenQuincuncial=function(){return Le(J).scale(176.423)},n.geoPeirceQuincuncial=qe,n.geoPierceQuincuncial=qe,n.geoQuantize=function(n,r){function e(n){var e=n.length,t=2,o=new Array(e);for(o[0]=+n[0].toFixed(r),o[1]=+n[1].toFixed(r);t<e;)o[t]=n[t],++t;return o}function t(n){return n.map(e)}function o(n){return n.map(t)}function i(n){if(null==n)return n;var r;switch(n.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:n.geometries.map(i)};break;case"Point":r={type:"Point",coordinates:e(n.coordinates)};break;case"MultiPoint":case"LineString":r={type:n.type,coordinates:t(n.coordinates)};break;case"MultiLineString":case"Polygon":r={type:n.type,coordinates:o(n.coordinates)};break;case"MultiPolygon":r={type:"MultiPolygon",coordinates:n.coordinates.map(o)};break;default:return n}return null!=n.bbox&&(r.bbox=n.bbox),r}function u(n){var r={type:"Feature",properties:n.properties,geometry:i(n.geometry)};return null!=n.id&&(r.id=n.id),null!=n.bbox&&(r.bbox=n.bbox),r}if(!(0<=(r=+r)&&r<=20))throw new Error("invalid digits");if(null!=n)switch(n.type){case"Feature":return u(n);case"FeatureCollection":var a={type:"FeatureCollection",features:n.features.map(u)};return null!=n.bbox&&(a.bbox=n.bbox),a;default:return i(n)}return n},n.geoQuincuncial=Le,n.geoRectangularPolyconic=function(){return Ir(In).scale(131.215)},n.geoRectangularPolyconicRaw=In,n.geoRobinson=function(){return r.geoProjection(Wn).scale(152.63)},n.geoRobinsonRaw=Wn,n.geoSatellite=function(){var n=2,e=0,t=r.geoProjectionMutator(Dn),i=t(n,e);return i.distance=function(r){return arguments.length?t(n=+r,e):n},i.tilt=function(r){return arguments.length?t(n,e=r*Fr):e*zr},i.scale(432.147).clipAngle(o(1/n)*zr-1e-6)},n.geoSatelliteRaw=Dn,n.geoSinuMollweide=function(){return r.geoProjection(tn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},n.geoSinuMollweideRaw=tn,n.geoSinusoidal=function(){return r.geoProjection(P).scale(152.63)},n.geoSinusoidalRaw=P,n.geoStitch=function(n){if(null==n)return n;switch(n.type){case"Feature":return Un(n);case"FeatureCollection":var r={type:"FeatureCollection",features:n.features.map(Un)};return null!=n.bbox&&(r.bbox=n.bbox),r;default:return Jn(n)}},n.geoTimes=function(){return r.geoProjection(Xn).scale(146.153)},n.geoTimesRaw=Xn,n.geoTwoPointAzimuthal=Zn,n.geoTwoPointAzimuthalRaw=Yn,n.geoTwoPointAzimuthalUsa=function(){return Zn([-158,21.5],[-77,39]).clipAngle(60).scale(400)},n.geoTwoPointEquidistant=nr,n.geoTwoPointEquidistantRaw=$n,n.geoTwoPointEquidistantUsa=function(){return nr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},n.geoVanDerGrinten=function(){return r.geoProjection(rr).scale(79.4183)},n.geoVanDerGrintenRaw=rr,n.geoVanDerGrinten2=function(){return r.geoProjection(er).scale(79.4183)},n.geoVanDerGrinten2Raw=er,n.geoVanDerGrinten3=function(){return r.geoProjection(tr).scale(79.4183)},n.geoVanDerGrinten3Raw=tr,n.geoVanDerGrinten4=function(){return r.geoProjection(or).scale(127.16)},n.geoVanDerGrinten4Raw=or,n.geoWagner4=function(){return r.geoProjection(Xe).scale(176.84)},n.geoWagner4Raw=Xe,n.geoWagner6=function(){return r.geoProjection(ir).scale(152.63)},n.geoWagner6Raw=ir,n.geoWagner7=function(){return r.geoProjection(ur).scale(172.632)},n.geoWagner7Raw=ur,n.geoWiechel=function(){return r.geoProjection(ar).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},n.geoWiechelRaw=ar,n.geoWinkel3=function(){return r.geoProjection(cr).scale(158.837)},n.geoWinkel3Raw=cr,Object.defineProperty(n,"__esModule",{value:!0})});