var app=function(){"use strict";function n(){}function t(n){return n()}function r(){return Object.create(null)}function e(n){n.forEach(t)}function i(n){return"function"==typeof n}function o(n,t){return n!=n?t==t:n!==t||n&&"object"==typeof n||"function"==typeof n}function u(n,t,r){n.insertBefore(t,r||null)}function a(n){n.parentNode.removeChild(n)}function l(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function c(n,t,r){null==r?n.removeAttribute(t):n.getAttribute(t)!==r&&n.setAttribute(t,r)}let f;function s(n){f=n}function h(n){(function(){if(!f)throw new Error("Function called outside component initialization");return f})().$$.on_mount.push(n)}const p=[],g=[],d=[],v=[],m=Promise.resolve();let y=!1;function b(n){d.push(n)}function M(){const n=new Set;do{for(;p.length;){const n=p.shift();s(n),w(n.$$)}for(;g.length;)g.pop()();for(let t=0;t(v.ctx&&c(v.ctx[n],v.ctx[n]=r)&&(v.bound[n]&&v.bound[n](r),m&&E(o,n)),t)):[],v.update(),m=!0,e(v.before_update),v.fragment=!!l&&l(v.ctx),u.target&&(u.hydrate?v.fragment&&v.fragment.l((N=u.target,Array.from(N.childNodes))):v.fragment&&v.fragment.c(),u.intro&&((y=o.$$.fragment)&&y.i&&(x.delete(y),y.i(w))),function(n,r,o){const{fragment:u,on_mount:a,on_destroy:l,after_update:c}=n.$$;u&&u.m(r,o),b(()=>{const r=a.map(t).filter(i);l?l.push(...r):e(r),n.$$.on_mount=[]}),c.forEach(b)}(o,u.target,u.anchor),M()),s(g)}class S{$destroy(){!function(n,t){const r=n.$$;null!==r.fragment&&(e(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}(this,1),this.$destroy=n}$on(n,t){const r=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return r.push(t),()=>{const n=r.indexOf(t);-1!==n&&r.splice(n,1)}}$set(){}}function k(){return new _}function _(){this.reset()}_.prototype={constructor:_,reset:function(){this.s=this.t=0},add:function(n){A($,n,this.t),A(this,$.s,this.s),this.s?this.t+=$.t:this.s=$.t},valueOf:function(){return this.s}};var $=new _;function A(n,t,r){var e=n.s=t+r,i=e-t,o=e-i;n.t=t-o+(r-i)}var j=1e-6,P=Math.PI,R=P/2,z=P/4,q=2*P,F=180/P,C=P/180,O=Math.abs,L=Math.atan,H=Math.atan2,I=Math.cos,T=Math.sin,G=Math.sign||function(n){return n>0?1:n<0?-1:0},D=Math.sqrt;function B(n){return n>1?R:n<-1?-R:Math.asin(n)}function U(){}function V(n,t){n&&Z.hasOwnProperty(n.type)&&Z[n.type](n,t)}var X={Feature:function(n,t){V(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,e=-1,i=r.length;++eP?n+Math.round(-n/q)*q:n,t]}function ln(n){return function(t,r){return[(t+=n)>P?t-q:t<-P?t+q:t,r]}}function cn(n){var t=ln(n);return t.invert=ln(-n),t}function fn(n,t){var r=I(n),e=T(n),i=I(t),o=T(t);function u(n,t){var u=I(t),a=I(n)*u,l=T(n)*u,c=T(t),f=c*r+a*e;return[H(l*i-f*o,a*r-c*e),B(f*i+l*o)]}return u.invert=function(n,t){var u=I(t),a=I(n)*u,l=T(n)*u,c=T(t),f=c*i-l*o;return[H(l*i+c*o,a*r+f*e),B(f*r-a*e)]},u}function sn(n,t){(t=Q(t))[0]-=n,on(t);var r,e=(r=-t[1])>1?0:r<-1?P:Math.acos(r);return((-t[2]<0?-e:e)+q-j)%q}function hn(){var n,t=[];return{point:function(t,r){n.push([t,r])},lineStart:function(){t.push(n=[])},lineEnd:U,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}}function pn(n,t){return O(n[0]-t[0])=0;--o)i.point((f=c[o])[0],f[1]);else e(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function vn(n){if(t=n.length){for(var t,r,e=0,i=n[0];++et?1:n>=t?0:NaN}var Mn,wn,xn=(1===(Mn=bn).length&&(wn=Mn,Mn=function(n,t){return bn(wn(n),t)}),{left:function(n,t,r,e){for(null==r&&(r=0),null==e&&(e=n.length);r>>1;Mn(n[i],t)<0?r=i+1:e=i}return r},right:function(n,t,r,e){for(null==r&&(r=0),null==e&&(e=n.length);r>>1;Mn(n[i],t)>0?e=i:r=i+1}return r}}).right;var En=Math.sqrt(50),Nn=Math.sqrt(10),Sn=Math.sqrt(2);function kn(n,t,r){var e=(t-n)/Math.max(0,r),i=Math.floor(Math.log(e)/Math.LN10),o=e/Math.pow(10,i);return i>=0?(o>=En?10:o>=Nn?5:o>=Sn?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=En?10:o>=Nn?5:o>=Sn?2:1)}function _n(n){for(var t,r,e,i=n.length,o=-1,u=0;++o=0;)for(t=(e=n[i]).length;--t>=0;)r[--u]=e[t];return r}function $n(n,t,r,e){return function(i){var o,u,a,l=t(i),c=hn(),f=t(c),s=!1,h={point:p,lineStart:d,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=y,h.lineEnd=b,u=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=d,h.lineEnd=v,u=_n(u);var n=function(n,t){var r=yn(t),e=t[1],i=T(e),o=[T(r),-I(r),0],u=0,a=0;mn.reset(),1===i?e=R+j:-1===i&&(e=-R-j);for(var l=0,c=n.length;l=0?1:-1,S=N*E,k=S>P,_=d*w;if(mn.add(H(_*N*T(S),v*x+_*I(S))),u+=k?E+N*q:E,k^p>=r^b>=r){var $=tn(Q(h),Q(y));on($);var A=tn(o,$);on(A);var F=(k^E>=0?-1:1)*B(A[2]);(e>F||e===F&&($[0]||$[1]))&&(a+=k^E>=0?1:-1)}}return(u<-j||u0){for(s||(i.polygonStart(),s=!0),i.lineStart(),n=0;n1&&2&l&&h.push(h.pop().concat(h.shift())),u.push(h.filter(An))}return h}}function An(n){return n.length>1}function jn(n,t){return((n=n.x)[0]<0?n[1]-R-j:R-n[1])-((t=t.x)[0]<0?t[1]-R-j:R-t[1])}var Pn=$n((function(){return!0}),(function(n){var t,r=NaN,e=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var a=o>0?P:-P,l=O(o-r);O(l-P)0?R:-R),n.point(i,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(o,e),t=0):i!==a&&l>=P&&(O(r-i)j?L((T(t)*(o=I(e))*T(r)-T(e)*(i=I(t))*T(n))/(i*o*u)):(t+e)/2}(r,e,o,u),n.point(i,e),n.lineEnd(),n.lineStart(),n.point(a,e),t=0),n.point(r=o,e=u),i=a},lineEnd:function(){n.lineEnd(),r=e=NaN},clean:function(){return 2-t}}}),(function(n,t,r,e){var i;if(null==n)i=r*R,e.point(-P,i),e.point(0,i),e.point(P,i),e.point(P,0),e.point(P,-i),e.point(0,-i),e.point(-P,-i),e.point(-P,0),e.point(-P,i);else if(O(n[0]-t[0])>j){var o=n[0]0,i=O(t)>j;function o(n,r){return I(n)*I(r)>t}function u(n,r,e){var i=[1,0,0],o=tn(Q(n),Q(r)),u=nn(o,o),a=o[0],l=u-a*a;if(!l)return!e&&n;var c=t*u/l,f=-t*a/l,s=tn(i,o),h=en(i,c);rn(h,en(o,f));var p=s,g=nn(h,p),d=nn(p,p),v=g*g-d*(nn(h,h)-1);if(!(v<0)){var m=D(v),y=en(p,(-g-m)/d);if(rn(y,h),y=J(y),!e)return y;var b,M=n[0],w=r[0],x=n[1],E=r[1];w0^y[1]<(O(y[0]-M)P^(M<=y[0]&&y[0]<=w)){var k=en(p,(-g+m)/d);return rn(k,h),[y,J(k)]}}}function a(t,r){var i=e?n:P-n,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}return $n(o,(function(n){var t,r,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],d=o(s,h),v=e?d?0:a(s,h):d?a(s+(s<0?P:-P),h):0;if(!t&&(c=l=d)&&n.lineStart(),d!==l&&(!(p=u(t,g))||pn(t,p)||pn(g,p))&&(g[0]+=j,g[1]+=j,d=o(g[0],g[1])),d!==l)f=0,d?(n.lineStart(),p=u(g,t),n.point(p[0],p[1])):(p=u(t,g),n.point(p[0],p[1]),n.lineEnd()),t=p;else if(i&&t&&e^d){var m;v&r||!(m=u(g,t,!0))||(f=0,e?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!d||t&&pn(t,g)||n.point(g[0],g[1]),t=g,l=d,r=v},lineEnd:function(){l&&n.lineEnd(),t=null},clean:function(){return f|(c&&l)<<1}}}),(function(t,e,i,o){!function(n,t,r,e,i,o){if(r){var u=I(t),a=T(t),l=e*r;null==i?(i=t+e*q,o=t-l/2):(i=sn(u,i),o=sn(u,o),(e>0?io)&&(i+=e*q));for(var c,f=i;e>0?f>o:f0)do{c.point(0===f||3===f?n:r,f>1?e:t)}while((f=(f+a+4)%4)!==s);else c.point(o[0],o[1])}function u(e,i){return O(e[0]-n)0?0:3:O(e[0]-r)0?2:1:O(e[1]-t)0?1:0:i>0?3:2}function a(n,t){return l(n.x,t.x)}function l(n,t){var r=u(n,1),e=u(t,1);return r!==e?r-e:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(u){var l,c,f,s,h,p,g,d,v,m,y,b=u,M=hn(),w={point:x,lineStart:function(){w.point=E,c&&c.push(f=[]);m=!0,v=!1,g=d=NaN},lineEnd:function(){l&&(E(s,h),p&&v&&M.rejoin(),l.push(M.result()));w.point=x,v&&b.lineEnd()},polygonStart:function(){b=M,l=[],c=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,r=0,i=c.length;re&&(h-o)*(e-u)>(p-u)*(n-o)&&++t:p<=e&&(h-o)*(e-u)<(p-u)*(n-o)&&--t;return t}(),r=y&&t,i=(l=_n(l)).length;(r||i)&&(u.polygonStart(),r&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),i&&dn(l,a,t,o,u),u.polygonEnd());b=u,l=c=f=null}};function x(n,t){i(n,t)&&b.point(n,t)}function E(o,u){var a=i(o,u);if(c&&f.push([o,u]),m)s=o,h=u,p=a,m=!1,a&&(b.lineStart(),b.point(o,u));else if(a&&v)b.point(o,u);else{var l=[g=Math.max(qn,Math.min(zn,g)),d=Math.max(qn,Math.min(zn,d))],M=[o=Math.max(qn,Math.min(zn,o)),u=Math.max(qn,Math.min(zn,u))];!function(n,t,r,e,i,o){var u,a=n[0],l=n[1],c=0,f=1,s=t[0]-a,h=t[1]-l;if(u=r-a,s||!(u>0)){if(u/=s,s<0){if(u0){if(u>f)return;u>c&&(c=u)}if(u=i-a,s||!(u<0)){if(u/=s,s<0){if(u>f)return;u>c&&(c=u)}else if(s>0){if(u0)){if(u/=h,h<0){if(u0){if(u>f)return;u>c&&(c=u)}if(u=o-l,h||!(u<0)){if(u/=h,h<0){if(u>f)return;u>c&&(c=u)}else if(h>0){if(u0&&(n[0]=a+c*s,n[1]=l+c*h),f<1&&(t[0]=a+f*s,t[1]=l+f*h),!0}}}}}(l,M,n,t,r,e)?a&&(b.lineStart(),b.point(o,u),y=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(M[0],M[1]),a||b.lineEnd(),y=!1)}g=o,d=u,v=a}return w}}function Cn(n){return n}var On,Ln,Hn,In,Tn=k(),Gn=k(),Dn={point:U,lineStart:U,lineEnd:U,polygonStart:function(){Dn.lineStart=Bn,Dn.lineEnd=Xn},polygonEnd:function(){Dn.lineStart=Dn.lineEnd=Dn.point=U,Tn.add(O(Gn)),Gn.reset()},result:function(){var n=Tn/2;return Tn.reset(),n}};function Bn(){Dn.point=Un}function Un(n,t){Dn.point=Vn,On=Hn=n,Ln=In=t}function Vn(n,t){Gn.add(In*n-Hn*t),Hn=n,In=t}function Xn(){Vn(On,Ln)}var Zn=1/0,Kn=Zn,Wn=-Zn,Yn=Wn,Jn={point:function(n,t){nWn&&(Wn=n);tYn&&(Yn=t)},lineStart:U,lineEnd:U,polygonStart:U,polygonEnd:U,result:function(){var n=[[Zn,Kn],[Wn,Yn]];return Wn=Yn=-(Kn=Zn=1/0),n}};var Qn,nt,tt,rt,et=0,it=0,ot=0,ut=0,at=0,lt=0,ct=0,ft=0,st=0,ht={point:pt,lineStart:gt,lineEnd:mt,polygonStart:function(){ht.lineStart=yt,ht.lineEnd=bt},polygonEnd:function(){ht.point=pt,ht.lineStart=gt,ht.lineEnd=mt},result:function(){var n=st?[ct/st,ft/st]:lt?[ut/lt,at/lt]:ot?[et/ot,it/ot]:[NaN,NaN];return et=it=ot=ut=at=lt=ct=ft=st=0,n}};function pt(n,t){et+=n,it+=t,++ot}function gt(){ht.point=dt}function dt(n,t){ht.point=vt,pt(tt=n,rt=t)}function vt(n,t){var r=n-tt,e=t-rt,i=D(r*r+e*e);ut+=i*(tt+n)/2,at+=i*(rt+t)/2,lt+=i,pt(tt=n,rt=t)}function mt(){ht.point=pt}function yt(){ht.point=Mt}function bt(){wt(Qn,nt)}function Mt(n,t){ht.point=wt,pt(Qn=tt=n,nt=rt=t)}function wt(n,t){var r=n-tt,e=t-rt,i=D(r*r+e*e);ut+=i*(tt+n)/2,at+=i*(rt+t)/2,lt+=i,ct+=(i=rt*n-tt*t)*(tt+n),ft+=i*(rt+t),st+=3*i,pt(tt=n,rt=t)}function xt(n){this._context=n}xt.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,q)}},result:U};var Et,Nt,St,kt,_t,$t=k(),At={point:U,lineStart:function(){At.point=jt},lineEnd:function(){Et&&Pt(Nt,St),At.point=U},polygonStart:function(){Et=!0},polygonEnd:function(){Et=null},result:function(){var n=+$t;return $t.reset(),n}};function jt(n,t){At.point=Pt,Nt=kt=n,St=_t=t}function Pt(n,t){kt-=n,_t-=t,$t.add(D(kt*kt+_t*_t)),kt=n,_t=t}function Rt(){this._string=[]}function zt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function qt(n){return function(t){var r=new Ft;for(var e in n)r[e]=n[e];return r.stream=t,r}}function Ft(){}function Ct(n,t,r){var e=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=e&&n.clipExtent(null),Y(r,n.stream(Jn)),t(Jn.result()),null!=e&&n.clipExtent(e),n}function Ot(n,t,r){return Ct(n,(function(r){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(e/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),u=+t[0][0]+(e-o*(r[1][0]+r[0][0]))/2,a=+t[0][1]+(i-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([u,a])}),r)}Rt.prototype={_radius:4.5,_circle:zt(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=zt(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}},Ft.prototype={constructor:Ft,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 Lt=16,Ht=I(30*C);function It(n,t){return+t?function(n,t){function r(e,i,o,u,a,l,c,f,s,h,p,g,d,v){var m=c-e,y=f-i,b=m*m+y*y;if(b>4*t&&d--){var M=u+h,w=a+p,x=l+g,E=D(M*M+w*w+x*x),N=B(x/=E),S=O(O(x)-1)t||O((m*A+y*P)/b-.5)>.3||u*h+a*p+l*g2?n[2]%360*C:0,_()):[v*F,m*F,y*F]},S.angle=function(n){return arguments.length?(b=n%360*C,_()):b*F},S.precision=function(n){return arguments.length?(u=It(a,N=n*n),$()):D(N)},S.fitExtent=function(n,t){return Ot(S,n,t)},S.fitSize=function(n,t){return function(n,t,r){return Ot(n,[[0,0],t],r)}(S,n,t)},S.fitWidth=function(n,t){return function(n,t,r){return Ct(n,(function(r){var e=+t,i=e/(r[1][0]-r[0][0]),o=(e-i*(r[1][0]+r[0][0]))/2,u=-i*r[0][1];n.scale(150*i).translate([o,u])}),r)}(S,n,t)},S.fitHeight=function(n,t){return function(n,t,r){return Ct(n,(function(r){var e=+t,i=e/(r[1][1]-r[0][1]),o=-i*r[0][0],u=(e-i*(r[1][1]+r[0][1]))/2;n.scale(150*i).translate([o,u])}),r)}(S,n,t)},function(){return t=n.apply(this,arguments),S.invert=t.invert&&k,_()}}function Ut(n,t){var r=T(n),e=(r+T(t))/2;if(O(e)>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?new gr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?new gr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=tr.exec(n))?new gr(t[1],t[2],t[3],1):(t=rr.exec(n))?new gr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=er.exec(n))?hr(t[1],t[2],t[3],t[4]):(t=ir.exec(n))?hr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=or.exec(n))?yr(t[1],t[2]/100,t[3]/100,1):(t=ur.exec(n))?yr(t[1],t[2]/100,t[3]/100,t[4]):ar.hasOwnProperty(n)?sr(ar[n]):"transparent"===n?new gr(NaN,NaN,NaN,0):null}function sr(n){return new gr(n>>16&255,n>>8&255,255&n,1)}function hr(n,t,r,e){return e<=0&&(n=t=r=NaN),new gr(n,t,r,e)}function pr(n,t,r,e){return 1===arguments.length?((i=n)instanceof Wt||(i=fr(i)),i?new gr((i=i.rgb()).r,i.g,i.b,i.opacity):new gr):new gr(n,t,r,null==e?1:e);var i}function gr(n,t,r,e){this.r=+n,this.g=+t,this.b=+r,this.opacity=+e}function dr(){return"#"+mr(this.r)+mr(this.g)+mr(this.b)}function vr(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===n?")":", "+n+")")}function mr(n){return((n=Math.max(0,Math.min(255,Math.round(n)||0)))<16?"0":"")+n.toString(16)}function yr(n,t,r,e){return e<=0?n=t=r=NaN:r<=0||r>=1?n=t=NaN:t<=0&&(n=NaN),new Mr(n,t,r,e)}function br(n){if(n instanceof Mr)return new Mr(n.h,n.s,n.l,n.opacity);if(n instanceof Wt||(n=fr(n)),!n)return new Mr;if(n instanceof Mr)return n;var t=(n=n.rgb()).r/255,r=n.g/255,e=n.b/255,i=Math.min(t,r,e),o=Math.max(t,r,e),u=NaN,a=o-i,l=(o+i)/2;return a?(u=t===o?(r-e)/a+6*(r0&&l<1?0:u,new Mr(u,a,l,n.opacity)}function Mr(n,t,r,e){this.h=+n,this.s=+t,this.l=+r,this.opacity=+e}function wr(n,t,r){return 255*(n<60?t+(r-t)*n/60:n<180?r:n<240?t+(r-t)*(240-n)/60:t)}function xr(n){return function(){return n}}function Er(n){return 1==(n=+n)?Nr:function(t,r){return r-t?function(n,t,r){return n=Math.pow(n,r),t=Math.pow(t,r)-n,r=1/r,function(e){return Math.pow(n+e*t,r)}}(t,r,n):xr(isNaN(t)?r:t)}}function Nr(n,t){var r=t-n;return r?function(n,t){return function(r){return n+r*t}}(n,r):xr(isNaN(n)?t:n)}Zt(Wt,fr,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:lr,formatHex:lr,formatHsl:function(){return br(this).formatHsl()},formatRgb:cr,toString:cr}),Zt(gr,pr,Kt(Wt,{brighter:function(n){return n=null==n?1/.7:Math.pow(1/.7,n),new gr(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new gr(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:dr,formatHex:dr,formatRgb:vr,toString:vr})),Zt(Mr,(function(n,t,r,e){return 1===arguments.length?br(n):new Mr(n,t,r,null==e?1:e)}),Kt(Wt,{brighter:function(n){return n=null==n?1/.7:Math.pow(1/.7,n),new Mr(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new Mr(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+360*(this.h<0),t=isNaN(n)||isNaN(this.s)?0:this.s,r=this.l,e=r+(r<.5?r:1-r)*t,i=2*r-e;return new gr(wr(n>=240?n-240:n+120,i,e),wr(n,i,e),wr(n<120?n+240:n-120,i,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===n?")":", "+n+")")}}));var Sr=function n(t){var r=Er(t);function e(n,t){var e=r((n=pr(n)).r,(t=pr(t)).r),i=r(n.g,t.g),o=r(n.b,t.b),u=Nr(n.opacity,t.opacity);return function(t){return n.r=e(t),n.g=i(t),n.b=o(t),n.opacity=u(t),n+""}}return e.gamma=n,e}(1);function kr(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,i=t.slice();return function(o){for(r=0;ro&&(i=t.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(r=r[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:Ar(r,e)})),o=Rr.lastIndex;return ot&&(r=n,n=t,t=r),c=function(r){return Math.max(n,Math.min(t,r))}),e=l>2?Tr:Ir,i=o=null,s}function s(t){return isNaN(t=+t)?r:(i||(i=e(u.map(n),a,l)))(n(c(t)))}return s.invert=function(r){return c(t((o||(o=e(a,u.map(n),Ar)))(r)))},s.domain=function(n){return arguments.length?(u=Array.from(n,Cr),f()):u.slice()},s.range=function(n){return arguments.length?(a=Array.from(n),f()):a.slice()},s.rangeRound=function(n){return a=Array.from(n),l=Fr,f()},s.clamp=function(n){return arguments.length?(c=!!n||Lr,f()):c!==Lr},s.interpolate=function(n){return arguments.length?(l=n,f()):l},s.unknown=function(n){return arguments.length?(r=n,s):r},function(r,e){return n=r,t=e,f()}}function Dr(n,t){if((r=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var r,e=n.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+n.slice(r+1)]}function Br(n){return(n=Dr(Math.abs(n)))?n[1]:NaN}var Ur,Vr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xr(n){if(!(t=Vr.exec(n)))throw new Error("invalid format: "+n);var t;return new Zr({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Zr(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function Kr(n,t){var r=Dr(n,t);if(!r)return n+"";var e=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+e:e.length>i+1?e.slice(0,i+1)+"."+e.slice(i+1):e+new Array(i-e.length+2).join("0")}Xr.prototype=Zr.prototype,Zr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Wr={"%":function(n,t){return(100*n).toFixed(t)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function(n){return Math.round(n).toString(10)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},g:function(n,t){return n.toPrecision(t)},o:function(n){return Math.round(n).toString(8)},p:function(n,t){return Kr(100*n,t)},r:Kr,s:function(n,t){var r=Dr(n,t);if(!r)return n+"";var e=r[0],i=r[1],o=i-(Ur=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+Dr(n,Math.max(0,t+o-1))[0]},X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}};function Yr(n){return n}var Jr,Qr,ne,te=Array.prototype.map,re=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"];function ee(n){var t,r,e=void 0===n.grouping||void 0===n.thousands?Yr:(t=te.call(n.grouping,Number),r=n.thousands+"",function(n,e){for(var i=n.length,o=[],u=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>e));)a=t[u=(u+1)%t.length];return o.reverse().join(r)}),i=void 0===n.currency?"":n.currency[0]+"",o=void 0===n.currency?"":n.currency[1]+"",u=void 0===n.decimal?".":n.decimal+"",a=void 0===n.numerals?Yr:function(n){return function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}}(te.call(n.numerals,String)),l=void 0===n.percent?"%":n.percent+"",c=void 0===n.minus?"-":n.minus+"",f=void 0===n.nan?"NaN":n.nan+"";function s(n){var t=(n=Xr(n)).fill,r=n.align,s=n.sign,h=n.symbol,p=n.zero,g=n.width,d=n.comma,v=n.precision,m=n.trim,y=n.type;"n"===y?(d=!0,y="g"):Wr[y]||(void 0===v&&(v=12),m=!0,y="g"),(p||"0"===t&&"="===r)&&(p=!0,t="0",r="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",M="$"===h?o:/[%p]/.test(y)?l:"",w=Wr[y],x=/[defgprs%]/.test(y);function E(n){var i,o,l,h=b,E=M;if("c"===y)E=w(n)+E,n="";else{var N=(n=+n)<0;if(n=isNaN(n)?f:w(Math.abs(n),v),m&&(n=function(n){n:for(var t,r=n.length,e=1,i=-1;e0){if(!+n[e])break n;i=0}}return i>0?n.slice(0,i)+n.slice(t+1):n}(n)),N&&0==+n&&(N=!1),h=(N?"("===s?s:c:"-"===s||"("===s?"":s)+h,E=("s"===y?re[8+Ur/3]:"")+E+(N&&"("===s?")":""),x)for(i=-1,o=n.length;++i(l=n.charCodeAt(i))||l>57){E=(46===l?u+n.slice(i+1):n.slice(i))+E,n=n.slice(0,i);break}}d&&!p&&(n=e(n,1/0));var S=h.length+n.length+E.length,k=S>1)+h+n+E+k.slice(S);break;default:n=k+h+n+E}return a(n)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),E.toString=function(){return n+""},E}return{format:s,formatPrefix:function(n,t){var r=s(((n=Xr(n)).type="f",n)),e=3*Math.max(-8,Math.min(8,Math.floor(Br(t)/3))),i=Math.pow(10,-e),o=re[8+e/3];return function(n){return r(i*n)+o}}}}function ie(n,t,r,e){var i,o=function(n,t,r){var e=Math.abs(t-n)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),o=e/i;return o>=En?i*=10:o>=Nn?i*=5:o>=Sn&&(i*=2),t0)return[n];if((e=t0)for(n=Math.ceil(n/u),t=Math.floor(t/u),o=new Array(i=Math.ceil(t-n+1));++a0?e=kn(a=Math.floor(a/e)*e,l=Math.ceil(l/e)*e,r):e<0&&(e=kn(a=Math.ceil(a*e)/e,l=Math.floor(l*e)/e,r)),e>0?(i[o]=Math.floor(a/e)*e,i[u]=Math.ceil(l/e)*e,t(i)):e<0&&(i[o]=Math.ceil(a*e)/e,i[u]=Math.floor(l*e)/e,t(i)),n},n}function ue(){var n=Gr()(Lr,Lr);return n.copy=function(){return t=n,ue().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},Xt.apply(n,arguments),oe(n)}function ae(n){return n}function le(n,t){var r=t.id,e=t.bbox,i=null==t.properties?{}:t.properties,o=function(n,t){var r=function(n){if(null==n)return ae;var t,r,e=n.scale[0],i=n.scale[1],o=n.translate[0],u=n.translate[1];return function(n,a){a||(t=r=0);var l=2,c=n.length,f=new Array(c);for(f[0]=(t+=n[0])*e+o,f[1]=(r+=n[1])*i+u;l{};let o=Vt().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7]).rotate([4.4,.8]).center([0,55.4]).parallels([50,60]).scale(3800).translate([he/2,1.8*pe/2]),u=function(n,t){var r,e,i=4.5;function o(n){return n&&("function"==typeof i&&e.pointRadius(+i.apply(this,arguments)),Y(n,r(e))),e.result()}return o.area=function(n){return Y(n,r(Dn)),Dn.result()},o.measure=function(n){return Y(n,r(At)),At.result()},o.bounds=function(n){return Y(n,r(Jn)),Jn.result()},o.centroid=function(n){return Y(n,r(ht)),ht.result()},o.projection=function(t){return arguments.length?(r=null==t?(n=null,Cn):(n=t).stream,o):n},o.context=function(n){return arguments.length?(e=null==n?(t=null,new Rt):new xt(t=n),"function"!=typeof i&&e.pointRadius(i),o):t},o.pointRadius=function(n){return arguments.length?(i="function"==typeof n?n:(e.pointRadius(+n),+n),o):i},o.projection(n).context(t)}().projection(o);return h((async function(){const n=await fetch("https://gist.githubusercontent.com/rveciana/27272a581e975835aaa321ddf816d726/raw/c40062a328843322208b8e98c2104dc8f6ad5301/uk-counties.json"),t=await n.json(),o=(u=t,"GeometryCollection"===(a=t.objects.UK).type?{type:"FeatureCollection",features:a.geometries.map((function(n){return le(u,n)}))}:le(u,a));var u,a;const l={...o,features:o.features.filter(n=>"Scotland"===n.properties.NAME_1)},c=function(n,t){var r,e,i,o=n.length,u=-1;if(null==t){for(;++u=r)for(e=i=r;++ur&&(e=r),i=r)for(e=i=r;++ur&&(e=r),in.properties.NAME_2.length);r(1,i=ue().domain(c).range(["#feedde","#fd8d3c"])),r(0,e=l.features)})),[e,i,u]}return new class extends S{constructor(n){super(),N(this,n,ge,se,o,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map