UNPKG

vue-datamaps

Version:

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END -->

1 lines 6.34 MB
(function(h2,h3){typeof exports=="object"&&typeof module<"u"?h3(exports):typeof define=="function"&&define.amd?define(["exports"],h3):(h2=typeof globalThis<"u"?globalThis:h2||self,h3(h2.VueDatamaps={}))})(this,function(h2){"use strict";var h3="4.2.2";function P2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function e5(e){return e.length===1&&(e=kr(e)),{left:function(t,r,o,n){for(o==null&&(o=0),n==null&&(n=t.length);o<n;){var a=o+n>>>1;e(t[a],r)<0?o=a+1:n=a}return o},right:function(t,r,o,n){for(o==null&&(o=0),n==null&&(n=t.length);o<n;){var a=o+n>>>1;e(t[a],r)>0?n=a:o=a+1}return o}}}function kr(e){return function(t,r){return P2(e(t),r)}}var L7=e5(P2),M2=L7.right,Kr=L7.left;function Ir(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function o2(e){return e===null?NaN:+e}function E7(e,t){var r=e.length,o=0,n,a,i=0,s=-1,p=0;if(t==null)for(;++s<r;)isNaN(n=o2(e[s]))||(a=n-o,o+=a/++p,i+=a*(n-o));else for(;++s<r;)isNaN(n=o2(t(e[s],s,e)))||(a=n-o,o+=a/++p,i+=a*(n-o));if(p>1)return i/(p-1)}function k7(e,t){var r=E7(e,t);return r&&Math.sqrt(r)}function K7(e,t){var r=-1,o=e.length,n,a,i;if(t==null){for(;++r<o;)if((a=e[r])!=null&&a>=a){n=i=a;break}for(;++r<o;)(a=e[r])!=null&&(n>a&&(n=a),i<a&&(i=a))}else{for(;++r<o;)if((a=t(e[r],r,e))!=null&&a>=a){n=i=a;break}for(;++r<o;)(a=t(e[r],r,e))!=null&&(n>a&&(n=a),i<a&&(i=a))}return[n,i]}var I7=Array.prototype,Dr=I7.slice,xr=I7.map;function c4(e){return function(){return e}}function Or(e){return e}function I1(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var o=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++o<n;)a[o]=e+o*r;return a}var Hr=Math.sqrt(50),Ur=Math.sqrt(10),Vr=Math.sqrt(2);function u4(e,t,r){var o=S2(e,t,r);return I1(Math.ceil(e/o)*o,Math.floor(t/o)*o+o/2,o)}function S2(e,t,r){var o=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),a=o/n;return a>=Hr?n*=10:a>=Ur?n*=5:a>=Vr&&(n*=2),t<e?-n:n}function D7(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function zr(){var e=Or,t=K7,r=D7;function o(n){var a,i=n.length,s,p=new Array(i);for(a=0;a<i;++a)p[a]=e(n[a],a,n);var l=t(p),y=l[0],u=l[1],c=r(p,y,u);Array.isArray(c)||(c=u4(y,u,c));for(var g=c.length;c[0]<=y;)c.shift(),--g;for(;c[g-1]>=u;)c.pop(),--g;var d=new Array(g+1),m;for(a=0;a<=g;++a)m=d[a]=[],m.x0=a>0?c[a-1]:y,m.x1=a<g?c[a]:u;for(a=0;a<i;++a)s=p[a],y<=s&&s<=u&&d[M2(c,s,0,g)].push(n[a]);return d}return o.value=function(n){return arguments.length?(e=typeof n=="function"?n:c4(n),o):e},o.domain=function(n){return arguments.length?(t=typeof n=="function"?n:c4([n[0],n[1]]),o):t},o.thresholds=function(n){return arguments.length?(r=typeof n=="function"?n:Array.isArray(n)?c4(Dr.call(n)):c4(n),o):r},o}function P3(e,t,r){if(r==null&&(r=o2),!!(o=e.length)){if((t=+t)<=0||o<2)return+r(e[0],0,e);if(t>=1)return+r(e[o-1],o-1,e);var o,n=(o-1)*t,a=Math.floor(n),i=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return i+(s-i)*(n-a)}}function Fr(e,t,r){return e=xr.call(e,o2).sort(P2),Math.ceil((r-t)/(2*(P3(e,.75)-P3(e,.25))*Math.pow(e.length,-1/3)))}function Wr(e,t,r){return Math.ceil((r-t)/(3.5*k7(e)*Math.pow(e.length,-1/3)))}function jr(e,t){var r=-1,o=e.length,n,a;if(t==null){for(;++r<o;)if((a=e[r])!=null&&a>=a){n=a;break}for(;++r<o;)(a=e[r])!=null&&a>n&&(n=a)}else{for(;++r<o;)if((a=t(e[r],r,e))!=null&&a>=a){n=a;break}for(;++r<o;)(a=t(e[r],r,e))!=null&&a>n&&(n=a)}return n}function Zr(e,t){var r=0,o=e.length,n,a=-1,i=o;if(t==null)for(;++a<o;)isNaN(n=o2(e[a]))?--i:r+=n;else for(;++a<o;)isNaN(n=o2(t(e[a],a,e)))?--i:r+=n;if(i)return r/i}function Jr(e,t){var r=[],o=e.length,n,a=-1;if(t==null)for(;++a<o;)isNaN(n=o2(e[a]))||r.push(n);else for(;++a<o;)isNaN(n=o2(t(e[a],a,e)))||r.push(n);return P3(r.sort(P2),.5)}function t5(e){for(var t=e.length,r,o=-1,n=0,a,i;++o<t;)n+=e[o].length;for(a=new Array(n);--t>=0;)for(i=e[t],r=i.length;--r>=0;)a[--n]=i[r];return a}function x7(e,t){var r=-1,o=e.length,n,a;if(t==null){for(;++r<o;)if((a=e[r])!=null&&a>=a){n=a;break}for(;++r<o;)(a=e[r])!=null&&n>a&&(n=a)}else{for(;++r<o;)if((a=t(e[r],r,e))!=null&&a>=a){n=a;break}for(;++r<o;)(a=t(e[r],r,e))!=null&&n>a&&(n=a)}return n}function Yr(e){for(var t=0,r=e.length-1,o=e[0],n=new Array(r<0?0:r);t<r;)n[t]=[o,o=e[++t]];return n}function $r(e,t){for(var r=t.length,o=new Array(r);r--;)o[r]=e[t[r]];return o}function Xr(e,t){if(!!(o=e.length)){var r=0,o,n=0,a,i=e[n];for(t||(t=P2);++r<o;)(t(a=e[r],i)<0||t(i,i)!==0)&&(i=a,n=r);if(t(i,i)===0)return n}}function qr(e,t,r){for(var o=(r==null?e.length:r)-(t=t==null?0:+t),n,a;o;)a=Math.random()*o--|0,n=e[o+t],e[o+t]=e[a+t],e[a+t]=n;return e}function Qr(e,t){var r=0,o=e.length,n,a=-1;if(t==null)for(;++a<o;)(n=+e[a])&&(r+=n);else for(;++a<o;)(n=+t(e[a],a,e))&&(r+=n);return r}function O7(e){if(!(a=e.length))return[];for(var t=-1,r=x7(e,eo),o=new Array(r);++t<r;)for(var n=-1,a,i=o[t]=new Array(a);++n<a;)i[n]=e[n][t];return o}function eo(e){return e.length}function to(){return O7(arguments)}var R1="$";function g4(){}g4.prototype=U1.prototype={constructor:g4,has:function(e){return R1+e in this},get:function(e){return this[R1+e]},set:function(e,t){return this[R1+e]=t,this},remove:function(e){var t=R1+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===R1&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===R1&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===R1&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===R1&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===R1&&++e;return e},empty:function(){for(var e in this)if(e[0]===R1)return!1;return!0},each:function(e){for(var t in this)t[0]===R1&&e(this[t],t.slice(1),this)}};function U1(e,t){var r=new g4;if(e instanceof g4)e.each(function(s,p){r.set(p,s)});else if(Array.isArray(e)){var o=-1,n=e.length,a;if(t==null)for(;++o<n;)r.set(o,e[o]);else for(;++o<n;)r.set(t(a=e[o],o,e),a)}else if(e)for(var i in e)r.set(i,e[i]);return r}function ro(){var e=[],t=[],r,o,n;function a(s,p,l,y){if(p>=e.length)return o!=null?o(s):r!=null?s.sort(r):s;for(var u=-1,c=s.length,g=e[p++],d,m,f=U1(),h,M=l();++u<c;)(h=f.get(d=g(m=s[u])+""))?h.push(m):f.set(d,[m]);return f.each(function(P,b){y(M,b,a(P,p,l,y))}),M}function i(s,p){if(++p>e.length)return s;var l,y=t[p-1];return o!=null&&p>=e.length?l=s.entries():(l=[],s.each(function(u,c){l.push({key:c,values:i(u,p)})})),y!=null?l.sort(function(u,c){return y(u.key,c.key)}):l}return n={object:function(s){return a(s,0,oo,no)},map:function(s){return a(s,0,H7,U7)},entries:function(s){return i(a(s,0,H7,U7),0)},key:function(s){return e.push(s),n},sortKeys:function(s){return t[e.length-1]=s,n},sortValues:function(s){return r=s,n},rollup:function(s){return o=s,n}}}function oo(){return{}}function no(e,t,r){e[t]=r}function H7(){return U1()}function U7(e,t,r){e.set(t,r)}function d4(){}var v2=U1.prototype;d4.prototype=V7.prototype={constructor:d4,has:v2.has,add:function(e){return e+="",this[R1+e]=e,this},remove:v2.remove,clear:v2.clear,values:v2.keys,size:v2.size,empty:v2.empty,each:v2.each};function V7(e,t){var r=new d4;if(e instanceof d4)e.each(function(a){r.add(a)});else if(e){var o=-1,n=e.length;if(t==null)for(;++o<n;)r.add(e[o]);else for(;++o<n;)r.add(t(e[o],o,e))}return r}function ao(e){var t=[];for(var r in e)t.push(r);return t}function io(e){var t=[];for(var r in e)t.push(e[r]);return t}function so(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}function po(e,t){return e=e==null?0:+e,t=t==null?1:+t,arguments.length===1?(t=e,e=0):t-=e,function(){return Math.random()*t+e}}function z7(e,t){var r,o;return e=e==null?0:+e,t=t==null?1:+t,function(){var n;if(r!=null)n=r,r=null;else do r=Math.random()*2-1,n=Math.random()*2-1,o=r*r+n*n;while(!o||o>1);return e+t*n*Math.sqrt(-2*Math.log(o)/o)}}function lo(){var e=z7.apply(this,arguments);return function(){return Math.exp(e())}}function F7(e){return function(){for(var t=0,r=0;r<e;++r)t+=Math.random();return t}}function yo(e){var t=F7(e);return function(){return t()/e}}function co(e){return function(){return-Math.log(1-Math.random())/e}}function uo(e){return+e}function go(e){return e*e}function mo(e){return e*(2-e)}function W7(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function fo(e){return e*e*e}function ho(e){return--e*e*e+1}function r5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var o5=3,Po=function e(t){t=+t;function r(o){return Math.pow(o,t)}return r.exponent=e,r}(o5),Mo=function e(t){t=+t;function r(o){return 1-Math.pow(1-o,t)}return r.exponent=e,r}(o5),j7=function e(t){t=+t;function r(o){return((o*=2)<=1?Math.pow(o,t):2-Math.pow(2-o,t))/2}return r.exponent=e,r}(o5),Z7=Math.PI,J7=Z7/2;function So(e){return 1-Math.cos(e*J7)}function vo(e){return Math.sin(e*J7)}function Y7(e){return(1-Math.cos(Z7*e))/2}function To(e){return Math.pow(2,10*e-10)}function bo(e){return 1-Math.pow(2,-10*e)}function $7(e){return((e*=2)<=1?Math.pow(2,10*e-10):2-Math.pow(2,10-10*e))/2}function Co(e){return 1-Math.sqrt(1-e*e)}function Ao(e){return Math.sqrt(1- --e*e)}function X7(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var n5=4/11,Bo=6/11,No=8/11,Go=3/4,_o=9/11,wo=10/11,Ro=15/16,Lo=21/22,Eo=63/64,m4=1/n5/n5;function ko(e){return 1-M3(1-e)}function M3(e){return(e=+e)<n5?m4*e*e:e<No?m4*(e-=Bo)*e+Go:e<wo?m4*(e-=_o)*e+Ro:m4*(e-=Lo)*e+Eo}function Ko(e){return((e*=2)<=1?1-M3(1-e):M3(e-1)+1)/2}var a5=1.70158,Io=function e(t){t=+t;function r(o){return o*o*((t+1)*o-t)}return r.overshoot=e,r}(a5),Do=function e(t){t=+t;function r(o){return--o*o*((t+1)*o+t)+1}return r.overshoot=e,r}(a5),q7=function e(t){t=+t;function r(o){return((o*=2)<1?o*o*((t+1)*o-t):(o-=2)*o*((t+1)*o+t)+2)/2}return r.overshoot=e,r}(a5),V2=2*Math.PI,i5=1,s5=.3,xo=function e(t,r){var o=Math.asin(1/(t=Math.max(1,t)))*(r/=V2);function n(a){return t*Math.pow(2,10*--a)*Math.sin((o-a)/r)}return n.amplitude=function(a){return e(a,r*V2)},n.period=function(a){return e(t,a)},n}(i5,s5),Q7=function e(t,r){var o=Math.asin(1/(t=Math.max(1,t)))*(r/=V2);function n(a){return 1-t*Math.pow(2,-10*(a=+a))*Math.sin((a+o)/r)}return n.amplitude=function(a){return e(a,r*V2)},n.period=function(a){return e(t,a)},n}(i5,s5),Oo=function e(t,r){var o=Math.asin(1/(t=Math.max(1,t)))*(r/=V2);function n(a){return((a=a*2-1)<0?t*Math.pow(2,10*a)*Math.sin((o-a)/r):2-t*Math.pow(2,-10*a)*Math.sin((o+a)/r))/2}return n.amplitude=function(a){return e(a,r*V2)},n.period=function(a){return e(t,a)},n}(i5,s5);function Ho(e){for(var t=-1,r=e.length,o,n=e[r-1],a=0;++t<r;)o=n,n=e[t],a+=o[1]*n[0]-o[0]*n[1];return a/2}function Uo(e){for(var t=-1,r=e.length,o=0,n=0,a,i=e[r-1],s,p=0;++t<r;)a=i,i=e[t],p+=s=a[0]*i[1]-i[0]*a[1],o+=(a[0]+i[0])*s,n+=(a[1]+i[1])*s;return p*=3,[o/p,n/p]}function Vo(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function zo(e,t){return e[0]-t[0]||e[1]-t[1]}function e8(e){for(var t=e.length,r=[0,1],o=2,n=2;n<t;++n){for(;o>1&&Vo(e[r[o-2]],e[r[o-1]],e[n])<=0;)--o;r[o++]=n}return r.slice(0,o)}function Fo(e){if((r=e.length)<3)return null;var t,r,o=new Array(r),n=new Array(r);for(t=0;t<r;++t)o[t]=[+e[t][0],+e[t][1],t];for(o.sort(zo),t=0;t<r;++t)n[t]=[o[t][0],-o[t][1]];var a=e8(o),i=e8(n),s=i[0]===a[0],p=i[i.length-1]===a[a.length-1],l=[];for(t=a.length-1;t>=0;--t)l.push(e[o[a[t]][2]]);for(t=+s;t<i.length-p;++t)l.push(e[o[i[t]][2]]);return l}function Wo(e,t){for(var r=e.length,o=e[r-1],n=t[0],a=t[1],i=o[0],s=o[1],p,l,y=!1,u=0;u<r;++u)o=e[u],p=o[0],l=o[1],l>a!=s>a&&n<(i-p)*(a-l)/(s-l)+p&&(y=!y),i=p,s=l;return y}function jo(e){for(var t=-1,r=e.length,o=e[r-1],n,a,i=o[0],s=o[1],p=0;++t<r;)n=i,a=s,o=e[t],i=o[0],s=o[1],n-=i,a-=s,p+=Math.sqrt(n*n+a*a);return p}var p5=Math.PI,l5=2*p5,z2=1e-6,Zo=l5-z2;function y5(){this._x0=this._y0=this._x1=this._y1=null,this._=[]}function T2(){return new y5}y5.prototype=T2.prototype={constructor:y5,moveTo:function(e,t){this._.push("M",this._x0=this._x1=+e,",",this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._.push("Z"))},lineTo:function(e,t){this._.push("L",this._x1=+e,",",this._y1=+t)},quadraticCurveTo:function(e,t,r,o){this._.push("Q",+e,",",+t,",",this._x1=+r,",",this._y1=+o)},bezierCurveTo:function(e,t,r,o,n,a){this._.push("C",+e,",",+t,",",+r,",",+o,",",this._x1=+n,",",this._y1=+a)},arcTo:function(e,t,r,o,n){e=+e,t=+t,r=+r,o=+o,n=+n;var a=this._x1,i=this._y1,s=r-e,p=o-t,l=a-e,y=i-t,u=l*l+y*y;if(n<0)throw new Error("negative radius: "+n);if(this._x1===null)this._.push("M",this._x1=e,",",this._y1=t);else if(u>z2)if(!(Math.abs(y*s-p*l)>z2)||!n)this._.push("L",this._x1=e,",",this._y1=t);else{var c=r-a,g=o-i,d=s*s+p*p,m=c*c+g*g,f=Math.sqrt(d),h=Math.sqrt(u),M=n*Math.tan((p5-Math.acos((d+u-m)/(2*f*h)))/2),P=M/h,b=M/f;Math.abs(P-1)>z2&&this._.push("L",e+P*l,",",t+P*y),this._.push("A",n,",",n,",0,0,",+(y*c>l*g),",",this._x1=e+b*s,",",this._y1=t+b*p)}},arc:function(e,t,r,o,n,a){e=+e,t=+t,r=+r;var i=r*Math.cos(o),s=r*Math.sin(o),p=e+i,l=t+s,y=1^a,u=a?o-n:n-o;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._.push("M",p,",",l):(Math.abs(this._x1-p)>z2||Math.abs(this._y1-l)>z2)&&this._.push("L",p,",",l),r&&(u>Zo?this._.push("A",r,",",r,",0,1,",y,",",e-i,",",t-s,"A",r,",",r,",0,1,",y,",",this._x1=p,",",this._y1=l):(u<0&&(u=u%l5+l5),this._.push("A",r,",",r,",0,",+(u>=p5),",",y,",",this._x1=e+r*Math.cos(n),",",this._y1=t+r*Math.sin(n))))},rect:function(e,t,r,o){this._.push("M",this._x0=this._x1=+e,",",this._y0=this._y1=+t,"h",+r,"v",+o,"h",-r,"Z")},toString:function(){return this._.join("")}};function Jo(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return t8(this.cover(t,r),t,r,e)}function t8(e,t,r,o){if(isNaN(t)||isNaN(r))return e;var n,a=e._root,i={data:o},s=e._x0,p=e._y0,l=e._x1,y=e._y1,u,c,g,d,m,f,h,M;if(!a)return e._root=i,e;for(;a.length;)if((m=t>=(u=(s+l)/2))?s=u:l=u,(f=r>=(c=(p+y)/2))?p=c:y=c,n=a,!(a=a[h=f<<1|m]))return n[h]=i,e;if(g=+e._x.call(null,a.data),d=+e._y.call(null,a.data),t===g&&r===d)return i.next=a,n?n[h]=i:e._root=i,e;do n=n?n[h]=new Array(4):e._root=new Array(4),(m=t>=(u=(s+l)/2))?s=u:l=u,(f=r>=(c=(p+y)/2))?p=c:y=c;while((h=f<<1|m)===(M=(d>=c)<<1|g>=u));return n[M]=a,n[h]=i,e}function Yo(e){var t,r,o=e.length,n,a,i=new Array(o),s=new Array(o),p=1/0,l=1/0,y=-1/0,u=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(a=+this._y.call(null,t))||(i[r]=n,s[r]=a,n<p&&(p=n),n>y&&(y=n),a<l&&(l=a),a>u&&(u=a));for(y<p&&(p=this._x0,y=this._x1),u<l&&(l=this._y0,u=this._y1),this.cover(p,l).cover(y,u),r=0;r<o;++r)t8(this,i[r],s[r],e[r]);return this}function $o(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,o=this._y0,n=this._x1,a=this._y1;if(isNaN(r))n=(r=Math.floor(e))+1,a=(o=Math.floor(t))+1;else if(r>e||e>n||o>t||t>a){var i=n-r,s=this._root,p,l;switch(l=(t<(o+a)/2)<<1|e<(r+n)/2){case 0:{do p=new Array(4),p[l]=s,s=p;while(i*=2,n=r+i,a=o+i,e>n||t>a);break}case 1:{do p=new Array(4),p[l]=s,s=p;while(i*=2,r=n-i,a=o+i,r>e||t>a);break}case 2:{do p=new Array(4),p[l]=s,s=p;while(i*=2,n=r+i,o=a-i,e>n||o>t);break}case 3:{do p=new Array(4),p[l]=s,s=p;while(i*=2,r=n-i,o=a-i,r>e||o>t);break}}this._root&&this._root.length&&(this._root=s)}else return this;return this._x0=r,this._y0=o,this._x1=n,this._y1=a,this}function Xo(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function qo(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function S1(e,t,r,o,n){this.node=e,this.x0=t,this.y0=r,this.x1=o,this.y1=n}function Qo(e,t,r){var o,n=this._x0,a=this._y0,i,s,p,l,y=this._x1,u=this._y1,c=[],g=this._root,d,m;for(g&&c.push(new S1(g,n,a,y,u)),r==null?r=1/0:(n=e-r,a=t-r,y=e+r,u=t+r,r*=r);d=c.pop();)if(!(!(g=d.node)||(i=d.x0)>y||(s=d.y0)>u||(p=d.x1)<n||(l=d.y1)<a))if(g.length){var f=(i+p)/2,h=(s+l)/2;c.push(new S1(g[3],f,h,p,l),new S1(g[2],i,h,f,l),new S1(g[1],f,s,p,h),new S1(g[0],i,s,f,h)),(m=(t>=h)<<1|e>=f)&&(d=c[c.length-1],c[c.length-1]=c[c.length-1-m],c[c.length-1-m]=d)}else{var M=e-+this._x.call(null,g.data),P=t-+this._y.call(null,g.data),b=M*M+P*P;if(b<r){var v=Math.sqrt(r=b);n=e-v,a=t-v,y=e+v,u=t+v,o=g.data}}return o}function en(e){if(isNaN(y=+this._x.call(null,e))||isNaN(u=+this._y.call(null,e)))return this;var t,r=this._root,o,n,a,i=this._x0,s=this._y0,p=this._x1,l=this._y1,y,u,c,g,d,m,f,h;if(!r)return this;if(r.length)for(;;){if((d=y>=(c=(i+p)/2))?i=c:p=c,(m=u>=(g=(s+l)/2))?s=g:l=g,t=r,!(r=r[f=m<<1|d]))return this;if(!r.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(o=t,h=f)}for(;r.data!==e;)if(n=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,n?(a?n.next=a:delete n.next,this):t?(a?t[f]=a:delete t[f],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(o?o[h]=r:this._root=r),this):(this._root=a,this)}function tn(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function rn(){return this._root}function on(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function nn(e){var t=[],r,o=this._root,n,a,i,s,p;for(o&&t.push(new S1(o,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(o=r.node,a=r.x0,i=r.y0,s=r.x1,p=r.y1)&&o.length){var l=(a+s)/2,y=(i+p)/2;(n=o[3])&&t.push(new S1(n,l,y,s,p)),(n=o[2])&&t.push(new S1(n,a,y,l,p)),(n=o[1])&&t.push(new S1(n,l,i,s,y)),(n=o[0])&&t.push(new S1(n,a,i,l,y))}return this}function an(e){var t=[],r=[],o;for(this._root&&t.push(new S1(this._root,this._x0,this._y0,this._x1,this._y1));o=t.pop();){var n=o.node;if(n.length){var a,i=o.x0,s=o.y0,p=o.x1,l=o.y1,y=(i+p)/2,u=(s+l)/2;(a=n[0])&&t.push(new S1(a,i,s,y,u)),(a=n[1])&&t.push(new S1(a,y,s,p,u)),(a=n[2])&&t.push(new S1(a,i,u,y,l)),(a=n[3])&&t.push(new S1(a,y,u,p,l))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.x1,o.y1);return this}function sn(e){return e[0]}function pn(e){return arguments.length?(this._x=e,this):this._x}function ln(e){return e[1]}function yn(e){return arguments.length?(this._y=e,this):this._y}function f4(e,t,r){var o=new c5(t==null?sn:t,r==null?ln:r,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function c5(e,t,r,o,n,a){this._x=e,this._y=t,this._x0=r,this._y0=o,this._x1=n,this._y1=a,this._root=void 0}function r8(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var v1=f4.prototype=c5.prototype;v1.copy=function(){var e=new c5(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,o;if(!t)return e;if(!t.length)return e._root=r8(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var n=0;n<4;++n)(o=t.source[n])&&(o.length?r.push({source:o,target:t.target[n]=new Array(4)}):t.target[n]=r8(o));return e},v1.add=Jo,v1.addAll=Yo,v1.cover=$o,v1.data=Xo,v1.extent=qo,v1.find=Qo,v1.remove=en,v1.removeAll=tn,v1.root=rn,v1.size=on,v1.visit=nn,v1.visitAfter=an,v1.x=pn,v1.y=yn;var cn=[].slice,un={};function u5(e){if(!(e>=1))throw new Error;this._size=e,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}u5.prototype=n8.prototype={constructor:u5,defer:function(e){if(typeof e!="function"||this._call)throw new Error;if(this._error!=null)return this;var t=cn.call(arguments,1);return t.push(e),++this._waiting,this._tasks.push(t),o8(this),this},abort:function(){return this._error==null&&g5(this,new Error("abort")),this},await:function(e){if(typeof e!="function"||this._call)throw new Error;return this._call=function(t,r){e.apply(null,[t].concat(r))},h4(this),this},awaitAll:function(e){if(typeof e!="function"||this._call)throw new Error;return this._call=e,h4(this),this}};function o8(e){if(!e._start)try{gn(e)}catch(t){e._tasks[e._ended+e._active-1]&&g5(e,t)}}function gn(e){for(;e._start=e._waiting&&e._active<e._size;){var t=e._ended+e._active,r=e._tasks[t],o=r.length-1,n=r[o];r[o]=dn(e,t),--e._waiting,++e._active,r=n.apply(null,r),e._tasks[t]&&(e._tasks[t]=r||un)}}function dn(e,t){return function(r,o){!e._tasks[t]||(--e._active,++e._ended,e._tasks[t]=null,e._error==null&&(r!=null?g5(e,r):(e._data[t]=o,e._waiting?o8(e):h4(e))))}}function g5(e,t){var r=e._tasks.length,o;for(e._error=t,e._data=void 0,e._waiting=NaN;--r>=0;)if((o=e._tasks[r])&&(e._tasks[r]=null,o.abort))try{o.abort()}catch{}e._active=NaN,h4(e)}function h4(e){!e._active&&e._call&&e._call(e._error,e._data)}function n8(e){return new u5(arguments.length?+e:1/0)}function W(e){return function(){return e}}var u1=1e-12,b2=Math.PI,P4=b2/2,n2=2*b2;function mn(e){return e.innerRadius}function fn(e){return e.outerRadius}function hn(e){return e.startAngle}function Pn(e){return e.endAngle}function Mn(e){return e&&e.padAngle}function a8(e){return e>=1?P4:e<=-1?-P4:Math.asin(e)}function Sn(e,t,r,o,n,a,i,s){var p=r-e,l=o-t,y=i-n,u=s-a,c=(y*(t-a)-u*(e-n))/(u*p-y*l);return[e+c*p,t+c*l]}function M4(e,t,r,o,n,a,i){var s=e-r,p=t-o,l=(i?a:-a)/Math.sqrt(s*s+p*p),y=l*p,u=-l*s,c=e+y,g=t+u,d=r+y,m=o+u,f=(c+d)/2,h=(g+m)/2,M=d-c,P=m-g,b=M*M+P*P,v=n-a,T=c*m-d*g,C=(P<0?-1:1)*Math.sqrt(Math.max(0,v*v*b-T*T)),B=(T*P-M*C)/b,N=(-T*M-P*C)/b,R=(T*P+M*C)/b,_=(-T*M+P*C)/b,G=B-f,S=N-h,A=R-f,w=_-h;return G*G+S*S>A*A+w*w&&(B=R,N=_),{cx:B,cy:N,x01:-y,y01:-u,x11:B*(n/v-1),y11:N*(n/v-1)}}function vn(){var e=mn,t=fn,r=W(0),o=null,n=hn,a=Pn,i=Mn,s=null;function p(){var l,y,u=+e.apply(this,arguments),c=+t.apply(this,arguments),g=n.apply(this,arguments)-P4,d=a.apply(this,arguments)-P4,m=Math.abs(d-g),f=d>g;if(s||(s=l=T2()),c<u&&(y=c,c=u,u=y),!(c>u1))s.moveTo(0,0);else if(m>n2-u1)s.moveTo(c*Math.cos(g),c*Math.sin(g)),s.arc(0,0,c,g,d,!f),u>u1&&(s.moveTo(u*Math.cos(d),u*Math.sin(d)),s.arc(0,0,u,d,g,f));else{var h=g,M=d,P=g,b=d,v=m,T=m,C=i.apply(this,arguments)/2,B=C>u1&&(o?+o.apply(this,arguments):Math.sqrt(u*u+c*c)),N=Math.min(Math.abs(c-u)/2,+r.apply(this,arguments)),R=N,_=N,G,S;if(B>u1){var A=a8(B/u*Math.sin(C)),w=a8(B/c*Math.sin(C));(v-=A*2)>u1?(A*=f?1:-1,P+=A,b-=A):(v=0,P=b=(g+d)/2),(T-=w*2)>u1?(w*=f?1:-1,h+=w,M-=w):(T=0,h=M=(g+d)/2)}var L=c*Math.cos(h),E=c*Math.sin(h),V=u*Math.cos(b),F=u*Math.sin(b);if(N>u1){var q=c*Math.cos(M),J=c*Math.sin(M),Q=u*Math.cos(P),Y=u*Math.sin(P);if(m<b2){var e1=v>u1?Sn(L,E,Q,Y,q,J,V,F):[V,F],$=L-e1[0],C1=E-e1[1],k=q-e1[0],U=J-e1[1],z=1/Math.sin(Math.acos(($*k+C1*U)/(Math.sqrt($*$+C1*C1)*Math.sqrt(k*k+U*U)))/2),K=Math.sqrt(e1[0]*e1[0]+e1[1]*e1[1]);R=Math.min(N,(u-K)/(z-1)),_=Math.min(N,(c-K)/(z+1))}}T>u1?_>u1?(G=M4(Q,Y,L,E,c,_,f),S=M4(q,J,V,F,c,_,f),s.moveTo(G.cx+G.x01,G.cy+G.y01),_<N?s.arc(G.cx,G.cy,_,Math.atan2(G.y01,G.x01),Math.atan2(S.y01,S.x01),!f):(s.arc(G.cx,G.cy,_,Math.atan2(G.y01,G.x01),Math.atan2(G.y11,G.x11),!f),s.arc(0,0,c,Math.atan2(G.cy+G.y11,G.cx+G.x11),Math.atan2(S.cy+S.y11,S.cx+S.x11),!f),s.arc(S.cx,S.cy,_,Math.atan2(S.y11,S.x11),Math.atan2(S.y01,S.x01),!f))):(s.moveTo(L,E),s.arc(0,0,c,h,M,!f)):s.moveTo(L,E),!(u>u1)||!(v>u1)?s.lineTo(V,F):R>u1?(G=M4(V,F,q,J,u,-R,f),S=M4(L,E,Q,Y,u,-R,f),s.lineTo(G.cx+G.x01,G.cy+G.y01),R<N?s.arc(G.cx,G.cy,R,Math.atan2(G.y01,G.x01),Math.atan2(S.y01,S.x01),!f):(s.arc(G.cx,G.cy,R,Math.atan2(G.y01,G.x01),Math.atan2(G.y11,G.x11),!f),s.arc(0,0,u,Math.atan2(G.cy+G.y11,G.cx+G.x11),Math.atan2(S.cy+S.y11,S.cx+S.x11),f),s.arc(S.cx,S.cy,R,Math.atan2(S.y11,S.x11),Math.atan2(S.y01,S.x01),!f))):s.arc(0,0,u,b,P,f)}if(s.closePath(),l)return s=null,l+""||null}return p.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,y=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-b2/2;return[Math.cos(y)*l,Math.sin(y)*l]},p.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:W(+l),p):e},p.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:W(+l),p):t},p.cornerRadius=function(l){return arguments.length?(r=typeof l=="function"?l:W(+l),p):r},p.padRadius=function(l){return arguments.length?(o=l==null?null:typeof l=="function"?l:W(+l),p):o},p.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:W(+l),p):n},p.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:W(+l),p):a},p.padAngle=function(l){return arguments.length?(i=typeof l=="function"?l:W(+l),p):i},p.context=function(l){return arguments.length?(s=l==null?null:l,p):s},p}function i8(e){this._context=e}i8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function S4(e){return new i8(e)}function s8(e){return e[0]}function p8(e){return e[1]}function d5(){var e=s8,t=p8,r=W(!0),o=null,n=S4,a=null;function i(s){var p,l=s.length,y,u=!1,c;for(o==null&&(a=n(c=T2())),p=0;p<=l;++p)!(p<l&&r(y=s[p],p,s))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+e(y,p,s),+t(y,p,s));if(c)return a=null,c+""||null}return i.x=function(s){return arguments.length?(e=typeof s=="function"?s:W(+s),i):e},i.y=function(s){return arguments.length?(t=typeof s=="function"?s:W(+s),i):t},i.defined=function(s){return arguments.length?(r=typeof s=="function"?s:W(!!s),i):r},i.curve=function(s){return arguments.length?(n=s,o!=null&&(a=n(o)),i):n},i.context=function(s){return arguments.length?(s==null?o=a=null:a=n(o=s),i):o},i}function l8(){var e=s8,t=null,r=W(0),o=p8,n=W(!0),a=null,i=S4,s=null;function p(y){var u,c,g,d=y.length,m,f=!1,h,M=new Array(d),P=new Array(d);for(a==null&&(s=i(h=T2())),u=0;u<=d;++u){if(!(u<d&&n(m=y[u],u,y))===f)if(f=!f)c=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=u-1;g>=c;--g)s.point(M[g],P[g]);s.lineEnd(),s.areaEnd()}f&&(M[u]=+e(m,u,y),P[u]=+r(m,u,y),s.point(t?+t(m,u,y):M[u],o?+o(m,u,y):P[u]))}if(h)return s=null,h+""||null}function l(){return d5().defined(n).curve(i).context(a)}return p.x=function(y){return arguments.length?(e=typeof y=="function"?y:W(+y),t=null,p):e},p.x0=function(y){return arguments.length?(e=typeof y=="function"?y:W(+y),p):e},p.x1=function(y){return arguments.length?(t=y==null?null:typeof y=="function"?y:W(+y),p):t},p.y=function(y){return arguments.length?(r=typeof y=="function"?y:W(+y),o=null,p):r},p.y0=function(y){return arguments.length?(r=typeof y=="function"?y:W(+y),p):r},p.y1=function(y){return arguments.length?(o=y==null?null:typeof y=="function"?y:W(+y),p):o},p.lineX0=p.lineY0=function(){return l().x(e).y(r)},p.lineY1=function(){return l().x(e).y(o)},p.lineX1=function(){return l().x(t).y(r)},p.defined=function(y){return arguments.length?(n=typeof y=="function"?y:W(!!y),p):n},p.curve=function(y){return arguments.length?(i=y,a!=null&&(s=i(a)),p):i},p.context=function(y){return arguments.length?(y==null?a=s=null:s=i(a=y),p):a},p}function Tn(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function bn(e){return e}function Cn(){var e=bn,t=Tn,r=null,o=W(0),n=W(n2),a=W(0);function i(s){var p,l=s.length,y,u,c=0,g=new Array(l),d=new Array(l),m=+o.apply(this,arguments),f=Math.min(n2,Math.max(-n2,n.apply(this,arguments)-m)),h,M=Math.min(Math.abs(f)/l,a.apply(this,arguments)),P=M*(f<0?-1:1),b;for(p=0;p<l;++p)(b=d[g[p]=p]=+e(s[p],p,s))>0&&(c+=b);for(t!=null?g.sort(function(v,T){return t(d[v],d[T])}):r!=null&&g.sort(function(v,T){return r(s[v],s[T])}),p=0,u=c?(f-l*P)/c:0;p<l;++p,m=h)y=g[p],b=d[y],h=m+(b>0?b*u:0)+P,d[y]={data:s[y],index:p,value:b,startAngle:m,endAngle:h,padAngle:M};return d}return i.value=function(s){return arguments.length?(e=typeof s=="function"?s:W(+s),i):e},i.sortValues=function(s){return arguments.length?(t=s,r=null,i):t},i.sort=function(s){return arguments.length?(r=s,t=null,i):r},i.startAngle=function(s){return arguments.length?(o=typeof s=="function"?s:W(+s),i):o},i.endAngle=function(s){return arguments.length?(n=typeof s=="function"?s:W(+s),i):n},i.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:W(+s),i):a},i}var y8=m5(S4);function c8(e){this._curve=e}c8.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function m5(e){function t(r){return new c8(e(r))}return t._curve=e,t}function S3(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(m5(r)):t()._curve},e}function An(){return S3(d5().curve(y8))}function Bn(){var e=l8().curve(y8),t=e.curve,r=e.lineX0,o=e.lineX1,n=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return S3(r())},delete e.lineX0,e.lineEndAngle=function(){return S3(o())},delete e.lineX1,e.lineInnerRadius=function(){return S3(n())},delete e.lineY0,e.lineOuterRadius=function(){return S3(a())},delete e.lineY1,e.curve=function(i){return arguments.length?t(m5(i)):t()._curve},e}const f5={draw:function(e,t){var r=Math.sqrt(t/b2);e.moveTo(r,0),e.arc(0,0,r,0,n2)}},u8={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var g8=Math.sqrt(1/3),Nn=g8*2;const d8={draw:function(e,t){var r=Math.sqrt(t/Nn),o=r*g8;e.moveTo(0,-r),e.lineTo(o,0),e.lineTo(0,r),e.lineTo(-o,0),e.closePath()}};var Gn=.8908130915292852,m8=Math.sin(b2/10)/Math.sin(7*b2/10),_n=Math.sin(n2/10)*m8,wn=-Math.cos(n2/10)*m8;const f8={draw:function(e,t){var r=Math.sqrt(t*Gn),o=_n*r,n=wn*r;e.moveTo(0,-r),e.lineTo(o,n);for(var a=1;a<5;++a){var i=n2*a/5,s=Math.cos(i),p=Math.sin(i);e.lineTo(p*r,-s*r),e.lineTo(s*o-p*n,p*o+s*n)}e.closePath()}},h8={draw:function(e,t){var r=Math.sqrt(t),o=-r/2;e.rect(o,o,r,r)}};var h5=Math.sqrt(3);const P8={draw:function(e,t){var r=-Math.sqrt(t/(h5*3));e.moveTo(0,r*2),e.lineTo(-h5*r,-r),e.lineTo(h5*r,-r),e.closePath()}};var L1=-.5,E1=Math.sqrt(3)/2,P5=1/Math.sqrt(12),Rn=(P5/2+1)*3;const M8={draw:function(e,t){var r=Math.sqrt(t/Rn),o=r/2,n=r*P5,a=o,i=r*P5+r,s=-a,p=i;e.moveTo(o,n),e.lineTo(a,i),e.lineTo(s,p),e.lineTo(L1*o-E1*n,E1*o+L1*n),e.lineTo(L1*a-E1*i,E1*a+L1*i),e.lineTo(L1*s-E1*p,E1*s+L1*p),e.lineTo(L1*o+E1*n,L1*n-E1*o),e.lineTo(L1*a+E1*i,L1*i-E1*a),e.lineTo(L1*s+E1*p,L1*p-E1*s),e.closePath()}};var Ln=[f5,u8,d8,h8,f8,P8,M8];function En(){var e=W(f5),t=W(64),r=null;function o(){var n;if(r||(r=n=T2()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),n)return r=null,n+""||null}return o.type=function(n){return arguments.length?(e=typeof n=="function"?n:W(n),o):e},o.size=function(n){return arguments.length?(t=typeof n=="function"?n:W(+n),o):t},o.context=function(n){return arguments.length?(r=n==null?null:n,o):r},o}function a2(){}function v4(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function T4(e){this._context=e}T4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:v4(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:v4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kn(e){return new T4(e)}function S8(e){this._context=e}S8.prototype={areaStart:a2,areaEnd:a2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:v4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Kn(e){return new S8(e)}function v8(e){this._context=e}v8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,o=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,o):this._context.moveTo(r,o);break;case 3:this._point=4;default:v4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function In(e){return new v8(e)}function T8(e,t){this._basis=new T4(e),this._beta=t}T8.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var o=e[0],n=t[0],a=e[r]-o,i=t[r]-n,s=-1,p;++s<=r;)p=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(o+p*a),this._beta*t[s]+(1-this._beta)*(n+p*i));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Dn=function e(t){function r(o){return t===1?new T4(o):new T8(o,t)}return r.beta=function(o){return e(+o)},r}(.85);function b4(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function M5(e,t){this._context=e,this._k=(1-t)/6}M5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:b4(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:b4(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xn=function e(t){function r(o){return new M5(o,t)}return r.tension=function(o){return e(+o)},r}(0);function S5(e,t){this._context=e,this._k=(1-t)/6}S5.prototype={areaStart:a2,areaEnd:a2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b4(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const On=function e(t){function r(o){return new S5(o,t)}return r.tension=function(o){return e(+o)},r}(0);function v5(e,t){this._context=e,this._k=(1-t)/6}v5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b4(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hn=function e(t){function r(o){return new v5(o,t)}return r.tension=function(o){return e(+o)},r}(0);function T5(e,t,r){var o=e._x1,n=e._y1,a=e._x2,i=e._y2;if(e._l01_a>u1){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,p=3*e._l01_a*(e._l01_a+e._l12_a);o=(o*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/p,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/p}if(e._l23_a>u1){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,y=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/y,i=(i*l+e._y1*e._l23_2a-r*e._l12_2a)/y}e._context.bezierCurveTo(o,n,a,i,e._x2,e._y2)}function b8(e,t){this._context=e,this._alpha=t}b8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this,this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,o=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:T5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Un=function e(t){function r(o){return t?new b8(o,t):new M5(o,0)}return r.alpha=function(o){return e(+o)},r}(.5);function C8(e,t){this._context=e,this._alpha=t}C8.prototype={areaStart:a2,areaEnd:a2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,o=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:T5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vn=function e(t){function r(o){return t?new C8(o,t):new S5(o,0)}return r.alpha=function(o){return e(+o)},r}(.5);function A8(e,t){this._context=e,this._alpha=t}A8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,o=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:T5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zn=function e(t){function r(o){return t?new A8(o,t):new v5(o,0)}return r.alpha=function(o){return e(+o)},r}(.5);function B8(e){this._context=e}B8.prototype={areaStart:a2,areaEnd:a2,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Fn(e){return new B8(e)}function N8(e){return e<0?-1:1}function G8(e,t,r){var o=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(o||n<0&&-0),i=(r-e._y1)/(n||o<0&&-0),s=(a*n+i*o)/(o+n);return(N8(a)+N8(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(s))||0}function _8(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function b5(e,t,r){var o=e._x0,n=e._y0,a=e._x1,i=e._y1,s=(a-o)/3;e._context.bezierCurveTo(o+s,n+s*t,a-s,i-s*r,a,i)}function C4(e){this._context=e}C4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:b5(this,this._t0,_8(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,b5(this,_8(this,r=G8(this,e,t)),r);break;default:b5(this,this._t0,r=G8(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function w8(e){this._context=new R8(e)}(w8.prototype=Object.create(C4.prototype)).point=function(e,t){C4.prototype.point.call(this,t,e)};function R8(e){this._context=e}R8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,o,n,a){this._context.bezierCurveTo(t,e,o,r,a,n)}};function Wn(e){return new C4(e)}function jn(e){return new w8(e)}function L8(e){this._context=e}L8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var o=E8(e),n=E8(t),a=0,i=1;i<r;++a,++i)this._context.bezierCurveTo(o[0][a],n[0][a],o[1][a],n[1][a],e[i],t[i]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function E8(e){var t,r=e.length-1,o,n=new Array(r),a=new Array(r),i=new Array(r);for(n[0]=0,a[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,i[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)o=n[t]/a[t-1],a[t]-=o,i[t]-=o*i[t-1];for(n[r-1]=i[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(i[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Zn(e){return new L8(e)}function A4(e,t){this._context=e,this._t=t}A4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Jn(e){return new A4(e,.5)}function Yn(e){return new A4(e,0)}function $n(e){return new A4(e,1)}var k8=Array.prototype.slice;function F2(e,t){if((a=e.length)>1)for(var r=1,o,n=e[t[0]],a,i=n.length;r<a;++r){o=n,n=e[t[r]];for(var s=0;s<i;++s)n[s][1]+=n[s][0]=isNaN(o[s][1])?o[s][0]:o[s][1]}}function W2(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Xn(e,t){return e[t]}function qn(){var e=W([]),t=W2,r=F2,o=Xn;function n(a){var i=e.apply(this,arguments),s,p=a.length,l=i.length,y=new Array(l),u;for(s=0;s<l;++s){for(var c=i[s],g=y[s]=new Array(p),d=0,m;d<p;++d)g[d]=m=[0,+o(a[d],c,d,a)],m.data=a[d];g.key=c}for(s=0,u=t(y);s<l;++s)y[u[s]].index=s;return r(y,u),y}return n.keys=function(a){return arguments.length?(e=typeof a=="function"?a:W(k8.call(a)),n):e},n.value=function(a){return arguments.length?(o=typeof a=="function"?a:W(+a),n):o},n.order=function(a){return arguments.length?(t=a==null?W2:typeof a=="function"?a:W(k8.call(a)),n):t},n.offset=function(a){return arguments.length?(r=a==null?F2:a,n):r},n}function Qn(e,t){if((o=e.length)>0){for(var r,o,n=0,a=e[0].length,i;n<a;++n){for(i=r=0;r<o;++r)i+=e[r][n][1]||0;if(i)for(r=0;r<o;++r)e[r][n][1]/=i}F2(e,t)}}function ea(e,t){if((n=e.length)>0){for(var r=0,o=e[t[0]],n,a=o.length;r<a;++r){for(var i=0,s=0;i<n;++i)s+=e[i][r][1]||0;o[r][1]+=o[r][0]=-s/2}F2(e,t)}}function ta(e,t){if(!(!((i=e.length)>0)||!((a=(n=e[t[0]]).length)>0))){for(var r=0,o=1,n,a,i;o<a;++o){for(var s=0,p=0,l=0;s<i;++s){for(var y=e[t[s]],u=y[o][1]||0,c=y[o-1][1]||0,g=(u-c)/2,d=0;d<s;++d){var m=e[t[d]],f=m[o][1]||0,h=m[o-1][1]||0;g+=f-h}p+=u,l+=g*u}n[o-1][1]+=n[o-1][0]=r,p&&(r-=l/p)}n[o-1][1]+=n[o-1][0]=r,F2(e,t)}}function K8(e){var t=e.map(I8);return W2(e).sort(function(r,o){return t[r]-t[o]})}function I8(e){for(var t=0,r=-1,o=e.length,n;++r<o;)(n=+e[r][1])&&(t+=n);return t}function ra(e){return K8(e).reverse()}function oa(e){var t=e.length,r,o,n=e.map(I8),a=W2(e).sort(function(y,u){return n[u]-n[y]}),i=0,s=0,p=[],l=[];for(r=0;r<t;++r)o=a[r],i<s?(i+=n[o],p.push(o)):(s+=n[o],l.push(o));return l.reverse().concat(p)}function na(e){return W2(e).reverse()}function j2(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function v3(e,t){var r=Object.create(e.prototype);for(var o in t)r[o]=t[o];return r}function i2(){}var C2=.7,Z2=1/C2,aa=/^#([0-9a-f]{3})$/,ia=/^#([0-9a-f]{6})$/,sa=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,pa=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,la=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,ya=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,ca=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,ua=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,D8={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skybl