!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):b((a=a||self).d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){return ab?1:a>=b?0:NaN}function c(a){var c;return 1===a.length&&(c=a,a=function(a,d){return b(c(a),d)}),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a,b){return[a,b]}function e(a){return null===a?NaN:+a}function f(a,b){var c,d,f=a.length,g=0,h=-1,i=0,j=0;if(null==b)for(;++h1)return j/(g-1)}function g(a,b){var c=f(a,b);return c?Math.sqrt(c):c}function h(a,b){var c,d,e,f=a.length,g=-1;if(null==b){for(;++g=c)for(d=e=c;++gc&&(d=c),e=c)for(d=e=c;++gc&&(d=c),e0)return[a];if((d=b0)for(a=Math.ceil(a/g),b=Math.floor(b/g),f=new Array(e=Math.ceil(b-a+1));++h=0?(f>=Qk?10:f>=Rk?5:f>=Sk?2:1)*Math.pow(10,e):-Math.pow(10,-e)/(f>=Qk?10:f>=Rk?5:f>=Sk?2:1)}function n(a,b,c){var d=Math.abs(b-a)/Math.max(0,c),e=Math.pow(10,Math.floor(Math.log(d)/Math.LN10)),f=d/e;return f>=Qk?e*=10:f>=Rk?e*=5:f>=Sk&&(e*=2),b=1)return+c(a[d-1],d-1,a);var d,f=(d-1)*b,g=Math.floor(f),h=+c(a[g],g,a);return h+(+c(a[g+1],g+1,a)-h)*(f-g)}}function q(a,b){var c,d,e=a.length,f=-1;if(null==b){for(;++f=c)for(d=c;++fd&&(d=c)}else for(;++f=c)for(d=c;++fd&&(d=c);return d}function r(a){for(var b,c,d,e=a.length,f=-1,g=0;++f=0;)for(b=(d=a[e]).length;--b>=0;)c[--g]=d[b];return c}function s(a,b){var c,d,e=a.length,f=-1;if(null==b){for(;++f=c)for(d=c;++fc&&(d=c)}else for(;++f=c)for(d=c;++fc&&(d=c);return d}function t(a){if(!(e=a.length))return[];for(var b=-1,c=s(a,u),d=new Array(c);++b=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!b.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}function D(a,b){for(var c,d=0,e=a.length;d=0&&"xmlns"!==(b=a.slice(0,c))&&(a=a.slice(c+1)),_k.hasOwnProperty(b)?{space:_k[b],local:a}:a}function G(a){var b=F(a);return(b.local?function(a){return function(){return this.ownerDocument.createElementNS(a.space,a.local)}}:function(a){return function(){var b=this.ownerDocument,c=this.namespaceURI;return c===$k&&b.documentElement.namespaceURI===$k?b.createElement(a):b.createElementNS(c,a)}})(b)}function H(){}function I(a){return null==a?H:function(){return this.querySelector(a)}}function J(){return[]}function K(a){return null==a?J:function(){return this.querySelectorAll(a)}}function L(a){return function(){return this.matches(a)}}function M(a){return new Array(a.length)}function N(a,b){this.ownerDocument=a.ownerDocument,this.namespaceURI=a.namespaceURI,this._next=null,this._parent=a,this.__data__=b}function O(a,b,c,d,e,f){for(var g,h=0,i=b.length,j=f.length;hb?1:a>=b?0:NaN}function R(a){return a.ownerDocument&&a.ownerDocument.defaultView||a.document&&a||a.defaultView}function S(a,b){return a.style.getPropertyValue(b)||R(a).getComputedStyle(a,null).getPropertyValue(b)}function T(a){return a.trim().split(/^|\s+/)}function U(a){return a.classList||new V(a)}function V(a){this._node=a,this._names=T(a.getAttribute("class")||"")}function W(a,b){for(var c=U(a),d=-1,e=b.length;++d>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1):8===c?new Na(b>>24&255,b>>16&255,b>>8&255,(255&b)/255):4===c?new Na(b>>12&15|b>>8&240,b>>8&15|b>>4&240,b>>4&15|240&b,((15&b)<<4|15&b)/255):null):(b=il.exec(a))?new Na(b[1],b[2],b[3],1):(b=jl.exec(a))?new Na(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=kl.exec(a))?Ka(b[1],b[2],b[3],b[4]):(b=ll.exec(a))?Ka(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=ml.exec(a))?Ra(b[1],b[2]/100,b[3]/100,1):(b=nl.exec(a))?Ra(b[1],b[2]/100,b[3]/100,b[4]):ol.hasOwnProperty(a)?Ja(ol[a]):"transparent"===a?new Na(NaN,NaN,NaN,0):null}function Ja(a){return new Na(a>>16&255,a>>8&255,255&a,1)}function Ka(a,b,c,d){return d<=0&&(a=b=c=NaN),new Na(a,b,c,d)}function La(a){return a instanceof Fa||(a=Ia(a)),a?new Na((a=a.rgb()).r,a.g,a.b,a.opacity):new Na}function Ma(a,b,c,d){return 1===arguments.length?La(a):new Na(a,b,c,null==d?1:d)}function Na(a,b,c,d){this.r=+a,this.g=+b,this.b=+c,this.opacity=+d}function Oa(){return"#"+Qa(this.r)+Qa(this.g)+Qa(this.b)}function Pa(){var a=this.opacity;return(1===(a=isNaN(a)?1:Math.max(0,Math.min(1,a)))?"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===a?")":", "+a+")")}function Qa(a){return((a=Math.max(0,Math.min(255,Math.round(a)||0)))<16?"0":"")+a.toString(16)}function Ra(a,b,c,d){return d<=0?a=b=c=NaN:c<=0||c>=1?a=b=NaN:b<=0&&(a=NaN),new Ua(a,b,c,d)}function Sa(a){if(a instanceof Ua)return new Ua(a.h,a.s,a.l,a.opacity);if(a instanceof Fa||(a=Ia(a)),!a)return new Ua;if(a instanceof Ua)return a;var b=(a=a.rgb()).r/255,c=a.g/255,d=a.b/255,e=Math.min(b,c,d),f=Math.max(b,c,d),g=NaN,h=f-e,i=(f+e)/2;return h?(g=b===f?(c-d)/h+6*(c0&&i<1?0:g,new Ua(g,h,i,a.opacity)}function Ta(a,b,c,d){return 1===arguments.length?Sa(a):new Ua(a,b,c,null==d?1:d)}function Ua(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}function Va(a,b,c){return 255*(a<60?b+(c-b)*a/60:a<180?c:a<240?b+(c-b)*(240-a)/60:b)}function Wa(a){if(a instanceof Ya)return new Ya(a.l,a.a,a.b,a.opacity);if(a instanceof db)return eb(a);a instanceof Na||(a=La(a));var b,c,d=ab(a.r),e=ab(a.g),f=ab(a.b),g=Za((.2225045*d+.7168786*e+.0606169*f)/sl);return d===e&&e===f?b=c=g:(b=Za((.4360747*d+.3850649*e+.1430804*f)/rl),c=Za((.0139322*d+.0971045*e+.7141733*f)/tl)),new Ya(116*g-16,500*(b-g),200*(g-c),a.opacity)}function Xa(a,b,c,d){return 1===arguments.length?Wa(a):new Ya(a,b,c,null==d?1:d)}function Ya(a,b,c,d){this.l=+a,this.a=+b,this.b=+c,this.opacity=+d}function Za(a){return a>xl?Math.pow(a,1/3):a/wl+ul}function $a(a){return a>vl?a*a*a:wl*(a-ul)}function _a(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function ab(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function bb(a){if(a instanceof db)return new db(a.h,a.c,a.l,a.opacity);if(a instanceof Ya||(a=Wa(a)),0===a.a&&0===a.b)return new db(NaN,0=1?(c=1,b-1):Math.floor(c*b),e=a[d],f=a[d+1],g=d>0?a[d-1]:2*e-f,h=d180||c<-180?c-360*Math.round(c/360):c):kb(isNaN(a)?b:a)}function nb(a){return 1==(a=+a)?ob:function(b,c){return c-b?function(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}(b,c,a):kb(isNaN(b)?c:b)}}function ob(a,b){var c=b-a;return c?lb(a,c):kb(isNaN(a)?b:a)}function pb(a){return function(b){var c,d,e=b.length,f=new Array(e),g=new Array(e),h=new Array(e);for(c=0;cf&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:sb(c,d)})),f=Ql.lastIndex;return f180?b+=360:b-a>180&&(a+=360),f.push({i:c.push(e(c)+"rotate(",null,d)-2,x:sb(a,b)})):b&&c.push(e(c)+"rotate("+b+d)}(f.rotate,g.rotate,h,i),function(a,b,c,f){a!==b?f.push({i:c.push(e(c)+"skewX(",null,d)-2,x:sb(a,b)}):b&&c.push(e(c)+"skewX("+b+d)}(f.skewX,g.skewX,h,i),function(a,b,c,d,f,g){if(a!==c||b!==d){var h=f.push(e(f)+"scale(",null,",",null,")");g.push({i:h-4,x:sb(a,c)},{i:h-2,x:sb(b,d)})}else 1===c&&1===d||f.push(e(f)+"scale("+c+","+d+")")}(f.scaleX,f.scaleY,g.scaleX,g.scaleY,h,i),f=g=null,function(a){for(var b,c=-1,d=i.length;++c=0&&b._call.call(null,a),b=b._next;--dm}function Jb(){im=(hm=km.now())+jm,dm=em=0;try{Ib()}finally{dm=0,function(){for(var a,b,c=Kl,d=1/0;c;)c._call?(d>c._time&&(d=c._time),a=c,c=c._next):(b=c._next,c._next=null,c=a?a._next=b:Kl=b);Ll=a,Lb(d)}(),im=0}}function Kb(){var a=km.now(),b=a-hm;b>gm&&(jm-=b,hm=a)}function Lb(a){dm||(em&&(em=clearTimeout(em)),a-im>24?(a<1/0&&(em=setTimeout(Jb,a-km.now()-jm)),fm&&(fm=clearInterval(fm))):(fm||(hm=km.now(),fm=setInterval(Kb,gm)),dm=1,lm(Jb)))}function Mb(a,b,c){var d=new Gb;return b=null==b?0:+b,d.restart(function(c){d.stop(),a(c+b)},b,c),d}function Nb(a,b,c,d,e,f){var g=a.__transition;if(g){if(c in g)return}else a.__transition={};!function(a,b,c){function d(i){var j,k,l,m;if(c.state!==pm)return f();for(j in h)if((m=h[j]).name===c.name){if(m.state===rm)return Mb(d);m.state===sm?(m.state=um,m.timer.stop(),m.on.call("interrupt",a,a.__data__,m.index,m.group),delete h[j]):+jom)throw new Error("too late; already scheduled");return c}function Pb(a,b){var c=Qb(a,b);if(c.state>rm)throw new Error("too late; already running");return c}function Qb(a,b){var c=a.__transition;if(!c||!(c=c[b]))throw new Error("transition not found");return c}function Rb(a,b){var c,d,e,f=a.__transition,g=!0;if(f){for(e in b=null==b?null:b+"",f)(c=f[e]).name===b?(d=c.state>qm&&c.stateMath.abs(a[1]-N[1])?u=!0:t=!0),N=a,s=!0,gc(),f()}function f(){var a;switch(I=N[0]-M[0],J=N[1]-M[1],y){case Xm:case Wm:z&&(I=Math.max(E-h,Math.min(G-n,I)),i=h+I,p=n+I),A&&(J=Math.max(F-j,Math.min(H-q,J)),l=j+J,r=q+J);break;case Ym:z<0?(I=Math.max(E-h,Math.min(G-h,I)),i=h+I,p=n):z>0&&(I=Math.max(E-n,Math.min(G-n,I)),i=h,p=n+I),A<0?(J=Math.max(F-j,Math.min(H-j,J)),l=j+J,r=q):A>0&&(J=Math.max(F-q,Math.min(H-q,J)),l=j,r=q+J);break;case Zm:z&&(i=Math.max(E,Math.min(G,h-I*z)),p=Math.max(E,Math.min(G,n+I*z))),A&&(l=Math.max(F,Math.min(H,j-J*A)),r=Math.max(F,Math.min(H,q+J*A)))}p0&&(h=i-I),A<0?q=r-J:A>0&&(j=l-J),y=Xm,Q.attr("cursor",bn.selection),f());break;default:return}gc()},!0).on("keyup.brush",function(){switch(a.event.keyCode){case 16:K&&(t=u=K=!1,f());break;case 18:y===Zm&&(z<0?n=p:z>0&&(h=i),A<0?q=r:A>0&&(j=l),y=Ym,f());break;case 32:y===Xm&&(a.event.altKey?(z&&(n=p-I*z,h=i+I*z),A&&(q=r-J*A,j=l+J*A),y=Zm):(z<0?n=p:z>0&&(h=i),A<0?q=r:A>0&&(j=l),y=Ym),Q.attr("cursor",bn[x]),f());break;default:return}gc()},!0),va(a.event.view)}fc(),Rb(w),d.call(w),O.start()}}function h(){e(this,arguments).moved()}function i(){e(this,arguments).ended()}function j(){var a=this.__brush||{selection:null};return a.extent=ic(l.apply(this,arguments)),a.dim=b,a}var k,l=lc,m=kc,n=mc,o=!0,p=A("start","brush","end"),q=6;return c.move=function(a,c){a.selection?a.on("start.brush",function(){e(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){e(this,arguments).end()}).tween("brush",function(){function a(a){g.selection=1===a&&null===j?null:k(a),d.call(f),h.brush()}var f=this,g=f.__brush,h=e(f,arguments),i=g.selection,j=b.input("function"==typeof c?c.apply(this,arguments):c,g.extent),k=vb(i,j);return null!==i&&null!==j?a:a(1)}):a.each(function(){var a=this,f=arguments,g=a.__brush,h=b.input("function"==typeof c?c.apply(a,f):c,g.extent),i=e(a,f).beforestart();Rb(a),g.selection=null===h?null:h,d.call(a),i.start().brush().end()})},c.clear=function(a){c.move(a,null)},f.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(a){ia(new ec(c,a,b.output(this.state.selection)),p.apply,p,[a,this.that,this.args])}},c.extent=function(a){return arguments.length?(l="function"==typeof a?a:dc(ic(a)),c):l},c.filter=function(a){return arguments.length?(m="function"==typeof a?a:dc(!!a),c):m},c.touchable=function(a){return arguments.length?(n="function"==typeof a?a:dc(!!a),c):n},c.handleSize=function(a){return arguments.length?(q=+a,c):q},c.keyModifiers=function(a){return arguments.length?(o=!!a, c):o},c.on=function(){var a=p.on.apply(p,arguments);return a===p?c:a},c}function pc(a){return function(b,c){return a(b.source.value+b.target.value,c.source.value+c.target.value)}}function qc(a){return function(){return a}}function rc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function sc(){return new rc}function tc(a){return a.source}function uc(a){return a.target}function vc(a){return a.radius}function wc(a){return a.startAngle}function xc(a){return a.endAngle}function yc(){}function zc(a,b){var c=new yc;if(a instanceof yc)a.each(function(a,b){c.set(b,a)});else if(Array.isArray(a)){var d,e=-1,f=a.length;if(null==b)for(;++ed!=n>d&&c<(m-j)*(d-k)/(n-k)+j&&(e=-e)}return e}function Kc(a,b,c){var d,e,f,g;return function(a,b,c){return(b[0]-a[0])*(c[1]-a[1])==(c[0]-a[0])*(b[1]-a[1])}(a,b,c)&&(e=a[d=+(a[0]===b[0])],f=c[d],g=b[d],e<=f&&f<=g||g<=f&&f<=e)}function Lc(){}function Mc(){function a(a){var c=g(a);if(Array.isArray(c))c=c.slice().sort(Gc);else{var d=h(a),e=d[0],f=d[1];c=n(e,f,c),c=k(Math.floor(e/c)*c,Math.floor(f/c)*c,c)}return c.map(function(c){return b(a,c)})}function b(a,b){var d=[],g=[];return function(a,b,d){function g(a){var b,e,f=[a[0][0]+h,a[0][1]+i],g=[a[1][0]+h,a[1][1]+i],j=c(f),k=c(g);(b=o[j])?(e=n[k])?(delete o[b.end],delete n[e.start],b===e?(b.ring.push(g),d(b.ring)):n[b.start]=o[e.end]={start:b.start,end:e.end,ring:b.ring.concat(e.ring)}):(delete o[b.end],b.ring.push(g),o[b.end=k]=b):(b=n[k])?(e=o[j])?(delete n[b.start],delete o[e.end],b===e?(b.ring.push(g),d(b.ring)):n[e.start]=o[b.end]={start:e.start,end:b.end,ring:e.ring.concat(b.ring)}):(delete n[b.start],b.ring.unshift(f),n[b.start=j]=b):n[j]=o[k]={start:j,end:k,ring:[f,g]}}var h,i,j,k,l,m,n=new Array,o=new Array;for(h=i=-1,k=a[0]>=b,tn[k<<1].forEach(g);++h=b,tn[j|k<<1].forEach(g);for(tn[k<<0].forEach(g);++i=b,l=a[i*e]>=b,tn[k<<1|l<<2].forEach(g);++h=b,m=l,l=a[i*e+h+1]>=b,tn[j|k<<1|l<<2|m<<3].forEach(g);tn[k|l<<3].forEach(g)}for(h=-1,l=a[i*e]>=b,tn[l<<2].forEach(g);++h=b,tn[l<<2|m<<3].forEach(g);tn[l<<3].forEach(g)}(a,b,function(c){i(c,a,b),function(a){for(var b=0,c=a.length,d=a[c-1][1]*a[0][0]-a[c-1][0]*a[0][1];++b0?d.push([c]):g.push(c)}),g.forEach(function(a){for(var b,c=0,e=d.length;c0&&g0&&h0&&d>0))throw new Error("invalid size");return e=c,f=d,a},a.thresholds=function(b){return arguments.length?(g="function"==typeof b?b:Hc(Array.isArray(b)?sn.call(b):b),a):g},a.smooth=function(b){return arguments.length?(i=b?d:Lc,a):i===d},a}function Nc(a,b,c){for(var d=a.width,e=a.height,f=1+(c<<1),g=0;g=c&&(h>=f&&(i-=a.data[h-f+g*d]),b.data[h-c+g*d]=i/Math.min(h+1,d-1+f-h,f))}function Oc(a,b,c){for(var d=a.width,e=a.height,f=1+(c<<1),g=0;g=c&&(h>=f&&(i-=a.data[g+(h-f)*d]),b.data[g+(h-c)*d]=i/Math.min(h+1,e-1+f-h,f))}function Pc(a){return a[0]}function Qc(a){return a[1]}function Rc(){return 1}function Sc(a){return new Function("d","return {"+a.map(function(a,b){return JSON.stringify(a)+": d["+b+'] || ""'}).join(",")+"}")}function Tc(a){var b=Object.create(null),c=[];return a.forEach(function(a){for(var d in a)d in b||c.push(b[d]=d)}),c}function Uc(a,b){var c=a+"",d=c.length;return d9999?"+"+Uc(a,6):Uc(a,4)}(a.getUTCFullYear())+"-"+Uc(a.getUTCMonth()+1,2)+"-"+Uc(a.getUTCDate(),2)+(e?"T"+Uc(b,2)+":"+Uc(c,2)+":"+Uc(d,2)+"."+Uc(e,3)+"Z":d?"T"+Uc(b,2)+":"+Uc(c,2)+":"+Uc(d,2)+"Z":c||b?"T"+Uc(b,2)+":"+Uc(c,2)+"Z":"")}function Wc(a){function b(a,b){function c(){if(j)return vn;if(k)return k=!1,un;var b,c,d=h;if(a.charCodeAt(d)===wn){for(;h++=f?j=!0:(c=a.charCodeAt(h++))===xn?k=!0:c===yn&&(k=!0,a.charCodeAt(h)===xn&&++h),a.slice(d+1,b-1).replace(/""/g,'"')}for(;h=(f=(p+r)/2))?p=f:r=f,(k=c>=(g=(q+s)/2))?q=g:s=g,e=n,!(n=n[l=k<<1|j]))return e[l]=o,a;if(h=+a._x.call(null,n.data),i=+a._y.call(null,n.data),b===h&&c===i)return o.next=n,e?e[l]=o:a._root=o,a;do e=e?e[l]=new Array(4):a._root=new Array(4),(j=b>=(f=(p+r)/2))?p=f:r=f,(k=c>=(g=(q+s)/2))?q=g:s=g;while((l=k<<1|j)==(m=(i>=g)<<1|h>=f));return e[m]=n,e[l]=o,a}function fd(a,b,c,d,e){this.node=a,this.x0=b,this.y0=c,this.x1=d,this.y1=e}function gd(a){return a[0]}function hd(a){return a[1]}function id(a,b,c){var d=new jd(null==b?gd:b,null==c?hd:c,NaN,NaN,NaN,NaN);return null==a?d:d.addAll(a)}function jd(a,b,c,d,e,f){this._x=a,this._y=b,this._x0=c,this._y0=d,this._x1=e,this._y1=f,this._root=void 0}function kd(a){for(var b={data:a.data},c=b;a=a.next;)c=c.next={data:a.data};return b}function ld(a){return a.x+a.vx}function md(a){return a.y+a.vy}function nd(a){return a.index}function od(a,b){var c=a.get(b);if(!c)throw new Error("missing: "+b);return c}function pd(a){return a.x}function qd(a){return a.y}function rd(a,b){if((c=(a=b?a.toExponential(b-1):a.toExponential()).indexOf("e"))<0)return null;var c,d=a.slice(0,c);return[d.length>1?d[0]+d.slice(2):d,+a.slice(c+1)]}function sd(a){return(a=rd(Math.abs(a)))?a[1]:NaN}function td(a){if(!(b=Zn.exec(a)))throw new Error("invalid format: "+a);var b;return new ud({fill:b[1],align:b[2],sign:b[3],symbol:b[4],zero:b[5],width:b[6],comma:b[7],precision:b[8]&&b[8].slice(1),trim:b[9],type:b[10]})}function ud(a){this.fill=void 0===a.fill?" ":a.fill+"",this.align=void 0===a.align?">":a.align+"",this.sign=void 0===a.sign?"-":a.sign+"",this.symbol=void 0===a.symbol?"":a.symbol+"",this.zero=!!a.zero,this.width=void 0===a.width?void 0:+a.width,this.comma=!!a.comma,this.precision=void 0===a.precision?void 0:+a.precision,this.trim=!!a.trim,this.type=void 0===a.type?"":a.type+""}function vd(a,b){var c=rd(a,b);if(!c)return a+"";var d=c[0],e=c[1];return e<0?"0."+new Array(-e).join("0")+d:d.length>e+1?d.slice(0,e+1)+"."+d.slice(e+1):d+new Array(e-d.length+2).join("0")}function wd(a){return a}function xd(a){function b(a){function b(a){var b,f,g,j=u,n=v;if("c"===t)n=w(a)+n,a="";else{var y=(a=+a)<0;if(a=isNaN(a)?l:w(Math.abs(a),r),s&&(a=function(a){a:for(var b,c=a.length,d=1,e=-1;d0){if(!+a[d])break a;e=0}}return e>0?a.slice(0,e)+a.slice(b+1):a}(a)),y&&0==+a&&(y=!1),j=(y?"("===m?m:k:"-"===m||"("===m?"":m)+j,n=("s"===t?bo[8+Wn/3]:"")+n+(y&&"("===m?")":""),x)for(b=-1,f=a.length;++b(g=a.charCodeAt(b))||g>57){n=(46===g?h+a.slice(b+1):a.slice(b))+n,a=a.slice(0,b);break}}q&&!o&&(a=e(a,1/0));var z=j.length+a.length+n.length,A=z>1)+j+a+n+A.slice(z);break;default:a=A+j+a+n}return i(a)}var c=(a=td(a)).fill,d=a.align,m=a.sign,n=a.symbol,o=a.zero,p=a.width,q=a.comma,r=a.precision,s=a.trim,t=a.type;"n"===t?(q=!0,t="g"):_n[t]||(void 0===r&&(r=12),s=!0,t="g"),(o||"0"===c&&"="===d)&&(o=!0,c="0",d="=");var u="$"===n?f:"#"===n&&/[boxX]/.test(t)?"0"+t.toLowerCase():"",v="$"===n?g:/[%p]/.test(t)?j:"",w=_n[t],x=/[defgprs%]/.test(t);return r=void 0===r?6:/[gprs]/.test(t)?Math.max(1,Math.min(21,r)):Math.max(0,Math.min(20,r)),b.toString=function(){return a+""},b}var c,d,e=void 0===a.grouping||void 0===a.thousands?wd:(c=ao.call(a.grouping,Number),d=a.thousands+"",function(a,b){for(var e=a.length,f=[],g=0,h=c[0],i=0;e>0&&h>0&&(i+h+1>b&&(h=Math.max(1,b-i)),f.push(a.substring(e-=h,e+h)),!((i+=h+1)>b));)h=c[g=(g+1)%c.length];return f.reverse().join(d)}),f=void 0===a.currency?"":a.currency[0]+"",g=void 0===a.currency?"":a.currency[1]+"",h=void 0===a.decimal?".":a.decimal+"",i=void 0===a.numerals?wd:function(a){return function(b){return b.replace(/[0-9]/g,function(b){return a[+b]})}}(ao.call(a.numerals,String)),j=void 0===a.percent?"%":a.percent+"",k=void 0===a.minus?"-":a.minus+"",l=void 0===a.nan?"NaN":a.nan+"";return{format:b,formatPrefix:function(a,c){var d=b(((a=td(a)).type="f",a)),e=3*Math.max(-8,Math.min(8,Math.floor(sd(c)/3))),f=Math.pow(10,-e),g=bo[8+e/3];return function(a){return d(f*a)+g}}}}function yd(b){return $n=xd(b),a.format=$n.format,a.formatPrefix=$n.formatPrefix,$n}function zd(a){return Math.max(0,-sd(Math.abs(a)))}function Ad(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(sd(b)/3)))-sd(Math.abs(a)))}function Bd(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,sd(b)-sd(a))+1}function Cd(){return new Dd}function Dd(){this.reset()}function Ed(a,b,c){var d=a.s=b+c,e=d-b,f=d-e;a.t=b-f+(c-e)}function Fd(a){return a>1?0:a<-1?Lo:Math.acos(a)}function Gd(a){return a>1?Mo:a<-1?-Mo:Math.asin(a)}function Hd(a){return(a=Zo(a/2))*a}function Id(){}function Jd(a,b){a&&cp.hasOwnProperty(a.type)&&cp[a.type](a,b)}function Kd(a,b,c){var d,e=-1,f=a.length-c;for(b.lineStart();++e=0?1:-1,e=d*c,f=Uo(b=(b*=Qo)/2+No),g=Zo(b),h=ho*g,i=go*f+h*Uo(e),j=h*d*Zo(e);dp.add(To(j,i)),fo=a,go=f,ho=g}function Rd(a){return[To(a[1],a[0]),Gd(a[2])]}function Sd(a){var b=a[0],c=a[1],d=Uo(c);return[d*Uo(b),d*Zo(b),Zo(c)]}function Td(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function Ud(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function Vd(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function Wd(a,b){return[a[0]*b,a[1]*b,a[2]*b]}function Xd(a){var b=_o(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=b,a[1]/=b,a[2]/=b}function Yd(a,b){qo.push(ro=[io=a,ko=a]),blo&&(lo=b)}function Zd(a,b){var c=Sd([a*Qo,b*Qo]);if(po){var d=Ud(po,c),e=Ud([d[1],-d[0],0],d);Xd(e),e=Rd(e);var f,g=a-mo,h=g>0?1:-1,i=e[0]*Po*h,j=Ro(g)>180;j^(h*molo&&(lo=f):j^(h*mo<(i=(i+360)%360-180)&&ilo&&(lo=b)),j?ade(io,ko)&&(ko=a):de(a,ko)>de(io,ko)&&(io=a):ko>=io?(ako&&(ko=a)):a>mo?de(io,a)>de(io,ko)&&(ko=a):de(a,ko)>de(io,ko)&&(io=a)}else qo.push(ro=[io=a,ko=a]);blo&&(lo=b),po=c,mo=a}function $d(){hp.point=Zd}function _d(){ro[0]=io,ro[1]=ko,hp.point=Yd,po=null}function ae(a,b){if(po){var c=a-mo;gp.add(Ro(c)>180?c+(c>0?360:-360):c)}else no=a,oo=b;fp.point(a,b),Zd(a,b)}function be(){fp.lineStart()}function ce(){ae(no,oo),fp.lineEnd(),Ro(gp)>Jo&&(io=-(ko=180)),ro[0]=io,ro[1]=ko,po=null}function de(a,b){return(b-=a)<0?b+360:b}function ee(a,b){return a[0]-b[0]}function fe(a,b){return a[0]<=a[1]?a[0]<=b&&b<=a[1]:bLo?a+Math.round(-a/Oo)*Oo:a,b]}function te(a,b,c){return(a%=Oo)?b||c?re(ve(a),we(b,c)):ve(a):b||c?we(b,c):se}function ue(a){return function(b,c){return[(b+=a)>Lo?b-Oo:b<-Lo?b+Oo:b,c]}}function ve(a){var b=ue(a);return b.invert=ue(-a),b}function we(a,b){function c(a,b){var c=Uo(b),h=Uo(a)*c,i=Zo(a)*c,j=Zo(b),k=j*d+h*e;return[To(i*f-k*g,h*d-j*e),Gd(k*f+i*g)]}var d=Uo(a),e=Zo(a),f=Uo(b),g=Zo(b);return c.invert=function(a,b){var c=Uo(b),h=Uo(a)*c,i=Zo(a)*c,j=Zo(b),k=j*f-i*g;return[To(i*f+j*g,h*d+k*e),Gd(k*d-h*e)]},c}function xe(a){function b(b){return(b=a(b[0]*Qo,b[1]*Qo))[0]*=Po,b[1]*=Po,b}return a=te(a[0]*Qo,a[1]*Qo,a.length>2?a[2]*Qo:0),b.invert=function(b){return(b=a.invert(b[0]*Qo,b[1]*Qo))[0]*=Po,b[1]*=Po,b},b}function ye(a,b,c,d,e,f){if(c){var g=Uo(b),h=Zo(b),i=d*c;null==e?(e=b+d*Oo,f=b-i/2):(e=ze(g,e),f=ze(g,f),(d>0?ef)&&(e+=d*Oo));for(var j,k=e;d>0?k>f:k1&&b.push(b.pop().concat(b.shift()))},result:function(){var c=b;return b=[],a=null,c}}}function Be(a,b){return Ro(a[0]-b[0])=0;--f)e.point((k=j[f])[0],k[1]);else d(m.x,m.p.x,-1,e);m=m.p}j=(m=m.o).z,n=!n}while(!m.v);e.lineEnd()}}}function Ee(a){if(b=a.length){for(var b,c,d=0,e=a[0];++d=0?1:-1,z=y*x,A=z>Lo,B=p*v;if(up.add(To(B*y*Zo(z),q*w+B*Uo(z))),g+=A?x+y*Oo:x,A^n>=c^t>=c){var C=Ud(Sd(m),Sd(s));Xd(C);var D=Ud(f,C);Xd(D);var E=(A^x>=0?-1:1)*Gd(D[2]);(d>E||d===E&&(C[0]||C[1]))&&(h+=A^x>=0?1:-1)}}return(g<-Jo||g0){for(t||(e.polygonStart(),t=!0),e.lineStart(),a=0;a1&&2&f&&g.push(g.pop().concat(g.shift())),n.push(g.filter(Ie))}var m,n,o,p=b(e),q=Ae(),s=b(q),t=!1,u={point:f,lineStart:h,lineEnd:i,polygonStart:function(){u.point=j,u.lineStart=k,u.lineEnd=l,n=[],m=[]},polygonEnd:function(){u.point=f,u.lineStart=h,u.lineEnd=i,n=r(n);var a=Ge(m,d);n.length?(t||(e.polygonStart(),t=!0),De(n,Je,a,c,e)):a&&(t||(e.polygonStart(),t=!0),e.lineStart(),c(null,null,1,e),e.lineEnd()),t&&(e.polygonEnd(),t=!1),n=m=null},sphere:function(){e.polygonStart(),e.lineStart(),c(null,null,1,e),e.lineEnd(),e.polygonEnd()}};return u}}function Ie(a){return a.length>1}function Je(a,b){return((a=a.x)[0]<0?a[1]-Mo-Jo:Mo-a[1])-((b=b.x)[0]<0?b[1]-Mo-Jo:Mo-b[1])}function Ke(a){function b(a,b){return Uo(a)*Uo(b)>e}function c(a,b,c){var d=[1,0,0],f=Ud(Sd(a),Sd(b)),g=Td(f,f),h=f[0],i=g-h*h;if(!i)return!c&&a;var j=e*g/i,k=-e*h/i,l=Ud(d,f),m=Wd(d,j);Vd(m,Wd(f,k));var n=l,o=Td(m,n),p=Td(n,n),q=o*o-p*(Td(m,m)-1);if(!(q<0)){var r=_o(q),s=Wd(n,(-o-r)/p);if(Vd(s,m),s=Rd(s),!c)return s;var t,u=a[0],v=b[0],w=a[1],x=b[1];v0^s[1]<(Ro(s[0]-u)Lo^(u<=s[0]&&s[0]<=v)){var A=Wd(n,(-o+r)/p);return Vd(A,m),[s,Rd(A)]}}}function d(b,c){var d=g?a:Lo-a,e=0;return b<-d?e|=1:b>d&&(e|=2),c<-d?e|=4:c>d&&(e|=8),e}var e=Uo(a),f=6*Qo,g=e>0,h=Ro(e)>Jo;return He(b,function(a){var e,f,i,j,k;return{lineStart:function(){j=i=!1,k=1},point:function(l,m){var n,o=[l,m],p=b(l,m),q=g?p?0:d(l,m):p?d(l+(l<0?Lo:-Lo),m):0;if(!e&&(j=i=p)&&a.lineStart(),p!==i&&(!(n=c(e,o))||Be(e,n)||Be(o,n))&&(o[0]+=Jo,o[1]+=Jo,p=b(o[0],o[1])),p!==i)k=0,p?(a.lineStart(),n=c(o,e),a.point(n[0],n[1])):(n=c(e,o),a.point(n[0],n[1]),a.lineEnd()),e=n;else if(h&&e&&g^p){var r;q&f||!(r=c(o,e,!0))||(k=0,g?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))}!p||e&&Be(e,o)||a.point(o[0],o[1]),e=o,i=p,f=q},lineEnd:function(){i&&a.lineEnd(),e=null},clean:function(){return k|(j&&i)<<1}}},function(b,c,d,e){ye(e,a,f,d,b,c)},g?[0,-a]:[-Lo,a-Lo])}function Le(a,b,c,d){function e(e,f){return a<=e&&e<=c&&b<=f&&f<=d}function f(e,f,h,j){var k=0,l=0;if(null==e||(k=g(e,h))!==(l=g(f,h))||i(e,f)<0^h>0){do j.point(0===k||3===k?a:c,k>1?d:b);while((k=(k+h+4)%4)!==l)}else j.point(f[0],f[1])}function g(d,e){return Ro(d[0]-a)0?0:3:Ro(d[0]-c)0?2:1:Ro(d[1]-b)0?1:0:e>0?3:2}function h(a,b){return i(a.x,b.x)}function i(a,b){var c=g(a,1),d=g(b,1);return c!==d?c-d:0===c?b[1]-a[1]:1===c?a[0]-b[0]:2===c?a[1]-b[1]:b[0]-a[0]}return function(g){function i(a,b){e(a,b)&&w.point(a,b)}function j(f,g){var h=e(f,g);if(l&&m.push([f,g]),u)n=f,o=g,p=h,u=!1,h&&(w.lineStart(),w.point(f,g));else if(h&&t)w.point(f,g);else{var i=[q=Math.max(xp,Math.min(wp,q)),s=Math.max(xp,Math.min(wp,s))],j=[f=Math.max(xp,Math.min(wp,f)),g=Math.max(xp,Math.min(wp,g))];!function(a,b,c,d,e,f){var g,h=a[0],i=a[1],j=0,k=1,l=b[0]-h,m=b[1]-i;if(g=c-h,l||!(g>0)){if(g/=l,l<0){if(g0){if(g>k)return;g>j&&(j=g)}if(g=e-h,l||!(g<0)){if(g/=l,l<0){if(g>k)return;g>j&&(j=g)}else if(l>0){if(g0)){if(g/=m,m<0){if(g0){if(g>k)return;g>j&&(j=g)}if(g=f-i,m||!(g<0)){if(g/=m,m<0){if(g>k)return;g>j&&(j=g)}else if(m>0){if(g0&&(a[0]=h+j*l,a[1]=i+j*m),k<1&&(b[0]=h+k*l,b[1]=i+k*m),!0}}}}}(i,j,a,b,c,d)?h&&(w.lineStart(),w.point(f,g),v=!1):(t||(w.lineStart(),w.point(i[0],i[1])),w.point(j[0],j[1]),h||w.lineEnd(),v=!1)}q=f,s=g,t=h}var k,l,m,n,o,p,q,s,t,u,v,w=g,x=Ae(),y={point:i,lineStart:function(){y.point=j,l&&l.push(m=[]),u=!0,t=!1,q=s=NaN},lineEnd:function(){k&&(j(n,o),p&&t&&x.rejoin(),k.push(x.result())),y.point=i,t&&w.lineEnd()},polygonStart:function(){w=x,k=[],l=[],v=!0},polygonEnd:function(){var b=function(){for(var b=0,c=0,e=l.length;cd&&(m-f)*(d-g)>(n-g)*(a-f)&&++b:n<=d&&(m-f)*(d-g)<(n-g)*(a-f)&&--b;return b}(),c=v&&b,e=(k=r(k)).length;(c||e)&&(g.polygonStart(),c&&(g.lineStart(),f(null,null,1,g),g.lineEnd()),e&&De(k,h,b,f,g),g.polygonEnd()),w=g,k=l=m=null}};return y}}function Me(){zp.point=zp.lineEnd=Id}function Ne(a,b){jp=a*=Qo,kp=Zo(b*=Qo),lp=Uo(b),zp.point=Oe}function Oe(a,b){a*=Qo;var c=Zo(b*=Qo),d=Uo(b),e=Ro(a-jp),f=Uo(e),g=d*Zo(e),h=lp*c-kp*d*f,i=kp*c+lp*d*f;yp.add(To(_o(g*g+h*h),i)),jp=a,kp=c,lp=d}function Pe(a){return yp.reset(),Md(a,zp),+yp}function Qe(a,b){return Ap[0]=a,Ap[1]=b,Pe(Bp)}function Re(a,b){return!(!a||!Dp.hasOwnProperty(a.type))&&Dp[a.type](a,b)}function Se(a,b){return 0===Qe(a,b)}function Te(a,b){for(var c,d,e,f=0,g=a.length;f0&&(e=Qe(a[f],a[f-1]))>0&&c<=e&&d<=e&&(c+d-e)*(1-Math.pow((c-d)/e,2))Jo}).map(l)).concat(k(Vo(h/q)*q,g,q).filter(function(a){return Ro(a%s)>Jo}).map(m))}var c,d,e,f,g,h,i,j,l,m,n,o,p=10,q=p,r=90,s=360,t=2.5;return a.lines=function(){return b().map(function(a){return{type:"LineString",coordinates:a}})},a.outline=function(){return{type:"Polygon",coordinates:[n(f).concat(o(i).slice(1),n(e).reverse().slice(1),o(j).reverse().slice(1))]}},a.extent=function(b){return arguments.length?a.extentMajor(b).extentMinor(b):a.extentMinor()},a.extentMajor=function(b){return arguments.length?(f=+b[0][0],e=+b[1][0],j=+b[0][1],i=+b[1][1],f>e&&(b=f,f=e,e=b),j>i&&(b=j,j=i,i=b),a.precision(t)):[[f,j],[e,i]]},a.extentMinor=function(b){return arguments.length?(d=+b[0][0],c=+b[1][0],h=+b[0][1],g=+b[1][1],d>c&&(b=d,d=c,c=b),h>g&&(b=h,h=g,g=b),a.precision(t)):[[d,h],[c,g]]},a.step=function(b){return arguments.length?a.stepMajor(b).stepMinor(b):a.stepMinor()},a.stepMajor=function(b){return arguments.length?(r=+b[0],s=+b[1],a):[r,s]},a.stepMinor=function(b){return arguments.length?(p=+b[0],q=+b[1],a):[p,q]},a.precision=function(b){return arguments.length?(t=+b,l=Xe(h,g,90),m=Ye(d,c,t),n=Xe(j,i,90),o=Ye(f,e,t),a):t},a.extentMajor([[-180,-90+Jo],[180,90-Jo]]).extentMinor([[-180,-80-Jo],[180,80+Jo]])}function $e(a){return a}function _e(){Gp.point=af}function af(a,b){Gp.point=bf,mp=op=a,np=pp=b}function bf(a,b){Fp.add(pp*a-op*b),op=a,pp=b}function cf(){bf(mp,np)}function df(a,b){Mp+=a,Np+=b,++Op}function ef(){Vp.point=ff}function ff(a,b){Vp.point=gf,df(sp=a,tp=b)}function gf(a,b){var c=a-sp,d=b-tp,e=_o(c*c+d*d);Pp+=e*(sp+a)/2,Qp+=e*(tp+b)/2,Rp+=e,df(sp=a,tp=b)}function hf(){Vp.point=df}function jf(){Vp.point=lf}function kf(){mf(qp,rp)}function lf(a,b){Vp.point=mf,df(qp=sp=a,rp=tp=b)}function mf(a,b){var c=a-sp,d=b-tp,e=_o(c*c+d*d);Pp+=e*(sp+a)/2,Qp+=e*(tp+b)/2,Rp+=e,Sp+=(e=tp*a-sp*b)*(sp+a),Tp+=e*(tp+b),Up+=3*e,df(sp=a,tp=b)}function nf(a){this._context=a}function of(a,b){aq.point=pf,Xp=Zp=a,Yp=$p=b}function pf(a,b){Zp-=a,$p-=b,_p.add(_o(Zp*Zp+$p*$p)),Zp=a,$p=b}function qf(){this._string=[]}function rf(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function sf(a){return function(b){var c=new tf;for(var d in a)c[d]=a[d];return c.stream=b,c}}function tf(){}function uf(a,b,c){var d=a.clipExtent&&a.clipExtent();return a.scale(150).translate([0,0]),null!=d&&a.clipExtent(null),Md(c,a.stream(Lp)),b(Lp.result()),null!=d&&a.clipExtent(d),a}function vf(a,b,c){return uf(a,function(c){var d=b[1][0]-b[0][0],e=b[1][1]-b[0][1],f=Math.min(d/(c[1][0]-c[0][0]),e/(c[1][1]-c[0][1])),g=+b[0][0]+(d-f*(c[1][0]+c[0][0]))/2,h=+b[0][1]+(e-f*(c[1][1]+c[0][1]))/2;a.scale(150*f).translate([g,h])},c)}function wf(a,b,c){return vf(a,[[0,0],b],c)}function xf(a,b,c){return uf(a,function(c){var d=+b,e=d/(c[1][0]-c[0][0]),f=(d-e*(c[1][0]+c[0][0]))/2,g=-e*c[0][1];a.scale(150*e).translate([f,g])},c)}function yf(a,b,c){return uf(a,function(c){var d=+b,e=d/(c[1][1]-c[0][1]),f=-e*c[0][0],g=(d-e*(c[1][1]+c[0][1]))/2;a.scale(150*e).translate([f,g])},c)}function zf(a,b){return+b?function(a,b){function c(d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=j-d,s=k-e,t=r*r+s*s;if(t>4*b&&p--){var u=g+m,v=h+n,w=i+o,x=_o(u*u+v*v+w*w),y=Gd(w/=x),z=Ro(Ro(w)-1)b||Ro((r*D+s*E)/t-.5)>.3||g*m+h*n+i*o2?a[2]%360*Qo:0,d()):[u*Po,v*Po,w*Po]},b.angle=function(a){return arguments.length?(x=a%360*Qo,d()):x*Po},b.precision=function(a){return arguments.length?(k=zf(l,C=a*a),e()):_o(C)},b.fitExtent=function(a,c){return vf(b,a,c)},b.fitSize=function(a,c){return wf(b,a,c)},b.fitWidth=function(a,c){return xf(b,a,c)},b.fitHeight=function(a,c){return yf(b,a,c)},function(){return f=a.apply(this,arguments),b.invert=f.invert&&c,d()}}function Df(a){var b=0,c=Lo/3,d=Cf(a),e=d(b,c);return e.parallels=function(a){return arguments.length?d(b=a[0]*Qo,c=a[1]*Qo):[b*Po,c*Po]},e}function Ef(a,b){function c(a,b){var c=_o(f-2*e*Zo(b))/e;return[c*Zo(a*=e),g-c*Uo(a)]}var d=Zo(a),e=(d+Zo(b))/2;if(Ro(e)0?b<-Mo+Jo&&(b=-Mo+Jo):b>Mo-Jo&&(b=Mo-Jo);var c=f/Yo(Lf(b),e);return[c*Zo(e*a),f-c*Uo(e*a)]}var d=Uo(a),e=a===b?Zo(a):Xo(d/Uo(b))/Xo(Lf(b)/Lf(a)),f=d*Yo(Lf(a),e)/e;return e?(c.invert=function(a,b){ var c=f-b,d=$o(e)*_o(a*a+c*c);return[To(a,Ro(c))/e*$o(c),2*So(Yo(f/d,1/e))-Mo]},c):Jf}function Nf(a,b){return[a,b]}function Of(a,b){function c(a,b){var c=f-b,d=e*a;return[c*Zo(d),f-c*Uo(d)]}var d=Uo(a),e=a===b?Zo(a):(d-Uo(b))/(b-a),f=d/e+a;return Ro(e)=0;)b+=c[d].value;else b=1;a.value=b}function $f(a,b){var c,d,e,f,g,h=new cg(a),i=+a.value&&(h.value=a.value),j=[h];for(null==b&&(b=_f);c=j.pop();)if(i&&(c.value=+c.data.value),(e=b(c.data))&&(g=e.length))for(c.children=new Array(g),f=g-1;f>=0;--f)j.push(d=c.children[f]=new cg(e[f])),d.parent=c,d.depth=c.depth+1;return h.eachBefore(bg)}function _f(a){return a.children}function ag(a){a.data=a.data.data}function bg(a){var b=0;do a.height=b;while((a=a.parent)&&a.height<++b)}function cg(a){this.data=a,this.depth=this.height=0,this.parent=null}function dg(a){for(var b,c,d=0,e=(a=function(a){for(var b,c,d=a.length;d;)c=Math.random()*d--|0,b=a[d],a[d]=a[c],a[c]=b;return a}(lq.call(a))).length,f=[];d0&&c*c>d*d+e*e}function hg(a,b){for(var c=0;c(g*=g)?(d=(j+g-e)/(2*j),f=Math.sqrt(Math.max(0,g/j-d*d)),c.x=a.x-d*h-f*i,c.y=a.y-d*i+f*h):(d=(j+e-g)/(2*j),f=Math.sqrt(Math.max(0,e/j-d*d)),c.x=b.x+d*h-f*i,c.y=b.y+d*i+f*h)):(c.x=b.x+c.r,c.y=b.y)}function mg(a,b){var c=a.r+b.r-1e-6,d=b.x-a.x,e=b.y-a.y;return c>0&&c*c>d*d+e*e}function ng(a){var b=a._,c=a.next._,d=b.r+c.r,e=(b.x*c.r+c.x*b.r)/d,f=(b.y*c.r+c.y*b.r)/d;return e*e+f*f}function og(a){this._=a,this.next=null,this.previous=null}function pg(a){if(!(e=a.length))return 0;var b,c,d,e,f,g,h,i,j,k,l;if((b=a[0]).x=0,b.y=0,!(e>1))return b.r;if(c=a[1],b.x=-c.r,c.x=b.r,c.y=0,!(e>2))return b.r+c.r;lg(c,b,d=a[2]),b=new og(b),c=new og(c),d=new og(d),b.next=d.previous=c,c.next=b.previous=d,d.next=c.previous=b;a:for(h=3;hm&&(m=h),q=k*k*p,(n=Math.max(m/q,q/l))>o){k-=h;break}o=n}r.push(g={value:k,dice:i1&&Kg(a[c[d-2]],a[c[d-1]],a[e])<=0;)--d;c[d++]=e}return c.slice(0,d)}function Ng(){return Math.random()}function Og(a,b){switch(arguments.length){case 0:break;case 1:this.range(a);break;default:this.range(b).domain(a)}return this}function Pg(a,b){switch(arguments.length){case 0:break;case 1:this.interpolator(a);break;default:this.interpolator(b).domain(a)}return this}function Qg(){function a(a){var f=a+"",g=b.get(f);if(!g){if(e!==Bq)return e;b.set(f,g=c.push(a))}return d[(g-1)%d.length]}var b=zc(),c=[],d=[],e=Bq;return a.domain=function(d){if(!arguments.length)return c.slice();c=[],b=zc();for(var e,f,g=-1,h=d.length;++gd&&(b=c,c=d,d=b),function(a){return Math.max(c,Math.min(d,a))}}function Wg(a,b,c){var d=a[0],e=a[1],f=b[0],g=b[1];return e2?Xg:Wg,g=h=null,b}function b(a){return isNaN(a=+a)?e:(g||(g=f(i.map(c),j,k)))(c(l(a)))}var c,d,e,f,g,h,i=Cq,j=Cq,k=vb,l=Tg;return b.invert=function(a){return l(d((h||(h=f(j,i.map(c),sb)))(a)))},b.domain=function(b){return arguments.length?(i=zq.call(b,Sg),l===Tg||(l=Vg(i)),a()):i.slice()},b.range=function(b){return arguments.length?(j=Aq.call(b),a()):j.slice()},b.rangeRound=function(b){return j=Aq.call(b),k=wb,a()},b.clamp=function(a){return arguments.length?(l=a?Vg(i):Tg,b):l!==Tg},b.interpolate=function(b){return arguments.length?(k=b,a()):k},b.unknown=function(a){return arguments.length?(e=a,b):e},function(b,e){return c=b,d=e,a()}}function $g(a,b){return Zg()(a,b)}function _g(b,c,d,e){var f,g=n(b,c,d);switch((e=td(null==e?",f":e)).type){case"s":var h=Math.max(Math.abs(b),Math.abs(c));return null!=e.precision||isNaN(f=Ad(g,h))||(e.precision=f),a.formatPrefix(e,h);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(f=Bd(g,Math.max(Math.abs(b),Math.abs(c))))||(e.precision=f-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(f=zd(g))||(e.precision=f-2*("%"===e.type))}return a.format(e)}function ah(a){var b=a.domain;return a.ticks=function(a){var c=b();return l(c[0],c[c.length-1],null==a?10:a)},a.tickFormat=function(a,c){var d=b();return _g(d[0],d[d.length-1],null==a?10:a,c)},a.nice=function(c){null==c&&(c=10);var d,e=b(),f=0,g=e.length-1,h=e[f],i=e[g];return i0?d=m(h=Math.floor(h/d)*d,i=Math.ceil(i/d)*d,c):d<0&&(d=m(h=Math.ceil(h*d)/d,i=Math.floor(i*d)/d,c)),d>0?(e[f]=Math.floor(h/d)*d,e[g]=Math.ceil(i/d)*d,b(e)):d<0&&(e[f]=Math.ceil(h*d)/d,e[g]=Math.floor(i*d)/d,b(e)),a},a}function bh(a,b){var c,d=0,e=(a=a.slice()).length-1,f=a[d],g=a[e];return g0){for(;ni)break;q.push(m)}}else for(;n=1;--k)if(!((m=j*k)i)break;q.push(m)}}else q=l(n,o,Math.min(o-n,p)).map(e);return b?q.reverse():q},f.tickFormat=function(b,c){if(null==c&&(c=10===h?".0e":","),"function"!=typeof c&&(c=a.format(c)),b===1/0)return c;null==b&&(b=10);var g=Math.max(1,h*b/f.ticks().length);return function(a){var b=a/e(Math.round(d(a)));return b*h0))return h;do h.push(g=new Date(+c)),b(c,f),a(c);while(g=b)for(;a(b),!c(b);)b.setTime(b-1)},function(a,d){if(a>=a)if(d<0)for(;++d<=0;)for(;b(a,-1),!c(a););else for(;--d>=0;)for(;b(a,1),!c(a););})},c&&(e.count=function(b,d){return Dq.setTime(+b),Eq.setTime(+d),a(Dq),a(Eq),Math.floor(c(Dq,Eq))},e.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?e.filter(d?function(b){return d(b)%a==0}:function(b){return e.count(0,b)%a==0}):e:null}),e}function sh(a){return rh(function(b){b.setDate(b.getDate()-(b.getDay()+7-a)%7),b.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+7*b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*Hq)/Iq})}function th(a){return rh(function(b){b.setUTCDate(b.getUTCDate()-(b.getUTCDay()+7-a)%7),b.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+7*b)},function(a,b){return(b-a)/Iq})}function uh(a){if(0<=a.y&&a.y<100){var b=new Date(-1,a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function vh(a){if(0<=a.y&&a.y<100){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function wh(a,b,c){return{y:a,m:b,d:c,H:0,M:0,S:0,L:0}}function xh(a){function b(a,b){return function(c){var d,e,f,g=[],h=-1,i=0,j=a.length;for(c instanceof Date||(c=new Date(+c));++h53)return null;"w"in g||(g.w=1),"Z"in g?(f=(e=vh(wh(g.y,0,1))).getUTCDay(),e=f>4||0===f?or.ceil(e):or(e),e=lr.offset(e,7*(g.V-1)),g.y=e.getUTCFullYear(),g.m=e.getUTCMonth(),g.d=e.getUTCDate()+(g.w+6)%7):(f=(e=uh(wh(g.y,0,1))).getDay(),e=f>4||0===f?Sq.ceil(e):Sq(e),e=Pq.offset(e,7*(g.V-1)),g.y=e.getFullYear(),g.m=e.getMonth(),g.d=e.getDate()+(g.w+6)%7)}else("W"in g||"U"in g)&&("w"in g||(g.w="u"in g?g.u%7:"W"in g?1:0),f="Z"in g?vh(wh(g.y,0,1)).getUTCDay():uh(wh(g.y,0,1)).getDay(),g.m=0,g.d="W"in g?(g.w+6)%7+7*g.W-(f+5)%7:g.w+7*g.U-(f+6)%7);return"Z"in g?(g.H+=g.Z/100|0,g.M+=g.Z%100,vh(g)):uh(g)}}function d(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;g=i)return-1;if(37===(e=b.charCodeAt(g++))){if(e=b.charAt(g++),!(f=y[e in Gr?b.charAt(g++):e])||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}var e=a.dateTime,f=a.date,g=a.time,h=a.periods,i=a.days,j=a.shortDays,k=a.months,l=a.shortMonths,m=Ah(h),n=Bh(h),o=Ah(i),p=Bh(i),q=Ah(j),r=Bh(j),s=Ah(k),t=Bh(k),u=Ah(l),v=Bh(l),w={a:function(a){return j[a.getDay()]},A:function(a){return i[a.getDay()]},b:function(a){return l[a.getMonth()]},B:function(a){return k[a.getMonth()]},c:null,d:Wh,e:Wh,f:_h,H:Xh,I:Yh,j:Zh,L:$h,m:ai,M:bi,p:function(a){return h[+(a.getHours()>=12)]},q:function(a){return 1+~~(a.getMonth()/3)},Q:Di,s:Ei,S:ci,u:di,U:ei,V:fi,w:gi,W:hi,x:null,X:null,y:ii,Y:ji,Z:ki,"%":Ci},x={a:function(a){return j[a.getUTCDay()]},A:function(a){return i[a.getUTCDay()]},b:function(a){return l[a.getUTCMonth()]},B:function(a){return k[a.getUTCMonth()]},c:null,d:li,e:li,f:qi,H:mi,I:ni,j:oi,L:pi,m:ri,M:si,p:function(a){return h[+(a.getUTCHours()>=12)]},q:function(a){return 1+~~(a.getUTCMonth()/3)},Q:Di,s:Ei,S:ti,u:ui,U:vi,V:wi,w:xi,W:yi,x:null,X:null,y:zi,Y:Ai,Z:Bi,"%":Ci},y={a:function(a,b,c){var d=q.exec(b.slice(c));return d?(a.w=r[d[0].toLowerCase()],c+d[0].length):-1},A:function(a,b,c){var d=o.exec(b.slice(c));return d?(a.w=p[d[0].toLowerCase()],c+d[0].length):-1},b:function(a,b,c){var d=u.exec(b.slice(c));return d?(a.m=v[d[0].toLowerCase()],c+d[0].length):-1},B:function(a,b,c){var d=s.exec(b.slice(c));return d?(a.m=t[d[0].toLowerCase()],c+d[0].length):-1},c:function(a,b,c){return d(a,e,b,c)},d:Mh,e:Mh,f:Sh,H:Oh,I:Oh,j:Nh,L:Rh,m:Lh,M:Ph,p:function(a,b,c){var d=m.exec(b.slice(c));return d?(a.p=n[d[0].toLowerCase()],c+d[0].length):-1},q:Kh,Q:Uh,s:Vh,S:Qh,u:Dh,U:Eh,V:Fh,w:Ch,W:Gh,x:function(a,b,c){return d(a,f,b,c)},X:function(a,b,c){return d(a,g,b,c)},y:Ih,Y:Hh,Z:Jh,"%":Th};return w.x=b(f,w),w.X=b(g,w),w.c=b(e,w),x.x=b(f,x),x.X=b(g,x),x.c=b(e,x),{format:function(a){var c=b(a+="",w);return c.toString=function(){return a},c},parse:function(a){var b=c(a+="",!1);return b.toString=function(){return a},b},utcFormat:function(a){var c=b(a+="",x);return c.toString=function(){return a},c},utcParse:function(a){var b=c(a+="",!0);return b.toString=function(){return a},b}}}function yh(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f68?1900:2e3),c+d[0].length):-1}function Jh(a,b,c){var d=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function Kh(a,b,c){var d=Hr.exec(b.slice(c,c+1));return d?(a.q=3*d[0]-3,c+d[0].length):-1}function Lh(a,b,c){var d=Hr.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function Mh(a,b,c){var d=Hr.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function Nh(a,b,c){var d=Hr.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function Oh(a,b,c){var d=Hr.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function Ph(a,b,c){var d=Hr.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function Qh(a,b,c){var d=Hr.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function Rh(a,b,c){var d=Hr.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function Sh(a,b,c){var d=Hr.exec(b.slice(c,c+6));return d?(a.L=Math.floor(d[0]/1e3),c+d[0].length):-1}function Th(a,b,c){var d=Ir.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function Uh(a,b,c){var d=Hr.exec(b.slice(c));return d?(a.Q=+d[0],c+d[0].length):-1}function Vh(a,b,c){var d=Hr.exec(b.slice(c));return d?(a.s=+d[0],c+d[0].length):-1}function Wh(a,b){return yh(a.getDate(),b,2)}function Xh(a,b){return yh(a.getHours(),b,2)}function Yh(a,b){return yh(a.getHours()%12||12,b,2)}function Zh(a,b){return yh(1+Pq.count(fr(a),a),b,3)}function $h(a,b){return yh(a.getMilliseconds(),b,3)}function _h(a,b){return $h(a,b)+"000"}function ai(a,b){return yh(a.getMonth()+1,b,2)}function bi(a,b){return yh(a.getMinutes(),b,2)}function ci(a,b){return yh(a.getSeconds(),b,2)}function di(a){var b=a.getDay();return 0===b?7:b}function ei(a,b){return yh(Rq.count(fr(a)-1,a),b,2)}function fi(a,b){var c=a.getDay();return a=c>=4||0===c?Vq(a):Vq.ceil(a),yh(Vq.count(fr(a),a)+(4===fr(a).getDay()),b,2)}function gi(a){return a.getDay()}function hi(a,b){return yh(Sq.count(fr(a)-1,a),b,2)}function ii(a,b){return yh(a.getFullYear()%100,b,2)}function ji(a,b){return yh(a.getFullYear()%1e4,b,4)}function ki(a){var b=a.getTimezoneOffset();return(b>0?"-":(b*=-1,"+"))+yh(b/60|0,"0",2)+yh(b%60,"0",2)}function li(a,b){return yh(a.getUTCDate(),b,2)}function mi(a,b){return yh(a.getUTCHours(),b,2)}function ni(a,b){return yh(a.getUTCHours()%12||12,b,2)}function oi(a,b){return yh(1+lr.count(Dr(a),a),b,3)}function pi(a,b){return yh(a.getUTCMilliseconds(),b,3)}function qi(a,b){return pi(a,b)+"000"}function ri(a,b){return yh(a.getUTCMonth()+1,b,2)}function si(a,b){return yh(a.getUTCMinutes(),b,2)}function ti(a,b){return yh(a.getUTCSeconds(),b,2)}function ui(a){var b=a.getUTCDay();return 0===b?7:b}function vi(a,b){return yh(nr.count(Dr(a)-1,a),b,2)}function wi(a,b){var c=a.getUTCDay();return a=c>=4||0===c?rr(a):rr.ceil(a),yh(rr.count(Dr(a),a)+(4===Dr(a).getUTCDay()),b,2)}function xi(a){return a.getUTCDay()}function yi(a,b){return yh(or.count(Dr(a)-1,a),b,2)}function zi(a,b){return yh(a.getUTCFullYear()%100,b,2)}function Ai(a,b){return yh(a.getUTCFullYear()%1e4,b,4)}function Bi(){return"+0000"}function Ci(){return"%"}function Di(a){return+a}function Ei(a){return Math.floor(+a/1e3)}function Fi(b){return Er=xh(b),a.timeFormat=Er.format,a.timeParse=Er.parse,a.utcFormat=Er.utcFormat,a.utcParse=Er.utcParse,Er}function Gi(a){return new Date(a)}function Hi(a){return a instanceof Date?+a:+new Date(+a)}function Ii(a,b,d,e,f,g,h,i,j){function k(c){return(h(c)=1?vt:a<=-1?-vt:Math.asin(a)}function Ti(a){return a.innerRadius}function Ui(a){return a.outerRadius}function Vi(a){return a.startAngle}function Wi(a){return a.endAngle}function Xi(a){return a&&a.padAngle}function Yi(a,b,c,d,e,f,g){var h=a-c,i=b-d,j=(g?f:-f)/st(h*h+i*i),k=j*i,l=-j*h,m=a+k,n=b+l,o=c+k,p=d+l,q=(m+o)/2,r=(n+p)/2,s=o-m,t=p-n,u=s*s+t*t,v=e-f,w=m*p-o*n,x=(t<0?-1:1)*st(pt(0,v*v*u-w*w)),y=(w*t-s*x)/u,z=(-w*s-t*x)/u,A=(w*t+s*x)/u,B=(-w*s+t*x)/u,C=y-q,D=z-r,E=A-q,F=B-r;return C*C+D*D>E*E+F*F&&(y=A,z=B),{cx:y,cy:z,x01:-k,y01:-l,x11:y*(e/v-1),y11:z*(e/v-1)}}function Zi(a){this._context=a}function $i(a){return new Zi(a)}function _i(a){return a[0]}function aj(a){return a[1]}function bj(){function a(a){var h,i,j,k=a.length,l=!1;for(null==e&&(g=f(j=sc())),h=0;h<=k;++h)!(h=k;--l)j.point(q[l],r[l]);j.lineEnd(),j.areaEnd()}p&&(q[b]=+c(m,b,a),r[b]=+e(m,b,a),j.point(d?+d(m,b,a):q[b],f?+f(m,b,a):r[b]))}if(n)return j=null,n+""||null}function b(){return bj().defined(g).curve(i).context(h)}var c=_i,d=null,e=Ri(0),f=aj,g=Ri(!0),h=null,i=$i,j=null;return a.x=function(b){return arguments.length?(c="function"==typeof b?b:Ri(+b),d=null,a):c},a.x0=function(b){return arguments.length?(c="function"==typeof b?b:Ri(+b),a):c},a.x1=function(b){return arguments.length?(d=null==b?null:"function"==typeof b?b:Ri(+b),a):d},a.y=function(b){return arguments.length?(e="function"==typeof b?b:Ri(+b),f=null,a):e},a.y0=function(b){return arguments.length?(e="function"==typeof b?b:Ri(+b),a):e},a.y1=function(b){return arguments.length?(f=null==b?null:"function"==typeof b?b:Ri(+b),a):f},a.lineX0=a.lineY0=function(){return b().x(c).y(e)},a.lineY1=function(){return b().x(c).y(f)},a.lineX1=function(){return b().x(d).y(e)},a.defined=function(b){return arguments.length?(g="function"==typeof b?b:Ri(!!b),a):g},a.curve=function(b){return arguments.length?(i=b,null!=h&&(j=i(h)),a):i},a.context=function(b){return arguments.length?(null==b?h=j=null:j=i(h=b),a):h},a}function dj(a,b){return ba?1:b>=a?0:NaN}function ej(a){return a}function fj(a){this._curve=a}function gj(a){function b(b){return new fj(a(b))}return b._curve=a,b}function hj(a){var b=a.curve;return a.angle=a.x,delete a.x,a.radius=a.y,delete a.y,a.curve=function(a){return arguments.length?b(gj(a)):b()._curve},a}function ij(){return hj(bj().curve(xt))}function jj(){var a=cj().curve(xt),b=a.curve,c=a.lineX0,d=a.lineX1,e=a.lineY0,f=a.lineY1;return a.angle=a.x,delete a.x,a.startAngle=a.x0,delete a.x0,a.endAngle=a.x1,delete a.x1,a.radius=a.y,delete a.y,a.innerRadius=a.y0,delete a.y0,a.outerRadius=a.y1,delete a.y1,a.lineStartAngle=function(){return hj(c())},delete a.lineX0,a.lineEndAngle=function(){return hj(d())},delete a.lineX1,a.lineInnerRadius=function(){return hj(e())},delete a.lineY0,a.lineOuterRadius=function(){return hj(f())},delete a.lineY1,a.curve=function(a){return arguments.length?b(gj(a)):b()._curve},a}function kj(a,b){return[(b=+b)*Math.cos(a-=Math.PI/2),b*Math.sin(a)]}function lj(a){return a.source}function mj(a){return a.target}function nj(a){function b(){var b,h=yt.call(arguments),i=c.apply(this,h),j=d.apply(this,h);if(g||(g=b=sc()),a(g,+e.apply(this,(h[0]=i,h)),+f.apply(this,h),+e.apply(this,(h[0]=j,h)),+f.apply(this,h)),b)return g=null,b+""||null}var c=lj,d=mj,e=_i,f=aj,g=null;return b.source=function(a){return arguments.length?(c=a,b):c},b.target=function(a){return arguments.length?(d=a,b):d},b.x=function(a){return arguments.length?(e="function"==typeof a?a:Ri(+a),b):e},b.y=function(a){return arguments.length?(f="function"==typeof a?a:Ri(+a),b):f},b.context=function(a){return arguments.length?(g=null==a?null:a,b):g},b}function oj(a,b,c,d,e){a.moveTo(b,c),a.bezierCurveTo(b=(b+d)/2,c,b,e,d,e)}function pj(a,b,c,d,e){a.moveTo(b,c),a.bezierCurveTo(b,c=(c+e)/2,d,c,d,e)}function qj(a,b,c,d,e){var f=kj(b,c),g=kj(b,c=(c+e)/2),h=kj(d,c),i=kj(d,e);a.moveTo(f[0],f[1]),a.bezierCurveTo(g[0],g[1],h[0],h[1],i[0],i[1])}function rj(){}function sj(a,b,c){a._context.bezierCurveTo((2*a._x0+a._x1)/3,(2*a._y0+a._y1)/3,(a._x0+2*a._x1)/3,(a._y0+2*a._y1)/3,(a._x0+4*a._x1+b)/6,(a._y0+4*a._y1+c)/6)}function tj(a){this._context=a}function uj(a){this._context=a}function vj(a){this._context=a}function wj(a,b){this._basis=new tj(a),this._beta=b}function xj(a,b,c){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-b),a._y2+a._k*(a._y1-c),a._x2,a._y2)}function yj(a,b){this._context=a,this._k=(1-b)/6}function zj(a,b){this._context=a,this._k=(1-b)/6}function Aj(a,b){this._context=a,this._k=(1-b)/6}function Bj(a,b,c){var d=a._x1,e=a._y1,f=a._x2,g=a._y2;if(a._l01_a>tt){var h=2*a._l01_2a+3*a._l01_a*a._l12_a+a._l12_2a,i=3*a._l01_a*(a._l01_a+a._l12_a);d=(d*h-a._x0*a._l12_2a+a._x2*a._l01_2a)/i,e=(e*h-a._y0*a._l12_2a+a._y2*a._l01_2a)/i}if(a._l23_a>tt){var j=2*a._l23_2a+3*a._l23_a*a._l12_a+a._l12_2a,k=3*a._l23_a*(a._l23_a+a._l12_a);f=(f*j+a._x1*a._l23_2a-b*a._l12_2a)/k,g=(g*j+a._y1*a._l23_2a-c*a._l12_2a)/k}a._context.bezierCurveTo(d,e,f,g,a._x2,a._y2)}function Cj(a,b){this._context=a,this._alpha=b}function Dj(a,b){this._context=a,this._alpha=b}function Ej(a,b){this._context=a,this._alpha=b}function Fj(a){this._context=a}function Gj(a){return a<0?-1:1}function Hj(a,b,c){var d=a._x1-a._x0,e=b-a._x1,f=(a._y1-a._y0)/(d||e<0&&-0),g=(c-a._y1)/(e||d<0&&-0),h=(f*e+g*d)/(d+e);return(Gj(f)+Gj(g))*Math.min(Math.abs(f),Math.abs(g),.5*Math.abs(h))||0}function Ij(a,b){var c=a._x1-a._x0;return c?(3*(a._y1-a._y0)/c-b)/2:b}function Jj(a,b,c){var d=a._x0,e=a._y0,f=a._x1,g=a._y1,h=(f-d)/3;a._context.bezierCurveTo(d+h,e+h*b,f-h,g-h*c,f,g)}function Kj(a){ this._context=a}function Lj(a){this._context=new Mj(a)}function Mj(a){this._context=a}function Nj(a){this._context=a}function Oj(a){var b,c,d=a.length-1,e=new Array(d),f=new Array(d),g=new Array(d);for(e[0]=0,f[0]=2,g[0]=a[0]+2*a[1],b=1;b=0;--b)e[b]=(g[b]-e[b+1])/f[b];for(f[d-1]=(a[d]+e[d-1])/2,b=0;b1)for(var c,d,e,f=1,g=a[b[0]],h=g.length;f=0;)c[b]=b;return c}function Sj(a,b){return a[b]}function Tj(a){var b=a.map(Uj);return Rj(a).sort(function(a,c){return b[a]-b[c]})}function Uj(a){for(var b,c=-1,d=0,e=a.length,f=-1/0;++cf&&(f=b,d=c);return d}function Vj(a){var b=a.map(Wj);return Rj(a).sort(function(a,c){return b[a]-b[c]})}function Wj(a){for(var b,c=0,d=-1,e=a.length;++d0)){if(f/=m,m<0){if(f0){if(f>l)return;f>k&&(k=f)}if(f=d-i,m||!(f<0)){if(f/=m,m<0){if(f>l)return;f>k&&(k=f)}else if(m>0){if(f0)){if(f/=n,n<0){if(f0){if(f>l)return;f>k&&(k=f)}if(f=e-j,n||!(f<0)){if(f/=n,n<0){if(f>l)return;f>k&&(k=f)}else if(n>0){if(f0||l<1)||(k>0&&(a[0]=[i+k*m,j+k*n]),l<1&&(a[1]=[i+l*m,j+l*n]),!0)}}}}}function hk(a,b,c,d,e){var f=a[1];if(f)return!0;var g,h,i=a[0],j=a.left,k=a.right,l=j[0],m=j[1],n=k[0],o=k[1],p=(l+n)/2,q=(m+o)/2;if(o===m){if(p=d)return;if(l>n){if(i){if(i[1]>=e)return}else i=[p,c];f=[p,e]}else{if(i){if(i[1]1)if(l>n){if(i){if(i[1]>=e)return}else i=[(c-h)/g,c];f=[(e-h)/g,e]}else{if(i){if(i[1]=d)return}else i=[b,g*b+h];f=[d,g*d+h]}else{if(i){if(i[0]=-du)){var n=i*i+j*j,o=k*k+l*l,p=(l*n-j*o)/m,q=(i*o-k*n)/m,r=au.pop()||new lk;r.arc=a,r.site=e,r.x=p+g,r.y=(r.cy=q+h)+Math.sqrt(p*p+q*q),a.circle=r;for(var s=null,t=$t._;t;)if(r.ycu)h=h.L;else{if(!((e=f-uk(h,g))>cu)){d>-cu?(b=h.P,c=h):e>-cu?(b=h,c=h.N):b=c=h;break}if(!h.R){b=h;break}h=h.R}!function(a){Zt[a.index]={site:a,halfedges:[]}}(a);var i=pk(a);if(Yt.insert(b,i),b||c){if(b===c)return nk(b),c=pk(b.site),Yt.insert(i,c),i.edge=c.edge=dk(b.site,i.site),mk(b),void mk(c);if(c){nk(b),nk(c);var j=b.site,k=j[0],l=j[1],m=a[0]-k,n=a[1]-l,o=c.site,p=o[0]-k,q=o[1]-l,r=2*(m*q-n*p),s=m*m+n*n,t=p*p+q*q,u=[(q*s-n*t)/r+k,(m*t-p*s)/r+l];fk(c.edge,j,o,u),i.edge=dk(j,a,null,u),c.edge=dk(a,o,null,u),mk(b),mk(c)}else i.edge=dk(b.site,i.site)}}function tk(a,b){var c=a.site,d=c[0],e=c[1],f=e-b;if(!f)return d;var g=a.P;if(!g)return-1/0;var h=(c=g.site)[0],i=c[1],j=i-b;if(!j)return h;var k=h-d,l=1/f-1/j,m=k/j;return l?(-m+Math.sqrt(m*m-2*l*(k*k/(-2*j)-i+j/2+e-f/2)))/l+d:(d+h)/2}function uk(a,b){var c=a.N;if(c)return tk(c,b);var d=a.site;return d[1]===b?d[0]:1/0}function vk(a,b,c){return(a[0]-c[0])*(b[1]-a[1])-(a[0]-b[0])*(c[1]-a[1])}function wk(a,b){return b[1]-a[1]||b[0]-a[0]}function xk(a,b){var c,d,e,f=a.sort(wk).pop();for(_t=[],Zt=new Array(a.length),Yt=new $j,$t=new $j;;)if(e=Xt,f&&(!e||f[1]cu||Math.abs(e[0][1]-e[1][1])>cu)||delete _t[f]}(g,h,i,j),function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q=Zt.length,r=!0;for(e=0;ecu||Math.abs(p-m)>cu)&&(i.splice(h,0,_t.push(ek(g,n,Math.abs(o-a)cu?[a,Math.abs(l-a)cu?[Math.abs(m-d)cu?[c,Math.abs(l-c)cu?[Math.abs(m-b)d?(d+e)/2:Math.min(0,d)||Math.max(0,e),g>f?(f+g)/2:Math.min(0,f)||Math.max(0,g))}var Kk=c(b),Lk=Kk.right,Mk=Kk.left,Nk=Array.prototype,Ok=Nk.slice,Pk=Nk.map,Qk=Math.sqrt(50),Rk=Math.sqrt(10),Sk=Math.sqrt(2),Tk=Array.prototype.slice,Uk=1,Vk=2,Wk=3,Xk=4,Yk=1e-6,Zk={value:function(){}};B.prototype=A.prototype={constructor:B,on:function(a,b){var c,d=this._,e=C(a+"",d),f=-1,g=e.length;if(!(arguments.length<2)){if(null!=b&&"function"!=typeof b)throw new Error("invalid callback: "+b);for(;++f0)for(var c,d,e=new Array(c),f=0;f=0&&(this._names.splice(b,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(a){return this._names.indexOf(a)>=0}};var bl={};a.event=null,"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(bl={mouseenter:"mouseover",mouseleave:"mouseout"}));var cl=[null];ka.prototype=la.prototype={constructor:ka,select:function(a){"function"!=typeof a&&(a=I(a));for(var b=this._groups,c=b.length,d=new Array(c),e=0;e=u&&(u=t+1);!(s=q[u])&&++u=0;)(d=e[f])&&(g&&4^d.compareDocumentPosition(g)&&g.parentNode.insertBefore(d,g),g=d);return this},sort:function(a){function b(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}a||(a=Q);for(var c=this._groups,d=c.length,e=new Array(d),f=0;f1?this.each((null==b?function(a){return function(){this.style.removeProperty(a)}}:"function"==typeof b?function(a,b,c){return function(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}}:function(a,b,c){return function(){this.style.setProperty(a,b,c)}})(a,b,null==c?"":c)):S(this.node(),a)},property:function(a,b){return arguments.length>1?this.each((null==b?function(a){return function(){delete this[a]}}:"function"==typeof b?function(a,b){return function(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}}:function(a,b){return function(){this[a]=b}})(a,b)):this.node()[a]},classed:function(a,b){var c=T(a+"");if(arguments.length<2){for(var d=U(this.node()),e=-1,f=c.length;++e=0&&(b=a.slice(c+1),a=a.slice(0,c)),{type:a,name:b}})}(a+""),g=f.length;if(!(arguments.length<2)){for(h=b?ha:ga,null==c&&(c=!1),d=0;d=240?a-240:a+120,e,d),Va(a,e,d),Va(a<120?a+240:a-120,e,d),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 a=this.opacity;return(1===(a=isNaN(a)?1:Math.max(0,Math.min(1,a)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===a?")":", "+a+")")}}));var pl=Math.PI/180,ql=180/Math.PI,rl=.96422,sl=1,tl=.82521,ul=4/29,vl=6/29,wl=3*vl*vl,xl=vl*vl*vl;Da(Ya,Xa,Ea(Fa,{brighter:function(a){return new Ya(this.l+18*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new Ya(this.l-18*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return new Na(_a(3.1338561*(b=rl*$a(b))-1.6168667*(a=sl*$a(a))-.4906146*(c=tl*$a(c))),_a(-.9787684*b+1.9161415*a+.033454*c),_a(.0719453*b-.2289914*a+1.4052427*c),this.opacity)}})),Da(db,cb,Ea(Fa,{brighter:function(a){return new db(this.h,this.c,this.l+18*(null==a?1:a),this.opacity)},darker:function(a){return new db(this.h,this.c,this.l-18*(null==a?1:a),this.opacity)},rgb:function(){return eb(this).rgb()}}));var yl=-.14861,zl=1.78277,Al=-.29227,Bl=-.90649,Cl=1.97294,Dl=Cl*Bl,El=Cl*zl,Fl=zl*Al-Bl*yl;Da(gb,fb,Ea(Fa,{brighter:function(a){return a=null==a?1/.7:Math.pow(1/.7,a),new gb(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?.7:Math.pow(.7,a),new gb(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*pl,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),e=Math.sin(a);return new Na(255*(b+c*(yl*d+zl*e)),255*(b+c*(Al*d+Bl*e)),255*(b+c*(Cl*d)),this.opacity)}}));var Gl,Hl,Il,Jl,Kl,Ll,Ml=function a(b){function c(a,b){var c=d((a=Ma(a)).r,(b=Ma(b)).r),e=d(a.g,b.g),f=d(a.b,b.b),g=ob(a.opacity,b.opacity);return function(b){return a.r=c(b),a.g=e(b),a.b=f(b),a.opacity=g(b),a+""}}var d=nb(b);return c.gamma=a,c}(1),Nl=pb(ib),Ol=pb(jb),Pl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ql=new RegExp(Pl.source,"g"),Rl=180/Math.PI,Sl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Tl=yb(function(a){return"none"===a?Sl:(Gl||(Gl=document.createElement("DIV"),Hl=document.documentElement,Il=document.defaultView),Gl.style.transform=a,a=Il.getComputedStyle(Hl.appendChild(Gl),null).getPropertyValue("transform"),Hl.removeChild(Gl),xb(+(a=a.slice(7,-1).split(","))[0],+a[1],+a[2],+a[3],+a[4],+a[5]))},"px, ","px)","deg)"),Ul=yb(function(a){return null==a?Sl:(Jl||(Jl=document.createElementNS("http://www.w3.org/2000/svg","g")),Jl.setAttribute("transform",a),(a=Jl.transform.baseVal.consolidate())?xb((a=a.matrix).a,a.b,a.c,a.d,a.e,a.f):Sl)},", ",")",")"),Vl=Math.SQRT2,Wl=2,Xl=4,Yl=1e-12,Zl=Bb(mb),$l=Bb(ob),_l=Cb(mb),am=Cb(ob),bm=Db(mb),cm=Db(ob),dm=0,em=0,fm=0,gm=1e3,hm=0,im=0,jm=0,km="object"==typeof performance&&performance.now?performance:Date,lm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(a){setTimeout(a,17)};Gb.prototype=Hb.prototype={constructor:Gb,restart:function(a,b,c){if("function"!=typeof a)throw new TypeError("callback is not a function");c=(null==c?Eb():+c)+(null==b?0:+b),this._next||Ll===this||(Ll?Ll._next=this:Kl=this,Ll=this),this._call=a,this._time=c,Lb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lb())}};var mm=A("start","end","cancel","interrupt"),nm=[],om=0,pm=1,qm=2,rm=3,sm=4,tm=5,um=6,vm=la.prototype.constructor,wm=0,xm=la.prototype;Vb.prototype=Wb.prototype={constructor:Vb,select:function(a){var b=this._name,c=this._id;"function"!=typeof a&&(a=I(a));for(var d=this._groups,e=d.length,f=new Array(e),g=0;g=0&&(a=a.slice(0,b)),!a||"start"===a})}(b)?Ob:Pb;return function(){var g=f(this,a),h=g.on;h!==d&&(e=(d=h).copy()).on(b,c),g.on=e}}(c,a,b))},attr:function(a,b){var c=F(a),d="transform"===c?Ul:Tb;return this.attrTween(a,"function"==typeof b?(c.local?function(a,b,c){var d,e,f;return function(){var g,h,i=c(this);return null!=i?(g=this.getAttributeNS(a.space,a.local))===(h=i+"")?null:g===d&&h===e?f:(e=h,f=b(d=g,i)):void this.removeAttributeNS(a.space,a.local)}}:function(a,b,c){var d,e,f;return function(){var g,h,i=c(this);return null!=i?(g=this.getAttribute(a))===(h=i+"")?null:g===d&&h===e?f:(e=h,f=b(d=g,i)):void this.removeAttribute(a)}})(c,d,Sb(this,"attr."+a,b)):null==b?(c.local?function(a){return function(){this.removeAttributeNS(a.space,a.local)}}:function(a){return function(){this.removeAttribute(a)}})(c):(c.local?function(a,b,c){var d,e,f=c+"";return function(){var g=this.getAttributeNS(a.space,a.local);return g===f?null:g===d?e:e=b(d=g,c)}}:function(a,b,c){var d,e,f=c+"";return function(){var g=this.getAttribute(a);return g===f?null:g===d?e:e=b(d=g,c)}})(c,d,b))},attrTween:function(a,b){var c="attr."+a;if(arguments.length<2)return(c=this.tween(c))&&c._value;if(null==b)return this.tween(c,null);if("function"!=typeof b)throw new Error;var d=F(a);return this.tween(c,(d.local?function(a,b){function c(){var c=b.apply(this,arguments);return c!==e&&(d=(e=c)&&function(a,b){return function(c){this.setAttributeNS(a.space,a.local,b.call(this,c))}}(a,c)),d}var d,e;return c._value=b,c}:function(a,b){function c(){var c=b.apply(this,arguments);return c!==e&&(d=(e=c)&&function(a,b){return function(c){this.setAttribute(a,b.call(this,c))}}(a,c)),d}var d,e;return c._value=b,c})(d,b))},style:function(a,b,c){var d="transform"==(a+="")?Tl:Tb;return null==b?this.styleTween(a,function(a,b){var c,d,e;return function(){var f=S(this,a),g=(this.style.removeProperty(a),S(this,a));return f===g?null:f===c&&g===d?e:e=b(c=f,d=g)}}(a,d)).on("end.style."+a,Ub(a)):"function"==typeof b?this.styleTween(a,function(a,b,c){var d,e,f;return function(){var g=S(this,a),h=c(this),i=h+"";return null==h&&(this.style.removeProperty(a),i=h=S(this,a)),g===i?null:g===d&&i===e?f:(e=i,f=b(d=g,h))}}(a,d,Sb(this,"style."+a,b))).each(function(a,b){var c,d,e,f,g="style."+b,h="end."+g;return function(){var i=Pb(this,a),j=i.on,k=null==i.value[g]?f||(f=Ub(b)):void 0;j===c&&e===k||(d=(c=j).copy()).on(h,e=k),i.on=d}}(this._id,a)):this.styleTween(a,function(a,b,c){var d,e,f=c+"";return function(){var g=S(this,a);return g===f?null:g===d?e:e=b(d=g,c)}}(a,d,b),c).on("end.style."+a,null)},styleTween:function(a,b,c){var d="style."+(a+="");if(arguments.length<2)return(d=this.tween(d))&&d._value;if(null==b)return this.tween(d,null);if("function"!=typeof b)throw new Error;return this.tween(d,function(a,b,c){function d(){var d=b.apply(this,arguments);return d!==f&&(e=(f=d)&&function(a,b,c){return function(d){this.style.setProperty(a,b.call(this,d),c)}}(a,d,c)),e}var e,f;return d._value=b,d}(a,b,null==c?"":c))},text:function(a){return this.tween("text","function"==typeof a?function(a){return function(){var b=a(this);this.textContent=null==b?"":b}}(Sb(this,"text",a)):function(a){return function(){this.textContent=a}}(null==a?"":a+""))},textTween:function(a){var b="text";if(arguments.length<1)return(b=this.tween(b))&&b._value;if(null==a)return this.tween(b,null);if("function"!=typeof a)throw new Error;return this.tween(b,function(a){function b(){var b=a.apply(this,arguments);return b!==d&&(c=(d=b)&&function(a){return function(b){this.textContent=a.call(this,b)}}(b)),c}var c,d;return b._value=a,b}(a))},remove:function(){return this.on("end.remove",function(a){return function(){var b=this.parentNode;for(var c in this.__transition)if(+c!==a)return;b&&b.removeChild(this)}}(this._id))},tween:function(a,b){var c=this._id;if(a+="",arguments.length<2){for(var d,e=Qb(this.node(),c).tween,f=0,g=e.length;f1e-6)if(Math.abs(k*h-i*j)>1e-6&&e){var m=c-f,n=d-g,o=h*h+i*i,p=m*m+n*n,q=Math.sqrt(o),r=Math.sqrt(l),s=e*Math.tan((on-Math.acos((o+l-p)/(2*q*r)))/2),t=s/r,u=s/q;Math.abs(t-1)>1e-6&&(this._+="L"+(a+t*j)+","+(b+t*k)),this._+="A"+e+","+e+",0,0,"+ +(k*m>j*n)+","+(this._x1=a+u*h)+","+(this._y1=b+u*i)}else this._+="L"+(this._x1=a)+","+(this._y1=b)},arc:function(a,b,c,d,e,f){a=+a,b=+b,f=!!f;var g=(c=+c)*Math.cos(d),h=c*Math.sin(d),i=a+g,j=b+h,k=1^f,l=f?d-e:e-d;if(c<0)throw new Error("negative radius: "+c);null===this._x1?this._+="M"+i+","+j:(Math.abs(this._x1-i)>1e-6||Math.abs(this._y1-j)>1e-6)&&(this._+="L"+i+","+j),c&&(l<0&&(l=l%pn+pn),l>qn?this._+="A"+c+","+c+",0,1,"+k+","+(a-g)+","+(b-h)+"A"+c+","+c+",0,1,"+k+","+(this._x1=i)+","+(this._y1=j):l>1e-6&&(this._+="A"+c+","+c+",0,"+ +(l>=on)+","+k+","+(this._x1=a+c*Math.cos(e))+","+(this._y1=b+c*Math.sin(e))))},rect:function(a,b,c,d){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+b)+"h"+ +c+"v"+ +d+"h"+-c+"Z"},toString:function(){return this._}},yc.prototype=zc.prototype={constructor:yc,has:function(a){return"$"+a in this},get:function(a){return this["$"+a]},set:function(a,b){return this["$"+a]=b,this},remove:function(a){var b="$"+a;return b in this&&delete this[b]},clear:function(){for(var a in this)"$"===a[0]&&delete this[a]},keys:function(){var a=[];for(var b in this)"$"===b[0]&&a.push(b.slice(1));return a},values:function(){var a=[];for(var b in this)"$"===b[0]&&a.push(this[b]);return a},entries:function(){var a=[];for(var b in this)"$"===b[0]&&a.push({key:b.slice(1),value:this[b]});return a},size:function(){var a=0;for(var b in this)"$"===b[0]&&++a;return a},empty:function(){for(var a in this)if("$"===a[0])return!1;return!0},each:function(a){for(var b in this)"$"===b[0]&&a(this[b],b.slice(1),this)}};var rn=zc.prototype;Ec.prototype=Fc.prototype={constructor:Ec,has:rn.has,add:function(a){return this["$"+(a+="")]=a,this},remove:rn.remove,clear:rn.clear,values:rn.keys,size:rn.size,empty:rn.empty,each:rn.each};var sn=Array.prototype.slice,tn=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],un={},vn={},wn=34,xn=10,yn=13,zn=Wc(","),An=zn.parse,Bn=zn.parseRows,Cn=zn.format,Dn=zn.formatBody,En=zn.formatRows,Fn=zn.formatRow,Gn=zn.formatValue,Hn=Wc("\t"),In=Hn.parse,Jn=Hn.parseRows,Kn=Hn.format,Ln=Hn.formatBody,Mn=Hn.formatRows,Nn=Hn.formatRow,On=Hn.formatValue,Pn=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Qn=_c(An),Rn=_c(In),Sn=bd("application/xml"),Tn=bd("text/html"),Un=bd("image/svg+xml"),Vn=id.prototype=jd.prototype;Vn.copy=function(){var a,b,c=new jd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),d=this._root;if(!d)return c;if(!d.length)return c._root=kd(d),c;for(a=[{source:d,target:c._root=new Array(4)}];d=a.pop();)for(var e=0;e<4;++e)(b=d.source[e])&&(b.length?a.push({source:b,target:d.target[e]=new Array(4)}):d.target[e]=kd(b));return c},Vn.add=function(a){var b=+this._x.call(null,a),c=+this._y.call(null,a);return ed(this.cover(b,c),b,c,a)},Vn.addAll=function(a){var b,c,d,e,f=a.length,g=new Array(f),h=new Array(f),i=1/0,j=1/0,k=-1/0,l=-1/0;for(c=0;ck&&(k=d),el&&(l=e));if(i>k||j>l)return this;for(this.cover(i,j).cover(k,l),c=0;ca||a>=e||d>b||b>=f;)switch(h=(bm||(f=i.y0)>n||(g=i.x1)=r)<<1|a>=q)&&(i=o[o.length-1],o[o.length-1]=o[o.length-1-j],o[o.length-1-j]=i)}else{var s=a-+this._x.call(null,p.data),t=b-+this._y.call(null,p.data),u=s*s+t*t;if(u=(h=(o+q)/2))?o=h:q=h,(k=g>=(i=(p+r)/2))?p=i:r=i,b=n,!(n=n[l=k<<1|j]))return this;if(!n.length)break;(b[l+1&3]||b[l+2&3]||b[l+3&3])&&(c=b,m=l)}for(;n.data!==a;)if(d=n,!(n=n.next))return this;return(e=n.next)&&delete n.next,d?(e?d.next=e:delete d.next,this):b?(e?b[l]=e:delete b[l],(n=b[0]||b[1]||b[2]||b[3])&&n===(b[3]||b[2]||b[1]||b[0])&&!n.length&&(c?c[m]=n:this._root=n),this):(this._root=e,this)},Vn.removeAll=function(a){for(var b=0,c=a.length;b=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;td.prototype=ud.prototype,ud.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 $n,_n={"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return vd(100*a,b)},r:vd,s:function(a,b){var c=rd(a,b);if(!c)return a+"";var d=c[0],e=c[1],f=e-(Wn=3*Math.max(-8,Math.min(8,Math.floor(e/3))))+1,g=d.length;return f===g?d:f>g?d+new Array(f-g+1).join("0"):f>0?d.slice(0,f)+"."+d.slice(f):"0."+new Array(1-f).join("0")+rd(a,Math.max(0,b+f-1))[0]},X:function(a){return Math.round(a).toString(16).toUpperCase()},x:function(a){return Math.round(a).toString(16)}},ao=Array.prototype.map,bo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];yd({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Dd.prototype={constructor:Dd,reset:function(){this.s=this.t=0},add:function(a){Ed(Io,a,this.t),Ed(this,Io.s,this.s),this.s?this.t+=Io.t:this.s=Io.t},valueOf:function(){return this.s}};var co,eo,fo,go,ho,io,jo,ko,lo,mo,no,oo,po,qo,ro,so,to,uo,vo,wo,xo,yo,zo,Ao,Bo,Co,Do,Eo,Fo,Go,Ho,Io=new Dd,Jo=1e-6,Ko=1e-12,Lo=Math.PI,Mo=Lo/2,No=Lo/4,Oo=2*Lo,Po=180/Lo,Qo=Lo/180,Ro=Math.abs,So=Math.atan,To=Math.atan2,Uo=Math.cos,Vo=Math.ceil,Wo=Math.exp,Xo=Math.log,Yo=Math.pow,Zo=Math.sin,$o=Math.sign||function(a){return a>0?1:a<0?-1:0},_o=Math.sqrt,ap=Math.tan,bp={Feature:function(a,b){Jd(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++dJo?lo=90:gp<-Jo&&(jo=-90),ro[0]=io,ro[1]=ko},sphere:function(){io=-(ko=180),jo=-(lo=90)}},ip={sphere:Id,point:ge,lineStart:ie,lineEnd:le,polygonStart:function(){ip.lineStart=me,ip.lineEnd=ne},polygonEnd:function(){ip.lineStart=ie,ip.lineEnd=le}};se.invert=se;var jp,kp,lp,mp,np,op,pp,qp,rp,sp,tp,up=Cd(),vp=He(function(){return!0},function(a){var b,c=NaN,d=NaN,e=NaN;return{lineStart:function(){a.lineStart(),b=1},point:function(f,g){var h=f>0?Lo:-Lo,i=Ro(f-c);Ro(i-Lo)0?Mo:-Mo),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0):e!==h&&i>=Lo&&(Ro(c-e)Jo?So((Zo(b)*(f=Uo(d))*Zo(c)-Zo(d)*(e=Uo(b))*Zo(a))/(e*f*g)):(b+d)/2}(c,d,f,g),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),b=0),a.point(c=f,d=g),e=h},lineEnd:function(){a.lineEnd(),c=d=NaN},clean:function(){return 2-b}}},function(a,b,c,d){var e;if(null==a)e=c*Mo,d.point(-Lo,e),d.point(0,e),d.point(Lo,e),d.point(Lo,0),d.point(Lo,-e),d.point(0,-e),d.point(-Lo,-e),d.point(-Lo,0),d.point(-Lo,e);else if(Ro(a[0]-b[0])>Jo){var f=a[0]Jp&&(Jp=a),bKp&&(Kp=b)},lineStart:Id,lineEnd:Id,polygonStart:Id,polygonEnd:Id,result:function(){var a=[[Hp,Ip],[Jp,Kp]];return Jp=Kp=-(Ip=Hp=1/0),a}},Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp={point:df,lineStart:ef,lineEnd:hf,polygonStart:function(){Vp.lineStart=jf,Vp.lineEnd=kf},polygonEnd:function(){Vp.point=df,Vp.lineStart=ef,Vp.lineEnd=hf},result:function(){var a=Up?[Sp/Up,Tp/Up]:Rp?[Pp/Rp,Qp/Rp]:Op?[Mp/Op,Np/Op]:[NaN,NaN];return Mp=Np=Op=Pp=Qp=Rp=Sp=Tp=Up=0,a}};nf.prototype={_radius:4.5,pointRadius:function(a){return this._radius=a,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(a,b){switch(this._point){case 0:this._context.moveTo(a,b),this._point=1;break;case 1:this._context.lineTo(a,b);break;default:this._context.moveTo(a+this._radius,b),this._context.arc(a,b,this._radius,0,Oo)}},result:Id};var Wp,Xp,Yp,Zp,$p,_p=Cd(),aq={point:Id,lineStart:function(){aq.point=of},lineEnd:function(){Wp&&pf(Xp,Yp),aq.point=Id},polygonStart:function(){Wp=!0},polygonEnd:function(){Wp=null},result:function(){var a=+_p;return _p.reset(),a}};qf.prototype={_radius:4.5,_circle:rf(4.5),pointRadius:function(a){return(a=+a)!==this._radius&&(this._radius=a,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(a,b){switch(this._point){case 0:this._string.push("M",a,",",b),this._point=1;break;case 1:this._string.push("L",a,",",b);break;default:null==this._circle&&(this._circle=rf(this._radius)),this._string.push("M",a,",",b,this._circle)}},result:function(){if(this._string.length){var a=this._string.join("");return this._string=[],a}return null}},tf.prototype={constructor:tf,point:function(a,b){this.stream.point(a,b)},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 bq=16,cq=Uo(30*Qo),dq=sf({point:function(a,b){this.stream.point(a*Qo,b*Qo)}}),eq=Hf(function(a){return _o(2/(1+a))});eq.invert=If(function(a){return 2*Gd(a/2)});var fq=Hf(function(a){return(a=Fd(a))&&a/Zo(a)});fq.invert=If(function(a){return a}),Jf.invert=function(a,b){return[a,2*So(Wo(b))-Mo]},Nf.invert=Nf;var gq=1.340264,hq=-.081106,iq=893e-6,jq=.003796,kq=_o(3)/2;Pf.invert=function(a,b){for(var c,d=b,e=d*d,f=e*e*e,g=0;g<12&&(f=(e=(d-=c=(d*(gq+hq*e+f*(iq+jq*e))-b)/(gq+3*hq*e+f*(7*iq+9*jq*e)))*d)*e*e,!(Ro(c)Jo&&--e>0);return[a/(.8707+(f=d*d)*(f*(f*f*f*(.003971-.001529*f)-.013791)-.131979)),d]},Tf.invert=If(Gd),Uf.invert=If(function(a){return 2*So(a)}),Vf.invert=function(a,b){return[-b,2*So(Wo(a))-Mo]},cg.prototype=$f.prototype={constructor:cg,count:function(){return this.eachAfter(Zf)},each:function(a){var b,c,d,e,f=this,g=[f];do for(b=g.reverse(),g=[];f=b.pop();)if(a(f),c=f.children)for(d=0,e=c.length;d=0;--c)e.push(b[c]);return this},sum:function(a){return this.eachAfter(function(b){for(var c=+a(b.data)||0,d=b.children,e=d&&d.length;--e>=0;)c+=d[e].value;b.value=c})},sort:function(a){return this.eachBefore(function(b){b.children&&b.children.sort(a)})},path:function(a){for(var b=this,c=function(a,b){if(a===b)return a;var c=a.ancestors(),d=b.ancestors(),e=null;for(a=c.pop(),b=d.pop();a===b;)e=a,a=c.pop(),b=d.pop();return e}(b,a),d=[b];b!==c;)b=b.parent,d.push(b);for(var e=d.length;a!==c;)d.splice(e,0,a),a=a.parent;return d},ancestors:function(){for(var a=this,b=[a];a=a.parent;)b.push(a);return b},descendants:function(){var a=[];return this.each(function(b){a.push(b)}),a},leaves:function(){var a=[];return this.eachBefore(function(b){b.children||a.push(b)}),a},links:function(){var a=this,b=[];return a.each(function(c){c!==a&&b.push({source:c.parent,target:c})}),b},copy:function(){return $f(this).eachBefore(ag)}};var lq=Array.prototype.slice,mq="$",nq={depth:-1},oq={};Hg.prototype=Object.create(cg.prototype);var pq=(1+Math.sqrt(5))/2,qq=function a(b){function c(a,c,d,e,f){Jg(b,a,c,d,e,f)}return c.ratio=function(b){return a((b=+b)>1?b:1)},c}(pq),rq=function a(b){function c(a,c,d,e,f){if((g=a._squarify)&&g.ratio===b)for(var g,h,i,j,k,l=-1,m=g.length,n=a.value;++l1?b:1)},c}(pq),sq=function a(b){function c(a,c){return a=null==a?0:+a,c=null==c?1:+c,1===arguments.length?(c=a,a=0):c-=a,function(){return b()*c+a}}return c.source=a,c}(Ng),tq=function a(b){function c(a,c){var d,e;return a=null==a?0:+a,c=null==c?1:+c,function(){var f;if(null!=d)f=d,d=null;else do d=2*b()-1,f=2*b()-1,e=d*d+f*f;while(!e||e>1);return a+c*f*Math.sqrt(-2*Math.log(e)/e)}}return c.source=a,c}(Ng),uq=function a(b){function c(){var a=tq.source(b).apply(this,arguments);return function(){return Math.exp(a())}}return c.source=a,c}(Ng),vq=function a(b){function c(a){return function(){for(var c=0,d=0;d0?a>1?rh(function(b){b.setTime(Math.floor(b/a)*a)},function(b,c){b.setTime(+b+c*a)},function(b,c){return(c-b)/a}):Fq:null};var Gq=Fq.range,Hq=6e4,Iq=6048e5,Jq=rh(function(a){a.setTime(a-a.getMilliseconds())},function(a,b){a.setTime(+a+1e3*b)},function(a,b){return(b-a)/1e3},function(a){return a.getUTCSeconds()}),Kq=Jq.range,Lq=rh(function(a){a.setTime(a-a.getMilliseconds()-1e3*a.getSeconds())},function(a,b){a.setTime(+a+b*Hq)},function(a,b){return(b-a)/Hq},function(a){return a.getMinutes()}),Mq=Lq.range,Nq=rh(function(a){a.setTime(a-a.getMilliseconds()-1e3*a.getSeconds()-a.getMinutes()*Hq)},function(a,b){a.setTime(+a+36e5*b)},function(a,b){return(b-a)/36e5},function(a){return a.getHours()}),Oq=Nq.range,Pq=rh(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*Hq)/864e5},function(a){return a.getDate()-1}),Qq=Pq.range,Rq=sh(0),Sq=sh(1),Tq=sh(2),Uq=sh(3),Vq=sh(4),Wq=sh(5),Xq=sh(6),Yq=Rq.range,Zq=Sq.range,$q=Tq.range,_q=Uq.range,ar=Vq.range,br=Wq.range,cr=Xq.range,dr=rh(function(a){a.setDate(1),a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),er=dr.range,fr=rh(function(a){a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});fr.every=function(a){return isFinite(a=Math.floor(a))&&a>0?rh(function(b){b.setFullYear(Math.floor(b.getFullYear()/a)*a),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,c){b.setFullYear(b.getFullYear()+c*a)}):null};var gr=fr.range,hr=rh(function(a){a.setUTCSeconds(0,0)},function(a,b){a.setTime(+a+b*Hq)},function(a,b){return(b-a)/Hq},function(a){return a.getUTCMinutes()}),ir=hr.range,jr=rh(function(a){a.setUTCMinutes(0,0,0)},function(a,b){a.setTime(+a+36e5*b)},function(a,b){return(b-a)/36e5},function(a){return a.getUTCHours()}),kr=jr.range,lr=rh(function(a){a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+b)},function(a,b){return(b-a)/864e5},function(a){return a.getUTCDate()-1}),mr=lr.range,nr=th(0),or=th(1),pr=th(2),qr=th(3),rr=th(4),sr=th(5),tr=th(6),ur=nr.range,vr=or.range,wr=pr.range,xr=qr.range,yr=rr.range,zr=sr.range,Ar=tr.range,Br=rh(function(a){a.setUTCDate(1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCMonth(a.getUTCMonth()+b)},function(a,b){return b.getUTCMonth()-a.getUTCMonth()+12*(b.getUTCFullYear()-a.getUTCFullYear())},function(a){return a.getUTCMonth()}),Cr=Br.range,Dr=rh(function(a){a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCFullYear(a.getUTCFullYear()+b)},function(a,b){return b.getUTCFullYear()-a.getUTCFullYear()},function(a){return a.getUTCFullYear()});Dr.every=function(a){return isFinite(a=Math.floor(a))&&a>0?rh(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/a)*a),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,c){b.setUTCFullYear(b.getUTCFullYear()+c*a)}):null};var Er,Fr=Dr.range,Gr={"-":"",_:" ",0:"0"},Hr=/^\s*\d+/,Ir=/^%/,Jr=/[\\^$*+?|[\]().{}]/g;Fi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Kr=Date.prototype.toISOString?function(a){return a.toISOString()}:a.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),Lr=+new Date("2000-01-01T00:00:00.000Z")?function(a){var b=new Date(a);return isNaN(b)?null:b}:a.utcParse("%Y-%m-%dT%H:%M:%S.%LZ"),Mr=1e3,Nr=60*Mr,Or=60*Nr,Pr=24*Or,Qr=7*Pr,Rr=30*Pr,Sr=365*Pr,Tr=Oi("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Ur=Oi("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Vr=Oi("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Wr=Oi("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Xr=Oi("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Yr=Oi("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Zr=Oi("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),$r=Oi("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),_r=Oi("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),as=Oi("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bs=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Oi),cs=Pi(bs),ds=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Oi),es=Pi(ds),fs=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Oi),gs=Pi(fs),hs=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Oi),is=Pi(hs),js=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Oi),ks=Pi(js),ls=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Oi),ms=Pi(ls),ns=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Oi),os=Pi(ns),ps=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Oi),qs=Pi(ps),rs=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Oi),ss=Pi(rs),ts=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Oi),us=Pi(ts),vs=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Oi),ws=Pi(vs),xs=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Oi),ys=Pi(xs),zs=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Oi),As=Pi(zs),Bs=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Oi),Cs=Pi(Bs),Ds=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Oi),Es=Pi(Ds),Fs=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Oi),Gs=Pi(Fs),Hs=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Oi),Is=Pi(Hs),Js=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Oi),Ks=Pi(Js),Ls=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Oi),Ms=Pi(Ls),Ns=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Oi),Os=Pi(Ns),Ps=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Oi),Qs=Pi(Ps),Rs=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Oi),Ss=Pi(Rs),Ts=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Oi),Us=Pi(Ts),Vs=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Oi),Ws=Pi(Vs),Xs=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Oi),Ys=Pi(Xs),Zs=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Oi),$s=Pi(Zs),_s=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Oi),at=Pi(_s),bt=cm(fb(300,.5,0),fb(-240,.5,1)),ct=cm(fb(-100,.75,.35),fb(80,1.5,.8)),dt=cm(fb(260,.75,.35),fb(80,1.5,.8)),et=fb(),ft=Ma(),gt=Math.PI/3,ht=2*Math.PI/3,it=Qi(Oi("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),jt=Qi(Oi("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),kt=Qi(Oi("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),lt=Qi(Oi("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),mt=Math.abs,nt=Math.atan2,ot=Math.cos,pt=Math.max,qt=Math.min,rt=Math.sin,st=Math.sqrt,tt=1e-12,ut=Math.PI,vt=ut/2,wt=2*ut; Zi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:this._context.lineTo(a,b)}}};var xt=gj($i);fj.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(a,b){this._curve.point(b*Math.sin(a),b*-Math.cos(a))}};var yt=Array.prototype.slice,zt={draw:function(a,b){var c=Math.sqrt(b/ut);a.moveTo(c,0),a.arc(0,0,c,0,wt)}},At={draw:function(a,b){var c=Math.sqrt(b/5)/2;a.moveTo(-3*c,-c),a.lineTo(-c,-c),a.lineTo(-c,-3*c),a.lineTo(c,-3*c),a.lineTo(c,-c),a.lineTo(3*c,-c),a.lineTo(3*c,c),a.lineTo(c,c),a.lineTo(c,3*c),a.lineTo(-c,3*c),a.lineTo(-c,c),a.lineTo(-3*c,c),a.closePath()}},Bt=Math.sqrt(1/3),Ct=2*Bt,Dt={draw:function(a,b){var c=Math.sqrt(b/Ct),d=c*Bt;a.moveTo(0,-c),a.lineTo(d,0),a.lineTo(0,c),a.lineTo(-d,0),a.closePath()}},Et=Math.sin(ut/10)/Math.sin(7*ut/10),Ft=Math.sin(wt/10)*Et,Gt=-Math.cos(wt/10)*Et,Ht={draw:function(a,b){var c=Math.sqrt(.8908130915292852*b),d=Ft*c,e=Gt*c;a.moveTo(0,-c),a.lineTo(d,e);for(var f=1;f<5;++f){var g=wt*f/5,h=Math.cos(g),i=Math.sin(g);a.lineTo(i*c,-h*c),a.lineTo(h*d-i*e,i*d+h*e)}a.closePath()}},It={draw:function(a,b){var c=Math.sqrt(b),d=-c/2;a.rect(d,d,c,c)}},Jt=Math.sqrt(3),Kt={draw:function(a,b){var c=-Math.sqrt(b/(3*Jt));a.moveTo(0,2*c),a.lineTo(-Jt*c,-c),a.lineTo(Jt*c,-c),a.closePath()}},Lt=Math.sqrt(3)/2,Mt=1/Math.sqrt(12),Nt=3*(Mt/2+1),Ot={draw:function(a,b){var c=Math.sqrt(b/Nt),d=c/2,e=c*Mt,f=d,g=c*Mt+c,h=-f,i=g;a.moveTo(d,e),a.lineTo(f,g),a.lineTo(h,i),a.lineTo(-.5*d-Lt*e,Lt*d+-.5*e),a.lineTo(-.5*f-Lt*g,Lt*f+-.5*g),a.lineTo(-.5*h-Lt*i,Lt*h+-.5*i),a.lineTo(-.5*d+Lt*e,-.5*e-Lt*d),a.lineTo(-.5*f+Lt*g,-.5*g-Lt*f),a.lineTo(-.5*h+Lt*i,-.5*i-Lt*h),a.closePath()}},Pt=[zt,At,Dt,It,Ht,Kt,Ot];tj.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:sj(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);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:sj(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},uj.prototype={areaStart:rj,areaEnd:rj,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1,this._x2=a,this._y2=b;break;case 1:this._point=2,this._x3=a,this._y3=b;break;case 2:this._point=3,this._x4=a,this._y4=b,this._context.moveTo((this._x0+4*this._x1+a)/6,(this._y0+4*this._y1+b)/6);break;default:sj(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},vj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var c=(this._x0+4*this._x1+a)/6,d=(this._y0+4*this._y1+b)/6;this._line?this._context.lineTo(c,d):this._context.moveTo(c,d);break;case 3:this._point=4;default:sj(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},wj.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var a=this._x,b=this._y,c=a.length-1;if(c>0)for(var d,e=a[0],f=b[0],g=a[c]-e,h=b[c]-f,i=-1;++i<=c;)d=i/c,this._basis.point(this._beta*a[i]+(1-this._beta)*(e+d*g),this._beta*b[i]+(1-this._beta)*(f+d*h));this._x=this._y=null,this._basis.lineEnd()},point:function(a,b){this._x.push(+a),this._y.push(+b)}};var Qt=function a(b){function c(a){return 1===b?new tj(a):new wj(a,b)}return c.beta=function(b){return a(+b)},c}(.85);yj.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:xj(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2,this._x1=a,this._y1=b;break;case 2:this._point=3;default:xj(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};var Rt=function a(b){function c(a){return new yj(a,b)}return c.tension=function(b){return a(+b)},c}(0);zj.prototype={areaStart:rj,areaEnd:rj,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1,this._x3=a,this._y3=b;break;case 1:this._point=2,this._context.moveTo(this._x4=a,this._y4=b);break;case 2:this._point=3,this._x5=a,this._y5=b;break;default:xj(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};var St=function a(b){function c(a){return new zj(a,b)}return c.tension=function(b){return a(+b)},c}(0);Aj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,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:xj(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};var Tt=function a(b){function c(a){return new Aj(a,b)}return c.tension=function(b){return a(+b)},c}(0);Cj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){if(a=+a,b=+b,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3;default:Bj(this,a,b)}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=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};var Ut=function a(b){function c(a){return b?new Cj(a,b):new yj(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);Dj.prototype={areaStart:rj,areaEnd:rj,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(a,b){if(a=+a,b=+b,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=a,this._y3=b;break;case 1:this._point=2,this._context.moveTo(this._x4=a,this._y4=b);break;case 2:this._point=3,this._x5=a,this._y5=b;break;default:Bj(this,a,b)}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=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};var Vt=function a(b){function c(a){return b?new Dj(a,b):new zj(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);Ej.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){if(a=+a,b=+b,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,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:Bj(this,a,b)}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=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};var Wt=function a(b){function c(a){return b?new Ej(a,b):new Aj(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);Fj.prototype={areaStart:rj,areaEnd:rj,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(a,b){a=+a,b=+b,this._point?this._context.lineTo(a,b):(this._point=1,this._context.moveTo(a,b))}},Kj.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:Jj(this,this._t0,Ij(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){var c=NaN;if(b=+b,(a=+a)!==this._x1||b!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3,Jj(this,Ij(this,c=Hj(this,a,b)),c);break;default:Jj(this,this._t0,c=Hj(this,a,b))}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b,this._t0=c}}},(Lj.prototype=Object.create(Kj.prototype)).point=function(a,b){Kj.prototype.point.call(this,b,a)},Mj.prototype={moveTo:function(a,b){this._context.moveTo(b,a)},closePath:function(){this._context.closePath()},lineTo:function(a,b){this._context.lineTo(b,a)},bezierCurveTo:function(a,b,c,d,e,f){this._context.bezierCurveTo(b,a,d,c,f,e)}},Nj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var a=this._x,b=this._y,c=a.length;if(c)if(this._line?this._context.lineTo(a[0],b[0]):this._context.moveTo(a[0],b[0]),2===c)this._context.lineTo(a[1],b[1]);else for(var d=Oj(a),e=Oj(b),f=0,g=1;g=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,b),this._context.lineTo(a,b);else{var c=this._x*(1-this._t)+a*this._t;this._context.lineTo(c,this._y),this._context.lineTo(c,b)}}this._x=a,this._y=b}},$j.prototype={constructor:$j,insert:function(a,b){var c,d,e;if(a){if(b.P=a,b.N=a.N,a.N&&(a.N.P=b),a.N=b,a.R){for(a=a.R;a.L;)a=a.L;a.L=b}else a.R=b;c=a}else this._?(a=ck(this._),b.P=null,b.N=a,a.P=a.L=b,c=a):(b.P=b.N=null,this._=b,c=null);for(b.L=b.R=null,b.U=c,b.C=!0,a=b;c&&c.C;)c===(d=c.U).L?(e=d.R)&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.R&&(ak(this,c),c=(a=c).U),c.C=!1,d.C=!0,bk(this,d)):(e=d.L)&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.L&&(bk(this,c),c=(a=c).U),c.C=!1,d.C=!0,ak(this,d)),c=a.U;this._.C=!1},remove:function(a){a.N&&(a.N.P=a.P),a.P&&(a.P.N=a.N),a.N=a.P=null;var b,c,d,e=a.U,f=a.L,g=a.R;if(c=f?g?ck(g):f:g,e?e.L===a?e.L=c:e.R=c:this._=c,f&&g?(d=c.C,c.C=a.C,c.L=f,f.U=c,c!==g?(e=c.U,c.U=a.U,a=c.R,e.L=a,c.R=g,g.U=c):(c.U=e,e=c,a=c.R)):(d=a.C,a=c),a&&(a.U=e),!d)if(a&&a.C)a.C=!1;else{do{if(a===this._)break;if(a===e.L){if((b=e.R).C&&(b.C=!1,e.C=!0,ak(this,e),b=e.R),b.L&&b.L.C||b.R&&b.R.C){b.R&&b.R.C||(b.L.C=!1,b.C=!0,bk(this,b),b=e.R),b.C=e.C,e.C=b.R.C=!1,ak(this,e),a=this._;break}}else if((b=e.L).C&&(b.C=!1,e.C=!0,bk(this,e),b=e.L),b.L&&b.L.C||b.R&&b.R.C){b.L&&b.L.C||(b.R.C=!1,b.C=!0,ak(this,b),b=e.L),b.C=e.C,e.C=b.L.C=!1,bk(this,e),a=this._;break}b.C=!0,a=e,e=e.U}while(!a.C);a&&(a.C=!1)}}};var Xt,Yt,Zt,$t,_t,au=[],bu=[],cu=1e-6,du=1e-12;xk.prototype={constructor:xk,polygons:function(){var a=this.edges;return this.cells.map(function(b){var c=b.halfedges.map(function(c){return jk(b,a[c])});return c.data=b.site.data,c})},triangles:function(){var a=[],b=this.edges;return this.cells.forEach(function(c,d){if(f=(e=c.halfedges).length)for(var e,f,g,h=c.site,i=-1,j=b[e[f-1]],k=j.left===h?j.right:j.left;++i=h)return null;var i=a-e.site[0],j=b-e.site[1],k=i*i+j*j;do e=f.cells[d=g],g=null,e.halfedges.forEach(function(c){var d=f.edges[c],h=d.left;if(h!==e.site&&h||(h=d.right)){var i=a-h[0],j=b-h[1],l=i*i+j*j;lpm&&c.name===b)return new Vb([[a]],Vm,b,+d);return null},a.arc=function(){function a(){var a,j,k=+b.apply(this,arguments),l=+c.apply(this,arguments),m=f.apply(this,arguments)-vt,n=g.apply(this,arguments)-vt,o=mt(n-m),p=n>m;if(i||(i=a=sc()),ltt)if(o>wt-tt)i.moveTo(l*ot(m),l*rt(m)),i.arc(0,0,l,m,n,!p),k>tt&&(i.moveTo(k*ot(n),k*rt(n)),i.arc(0,0,k,n,m,p));else{var q,r,s=m,t=n,u=m,v=n,w=o,x=o,y=h.apply(this,arguments)/2,z=y>tt&&(e?+e.apply(this,arguments):st(k*k+l*l)),A=qt(mt(l-k)/2,+d.apply(this,arguments)),B=A,C=A;if(z>tt){var D=Si(z/k*rt(y)),E=Si(z/l*rt(y));(w-=2*D)>tt?(u+=D*=p?1:-1,v-=D):(w=0,u=v=(m+n)/2),(x-=2*E)>tt?(s+=E*=p?1:-1,t-=E):(x=0,s=t=(m+n)/2)}var F=l*ot(s),G=l*rt(s),H=k*ot(v),I=k*rt(v);if(A>tt){var J,K=l*ot(t),L=l*rt(t),M=k*ot(u),N=k*rt(u);if(o1?0:a<-1?ut:Math.acos(a)}((O*Q+P*R)/(st(O*O+P*P)*st(Q*Q+R*R)))/2),T=st(J[0]*J[0]+J[1]*J[1]);B=qt(A,(k-T)/(S-1)),C=qt(A,(l-T)/(S+1))}}x>tt?C>tt?(q=Yi(M,N,F,G,l,C,p),r=Yi(K,L,H,I,l,C,p),i.moveTo(q.cx+q.x01,q.cy+q.y01),Ctt&&w>tt?B>tt?(q=Yi(H,I,K,L,k,-B,p),r=Yi(F,G,M,N,k,-B,p),i.lineTo(q.cx+q.x01,q.cy+q.y01),B>o,f=+h(a,b,d)+p>>o,j=+i(a,b,d);e>=0&&e=0&&f>o),Oc({width:r,height:s,data:d},{width:r,height:s,data:c},m>>o),Nc({width:r,height:s,data:c},{width:r,height:s,data:d},m>>o),Oc({width:r,height:s,data:d},{width:r,height:s,data:c},m>>o),Nc({width:r,height:s,data:c},{width:r,height:s,data:d},m>>o),Oc({width:r,height:s,data:d},{width:r,height:s,data:c},m>>o);var e=t(c);if(!Array.isArray(e)){var f=q(c);e=n(0,f,e),(e=k(0,Math.floor(f/e)*e,e)).shift()}return Mc().thresholds(e).size([r,s])(c).map(b)}function b(a){return a.value*=Math.pow(2,-2*o),a.coordinates.forEach(c),a}function c(a){a.forEach(d)}function d(a){a.forEach(e)}function e(a){a[0]=a[0]*Math.pow(2,o)-p,a[1]=a[1]*Math.pow(2,o)-p}function f(){return r=j+2*(p=3*m)>>o,s=l+2*p>>o,a}var g=Pc,h=Qc,i=Rc,j=960,l=500,m=20,o=2,p=3*m,r=j+2*p>>o,s=l+2*p>>o,t=Hc(20);return a.x=function(b){return arguments.length?(g="function"==typeof b?b:Hc(+b),a):g},a.y=function(b){return arguments.length?(h="function"==typeof b?b:Hc(+b),a):h},a.weight=function(b){return arguments.length?(i="function"==typeof b?b:Hc(+b),a):i},a.size=function(a){if(!arguments.length)return[j,l];var b=Math.ceil(a[0]),c=Math.ceil(a[1]);if(!(b>=0||b>=0))throw new Error("invalid size");return j=b,l=c,f()},a.cellSize=function(a){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(a)/Math.LN2),f()},a.thresholds=function(b){return arguments.length?(t="function"==typeof b?b:Hc(Array.isArray(b)?sn.call(b):b),a):t},a.bandwidth=function(a){if(!arguments.length)return Math.sqrt(m*(m+1));if(!((a=+a)>=0))throw new Error("invalid bandwidth");return m=Math.round((Math.sqrt(4*a*a+1)-1)/2),f()},a},a.contours=Mc,a.create=function(a){return ma(G(a).call(document.documentElement))},a.creator=G,a.cross=function(a,b,c){var e,f,g,h,i=a.length,j=b.length,k=new Array(i*j);for(null==c&&(c=d),e=g=0;ea?1:b>=a?0:NaN},a.deviation=g,a.dispatch=A,a.drag=function(){function b(a){a.on("mousedown.drag",c).filter(q).on("touchstart.drag",f).on("touchmove.drag",g).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){if(!m&&n.apply(this,arguments)){var b=i("mouse",o.apply(this,arguments),ra,this,arguments);b&&(ma(a.event.view).on("mousemove.drag",d,!0).on("mouseup.drag",e,!0),va(a.event.view),ta(),l=!1,j=a.event.clientX,k=a.event.clientY,b("start"))}}function d(){if(ua(),!l){var b=a.event.clientX-j,c=a.event.clientY-k;l=b*b+c*c>u}r.mouse("drag")}function e(){ma(a.event.view).on("mousemove.drag mouseup.drag",null),wa(a.event.view,l),ua(),r.mouse("end")}function f(){if(n.apply(this,arguments)){var b,c,d=a.event.changedTouches,e=o.apply(this,arguments),f=d.length;for(b=0;bj+n||dk+n||ei.index){var o=j-f.x-f.vx,p=k-f.y-f.vy,q=o*o+p*p;qa.r&&(a.r=a[b].r)}function d(){if(e){var b,c,d=e.length;for(f=new Array(d),b=0;b=k)){(a.data!==f||a.next)&&(0===e&&(n+=(e=dd())*e),0===i&&(n+=(i=dd())*i),n1?(null==b?l.remove(a):l.set(a,e(b)),f):l.get(a)},find:function(b,c,d){var e,f,g,h,i,j=0,k=a.length;for(null==d?d=1/0:d*=d,j=0;j1?(n.on(a,b),f):n.on(a)}}},a.forceX=function(a){function b(a){for(var b,c=0,g=d.length;c=.12&&e<.234&&d>=-.425&&d<-.214?j:e>=.166&&e<.234&&d>=-.214&&d<-.115?k:i).invert(a)},a.stream=function(a){return c&&d===a?c:(b=[i.stream(d=a),j.stream(a),k.stream(a)],e=b.length,c={point:function(a,c){for(var d=-1;++dde(d[0],d[1])&&(d[1]=e[1]),de(e[0],d[1])>de(d[0],d[1])&&(d[0]=e[0])):f.push(d=e);for(g=-1/0,b=0,d=f[c=f.length-1];b<=c;d=e,++b)e=f[b],(h=de(d[1],e[0]))>g&&(g=h,io=e[0],ko=d[1])}return qo=ro=null,io===1/0||jo===1/0?[[NaN,NaN],[NaN,NaN]]:[[io,jo],[ko,lo]]},a.geoCentroid=function(a){so=to=uo=vo=wo=xo=yo=zo=Ao=Bo=Co=0,Md(a,ip);var b=Ao,c=Bo,d=Co,e=b*b+c*c+d*d;return e2?a[2]+90:90]):[(a=c())[0],a[1],a[2]-90]},c([0,0,90]).scale(159.155)},a.geoTransverseMercatorRaw=Vf,a.gray=function(a,b){return new Ya(a,0,0,null==b?1:b)},a.hcl=cb,a.hierarchy=$f,a.histogram=function(){function a(a){var e,f,g=a.length,h=new Array(g);for(e=0;el;)m.pop(),--o;var p,q=new Array(o+1);for(e=0;e<=o;++e)(p=q[e]=[]).x0=e>0?m[e-1]:j,p.x1=e1)&&(a-=Math.floor(a));var b=Math.abs(a-.5);return et.h=360*a-100,et.s=1.5-1.5*b,et.l=.8-.9*b,et+""},a.interpolateRdBu=ks,a.interpolateRdGy=ms,a.interpolateRdPu=Is,a.interpolateRdYlBu=os,a.interpolateRdYlGn=qs,a.interpolateReds=$s,a.interpolateRgb=Ml,a.interpolateRgbBasis=Nl,a.interpolateRgbBasisClosed=Ol,a.interpolateRound=wb,a.interpolateSinebow=function(a){var b;return a=(.5-a)*Math.PI,ft.r=255*(b=Math.sin(a))*b,ft.g=255*(b=Math.sin(a+gt))*b,ft.b=255*(b=Math.sin(a+ht))*b,ft+""},a.interpolateSpectral=ss,a.interpolateString=ub,a.interpolateTransformCss=Tl,a.interpolateTransformSvg=Ul,a.interpolateTurbo=function(a){return a=Math.max(0,Math.min(1,a)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+a*(1172.33-a*(10793.56-a*(33300.12-a*(38394.49-14825.05*a)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+a*(557.33+a*(1225.33-a*(3574.96-a*(1073.77+707.56*a)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+a*(3211.1-a*(15327.97-a*(27814-a*(22569.18-6838.66*a)))))))+")"},a.interpolateViridis=it,a.interpolateWarm=ct,a.interpolateYlGn=Ms,a.interpolateYlGnBu=Ks,a.interpolateYlOrBr=Os,a.interpolateYlOrRd=Qs,a.interpolateZoom=Ab,a.interrupt=Rb,a.interval=function(a,b,c){var d=new Gb,e=b;return null==b?(d.restart(a,b,c),d):(b=+b,c=null==c?Eb():+c,d.restart(function f(g){g+=e,d.restart(f,e+=b,c),a(g)},b,c),d)},a.isoFormat=Kr,a.isoParse=Lr,a.json=function(a,b){return fetch(a,b).then(ad)},a.keys=function(a){var b=[];for(var c in a)b.push(c);return b},a.lab=Xa,a.lch=function(a,b,c,d){return 1===arguments.length?bb(a):new db(c,b,a,null==d?1:d)},a.line=bj,a.lineRadial=ij,a.linkHorizontal=function(){return nj(oj)},a.linkRadial=function(){var a=nj(qj);return a.angle=a.x,delete a.x,a.radius=a.y,delete a.y,a},a.linkVertical=function(){return nj(pj)},a.local=na,a.map=zc,a.matcher=L,a.max=q,a.mean=function(a,b){var c,d=a.length,f=d,g=-1,h=0;if(null==b)for(;++g=e.length)return null!=b&&d.sort(b),null!=c?c(d):d;for(var i,j,k,l=-1,m=d.length,n=e[f++],o=zc(),p=g();++le.length)return b;var g,h=f[d-1];return null!=c&&d>=e.length?g=b.entries():(g=[],b.each(function(b,c){g.push({key:c,values:a(b,d)})})),null!=h?g.sort(function(a,b){return h(a.key,b.key)}):g}(a(b,0,Cc,Dc),0)},key:function(a){return e.push(a),d},sortKeys:function(a){return f[e.length-1]=a,d},sortValues:function(a){return b=a,d},rollup:function(a){return c=a,d}}},a.now=Eb,a.pack=function(){function a(a){return a.x=c/2,a.y=d/2,b?a.eachBefore(vg(b)).eachAfter(wg(e,.5)).eachBefore(xg(1)):a.eachBefore(vg(ug)).eachAfter(wg(sg,1)).eachAfter(wg(e,a.r/Math.min(c,d))).eachBefore(xg(Math.min(c,d)/(2*a.r))),a}var b=null,c=1,d=1,e=sg;return a.radius=function(c){return arguments.length?(b=qg(c),a):b},a.size=function(b){return arguments.length?(c=+b[0],d=+b[1],a):[c,d]},a.padding=function(b){return arguments.length?(e="function"==typeof b?b:tg(+b),a):e},a},a.packEnclose=dg,a.packSiblings=function(a){return pg(a),a},a.pairs=function(a,b){null==b&&(b=d);for(var c=0,e=a.length-1,f=a[0],g=new Array(e<0?0:e);c0&&(n+=l);for(null!=c?o.sort(function(a,b){return c(p[a],p[b])}):null!=d&&o.sort(function(b,c){return d(a[b],a[c])}),h=0,j=n?(r-m*t)/n:0;h0?l*j:0)+t,p[i]={data:a[i],index:h,value:l,startAngle:q,endAngle:k,padAngle:s};return p}var b=ej,c=dj,d=null,e=Ri(0),f=Ri(wt),g=Ri(0);return a.value=function(c){return arguments.length?(b="function"==typeof c?c:Ri(+c),a):b},a.sortValues=function(b){return arguments.length?(c=b,d=null,a):c},a.sort=function(b){return arguments.length?(d=b,c=null,a):d},a.startAngle=function(b){return arguments.length?(e="function"==typeof b?b:Ri(+b),a):e},a.endAngle=function(b){return arguments.length?(f="function"==typeof b?b:Ri(+b),a):f},a.padAngle=function(b){return arguments.length?(g="function"==typeof b?b:Ri(+b),a):g},a},a.piecewise=function(a,b){for(var c=0,d=b.length-1,e=b[0],f=new Array(d<0?0:d);ch!=j>h&&g<(i-c)*(h-d)/(j-d)+c&&(k=!k),i=c,j=d;return k},a.polygonHull=function(a){if((c=a.length)<3)return null;var b,c,d=new Array(c),e=new Array(c);for(b=0;b=0;--b)j.push(a[d[f[b]][2]]);for(b=+h;b0?h[b-1]:f[0],b=g?[h[g-1],f]:[h[b-1],h[b]]},b.unknown=function(a){return arguments.length?(d=a,b):b},b.thresholds=function(){return h.slice()},b.copy=function(){return a().domain([e,f]).range(i).unknown(d)},Og.apply(ah(b),arguments)},a.scaleSequential=function a(){var b=ah(Ji()(Tg));return b.copy=function(){return Ki(b,a())},Pg.apply(b,arguments)},a.scaleSequentialLog=function a(){var b=ih(Ji()).domain([1,10]);return b.copy=function(){return Ki(b,a()).base(b.base())},Pg.apply(b,arguments)},a.scaleSequentialPow=Li,a.scaleSequentialQuantile=function a(){function c(a){if(!isNaN(a=+a))return e((Lk(d,a)-1)/(d.length-1))}var d=[],e=Tg;return c.domain=function(a){if(!arguments.length)return d.slice();d=[];for(var e,f=0,g=a.length;f0)for(var c,d,e,f,g,h,i=0,j=a[b[0]].length;i0?(d[0]=f,d[1]=f+=e):e<0?(d[1]=g,d[0]=g+=e):(d[0]=0,d[1]=e)},a.stackOffsetExpand=function(a,b){if((d=a.length)>0){for(var c,d,e,f=0,g=a[0].length;f0){for(var c,d=0,e=a[b[0]],f=e.length;d0&&(d=(c=a[b[0]]).length)>0){for(var c,d,e,f=0,g=1;g0)throw new Error("cycle");return f}var b=Ag,c=Bg;return a.id=function(c){return arguments.length?(b=rg(c),a):b},a.parentId=function(b){return arguments.length?(c=rg(b),a):c},a},a.style=S,a.sum=function(a,b){var c,d=a.length,e=-1,f=0;if(null==b)for(;++e=0;--e)h.push(c=b.children[e]=new Hg(d[e],e)),c.parent=b;return(g.parent=new Hg(null,0)).children=[g],g}(a);if(i.eachAfter(b),i.parent.m=-i.z,i.eachBefore(c),h)a.eachBefore(d);else{var j=a,k=a,l=a;a.eachBefore(function(a){a.xk.x&&(k=a),a.depth>l.depth&&(l=a)});var m=j===k?1:e(j,k)/2,n=m-j.x,o=f/(k.x+m+n),p=g/(l.depth||1);a.eachBefore(function(a){a.x=(a.x+n)*o,a.y=a.depth*p})}return a}function b(a){var b=a.children,c=a.parent.children,d=a.i?c[a.i-1]:null;if(b){!function(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)(b=e[f]).z+=c,b.m+=c,c+=b.s+(d+=b.c)}(a);var f=(b[0].z+b[b.length-1].z)/2;d?(a.z=d.z+e(a._,d._),a.m=a.z-f):a.z=f}else d&&(a.z=d.z+e(a._,d._));a.parent.A=function(a,b,c){if(b){for(var d,f=a,g=a,h=b,i=f.parent.children[0],j=f.m,k=g.m,l=h.m,m=i.m;h=Eg(h),f=Dg(f),h&&f;)i=Dg(i),(g=Eg(g)).a=a,(d=h.z+l-f.z-j+e(h._,f._))>0&&(Fg(Gg(h,a,c),a,d),j+=d,k+=d),l+=h.m,j+=f.m,m+=i.m,k+=g.m;h&&!Eg(g)&&(g.t=h,g.m+=l-k),f&&!Dg(i)&&(i.t=f,i.m+=j-m,c=a)}return c}(a,d,a.parent.A||c[0])}function c(a){a._.x=a.z+a.parent.m,a.m+=a.parent.m}function d(a){a.x*=f,a.y=a.depth*g}var e=Cg,f=1,g=1,h=null;return a.separation=function(b){return arguments.length?(e=b,a):e},a.size=function(b){return arguments.length?(h=!1,f=+b[0],g=+b[1],a):h?null:[f,g]},a.nodeSize=function(b){return arguments.length?(h=!0,f=+b[0],g=+b[1],a):h?[f,g]:null},a},a.treemap=function(){function a(a){return a.x0=a.y0=0,a.x1=e,a.y1=f,a.eachBefore(b),g=[0],d&&a.eachBefore(yg),a}function b(a){var b=g[a.depth],d=a.x0+b,e=a.y0+b,f=a.x1-b,m=a.y1-b;f=c-1){var k=h[b];return k.x0=e,k.y0=f,k.x1=g,void(k.y1=i)}for(var l=j[b],m=d/2+l,n=b+1,o=c-1;n>>1;j[p]i-f){var s=(e*r+g*q)/d;a(b,n,q,e,f,s,i),a(n,c,r,s,f,g,i)}else{var t=(f*r+i*q)/d;a(b,n,q,e,f,g,t),a(n,c,r,e,t,g,i)}}(0,i,a.value,b,c,d,e)},a.treemapDice=zg,a.treemapResquarify=rq,a.treemapSlice=Ig,a.treemapSliceDice=function(a,b,c,d,e){(1&a.depth?Ig:zg)(a,b,c,d,e)},a.treemapSquarify=qq,a.tsv=Rn,a.tsvFormat=Kn,a.tsvFormatBody=Ln,a.tsvFormatRow=Nn,a.tsvFormatRows=Mn,a.tsvFormatValue=On,a.tsvParse=In,a.tsvParseRows=Jn,a.utcDay=lr,a.utcDays=mr,a.utcFriday=sr,a.utcFridays=zr,a.utcHour=jr,a.utcHours=kr,a.utcMillisecond=Fq,a.utcMilliseconds=Gq,a.utcMinute=hr,a.utcMinutes=ir,a.utcMonday=or,a.utcMondays=vr,a.utcMonth=Br,a.utcMonths=Cr,a.utcSaturday=tr,a.utcSaturdays=Ar,a.utcSecond=Jq,a.utcSeconds=Kq,a.utcSunday=nr,a.utcSundays=ur,a.utcThursday=rr,a.utcThursdays=yr,a.utcTuesday=pr,a.utcTuesdays=wr,a.utcWednesday=qr,a.utcWednesdays=xr,a.utcWeek=nr,a.utcWeeks=ur,a.utcYear=Dr,a.utcYears=Fr,a.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},a.variance=f,a.version="5.14.2",a.voronoi=function(){function a(a){return new xk(a.map(function(d,e){var f=[Math.round(b(d,e,a)/cu)*cu,Math.round(c(d,e,a)/cu)*cu];return f.index=e,f.data=d,f}),d)}var b=Yj,c=Zj,d=null;return a.polygons=function(b){return a(b).polygons()},a.links=function(b){return a(b).links()},a.triangles=function(b){return a(b).triangles()},a.x=function(c){return arguments.length?(b="function"==typeof c?c:Xj(+c),a):b},a.y=function(b){return arguments.length?(c="function"==typeof b?b:Xj(+b),a):c},a.extent=function(b){return arguments.length?(d=null==b?null:[[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]],a):d&&[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},a.size=function(b){return arguments.length?(d=null==b?null:[[0,0],[+b[0],+b[1]]],a):d&&[d[1][0]-d[0][0],d[1][1]-d[0][1]]},a},a.window=R,a.xml=Sn,a.zip=function(){return t(arguments)},a.zoom=function(){function b(a){a.property("__zoom",Gk).on("wheel.zoom",i).on("mousedown.zoom",j).on("dblclick.zoom",k).filter(u).on("touchstart.zoom",l).on("touchmove.zoom",m).on("touchend.zoom touchcancel.zoom",n).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(a,b){return(b=Math.max(v[0],Math.min(v[1],b)))===a.k?a:new Ak(b,a.x,a.y)}function d(a,b,c){var d=b[0]-c[0]*a.k,e=b[1]-c[1]*a.k;return d===a.x&&e===a.y?a:new Ak(a.k,d,e)}function e(a){return[(+a[0][0]+ +a[1][0])/2,(+a[0][1]+ +a[1][1])/2]}function f(a,b,c){a.on("start.zoom",function(){g(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){g(this,arguments).end()}).tween("zoom",function(){var a=this,d=arguments,f=g(a,d),h=r.apply(a,d),i=null==c?e(h):"function"==typeof c?c.apply(a,d):c,j=Math.max(h[1][0]-h[0][0],h[1][1]-h[0][1]),k=a.__zoom,l="function"==typeof b?b.apply(a,d):b,m=y(k.invert(i).concat(j/k.k),l.invert(i).concat(j/l.k));return function(a){if(1===a)a=l;else{var b=m(a),c=j/b[2];a=new Ak(c,i[0]-b[0]*c,i[1]-b[1]*c)}f.zoom(null,a)}})}function g(a,b,c){return!c&&a.__zooming||new h(a,b)}function h(a,b){this.that=a,this.args=b,this.active=0,this.extent=r.apply(a,b),this.taps=0}function i(){if(q.apply(this,arguments)){var a=g(this,arguments),b=this.__zoom,e=Math.max(v[0],Math.min(v[1],b.k*Math.pow(2,t.apply(this,arguments)))),f=ra(this);if(a.wheel)a.mouse[0][0]===f[0]&&a.mouse[0][1]===f[1]||(a.mouse[1]=b.invert(a.mouse[0]=f)),clearTimeout(a.wheel);else{if(b.k===e)return;a.mouse=[f,b.invert(f)],Rb(this),a.start()}Dk(),a.wheel=setTimeout(function(){a.wheel=null,a.end()},C),a.zoom("mouse",s(d(c(b,e),a.mouse[0],a.mouse[1]),a.extent,w))}}function j(){if(!p&&q.apply(this,arguments)){var b=g(this,arguments,!0),c=ma(a.event.view).on("mousemove.zoom",function(){if(Dk(),!b.moved){var c=a.event.clientX-f,e=a.event.clientY-h;b.moved=c*c+e*e>D}b.zoom("mouse",s(d(b.that.__zoom,b.mouse[0]=ra(b.that),b.mouse[1]),b.extent,w))},!0).on("mouseup.zoom",function(){c.on("mousemove.zoom mouseup.zoom",null),wa(a.event.view,b.moved),Dk(),b.end()},!0),e=ra(this),f=a.event.clientX,h=a.event.clientY;va(a.event.view),Ck(),b.mouse=[e,this.__zoom.invert(e)],Rb(this),b.start()}}function k(){if(q.apply(this,arguments)){var e=this.__zoom,g=ra(this),h=e.invert(g),i=e.k*(a.event.shiftKey?.5:2),j=s(d(c(e,i),g,h),r.apply(this,arguments),w);Dk(),x>0?ma(this).transition().duration(x).call(f,j,g):ma(this).call(b.transform,j)}}function l(){if(q.apply(this,arguments)){var b,c,d,e,f=a.event.touches,h=f.length,i=g(this,arguments,a.event.changedTouches.length===h);for(Ck(),c=0;c