You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
34 KiB
2 lines
34 KiB
// https://d3js.org/d3-geo/ Version 1.9.1. Copyright 2017 Mike Bostock.
|
|
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-array"],t):t(n.d3=n.d3||{},n.d3)}(this,function(n,t){"use strict";function r(){this.reset()}function i(n,t,r){var i=n.s=t+r,e=i-t,o=i-e;n.t=t-o+(r-e)}function e(n){return n>1?0:n<-1?Gt:Math.acos(n)}function o(n){return n>1?Tt:n<-1?-Tt:Math.asin(n)}function u(n){return(n=Kt(n/2))*n}function c(){}function a(n,t){n&&tr.hasOwnProperty(n.type)&&tr[n.type](n,t)}function l(n,t,r){var i,e=-1,o=n.length-r;for(t.lineStart();++e<o;)i=n[e],t.point(i[0],i[1],i[2]);t.lineEnd()}function f(n,t){var r=-1,i=n.length;for(t.polygonStart();++r<i;)l(n[r],t,1);t.polygonEnd()}function s(){or.point=h}function p(){g(it,et)}function h(n,t){or.point=g,it=n,et=t,ot=n*=It,ut=Ut(t=(t*=It)/2+kt),ct=Kt(t)}function g(n,t){t=(t*=It)/2+kt;var r=(n*=It)-ot,i=r>=0?1:-1,e=i*r,o=Ut(t),u=Kt(t),c=ct*u,a=ut*o+c*Ut(e),l=c*i*Kt(e);ir.add(Dt(l,a)),ot=n,ut=o,ct=u}function v(n){return[Dt(n[1],n[0]),o(n[2])]}function d(n){var t=n[0],r=n[1],i=Ut(r);return[i*Ut(t),i*Kt(t),Kt(r)]}function E(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function y(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function S(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function m(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function M(n){var t=Vt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function x(n,t){dt.push(Et=[at=n,ft=n]),t<lt&&(lt=t),t>st&&(st=t)}function _(n,t){var r=d([n*It,t*It]);if(vt){var i=y(vt,r),e=y([i[1],-i[0],0],i);M(e),e=v(e);var o,u=n-pt,c=u>0?1:-1,a=e[0]*Ht*c,l=Wt(u)>180;l^(c*pt<a&&a<c*n)?(o=e[1]*Ht)>st&&(st=o):(a=(a+360)%360-180,l^(c*pt<a&&a<c*n)?(o=-e[1]*Ht)<lt&&(lt=o):(t<lt&&(lt=t),t>st&&(st=t))),l?n<pt?A(at,n)>A(at,ft)&&(ft=n):A(n,ft)>A(at,ft)&&(at=n):ft>=at?(n<at&&(at=n),n>ft&&(ft=n)):n>pt?A(at,n)>A(at,ft)&&(ft=n):A(n,ft)>A(at,ft)&&(at=n)}else dt.push(Et=[at=n,ft=n]);t<lt&&(lt=t),t>st&&(st=t),vt=r,pt=n}function N(){cr.point=_}function w(){Et[0]=at,Et[1]=ft,cr.point=x,vt=null}function C(n,t){if(vt){var r=n-pt;ur.add(Wt(r)>180?r+(r>0?360:-360):r)}else ht=n,gt=t;or.point(n,t),_(n,t)}function P(){or.lineStart()}function R(){C(ht,gt),or.lineEnd(),Wt(ur)>Ot&&(at=-(ft=180)),Et[0]=at,Et[1]=ft,vt=null}function A(n,t){return(t-=n)<0?t+360:t}function j(n,t){return n[0]-t[0]}function q(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}function z(n,t){n*=It;var r=Ut(t*=It);b(r*Ut(n),r*Kt(n),Kt(t))}function b(n,t,r){mt+=(n-mt)/++yt,Mt+=(t-Mt)/yt,xt+=(r-xt)/yt}function L(){ar.point=O}function O(n,t){n*=It;var r=Ut(t*=It);qt=r*Ut(n),zt=r*Kt(n),bt=Kt(t),ar.point=G,b(qt,zt,bt)}function G(n,t){n*=It;var r=Ut(t*=It),i=r*Ut(n),e=r*Kt(n),o=Kt(t),u=Dt(Vt((u=zt*o-bt*e)*u+(u=bt*i-qt*o)*u+(u=qt*e-zt*i)*u),qt*i+zt*e+bt*o);St+=u,_t+=u*(qt+(qt=i)),Nt+=u*(zt+(zt=e)),wt+=u*(bt+(bt=o)),b(qt,zt,bt)}function T(){ar.point=z}function k(){ar.point=H}function F(){I(At,jt),ar.point=z}function H(n,t){At=n,jt=t,n*=It,t*=It,ar.point=I;var r=Ut(t);qt=r*Ut(n),zt=r*Kt(n),bt=Kt(t),b(qt,zt,bt)}function I(n,t){n*=It;var r=Ut(t*=It),i=r*Ut(n),e=r*Kt(n),u=Kt(t),c=zt*u-bt*e,a=bt*i-qt*u,l=qt*e-zt*i,f=Vt(c*c+a*a+l*l),s=o(f),p=f&&-s/f;Ct+=p*c,Pt+=p*a,Rt+=p*l,St+=s,_t+=s*(qt+(qt=i)),Nt+=s*(zt+(zt=e)),wt+=s*(bt+(bt=u)),b(qt,zt,bt)}function W(n,t){return[n>Gt?n-Ft:n<-Gt?n+Ft:n,t]}function B(n,t,r){return(n%=Ft)?t||r?fr(U(n),X(t,r)):U(n):t||r?X(t,r):W}function D(n){return function(t,r){return t+=n,[t>Gt?t-Ft:t<-Gt?t+Ft:t,r]}}function U(n){var t=D(n);return t.invert=D(-n),t}function X(n,t){function r(n,t){var r=Ut(t),a=Ut(n)*r,l=Kt(n)*r,f=Kt(t),s=f*i+a*e;return[Dt(l*u-s*c,a*i-f*e),o(s*u+l*c)]}var i=Ut(n),e=Kt(n),u=Ut(t),c=Kt(t);return r.invert=function(n,t){var r=Ut(t),a=Ut(n)*r,l=Kt(n)*r,f=Kt(t),s=f*u-l*c;return[Dt(l*u+f*c,a*i+s*e),o(s*i-a*e)]},r}function Y(n,t,r,i,e,o){if(r){var u=Ut(t),c=Kt(t),a=i*r;null==e?(e=t+i*Ft,o=t-a/2):(e=Z(u,e),o=Z(u,o),(i>0?e<o:e>o)&&(e+=i*Ft));for(var l,f=e;i>0?f>o:f<o;f-=a)l=v([u,-c*Ut(f),-c*Kt(f)]),n.point(l[0],l[1])}}function Z(n,t){(t=d(t))[0]-=n,M(t);var r=e(-t[1]);return((-t[2]<0?-r:r)+Ft-Ot)%Ft}function J(n,t,r,i){this.x=n,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function K(n){if(t=n.length){for(var t,r,i=0,e=n[0];++i<t;)e.n=r=n[i],r.p=e,e=r;e.n=r=n[0],r.p=e}}function Q(n){return n.length>1}function V(n,t){return((n=n.x)[0]<0?n[1]-Tt-Ot:Tt-n[1])-((t=t.x)[0]<0?t[1]-Tt-Ot:Tt-t[1])}function $(n,r,i,e){function o(t,o){return n<=t&&t<=i&&r<=o&&o<=e}function u(t,o,u,a){var f=0,s=0;if(null==t||(f=c(t,u))!==(s=c(o,u))||l(t,o)<0^u>0)do{a.point(0===f||3===f?n:i,f>1?e:r)}while((f=(f+u+4)%4)!==s);else a.point(o[0],o[1])}function c(t,e){return Wt(t[0]-n)<Ot?e>0?0:3:Wt(t[0]-i)<Ot?e>0?2:1:Wt(t[1]-r)<Ot?e>0?1:0:e>0?3:2}function a(n,t){return l(n.x,t.x)}function l(n,t){var r=c(n,1),i=c(t,1);return r!==i?r-i:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(c){function l(n,t){o(n,t)&&x.point(n,t)}function f(t,u){var c=o(t,u);if(p&&h.push([t,u]),m)g=t,v=u,d=c,m=!1,c&&(x.lineStart(),x.point(t,u));else if(c&&S)x.point(t,u);else{var a=[E=Math.max(br,Math.min(zr,E)),y=Math.max(br,Math.min(zr,y))],l=[t=Math.max(br,Math.min(zr,t)),u=Math.max(br,Math.min(zr,u))];qr(a,l,n,r,i,e)?(S||(x.lineStart(),x.point(a[0],a[1])),x.point(l[0],l[1]),c||x.lineEnd(),M=!1):c&&(x.lineStart(),x.point(t,u),M=!1)}E=t,y=u,S=c}var s,p,h,g,v,d,E,y,S,m,M,x=c,_=_r(),N={point:l,lineStart:function(){N.point=f,p&&p.push(h=[]),m=!0,S=!1,E=y=NaN},lineEnd:function(){s&&(f(g,v),d&&S&&_.rejoin(),s.push(_.result())),N.point=l,S&&x.lineEnd()},polygonStart:function(){x=_,s=[],p=[],M=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,i=p.length;r<i;++r)for(var o,u,c=p[r],a=1,l=c.length,f=c[0],s=f[0],h=f[1];a<l;++a)o=s,u=h,s=(f=c[a])[0],h=f[1],u<=e?h>e&&(s-o)*(e-u)>(h-u)*(n-o)&&++t:h<=e&&(s-o)*(e-u)<(h-u)*(n-o)&&--t;return t}(),i=M&&r,o=(s=t.merge(s)).length;(i||o)&&(c.polygonStart(),i&&(c.lineStart(),u(null,null,1,c),c.lineEnd()),o&&wr(s,a,r,u,c),c.polygonEnd()),x=c,s=p=h=null}};return N}}function nn(){Or.point=Or.lineEnd=c}function tn(n,t){sr=n*=It,pr=Kt(t*=It),hr=Ut(t),Or.point=rn}function rn(n,t){n*=It;var r=Kt(t*=It),i=Ut(t),e=Wt(n-sr),o=Ut(e),u=i*Kt(e),c=hr*r-pr*i*o,a=pr*r+hr*i*o;Lr.add(Dt(Vt(u*u+c*c),a)),sr=n,pr=r,hr=i}function en(n,t){return!(!n||!Ir.hasOwnProperty(n.type))&&Ir[n.type](n,t)}function on(n,t){return 0===Fr(n,t)}function un(n,t){var r=Fr(n[0],n[1]);return Fr(n[0],t)+Fr(t,n[1])<=r+Ot}function cn(n,t){return!!Pr(n.map(an),ln(t))}function an(n){return(n=n.map(ln)).pop(),n}function ln(n){return[n[0]*It,n[1]*It]}function fn(n,r,i){var e=t.range(n,r-Ot,i).concat(r);return function(n){return e.map(function(t){return[n,t]})}}function sn(n,r,i){var e=t.range(n,r-Ot,i).concat(r);return function(n){return e.map(function(t){return[t,n]})}}function pn(){function n(){return{type:"MultiLineString",coordinates:r()}}function r(){return t.range(Xt(u/E)*E,o,E).map(h).concat(t.range(Xt(f/y)*y,l,y).map(g)).concat(t.range(Xt(e/v)*v,i,v).filter(function(n){return Wt(n%E)>Ot}).map(s)).concat(t.range(Xt(a/d)*d,c,d).filter(function(n){return Wt(n%y)>Ot}).map(p))}var i,e,o,u,c,a,l,f,s,p,h,g,v=10,d=v,E=90,y=360,S=2.5;return n.lines=function(){return r().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(g(l).slice(1),h(o).reverse().slice(1),g(f).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.extentMajor(t).extentMinor(t):n.extentMinor()},n.extentMajor=function(t){return arguments.length?(u=+t[0][0],o=+t[1][0],f=+t[0][1],l=+t[1][1],u>o&&(t=u,u=o,o=t),f>l&&(t=f,f=l,l=t),n.precision(S)):[[u,f],[o,l]]},n.extentMinor=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],a=+t[0][1],c=+t[1][1],e>i&&(t=e,e=i,i=t),a>c&&(t=a,a=c,c=t),n.precision(S)):[[e,a],[i,c]]},n.step=function(t){return arguments.length?n.stepMajor(t).stepMinor(t):n.stepMinor()},n.stepMajor=function(t){return arguments.length?(E=+t[0],y=+t[1],n):[E,y]},n.stepMinor=function(t){return arguments.length?(v=+t[0],d=+t[1],n):[v,d]},n.precision=function(t){return arguments.length?(S=+t,s=fn(a,c,90),p=sn(e,i,S),h=fn(f,l,90),g=sn(u,o,S),n):S},n.extentMajor([[-180,-90+Ot],[180,90-Ot]]).extentMinor([[-180,-80-Ot],[180,80+Ot]])}function hn(){Ur.point=gn}function gn(n,t){Ur.point=vn,gr=dr=n,vr=Er=t}function vn(n,t){Dr.add(Er*n-dr*t),dr=n,Er=t}function dn(){vn(gr,vr)}function En(n,t){Qr+=n,Vr+=t,++$r}function yn(){ui.point=Sn}function Sn(n,t){ui.point=mn,En(mr=n,Mr=t)}function mn(n,t){var r=n-mr,i=t-Mr,e=Vt(r*r+i*i);ni+=e*(mr+n)/2,ti+=e*(Mr+t)/2,ri+=e,En(mr=n,Mr=t)}function Mn(){ui.point=En}function xn(){ui.point=Nn}function _n(){wn(yr,Sr)}function Nn(n,t){ui.point=wn,En(yr=mr=n,Sr=Mr=t)}function wn(n,t){var r=n-mr,i=t-Mr,e=Vt(r*r+i*i);ni+=e*(mr+n)/2,ti+=e*(Mr+t)/2,ri+=e,ii+=(e=Mr*n-mr*t)*(mr+n),ei+=e*(Mr+t),oi+=3*e,En(mr=n,Mr=t)}function Cn(n){this._context=n}function Pn(n,t){hi.point=Rn,ai=fi=n,li=si=t}function Rn(n,t){fi-=n,si-=t,pi.add(Vt(fi*fi+si*si)),fi=n,si=t}function An(){this._string=[]}function jn(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function qn(n){return function(t){var r=new zn;for(var i in n)r[i]=n[i];return r.stream=t,r}}function zn(){}function bn(n,t,r){var i=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=i&&n.clipExtent(null),rr(r,n.stream(Kr)),t(Kr.result()),null!=i&&n.clipExtent(i),n}function Ln(n,t,r){return bn(n,function(r){var i=t[1][0]-t[0][0],e=t[1][1]-t[0][1],o=Math.min(i/(r[1][0]-r[0][0]),e/(r[1][1]-r[0][1])),u=+t[0][0]+(i-o*(r[1][0]+r[0][0]))/2,c=+t[0][1]+(e-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([u,c])},r)}function On(n,t,r){return Ln(n,[[0,0],t],r)}function Gn(n,t,r){return bn(n,function(r){var i=+t,e=i/(r[1][0]-r[0][0]),o=(i-e*(r[1][0]+r[0][0]))/2,u=-e*r[0][1];n.scale(150*e).translate([o,u])},r)}function Tn(n,t,r){return bn(n,function(r){var i=+t,e=i/(r[1][1]-r[0][1]),o=-e*r[0][0],u=(i-e*(r[1][1]+r[0][1]))/2;n.scale(150*e).translate([o,u])},r)}function kn(n){return Fn(function(){return n})()}function Fn(n){function t(n){return n=l(n[0]*It,n[1]*It),[n[0]*v+u,c-n[1]*v]}function r(n,t){return n=o(n,t),[n[0]*v+u,c-n[1]*v]}function i(){l=fr(a=B(m,M,x),o);var n=o(y,S);return u=d-n[0]*v,c=E+n[1]*v,e()}function e(){return h=g=null,t}var o,u,c,a,l,f,s,p,h,g,v=150,d=480,E=250,y=0,S=0,m=0,M=0,x=0,_=null,N=Ar,w=null,C=Wr,P=.5,R=di(r,P);return t.stream=function(n){return h&&g===n?h:h=Ei(function(n){return qn({point:function(t,r){var i=n(t,r);return this.stream.point(i[0],i[1])}})}(a)(N(R(C(g=n)))))},t.preclip=function(n){return arguments.length?(N=n,_=void 0,e()):N},t.postclip=function(n){return arguments.length?(C=n,w=f=s=p=null,e()):C},t.clipAngle=function(n){return arguments.length?(N=+n?jr(_=n*It):(_=null,Ar),e()):_*Ht},t.clipExtent=function(n){return arguments.length?(C=null==n?(w=f=s=p=null,Wr):$(w=+n[0][0],f=+n[0][1],s=+n[1][0],p=+n[1][1]),e()):null==w?null:[[w,f],[s,p]]},t.scale=function(n){return arguments.length?(v=+n,i()):v},t.translate=function(n){return arguments.length?(d=+n[0],E=+n[1],i()):[d,E]},t.center=function(n){return arguments.length?(y=n[0]%360*It,S=n[1]%360*It,i()):[y*Ht,S*Ht]},t.rotate=function(n){return arguments.length?(m=n[0]%360*It,M=n[1]%360*It,x=n.length>2?n[2]%360*It:0,i()):[m*Ht,M*Ht,x*Ht]},t.precision=function(n){return arguments.length?(R=di(r,P=n*n),e()):Vt(P)},t.fitExtent=function(n,r){return Ln(t,n,r)},t.fitSize=function(n,r){return On(t,n,r)},t.fitWidth=function(n,r){return Gn(t,n,r)},t.fitHeight=function(n,r){return Tn(t,n,r)},function(){return o=n.apply(this,arguments),t.invert=o.invert&&function(n){return(n=l.invert((n[0]-u)/v,(c-n[1])/v))&&[n[0]*Ht,n[1]*Ht]},i()}}function Hn(n){var t=0,r=Gt/3,i=Fn(n),e=i(t,r);return e.parallels=function(n){return arguments.length?i(t=n[0]*It,r=n[1]*It):[t*Ht,r*Ht]},e}function In(n,t){function r(n,t){var r=Vt(u-2*e*Kt(t))/e;return[r*Kt(n*=e),c-r*Ut(n)]}var i=Kt(n),e=(i+Kt(t))/2;if(Wt(e)<Ot)return function(n){function t(n,t){return[n*r,Kt(t)/r]}var r=Ut(n);return t.invert=function(n,t){return[n/r,o(t*r)]},t}(n);var u=1+i*(2*e-i),c=Vt(u)/e;return r.invert=function(n,t){var r=c-t;return[Dt(n,Wt(r))/e*Qt(r),o((u-(n*n+r*r)*e*e)/(2*e))]},r}function Wn(n){return function(t,r){var i=Ut(t),e=Ut(r),o=n(i*e);return[o*e*Kt(t),o*Kt(r)]}}function Bn(n){return function(t,r){var i=Vt(t*t+r*r),e=n(i),u=Kt(e),c=Ut(e);return[Dt(t*u,i*c),o(i&&r*u/i)]}}function Dn(n,t){return[n,Zt($t((Tt+t)/2))]}function Un(n){function t(){var t=Gt*c(),u=o(xr(o.rotate()).invert([0,0]));return l(null==f?[[u[0]-t,u[1]-t],[u[0]+t,u[1]+t]]:n===Dn?[[Math.max(u[0]-t,f),r],[Math.min(u[0]+t,i),e]]:[[f,Math.max(u[1]-t,r)],[i,Math.min(u[1]+t,e)]])}var r,i,e,o=kn(n),u=o.center,c=o.scale,a=o.translate,l=o.clipExtent,f=null;return o.scale=function(n){return arguments.length?(c(n),t()):c()},o.translate=function(n){return arguments.length?(a(n),t()):a()},o.center=function(n){return arguments.length?(u(n),t()):u()},o.clipExtent=function(n){return arguments.length?(null==n?f=r=i=e=null:(f=+n[0][0],r=+n[0][1],i=+n[1][0],e=+n[1][1]),t()):null==f?null:[[f,r],[i,e]]},t()}function Xn(n){return $t((Tt+n)/2)}function Yn(n,t){function r(n,t){o>0?t<-Tt+Ot&&(t=-Tt+Ot):t>Tt-Ot&&(t=Tt-Ot);var r=o/Jt(Xn(t),e);return[r*Kt(e*n),o-r*Ut(e*n)]}var i=Ut(n),e=n===t?Kt(n):Zt(i/Ut(t))/Zt(Xn(t)/Xn(n)),o=i*Jt(Xn(n),e)/e;return e?(r.invert=function(n,t){var r=o-t,i=Qt(e)*Vt(n*n+r*r);return[Dt(n,Wt(r))/e*Qt(r),2*Bt(Jt(o/i,1/e))-Tt]},r):Dn}function Zn(n,t){return[n,t]}function Jn(n,t){function r(n,t){var r=o-t,i=e*n;return[r*Kt(i),o-r*Ut(i)]}var i=Ut(n),e=n===t?Kt(n):(i-Ut(t))/(t-n),o=i/e+n;return Wt(e)<Ot?Zn:(r.invert=function(n,t){var r=o-t;return[Dt(n,Wt(r))/e*Qt(r),o-Qt(e)*Vt(n*n+r*r)]},r)}function Kn(n,t){var r=Ut(t),i=Ut(n)*r;return[r*Kt(n)/i,Kt(t)/i]}function Qn(n,t,r,i){return 1===n&&1===t&&0===r&&0===i?Wr:qn({point:function(e,o){this.stream.point(e*n+r,o*t+i)}})}function Vn(n,t){var r=t*t,i=r*r;return[n*(.8707-.131979*r+i*(i*(.003971*r-.001529*i)-.013791)),t*(1.007226+r*(.015085+i*(.028874*r-.044475-.005916*i)))]}function $n(n,t){return[Ut(t)*Kt(n),Kt(t)]}function nt(n,t){var r=Ut(t),i=1+Ut(n)*r;return[r*Kt(n)/i,Kt(t)/i]}function tt(n,t){return[Zt($t((Tt+t)/2)),-n]}var rt=function(){return new r};r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(n){i(Lt,n,this.t),i(this,Lt.s,this.s),this.s?this.t+=Lt.t:this.s=Lt.t},valueOf:function(){return this.s}};var it,et,ot,ut,ct,at,lt,ft,st,pt,ht,gt,vt,dt,Et,yt,St,mt,Mt,xt,_t,Nt,wt,Ct,Pt,Rt,At,jt,qt,zt,bt,Lt=new r,Ot=1e-6,Gt=Math.PI,Tt=Gt/2,kt=Gt/4,Ft=2*Gt,Ht=180/Gt,It=Gt/180,Wt=Math.abs,Bt=Math.atan,Dt=Math.atan2,Ut=Math.cos,Xt=Math.ceil,Yt=Math.exp,Zt=Math.log,Jt=Math.pow,Kt=Math.sin,Qt=Math.sign||function(n){return n>0?1:n<0?-1:0},Vt=Math.sqrt,$t=Math.tan,nr={Feature:function(n,t){a(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++i<e;)a(r[i].geometry,t)}},tr={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)n=r[i],t.point(n[0],n[1],n[2])},LineString:function(n,t){l(n.coordinates,t,0)},MultiLineString:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)l(r[i],t,0)},Polygon:function(n,t){f(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)f(r[i],t)},GeometryCollection:function(n,t){for(var r=n.geometries,i=-1,e=r.length;++i<e;)a(r[i],t)}},rr=function(n,t){n&&nr.hasOwnProperty(n.type)?nr[n.type](n,t):a(n,t)},ir=rt(),er=rt(),or={point:c,lineStart:c,lineEnd:c,polygonStart:function(){ir.reset(),or.lineStart=s,or.lineEnd=p},polygonEnd:function(){var n=+ir;er.add(n<0?Ft+n:n),this.lineStart=this.lineEnd=this.point=c},sphere:function(){er.add(Ft)}},ur=rt(),cr={point:x,lineStart:N,lineEnd:w,polygonStart:function(){cr.point=C,cr.lineStart=P,cr.lineEnd=R,ur.reset(),or.polygonStart()},polygonEnd:function(){or.polygonEnd(),cr.point=x,cr.lineStart=N,cr.lineEnd=w,ir<0?(at=-(ft=180),lt=-(st=90)):ur>Ot?st=90:ur<-Ot&&(lt=-90),Et[0]=at,Et[1]=ft}},ar={sphere:c,point:z,lineStart:L,lineEnd:T,polygonStart:function(){ar.lineStart=k,ar.lineEnd=F},polygonEnd:function(){ar.lineStart=L,ar.lineEnd=T}},lr=function(n){return function(){return n}},fr=function(n,t){function r(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(r.invert=function(r,i){return(r=t.invert(r,i))&&n.invert(r[0],r[1])}),r};W.invert=W;var sr,pr,hr,gr,vr,dr,Er,yr,Sr,mr,Mr,xr=function(n){function t(t){return t=n(t[0]*It,t[1]*It),t[0]*=Ht,t[1]*=Ht,t}return n=B(n[0]*It,n[1]*It,n.length>2?n[2]*It:0),t.invert=function(t){return t=n.invert(t[0]*It,t[1]*It),t[0]*=Ht,t[1]*=Ht,t},t},_r=function(){var n,t=[];return{point:function(t,r){n.push([t,r])},lineStart:function(){t.push(n=[])},lineEnd:c,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}},Nr=function(n,t){return Wt(n[0]-t[0])<Ot&&Wt(n[1]-t[1])<Ot},wr=function(n,t,r,i,e){var o,u,c=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,r,i=n[0],u=n[t];if(Nr(i,u)){for(e.lineStart(),o=0;o<t;++o)e.point((i=n[o])[0],i[1]);e.lineEnd()}else c.push(r=new J(i,n,null,!0)),a.push(r.o=new J(i,null,r,!1)),c.push(r=new J(u,n,null,!1)),a.push(r.o=new J(u,null,r,!0))}}),c.length){for(a.sort(t),K(c),K(a),o=0,u=a.length;o<u;++o)a[o].e=r=!r;for(var l,f,s=c[0];;){for(var p=s,h=!0;p.v;)if((p=p.n)===s)return;l=p.z,e.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,u=l.length;o<u;++o)e.point((f=l[o])[0],f[1]);else i(p.x,p.n.x,1,e);p=p.n}else{if(h)for(l=p.p.z,o=l.length-1;o>=0;--o)e.point((f=l[o])[0],f[1]);else i(p.x,p.p.x,-1,e);p=p.p}l=(p=p.o).z,h=!h}while(!p.v);e.lineEnd()}}},Cr=rt(),Pr=function(n,t){var r=t[0],i=t[1],e=[Kt(r),-Ut(r),0],u=0,c=0;Cr.reset();for(var a=0,l=n.length;a<l;++a)if(s=(f=n[a]).length)for(var f,s,p=f[s-1],h=p[0],g=p[1]/2+kt,v=Kt(g),E=Ut(g),S=0;S<s;++S,h=x,v=N,E=w,p=m){var m=f[S],x=m[0],_=m[1]/2+kt,N=Kt(_),w=Ut(_),C=x-h,P=C>=0?1:-1,R=P*C,A=R>Gt,j=v*N;if(Cr.add(Dt(j*P*Kt(R),E*w+j*Ut(R))),u+=A?C+P*Ft:C,A^h>=r^x>=r){var q=y(d(p),d(m));M(q);var z=y(e,q);M(z);var b=(A^C>=0?-1:1)*o(z[2]);(i>b||i===b&&(q[0]||q[1]))&&(c+=A^C>=0?1:-1)}}return(u<-Ot||u<Ot&&Cr<-Ot)^1&c},Rr=function(n,r,i,e){return function(o){function u(t,r){n(t,r)&&o.point(t,r)}function c(n,t){d.point(n,t)}function a(){m.point=c,d.lineStart()}function l(){m.point=u,d.lineEnd()}function f(n,t){v.push([n,t]),y.point(n,t)}function s(){y.lineStart(),v=[]}function p(){f(v[0][0],v[0][1]),y.lineEnd();var n,t,r,i,e=y.clean(),u=E.result(),c=u.length;if(v.pop(),h.push(v),v=null,c)if(1&e){if(r=u[0],(t=r.length-1)>0){for(S||(o.polygonStart(),S=!0),o.lineStart(),n=0;n<t;++n)o.point((i=r[n])[0],i[1]);o.lineEnd()}}else c>1&&2&e&&u.push(u.pop().concat(u.shift())),g.push(u.filter(Q))}var h,g,v,d=r(o),E=_r(),y=r(E),S=!1,m={point:u,lineStart:a,lineEnd:l,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=p,g=[],h=[]},polygonEnd:function(){m.point=u,m.lineStart=a,m.lineEnd=l,g=t.merge(g);var n=Pr(h,e);g.length?(S||(o.polygonStart(),S=!0),wr(g,V,n,i,o)):n&&(S||(o.polygonStart(),S=!0),o.lineStart(),i(null,null,1,o),o.lineEnd()),S&&(o.polygonEnd(),S=!1),g=h=null},sphere:function(){o.polygonStart(),o.lineStart(),i(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return m}},Ar=Rr(function(){return!0},function(n){var t,r=NaN,i=NaN,e=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var c=o>0?Gt:-Gt,a=Wt(o-r);Wt(a-Gt)<Ot?(n.point(r,i=(i+u)/2>0?Tt:-Tt),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),n.point(o,i),t=0):e!==c&&a>=Gt&&(Wt(r-e)<Ot&&(r-=e*Ot),Wt(o-c)<Ot&&(o-=c*Ot),i=function(n,t,r,i){var e,o,u=Kt(n-r);return Wt(u)>Ot?Bt((Kt(t)*(o=Ut(i))*Kt(r)-Kt(i)*(e=Ut(t))*Kt(n))/(e*o*u)):(t+i)/2}(r,i,o,u),n.point(e,i),n.lineEnd(),n.lineStart(),n.point(c,i),t=0),n.point(r=o,i=u),e=c},lineEnd:function(){n.lineEnd(),r=i=NaN},clean:function(){return 2-t}}},function(n,t,r,i){var e;if(null==n)e=r*Tt,i.point(-Gt,e),i.point(0,e),i.point(Gt,e),i.point(Gt,0),i.point(Gt,-e),i.point(0,-e),i.point(-Gt,-e),i.point(-Gt,0),i.point(-Gt,e);else if(Wt(n[0]-t[0])>Ot){var o=n[0]<t[0]?Gt:-Gt;e=r*o/2,i.point(-o,e),i.point(0,e),i.point(o,e)}else i.point(t[0],t[1])},[-Gt,-Tt]),jr=function(n){function t(n,t){return Ut(n)*Ut(t)>e}function r(n,t,r){var i=[1,0,0],o=y(d(n),d(t)),u=E(o,o),c=o[0],a=u-c*c;if(!a)return!r&&n;var l=e*u/a,f=-e*c/a,s=y(i,o),p=m(i,l);S(p,m(o,f));var h=s,g=E(p,h),M=E(h,h),x=g*g-M*(E(p,p)-1);if(!(x<0)){var _=Vt(x),N=m(h,(-g-_)/M);if(S(N,p),N=v(N),!r)return N;var w,C=n[0],P=t[0],R=n[1],A=t[1];P<C&&(w=C,C=P,P=w);var j=P-C,q=Wt(j-Gt)<Ot;if(!q&&A<R&&(w=R,R=A,A=w),q||j<Ot?q?R+A>0^N[1]<(Wt(N[0]-C)<Ot?R:A):R<=N[1]&&N[1]<=A:j>Gt^(C<=N[0]&&N[0]<=P)){var z=m(h,(-g+_)/M);return S(z,p),[N,v(z)]}}}function i(t,r){var i=u?n:Gt-n,e=0;return t<-i?e|=1:t>i&&(e|=2),r<-i?e|=4:r>i&&(e|=8),e}var e=Ut(n),o=6*It,u=e>0,c=Wt(e)>Ot;return Rr(t,function(n){var e,o,a,l,f;return{lineStart:function(){l=a=!1,f=1},point:function(s,p){var h,g=[s,p],v=t(s,p),d=u?v?0:i(s,p):v?i(s+(s<0?Gt:-Gt),p):0;if(!e&&(l=a=v)&&n.lineStart(),v!==a&&(!(h=r(e,g))||Nr(e,h)||Nr(g,h))&&(g[0]+=Ot,g[1]+=Ot,v=t(g[0],g[1])),v!==a)f=0,v?(n.lineStart(),h=r(g,e),n.point(h[0],h[1])):(h=r(e,g),n.point(h[0],h[1]),n.lineEnd()),e=h;else if(c&&e&&u^v){var E;d&o||!(E=r(g,e,!0))||(f=0,u?(n.lineStart(),n.point(E[0][0],E[0][1]),n.point(E[1][0],E[1][1]),n.lineEnd()):(n.point(E[1][0],E[1][1]),n.lineEnd(),n.lineStart(),n.point(E[0][0],E[0][1])))}!v||e&&Nr(e,g)||n.point(g[0],g[1]),e=g,a=v,o=d},lineEnd:function(){a&&n.lineEnd(),e=null},clean:function(){return f|(l&&a)<<1}}},function(t,r,i,e){Y(e,n,o,i,t,r)},u?[0,-n]:[-Gt,n-Gt])},qr=function(n,t,r,i,e,o){var u,c=n[0],a=n[1],l=0,f=1,s=t[0]-c,p=t[1]-a;if(u=r-c,s||!(u>0)){if(u/=s,s<0){if(u<l)return;u<f&&(f=u)}else if(s>0){if(u>f)return;u>l&&(l=u)}if(u=e-c,s||!(u<0)){if(u/=s,s<0){if(u>f)return;u>l&&(l=u)}else if(s>0){if(u<l)return;u<f&&(f=u)}if(u=i-a,p||!(u>0)){if(u/=p,p<0){if(u<l)return;u<f&&(f=u)}else if(p>0){if(u>f)return;u>l&&(l=u)}if(u=o-a,p||!(u<0)){if(u/=p,p<0){if(u>f)return;u>l&&(l=u)}else if(p>0){if(u<l)return;u<f&&(f=u)}return l>0&&(n[0]=c+l*s,n[1]=a+l*p),f<1&&(t[0]=c+f*s,t[1]=a+f*p),!0}}}}},zr=1e9,br=-zr,Lr=rt(),Or={sphere:c,point:c,lineStart:function(){Or.point=tn,Or.lineEnd=nn},lineEnd:c,polygonStart:c,polygonEnd:c},Gr=function(n){return Lr.reset(),rr(n,Or),+Lr},Tr=[null,null],kr={type:"LineString",coordinates:Tr},Fr=function(n,t){return Tr[0]=n,Tr[1]=t,Gr(kr)},Hr={Feature:function(n,t){return en(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,i=-1,e=r.length;++i<e;)if(en(r[i].geometry,t))return!0;return!1}},Ir={Sphere:function(){return!0},Point:function(n,t){return on(n.coordinates,t)},MultiPoint:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)if(on(r[i],t))return!0;return!1},LineString:function(n,t){return un(n.coordinates,t)},MultiLineString:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)if(un(r[i],t))return!0;return!1},Polygon:function(n,t){return cn(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,i=-1,e=r.length;++i<e;)if(cn(r[i],t))return!0;return!1},GeometryCollection:function(n,t){for(var r=n.geometries,i=-1,e=r.length;++i<e;)if(en(r[i],t))return!0;return!1}},Wr=function(n){return n},Br=rt(),Dr=rt(),Ur={point:c,lineStart:c,lineEnd:c,polygonStart:function(){Ur.lineStart=hn,Ur.lineEnd=dn},polygonEnd:function(){Ur.lineStart=Ur.lineEnd=Ur.point=c,Br.add(Wt(Dr)),Dr.reset()},result:function(){var n=Br/2;return Br.reset(),n}},Xr=1/0,Yr=Xr,Zr=-Xr,Jr=Zr,Kr={point:function(n,t){n<Xr&&(Xr=n),n>Zr&&(Zr=n),t<Yr&&(Yr=t),t>Jr&&(Jr=t)},lineStart:c,lineEnd:c,polygonStart:c,polygonEnd:c,result:function(){var n=[[Xr,Yr],[Zr,Jr]];return Zr=Jr=-(Yr=Xr=1/0),n}},Qr=0,Vr=0,$r=0,ni=0,ti=0,ri=0,ii=0,ei=0,oi=0,ui={point:En,lineStart:yn,lineEnd:Mn,polygonStart:function(){ui.lineStart=xn,ui.lineEnd=_n},polygonEnd:function(){ui.point=En,ui.lineStart=yn,ui.lineEnd=Mn},result:function(){var n=oi?[ii/oi,ei/oi]:ri?[ni/ri,ti/ri]:$r?[Qr/$r,Vr/$r]:[NaN,NaN];return Qr=Vr=$r=ni=ti=ri=ii=ei=oi=0,n}};Cn.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._context.moveTo(n,t),this._point=1;break;case 1:this._context.lineTo(n,t);break;default:this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,Ft)}},result:c};var ci,ai,li,fi,si,pi=rt(),hi={point:c,lineStart:function(){hi.point=Pn},lineEnd:function(){ci&&Rn(ai,li),hi.point=c},polygonStart:function(){ci=!0},polygonEnd:function(){ci=null},result:function(){var n=+pi;return pi.reset(),n}};An.prototype={_radius:4.5,_circle:jn(4.5),pointRadius:function(n){return(n=+n)!==this._radius&&(this._radius=n,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._string.push("M",n,",",t),this._point=1;break;case 1:this._string.push("L",n,",",t);break;default:null==this._circle&&(this._circle=jn(this._radius)),this._string.push("M",n,",",t,this._circle)}},result:function(){if(this._string.length){var n=this._string.join("");return this._string=[],n}return null}};zn.prototype={constructor:zn,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var gi=16,vi=Ut(30*It),di=function(n,t){return+t?function(n,t){function r(i,e,u,c,a,l,f,s,p,h,g,v,d,E){var y=f-i,S=s-e,m=y*y+S*S;if(m>4*t&&d--){var M=c+h,x=a+g,_=l+v,N=Vt(M*M+x*x+_*_),w=o(_/=N),C=Wt(Wt(_)-1)<Ot||Wt(u-p)<Ot?(u+p)/2:Dt(x,M),P=n(C,w),R=P[0],A=P[1],j=R-i,q=A-e,z=S*j-y*q;(z*z/m>t||Wt((y*j+S*q)/m-.5)>.3||c*h+a*g+l*v<vi)&&(r(i,e,u,c,a,l,R,A,C,M/=N,x/=N,_,d,E),E.point(R,A),r(R,A,C,M,x,_,f,s,p,h,g,v,d,E))}}return function(t){function i(r,i){r=n(r,i),t.point(r[0],r[1])}function e(){y=NaN,_.point=o,t.lineStart()}function o(i,e){var o=d([i,e]),u=n(i,e);r(y,S,E,m,M,x,y=u[0],S=u[1],E=i,m=o[0],M=o[1],x=o[2],gi,t),t.point(y,S)}function u(){_.point=i,t.lineEnd()}function c(){e(),_.point=a,_.lineEnd=l}function a(n,t){o(f=n,t),s=y,p=S,h=m,g=M,v=x,_.point=o}function l(){r(y,S,E,m,M,x,s,p,f,h,g,v,gi,t),_.lineEnd=u,u()}var f,s,p,h,g,v,E,y,S,m,M,x,_={point:i,lineStart:e,lineEnd:u,polygonStart:function(){t.polygonStart(),_.lineStart=c},polygonEnd:function(){t.polygonEnd(),_.lineStart=e}};return _}}(n,t):function(n){return qn({point:function(t,r){t=n(t,r),this.stream.point(t[0],t[1])}})}(n)},Ei=qn({point:function(n,t){this.stream.point(n*It,t*It)}}),yi=function(){return Hn(In).scale(155.424).center([0,33.6442])},Si=function(){return yi().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])},mi=Wn(function(n){return Vt(2/(1+n))});mi.invert=Bn(function(n){return 2*o(n/2)});var Mi=Wn(function(n){return(n=e(n))&&n/Kt(n)});Mi.invert=Bn(function(n){return n});Dn.invert=function(n,t){return[n,2*Bt(Yt(t))-Tt]};Zn.invert=Zn;Kn.invert=Bn(Bt);Vn.invert=function(n,t){var r,i=t,e=25;do{var o=i*i,u=o*o;i-=r=(i*(1.007226+o*(.015085+u*(.028874*o-.044475-.005916*u)))-t)/(1.007226+o*(.045255+u*(.259866*o-.311325-.005916*11*u)))}while(Wt(r)>Ot&&--e>0);return[n/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]};$n.invert=Bn(o);nt.invert=Bn(function(n){return 2*Bt(n)});tt.invert=function(n,t){return[-t,2*Bt(Yt(n))-Tt]};n.geoArea=function(n){return er.reset(),rr(n,or),2*er},n.geoBounds=function(n){var t,r,i,e,o,u,c;if(st=ft=-(at=lt=1/0),dt=[],rr(n,cr),r=dt.length){for(dt.sort(j),t=1,o=[i=dt[0]];t<r;++t)q(i,(e=dt[t])[0])||q(i,e[1])?(A(i[0],e[1])>A(i[0],i[1])&&(i[1]=e[1]),A(e[0],i[1])>A(i[0],i[1])&&(i[0]=e[0])):o.push(i=e);for(u=-1/0,t=0,i=o[r=o.length-1];t<=r;i=e,++t)e=o[t],(c=A(i[1],e[0]))>u&&(u=c,at=e[0],ft=i[1])}return dt=Et=null,at===1/0||lt===1/0?[[NaN,NaN],[NaN,NaN]]:[[at,lt],[ft,st]]},n.geoCentroid=function(n){yt=St=mt=Mt=xt=_t=Nt=wt=Ct=Pt=Rt=0,rr(n,ar);var t=Ct,r=Pt,i=Rt,e=t*t+r*r+i*i;return e<1e-12&&(t=_t,r=Nt,i=wt,St<Ot&&(t=mt,r=Mt,i=xt),(e=t*t+r*r+i*i)<1e-12)?[NaN,NaN]:[Dt(r,t)*Ht,o(i/Vt(e))*Ht]},n.geoCircle=function(){function n(){var n=i.apply(this,arguments),c=e.apply(this,arguments)*It,a=o.apply(this,arguments)*It;return t=[],r=B(-n[0]*It,-n[1]*It,0).invert,Y(u,c,a,1),n={type:"Polygon",coordinates:[t]},t=r=null,n}var t,r,i=lr([0,0]),e=lr(90),o=lr(6),u={point:function(n,i){t.push(n=r(n,i)),n[0]*=Ht,n[1]*=Ht}};return n.center=function(t){return arguments.length?(i="function"==typeof t?t:lr([+t[0],+t[1]]),n):i},n.radius=function(t){return arguments.length?(e="function"==typeof t?t:lr(+t),n):e},n.precision=function(t){return arguments.length?(o="function"==typeof t?t:lr(+t),n):o},n},n.geoClipAntimeridian=Ar,n.geoClipCircle=jr,n.geoClipExtent=function(){var n,t,r,i=0,e=0,o=960,u=500;return r={stream:function(r){return n&&t===r?n:n=$(i,e,o,u)(t=r)},extent:function(c){return arguments.length?(i=+c[0][0],e=+c[0][1],o=+c[1][0],u=+c[1][1],n=t=null,r):[[i,e],[o,u]]}}},n.geoClipRectangle=$,n.geoContains=function(n,t){return(n&&Hr.hasOwnProperty(n.type)?Hr[n.type]:en)(n,t)},n.geoDistance=Fr,n.geoGraticule=pn,n.geoGraticule10=function(){return pn()()},n.geoInterpolate=function(n,t){var r=n[0]*It,i=n[1]*It,e=t[0]*It,c=t[1]*It,a=Ut(i),l=Kt(i),f=Ut(c),s=Kt(c),p=a*Ut(r),h=a*Kt(r),g=f*Ut(e),v=f*Kt(e),d=2*o(Vt(u(c-i)+a*f*u(e-r))),E=Kt(d),y=d?function(n){var t=Kt(n*=d)/E,r=Kt(d-n)/E,i=r*p+t*g,e=r*h+t*v,o=r*l+t*s;return[Dt(e,i)*Ht,Dt(o,Vt(i*i+e*e))*Ht]}:function(){return[r*Ht,i*Ht]};return y.distance=d,y},n.geoLength=Gr,n.geoPath=function(n,t){function r(n){return n&&("function"==typeof o&&e.pointRadius(+o.apply(this,arguments)),rr(n,i(e))),e.result()}var i,e,o=4.5;return r.area=function(n){return rr(n,i(Ur)),Ur.result()},r.measure=function(n){return rr(n,i(hi)),hi.result()},r.bounds=function(n){return rr(n,i(Kr)),Kr.result()},r.centroid=function(n){return rr(n,i(ui)),ui.result()},r.projection=function(t){return arguments.length?(i=null==t?(n=null,Wr):(n=t).stream,r):n},r.context=function(n){return arguments.length?(e=null==n?(t=null,new An):new Cn(t=n),"function"!=typeof o&&e.pointRadius(o),r):t},r.pointRadius=function(n){return arguments.length?(o="function"==typeof n?n:(e.pointRadius(+n),+n),r):o},r.projection(n).context(t)},n.geoAlbers=Si,n.geoAlbersUsa=function(){function n(n){var t=n[0],r=n[1];return c=null,e.point(t,r),c||(o.point(t,r),c)||(u.point(t,r),c)}function t(){return r=i=null,n}var r,i,e,o,u,c,a=Si(),l=yi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),f=yi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,t){c=[n,t]}};return n.invert=function(n){var t=a.scale(),r=a.translate(),i=(n[0]-r[0])/t,e=(n[1]-r[1])/t;return(e>=.12&&e<.234&&i>=-.425&&i<-.214?l:e>=.166&&e<.234&&i>=-.214&&i<-.115?f:a).invert(n)},n.stream=function(n){return r&&i===n?r:r=function(n){var t=n.length;return{point:function(r,i){for(var e=-1;++e<t;)n[e].point(r,i)},sphere:function(){for(var r=-1;++r<t;)n[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)n[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)n[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)n[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)n[r].polygonEnd()}}}([a.stream(i=n),l.stream(n),f.stream(n)])},n.precision=function(n){return arguments.length?(a.precision(n),l.precision(n),f.precision(n),t()):a.precision()},n.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),f.scale(t),n.translate(a.translate())):a.scale()},n.translate=function(n){if(!arguments.length)return a.translate();var r=a.scale(),i=+n[0],c=+n[1];return e=a.translate(n).clipExtent([[i-.455*r,c-.238*r],[i+.455*r,c+.238*r]]).stream(s),o=l.translate([i-.307*r,c+.201*r]).clipExtent([[i-.425*r+Ot,c+.12*r+Ot],[i-.214*r-Ot,c+.234*r-Ot]]).stream(s),u=f.translate([i-.205*r,c+.212*r]).clipExtent([[i-.214*r+Ot,c+.166*r+Ot],[i-.115*r-Ot,c+.234*r-Ot]]).stream(s),t()},n.fitExtent=function(t,r){return Ln(n,t,r)},n.fitSize=function(t,r){return On(n,t,r)},n.fitWidth=function(t,r){return Gn(n,t,r)},n.fitHeight=function(t,r){return Tn(n,t,r)},n.scale(1070)},n.geoAzimuthalEqualArea=function(){return kn(mi).scale(124.75).clipAngle(179.999)},n.geoAzimuthalEqualAreaRaw=mi,n.geoAzimuthalEquidistant=function(){return kn(Mi).scale(79.4188).clipAngle(179.999)},n.geoAzimuthalEquidistantRaw=Mi,n.geoConicConformal=function(){return Hn(Yn).scale(109.5).parallels([30,30])},n.geoConicConformalRaw=Yn,n.geoConicEqualArea=yi,n.geoConicEqualAreaRaw=In,n.geoConicEquidistant=function(){return Hn(Jn).scale(131.154).center([0,13.9389])},n.geoConicEquidistantRaw=Jn,n.geoEquirectangular=function(){return kn(Zn).scale(152.63)},n.geoEquirectangularRaw=Zn,n.geoGnomonic=function(){return kn(Kn).scale(144.049).clipAngle(60)},n.geoGnomonicRaw=Kn,n.geoIdentity=function(){function n(){return e=o=null,u}var t,r,i,e,o,u,c=1,a=0,l=0,f=1,s=1,p=Wr,h=null,g=Wr;return u={stream:function(n){return e&&o===n?e:e=p(g(o=n))},postclip:function(e){return arguments.length?(g=e,h=t=r=i=null,n()):g},clipExtent:function(e){return arguments.length?(g=null==e?(h=t=r=i=null,Wr):$(h=+e[0][0],t=+e[0][1],r=+e[1][0],i=+e[1][1]),n()):null==h?null:[[h,t],[r,i]]},scale:function(t){return arguments.length?(p=Qn((c=+t)*f,c*s,a,l),n()):c},translate:function(t){return arguments.length?(p=Qn(c*f,c*s,a=+t[0],l=+t[1]),n()):[a,l]},reflectX:function(t){return arguments.length?(p=Qn(c*(f=t?-1:1),c*s,a,l),n()):f<0},reflectY:function(t){return arguments.length?(p=Qn(c*f,c*(s=t?-1:1),a,l),n()):s<0},fitExtent:function(n,t){return Ln(u,n,t)},fitSize:function(n,t){return On(u,n,t)},fitWidth:function(n,t){return Gn(u,n,t)},fitHeight:function(n,t){return Tn(u,n,t)}}},n.geoProjection=kn,n.geoProjectionMutator=Fn,n.geoMercator=function(){return Un(Dn).scale(961/Ft)},n.geoMercatorRaw=Dn,n.geoNaturalEarth1=function(){return kn(Vn).scale(175.295)},n.geoNaturalEarth1Raw=Vn,n.geoOrthographic=function(){return kn($n).scale(249.5).clipAngle(90+Ot)},n.geoOrthographicRaw=$n,n.geoStereographic=function(){return kn(nt).scale(250).clipAngle(142)},n.geoStereographicRaw=nt,n.geoTransverseMercator=function(){var n=Un(tt),t=n.center,r=n.rotate;return n.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)},n.geoTransverseMercatorRaw=tt,n.geoRotation=xr,n.geoStream=rr,n.geoTransform=function(n){return{stream:qn(n)}},Object.defineProperty(n,"__esModule",{value:!0})}); |