mirror of https://github.com/hashicorp/consul
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5 lines
143 KiB
5 lines
143 KiB
d3=function(){function t(t){return null!=t&&!isNaN(t)}function e(t){return t.length}function n(t){for(var e=1;t*e%1;)e*=10;return e}function i(t,e){try{for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}catch(i){t.prototype=e}}function r(){}function o(){}function s(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function a(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.substring(1);for(var n=0,i=ha.length;i>n;++n){var r=ha[n]+e;if(r in t)return r}}function l(){}function u(){}function c(t){function e(){for(var e,i=n,r=-1,o=i.length;++r<o;)(e=i[r].on)&&e.apply(this,arguments);return t}var n=[],i=new r;return e.on=function(e,r){var o,s=i.get(e);return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(e)),r&&n.push(i.set(e,{on:r})),t)},e}function h(){Us.event.preventDefault()}function f(){for(var t,e=Us.event;t=e.sourceEvent;)e=t;return e}function p(t){for(var e=new u,n=0,i=arguments.length;++n<i;)e[arguments[n]]=c(e);return e.of=function(n,i){return function(r){try{var o=r.sourceEvent=Us.event;r.target=t,Us.event=r,e[r.type].apply(n,i)}finally{Us.event=o}}},e}function d(t){return pa(t,ya),t}function g(t){return"function"==typeof t?t:function(){return da(t,this)}}function m(t){return"function"==typeof t?t:function(){return ga(t,this)}}function v(t,e){function n(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function r(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function s(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function a(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=Us.ns.qualify(t),null==e?t.local?i:n:"function"==typeof e?t.local?a:s:t.local?o:r}function y(t){return t.trim().replace(/\s+/g," ")}function x(t){return new RegExp("(?:^|\\s+)"+Us.requote(t)+"(?:\\s+|$)","g")}function b(t,e){function n(){for(var n=-1;++n<r;)t[n](this,e)}function i(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}t=t.trim().split(/\s+/).map(w);var r=t.length;return"function"==typeof e?i:n}function w(t){var e=x(t);return function(n,i){if(r=n.classList)return i?r.add(t):r.remove(t);var r=n.getAttribute("class")||"";i?(e.lastIndex=0,e.test(r)||n.setAttribute("class",y(r+" "+t))):n.setAttribute("class",y(r.replace(e," ")))}}function k(t,e,n){function i(){this.style.removeProperty(t)}function r(){this.style.setProperty(t,e,n)}function o(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}return null==e?i:"function"==typeof e?o:r}function M(t,e){function n(){delete this[t]}function i(){this[t]=e}function r(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?r:i}function S(t){return"function"==typeof t?t:(t=Us.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,t)}}function C(t){return{__data__:t}}function T(t){return function(){return va(this,t)}}function A(t){return arguments.length||(t=Us.ascending),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function _(t,e){for(var n=0,i=t.length;i>n;n++)for(var r,o=t[n],s=0,a=o.length;a>s;s++)(r=o[s])&&e(r,s,n);return t}function L(t){return pa(t,ba),t}function E(t){var e,n;return function(i,r,o){var s,a=t[o].update,l=a.length;for(o!=n&&(n=o,e=0),r>=e&&(e=r+1);!(s=a[e])&&++e<l;);return s}}function N(){var t=this.__transition__;t&&++t.active}function P(t,e,n){function i(){var e=this[s];e&&(this.removeEventListener(t,e,e.$),delete this[s])}function r(){var r=u(e,Zs(arguments));i.call(this),this.addEventListener(t,this[s]=r,r.$=n),r._=e}function o(){var e,n=new RegExp("^__on([^.]+)"+Us.requote(t)+"$");for(var i in this)if(e=i.match(n)){var r=this[i];this.removeEventListener(e[1],r,r.$),delete this[i]}}var s="__on"+t,a=t.indexOf("."),u=D;a>0&&(t=t.substring(0,a));var c=ka.get(t);return c&&(t=c,u=R),a?e?r:i:e?l:o}function D(t,e){return function(n){var i=Us.event;Us.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Us.event=i}}}function R(t,e){var n=D(t,e);return function(t){var e=this,i=t.relatedTarget;i&&(i===e||8&i.compareDocumentPosition(e))||n.call(e,t)}}function O(){var t=".dragsuppress-"+ ++Sa,e="click"+t,n=Us.select(Js).on("touchmove"+t,h).on("dragstart"+t,h).on("selectstart"+t,h);if(Ma){var i=Ks.style,r=i[Ma];i[Ma]="none"}return function(o){function s(){n.on(e,null)}n.on(t,null),Ma&&(i[Ma]=r),o&&(n.on(e,function(){h(),s()},!0),setTimeout(s,0))}}function z(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>Ca&&(Js.scrollX||Js.scrollY)){n=Us.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var r=n[0][0].getScreenCTM();Ca=!(r.f||r.e),n.remove()}return Ca?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function H(t){return t>0?1:0>t?-1:0}function j(t){return t>1?0:-1>t?Ta:Math.acos(t)}function I(t){return t>1?_a:-1>t?-_a:Math.asin(t)}function $(t){return((t=Math.exp(t))-1/t)/2}function B(t){return((t=Math.exp(t))+1/t)/2}function F(t){return((t=Math.exp(2*t))-1)/(t+1)}function W(t){return(t=Math.sin(t/2))*t}function q(){}function X(t,e,n){return new Y(t,e,n)}function Y(t,e,n){this.h=t,this.s=e,this.l=n}function G(t,e,n){function i(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(s-o)*t/60:180>t?s:240>t?o+(s-o)*(240-t)/60:o}function r(t){return Math.round(255*i(t))}var o,s;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,s=.5>=n?n*(1+e):n+e-n*e,o=2*n-s,se(r(t+120),r(t),r(t-120))}function U(t,e,n){return new V(t,e,n)}function V(t,e,n){this.h=t,this.c=e,this.l=n}function Z(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),Q(n,Math.cos(t*=Na)*e,Math.sin(t)*e)}function Q(t,e,n){return new K(t,e,n)}function K(t,e,n){this.l=t,this.a=e,this.b=n}function J(t,e,n){var i=(t+16)/116,r=i+e/500,o=i-n/200;return r=ee(r)*Fa,i=ee(i)*Wa,o=ee(o)*qa,se(ie(3.2404542*r-1.5371385*i-.4985314*o),ie(-.969266*r+1.8760108*i+.041556*o),ie(.0556434*r-.2040259*i+1.0572252*o))}function te(t,e,n){return t>0?U(Math.atan2(n,e)*Pa,Math.sqrt(e*e+n*n),t):U(0/0,0/0,t)}function ee(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function re(t){return se(t>>16,255&t>>8,255&t)}function oe(t){return re(t)+""}function se(t,e,n){return new ae(t,e,n)}function ae(t,e,n){this.r=t,this.g=e,this.b=n}function le(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,n){var i,r,o,s=0,a=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(t))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return e(pe(r[0]),pe(r[1]),pe(r[2]))}return(o=Ga.get(t))?e(o.r,o.g,o.b):(null!=t&&"#"===t.charAt(0)&&(4===t.length?(s=t.charAt(1),s+=s,a=t.charAt(2),a+=a,l=t.charAt(3),l+=l):7===t.length&&(s=t.substring(1,3),a=t.substring(3,5),l=t.substring(5,7)),s=parseInt(s,16),a=parseInt(a,16),l=parseInt(l,16)),e(s,a,l))}function ce(t,e,n){var i,r,o=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),a=s-o,l=(s+o)/2;return a?(r=.5>l?a/(s+o):a/(2-s-o),i=t==s?(e-n)/a+(n>e?6:0):e==s?(n-t)/a+2:(t-e)/a+4,i*=60):(i=0/0,r=l>0&&1>l?0:i),X(i,r,l)}function he(t,e,n){t=fe(t),e=fe(e),n=fe(n);var i=ne((.4124564*t+.3575761*e+.1804375*n)/Fa),r=ne((.2126729*t+.7151522*e+.072175*n)/Wa),o=ne((.0193339*t+.119192*e+.9503041*n)/qa);return Q(116*r-16,500*(i-r),200*(r-o))}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function de(t){return"function"==typeof t?t:function(){return t}}function ge(t){return t}function me(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),ve(e,n,t,i)}}function ve(t,e,n,i){function r(){var t,e=l.status;if(!e&&l.responseText||e>=200&&300>e||304===e){try{t=n.call(o,l)}catch(i){return s.error.call(o,i),void 0}s.load.call(o,t)}else s.error.call(o,l)}var o={},s=Us.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,u=null;return!Js.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var e=Us.event;Us.event=t;try{s.progress.call(o,l)}finally{Us.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?a[t]:(null==e?delete a[t]:a[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(Zs(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,t,!0),null==e||"accept"in a||(a.accept=e+",*/*"),l.setRequestHeader)for(var c in a)l.setRequestHeader(c,a[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(t){r(null,t)}),s.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},Us.rebind(o,s,"on"),null==i?o:o.get(ye(i))}function ye(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function xe(){var t=be(),e=we()-t;e>24?(isFinite(e)&&(clearTimeout(Qa),Qa=setTimeout(xe,e)),Za=0):(Za=1,Ja(xe))}function be(){var t=Date.now();for(Ka=Ua;Ka;)t>=Ka.t&&(Ka.f=Ka.c(t-Ka.t)),Ka=Ka.n;return t}function we(){for(var t,e=Ua,n=1/0;e;)e.f?e=t?t.n=e.n:Ua=e.n:(e.t<n&&(n=e.t),e=(t=e).n);return Va=t,n}function ke(t,e){var n=Math.pow(10,3*la(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Me(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Se(t){return t+""}function Ce(){}function Te(t,e,n){var i=n.s=t+e,r=i-t,o=i-r;n.t=t-o+(e-r)}function Ae(t,e){t&&hl.hasOwnProperty(t.type)&&hl[t.type](t,e)}function _e(t,e,n){var i,r=-1,o=t.length-n;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function Le(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)_e(t[n],e,1);e.polygonEnd()}function Ee(){function t(t,e){t*=Na,e=e*Na/2+Ta/4;var n=t-i,s=Math.cos(e),a=Math.sin(e),l=o*a,u=r*s+l*Math.cos(n),c=l*Math.sin(n);pl.add(Math.atan2(c,u)),i=t,r=s,o=a}var e,n,i,r,o;dl.point=function(s,a){dl.point=t,i=(e=s)*Na,r=Math.cos(a=(n=a)*Na/2+Ta/4),o=Math.sin(a)},dl.lineEnd=function(){t(e,n)}}function Ne(t){var e=t[0],n=t[1],i=Math.cos(n);return[i*Math.cos(e),i*Math.sin(e),Math.sin(n)]}function Pe(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function De(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Re(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Oe(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ze(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function He(t){return[Math.atan2(t[1],t[0]),I(t[2])]}function je(t,e){return la(t[0]-e[0])<La&&la(t[1]-e[1])<La}function Ie(t,e){t*=Na;var n=Math.cos(e*=Na);$e(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function $e(t,e,n){++gl,vl+=(t-vl)/gl,yl+=(e-yl)/gl,xl+=(n-xl)/gl}function Be(){function t(t,r){t*=Na;var o=Math.cos(r*=Na),s=o*Math.cos(t),a=o*Math.sin(t),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*a)*u+(u=i*s-e*l)*u+(u=e*a-n*s)*u),e*s+n*a+i*l);ml+=u,bl+=u*(e+(e=s)),wl+=u*(n+(n=a)),kl+=u*(i+(i=l)),$e(e,n,i)}var e,n,i;Tl.point=function(r,o){r*=Na;var s=Math.cos(o*=Na);e=s*Math.cos(r),n=s*Math.sin(r),i=Math.sin(o),Tl.point=t,$e(e,n,i)}}function Fe(){Tl.point=Ie}function We(){function t(t,e){t*=Na;var n=Math.cos(e*=Na),s=n*Math.cos(t),a=n*Math.sin(t),l=Math.sin(e),u=r*l-o*a,c=o*s-i*l,h=i*a-r*s,f=Math.sqrt(u*u+c*c+h*h),p=i*s+r*a+o*l,d=f&&-j(p)/f,g=Math.atan2(f,p);Ml+=d*u,Sl+=d*c,Cl+=d*h,ml+=g,bl+=g*(i+(i=s)),wl+=g*(r+(r=a)),kl+=g*(o+(o=l)),$e(i,r,o)}var e,n,i,r,o;Tl.point=function(s,a){e=s,n=a,Tl.point=t,s*=Na;var l=Math.cos(a*=Na);i=l*Math.cos(s),r=l*Math.sin(s),o=Math.sin(a),$e(i,r,o)},Tl.lineEnd=function(){t(e,n),Tl.lineEnd=Fe,Tl.point=Ie}}function qe(){return!0}function Xe(t,e,n,i,r){var o=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],i=t[e];if(je(n,i)){r.lineStart();for(var a=0;e>a;++a)r.point((n=t[a])[0],n[1]);return r.lineEnd(),void 0}var l=new Ge(n,t,null,!0),u=new Ge(n,null,l,!1);l.o=u,o.push(l),s.push(u),l=new Ge(i,t,null,!1),u=new Ge(i,null,l,!0),l.o=u,o.push(l),s.push(u)}}),s.sort(e),Ye(o),Ye(s),o.length){for(var a=0,l=n,u=s.length;u>a;++a)s[a].e=l=!l;for(var c,h,f=o[0];;){for(var p=f,d=!0;p.v;)if((p=p.n)===f)return;c=p.z,r.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var a=0,u=c.length;u>a;++a)r.point((h=c[a])[0],h[1]);else i(p.x,p.n.x,1,r);p=p.n}else{if(d){c=p.p.z;for(var a=c.length-1;a>=0;--a)r.point((h=c[a])[0],h[1])}else i(p.x,p.p.x,-1,r);p=p.p}p=p.o,c=p.z,d=!d}while(!p.v);r.lineEnd()}}}function Ye(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}function Ge(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Ue(t,e,n,i){return function(r,o){function s(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function a(t,e){var n=r(t,e);m.point(n[0],n[1])}function l(){y.point=a,m.lineStart()}function u(){y.point=s,m.lineEnd()}function c(t,e){g.push([t,e]);var n=r(t,e);b.point(n[0],n[1])}function h(){b.lineStart(),g=[]}function f(){c(g[0][0],g[0][1]),b.lineEnd();var t,e=b.clean(),n=x.buffer(),i=n.length;if(g.pop(),d.push(g),g=null,i){if(1&e){t=n[0];var r,i=t.length-1,s=-1;for(o.lineStart();++s<i;)o.point((r=t[s])[0],r[1]);return o.lineEnd(),void 0}i>1&&2&e&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Ve))}}var p,d,g,m=e(o),v=r.invert(i[0],i[1]),y={point:s,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=f,p=[],d=[],o.polygonStart()},polygonEnd:function(){y.point=s,y.lineStart=l,y.lineEnd=u,p=Us.merge(p);var t=Ke(v,d);p.length?Xe(p,Qe,t,n,o):t&&(o.lineStart(),n(null,null,1,o),o.lineEnd()),o.polygonEnd(),p=d=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},x=Ze(),b=e(x);return y}}function Ve(t){return t.length>1}function Ze(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:l,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Qe(t,e){return((t=t.x)[0]<0?t[1]-_a-La:_a-t[1])-((e=e.x)[0]<0?e[1]-_a-La:_a-e[1])}function Ke(t,e){var n=t[0],i=t[1],r=[Math.sin(n),-Math.cos(n),0],o=0,s=0;pl.reset();for(var a=0,l=e.length;l>a;++a){var u=e[a],c=u.length;if(c)for(var h=u[0],f=h[0],p=h[1]/2+Ta/4,d=Math.sin(p),g=Math.cos(p),m=1;;){m===c&&(m=0),t=u[m];var v=t[0],y=t[1]/2+Ta/4,x=Math.sin(y),b=Math.cos(y),w=v-f,k=la(w)>Ta,M=d*x;if(pl.add(Math.atan2(M*Math.sin(w),g*b+M*Math.cos(w))),o+=k?w+(w>=0?Aa:-Aa):w,k^f>=n^v>=n){var S=De(Ne(h),Ne(t));ze(S);var C=De(r,S);ze(C);var T=(k^w>=0?-1:1)*I(C[2]);(i>T||i===T&&(S[0]||S[1]))&&(s+=k^w>=0?1:-1)}if(!m++)break;f=v,d=x,g=b,h=t}}return(-La>o||La>o&&0>pl)^1&s}function Je(t){var e,n=0/0,i=0/0,r=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?Ta:-Ta,l=la(o-n);la(l-Ta)<La?(t.point(n,i=(i+s)/2>0?_a:-_a),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&l>=Ta&&(la(n-r)<La&&(n-=r*La),la(o-a)<La&&(o-=a*La),i=tn(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=o,i=s),r=a},lineEnd:function(){t.lineEnd(),n=i=0/0},clean:function(){return 2-e}}}function tn(t,e,n,i){var r,o,s=Math.sin(t-n);return la(s)>La?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*o*s)):(e+i)/2}function en(t,e,n,i){var r;if(null==t)r=n*_a,i.point(-Ta,r),i.point(0,r),i.point(Ta,r),i.point(Ta,0),i.point(Ta,-r),i.point(0,-r),i.point(-Ta,-r),i.point(-Ta,0),i.point(-Ta,r);else if(la(t[0]-e[0])>La){var o=t[0]<e[0]?Ta:-Ta;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(e[0],e[1])}function nn(t){function e(t,e){return Math.cos(t)*Math.cos(e)>o}function n(t){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,f){var p,d=[h,f],g=e(h,f),m=s?g?0:r(h,f):g?r(h+(0>h?Ta:-Ta),f):0;if(!n&&(u=l=g)&&t.lineStart(),g!==l&&(p=i(n,d),(je(n,p)||je(d,p))&&(d[0]+=La,d[1]+=La,g=e(d[0],d[1]))),g!==l)c=0,g?(t.lineStart(),p=i(d,n),t.point(p[0],p[1])):(p=i(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(a&&n&&s^g){var v;m&o||!(v=i(d,n,!0))||(c=0,s?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||n&&je(n,d)||t.point(d[0],d[1]),n=d,l=g,o=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(t,e,n){var i=Ne(t),r=Ne(e),s=[1,0,0],a=De(i,r),l=Pe(a,a),u=a[0],c=l-u*u;if(!c)return!n&&t;var h=o*l/c,f=-o*u/c,p=De(s,a),d=Oe(s,h),g=Oe(a,f);Re(d,g);var m=p,v=Pe(d,m),y=Pe(m,m),x=v*v-y*(Pe(d,d)-1);if(!(0>x)){var b=Math.sqrt(x),w=Oe(m,(-v-b)/y);if(Re(w,d),w=He(w),!n)return w;var k,M=t[0],S=e[0],C=t[1],T=e[1];M>S&&(k=M,M=S,S=k);var A=S-M,_=la(A-Ta)<La,L=_||La>A;if(!_&&C>T&&(k=C,C=T,T=k),L?_?C+T>0^w[1]<(la(w[0]-M)<La?C:T):C<=w[1]&&w[1]<=T:A>Ta^(M<=w[0]&&w[0]<=S)){var E=Oe(m,(-v+b)/y);return Re(E,d),[w,He(E)]}}}function r(e,n){var i=s?t:Ta-t,r=0;return-i>e?r|=1:e>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(t),s=o>0,a=la(o)>La,l=Nn(t,6*Na);return Ue(e,n,l,s?[0,-t]:[-Ta,t-Ta])}function rn(t,e,n,i){return function(r){var o,s=r.a,a=r.b,l=s.x,u=s.y,c=a.x,h=a.y,f=0,p=1,d=c-l,g=h-u;if(o=t-l,d||!(o>0)){if(o/=d,0>d){if(f>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>f&&(f=o)}if(o=n-l,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>f&&(f=o)}else if(d>0){if(f>o)return;p>o&&(p=o)}if(o=e-u,g||!(o>0)){if(o/=g,0>g){if(f>o)return;p>o&&(p=o)}else if(g>0){if(o>p)return;o>f&&(f=o)}if(o=i-u,g||!(0>o)){if(o/=g,0>g){if(o>p)return;o>f&&(f=o)}else if(g>0){if(f>o)return;p>o&&(p=o)}return f>0&&(r.a={x:l+f*d,y:u+f*g}),1>p&&(r.b={x:l+p*d,y:u+p*g}),r}}}}}}function on(t,e,n,i){function r(i,r){return la(i[0]-t)<La?r>0?0:3:la(i[0]-n)<La?r>0?2:1:la(i[1]-e)<La?r>0?1:0:r>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var n=r(t,1),i=r(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){function l(t){for(var e=0,n=v.length,i=t[1],r=0;n>r;++r)for(var o,s=1,a=v[r],l=a.length,c=a[0];l>s;++s)o=a[s],c[1]<=i?o[1]>i&&u(c,o,t)>0&&++e:o[1]<=i&&u(c,o,t)<0&&--e,c=o;return 0!==e}function u(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}function c(o,a,l,u){var c=0,h=0;if(null==o||(c=r(o,l))!==(h=r(a,l))||s(o,a)<0^l>0){do u.point(0===c||3===c?t:n,c>1?i:e);while((c=(c+l+4)%4)!==h)}else u.point(a[0],a[1])}function h(r,o){return r>=t&&n>=r&&o>=e&&i>=o}function f(t,e){h(t,e)&&a.point(t,e)}function p(){E.point=g,v&&v.push(y=[]),C=!0,S=!1,k=M=0/0}function d(){m&&(g(x,b),w&&S&&_.rejoin(),m.push(_.buffer())),E.point=f,S&&a.lineEnd()}function g(t,e){t=Math.max(-_l,Math.min(_l,t)),e=Math.max(-_l,Math.min(_l,e));var n=h(t,e);if(v&&y.push([t,e]),C)x=t,b=e,w=n,C=!1,n&&(a.lineStart(),a.point(t,e));else if(n&&S)a.point(t,e);else{var i={a:{x:k,y:M},b:{x:t,y:e}};L(i)?(S||(a.lineStart(),a.point(i.a.x,i.a.y)),a.point(i.b.x,i.b.y),n||a.lineEnd(),T=!1):n&&(a.lineStart(),a.point(t,e),T=!1)}k=t,M=e,S=n}var m,v,y,x,b,w,k,M,S,C,T,A=a,_=Ze(),L=rn(t,e,n,i),E={point:f,lineStart:p,lineEnd:d,polygonStart:function(){a=_,m=[],v=[],T=!0},polygonEnd:function(){a=A,m=Us.merge(m);var e=l([t,i]),n=T&&e,r=m.length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),r&&Xe(m,o,e,c,a),a.polygonEnd()),m=v=y=null}};return E}}function sn(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])}),n}function an(t){var e=0,n=Ta/3,i=Mn(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*Ta/180,n=t[1]*Ta/180):[180*(e/Ta),180*(n/Ta)]},r}function ln(t,e){function n(t,e){var n=Math.sqrt(o-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),s-n*Math.cos(t)]}var i=Math.sin(t),r=(i+Math.sin(e))/2,o=1+i*(2*r-i),s=Math.sqrt(o)/r;return n.invert=function(t,e){var n=s-e;return[Math.atan2(t,n)/r,I((o-(t*t+n*n)*r*r)/(2*r))]},n}function un(){function t(t,e){El+=r*t-i*e,i=t,r=e}var e,n,i,r;Ol.point=function(o,s){Ol.point=t,e=i=o,n=r=s},Ol.lineEnd=function(){t(e,n)}}function cn(t,e){Nl>t&&(Nl=t),t>Dl&&(Dl=t),Pl>e&&(Pl=e),e>Rl&&(Rl=e)}function hn(){function t(t,e){s.push("M",t,",",e,o)}function e(t,e){s.push("M",t,",",e),a.point=n}function n(t,e){s.push("L",t,",",e)}function i(){a.point=t}function r(){s.push("Z")}var o=fn(4.5),s=[],a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=r},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(t){return o=fn(t),a},result:function(){if(s.length){var t=s.join("");return s=[],t}}};return a}function fn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function pn(t,e){vl+=t,yl+=e,++xl}function dn(){function t(t,i){var r=t-e,o=i-n,s=Math.sqrt(r*r+o*o);bl+=s*(e+t)/2,wl+=s*(n+i)/2,kl+=s,pn(e=t,n=i)}var e,n;Hl.point=function(i,r){Hl.point=t,pn(e=i,n=r)}}function gn(){Hl.point=pn}function mn(){function t(t,e){var n=t-i,o=e-r,s=Math.sqrt(n*n+o*o);bl+=s*(i+t)/2,wl+=s*(r+e)/2,kl+=s,s=r*t-i*e,Ml+=s*(i+t),Sl+=s*(r+e),Cl+=3*s,pn(i=t,r=e)}var e,n,i,r;Hl.point=function(o,s){Hl.point=t,pn(e=i=o,n=r=s)},Hl.lineEnd=function(){t(e,n)}}function vn(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,s,0,Aa)}function n(e,n){t.moveTo(e,n),a.point=i}function i(e,n){t.lineTo(e,n)}function r(){a.point=e}function o(){t.closePath()}var s=4.5,a={point:e,lineStart:function(){a.point=n},lineEnd:r,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=r,a.point=e},pointRadius:function(t){return s=t,a},result:l};return a}function yn(t){function e(t){return(a?i:n)(t)}function n(e){return wn(e,function(n,i){n=t(n,i),e.point(n[0],n[1])})}function i(e){function n(n,i){n=t(n,i),e.point(n[0],n[1])}function i(){x=0/0,S.point=o,e.lineStart()}function o(n,i){var o=Ne([n,i]),s=t(n,i);r(x,b,y,w,k,M,x=s[0],b=s[1],y=n,w=o[0],k=o[1],M=o[2],a,e),e.point(x,b)}function s(){S.point=n,e.lineEnd()}function l(){i(),S.point=u,S.lineEnd=c}function u(t,e){o(h=t,f=e),p=x,d=b,g=w,m=k,v=M,S.point=o}function c(){r(x,b,y,w,k,M,p,d,h,g,m,v,a,e),S.lineEnd=s,s()}var h,f,p,d,g,m,v,y,x,b,w,k,M,S={point:n,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),S.lineStart=l},polygonEnd:function(){e.polygonEnd(),S.lineStart=i}};return S}function r(e,n,i,a,l,u,c,h,f,p,d,g,m,v){var y=c-e,x=h-n,b=y*y+x*x;if(b>4*o&&m--){var w=a+p,k=l+d,M=u+g,S=Math.sqrt(w*w+k*k+M*M),C=Math.asin(M/=S),T=la(la(M)-1)<La||la(i-f)<La?(i+f)/2:Math.atan2(k,w),A=t(T,C),_=A[0],L=A[1],E=_-e,N=L-n,P=x*E-y*N;(P*P/b>o||la((y*E+x*N)/b-.5)>.3||s>a*p+l*d+u*g)&&(r(e,n,i,a,l,u,_,L,T,w/=S,k/=S,M,m,v),v.point(_,L),r(_,L,T,w,k,M,c,h,f,p,d,g,m,v))}}var o=.5,s=Math.cos(30*Na),a=16;return e.precision=function(t){return arguments.length?(a=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function xn(t){var e=yn(function(e,n){return t([e*Pa,n*Pa])});return function(t){return Sn(e(t))}}function bn(t){this.stream=t}function wn(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function kn(t){return Mn(function(){return t})()}function Mn(t){function e(t){return t=a(t[0]*Na,t[1]*Na),[t[0]*f+l,u-t[1]*f]}function n(t){return t=a.invert((t[0]-l)/f,(u-t[1])/f),t&&[t[0]*Pa,t[1]*Pa]}function i(){a=sn(s=An(v,y,x),o);var t=o(g,m);return l=p-t[0]*f,u=d+t[1]*f,r()}function r(){return c&&(c.valid=!1,c=null),e}var o,s,a,l,u,c,h=yn(function(t,e){return t=o(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,p=480,d=250,g=0,m=0,v=0,y=0,x=0,b=Al,w=ge,k=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=Sn(b(s,h(w(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(b=null==t?(k=t,Al):nn((k=+t)*Na),r()):k},e.clipExtent=function(t){return arguments.length?(M=t,w=t?on(t[0][0],t[0][1],t[1][0],t[1][1]):ge,r()):M},e.scale=function(t){return arguments.length?(f=+t,i()):f},e.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],i()):[p,d]},e.center=function(t){return arguments.length?(g=t[0]%360*Na,m=t[1]%360*Na,i()):[g*Pa,m*Pa]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Na,y=t[1]%360*Na,x=t.length>2?t[2]%360*Na:0,i()):[v*Pa,y*Pa,x*Pa]},Us.rebind(e,h,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,i()}}function Sn(t){return wn(t,function(e,n){t.point(e*Na,n*Na)})}function Cn(t,e){return[t,e]}function Tn(t,e){return[t>Ta?t-Aa:-Ta>t?t+Aa:t,e]}function An(t,e,n){return t?e||n?sn(Ln(t),En(e,n)):Ln(t):e||n?En(e,n):Tn}function _n(t){return function(e,n){return e+=t,[e>Ta?e-Aa:-Ta>e?e+Aa:e,n]}}function Ln(t){var e=_n(t);return e.invert=_n(-t),e}function En(t,e){function n(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*i+a*r;return[Math.atan2(l*o-c*s,a*i-u*r),I(c*o+l*s)]}var i=Math.cos(t),r=Math.sin(t),o=Math.cos(e),s=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*o-l*s;return[Math.atan2(l*o+u*s,a*i+c*r),I(c*i-a*r)]},n}function Nn(t,e){var n=Math.cos(t),i=Math.sin(t);return function(r,o,s,a){var l=s*e;null!=r?(r=Pn(n,r),o=Pn(n,o),(s>0?o>r:r>o)&&(r+=s*Aa)):(r=t+s*Aa,o=t-.5*l);for(var u,c=r;s>0?c>o:o>c;c-=l)a.point((u=He([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function Pn(t,e){var n=Ne(e);n[0]-=t,ze(n);var i=j(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-La)%(2*Math.PI)}function Dn(t,e,n){var i=Us.range(t,e-La,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function Rn(t,e,n){var i=Us.range(t,e-La,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function On(t){return t.source}function zn(t){return t.target}function Hn(t,e,n,i){var r=Math.cos(e),o=Math.sin(e),s=Math.cos(i),a=Math.sin(i),l=r*Math.cos(t),u=r*Math.sin(t),c=s*Math.cos(n),h=s*Math.sin(n),f=2*Math.asin(Math.sqrt(W(i-e)+r*s*W(n-t))),p=1/Math.sin(f),d=f?function(t){var e=Math.sin(t*=f)*p,n=Math.sin(f-t)*p,i=n*l+e*c,r=n*u+e*h,s=n*o+e*a;return[Math.atan2(r,i)*Pa,Math.atan2(s,Math.sqrt(i*i+r*r))*Pa]}:function(){return[t*Pa,e*Pa]};return d.distance=f,d}function jn(){function t(t,r){var o=Math.sin(r*=Na),s=Math.cos(r),a=la((t*=Na)-e),l=Math.cos(a);jl+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=i*o-n*s*l)*a),n*o+i*s*l),e=t,n=o,i=s}var e,n,i;Il.point=function(r,o){e=r*Na,n=Math.sin(o*=Na),i=Math.cos(o),Il.point=t},Il.lineEnd=function(){Il.point=Il.lineEnd=l}}function In(t,e){function n(e,n){var i=Math.cos(e),r=Math.cos(n),o=t(i*r);return[o*r*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),r=e(i),o=Math.sin(r),s=Math.cos(r);return[Math.atan2(t*o,i*s),Math.asin(i&&n*o/i)]},n}function $n(t,e){function n(t,e){var n=la(la(e)-_a)<La?0:s/Math.pow(r(e),o);return[n*Math.sin(o*t),s-n*Math.cos(o*t)]}var i=Math.cos(t),r=function(t){return Math.tan(Ta/4+t/2)},o=t===e?Math.sin(t):Math.log(i/Math.cos(e))/Math.log(r(e)/r(t)),s=i*Math.pow(r(t),o)/o;return o?(n.invert=function(t,e){var n=s-e,i=H(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(s/i,1/o))-_a]},n):Fn}function Bn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(r*t),o-n*Math.cos(r*t)]}var i=Math.cos(t),r=t===e?Math.sin(t):(i-Math.cos(e))/(e-t),o=i/r+t;return la(r)<La?Cn:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,o-H(r)*Math.sqrt(t*t+n*n)]},n)}function Fn(t,e){return[t,Math.log(Math.tan(Ta/4+e/2))]}function Wn(t){var e,n=kn(t),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var s=o.apply(n,arguments);if(s===n){if(e=null==t){var a=Ta*i(),l=r();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else e&&(s=null);return s},n.clipExtent(null)}function qn(t,e){var n=Math.cos(e)*Math.sin(t);return[Math.log((1+n)/(1-n))/2,Math.atan2(Math.tan(e),Math.cos(t))]}function Xn(t){return t[0]}function Yn(t){return t[1]}function Gn(t,e,n,i){var r,o,s,a,l,u,c;return r=i[t],o=r[0],s=r[1],r=i[e],a=r[0],l=r[1],r=i[n],u=r[0],c=r[1],(c-s)*(a-o)-(l-s)*(u-o)>0}function Un(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Vn(t,e,n,i){var r=t[0],o=n[0],s=e[0]-r,a=i[0]-o,l=t[1],u=n[1],c=e[1]-l,h=i[1]-u,f=(a*(l-u)-h*(r-o))/(h*s-a*c);return[r+f*s,l+f*c]}function Zn(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Qn(){yi(this),this.edge=this.site=this.circle=null}function Kn(t){var e=Ql.pop()||new Qn;return e.site=t,e}function Jn(t){ui(t),Ul.remove(t),Ql.push(t),yi(t)}function ti(t){var e=t.circle,n=e.x,i=e.cy,r={x:n,y:i},o=t.P,s=t.N,a=[t];Jn(t);for(var l=o;l.circle&&la(n-l.circle.x)<La&&la(i-l.circle.cy)<La;)o=l.P,a.unshift(l),Jn(l),l=o;a.unshift(l),ui(l);for(var u=s;u.circle&&la(n-u.circle.x)<La&&la(i-u.circle.cy)<La;)s=u.N,a.push(u),Jn(u),u=s;a.push(u),ui(u);var c,h=a.length;for(c=1;h>c;++c)u=a[c],l=a[c-1],gi(u.edge,l.site,u.site,r);l=a[0],u=a[h-1],u.edge=pi(l.site,u.site,null,r),li(l),li(u)}function ei(t){for(var e,n,i,r,o=t.x,s=t.y,a=Ul._;a;)if(i=ni(a,s)-o,i>La)a=a.L;else{if(r=o-ii(a,s),!(r>La)){i>-La?(e=a.P,n=a):r>-La?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}var l=Kn(t);if(Ul.insert(e,l),e||n){if(e===n)return ui(e),n=Kn(e.site),Ul.insert(l,n),l.edge=n.edge=pi(e.site,l.site),li(e),li(n),void 0;if(!n)return l.edge=pi(e.site,l.site),void 0;ui(e),ui(n);var u=e.site,c=u.x,h=u.y,f=t.x-c,p=t.y-h,d=n.site,g=d.x-c,m=d.y-h,v=2*(f*m-p*g),y=f*f+p*p,x=g*g+m*m,b={x:(m*y-p*x)/v+c,y:(f*x-g*y)/v+h};gi(n.edge,u,d,b),l.edge=pi(u,t,null,b),n.edge=pi(t,d,null,b),li(e),li(n)}}function ni(t,e){var n=t.site,i=n.x,r=n.y,o=r-e;if(!o)return i;var s=t.P;if(!s)return-1/0;n=s.site;var a=n.x,l=n.y,u=l-e;if(!u)return a;var c=a-i,h=1/o-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+r-o/2)))/h+i:(i+a)/2}function ii(t,e){var n=t.N;if(n)return ni(n,e);var i=t.site;return i.y===e?i.x:1/0}function ri(t){this.site=t,this.edges=[]}function oi(t){for(var e,n,i,r,o,s,a,l,u,c,h=t[0][0],f=t[1][0],p=t[0][1],d=t[1][1],g=Gl,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(a=o.edges,l=a.length,s=0;l>s;)c=a[s].end(),i=c.x,r=c.y,u=a[++s%l].start(),e=u.x,n=u.y,(la(i-e)>La||la(r-n)>La)&&(a.splice(s,0,new mi(di(o.site,c,la(i-h)<La&&d-r>La?{x:h,y:la(e-h)<La?n:d}:la(r-d)<La&&f-i>La?{x:la(n-d)<La?e:f,y:d}:la(i-f)<La&&r-p>La?{x:f,y:la(e-f)<La?n:p}:la(r-p)<La&&i-h>La?{x:la(n-p)<La?e:h,y:p}:null),o.site,null)),++l)}function si(t,e){return e.angle-t.angle}function ai(){yi(this),this.x=this.y=this.arc=this.site=this.cy=null}function li(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,r=t.site,o=n.site;if(i!==o){var s=r.x,a=r.y,l=i.x-s,u=i.y-a,c=o.x-s,h=o.y-a,f=2*(l*h-u*c);if(!(f>=-Ea)){var p=l*l+u*u,d=c*c+h*h,g=(h*p-u*d)/f,m=(l*d-c*p)/f,h=m+a,v=Kl.pop()||new ai;v.arc=t,v.site=r,v.x=g+s,v.y=h+Math.sqrt(g*g+m*m),v.cy=h,t.circle=v;for(var y=null,x=Zl._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Zl.insert(y,v),y||(Vl=v)}}}}function ui(t){var e=t.circle;e&&(e.P||(Vl=e.N),Zl.remove(e),Kl.push(e),yi(e),t.circle=null)}function ci(t){for(var e,n=Yl,i=rn(t[0][0],t[0][1],t[1][0],t[1][1]),r=n.length;r--;)e=n[r],(!hi(e,t)||!i(e)||la(e.a.x-e.b.x)<La&&la(e.a.y-e.b.y)<La)&&(e.a=e.b=null,n.splice(r,1))}function hi(t,e){var n=t.b;if(n)return!0;var i,r,o=t.a,s=e[0][0],a=e[1][0],l=e[0][1],u=e[1][1],c=t.l,h=t.r,f=c.x,p=c.y,d=h.x,g=h.y,m=(f+d)/2,v=(p+g)/2;if(g===p){if(s>m||m>=a)return;if(f>d){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y<l)return}else o={x:m,y:u};n={x:m,y:l}}}else if(i=(f-d)/(g-p),r=v-i*m,-1>i||i>1)if(f>d){if(o){if(o.y>=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-r)/i,y:u};n={x:(l-r)/i,y:l}}else if(g>p){if(o){if(o.x>=a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}else{if(o){if(o.x<s)return}else o={x:a,y:i*a+r};n={x:s,y:i*s+r}}return t.a=o,t.b=n,!0}function fi(t,e){this.l=t,this.r=e,this.a=this.b=null}function pi(t,e,n,i){var r=new fi(t,e);return Yl.push(r),n&&gi(r,t,e,n),i&&gi(r,e,t,i),Gl[t.i].edges.push(new mi(r,t,e)),Gl[e.i].edges.push(new mi(r,e,t)),r
|
|
}function di(t,e,n){var i=new fi(t,null);return i.a=e,i.b=n,Yl.push(i),i}function gi(t,e,n,i){t.a||t.b?t.l===n?t.b=i:t.a=i:(t.a=i,t.l=e,t.r=n)}function mi(t,e,n){var i=t.a,r=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function vi(){this._=null}function yi(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function xi(t,e){var n=e,i=e.R,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function bi(t,e){var n=e,i=e.L,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function wi(t){for(;t.L;)t=t.L;return t}function ki(t,e){var n,i,r,o=t.sort(Mi).pop();for(Yl=[],Gl=new Array(t.length),Ul=new vi,Zl=new vi;;)if(r=Vl,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))(o.x!==n||o.y!==i)&&(Gl[o.i]=new ri(o),ei(o),n=o.x,i=o.y),o=t.pop();else{if(!r)break;ti(r.arc)}e&&(ci(e),oi(e));var s={cells:Gl,edges:Yl};return Ul=Zl=Yl=Gl=null,s}function Mi(t,e){return e.y-t.y||e.x-t.x}function Si(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function Ci(t){return t.x}function Ti(t){return t.y}function Ai(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function _i(t,e,n,i,r,o){if(!t(e,n,i,r,o)){var s=.5*(n+r),a=.5*(i+o),l=e.nodes;l[0]&&_i(t,l[0],n,i,s,a),l[1]&&_i(t,l[1],s,i,r,a),l[2]&&_i(t,l[2],n,a,s,o),l[3]&&_i(t,l[3],s,a,r,o)}}function Li(t,e){t=Us.rgb(t),e=Us.rgb(e);var n=t.r,i=t.g,r=t.b,o=e.r-n,s=e.g-i,a=e.b-r;return function(t){return"#"+le(Math.round(n+o*t))+le(Math.round(i+s*t))+le(Math.round(r+a*t))}}function Ei(t,e){var n,i={},r={};for(n in t)n in e?i[n]=Di(t[n],e[n]):r[n]=t[n];for(n in e)n in t||(r[n]=e[n]);return function(t){for(n in i)r[n]=i[n](t);return r}}function Ni(t,e){return e-=t=+t,function(n){return t+e*n}}function Pi(t,e){var n,i,r,o,s,a=0,l=0,u=[],c=[];for(t+="",e+="",tu.lastIndex=0,i=0;n=tu.exec(e);++i)n.index&&u.push(e.substring(a,l=n.index)),c.push({i:u.length,x:n[0]}),u.push(null),a=tu.lastIndex;for(a<e.length&&u.push(e.substring(a)),i=0,o=c.length;(n=tu.exec(t))&&o>i;++i)if(s=c[i],s.x==n[0]){if(s.i)if(null==u[s.i+1])for(u[s.i-1]+=s.x,u.splice(s.i,1),r=i+1;o>r;++r)c[r].i--;else for(u[s.i-1]+=s.x+u[s.i+1],u.splice(s.i,2),r=i+1;o>r;++r)c[r].i-=2;else if(null==u[s.i+1])u[s.i]=s.x;else for(u[s.i]=s.x+u[s.i+1],u.splice(s.i+1,1),r=i+1;o>r;++r)c[r].i--;c.splice(i,1),o--,i--}else s.x=Ni(parseFloat(n[0]),parseFloat(s.x));for(;o>i;)s=c.pop(),null==u[s.i+1]?u[s.i]=s.x:(u[s.i]=s.x+u[s.i+1],u.splice(s.i+1,1)),o--;return 1===u.length?null==u[0]?(s=c[0].x,function(t){return s(t)+""}):function(){return e}:function(t){for(i=0;o>i;++i)u[(s=c[i]).i]=s.x(t);return u.join("")}}function Di(t,e){for(var n,i=Us.interpolators.length;--i>=0&&!(n=Us.interpolators[i](t,e)););return n}function Ri(t,e){var n,i=[],r=[],o=t.length,s=e.length,a=Math.min(t.length,e.length);for(n=0;a>n;++n)i.push(Di(t[n],e[n]));for(;o>n;++n)r[n]=t[n];for(;s>n;++n)r[n]=e[n];return function(t){for(n=0;a>n;++n)r[n]=i[n](t);return r}}function Oi(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function zi(t){return function(e){return 1-t(1-e)}}function Hi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function ji(t){return t*t}function Ii(t){return t*t*t}function $i(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Bi(t){return function(e){return Math.pow(e,t)}}function Fi(t){return 1-Math.cos(t*_a)}function Wi(t){return Math.pow(2,10*(t-1))}function qi(t){return 1-Math.sqrt(1-t*t)}function Xi(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Aa*Math.asin(1/t):(t=1,n=e/4),function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*Aa/e)}}function Yi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Gi(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Ui(t,e){t=Us.hcl(t),e=Us.hcl(e);var n=t.h,i=t.c,r=t.l,o=e.h-n,s=e.c-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return Z(n+o*t,i+s*t,r+a*t)+""}}function Vi(t,e){t=Us.hsl(t),e=Us.hsl(e);var n=t.h,i=t.s,r=t.l,o=e.h-n,s=e.s-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return G(n+o*t,i+s*t,r+a*t)+""}}function Zi(t,e){t=Us.lab(t),e=Us.lab(e);var n=t.l,i=t.a,r=t.b,o=e.l-n,s=e.a-i,a=e.b-r;return function(t){return J(n+o*t,i+s*t,r+a*t)+""}}function Qi(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Ki(t){var e=[t.a,t.b],n=[t.c,t.d],i=tr(e),r=Ji(e,n),o=tr(er(n,e,-r))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Pa,this.translate=[t.e,t.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*Pa:0}function Ji(t,e){return t[0]*e[0]+t[1]*e[1]}function tr(t){var e=Math.sqrt(Ji(t,t));return e&&(t[0]/=e,t[1]/=e),e}function er(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}function nr(t,e){var n,i=[],r=[],o=Us.transform(t),s=Us.transform(e),a=o.translate,l=s.translate,u=o.rotate,c=s.rotate,h=o.skew,f=s.skew,p=o.scale,d=s.scale;return a[0]!=l[0]||a[1]!=l[1]?(i.push("translate(",null,",",null,")"),r.push({i:1,x:Ni(a[0],l[0])},{i:3,x:Ni(a[1],l[1])})):l[0]||l[1]?i.push("translate("+l+")"):i.push(""),u!=c?(u-c>180?c+=360:c-u>180&&(u+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:Ni(u,c)})):c&&i.push(i.pop()+"rotate("+c+")"),h!=f?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:Ni(h,f)}):f&&i.push(i.pop()+"skewX("+f+")"),p[0]!=d[0]||p[1]!=d[1]?(n=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:n-4,x:Ni(p[0],d[0])},{i:n-2,x:Ni(p[1],d[1])})):(1!=d[0]||1!=d[1])&&i.push(i.pop()+"scale("+d+")"),n=r.length,function(t){for(var e,o=-1;++o<n;)i[(e=r[o]).i]=e.x(t);return i.join("")}}function ir(t,e){return e=e-(t=+t)?1/(e-t):0,function(n){return(n-t)*e}}function rr(t,e){return e=e-(t=+t)?1/(e-t):0,function(n){return Math.max(0,Math.min(1,(n-t)*e))}}function or(t){for(var e=t.source,n=t.target,i=ar(e,n),r=[e];e!==i;)e=e.parent,r.push(e);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function sr(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function ar(t,e){if(t===e)return t;for(var n=sr(t),i=sr(e),r=n.pop(),o=i.pop(),s=null;r===o;)s=r,r=n.pop(),o=i.pop();return s}function lr(t){t.fixed|=2}function ur(t){t.fixed&=-7}function cr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function hr(t){t.fixed&=-5}function fr(t,e,n){var i=0,r=0;if(t.charge=0,!t.leaf)for(var o,s=t.nodes,a=s.length,l=-1;++l<a;)o=s[l],null!=o&&(fr(o,e,n),t.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*n[t.point.index];t.charge+=t.pointCharge=u,i+=u*t.point.x,r+=u*t.point.y}t.cx=i/t.charge,t.cy=r/t.charge}function pr(t,e){return Us.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=vr,t}function dr(t){return t.children}function gr(t){return t.value}function mr(t,e){return e.value-t.value}function vr(t){return Us.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function yr(t){return t.x}function xr(t){return t.y}function br(t,e,n){t.y0=e,t.y=n}function wr(t){return Us.range(t.length)}function kr(t){for(var e=-1,n=t[0].length,i=[];++e<n;)i[e]=0;return i}function Mr(t){for(var e,n=1,i=0,r=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>r&&(i=n,r=e);return i}function Sr(t){return t.reduce(Cr,0)}function Cr(t,e){return t+e[1]}function Tr(t,e){return Ar(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ar(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,o=[];++n<=e;)o[n]=r*n+i;return o}function _r(t){return[Us.min(t),Us.max(t)]}function Lr(t,e){return t.parent==e.parent?1:2}function Er(t){var e=t.children;return e&&e.length?e[0]:t._tree.thread}function Nr(t){var e,n=t.children;return n&&(e=n.length)?n[e-1]:t._tree.thread}function Pr(t,e){var n=t.children;if(n&&(r=n.length))for(var i,r,o=-1;++o<r;)e(i=Pr(n[o],e),t)>0&&(t=i);return t}function Dr(t,e){return t.x-e.x}function Rr(t,e){return e.x-t.x}function Or(t,e){return t.depth-e.depth}function zr(t,e){function n(t,i){var r=t.children;if(r&&(s=r.length))for(var o,s,a=null,l=-1;++l<s;)o=r[l],n(o,a),a=o;e(t,i)}n(t,null)}function Hr(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)e=r[o]._tree,e.prelim+=n,e.mod+=n,n+=e.shift+(i+=e.change)}function jr(t,e,n){t=t._tree,e=e._tree;var i=n/(e.number-t.number);t.change+=i,e.change-=i,e.shift+=n,e.prelim+=n,e.mod+=n}function Ir(t,e,n){return t._tree.ancestor.parent==e.parent?t._tree.ancestor:n}function $r(t,e){return t.value-e.value}function Br(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Fr(t,e){t._pack_next=e,e._pack_prev=t}function Wr(t,e){var n=e.x-t.x,i=e.y-t.y,r=t.r+e.r;return.999*r*r>n*n+i*i}function qr(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),p=Math.max(t.y+t.r,p)}if((n=t.children)&&(u=n.length)){var n,i,r,o,s,a,l,u,c=1/0,h=-1/0,f=1/0,p=-1/0;if(n.forEach(Xr),i=n[0],i.x=-i.r,i.y=0,e(i),u>1&&(r=n[1],r.x=r.r,r.y=0,e(r),u>2))for(o=n[2],Ur(i,r,o),e(o),Br(i,o),i._pack_prev=o,Br(o,r),r=i._pack_next,s=3;u>s;s++){Ur(i,r,o=n[s]);var d=0,g=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,g++)if(Wr(a,o)){d=1;break}if(1==d)for(l=i._pack_prev;l!==a._pack_prev&&!Wr(l,o);l=l._pack_prev,m++);d?(m>g||g==m&&r.r<i.r?Fr(i,r=a):Fr(i=l,r),s--):(Br(i,o),r=o,e(o))}var v=(c+h)/2,y=(f+p)/2,x=0;for(s=0;u>s;s++)o=n[s],o.x-=v,o.y-=y,x=Math.max(x,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=x,n.forEach(Yr)}}function Xr(t){t._pack_next=t._pack_prev=t}function Yr(t){delete t._pack_next,delete t._pack_prev}function Gr(t,e,n,i){var r=t.children;if(t.x=e+=i*t.x,t.y=n+=i*t.y,t.r*=i,r)for(var o=-1,s=r.length;++o<s;)Gr(r[o],e,n,i)}function Ur(t,e,n){var i=t.r+n.r,r=e.x-t.x,o=e.y-t.y;if(i&&(r||o)){var s=e.r+n.r,a=r*r+o*o;s*=s,i*=i;var l=.5+(i-s)/(2*a),u=Math.sqrt(Math.max(0,2*s*(i+a)-(i-=a)*i-s*s))/(2*a);n.x=t.x+l*r+u*o,n.y=t.y+l*o-u*r}else n.x=t.x+i,n.y=t.y}function Vr(t){return 1+Us.max(t,function(t){return t.y})}function Zr(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Qr(t){var e=t.children;return e&&e.length?Qr(e[0]):t}function Kr(t){var e,n=t.children;return n&&(e=n.length)?Kr(n[e-1]):t}function Jr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function to(t,e){var n=t.x+e[3],i=t.y+e[0],r=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>r&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function eo(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function no(t){return t.rangeExtent?t.rangeExtent():eo(t.range())}function io(t,e,n,i){var r=n(t[0],t[1]),o=i(e[0],e[1]);return function(t){return o(r(t))}}function ro(t,e){var n,i=0,r=t.length-1,o=t[i],s=t[r];return o>s&&(n=i,i=r,r=n,n=o,o=s,s=n),t[i]=e.floor(o),t[r]=e.ceil(s),t}function oo(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:cu}function so(t,e,n,i){var r=[],o=[],s=0,a=Math.min(t.length,e.length)-1;for(t[a]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=a;)r.push(n(t[s-1],t[s])),o.push(i(e[s-1],e[s]));return function(e){var n=Us.bisect(t,e,1,a)-1;return o[n](r[n](e))}}function ao(t,e,n,i){function r(){var r=Math.min(t.length,e.length)>2?so:io,l=i?rr:ir;return s=r(t,e,l,n),a=r(e,t,l,Di),o}function o(t){return s(t)}var s,a;return o.invert=function(t){return a(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.rangeRound=function(t){return o.range(t).interpolate(Qi)},o.clamp=function(t){return arguments.length?(i=t,r()):i},o.interpolate=function(t){return arguments.length?(n=t,r()):n},o.ticks=function(e){return ho(t,e)},o.tickFormat=function(e,n){return fo(t,e,n)},o.nice=function(e){return uo(t,e),r()},o.copy=function(){return ao(t,e,n,i)},r()}function lo(t,e){return Us.rebind(t,e,"range","rangeRound","interpolate","clamp")}function uo(t,e){return ro(t,oo(co(t,e)[2]))}function co(t,e){null==e&&(e=10);var n=eo(t),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),o=e/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function ho(t,e){return Us.range.apply(Us,co(t,e))}function fo(t,e,n){var i=co(t,e);return Us.format(n?n.replace(ol,function(t,e,n,r,o,s,a,l,u,c){return[e,n,r,o,s,a,l,u||"."+go(c,i),c].join("")}):",."+po(i[2])+"f")}function po(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function go(t,e){var n=po(e[2]);return t in hu?Math.abs(n-po(Math.max(Math.abs(e[0]),Math.abs(e[1]))))+ +("e"!==t):n-2*("%"===t)}function mo(t,e,n,i){function r(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(r)),s):i},s.base=function(n){return arguments.length?(e=+n,t.domain(i.map(r)),s):e},s.nice=function(){var e=ro(i.map(r),n?Math:pu);return t.domain(e),i=e.map(o),s},s.ticks=function(){var t=eo(i),s=[],a=t[0],l=t[1],u=Math.floor(r(a)),c=Math.ceil(r(l)),h=e%1?2:e;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var f=1;h>f;f++)s.push(o(u)*f);s.push(o(u))}else for(s.push(o(u));u++<c;)for(var f=h-1;f>0;f--)s.push(o(u)*f);for(u=0;s[u]<a;u++);for(c=s.length;s[c-1]>l;c--);s=s.slice(u,c)}return s},s.tickFormat=function(t,e){if(!arguments.length)return fu;arguments.length<2?e=fu:"function"!=typeof e&&(e=Us.format(e));var i,a=Math.max(.1,t/s.ticks().length),l=n?(i=1e-12,Math.ceil):(i=-1e-12,Math.floor);return function(t){return t/o(l(r(t)+i))<=a?e(t):""}},s.copy=function(){return mo(t.copy(),e,n,i)},lo(s,t)}function vo(t,e,n){function i(e){return t(r(e))}var r=yo(e),o=yo(1/e);return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),i):n},i.ticks=function(t){return ho(n,t)},i.tickFormat=function(t,e){return fo(n,t,e)},i.nice=function(t){return i.domain(uo(n,t))},i.exponent=function(s){return arguments.length?(r=yo(e=s),o=yo(1/e),t.domain(n.map(r)),i):e},i.copy=function(){return vo(t.copy(),e,n)},lo(i,t)}function yo(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function xo(t,e){function n(n){return s[((o.get(n)||"range"===e.t&&o.set(n,t.push(n)))-1)%s.length]}function i(e,n){return Us.range(t.length).map(function(t){return e+n*t})}var o,s,a;return n.domain=function(i){if(!arguments.length)return t;t=[],o=new r;for(var s,a=-1,l=i.length;++a<l;)o.has(s=i[a])||o.set(s,t.push(s));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(s=t,a=0,e={t:"range",a:arguments},n):s},n.rangePoints=function(r,o){arguments.length<2&&(o=0);var l=r[0],u=r[1],c=(u-l)/(Math.max(1,t.length-1)+o);return s=i(t.length<2?(l+u)/2:l+c*o/2,c),a=0,e={t:"rangePoints",a:arguments},n},n.rangeBands=function(r,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=r[1]<r[0],c=r[u-0],h=r[1-u],f=(h-c)/(t.length-o+2*l);return s=i(c+f*l,f),u&&s.reverse(),a=f*(1-o),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=r[1]<r[0],c=r[u-0],h=r[1-u],f=Math.floor((h-c)/(t.length-o+2*l)),p=h-c-(t.length-o)*f;return s=i(c+Math.round(p/2),f),u&&s.reverse(),a=Math.round(f*(1-o)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return eo(e.a[0])},n.copy=function(){return xo(t,e)},n.domain(t)}function bo(t,e){function n(){var n=0,o=e.length;for(r=[];++n<o;)r[n-1]=Us.quantile(t,n/o);return i}function i(t){return isNaN(t=+t)?void 0:e[Us.bisect(r,t)]}var r;return i.domain=function(e){return arguments.length?(t=e.filter(function(t){return!isNaN(t)}).sort(Us.ascending),n()):t},i.range=function(t){return arguments.length?(e=t,n()):e},i.quantiles=function(){return r},i.invertExtent=function(n){return n=e.indexOf(n),0>n?[0/0,0/0]:[n>0?r[n-1]:t[0],n<r.length?r[n]:t[t.length-1]]},i.copy=function(){return bo(t,e)},n()}function wo(t,e,n){function i(e){return n[Math.max(0,Math.min(s,Math.floor(o*(e-t))))]}function r(){return o=n.length/(e-t),s=n.length-1,i}var o,s;return i.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],r()):[t,e]},i.range=function(t){return arguments.length?(n=t,r()):n},i.invertExtent=function(e){return e=n.indexOf(e),e=0>e?0/0:e/o+t,[e,e+1/o]},i.copy=function(){return wo(t,e,n)},r()}function ko(t,e){function n(n){return n>=n?e[Us.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ko(t,e)},n}function Mo(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return ho(t,e)},e.tickFormat=function(e,n){return fo(t,e,n)},e.copy=function(){return Mo(t)},e}function So(t){return t.innerRadius}function Co(t){return t.outerRadius}function To(t){return t.startAngle}function Ao(t){return t.endAngle}function _o(t){function e(e){function s(){u.push("M",o(t(c),a))}for(var l,u=[],c=[],h=-1,f=e.length,p=de(n),d=de(i);++h<f;)r.call(this,l=e[h],h)?c.push([+p.call(this,l,h),+d.call(this,l,h)]):c.length&&(s(),c=[]);return c.length&&s(),u.length?u.join(""):null}var n=Xn,i=Yn,r=qe,o=Lo,s=o.key,a=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e.defined=function(t){return arguments.length?(r=t,e):r},e.interpolate=function(t){return arguments.length?(s="function"==typeof t?o=t:(o=bu.get(t)||Lo).key,e):s},e.tension=function(t){return arguments.length?(a=t,e):a},e}function Lo(t){return t.join("L")}function Eo(t){return Lo(t)+"Z"}function No(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i[0]+(i=t[e])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function Po(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("V",(i=t[e])[1],"H",i[0]);return r.join("")}function Do(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i=t[e])[0],"V",i[1]);return r.join("")}function Ro(t,e){return t.length<4?Lo(t):t[1]+Ho(t.slice(1,t.length-1),jo(t,e))}function Oo(t,e){return t.length<3?Lo(t):t[0]+Ho((t.push(t[0]),t),jo([t[t.length-2]].concat(t,[t[1]]),e))}function zo(t,e){return t.length<3?Lo(t):t[0]+Ho(t,jo(t,e))}function Ho(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Lo(t);var n=t.length!=e.length,i="",r=t[0],o=t[1],s=e[0],a=s,l=1;if(n&&(i+="Q"+(o[0]-2*s[0]/3)+","+(o[1]-2*s[1]/3)+","+o[0]+","+o[1],r=t[1],l=2),e.length>1){a=e[1],o=t[l],l++,i+="C"+(r[0]+s[0])+","+(r[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var u=2;u<e.length;u++,l++)o=t[l],a=e[u],i+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}if(n){var c=t[l];i+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+c[0]+","+c[1]}return i}function jo(t,e){for(var n,i=[],r=(1-e)/2,o=t[0],s=t[1],a=1,l=t.length;++a<l;)n=o,o=s,s=t[a],i.push([r*(s[0]-n[0]),r*(s[1]-n[1])]);return i}function Io(t){if(t.length<3)return Lo(t);var e=1,n=t.length,i=t[0],r=i[0],o=i[1],s=[r,r,r,(i=t[1])[0]],a=[o,o,o,i[1]],l=[r,",",o,"L",Wo(Mu,s),",",Wo(Mu,a)];for(t.push(t[n-1]);++e<=n;)i=t[e],s.shift(),s.push(i[0]),a.shift(),a.push(i[1]),qo(l,s,a);return t.pop(),l.push("L",i),l.join("")}function $o(t){if(t.length<4)return Lo(t);for(var e,n=[],i=-1,r=t.length,o=[0],s=[0];++i<3;)e=t[i],o.push(e[0]),s.push(e[1]);for(n.push(Wo(Mu,o)+","+Wo(Mu,s)),--i;++i<r;)e=t[i],o.shift(),o.push(e[0]),s.shift(),s.push(e[1]),qo(n,o,s);return n.join("")}function Bo(t){for(var e,n,i=-1,r=t.length,o=r+4,s=[],a=[];++i<4;)n=t[i%r],s.push(n[0]),a.push(n[1]);for(e=[Wo(Mu,s),",",Wo(Mu,a)],--i;++i<o;)n=t[i%r],s.shift(),s.push(n[0]),a.shift(),a.push(n[1]),qo(e,s,a);return e.join("")}function Fo(t,e){var n=t.length-1;if(n)for(var i,r,o=t[0][0],s=t[0][1],a=t[n][0]-o,l=t[n][1]-s,u=-1;++u<=n;)i=t[u],r=u/n,i[0]=e*i[0]+(1-e)*(o+r*a),i[1]=e*i[1]+(1-e)*(s+r*l);return Io(t)}function Wo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function qo(t,e,n){t.push("C",Wo(wu,e),",",Wo(wu,n),",",Wo(ku,e),",",Wo(ku,n),",",Wo(Mu,e),",",Wo(Mu,n))}function Xo(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Yo(t){for(var e=0,n=t.length-1,i=[],r=t[0],o=t[1],s=i[0]=Xo(r,o);++e<n;)i[e]=(s+(s=Xo(r=o,o=t[e+1])))/2;return i[e]=s,i}function Go(t){for(var e,n,i,r,o=[],s=Yo(t),a=-1,l=t.length-1;++a<l;)e=Xo(t[a],t[a+1]),la(e)<La?s[a]=s[a+1]=0:(n=s[a]/e,i=s[a+1]/e,r=n*n+i*i,r>9&&(r=3*e/Math.sqrt(r),s[a]=r*n,s[a+1]=r*i));for(a=-1;++a<=l;)r=(t[Math.min(l,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a])),o.push([r||0,s[a]*r||0]);return o}function Uo(t){return t.length<3?Lo(t):t[0]+Ho(t,Go(t))}function Vo(t){for(var e,n,i,r=-1,o=t.length;++r<o;)e=t[r],n=e[0],i=e[1]+yu,e[0]=n*Math.cos(i),e[1]=n*Math.sin(i);return t}function Zo(t){function e(e){function l(){g.push("M",a(t(v),h),c,u(t(m.reverse()),h),"Z")}for(var f,p,d,g=[],m=[],v=[],y=-1,x=e.length,b=de(n),w=de(r),k=n===i?function(){return p}:de(i),M=r===o?function(){return d}:de(o);++y<x;)s.call(this,f=e[y],y)?(m.push([p=+b.call(this,f,y),d=+w.call(this,f,y)]),v.push([+k.call(this,f,y),+M.call(this,f,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=Xn,i=Xn,r=0,o=Yn,s=qe,a=Lo,l=a.key,u=a,c="L",h=.7;return e.x=function(t){return arguments.length?(n=i=t,e):i},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(i=t,e):i},e.y=function(t){return arguments.length?(r=o=t,e):o},e.y0=function(t){return arguments.length?(r=t,e):r},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(s=t,e):s},e.interpolate=function(t){return arguments.length?(l="function"==typeof t?a=t:(a=bu.get(t)||Lo).key,u=a.reverse||a,c=a.closed?"M":"L",e):l},e.tension=function(t){return arguments.length?(h=t,e):h},e}function Qo(t){return t.radius}function Ko(t){return[t.x,t.y]}function Jo(t){return function(){var e=t.apply(this,arguments),n=e[0],i=e[1]+yu;return[n*Math.cos(i),n*Math.sin(i)]}}function ts(){return 64}function es(){return"circle"}function ns(t){var e=Math.sqrt(t/Ta);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function is(t,e){return pa(t,Lu),t.id=e,t}function rs(t,e,n,i){var r=t.id;return _(t,"function"==typeof n?function(t,o,s){t.__transition__[r].tween.set(e,i(n.call(t,t.__data__,o,s)))}:(n=i(n),function(t){t.__transition__[r].tween.set(e,n)}))}function os(t){return null==t&&(t=""),function(){this.textContent=t}}function ss(t,e,n,i){var o=t.__transition__||(t.__transition__={active:0,count:0}),s=o[n];if(!s){var a=i.time;s=o[n]={tween:new r,time:a,ease:i.ease,delay:i.delay,duration:i.duration},++o.count,Us.timer(function(i){function r(i){return o.active>n?u():(o.active=n,s.event&&s.event.start.call(t,c,e),s.tween.forEach(function(n,i){(i=i.call(t,c,e))&&g.push(i)}),Us.timer(function(){return d.c=l(i||1)?qe:l,1},0,a),void 0)}function l(i){if(o.active!==n)return u();for(var r=i/p,a=h(r),l=g.length;l>0;)g[--l].call(t,a);return r>=1?(s.event&&s.event.end.call(t,c,e),u()):void 0}function u(){return--o.count?delete o[n]:delete t.__transition__,1}var c=t.__data__,h=s.ease,f=s.delay,p=s.duration,d=Ka,g=[];return d.t=f+a,i>=f?r(i-f):(d.c=r,void 0)},0,a)}}function as(t,e){t.attr("transform",function(t){return"translate("+e(t)+",0)"})}function ls(t,e){t.attr("transform",function(t){return"translate(0,"+e(t)+")"})}function us(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function cs(t,e,n){function i(e){var n=t(e),i=o(n,1);return i-e>e-n?n:i}function r(n){return e(n=t(new zu(n-1)),1),n}function o(t,n){return e(t=new zu(+t),n),t}function s(t,i,o){var s=r(t),a=[];if(o>1)for(;i>s;)n(s)%o||a.push(new Date(+s)),e(s,1);else for(;i>s;)a.push(new Date(+s)),e(s,1);return a}function a(t,e,n){try{zu=us;var i=new us;return i._=t,s(i,e,n)}finally{zu=Date}}t.floor=t,t.round=i,t.ceil=r,t.offset=o,t.range=s;var l=t.utc=hs(t);return l.floor=l,l.round=hs(i),l.ceil=hs(r),l.offset=hs(o),l.range=a,t}function hs(t){return function(e,n){try{zu=us;var i=new us;return i._=e,t(i,n)._}finally{zu=Date}}}function fs(t){function e(e){for(var i,r,o,s=[],a=-1,l=0;++a<n;)37===t.charCodeAt(a)&&(s.push(t.substring(l,a)),null!=(r=ec[i=t.charAt(++a)])&&(i=t.charAt(++a)),(o=nc[i])&&(i=o(e,null==r?"e"===i?" ":"0":r)),s.push(i),l=a+1);return s.push(t.substring(l,a)),s.join("")}var n=t.length;return e.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=ps(n,t,e,0);if(i!=e.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&zu!==us,o=new(r?us:zu);return"j"in n?o.setFullYear(n.y,0,n.j):"w"in n&&("W"in n||"U"in n)?(o.setFullYear(n.y,0,1),o.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(o.getDay()+5)%7:n.w+7*n.U-(o.getDay()+6)%7)):o.setFullYear(n.y,n.m,n.d),o.setHours(n.H+Math.floor(n.Z/100),n.M+n.Z%100,n.S,n.L),r?o._:o},e.toString=function(){return t},e}function ps(t,e,n,i){for(var r,o,s,a=0,l=e.length,u=n.length;l>a;){if(i>=u)return-1;if(r=e.charCodeAt(a++),37===r){if(s=e.charAt(a++),o=ic[s in ec?e.charAt(a++):s],!o||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function ds(t){return new RegExp("^(?:"+t.map(Us.requote).join("|")+")","i")}function gs(t){for(var e=new r,n=-1,i=t.length;++n<i;)e.set(t[n].toLowerCase(),n);return e}function ms(t,e,n){var i=0>t?"-":"",r=(i?-t:t)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(e)+r:r)}function vs(t,e,n){Uu.lastIndex=0;var i=Uu.exec(e.substring(n));return i?(t.w=Vu.get(i[0].toLowerCase()),n+i[0].length):-1}function ys(t,e,n){Yu.lastIndex=0;var i=Yu.exec(e.substring(n));return i?(t.w=Gu.get(i[0].toLowerCase()),n+i[0].length):-1}function xs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function bs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n));return i?(t.U=+i[0],n+i[0].length):-1}function ws(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n));return i?(t.W=+i[0],n+i[0].length):-1}function ks(t,e,n){Ku.lastIndex=0;var i=Ku.exec(e.substring(n));return i?(t.m=Ju.get(i[0].toLowerCase()),n+i[0].length):-1}function Ms(t,e,n){Zu.lastIndex=0;var i=Zu.exec(e.substring(n));return i?(t.m=Qu.get(i[0].toLowerCase()),n+i[0].length):-1}function Ss(t,e,n){return ps(t,nc.c.toString(),e,n)}function Cs(t,e,n){return ps(t,nc.x.toString(),e,n)}function Ts(t,e,n){return ps(t,nc.X.toString(),e,n)}function As(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function _s(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.y=Es(+i[0]),n+i[0].length):-1}function Ls(t,e,n){return/^[+-]\d{4}$/.test(e=e.substring(n,n+5))?(t.Z=+e,n+5):-1}function Es(t){return t+(t>68?1900:2e3)}function Ns(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Ps(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ds(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function Rs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Os(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function zs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Hs(t,e,n){rc.lastIndex=0;var i=rc.exec(e.substring(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function js(t,e,n){var i=oc.get(e.substring(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)}function Is(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=~~(la(e)/60),r=la(e)%60;return n+ms(i,"0",2)+ms(r,"0",2)}function $s(t,e,n){tc.lastIndex=0;var i=tc.exec(e.substring(n,n+1));return i?n+i[0].length:-1}function Bs(t){function e(t){try{zu=us;var e=new zu;return e._=t,n(e)}finally{zu=Date}}var n=fs(t);return e.parse=function(t){try{zu=us;var e=n.parse(t);return e&&e._}finally{zu=Date}},e.toString=n.toString,e}function Fs(t){return t.toISOString()}function Ws(t,e,n){function i(e){return t(e)}function r(t,n){var i=t[1]-t[0],r=i/n,o=Us.bisect(ac,r);return o==ac.length?[e.year,co(t.map(function(t){return t/31536e6}),n)[2]]:o?e[r/ac[o-1]<ac[o]/r?o-1:o]:[hc,co(t,n)[2]]}return i.invert=function(e){return qs(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain().map(qs)},i.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,qs(+n+1),e).length}var o=i.domain(),s=eo(o),a=null==t?r(s,10):"number"==typeof t&&r(s,t);return a&&(t=a[0],e=a[1]),i.domain(ro(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=qs(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=qs(+e+1);return e}}:t))},i.ticks=function(t,e){var n=eo(i.domain()),o=null==t?r(n,10):"number"==typeof t?r(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],qs(+n[1]+1),1>e?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Ws(t.copy(),e,n)},lo(i,t)}function qs(t){return new Date(t)}function Xs(t){return function(e){for(var n=t.length-1,i=t[n];!i[1](e);)i=t[--n];return i[0](e)}}function Ys(t){return JSON.parse(t.responseText)}function Gs(t){var e=Qs.createRange();return e.selectNode(Qs.body),e.createContextualFragment(t.responseText)}var Us={version:"3.3.10"};Date.now||(Date.now=function(){return+new Date});var Vs=[].slice,Zs=function(t){return Vs.call(t)},Qs=document,Ks=Qs.documentElement,Js=window;try{Zs(Ks.childNodes)[0].nodeType}catch(ta){Zs=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Qs.createElement("div").style.setProperty("opacity",0,"")}catch(ea){var na=Js.Element.prototype,ia=na.setAttribute,ra=na.setAttributeNS,oa=Js.CSSStyleDeclaration.prototype,sa=oa.setProperty;na.setAttribute=function(t,e){ia.call(this,t,e+"")},na.setAttributeNS=function(t,e,n){ra.call(this,t,e,n+"")},oa.setProperty=function(t,e,n){sa.call(this,t,e+"",n)}}Us.ascending=function(t,e){return e>t?-1:t>e?1:t>=e?0:0/0},Us.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Us.min=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o&&!(null!=(n=t[r])&&n>=n);)n=void 0;for(;++r<o;)null!=(i=t[r])&&n>i&&(n=i)}else{for(;++r<o&&!(null!=(n=e.call(t,t[r],r))&&n>=n);)n=void 0;for(;++r<o;)null!=(i=e.call(t,t[r],r))&&n>i&&(n=i)}return n},Us.max=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o&&!(null!=(n=t[r])&&n>=n);)n=void 0;for(;++r<o;)null!=(i=t[r])&&i>n&&(n=i)}else{for(;++r<o&&!(null!=(n=e.call(t,t[r],r))&&n>=n);)n=void 0;for(;++r<o;)null!=(i=e.call(t,t[r],r))&&i>n&&(n=i)}return n},Us.extent=function(t,e){var n,i,r,o=-1,s=t.length;if(1===arguments.length){for(;++o<s&&!(null!=(n=r=t[o])&&n>=n);)n=r=void 0;for(;++o<s;)null!=(i=t[o])&&(n>i&&(n=i),i>r&&(r=i))}else{for(;++o<s&&!(null!=(n=r=e.call(t,t[o],o))&&n>=n);)n=void 0;for(;++o<s;)null!=(i=e.call(t,t[o],o))&&(n>i&&(n=i),i>r&&(r=i))}return[n,r]},Us.sum=function(t,e){var n,i=0,r=t.length,o=-1;if(1===arguments.length)for(;++o<r;)isNaN(n=+t[o])||(i+=n);else for(;++o<r;)isNaN(n=+e.call(t,t[o],o))||(i+=n);return i},Us.mean=function(e,n){var i,r=e.length,o=0,s=-1,a=0;if(1===arguments.length)for(;++s<r;)t(i=e[s])&&(o+=(i-o)/++a);else for(;++s<r;)t(i=n.call(e,e[s],s))&&(o+=(i-o)/++a);return a?o:void 0},Us.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},Us.median=function(e,n){return arguments.length>1&&(e=e.map(n)),e=e.filter(t),e.length?Us.quantile(e.sort(Us.ascending),.5):void 0},Us.bisector=function(t){return{left:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t.call(e,e[o],o)<n?i=o+1:r=o}return i},right:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;n<t.call(e,e[o],o)?r=o:i=o+1}return i}}};var aa=Us.bisector(function(t){return t});Us.bisectLeft=aa.left,Us.bisect=Us.bisectRight=aa.right,Us.shuffle=function(t){for(var e,n,i=t.length;i;)n=0|Math.random()*i--,e=t[i],t[i]=t[n],t[n]=e;return t},Us.permute=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},Us.pairs=function(t){for(var e,n=0,i=t.length-1,r=t[0],o=new Array(0>i?0:i);i>n;)o[n]=[e=r,r=t[++n]];return o},Us.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=Us.min(arguments,e),i=new Array(n);++t<n;)for(var r,o=-1,s=i[t]=new Array(r);++o<r;)s[o]=arguments[o][t];return i},Us.transpose=function(t){return Us.zip.apply(Us,t)},Us.keys=function(t){var e=[];for(var n in t)e.push(n);return e},Us.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},Us.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},Us.merge=function(t){for(var e,n,i,r=t.length,o=-1,s=0;++o<r;)s+=t[o].length;
|
|
for(n=new Array(s);--r>=0;)for(i=t[r],e=i.length;--e>=0;)n[--s]=i[e];return n};var la=Math.abs;Us.range=function(t,e,i){if(arguments.length<3&&(i=1,arguments.length<2&&(e=t,t=0)),1/0===(e-t)/i)throw new Error("infinite range");var r,o=[],s=n(la(i)),a=-1;if(t*=s,e*=s,i*=s,0>i)for(;(r=t+i*++a)>e;)o.push(r/s);else for(;(r=t+i*++a)<e;)o.push(r/s);return o},Us.map=function(t){var e=new r;if(t instanceof r)t.forEach(function(t,n){e.set(t,n)});else for(var n in t)e.set(n,t[n]);return e},i(r,{has:function(t){return ua+t in this},get:function(t){return this[ua+t]},set:function(t,e){return this[ua+t]=e},remove:function(t){return t=ua+t,t in this&&delete this[t]},keys:function(){var t=[];return this.forEach(function(e){t.push(e)}),t},values:function(){var t=[];return this.forEach(function(e,n){t.push(n)}),t},entries:function(){var t=[];return this.forEach(function(e,n){t.push({key:e,value:n})}),t},forEach:function(t){for(var e in this)e.charCodeAt(0)===ca&&t.call(this,e.substring(1),this[e])}});var ua="\0",ca=ua.charCodeAt(0);Us.nest=function(){function t(e,a,l){if(l>=s.length)return i?i.call(o,a):n?a.sort(n):a;for(var u,c,h,f,p=-1,d=a.length,g=s[l++],m=new r;++p<d;)(f=m.get(u=g(c=a[p])))?f.push(c):m.set(u,[c]);return e?(c=e(),h=function(n,i){c.set(n,t(e,i,l))}):(c={},h=function(n,i){c[n]=t(e,i,l)}),m.forEach(h),c}function e(t,n){if(n>=s.length)return t;var i=[],r=a[n++];return t.forEach(function(t,r){i.push({key:t,values:e(r,n)})}),r?i.sort(function(t,e){return r(t.key,e.key)}):i}var n,i,o={},s=[],a=[];return o.map=function(e,n){return t(n,e,0)},o.entries=function(n){return e(t(Us.map,n,0),0)},o.key=function(t){return s.push(t),o},o.sortKeys=function(t){return a[s.length-1]=t,o},o.sortValues=function(t){return n=t,o},o.rollup=function(t){return i=t,o},o},Us.set=function(t){var e=new o;if(t)for(var n=0,i=t.length;i>n;++n)e.add(t[n]);return e},i(o,{has:function(t){return ua+t in this},add:function(t){return this[ua+t]=!0,t},remove:function(t){return t=ua+t,t in this&&delete this[t]},values:function(){var t=[];return this.forEach(function(e){t.push(e)}),t},forEach:function(t){for(var e in this)e.charCodeAt(0)===ca&&t.call(this,e.substring(1))}}),Us.behavior={},Us.rebind=function(t,e){for(var n,i=1,r=arguments.length;++i<r;)t[n=arguments[i]]=s(t,e,e[n]);return t};var ha=["webkit","ms","moz","Moz","o","O"];Us.dispatch=function(){for(var t=new u,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=c(t);return t},u.prototype.on=function(t,e){var n=t.indexOf("."),i="";if(n>=0&&(i=t.substring(n+1),t=t.substring(0,n)),t)return arguments.length<2?this[t].on(i):this[t].on(i,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(i,null);return this}},Us.event=null,Us.requote=function(t){return t.replace(fa,"\\$&")};var fa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,pa={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},da=function(t,e){return e.querySelector(t)},ga=function(t,e){return e.querySelectorAll(t)},ma=Ks[a(Ks,"matchesSelector")],va=function(t,e){return ma.call(t,e)};"function"==typeof Sizzle&&(da=function(t,e){return Sizzle(t,e)[0]||null},ga=function(t,e){return Sizzle.uniqueSort(Sizzle(t,e))},va=Sizzle.matchesSelector),Us.selection=function(){return wa};var ya=Us.selection.prototype=[];ya.select=function(t){var e,n,i,r,o=[];t=g(t);for(var s=-1,a=this.length;++s<a;){o.push(e=[]),e.parentNode=(i=this[s]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(e.push(n=t.call(r,r.__data__,l,s)),n&&"__data__"in r&&(n.__data__=r.__data__)):e.push(null)}return d(o)},ya.selectAll=function(t){var e,n,i=[];t=m(t);for(var r=-1,o=this.length;++r<o;)for(var s=this[r],a=-1,l=s.length;++a<l;)(n=s[a])&&(i.push(e=Zs(t.call(n,n.__data__,a,r))),e.parentNode=n);return d(i)};var xa={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Us.ns={prefix:xa,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&(n=t.substring(0,e),t=t.substring(e+1)),xa.hasOwnProperty(n)?{space:xa[n],local:t}:t}},ya.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Us.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(v(e,t[e]));return this}return this.each(v(t,e))},ya.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=t.trim().split(/^|\s+/g)).length,r=-1;if(e=n.classList){for(;++r<i;)if(!e.contains(t[r]))return!1}else for(e=n.getAttribute("class");++r<i;)if(!x(t[r]).test(e))return!1;return!0}for(e in t)this.each(b(e,t[e]));return this}return this.each(b(t,e))},ya.style=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(n in t)this.each(k(n,t[n],e));return this}if(2>i)return Js.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(k(t,e,n))},ya.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(M(e,t[e]));return this}return this.each(M(t,e))},ya.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},ya.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},ya.append=function(t){return t=S(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},ya.insert=function(t,e){return t=S(t),e=g(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},ya.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},ya.data=function(t,e){function n(t,n){var i,o,s,a=t.length,h=n.length,f=Math.min(a,h),p=new Array(h),d=new Array(h),g=new Array(a);if(e){var m,v=new r,y=new r,x=[];for(i=-1;++i<a;)m=e.call(o=t[i],o.__data__,i),v.has(m)?g[i]=o:v.set(m,o),x.push(m);for(i=-1;++i<h;)m=e.call(n,s=n[i],i),(o=v.get(m))?(p[i]=o,o.__data__=s):y.has(m)||(d[i]=C(s)),y.set(m,s),v.remove(m);for(i=-1;++i<a;)v.has(x[i])&&(g[i]=t[i])}else{for(i=-1;++i<f;)o=t[i],s=n[i],o?(o.__data__=s,p[i]=o):d[i]=C(s);for(;h>i;++i)d[i]=C(n[i]);for(;a>i;++i)g[i]=t[i]}d.update=p,d.parentNode=p.parentNode=g.parentNode=t.parentNode,l.push(d),u.push(p),c.push(g)}var i,o,s=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(i=this[0]).length);++s<a;)(o=i[s])&&(t[s]=o.__data__);return t}var l=L([]),u=d([]),c=d([]);if("function"==typeof t)for(;++s<a;)n(i=this[s],t.call(i,i.parentNode.__data__,s));else for(;++s<a;)n(i=this[s],t);return u.enter=function(){return l},u.exit=function(){return c},u},ya.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},ya.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=T(t));for(var o=0,s=this.length;s>o;o++){r.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return d(r)},ya.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,i=this[t],r=i.length-1,o=i[r];--r>=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},ya.sort=function(t){t=A.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},ya.each=function(t){return _(this,function(e,n,i){t.call(e,e.__data__,n,i)})},ya.call=function(t){var e=Zs(arguments);return t.apply(e[0]=this,e),this},ya.empty=function(){return!this.node()},ya.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},ya.size=function(){var t=0;return this.each(function(){++t}),t};var ba=[];Us.selection.enter=L,Us.selection.enter.prototype=ba,ba.append=ya.append,ba.empty=ya.empty,ba.node=ya.node,ba.call=ya.call,ba.size=ya.size,ba.select=function(t){for(var e,n,i,r,o,s=[],a=-1,l=this.length;++a<l;){i=(r=this[a]).update,s.push(e=[]),e.parentNode=r.parentNode;for(var u=-1,c=r.length;++u<c;)(o=r[u])?(e.push(i[u]=n=t.call(r.parentNode,o.__data__,u,a)),n.__data__=o.__data__):e.push(null)}return d(s)},ba.insert=function(t,e){return arguments.length<2&&(e=E(this)),ya.insert.call(this,t,e)},ya.transition=function(){for(var t,e,n=Cu||++Eu,i=[],r=Tu||{time:Date.now(),ease:$i,delay:0,duration:250},o=-1,s=this.length;++o<s;){i.push(t=[]);for(var a=this[o],l=-1,u=a.length;++l<u;)(e=a[l])&&ss(e,l,n,r),t.push(e)}return is(i,n)},ya.interrupt=function(){return this.each(N)},Us.select=function(t){var e=["string"==typeof t?da(t,Qs):t];return e.parentNode=Ks,d([e])},Us.selectAll=function(t){var e=Zs("string"==typeof t?ga(t,Qs):t);return e.parentNode=Ks,d([e])};var wa=Us.select(Ks);ya.on=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e=!1);for(n in t)this.each(P(n,t[n],e));return this}if(2>i)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(P(t,e,n))};var ka=Us.map({mouseenter:"mouseover",mouseleave:"mouseout"});ka.forEach(function(t){"on"+t in Qs&&ka.remove(t)});var Ma="onselectstart"in Qs?null:a(Ks.style,"userSelect"),Sa=0;Us.mouse=function(t){return z(t,f())};var Ca=/WebKit/.test(Js.navigator.userAgent)?-1:0;Us.touches=function(t,e){return arguments.length<2&&(e=f().touches),e?Zs(e).map(function(e){var n=z(t,e);return n.identifier=e.identifier,n}):[]},Us.behavior.drag=function(){function t(){this.on("mousedown.drag",s).on("touchstart.drag",a)}function e(){return Us.event.changedTouches[0].identifier}function n(t,e){return Us.touches(t).filter(function(t){return t.identifier===e})[0]}function i(t,e,n,i){return function(){function s(){var t=e(c,p),n=t[0]-g[0],i=t[1]-g[1];m|=n|i,g=t,h({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:i})}function a(){v.on(n+"."+d,null).on(i+"."+d,null),y(m&&Us.event.target===f),h({type:"dragend"})}var l,u=this,c=u.parentNode,h=r.of(u,arguments),f=Us.event.target,p=t(),d=null==p?"drag":"drag-"+p,g=e(c,p),m=0,v=Us.select(Js).on(n+"."+d,s).on(i+"."+d,a),y=O();o?(l=o.apply(u,arguments),l=[l.x-g[0],l.y-g[1]]):l=[0,0],h({type:"dragstart"})}}var r=p(t,"drag","dragstart","dragend"),o=null,s=i(l,Us.mouse,"mousemove","mouseup"),a=i(e,n,"touchmove","touchend");return t.origin=function(e){return arguments.length?(o=e,t):o},Us.rebind(t,r,"on")};var Ta=Math.PI,Aa=2*Ta,_a=Ta/2,La=1e-6,Ea=La*La,Na=Ta/180,Pa=180/Ta,Da=Math.SQRT2,Ra=2,Oa=4;Us.interpolateZoom=function(t,e){function n(t){var e=t*y;if(v){var n=B(g),s=o/(Ra*f)*(n*F(Da*e+g)-$(g));return[i+s*u,r+s*c,o*n/B(Da*e+g)]}return[i+t*u,r+t*c,o*Math.exp(Da*e)]}var i=t[0],r=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=s-i,c=a-r,h=u*u+c*c,f=Math.sqrt(h),p=(l*l-o*o+Oa*h)/(2*o*Ra*f),d=(l*l-o*o-Oa*h)/(2*l*Ra*f),g=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(d*d+1)-d),v=m-g,y=(v||Math.log(l/o))/Da;return n.duration=1e3*y,n},Us.behavior.zoom=function(){function t(t){t.on(A,u).on(ja+".zoom",f).on(_,d).on("dblclick.zoom",g).on(E,c)}function e(t){return[(t[0]-S.x)/S.k,(t[1]-S.y)/S.k]}function n(t){return[t[0]*S.k+S.x,t[1]*S.k+S.y]}function i(t){S.k=Math.max(T[0],Math.min(T[1],t))}function r(t,e){e=n(e),S.x+=t[0]-e[0],S.y+=t[1]-e[1]}function o(){w&&w.domain(b.range().map(function(t){return(t-S.x)/S.k}).map(b.invert)),M&&M.domain(k.range().map(function(t){return(t-S.y)/S.k}).map(k.invert))}function s(t){t({type:"zoomstart"})}function a(t){o(),t({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function l(t){t({type:"zoomend"})}function u(){function t(){c=1,r(Us.mouse(i),f),a(o)}function n(){h.on(_,Js===i?d:null).on(L,null),p(c&&Us.event.target===u),l(o)}var i=this,o=P.of(i,arguments),u=Us.event.target,c=0,h=Us.select(Js).on(_,t).on(L,n),f=e(Us.mouse(i)),p=O();N.call(i),s(o)}function c(){function t(){var t=Us.touches(d);return p=S.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=e(t))}),t}function n(){for(var e=Us.event.changedTouches,n=0,o=e.length;o>n;++n)m[e[n].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-x){var u=s[0],c=m[u.identifier];i(2*S.k),r(u,c),h(),a(g)}x=l}else if(s.length>1){var u=s[0],f=s[1],p=u[0]-f[0],d=u[1]-f[1];v=p*p+d*d}}function o(){for(var t,e,n,o,s=Us.touches(d),l=0,u=s.length;u>l;++l,o=null)if(n=s[l],o=m[n.identifier]){if(e)break;t=n,e=o}if(o){var c=(c=n[0]-t[0])*c+(c=n[1]-t[1])*c,h=v&&Math.sqrt(c/v);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],i(h*p)}x=null,r(t,e),a(g)}function f(){if(Us.event.touches.length){for(var e=Us.event.changedTouches,n=0,i=e.length;i>n;++n)delete m[e[n].identifier];for(var r in m)return void t()}k.on(b,null).on(w,null),M.on(A,u).on(E,c),C(),l(g)}var p,d=this,g=P.of(d,arguments),m={},v=0,y=Us.event.changedTouches[0].identifier,b="touchmove.zoom-"+y,w="touchend.zoom-"+y,k=Us.select(Js).on(b,o).on(w,f),M=Us.select(d).on(A,null).on(E,n),C=O();N.call(d),n(),s(g)}function f(){var t=P.of(this,arguments);y?clearTimeout(y):(N.call(this),s(t)),y=setTimeout(function(){y=null,l(t)},50),h();var n=v||Us.mouse(this);m||(m=e(n)),i(Math.pow(2,.002*za())*S.k),r(n,m),a(t)}function d(){m=null}function g(){var t=P.of(this,arguments),n=Us.mouse(this),o=e(n),u=Math.log(S.k)/Math.LN2;s(t),i(Math.pow(2,Us.event.shiftKey?Math.ceil(u)-1:Math.floor(u)+1)),r(n,o),a(t),l(t)}var m,v,y,x,b,w,k,M,S={x:0,y:0,k:1},C=[960,500],T=Ha,A="mousedown.zoom",_="mousemove.zoom",L="mouseup.zoom",E="touchstart.zoom",P=p(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=P.of(this,arguments),e=S;Cu?Us.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var n=C[0],i=C[1],r=n/2,o=i/2,s=Us.interpolateZoom([(r-S.x)/S.k,(o-S.y)/S.k,n/S.k],[(r-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var i=s(e),l=n/i[2];this.__chart__=S={x:r-i[0]*l,y:o-i[1]*l,k:l},a(t)}}).each("end.zoom",function(){l(t)}):(this.__chart__=S,s(t),a(t),l(t))})},t.translate=function(e){return arguments.length?(S={x:+e[0],y:+e[1],k:S.k},o(),t):[S.x,S.y]},t.scale=function(e){return arguments.length?(S={x:S.x,y:S.y,k:+e},o(),t):S.k},t.scaleExtent=function(e){return arguments.length?(T=null==e?Ha:[+e[0],+e[1]],t):T},t.center=function(e){return arguments.length?(v=e&&[+e[0],+e[1]],t):v},t.size=function(e){return arguments.length?(C=e&&[+e[0],+e[1]],t):C},t.x=function(e){return arguments.length?(w=e,b=e.copy(),S={x:0,y:0,k:1},t):w},t.y=function(e){return arguments.length?(M=e,k=e.copy(),S={x:0,y:0,k:1},t):M},Us.rebind(t,P,"on")};var za,Ha=[0,1/0],ja="onwheel"in Qs?(za=function(){return-Us.event.deltaY*(Us.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qs?(za=function(){return Us.event.wheelDelta},"mousewheel"):(za=function(){return-Us.event.detail},"MozMousePixelScroll");q.prototype.toString=function(){return this.rgb()+""},Us.hsl=function(t,e,n){return 1===arguments.length?t instanceof Y?X(t.h,t.s,t.l):ue(""+t,ce,X):X(+t,+e,+n)};var Ia=Y.prototype=new q;Ia.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),X(this.h,this.s,this.l/t)},Ia.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),X(this.h,this.s,t*this.l)},Ia.rgb=function(){return G(this.h,this.s,this.l)},Us.hcl=function(t,e,n){return 1===arguments.length?t instanceof V?U(t.h,t.c,t.l):t instanceof K?te(t.l,t.a,t.b):te((t=he((t=Us.rgb(t)).r,t.g,t.b)).l,t.a,t.b):U(+t,+e,+n)};var $a=V.prototype=new q;$a.brighter=function(t){return U(this.h,this.c,Math.min(100,this.l+Ba*(arguments.length?t:1)))},$a.darker=function(t){return U(this.h,this.c,Math.max(0,this.l-Ba*(arguments.length?t:1)))},$a.rgb=function(){return Z(this.h,this.c,this.l).rgb()},Us.lab=function(t,e,n){return 1===arguments.length?t instanceof K?Q(t.l,t.a,t.b):t instanceof V?Z(t.l,t.c,t.h):he((t=Us.rgb(t)).r,t.g,t.b):Q(+t,+e,+n)};var Ba=18,Fa=.95047,Wa=1,qa=1.08883,Xa=K.prototype=new q;Xa.brighter=function(t){return Q(Math.min(100,this.l+Ba*(arguments.length?t:1)),this.a,this.b)},Xa.darker=function(t){return Q(Math.max(0,this.l-Ba*(arguments.length?t:1)),this.a,this.b)},Xa.rgb=function(){return J(this.l,this.a,this.b)},Us.rgb=function(t,e,n){return 1===arguments.length?t instanceof ae?se(t.r,t.g,t.b):ue(""+t,se,G):se(~~t,~~e,~~n)};var Ya=ae.prototype=new q;Ya.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,i=this.b,r=30;return e||n||i?(e&&r>e&&(e=r),n&&r>n&&(n=r),i&&r>i&&(i=r),se(Math.min(255,~~(e/t)),Math.min(255,~~(n/t)),Math.min(255,~~(i/t)))):se(r,r,r)},Ya.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),se(~~(t*this.r),~~(t*this.g),~~(t*this.b))},Ya.hsl=function(){return ce(this.r,this.g,this.b)},Ya.toString=function(){return"#"+le(this.r)+le(this.g)+le(this.b)};var Ga=Us.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ga.forEach(function(t,e){Ga.set(t,re(e))}),Us.functor=de,Us.xhr=me(ge),Us.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var s=Us.xhr(t,e,o);return s.row=function(t){return arguments.length?s.response(null==(n=t)?i:r(t)):n},s.row(n)}function i(t){return n.parse(t.responseText)}function r(t){return function(e){return n.parse(e.responseText,t)}}function s(e){return e.map(a).join(t)}function a(t){return l.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var l=new RegExp('["'+t+"\n]"),u=t.charCodeAt(0);return n.parse=function(t,e){var i;return n.parseRows(t,function(t,n){if(i)return i(t,n-1);var r=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");i=e?function(t,n){return e(r(t),n)}:r})},n.parseRows=function(t,e){function n(){if(c>=l)return s;if(r)return r=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++<l;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}c=n+2;var i=t.charCodeAt(n+1);return 13===i?(r=!0,10===t.charCodeAt(n+2)&&++c):10===i&&(r=!0),t.substring(e+1,n).replace(/""/g,'"')}for(;l>c;){var i=t.charCodeAt(c++),a=1;if(10===i)r=!0;else if(13===i)r=!0,10===t.charCodeAt(c)&&(++c,++a);else if(i!==u)continue;return t.substring(e,c-a)}return t.substring(e)}for(var i,r,o={},s={},a=[],l=t.length,c=0,h=0;(i=n())!==s;){for(var f=[];i!==o&&i!==s;)f.push(i),i=n();(!e||(f=e(f,h++)))&&a.push(f)}return a},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var i=new o,r=[];return e.forEach(function(t){for(var e in t)i.has(e)||r.push(i.add(e))}),[r.map(a).join(t)].concat(e.map(function(e){return r.map(function(t){return a(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(s).join("\n")},n},Us.csv=Us.dsv(",","text/csv"),Us.tsv=Us.dsv(" ","text/tab-separated-values");var Ua,Va,Za,Qa,Ka,Ja=Js[a(Js,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Us.timer=function(t,e,n){var i=arguments.length;2>i&&(e=0),3>i&&(n=Date.now());var r=n+e,o={c:t,t:r,f:!1,n:null};Va?Va.n=o:Ua=o,Va=o,Za||(Qa=clearTimeout(Qa),Za=1,Ja(xe))},Us.timer.flush=function(){be(),we()};var tl=".",el=",",nl=[3,3],il="$",rl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(ke);Us.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Us.round(t,Me(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((0>=n?n+1:n-1)/3)))),rl[8+n/3]},Us.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},Us.format=function(t){var e=ol.exec(t),n=e[1]||" ",i=e[2]||">",r=e[3]||"",o=e[4]||"",s=e[5],a=+e[6],l=e[7],u=e[8],c=e[9],h=1,f="",p=!1;switch(u&&(u=+u.substring(1)),(s||"0"===n&&"="===i)&&(s=n="0",i="=",l&&(a-=Math.floor((a-1)/4))),c){case"n":l=!0,c="g";break;case"%":h=100,f="%",c="f";break;case"p":h=100,f="%",c="r";break;case"b":case"o":case"x":case"X":"#"===o&&(o="0"+c.toLowerCase());case"c":case"d":p=!0,u=0;break;case"s":h=-1,c="r"}"#"===o?o="":"$"===o&&(o=il),"r"!=c||u||(c="g"),null!=u&&("g"==c?u=Math.max(1,Math.min(21,u)):("e"==c||"f"==c)&&(u=Math.max(0,Math.min(20,u)))),c=sl.get(c)||Se;var d=s&&l;return function(t){if(p&&t%1)return"";var e=0>t||0===t&&0>1/t?(t=-t,"-"):r;if(0>h){var g=Us.formatPrefix(t,u);t=g.scale(t),f=g.symbol}else t*=h;t=c(t,u);var m=t.lastIndexOf("."),v=0>m?t:t.substring(0,m),y=0>m?"":tl+t.substring(m+1);!s&&l&&(v=al(v));var x=o.length+v.length+y.length+(d?0:e.length),b=a>x?new Array(x=a-x+1).join(n):"";return d&&(v=al(b+v)),e+=o,t=v+y,("<"===i?e+t+b:">"===i?b+e+t:"^"===i?b.substring(0,x>>=1)+e+t+b.substring(x):e+(d?t:b+t))+f}};var ol=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sl=Us.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Us.round(t,Me(t,e))).toFixed(Math.max(0,Math.min(20,Me(t*(1+1e-15),e))))}}),al=ge;if(nl){var ll=nl.length;al=function(t){for(var e=t.length,n=[],i=0,r=nl[0];e>0&&r>0;)n.push(t.substring(e-=r,e+r)),r=nl[i=(i+1)%ll];return n.reverse().join(el)}}Us.geo={},Ce.prototype={s:0,t:0,add:function(t){Te(t,this.t,ul),Te(ul.s,this.s,this),this.s?this.t+=ul.t:this.s=ul.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ul=new Ce;Us.geo.stream=function(t,e){t&&cl.hasOwnProperty(t.type)?cl[t.type](t,e):Ae(t,e)};var cl={Feature:function(t,e){Ae(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)Ae(n[i].geometry,e)}},hl={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){_e(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)_e(n[i],e,0)},Polygon:function(t,e){Le(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)Le(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)Ae(n[i],e)}};Us.geo.area=function(t){return fl=0,Us.geo.stream(t,dl),fl};var fl,pl=new Ce,dl={sphere:function(){fl+=4*Ta},point:l,lineStart:l,lineEnd:l,polygonStart:function(){pl.reset(),dl.lineStart=Ee},polygonEnd:function(){var t=2*pl;fl+=0>t?4*Ta+t:t,dl.lineStart=dl.lineEnd=dl.point=l}};Us.geo.bounds=function(){function t(t,e){x.push(b=[c=t,f=t]),h>e&&(h=e),e>p&&(p=e)}function e(e,n){var i=Ne([e*Na,n*Na]);if(v){var r=De(v,i),o=[r[1],-r[0],0],s=De(o,r);ze(s),s=He(s);var l=e-d,u=l>0?1:-1,g=s[0]*Pa*u,m=la(l)>180;if(m^(g>u*d&&u*e>g)){var y=s[1]*Pa;y>p&&(p=y)}else if(g=(g+360)%360-180,m^(g>u*d&&u*e>g)){var y=-s[1]*Pa;h>y&&(h=y)}else h>n&&(h=n),n>p&&(p=n);m?d>e?a(c,e)>a(c,f)&&(f=e):a(e,f)>a(c,f)&&(c=e):f>=c?(c>e&&(c=e),e>f&&(f=e)):e>d?a(c,e)>a(c,f)&&(f=e):a(e,f)>a(c,f)&&(c=e)}else t(e,n);v=i,d=e}function n(){w.point=e}function i(){b[0]=c,b[1]=f,w.point=t,v=null}function r(t,n){if(v){var i=t-d;y+=la(i)>180?i+(i>0?360:-360):i}else g=t,m=n;dl.point(t,n),e(t,n)}function o(){dl.lineStart()}function s(){r(g,m),dl.lineEnd(),la(y)>La&&(c=-(f=180)),b[0]=c,b[1]=f,v=null}function a(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var c,h,f,p,d,g,m,v,y,x,b,w={point:t,lineStart:n,lineEnd:i,polygonStart:function(){w.point=r,w.lineStart=o,w.lineEnd=s,y=0,dl.polygonStart()},polygonEnd:function(){dl.polygonEnd(),w.point=t,w.lineStart=n,w.lineEnd=i,0>pl?(c=-(f=180),h=-(p=90)):y>La?p=90:-La>y&&(h=-90),b[0]=c,b[1]=f}};return function(t){p=f=-(c=h=1/0),x=[],Us.geo.stream(t,w);var e=x.length;if(e){x.sort(l);for(var n,i=1,r=x[0],o=[r];e>i;++i)n=x[i],u(n[0],r)||u(n[1],r)?(a(r[0],n[1])>a(r[0],r[1])&&(r[1]=n[1]),a(n[0],r[1])>a(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var s,n,d=-1/0,e=o.length-1,i=0,r=o[e];e>=i;r=n,++i)n=o[i],(s=a(r[1],n[0]))>d&&(d=s,c=n[0],f=r[1])}return x=b=null,1/0===c||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[c,h],[f,p]]}}(),Us.geo.centroid=function(t){gl=ml=vl=yl=xl=bl=wl=kl=Ml=Sl=Cl=0,Us.geo.stream(t,Tl);var e=Ml,n=Sl,i=Cl,r=e*e+n*n+i*i;return Ea>r&&(e=bl,n=wl,i=kl,La>ml&&(e=vl,n=yl,i=xl),r=e*e+n*n+i*i,Ea>r)?[0/0,0/0]:[Math.atan2(n,e)*Pa,I(i/Math.sqrt(r))*Pa]};var gl,ml,vl,yl,xl,bl,wl,kl,Ml,Sl,Cl,Tl={sphere:l,point:Ie,lineStart:Be,lineEnd:Fe,polygonStart:function(){Tl.lineStart=We},polygonEnd:function(){Tl.lineStart=Be}},Al=Ue(qe,Je,en,[-Ta,-Ta/2]),_l=1e9;Us.geo.clipExtent=function(){var t,e,n,i,r,o,s={stream:function(t){return r&&(r.valid=!1),r=o(t),r.valid=!0,r},extent:function(a){return arguments.length?(o=on(t=+a[0][0],e=+a[0][1],n=+a[1][0],i=+a[1][1]),r&&(r.valid=!1,r=null),s):[[t,e],[n,i]]}};return s.extent([[0,0],[960,500]])},(Us.geo.conicEqualArea=function(){return an(ln)}).raw=ln,Us.geo.albers=function(){return Us.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Us.geo.albersUsa=function(){function t(t){var o=t[0],s=t[1];return e=null,n(o,s),e||(i(o,s),e)||r(o,s),e}var e,n,i,r,o=Us.geo.albers(),s=Us.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Us.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?s:r>=.166&&.234>r&&i>=-.214&&-.115>i?a:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=s.stream(t),i=a.stream(t);return{point:function(t,r){e.point(t,r),n.point(t,r),i.point(t,r)},sphere:function(){e.sphere(),n.sphere(),i.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),s.precision(e),a.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),s.scale(.35*e),a.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var u=o.scale(),c=+e[0],h=+e[1];return n=o.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,i=s.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+La,h+.12*u+La],[c-.214*u-La,h+.234*u-La]]).stream(l).point,r=a.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+La,h+.166*u+La],[c-.115*u-La,h+.234*u-La]]).stream(l).point,t},t.scale(1070)};var Ll,El,Nl,Pl,Dl,Rl,Ol={point:l,lineStart:l,lineEnd:l,polygonStart:function(){El=0,Ol.lineStart=un},polygonEnd:function(){Ol.lineStart=Ol.lineEnd=Ol.point=l,Ll+=la(El/2)}},zl={point:cn,lineStart:l,lineEnd:l,polygonStart:l,polygonEnd:l},Hl={point:pn,lineStart:dn,lineEnd:gn,polygonStart:function(){Hl.lineStart=mn},polygonEnd:function(){Hl.point=pn,Hl.lineStart=dn,Hl.lineEnd=gn}};Us.geo.path=function(){function t(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),s&&s.valid||(s=r(o)),Us.geo.stream(t,s)),o.result()}function e(){return s=null,t}var n,i,r,o,s,a=4.5;return t.area=function(t){return Ll=0,Us.geo.stream(t,r(Ol)),Ll},t.centroid=function(t){return vl=yl=xl=bl=wl=kl=Ml=Sl=Cl=0,Us.geo.stream(t,r(Hl)),Cl?[Ml/Cl,Sl/Cl]:kl?[bl/kl,wl/kl]:xl?[vl/xl,yl/xl]:[0/0,0/0]},t.bounds=function(t){return Dl=Rl=-(Nl=Pl=1/0),Us.geo.stream(t,r(zl)),[[Nl,Pl],[Dl,Rl]]},t.projection=function(t){return arguments.length?(r=(n=t)?t.stream||xn(t):ge,e()):n},t.context=function(t){return arguments.length?(o=null==(i=t)?new hn:new vn(t),"function"!=typeof a&&o.pointRadius(a),e()):i},t.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(o.pointRadius(+e),+e),t):a},t.projection(Us.geo.albersUsa()).context(null)},Us.geo.transform=function(t){return{stream:function(e){var n=new bn(e);for(var i in t)n[i]=t[i];return n}}},bn.prototype={point:function(t,e){this.stream.point(t,e)},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()}},Us.geo.projection=kn,Us.geo.projectionMutator=Mn,(Us.geo.equirectangular=function(){return kn(Cn)}).raw=Cn.invert=Cn,Us.geo.rotation=function(t){function e(e){return e=t(e[0]*Na,e[1]*Na),e[0]*=Pa,e[1]*=Pa,e}return t=An(t[0]%360*Na,t[1]*Na,t.length>2?t[2]*Na:0),e.invert=function(e){return e=t.invert(e[0]*Na,e[1]*Na),e[0]*=Pa,e[1]*=Pa,e},e},Tn.invert=Cn,Us.geo.circle=function(){function t(){var t="function"==typeof i?i.apply(this,arguments):i,e=An(-t[0]*Na,-t[1]*Na,0).invert,r=[];return n(null,null,1,{point:function(t,n){r.push(t=e(t,n)),t[0]*=Pa,t[1]*=Pa}}),{type:"Polygon",coordinates:[r]}}var e,n,i=[0,0],r=6;return t.origin=function(e){return arguments.length?(i=e,t):i},t.angle=function(i){return arguments.length?(n=Nn((e=+i)*Na,r*Na),t):e},t.precision=function(i){return arguments.length?(n=Nn(e*Na,(r=+i)*Na),t):r},t.angle(90)},Us.geo.distance=function(t,e){var n,i=(e[0]-t[0])*Na,r=t[1]*Na,o=e[1]*Na,s=Math.sin(i),a=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*s)*n+(n=u*c-l*h*a)*n),l*c+u*h*a)},Us.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Us.range(Math.ceil(o/m)*m,r,m).map(f).concat(Us.range(Math.ceil(u/v)*v,l,v).map(p)).concat(Us.range(Math.ceil(i/d)*d,n,d).filter(function(t){return la(t%m)>La}).map(c)).concat(Us.range(Math.ceil(a/g)*g,s,g).filter(function(t){return la(t%v)>La}).map(h))}var n,i,r,o,s,a,l,u,c,h,f,p,d=10,g=d,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(o).concat(p(l).slice(1),f(r).reverse().slice(1),p(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],r=+e[1][0],u=+e[0][1],l=+e[1][1],o>r&&(e=o,o=r,r=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[o,u],[r,l]]},t.minorExtent=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],a=+e[0][1],s=+e[1][1],i>n&&(e=i,i=n,n=e),a>s&&(e=a,a=s,s=e),t.precision(y)):[[i,a],[n,s]]
|
|
},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(d=+e[0],g=+e[1],t):[d,g]},t.precision=function(e){return arguments.length?(y=+e,c=Dn(a,s,90),h=Rn(i,n,y),f=Dn(u,l,90),p=Rn(o,r,y),t):y},t.majorExtent([[-180,-90+La],[180,90-La]]).minorExtent([[-180,-80-La],[180,80+La]])},Us.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),n||r.apply(this,arguments)]}}var e,n,i=On,r=zn;return t.distance=function(){return Us.geo.distance(e||i.apply(this,arguments),n||r.apply(this,arguments))},t.source=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.target=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.precision=function(){return arguments.length?t:0},t},Us.geo.interpolate=function(t,e){return Hn(t[0]*Na,t[1]*Na,e[0]*Na,e[1]*Na)},Us.geo.length=function(t){return jl=0,Us.geo.stream(t,Il),jl};var jl,Il={sphere:l,point:l,lineStart:jn,lineEnd:l,polygonStart:l,polygonEnd:l},$l=In(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Us.geo.azimuthalEqualArea=function(){return kn($l)}).raw=$l;var Bl=In(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},ge);(Us.geo.azimuthalEquidistant=function(){return kn(Bl)}).raw=Bl,(Us.geo.conicConformal=function(){return an($n)}).raw=$n,(Us.geo.conicEquidistant=function(){return an(Bn)}).raw=Bn;var Fl=In(function(t){return 1/t},Math.atan);(Us.geo.gnomonic=function(){return kn(Fl)}).raw=Fl,Fn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-_a]},(Us.geo.mercator=function(){return Wn(Fn)}).raw=Fn;var Wl=In(function(){return 1},Math.asin);(Us.geo.orthographic=function(){return kn(Wl)}).raw=Wl;var ql=In(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Us.geo.stereographic=function(){return kn(ql)}).raw=ql,qn.invert=function(t,e){return[Math.atan2($(t),Math.cos(e)),I(Math.sin(e)/B(t))]},(Us.geo.transverseMercator=function(){return Wn(qn)}).raw=qn,Us.geom={},Us.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,r,o,s,a,l,u,c,h,f,p,d,g=de(n),m=de(i),v=t.length,y=v-1,x=[],b=[],w=0;if(g===Xn&&i===Yn)e=t;else for(o=0,e=[];v>o;++o)e.push([+g.call(this,r=t[o],o),+m.call(this,r,o)]);for(o=1;v>o;++o)(e[o][1]<e[w][1]||e[o][1]==e[w][1]&&e[o][0]<e[w][0])&&(w=o);for(o=0;v>o;++o)o!==w&&(l=e[o][1]-e[w][1],a=e[o][0]-e[w][0],x.push({angle:Math.atan2(l,a),index:o}));for(x.sort(function(t,e){return t.angle-e.angle}),p=x[0].angle,f=x[0].index,h=0,o=1;y>o;++o){if(s=x[o].index,p==x[o].angle){if(a=e[f][0]-e[w][0],l=e[f][1]-e[w][1],u=e[s][0]-e[w][0],c=e[s][1]-e[w][1],a*a+l*l>=u*u+c*c){x[o].index=-1;continue}x[h].index=-1}p=x[o].angle,h=o,f=s}for(b.push(w),o=0,s=0;2>o;++s)x[s].index>-1&&(b.push(x[s].index),o++);for(d=b.length;y>s;++s)if(!(x[s].index<0)){for(;!Gn(b[d-2],b[d-1],x[s].index,e);)--d;b[d++]=x[s].index}var k=[];for(o=d-1;o>=0;--o)k.push(t[b[o]]);return k}var n=Xn,i=Yn;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e)},Us.geom.polygon=function(t){return pa(t,Xl),t};var Xl=Us.geom.polygon.prototype=[];Xl.area=function(){for(var t,e=-1,n=this.length,i=this[n-1],r=0;++e<n;)t=i,i=this[e],r+=t[1]*i[0]-t[0]*i[1];return.5*r},Xl.centroid=function(t){var e,n,i=-1,r=this.length,o=0,s=0,a=this[r-1];for(arguments.length||(t=-1/(6*this.area()));++i<r;)e=a,a=this[i],n=e[0]*a[1]-a[0]*e[1],o+=(e[0]+a[0])*n,s+=(e[1]+a[1])*n;return[o*t,s*t]},Xl.clip=function(t){for(var e,n,i,r,o,s,a=Zn(t),l=-1,u=this.length-Zn(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,r=this[l],o=e[(i=e.length-a)-1],n=-1;++n<i;)s=e[n],Un(s,c,r)?(Un(o,c,r)||t.push(Vn(o,s,c,r)),t.push(s)):Un(o,c,r)&&t.push(Vn(o,s,c,r)),o=s;a&&t.push(t[0]),c=r}return t};var Yl,Gl,Ul,Vl,Zl,Ql=[],Kl=[];ri.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)t=e[n].edge,t.b&&t.a||e.splice(n,1);return e.sort(si),e.length},mi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},vi.prototype={insert:function(t,e){var n,i,r;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=wi(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.R&&(xi(this,n),t=n,n=t.U),n.C=!1,i.C=!0,bi(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.L&&(bi(this,n),t=n,n=t.U),n.C=!1,i.C=!0,xi(this,i))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,i,r=t.U,o=t.L,s=t.R;if(n=o?s?wi(s):o:s,r?r.L===t?r.L=n:r.R=n:this._=n,o&&s?(i=n.C,n.C=t.C,n.L=o,o.U=n,n!==s?(r=n.U,n.U=t.U,t=n.R,r.L=t,n.R=s,s.U=n):(n.U=r,r=n,t=n.R)):(i=t.C,t=n),t&&(t.U=r),!i){if(t&&t.C)return t.C=!1,void 0;do{if(t===this._)break;if(t===r.L){if(e=r.R,e.C&&(e.C=!1,r.C=!0,xi(this,r),e=r.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,bi(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,xi(this,r),t=this._;break}}else if(e=r.L,e.C&&(e.C=!1,r.C=!0,bi(this,r),e=r.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,xi(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,bi(this,r),t=this._;break}e.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}},Us.geom.voronoi=function(t){function e(t){var e=new Array(t.length),i=a[0][0],r=a[0][1],o=a[1][0],s=a[1][1];return ki(n(t),a).cells.forEach(function(n,a){var l=n.edges,u=n.site,c=e[a]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):u.x>=i&&u.x<=o&&u.y>=r&&u.y<=s?[[i,s],[o,s],[o,r],[i,r]]:[];c.point=t[a]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/La)*La,y:Math.round(s(t,e)/La)*La,i:e}})}var i=Xn,r=Yn,o=i,s=r,a=Jl;return t?e(t):(e.links=function(t){return ki(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ki(n(t)).cells.forEach(function(n,i){for(var r,o,s=n.site,a=n.edges.sort(si),l=-1,u=a.length,c=a[u-1].edge,h=c.l===s?c.r:c.l;++l<u;)r=c,o=h,c=a[l].edge,h=c.l===s?c.r:c.l,i<o.i&&i<h.i&&Si(s,o,h)<0&&e.push([t[i],t[o.i],t[h.i]])}),e},e.x=function(t){return arguments.length?(o=de(i=t),e):i},e.y=function(t){return arguments.length?(s=de(r=t),e):r},e.clipExtent=function(t){return arguments.length?(a=null==t?Jl:t,e):a===Jl?null:a},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):a===Jl?null:a&&a[1]},e)};var Jl=[[-1e6,-1e6],[1e6,1e6]];Us.geom.delaunay=function(t){return Us.geom.voronoi().triangles(t)},Us.geom.quadtree=function(t,e,n,i,r){function o(t){function o(t,e,n,i,r,o,s,a){if(!isNaN(n)&&!isNaN(i))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(la(l-n)+la(c-i)<.01)u(t,e,n,i,r,o,s,a);else{var h=t.point;t.x=t.y=t.point=null,u(t,h,l,c,r,o,s,a),u(t,e,n,i,r,o,s,a)}else t.x=n,t.y=i,t.point=e}else u(t,e,n,i,r,o,s,a)}function u(t,e,n,i,r,s,a,l){var u=.5*(r+a),c=.5*(s+l),h=n>=u,f=i>=c,p=(f<<1)+h;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=Ai()),h?r=u:a=u,f?s=c:l=c,o(t,e,n,i,r,s,a,l)}var c,h,f,p,d,g,m,v,y,x=de(a),b=de(l);if(null!=e)g=e,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),h=[],f=[],d=t.length,s)for(p=0;d>p;++p)c=t[p],c.x<g&&(g=c.x),c.y<m&&(m=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),f.push(c.y);else for(p=0;d>p;++p){var w=+x(c=t[p],p),k=+b(c,p);g>w&&(g=w),m>k&&(m=k),w>v&&(v=w),k>y&&(y=k),h.push(w),f.push(k)}var M=v-g,S=y-m;M>S?y=m+M:v=g+S;var C=Ai();if(C.add=function(t){o(C,t,+x(t,++p),+b(t,p),g,m,v,y)},C.visit=function(t){_i(t,C,g,m,v,y)},p=-1,null==e){for(;++p<d;)o(C,t[p],h[p],f[p],g,m,v,y);--p}else t.forEach(C.add);return h=f=t=c=null,C}var s,a=Xn,l=Yn;return(s=arguments.length)?(a=Ci,l=Ti,3===s&&(r=n,i=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(a=t,o):a},o.y=function(t){return arguments.length?(l=t,o):l},o.extent=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),o):null==e?null:[[e,n],[i,r]]},o.size=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=n=0,i=+t[0],r=+t[1]),o):null==e?null:[i-e,r-n]},o)},Us.interpolateRgb=Li,Us.interpolateObject=Ei,Us.interpolateNumber=Ni,Us.interpolateString=Pi;var tu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;Us.interpolate=Di,Us.interpolators=[function(t,e){var n=typeof e;return("string"===n?Ga.has(e)||/^(#|rgb\(|hsl\()/.test(e)?Li:Pi:e instanceof q?Li:"object"===n?Array.isArray(e)?Ri:Ei:Ni)(t,e)}],Us.interpolateArray=Ri;var eu=function(){return ge},nu=Us.map({linear:eu,poly:Bi,quad:function(){return ji},cubic:function(){return Ii},sin:function(){return Fi},exp:function(){return Wi},circle:function(){return qi},elastic:Xi,back:Yi,bounce:function(){return Gi}}),iu=Us.map({"in":ge,out:zi,"in-out":Hi,"out-in":function(t){return Hi(zi(t))}});Us.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.substring(0,e):t,i=e>=0?t.substring(e+1):"in";return n=nu.get(n)||eu,i=iu.get(i)||ge,Oi(i(n.apply(null,Vs.call(arguments,1))))},Us.interpolateHcl=Ui,Us.interpolateHsl=Vi,Us.interpolateLab=Zi,Us.interpolateRound=Qi,Us.transform=function(t){var e=Qs.createElementNS(Us.ns.prefix.svg,"g");return(Us.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Ki(n?n.matrix:ru)})(t)},Ki.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ru={a:1,b:0,c:0,d:1,e:0,f:0};Us.interpolateTransform=nr,Us.layout={},Us.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n<i;)e.push(or(t[n]));return e}},Us.layout.chord=function(){function t(){var t,u,h,f,p,d={},g=[],m=Us.range(o),v=[];for(n=[],i=[],t=0,f=-1;++f<o;){for(u=0,p=-1;++p<o;)u+=r[f][p];g.push(u),v.push(Us.range(o)),t+=u}for(s&&m.sort(function(t,e){return s(g[t],g[e])}),a&&v.forEach(function(t,e){t.sort(function(t,n){return a(r[e][t],r[e][n])})}),t=(Aa-c*o)/t,u=0,f=-1;++f<o;){for(h=u,p=-1;++p<o;){var y=m[f],x=v[y][p],b=r[y][x],w=u,k=u+=b*t;d[y+"-"+x]={index:y,subindex:x,startAngle:w,endAngle:k,value:b}}i[y]={index:y,startAngle:h,endAngle:u,value:(u-h)/t},u+=c}for(f=-1;++f<o;)for(p=f-1;++p<o;){var M=d[f+"-"+p],S=d[p+"-"+f];(M.value||S.value)&&n.push(M.value<S.value?{source:S,target:M}:{source:M,target:S})}l&&e()}function e(){n.sort(function(t,e){return l((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var n,i,r,o,s,a,l,u={},c=0;return u.matrix=function(t){return arguments.length?(o=(r=t)&&r.length,n=i=null,u):r},u.padding=function(t){return arguments.length?(c=t,n=i=null,u):c},u.sortGroups=function(t){return arguments.length?(s=t,n=i=null,u):s},u.sortSubgroups=function(t){return arguments.length?(a=t,n=null,u):a},u.sortChords=function(t){return arguments.length?(l=t,n&&e(),u):l},u.chords=function(){return n||t(),n},u.groups=function(){return i||t(),i},u},Us.layout.force=function(){function t(t){return function(e,n,i,r){if(e.point!==t){var o=e.cx-t.x,s=e.cy-t.y,a=1/Math.sqrt(o*o+s*s);if(g>(r-n)*a){var l=e.charge*a*a;return t.px-=o*l,t.py-=s*l,!0}if(e.point&&isFinite(a)){var l=e.pointCharge*a*a;t.px-=o*l,t.py-=s*l}}return!e.charge}}function e(t){t.px=Us.event.x,t.py=Us.event.y,a.resume()}var n,i,r,o,s,a={},l=Us.dispatch("start","tick","end"),u=[1,1],c=.9,h=ou,f=su,p=-30,d=.1,g=.8,m=[],v=[];return a.tick=function(){if((i*=.99)<.005)return l.end({type:"end",alpha:i=0}),!0;var e,n,a,h,f,g,y,x,b,w=m.length,k=v.length;for(n=0;k>n;++n)a=v[n],h=a.source,f=a.target,x=f.x-h.x,b=f.y-h.y,(g=x*x+b*b)&&(g=i*o[n]*((g=Math.sqrt(g))-r[n])/g,x*=g,b*=g,f.x-=x*(y=h.weight/(f.weight+h.weight)),f.y-=b*y,h.x+=x*(y=1-y),h.y+=b*y);if((y=i*d)&&(x=u[0]/2,b=u[1]/2,n=-1,y))for(;++n<w;)a=m[n],a.x+=(x-a.x)*y,a.y+=(b-a.y)*y;if(p)for(fr(e=Us.geom.quadtree(m),i,s),n=-1;++n<w;)(a=m[n]).fixed||e.visit(t(a));for(n=-1;++n<w;)a=m[n],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*c,a.y-=(a.py-(a.py=a.y))*c);l.tick({type:"tick",alpha:i})},a.nodes=function(t){return arguments.length?(m=t,a):m},a.links=function(t){return arguments.length?(v=t,a):v},a.size=function(t){return arguments.length?(u=t,a):u},a.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,a):h},a.distance=a.linkDistance,a.linkStrength=function(t){return arguments.length?(f="function"==typeof t?t:+t,a):f},a.friction=function(t){return arguments.length?(c=+t,a):c},a.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,a):p},a.gravity=function(t){return arguments.length?(d=+t,a):d},a.theta=function(t){return arguments.length?(g=+t,a):g},a.alpha=function(t){return arguments.length?(t=+t,i?i=t>0?t:0:t>0&&(l.start({type:"start",alpha:i=t}),Us.timer(a.tick)),a):i},a.start=function(){function t(t,i){if(!n){for(n=new Array(l),a=0;l>a;++a)n[a]=[];for(a=0;u>a;++a){var r=v[a];n[r.source.index].push(r.target),n[r.target.index].push(r.source)}}for(var o,s=n[e],a=-1,u=s.length;++a<u;)if(!isNaN(o=s[a][t]))return o;return Math.random()*i}var e,n,i,l=m.length,c=v.length,d=u[0],g=u[1];for(e=0;l>e;++e)(i=m[e]).index=e,i.weight=0;for(e=0;c>e;++e)i=v[e],"number"==typeof i.source&&(i.source=m[i.source]),"number"==typeof i.target&&(i.target=m[i.target]),++i.source.weight,++i.target.weight;for(e=0;l>e;++e)i=m[e],isNaN(i.x)&&(i.x=t("x",d)),isNaN(i.y)&&(i.y=t("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(r=[],"function"==typeof h)for(e=0;c>e;++e)r[e]=+h.call(this,v[e],e);else for(e=0;c>e;++e)r[e]=h;if(o=[],"function"==typeof f)for(e=0;c>e;++e)o[e]=+f.call(this,v[e],e);else for(e=0;c>e;++e)o[e]=f;if(s=[],"function"==typeof p)for(e=0;l>e;++e)s[e]=+p.call(this,m[e],e);else for(e=0;l>e;++e)s[e]=p;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return n||(n=Us.behavior.drag().origin(ge).on("dragstart.force",lr).on("drag.force",e).on("dragend.force",ur)),arguments.length?(this.on("mouseover.force",cr).on("mouseout.force",hr).call(n),void 0):n},Us.rebind(a,l,"on")};var ou=20,su=1;Us.layout.hierarchy=function(){function t(e,s,a){var l=r.call(n,e,s);if(e.depth=s,a.push(e),l&&(u=l.length)){for(var u,c,h=-1,f=e.children=new Array(u),p=0,d=s+1;++h<u;)c=f[h]=t(l[h],d,a),c.parent=e,p+=c.value;i&&f.sort(i),o&&(e.value=p)}else delete e.children,o&&(e.value=+o.call(n,e,s)||0);return e}function e(t,i){var r=t.children,s=0;if(r&&(a=r.length))for(var a,l=-1,u=i+1;++l<a;)s+=e(r[l],u);else o&&(s=+o.call(n,t,i)||0);return o&&(t.value=s),s}function n(e){var n=[];return t(e,0,n),n}var i=mr,r=dr,o=gr;return n.sort=function(t){return arguments.length?(i=t,n):i},n.children=function(t){return arguments.length?(r=t,n):r},n.value=function(t){return arguments.length?(o=t,n):o},n.revalue=function(t){return e(t,0),t},n},Us.layout.partition=function(){function t(e,n,i,r){var o=e.children;if(e.x=n,e.y=e.depth*r,e.dx=i,e.dy=r,o&&(s=o.length)){var s,a,l,u=-1;for(i=e.value?i/e.value:0;++u<s;)t(a=o[u],n,l=a.value*i,r),n+=l}}function e(t){var n=t.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,e(n[o]));return 1+i}function n(n,o){var s=i.call(this,n,o);return t(s[0],0,r[0],r[1]/e(s[0])),s}var i=Us.layout.hierarchy(),r=[1,1];return n.size=function(t){return arguments.length?(r=t,n):r},pr(n,i)},Us.layout.pie=function(){function t(o){var s=o.map(function(n,i){return+e.call(t,n,i)}),a=+("function"==typeof i?i.apply(this,arguments):i),l=(("function"==typeof r?r.apply(this,arguments):r)-a)/Us.sum(s),u=Us.range(o.length);null!=n&&u.sort(n===au?function(t,e){return s[e]-s[t]}:function(t,e){return n(o[t],o[e])});var c=[];return u.forEach(function(t){var e;c[t]={data:o[t],value:e=s[t],startAngle:a,endAngle:a+=e*l}}),c}var e=Number,n=au,i=0,r=Aa;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(i=e,t):i},t.endAngle=function(e){return arguments.length?(r=e,t):r},t};var au={};Us.layout.stack=function(){function t(a,l){var u=a.map(function(n,i){return e.call(t,n,i)}),c=u.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),s.call(t,e,n)]})}),h=n.call(t,c,l);u=Us.permute(u,h),c=Us.permute(c,h);var f,p,d,g=i.call(t,c,l),m=u.length,v=u[0].length;for(p=0;v>p;++p)for(r.call(t,u[0][p],d=g[p],c[0][p][1]),f=1;m>f;++f)r.call(t,u[f][p],d+=c[f-1][p][1],c[f][p][1]);return a}var e=ge,n=wr,i=kr,r=br,o=yr,s=xr;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:lu.get(e)||wr,t):n},t.offset=function(e){return arguments.length?(i="function"==typeof e?e:uu.get(e)||kr,t):i},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(s=e,t):s},t.out=function(e){return arguments.length?(r=e,t):r},t};var lu=Us.map({"inside-out":function(t){var e,n,i=t.length,r=t.map(Mr),o=t.map(Sr),s=Us.range(i).sort(function(t,e){return r[t]-r[e]}),a=0,l=0,u=[],c=[];for(e=0;i>e;++e)n=s[e],l>a?(a+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(t){return Us.range(t.length).reverse()},"default":wr}),uu=Us.map({silhouette:function(t){var e,n,i,r=t.length,o=t[0].length,s=[],a=0,l=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];i>a&&(a=i),s.push(i)}for(n=0;o>n;++n)l[n]=(a-s[n])/2;return l},wiggle:function(t){var e,n,i,r,o,s,a,l,u,c=t.length,h=t[0],f=h.length,p=[];for(p[0]=l=u=0,n=1;f>n;++n){for(e=0,r=0;c>e;++e)r+=t[e][n][1];for(e=0,o=0,a=h[n][0]-h[n-1][0];c>e;++e){for(i=0,s=(t[e][n][1]-t[e][n-1][1])/(2*a);e>i;++i)s+=(t[i][n][1]-t[i][n-1][1])/a;o+=s*t[e][n][1]}p[n]=l-=r?o/r*a:0,u>l&&(u=l)}for(n=0;f>n;++n)p[n]-=u;return p},expand:function(t){var e,n,i,r=t.length,o=t[0].length,s=1/r,a=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];if(i)for(e=0;r>e;e++)t[e][n][1]/=i;else for(e=0;r>e;e++)t[e][n][1]=s}for(n=0;o>n;++n)a[n]=0;return a},zero:kr});Us.layout.histogram=function(){function t(t,o){for(var s,a,l=[],u=t.map(n,this),c=i.call(this,u,o),h=r.call(this,c,u,o),o=-1,f=u.length,p=h.length-1,d=e?1:1/f;++o<p;)s=l[o]=[],s.dx=h[o+1]-(s.x=h[o]),s.y=0;if(p>0)for(o=-1;++o<f;)a=u[o],a>=c[0]&&a<=c[1]&&(s=l[Us.bisect(h,a,1,p)-1],s.y+=d,s.push(t[o]));return l}var e=!0,n=Number,i=_r,r=Tr;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(i=de(e),t):i},t.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return Ar(t,e)}:de(e),t):r},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Us.layout.tree=function(){function t(t,o){function s(t,e){var i=t.children,r=t._tree;if(i&&(o=i.length)){for(var o,a,u,c=i[0],h=c,f=-1;++f<o;)u=i[f],s(u,a),h=l(u,a,h),a=u;Hr(t);var p=.5*(c._tree.prelim+u._tree.prelim);e?(r.prelim=e._tree.prelim+n(t,e),r.mod=r.prelim-p):r.prelim=p}else e&&(r.prelim=e._tree.prelim+n(t,e))}function a(t,e){t.x=t._tree.prelim+e;var n=t.children;if(n&&(i=n.length)){var i,r=-1;for(e+=t._tree.mod;++r<i;)a(n[r],e)}}function l(t,e,i){if(e){for(var r,o=t,s=t,a=e,l=t.parent.children[0],u=o._tree.mod,c=s._tree.mod,h=a._tree.mod,f=l._tree.mod;a=Nr(a),o=Er(o),a&&o;)l=Er(l),s=Nr(s),s._tree.ancestor=t,r=a._tree.prelim+h-o._tree.prelim-u+n(a,o),r>0&&(jr(Ir(a,t,i),t,r),u+=r,c+=r),h+=a._tree.mod,u+=o._tree.mod,f+=l._tree.mod,c+=s._tree.mod;a&&!Nr(s)&&(s._tree.thread=a,s._tree.mod+=h-c),o&&!Er(l)&&(l._tree.thread=o,l._tree.mod+=u-f,i=t)}return i}var u=e.call(this,t,o),c=u[0];zr(c,function(t,e){t._tree={ancestor:t,prelim:0,mod:0,change:0,shift:0,number:e?e._tree.number+1:0}}),s(c),a(c,-c._tree.prelim);var h=Pr(c,Rr),f=Pr(c,Dr),p=Pr(c,Or),d=h.x-n(h,f)/2,g=f.x+n(f,h)/2,m=p.depth||1;return zr(c,r?function(t){t.x*=i[0],t.y=t.depth*i[1],delete t._tree}:function(t){t.x=(t.x-d)/(g-d)*i[0],t.y=t.depth/m*i[1],delete t._tree}),u}var e=Us.layout.hierarchy().sort(null).value(null),n=Lr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},pr(t,e)},Us.layout.pack=function(){function t(t,o){var s=n.call(this,t,o),a=s[0],l=r[0],u=r[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(a.x=a.y=0,zr(a,function(t){t.r=+c(t.value)}),zr(a,qr),i){var h=i*(e?1:Math.max(2*a.r/l,2*a.r/u))/2;zr(a,function(t){t.r+=h}),zr(a,qr),zr(a,function(t){t.r-=h})}return Gr(a,l/2,u/2,e?1:1/Math.max(2*a.r/l,2*a.r/u)),s}var e,n=Us.layout.hierarchy().sort($r),i=0,r=[1,1];return t.size=function(e){return arguments.length?(r=e,t):r},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(i=+e,t):i},pr(t,n)},Us.layout.cluster=function(){function t(t,o){var s,a=e.call(this,t,o),l=a[0],u=0;zr(l,function(t){var e=t.children;e&&e.length?(t.x=Zr(e),t.y=Vr(e)):(t.x=s?u+=n(t,s):0,t.y=0,s=t)});var c=Qr(l),h=Kr(l),f=c.x-n(c,h)/2,p=h.x+n(h,c)/2;return zr(l,r?function(t){t.x=(t.x-l.x)*i[0],t.y=(l.y-t.y)*i[1]}:function(t){t.x=(t.x-f)/(p-f)*i[0],t.y=(1-(l.y?t.y/l.y:1))*i[1]}),a}var e=Us.layout.hierarchy().sort(null).value(null),n=Lr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},pr(t,e)},Us.layout.treemap=function(){function t(t,e){for(var n,i,r=-1,o=t.length;++r<o;)i=(n=t[r]).value*(0>e?0:e),n.area=isNaN(i)||0>=i?0:i}function e(n){var o=n.children;if(o&&o.length){var s,a,l,u=h(n),c=[],f=o.slice(),d=1/0,g="slice"===p?u.dx:"dice"===p?u.dy:"slice-dice"===p?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(t(f,u.dx*u.dy/n.value),c.area=0;(l=f.length)>0;)c.push(s=f[l-1]),c.area+=s.area,"squarify"!==p||(a=i(c,g))<=d?(f.pop(),d=a):(c.area-=c.pop().area,r(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,d=1/0);c.length&&(r(c,g,u,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var i=e.children;if(i&&i.length){var o,s=h(e),a=i.slice(),l=[];for(t(a,s.dx*s.dy/e.value),l.area=0;o=a.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?s.dx:s.dy,s,!a.length),l.length=l.area=0);i.forEach(n)}}function i(t,e){for(var n,i=t.area,r=0,o=1/0,s=-1,a=t.length;++s<a;)(n=t[s].area)&&(o>n&&(o=n),n>r&&(r=n));return i*=i,e*=e,i?Math.max(e*r*d/i,i/(e*o*d)):1/0}function r(t,e,n,i){var r,o=-1,s=t.length,a=n.x,u=n.y,c=e?l(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<s;)r=t[o],r.x=a,r.y=u,r.dy=c,a+=r.dx=Math.min(n.x+n.dx-a,c?l(r.area/c):0);r.z=!0,r.dx+=n.x+n.dx-a,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<s;)r=t[o],r.x=a,r.y=u,r.dx=c,u+=r.dy=Math.min(n.y+n.dy-u,c?l(r.area/c):0);r.z=!1,r.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(i){var r=s||a(i),o=r[0];return o.x=0,o.y=0,o.dx=u[0],o.dy=u[1],s&&a.revalue(o),t([o],o.dx*o.dy/o.value),(s?n:e)(o),f&&(s=r),r}var s,a=Us.layout.hierarchy(),l=Math.round,u=[1,1],c=null,h=Jr,f=!1,p="squarify",d=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(u=t,o):u},o.padding=function(t){function e(e){var n=t.call(o,e,e.depth);return null==n?Jr(e):to(e,"number"==typeof n?[n,n,n,n]:n)}function n(e){return to(e,t)}if(!arguments.length)return c;var i;return h=null==(c=t)?Jr:"function"==(i=typeof t)?e:"number"===i?(t=[t,t,t,t],n):n,o},o.round=function(t){return arguments.length?(l=t?Math.round:Number,o):l!=Number},o.sticky=function(t){return arguments.length?(f=t,s=null,o):f},o.ratio=function(t){return arguments.length?(d=t,o):d},o.mode=function(t){return arguments.length?(p=t+"",o):p},pr(o,a)},Us.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return t+e*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var t=Us.random.normal.apply(Us,arguments);return function(){return Math.exp(t())}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e/t}}},Us.scale={};var cu={floor:ge,ceil:ge};Us.scale.linear=function(){return ao([0,1],[0,1],Di,!1)};var hu={s:1,g:1,p:1,r:1,e:1};Us.scale.log=function(){return mo(Us.scale.linear().domain([0,1]),10,!0,[1,10])};var fu=Us.format(".0e"),pu={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Us.scale.pow=function(){return vo(Us.scale.linear(),1,[0,1])},Us.scale.sqrt=function(){return Us.scale.pow().exponent(.5)},Us.scale.ordinal=function(){return xo([],{t:"range",a:[[]]})},Us.scale.category10=function(){return Us.scale.ordinal().range(du)},Us.scale.category20=function(){return Us.scale.ordinal().range(gu)},Us.scale.category20b=function(){return Us.scale.ordinal().range(mu)},Us.scale.category20c=function(){return Us.scale.ordinal().range(vu)};var du=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(oe),gu=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(oe),mu=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(oe),vu=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(oe);Us.scale.quantile=function(){return bo([],[])},Us.scale.quantize=function(){return wo(0,1,[0,1])},Us.scale.threshold=function(){return ko([.5],[0,1])},Us.scale.identity=function(){return Mo([0,1])},Us.svg={},Us.svg.arc=function(){function t(){var t=e.apply(this,arguments),o=n.apply(this,arguments),s=i.apply(this,arguments)+yu,a=r.apply(this,arguments)+yu,l=(s>a&&(l=s,s=a,a=l),a-s),u=Ta>l?"0":"1",c=Math.cos(s),h=Math.sin(s),f=Math.cos(a),p=Math.sin(a);return l>=xu?t?"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"Z":t?"M"+o*c+","+o*h+"A"+o+","+o+" 0 "+u+",1 "+o*f+","+o*p+"L"+t*f+","+t*p+"A"+t+","+t+" 0 "+u+",0 "+t*c+","+t*h+"Z":"M"+o*c+","+o*h+"A"+o+","+o+" 0 "+u+",1 "+o*f+","+o*p+"L0,0"+"Z"}var e=So,n=Co,i=To,r=Ao;return t.innerRadius=function(n){return arguments.length?(e=de(n),t):e},t.outerRadius=function(e){return arguments.length?(n=de(e),t):n},t.startAngle=function(e){return arguments.length?(i=de(e),t):i},t.endAngle=function(e){return arguments.length?(r=de(e),t):r},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,o=(i.apply(this,arguments)+r.apply(this,arguments))/2+yu;return[Math.cos(o)*t,Math.sin(o)*t]},t};var yu=-_a,xu=Aa-La;Us.svg.line=function(){return _o(ge)};var bu=Us.map({linear:Lo,"linear-closed":Eo,step:No,"step-before":Po,"step-after":Do,basis:Io,"basis-open":$o,"basis-closed":Bo,bundle:Fo,cardinal:zo,"cardinal-open":Ro,"cardinal-closed":Oo,monotone:Uo});bu.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var wu=[0,2/3,1/3,0],ku=[0,1/3,2/3,0],Mu=[0,1/6,2/3,1/6];Us.svg.line.radial=function(){var t=_o(Vo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Po.reverse=Do,Do.reverse=Po,Us.svg.area=function(){return Zo(ge)},Us.svg.area.radial=function(){var t=Zo(Vo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Us.svg.chord=function(){function t(t,a){var l=e(this,o,t,a),u=e(this,s,t,a);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,u)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,u.r,u.p0)+i(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,l.r,l.p0))+"Z"}function e(t,e,n,i){var r=e.call(t,n,i),o=a.call(t,r,i),s=l.call(t,r,i)+yu,c=u.call(t,r,i)+yu;return{r:o,a0:s,a1:c,p0:[o*Math.cos(s),o*Math.sin(s)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function i(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Ta)+",1 "+e}function r(t,e,n,i){return"Q 0,0 "+i}var o=On,s=zn,a=Qo,l=To,u=Ao;return t.radius=function(e){return arguments.length?(a=de(e),t):a},t.source=function(e){return arguments.length?(o=de(e),t):o},t.target=function(e){return arguments.length?(s=de(e),t):s},t.startAngle=function(e){return arguments.length?(l=de(e),t):l},t.endAngle=function(e){return arguments.length?(u=de(e),t):u},t},Us.svg.diagonal=function(){function t(t,r){var o=e.call(this,t,r),s=n.call(this,t,r),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=On,n=zn,i=Ko;return t.source=function(n){return arguments.length?(e=de(n),t):e},t.target=function(e){return arguments.length?(n=de(e),t):n},t.projection=function(e){return arguments.length?(i=e,t):i},t},Us.svg.diagonal.radial=function(){var t=Us.svg.diagonal(),e=Ko,n=t.projection;return t.projection=function(t){return arguments.length?n(Jo(e=t)):e},t},Us.svg.symbol=function(){function t(t,i){return(Su.get(e.call(this,t,i))||ns)(n.call(this,t,i))}var e=es,n=ts;return t.type=function(n){return arguments.length?(e=de(n),t):e},t.size=function(e){return arguments.length?(n=de(e),t):n},t};var Su=Us.map({circle:ns,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*_u)),n=e*_u;return"M0,"+-e+"L"+n+",0"+" 0,"+e+" "+-n+",0"+"Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Au),n=e*Au/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Au),n=e*Au/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Us.svg.symbolTypes=Su.keys();var Cu,Tu,Au=Math.sqrt(3),_u=Math.tan(30*Na),Lu=[],Eu=0;Lu.call=ya.call,Lu.empty=ya.empty,Lu.node=ya.node,Lu.size=ya.size,Us.transition=function(t){return arguments.length?Cu?t.transition():t:wa.transition()},Us.transition.prototype=Lu,Lu.select=function(t){var e,n,i,r=this.id,o=[];t=g(t);for(var s=-1,a=this.length;++s<a;){o.push(e=[]);for(var l=this[s],u=-1,c=l.length;++u<c;)(i=l[u])&&(n=t.call(i,i.__data__,u,s))?("__data__"in i&&(n.__data__=i.__data__),ss(n,u,r,i.__transition__[r]),e.push(n)):e.push(null)}return is(o,r)},Lu.selectAll=function(t){var e,n,i,r,o,s=this.id,a=[];t=m(t);for(var l=-1,u=this.length;++l<u;)for(var c=this[l],h=-1,f=c.length;++h<f;)if(i=c[h]){o=i.__transition__[s],n=t.call(i,i.__data__,h,l),a.push(e=[]);for(var p=-1,d=n.length;++p<d;)(r=n[p])&&ss(r,p,s,o),e.push(r)}return is(a,s)},Lu.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=T(t));for(var o=0,s=this.length;s>o;o++){r.push(e=[]);for(var n=this[o],a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return is(r,this.id)},Lu.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):_(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(i){i.__transition__[n].tween.set(t,e)})},Lu.attr=function(t,e){function n(){this.removeAttribute(a)}function i(){this.removeAttributeNS(a.space,a.local)}function r(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(a);return n!==t&&(e=s(n,t),function(t){this.setAttribute(a,e(t))})})}function o(t){return null==t?i:(t+="",function(){var e,n=this.getAttributeNS(a.space,a.local);return n!==t&&(e=s(n,t),function(t){this.setAttributeNS(a.space,a.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var s="transform"==t?nr:Di,a=Us.ns.qualify(t);return rs(this,"attr."+t,e,a.local?o:r)},Lu.attrTween=function(t,e){function n(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}}function i(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}var r=Us.ns.qualify(t);return this.tween("attr."+t,r.local?i:n)},Lu.style=function(t,e,n){function i(){this.style.removeProperty(t)}function r(e){return null==e?i:(e+="",function(){var i,r=Js.getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=Di(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof t){2>o&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return rs(this,"style."+t,e,r)},Lu.styleTween=function(t,e,n){function i(i,r){var o=e.call(this,i,r,Js.getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,i)},Lu.text=function(t){return rs(this,"text",t,os)},Lu.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Lu.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Us.ease.apply(Us,arguments)),_(this,function(n){n.__transition__[e].ease=t
|
|
}))},Lu.delay=function(t){var e=this.id;return _(this,"function"==typeof t?function(n,i,r){n.__transition__[e].delay=+t.call(n,n.__data__,i,r)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Lu.duration=function(t){var e=this.id;return _(this,"function"==typeof t?function(n,i,r){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,i,r))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Lu.each=function(t,e){var n=this.id;if(arguments.length<2){var i=Tu,r=Cu;Cu=n,_(this,function(e,i,r){Tu=e.__transition__[n],t.call(e,e.__data__,i,r)}),Tu=i,Cu=r}else _(this,function(i){var r=i.__transition__[n];(r.event||(r.event=Us.dispatch("start","end"))).on(t,e)});return this},Lu.transition=function(){for(var t,e,n,i,r=this.id,o=++Eu,s=[],a=0,l=this.length;l>a;a++){s.push(t=[]);for(var e=this[a],u=0,c=e.length;c>u;u++)(n=e[u])&&(i=Object.create(n.__transition__[r]),i.delay+=i.duration,ss(n,u,o,i)),t.push(n)}return is(s,o)},Us.svg.axis=function(){function t(t){t.each(function(){var t,u=Us.select(this),c=this.__chart__||n,h=this.__chart__=n.copy(),f=null==l?h.ticks?h.ticks.apply(h,a):h.domain():l,p=null==e?h.tickFormat?h.tickFormat.apply(h,a):ge:e,d=u.selectAll(".tick").data(f,h),g=d.enter().insert("g",".domain").attr("class","tick").style("opacity",La),m=Us.transition(d.exit()).style("opacity",La).remove(),v=Us.transition(d).style("opacity",1),y=no(h),x=u.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),Us.transition(x));g.append("line"),g.append("text");var w=g.select("line"),k=v.select("line"),M=d.select("text").text(p),S=g.select("text"),C=v.select("text");switch(i){case"bottom":t=as,w.attr("y2",r),S.attr("y",Math.max(r,0)+s),k.attr("x2",0).attr("y2",r),C.attr("x",0).attr("y",Math.max(r,0)+s),M.attr("dy",".71em").style("text-anchor","middle"),b.attr("d","M"+y[0]+","+o+"V0H"+y[1]+"V"+o);break;case"top":t=as,w.attr("y2",-r),S.attr("y",-(Math.max(r,0)+s)),k.attr("x2",0).attr("y2",-r),C.attr("x",0).attr("y",-(Math.max(r,0)+s)),M.attr("dy","0em").style("text-anchor","middle"),b.attr("d","M"+y[0]+","+-o+"V0H"+y[1]+"V"+-o);break;case"left":t=ls,w.attr("x2",-r),S.attr("x",-(Math.max(r,0)+s)),k.attr("x2",-r).attr("y2",0),C.attr("x",-(Math.max(r,0)+s)).attr("y",0),M.attr("dy",".32em").style("text-anchor","end"),b.attr("d","M"+-o+","+y[0]+"H0V"+y[1]+"H"+-o);break;case"right":t=ls,w.attr("x2",r),S.attr("x",Math.max(r,0)+s),k.attr("x2",r).attr("y2",0),C.attr("x",Math.max(r,0)+s).attr("y",0),M.attr("dy",".32em").style("text-anchor","start"),b.attr("d","M"+o+","+y[0]+"H0V"+y[1]+"H"+o)}if(h.rangeBand){var T=h,A=T.rangeBand()/2;c=h=function(t){return T(t)+A}}else c.rangeBand?c=h:m.call(t,h);g.call(t,c),v.call(t,h)})}var e,n=Us.scale.linear(),i=Nu,r=6,o=6,s=3,a=[10],l=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(i=e in Pu?e+"":Nu,t):i},t.ticks=function(){return arguments.length?(a=arguments,t):a},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(r=+e,o=+arguments[n-1],t):r},t.innerTickSize=function(e){return arguments.length?(r=+e,t):r},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(s=+e,t):s},t.tickSubdivide=function(){return arguments.length&&t},t};var Nu="bottom",Pu={top:1,right:1,bottom:1,left:1};Us.svg.brush=function(){function t(o){o.each(function(){var o=Us.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",r).on("touchstart.brush",r),s=o.selectAll(".background").data([0]);s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=o.selectAll(".resize").data(m,ge);a.exit().remove(),a.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Du[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",t.empty()?"none":null);var c,h=Us.transition(o),f=Us.transition(s);l&&(c=no(l),f.attr("x",c[0]).attr("width",c[1]-c[0]),n(h)),u&&(c=no(u),f.attr("y",c[0]).attr("height",c[1]-c[0]),i(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+c[+/e$/.test(t)]+","+f[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",c[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function r(){function r(){32==Us.event.keyCode&&(_||(x=null,E[0]-=c[1],E[1]-=f[1],_=2),h())}function p(){32==Us.event.keyCode&&2==_&&(E[0]+=c[1],E[1]+=f[1],_=0,h())}function m(){var t=Us.mouse(w),r=!1;b&&(t[0]+=b[0],t[1]+=b[1]),_||(Us.event.altKey?(x||(x=[(c[0]+c[1])/2,(f[0]+f[1])/2]),E[0]=c[+(t[0]<x[0])],E[1]=f[+(t[1]<x[1])]):x=null),T&&v(t,l,0)&&(n(S),r=!0),A&&v(t,u,1)&&(i(S),r=!0),r&&(e(S),M({type:"brush",mode:_?"move":"resize"}))}function v(t,e,n){var i,r,a=no(e),l=a[0],u=a[1],h=E[n],p=n?f:c,m=p[1]-p[0];return _&&(l-=h,u-=m+h),i=(n?g:d)?Math.max(l,Math.min(u,t[n])):t[n],_?r=(i+=h)+m:(x&&(h=Math.max(l,Math.min(u,2*x[n]-i))),i>h?(r=i,i=h):r=h),p[0]!=i||p[1]!=r?(n?s=null:o=null,p[0]=i,p[1]=r,!0):void 0}function y(){m(),S.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Us.select("body").style("cursor",null),N.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),L(),M({type:"brushend"})}var x,b,w=this,k=Us.select(Us.event.target),M=a.of(w,arguments),S=Us.select(w),C=k.datum(),T=!/^(n|s)$/.test(C)&&l,A=!/^(e|w)$/.test(C)&&u,_=k.classed("extent"),L=O(),E=Us.mouse(w),N=Us.select(Js).on("keydown.brush",r).on("keyup.brush",p);if(Us.event.changedTouches?N.on("touchmove.brush",m).on("touchend.brush",y):N.on("mousemove.brush",m).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),_)E[0]=c[0]-E[0],E[1]=f[0]-E[1];else if(C){var P=+/w$/.test(C),D=+/^n/.test(C);b=[c[1-P]-E[0],f[1-D]-E[1]],E[0]=c[P],E[1]=f[D]}else Us.event.altKey&&(x=E.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Us.select("body").style("cursor",k.style("cursor")),M({type:"brushstart"}),m()}var o,s,a=p(t,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],f=[0,0],d=!0,g=!0,m=Ru[0];return t.event=function(t){t.each(function(){var t=a.of(this,arguments),e={x:c,y:f,i:o,j:s},n=this.__chart__||e;this.__chart__=e,Cu?Us.select(this).transition().each("start.brush",function(){o=n.i,s=n.j,c=n.x,f=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=Ri(c,e.x),i=Ri(f,e.y);return o=s=null,function(r){c=e.x=n(r),f=e.y=i(r),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=e.i,s=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(l=e,m=Ru[!l<<1|!u],t):l},t.y=function(e){return arguments.length?(u=e,m=Ru[!l<<1|!u],t):u},t.clamp=function(e){return arguments.length?(l&&u?(d=!!e[0],g=!!e[1]):l?d=!!e:u&&(g=!!e),t):l&&u?[d,g]:l?d:u?g:null},t.extent=function(e){var n,i,r,a,h;return arguments.length?(l&&(n=e[0],i=e[1],u&&(n=n[0],i=i[0]),o=[n,i],l.invert&&(n=l(n),i=l(i)),n>i&&(h=n,n=i,i=h),(n!=c[0]||i!=c[1])&&(c=[n,i])),u&&(r=e[0],a=e[1],l&&(r=r[1],a=a[1]),s=[r,a],u.invert&&(r=u(r),a=u(a)),r>a&&(h=r,r=a,a=h),(r!=f[0]||a!=f[1])&&(f=[r,a])),t):(l&&(o?(n=o[0],i=o[1]):(n=c[0],i=c[1],l.invert&&(n=l.invert(n),i=l.invert(i)),n>i&&(h=n,n=i,i=h))),u&&(s?(r=s[0],a=s[1]):(r=f[0],a=f[1],u.invert&&(r=u.invert(r),a=u.invert(a)),r>a&&(h=r,r=a,a=h))),l&&u?[[n,r],[i,a]]:l?[n,i]:u&&[r,a])},t.clear=function(){return t.empty()||(c=[0,0],f=[0,0],o=s=null),t},t.empty=function(){return!!l&&c[0]==c[1]||!!u&&f[0]==f[1]},Us.rebind(t,a,"on")};var Du={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ru=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ou=Us.time={},zu=Date,Hu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];us.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ju.setUTCDate.apply(this._,arguments)},setDay:function(){ju.setUTCDay.apply(this._,arguments)},setFullYear:function(){ju.setUTCFullYear.apply(this._,arguments)},setHours:function(){ju.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ju.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ju.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ju.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ju.setUTCSeconds.apply(this._,arguments)},setTime:function(){ju.setTime.apply(this._,arguments)}};var ju=Date.prototype,Iu="%a %b %e %X %Y",$u="%m/%d/%Y",Bu="%H:%M:%S",Fu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Wu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qu=["January","February","March","April","May","June","July","August","September","October","November","December"],Xu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Ou.year=cs(function(t){return t=Ou.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ou.years=Ou.year.range,Ou.years.utc=Ou.year.utc.range,Ou.day=cs(function(t){var e=new zu(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Ou.days=Ou.day.range,Ou.days.utc=Ou.day.utc.range,Ou.dayOfYear=function(t){var e=Ou.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},Hu.forEach(function(t,e){t=t.toLowerCase(),e=7-e;var n=Ou[t]=cs(function(t){return(t=Ou.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=Ou.year(t).getDay();return Math.floor((Ou.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});Ou[t+"s"]=n.range,Ou[t+"s"].utc=n.utc.range,Ou[t+"OfYear"]=function(t){var n=Ou.year(t).getDay();return Math.floor((Ou.dayOfYear(t)+(n+e)%7)/7)}}),Ou.week=Ou.sunday,Ou.weeks=Ou.sunday.range,Ou.weeks.utc=Ou.sunday.utc.range,Ou.weekOfYear=Ou.sundayOfYear,Ou.format=fs;var Yu=ds(Fu),Gu=gs(Fu),Uu=ds(Wu),Vu=gs(Wu),Zu=ds(qu),Qu=gs(qu),Ku=ds(Xu),Ju=gs(Xu),tc=/^%/,ec={"-":"",_:" ",0:"0"},nc={a:function(t){return Wu[t.getDay()]},A:function(t){return Fu[t.getDay()]},b:function(t){return Xu[t.getMonth()]},B:function(t){return qu[t.getMonth()]},c:fs(Iu),d:function(t,e){return ms(t.getDate(),e,2)},e:function(t,e){return ms(t.getDate(),e,2)},H:function(t,e){return ms(t.getHours(),e,2)},I:function(t,e){return ms(t.getHours()%12||12,e,2)},j:function(t,e){return ms(1+Ou.dayOfYear(t),e,3)},L:function(t,e){return ms(t.getMilliseconds(),e,3)},m:function(t,e){return ms(t.getMonth()+1,e,2)},M:function(t,e){return ms(t.getMinutes(),e,2)},p:function(t){return t.getHours()>=12?"PM":"AM"},S:function(t,e){return ms(t.getSeconds(),e,2)},U:function(t,e){return ms(Ou.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return ms(Ou.mondayOfYear(t),e,2)},x:fs($u),X:fs(Bu),y:function(t,e){return ms(t.getFullYear()%100,e,2)},Y:function(t,e){return ms(t.getFullYear()%1e4,e,4)},Z:Is,"%":function(){return"%"}},ic={a:vs,A:ys,b:ks,B:Ms,c:Ss,d:Ps,e:Ps,H:Rs,I:Rs,j:Ds,L:Hs,m:Ns,M:Os,p:js,S:zs,U:bs,w:xs,W:ws,x:Cs,X:Ts,y:_s,Y:As,Z:Ls,"%":$s},rc=/^\s*\d+/,oc=Us.map({am:0,pm:1});fs.utc=Bs;var sc=Bs("%Y-%m-%dT%H:%M:%S.%LZ");fs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Fs:sc,Fs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Fs.toString=sc.toString,Ou.second=cs(function(t){return new zu(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ou.seconds=Ou.second.range,Ou.seconds.utc=Ou.second.utc.range,Ou.minute=cs(function(t){return new zu(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ou.minutes=Ou.minute.range,Ou.minutes.utc=Ou.minute.utc.range,Ou.hour=cs(function(t){var e=t.getTimezoneOffset()/60;return new zu(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ou.hours=Ou.hour.range,Ou.hours.utc=Ou.hour.utc.range,Ou.month=cs(function(t){return t=Ou.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ou.months=Ou.month.range,Ou.months.utc=Ou.month.utc.range;var ac=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],lc=[[Ou.second,1],[Ou.second,5],[Ou.second,15],[Ou.second,30],[Ou.minute,1],[Ou.minute,5],[Ou.minute,15],[Ou.minute,30],[Ou.hour,1],[Ou.hour,3],[Ou.hour,6],[Ou.hour,12],[Ou.day,1],[Ou.day,2],[Ou.week,1],[Ou.month,1],[Ou.month,3],[Ou.year,1]],uc=[[fs("%Y"),qe],[fs("%B"),function(t){return t.getMonth()}],[fs("%b %d"),function(t){return 1!=t.getDate()}],[fs("%a %d"),function(t){return t.getDay()&&1!=t.getDate()}],[fs("%I %p"),function(t){return t.getHours()}],[fs("%I:%M"),function(t){return t.getMinutes()}],[fs(":%S"),function(t){return t.getSeconds()}],[fs(".%L"),function(t){return t.getMilliseconds()}]],cc=Xs(uc);lc.year=Ou.year,Ou.scale=function(){return Ws(Us.scale.linear(),lc,cc)};var hc={range:function(t,e,n){return Us.range(+t,+e,n).map(qs)}},fc=lc.map(function(t){return[t[0].utc,t[1]]}),pc=[[Bs("%Y"),qe],[Bs("%B"),function(t){return t.getUTCMonth()}],[Bs("%b %d"),function(t){return 1!=t.getUTCDate()}],[Bs("%a %d"),function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[Bs("%I %p"),function(t){return t.getUTCHours()}],[Bs("%I:%M"),function(t){return t.getUTCMinutes()}],[Bs(":%S"),function(t){return t.getUTCSeconds()}],[Bs(".%L"),function(t){return t.getUTCMilliseconds()}]],dc=Xs(pc);return fc.year=Ou.year.utc,Ou.scale.utc=function(){return Ws(Us.scale.linear(),fc,dc)},Us.text=me(function(t){return t.responseText}),Us.json=function(t,e){return ve(t,"application/json",Ys,e)},Us.html=function(t,e){return ve(t,"text/html",Gs,e)},Us.xml=me(function(t){return t.responseXML}),Us}(); |