mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
7 lines
143 KiB
JavaScript
7 lines
143 KiB
JavaScript
!function(){function n(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function r(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function u(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return uo+n in this}function c(n){return n=uo+n,n in this&&delete this[n]}function l(){var n=[];return this.forEach(function(t){n.push(t)}),n}function f(){var n=0;for(var t in this)t.charCodeAt(0)===oo&&++n;return n}function s(){for(var n in this)if(n.charCodeAt(0)===oo)return!1;return!0}function h(){}function p(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function g(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=ao.length;e<r;++e){var i=ao[e]+t;if(i in n)return i}}function v(){}function d(){}function y(n){function t(){for(var t,r=e,i=-1,u=r.length;++i<u;)(t=r[i].on)&&t.apply(this,arguments);return n}var e=[],r=new o;return t.on=function(t,i){var u,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,u=e.indexOf(o)).concat(e.slice(u+1)),r.remove(t)),i&&e.push(r.set(t,{on:i})),n)},t}function m(){Zu.event.preventDefault()}function x(){for(var n,t=Zu.event;n=t.sourceEvent;)t=n;return t}function M(n){for(var t=new d,e=0,r=arguments.length;++e<r;)t[arguments[e]]=y(t);return t.of=function(e,r){return function(i){try{var u=i.sourceEvent=Zu.event;i.target=n,Zu.event=i,t[i.type].apply(e,r)}finally{Zu.event=u}}},t}function _(n){return lo(n,go),n}function b(n){return"function"==typeof n?n:function(){return fo(n,this)}}function w(n){return"function"==typeof n?n:function(){return so(n,this)}}function S(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function i(){this.setAttribute(n,t)}function u(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=Zu.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?u:i}function k(n){return n.trim().replace(/\s+/g," ")}function N(n){return new RegExp("(?:^|\\s+)"+Zu.requote(n)+"(?:\\s+|$)","g")}function E(n){return(n+"").trim().split(/^|\s+/)}function A(n,t){function e(){for(var e=-1;++e<i;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<i;)n[e](this,r)}n=E(n).map(C);var i=n.length;return"function"==typeof t?r:e}function C(n){var t=N(n);return function(e,r){if(i=e.classList)return r?i.add(n):i.remove(n);var i=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||e.setAttribute("class",k(i+" "+n))):e.setAttribute("class",k(i.replace(t," ")))}}function z(n,t,e){function r(){this.style.removeProperty(n)}function i(){this.style.setProperty(n,t,e)}function u(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?u:i}function L(n,t){function e(){delete this[n]}function r(){this[n]=t}function i(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?i:r}function T(n){return"function"==typeof n?n:(n=Zu.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function q(n){return{__data__:n}}function R(n){return function(){return po(this,n)}}function D(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function P(n,t){for(var e=0,r=n.length;e<r;e++)for(var i,u=n[e],o=0,a=u.length;o<a;o++)(i=u[o])&&t(i,o,e);return n}function U(n){return lo(n,yo),n}function j(n){var t,e;return function(r,i,u){var o,a=n[u].update,c=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t<c;);return o}}function H(){var n=this.__transition__;n&&++n.active}function F(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function i(){var i=c(t,Xu(arguments));r.call(this),this.addEventListener(n,this[o]=i,i.$=e),i._=t}function u(){var t,e=new RegExp("^__on([^.]+)"+Zu.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=O;a>0&&(n=n.substring(0,a));var l=xo.get(n);return l&&(n=l,c=Y),a?t?i:r:t?v:u}function O(n,t){return function(e){var r=Zu.event;Zu.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Zu.event=r}}}function Y(n,t){var e=O(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function I(){var n=".dragsuppress-"+ ++_o,t="click"+n,e=Zu.select(Wu).on("touchmove"+n,m).on("dragstart"+n,m).on("selectstart"+n,m);if(Mo){var r=Bu.style,i=r[Mo];r[Mo]="none"}return function(u){function o(){e.on(t,null)}e.on(n,null),Mo&&(r[Mo]=i),u&&(e.on(t,function(){m(),o()},!0),setTimeout(o,0))}}function Z(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(bo<0&&(Wu.scrollX||Wu.scrollY)){e=Zu.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=e[0][0].getScreenCTM();bo=!(i.f||i.e),e.remove()}return bo?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var u=n.getBoundingClientRect();return[t.clientX-u.left-n.clientLeft,t.clientY-u.top-n.clientTop]}function V(){return Zu.event.changedTouches[0].identifier}function X(){return Zu.event.target}function $(){return Wu}function B(n){return n>0?1:n<0?-1:0}function W(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function J(n){return n>1?0:n<-1?wo:Math.acos(n)}function G(n){return n>1?ko:n<-1?-ko:Math.asin(n)}function K(n){return((n=Math.exp(n))-1/n)/2}function Q(n){return((n=Math.exp(n))+1/n)/2}function nn(n){return((n=Math.exp(2*n))-1)/(n+1)}function tn(n){return(n=Math.sin(n/2))*n}function en(){}function rn(n,t,e){return this instanceof rn?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof rn?new rn(n.h,n.s,n.l):mn(""+n,xn,rn):new rn(n,t,e)}function un(n,t,e){function r(n){return n>360?n-=360:n<0&&(n+=360),n<60?u+(o-u)*n/60:n<180?o:n<240?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:t>1?1:t,e=e<0?0:e>1?1:e,o=e<=.5?e*(1+t):e+t-e*t,u=2*e-o,new gn(i(n+120),i(n),i(n-120))}function on(n,t,e){return this instanceof on?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof on?new on(n.h,n.c,n.l):n instanceof cn?fn(n.l,n.a,n.b):fn((n=Mn((n=Zu.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new on(n,t,e)}function an(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new cn(e,Math.cos(n*=Ao)*t,Math.sin(n)*t)}function cn(n,t,e){return this instanceof cn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof cn?new cn(n.l,n.a,n.b):n instanceof on?an(n.l,n.c,n.h):Mn((n=gn(n)).r,n.g,n.b):new cn(n,t,e)}function ln(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=sn(i)*Ho,r=sn(r)*Fo,u=sn(u)*Oo,new gn(pn(3.2404542*i-1.5371385*r-.4985314*u),pn(-.969266*i+1.8760108*r+.041556*u),pn(.0556434*i-.2040259*r+1.0572252*u))}function fn(n,t,e){return n>0?new on(Math.atan2(e,t)*Co,Math.sqrt(t*t+e*e),n):new on(NaN,NaN,n)}function sn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function hn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function pn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function gn(n,t,e){return this instanceof gn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof gn?new gn(n.r,n.g,n.b):mn(""+n,gn,un):new gn(n,t,e)}function vn(n){return new gn(n>>16,n>>8&255,255&n)}function dn(n){return vn(n)+""}function yn(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function mn(n,t,e){var r,i,u,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(bn(i[0]),bn(i[1]),bn(i[2]))}return(u=Zo.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.substring(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,c=15&u,c=c<<4|c):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,c=255&u)),t(o,a,c))}function xn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,c=(o+u)/2;return a?(i=c<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t<e?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=c>0&&c<1?0:r),new rn(r,i,c)}function Mn(n,t,e){n=_n(n),t=_n(t),e=_n(e);var r=hn((.4124564*n+.3575761*t+.1804375*e)/Ho),i=hn((.2126729*n+.7151522*t+.072175*e)/Fo),u=hn((.0193339*n+.119192*t+.9503041*e)/Oo);return cn(116*i-16,500*(r-i),200*(i-u))}function _n(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function bn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function wn(n){return"function"==typeof n?n:function(){return n}}function Sn(n){return n}function kn(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Nn(t,e,n,r)}}function Nn(n,t,e,r){function i(){var n,t=c.status;if(!t&&c.responseText||t>=200&&t<300||304===t){try{n=e.call(u,c)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,c)}var u={},o=Zu.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!Wu.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=i:c.onreadystatechange=function(){c.readyState>3&&i()},c.onprogress=function(n){var t=Zu.event;Zu.event=n;try{o.progress.call(u,c)}finally{Zu.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(l=n,u):l},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(Xu(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var f in a)c.setRequestHeader(f,a[f]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,c),c.send(null==r?null:r),u},u.abort=function(){return c.abort(),u},Zu.rebind(u,o,"on"),null==r?u:u.get(En(r))}function En(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function An(){var n=Cn(),t=zn()-n;t>24?(isFinite(t)&&(clearTimeout(Bo),Bo=setTimeout(An,t)),$o=0):($o=1,Jo(An))}function Cn(){var n=Date.now();for(Wo=Vo;Wo;)n>=Wo.t&&(Wo.f=Wo.c(n-Wo.t)),Wo=Wo.n;return n}function zn(){for(var n,t=Vo,e=1/0;t;)t.f?t=n?n.n=t.n:Vo=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return Xo=n,e}function Ln(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Tn(n,t){var e=Math.pow(10,3*io(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function qn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r?function(n){for(var t=n.length,i=[],u=0,o=r[0];t>0&&o>0;)i.push(n.substring(t-=o,t+o)),o=r[u=(u+1)%r.length];return i.reverse().join(e)}:Sn;return function(n){var e=Ko.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"",c=e[4]||"",l=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="=",s&&(f-=Math.floor((f-1)/4))),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+p.toLowerCase());case"c":case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===c&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=Qo.get(p)||Rn;var m=l&&s;return function(n){var e=d;if(y&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):a;if(g<0){var c=Zu.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=g;n=p(n,h);var x=n.lastIndexOf("."),M=x<0?n:n.substring(0,x),_=x<0?"":t+n.substring(x+1);!l&&s&&(M=u(M));var b=v.length+M.length+_.length+(m?0:i.length),w=b<f?new Array(b=f-b+1).join(r):"";return m&&(M=u(w+M)),i+=v,n=M+_,("<"===o?i+n+w:">"===o?w+i+n:"^"===o?w.substring(0,b>>=1)+i+n+w.substring(b):i+(m?n:w+n))+e}}}function Rn(n){return n+""}function Dn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Pn(n,t,e){function r(t){var e=n(t),r=u(e,1);return t-e<r-t?e:r}function i(e){return t(e=n(new ta(e-1)),1),e}function u(n,e){return t(n=new ta((+n)),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;o<r;)e(o)%u||a.push(new Date((+o))),t(o,1);else for(;o<r;)a.push(new Date((+o))),t(o,1);return a}function a(n,t,e){try{ta=Dn;var r=new Dn;return r._=n,o(r,t,e)}finally{ta=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var c=n.utc=Un(n);return c.floor=c,c.round=Un(r),c.ceil=Un(i),c.offset=Un(u),c.range=a,n}function Un(n){return function(t,e){try{ta=Dn;var r=new Dn;return r._=t,n(r,e)._}finally{ta=Date}}}function jn(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.substring(c,a)),null!=(i=ra[e=n.charAt(++a)])&&(e=n.charAt(++a)),(u=A[e])&&(e=u(t,null==i?"e"===e?" ":"0":i)),o.push(e),c=a+1);return o.push(n.substring(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,n,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var u=null!=r.Z&&ta!==Dn,o=new(u?Dn:ta);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),u?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var i,u,o,a=0,c=t.length,l=e.length;a<c;){if(r>=l)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in ra?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.substring(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){M.lastIndex=0;var r=M.exec(t.substring(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.substring(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.substring(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function c(n,t,r){return e(n,A.x.toString(),t,r)}function l(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=x.get(t.substring(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{ta=Dn;var t=new ta;return t._=n,r(t)}finally{ta=Date}}var r=t(n);return e.parse=function(n){try{ta=Dn;var t=r.parse(n);return t&&t._}finally{ta=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=it;var x=Zu.map(),M=Fn(v),_=On(v),b=Fn(d),w=On(d),S=Fn(y),k=On(y),N=Fn(m),E=On(m);g.forEach(function(n,t){x.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Hn(n.getDate(),t,2)},e:function(n,t){return Hn(n.getDate(),t,2)},H:function(n,t){return Hn(n.getHours(),t,2)},I:function(n,t){return Hn(n.getHours()%12||12,t,2)},j:function(n,t){return Hn(1+na.dayOfYear(n),t,3)},L:function(n,t){return Hn(n.getMilliseconds(),t,3)},m:function(n,t){return Hn(n.getMonth()+1,t,2)},M:function(n,t){return Hn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Hn(n.getSeconds(),t,2)},U:function(n,t){return Hn(na.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Hn(na.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Hn(n.getFullYear()%100,t,2)},Y:function(n,t){return Hn(n.getFullYear()%1e4,t,4)},Z:et,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:Jn,e:Jn,H:Kn,I:Kn,j:Gn,L:tt,m:Wn,M:Qn,p:f,S:nt,U:In,w:Yn,W:Zn,x:c,X:l,y:Xn,Y:Vn,Z:$n,"%":rt};return t}function Hn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u<e?new Array(e-u+1).join(t)+i:i)}function Fn(n){return new RegExp("^(?:"+n.map(Zu.requote).join("|")+")","i")}function On(n){for(var t=new o,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Yn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function In(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e));return r?(n.U=+r[0],e+r[0].length):-1}function Zn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e));return r?(n.W=+r[0],e+r[0].length):-1}function Vn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Xn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+2));return r?(n.y=Bn(+r[0]),e+r[0].length):-1}function $n(n,t,e){return/^[+-]\d{4}$/.test(t=t.substring(e,e+5))?(n.Z=-t,e+5):-1}function Bn(n){return n+(n>68?1900:2e3)}function Wn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Jn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Gn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Kn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Qn(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function nt(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function tt(n,t,e){ia.lastIndex=0;var r=ia.exec(t.substring(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function et(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=~~(io(t)/60),i=io(t)%60;return e+Hn(r,"0",2)+Hn(i,"0",2)}function rt(n,t,e){ua.lastIndex=0;var r=ua.exec(t.substring(e,e+1));return r?e+r[0].length:-1}function it(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ut(){}function ot(n,t,e){var r=e.s=n+t,i=r-n,u=r-i;e.t=n-u+(t-i)}function at(n,t){n&&la.hasOwnProperty(n.type)&&la[n.type](n,t)}function ct(n,t,e){var r,i=-1,u=n.length-e;for(t.lineStart();++i<u;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function lt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)ct(n[e],t,1);t.polygonEnd()}function ft(){function n(n,t){n*=Ao,t=t*Ao/2+wo/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),f=u*l,s=i*c+f*Math.cos(a),h=f*o*Math.sin(a);sa.add(Math.atan2(h,s)),r=n,i=c,u=l}var t,e,r,i,u;ha.point=function(o,a){ha.point=n,r=(t=o)*Ao,i=Math.cos(a=(e=a)*Ao/2+wo/4),u=Math.sin(a)},ha.lineEnd=function(){n(t,e)}}function st(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ht(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function pt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function gt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function vt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function dt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function yt(n){return[Math.atan2(n[1],n[0]),G(n[2])]}function mt(n,t){return io(n[0]-t[0])<No&&io(n[1]-t[1])<No}function xt(n,t){n*=Ao;var e=Math.cos(t*=Ao);Mt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Mt(n,t,e){++pa,va+=(n-va)/pa,da+=(t-da)/pa,ya+=(e-ya)/pa}function _t(){function n(n,i){n*=Ao;var u=Math.cos(i*=Ao),o=u*Math.cos(n),a=u*Math.sin(n),c=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);ga+=l,ma+=l*(t+(t=o)),xa+=l*(e+(e=a)),Ma+=l*(r+(r=c)),Mt(t,e,r)}var t,e,r;Sa.point=function(i,u){i*=Ao;var o=Math.cos(u*=Ao);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(u),Sa.point=n,Mt(t,e,r)}}function bt(){Sa.point=xt}function wt(){function n(n,t){n*=Ao;var e=Math.cos(t*=Ao),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=i*c-u*a,f=u*o-r*c,s=r*a-i*o,h=Math.sqrt(l*l+f*f+s*s),p=r*o+i*a+u*c,g=h&&-J(p)/h,v=Math.atan2(h,p);_a+=g*l,ba+=g*f,wa+=g*s,ga+=v,ma+=v*(r+(r=o)),xa+=v*(i+(i=a)),Ma+=v*(u+(u=c)),Mt(r,i,u)}var t,e,r,i,u;Sa.point=function(o,a){t=o,e=a,Sa.point=n,o*=Ao;var c=Math.cos(a*=Ao);r=c*Math.cos(o),i=c*Math.sin(o),u=Math.sin(a),Mt(r,i,u)},Sa.lineEnd=function(){n(t,e),Sa.lineEnd=bt,Sa.point=xt}}function St(){return!0}function kt(n,t,e,r,i){var u=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(mt(e,r)){i.lineStart();for(var a=0;a<t;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var c=new Et(e,n,null,(!0)),l=new Et(e,null,c,(!1));c.o=l,u.push(c),o.push(l),c=new Et(r,n,null,(!1)),l=new Et(r,null,c,(!0)),c.o=l,u.push(c),o.push(l)}}),o.sort(t),Nt(u),Nt(o),u.length){for(var a=0,c=e,l=o.length;a<l;++a)o[a].e=c=!c;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,l=f.length;a<l;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function Nt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function Et(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function At(n,t,e,r){return function(i,u){function o(t,e){var r=i(t,e);n(t=r[0],e=r[1])&&u.point(t,e)}function a(n,t){var e=i(n,t);d.point(e[0],e[1])}function c(){m.point=a,d.lineStart()}function l(){m.point=o,d.lineEnd()}function f(n,t){v.push([n,t]);var e=i(n,t);M.point(e[0],e[1])}function s(){M.lineStart(),v=[]}function h(){f(v[0][0],v[0][1]),M.lineEnd();var n,t=M.clean(),e=x.buffer(),r=e.length;if(v.pop(),g.push(v),v=null,r)if(1&t){n=e[0];var i,r=n.length-1,o=-1;if(r>0){for(_||(u.polygonStart(),_=!0),u.lineStart();++o<r;)u.point((i=n[o])[0],i[1]);u.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Ct))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:c,lineEnd:l,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=c,m.lineEnd=l,p=Zu.merge(p);var n=Tt(y,g);p.length?(_||(u.polygonStart(),_=!0),kt(p,Lt,n,e,u)):n&&(_||(u.polygonStart(),_=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),_&&(u.polygonEnd(),_=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},x=zt(),M=t(x),_=!1;return m}}function Ct(n){return n.length>1}function zt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:v,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Lt(n,t){return((n=n.x)[0]<0?n[1]-ko-No:ko-n[1])-((t=t.x)[0]<0?t[1]-ko-No:ko-t[1])}function Tt(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,o=0;sa.reset();for(var a=0,c=t.length;a<c;++a){var l=t[a],f=l.length;if(f)for(var s=l[0],h=s[0],p=s[1]/2+wo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=l[d];var y=n[0],m=n[1]/2+wo/4,x=Math.sin(m),M=Math.cos(m),_=y-h,b=_>=0?1:-1,w=b*_,S=w>wo,k=g*x;if(sa.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),u+=S?_+b*So:_,S^h>=e^y>=e){var N=pt(st(s),st(n));dt(N);var E=pt(i,N);dt(E);var A=(S^_>=0?-1:1)*G(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=y,g=x,v=M,s=n}}return(u<-No||u<No&&sa<0)^1&o}function qt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?wo:-wo,c=io(u-e);io(c-wo)<No?(n.point(e,r=(r+o)/2>0?ko:-ko),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&c>=wo&&(io(e-i)<No&&(e-=i*No),io(u-a)<No&&(u-=a*No),r=Rt(e,r,u,o),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=u,r=o),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Rt(n,t,e,r){var i,u,o=Math.sin(n-e);return io(o)>No?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Dt(n,t,e,r){var i;if(null==n)i=e*ko,r.point(-wo,i),r.point(0,i),r.point(wo,i),r.point(wo,0),r.point(wo,-i),r.point(0,-i),r.point(-wo,-i),r.point(-wo,0),r.point(-wo,i);else if(io(n[0]-t[0])>No){var u=n[0]<t[0]?wo:-wo;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(t[0],t[1])}function Pt(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,c,l,f;return{lineStart:function(){l=c=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(s<0?wo:-wo),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(p=r(e,g),(mt(e,p)||mt(g,p))&&(g[0]+=No,g[1]+=No,v=t(g[0],g[1]))),v!==c)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&mt(e,g)||n.point(g[0],g[1]),e=g,c=v,u=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return f|(l&&c)<<1}}}function r(n,t,e){var r=st(n),i=st(t),o=[1,0,0],a=pt(r,i),c=ht(a,a),l=a[0],f=c-l*l;if(!f)return!e&&n;var s=u*c/f,h=-u*l/f,p=pt(o,a),g=vt(o,s),v=vt(a,h);gt(g,v);var d=p,y=ht(g,d),m=ht(d,d),x=y*y-m*(ht(g,g)-1);if(!(x<0)){var M=Math.sqrt(x),_=vt(d,(-y-M)/m);if(gt(_,g),_=yt(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],N=t[1];S<w&&(b=w,w=S,S=b);var E=S-w,A=io(E-wo)<No,C=A||E<No;if(!A&&N<k&&(b=k,k=N,N=b),C?A?k+N>0^_[1]<(io(_[0]-w)<No?k:N):k<=_[1]&&_[1]<=N:E>wo^(w<=_[0]&&_[0]<=S)){var z=vt(d,(-y+M)/m);return gt(z,g),[_,yt(z)]}}}function i(t,e){var r=o?n:wo-n,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=io(u)>No,c=fe(n,6*Ao);return At(t,e,c,o?[0,-n]:[-wo,n-wo])}function Ut(n,t,e,r){return function(i){var u,o=i.a,a=i.b,c=o.x,l=o.y,f=a.x,s=a.y,h=0,p=1,g=f-c,v=s-l;if(u=n-c,g||!(u>0)){if(u/=g,g<0){if(u<h)return;u<p&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-c,g||!(u<0)){if(u/=g,g<0){if(u>p)return;u>h&&(h=u)}else if(g>0){if(u<h)return;u<p&&(p=u)}if(u=t-l,v||!(u>0)){if(u/=v,v<0){if(u<h)return;u<p&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-l,v||!(u<0)){if(u/=v,v<0){if(u>p)return;u>h&&(h=u)}else if(v>0){if(u<h)return;u<p&&(p=u)}return h>0&&(i.a={x:c+h*g,y:l+h*v}),p<1&&(i.b={x:c+p*g,y:l+p*v}),i}}}}}}function jt(n,t,e,r){function i(r,i){return io(r[0]-n)<No?i>0?0:3:io(r[0]-e)<No?i>0?2:1:io(r[1]-t)<No?i>0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],i=0;i<e;++i)for(var u,o=1,a=d[i],c=a.length,l=a[0];o<c;++o)u=a[o],l[1]<=r?u[1]>r&&W(l,u,n)>0&&++t:u[1]<=r&&W(l,u,n)<0&&--t,l=u;return 0!==t}function l(u,a,c,l){var f=0,s=0;if(null==u||(f=i(u,c))!==(s=i(a,c))||o(u,a)<0^c>0){do l.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+c+4)%4)!==s)}else l.point(a[0],a[1])}function f(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,_=b=NaN}function p(){v&&(g(m,x),M&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Na,Math.min(Na,n)),t=Math.max(-Na,Math.min(Na,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var v,d,y,m,x,M,_,b,w,S,k,N=a,E=zt(),A=Ut(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=Zu.merge(v);var t=c([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),i&&kt(v,u,t,l,a),a.polygonEnd()),v=d=y=null}};return C}}function Ht(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ft(n){var t=0,e=wo/3,r=ee(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*wo/180,e=n[1]*wo/180):[t/wo*180,e/wo*180]},i}function Ot(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,G((u-(n*n+e*e)*i*i)/(2*i))]},e}function Yt(){function n(n,t){Aa+=i*n-r*t,r=n,i=t}var t,e,r,i;qa.point=function(u,o){qa.point=n,t=r=u,e=i=o},qa.lineEnd=function(){n(t,e)}}function It(n,t){n<Ca&&(Ca=n),n>La&&(La=n),t<za&&(za=t),t>Ta&&(Ta=t)}function Zt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Vt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Vt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Vt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Xt(n,t){va+=n,da+=t,++ya}function $t(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);ma+=o*(t+n)/2,xa+=o*(e+r)/2,Ma+=o,Xt(t=n,e=r)}var t,e;Da.point=function(r,i){Da.point=n,Xt(t=r,e=i)}}function Bt(){Da.point=Xt}function Wt(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);ma+=o*(r+n)/2,xa+=o*(i+t)/2,Ma+=o,o=i*n-r*t,_a+=o*(r+n),ba+=o*(i+t),wa+=3*o,Xt(r=n,i=t)}var t,e,r,i;Da.point=function(u,o){Da.point=n,Xt(t=r=u,e=i=o)},Da.lineEnd=function(){n(t,e)}}function Jt(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,So)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:v};return a}function Gt(n){function t(n){return(a?r:e)(n)}function e(t){return ne(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=NaN,S.point=u,t.lineStart()}function u(e,r){var u=st([e,r]),o=n(e,r);i(x,M,m,_,b,w,x=o[0],M=o[1],m=e,_=u[0],b=u[1],w=u[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=f}function l(n,t){u(s=n,h=t),p=x,g=M,v=_,d=b,y=w,S.point=u}function f(){i(x,M,m,_,b,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,c,l,f,s,h,p,g,v,d,y){var m=f-t,x=s-e,M=m*m+x*x;if(M>4*u&&d--){var _=a+p,b=c+g,w=l+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),N=io(io(w)-1)<No||io(r-h)<No?(r+h)/2:Math.atan2(b,_),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,T=x*z-m*L;(T*T/M>u||io((m*z+x*L)/M-.5)>.3||a*p+c*g+l*v<o)&&(i(t,e,r,a,c,l,A,C,N,_/=S,b/=S,w,d,y),y.point(A,C),i(A,C,N,_,b,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Ao),a=16;
|
|
return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function Kt(n){var t=Gt(function(t,e){return n([t*Co,e*Co])});return function(n){return re(t(n))}}function Qt(n){this.stream=n}function ne(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function te(n){return ee(function(){return n})()}function ee(n){function t(n){return n=a(n[0]*Ao,n[1]*Ao),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Co,n[1]*Co]}function r(){a=Ht(o=oe(y,m,x),u);var n=u(v,d);return c=p-n[0]*h,l=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,c,l,f,s=Gt(function(n,t){return n=u(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,m=0,x=0,M=ka,_=Sn,b=null,w=null;return t.stream=function(n){return f&&(f.valid=!1),f=re(M(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,ka):Pt((b=+n)*Ao),i()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?jt(n[0][0],n[0][1],n[1][0],n[1][1]):Sn,i()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Ao,d=n[1]%360*Ao,r()):[v*Co,d*Co]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Ao,m=n[1]%360*Ao,x=n.length>2?n[2]%360*Ao:0,r()):[y*Co,m*Co,x*Co]},Zu.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function re(n){return ne(n,function(t,e){n.point(t*Ao,e*Ao)})}function ie(n,t){return[n,t]}function ue(n,t){return[n>wo?n-So:n<-wo?n+So:n,t]}function oe(n,t,e){return n?t||e?Ht(ce(n),le(t,e)):ce(n):t||e?le(t,e):ue}function ae(n){return function(t,e){return t+=n,[t>wo?t-So:t<-wo?t+So:t,e]}}function ce(n){var t=ae(n);return t.invert=ae(-n),t}function le(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),f=l*r+a*i;return[Math.atan2(c*u-f*o,a*r-l*i),G(f*u+c*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),f=l*u-c*o;return[Math.atan2(c*u+l*o,a*r+f*i),G(f*r-a*i)]},e}function fe(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var c=o*t;null!=i?(i=se(e,i),u=se(e,u),(o>0?i<u:i>u)&&(i+=o*So)):(i=n+o*So,u=n-.5*c);for(var l,f=i;o>0?f>u:f<u;f-=c)a.point((l=yt([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],l[1])}}function se(n,t){var e=st(t);e[0]-=n,dt(e);var r=J(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-No)%(2*Math.PI)}function he(n,t,e){var r=Zu.range(n,t-No,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function pe(n,t,e){var r=Zu.range(n,t-No,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function ge(n){return n.source}function ve(n){return n.target}function de(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=i*Math.cos(n),l=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(tn(r-t)+i*o*tn(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*c+t*f,i=e*l+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Co,Math.atan2(o,Math.sqrt(r*r+i*i))*Co]}:function(){return[n*Co,t*Co]};return g.distance=h,g}function ye(){function n(n,i){var u=Math.sin(i*=Ao),o=Math.cos(i),a=io((n*=Ao)-t),c=Math.cos(a);Pa+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*c)*a),e*u+r*o*c),t=n,e=u,r=o}var t,e,r;Ua.point=function(i,u){t=i*Ao,e=Math.sin(u*=Ao),r=Math.cos(u),Ua.point=n},Ua.lineEnd=function(){Ua.point=Ua.lineEnd=v}}function me(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function xe(n,t){function e(n,t){o>0?t<-ko+No&&(t=-ko+No):t>ko-No&&(t=ko-No);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(wo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=B(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-ko]},e):_e}function Me(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return io(i)<No?ie:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,u-B(i)*Math.sqrt(n*n+e*e)]},e)}function _e(n,t){return[n,Math.log(Math.tan(wo/4+t/2))]}function be(n){var t,e=te(n),r=e.scale,i=e.translate,u=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=i.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=u.apply(e,arguments);if(o===e){if(t=null==n){var a=wo*r(),c=i();u([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function we(n,t){return[Math.log(Math.tan(wo/4+t/2)),-n]}function Se(n){return n[0]}function ke(n){return n[1]}function Ne(n){for(var t=n.length,e=[0,1],r=2,i=2;i<t;i++){for(;r>1&&W(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Ee(n,t){return n[0]-t[0]||n[1]-t[1]}function Ae(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Ce(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,c=n[1],l=e[1],f=t[1]-c,s=r[1]-l,h=(a*(c-l)-s*(i-u))/(s*o-a*f);return[i+h*o,c+h*f]}function ze(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Le(){Ke(this),this.edge=this.site=this.circle=null}function Te(n){var t=Wa.pop()||new Le;return t.site=n,t}function qe(n){Ie(n),Xa.remove(n),Wa.push(n),Ke(n)}function Re(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];qe(n);for(var c=u;c.circle&&io(e-c.circle.x)<No&&io(r-c.circle.cy)<No;)u=c.P,a.unshift(c),qe(c),c=u;a.unshift(c),Ie(c);for(var l=o;l.circle&&io(e-l.circle.x)<No&&io(r-l.circle.cy)<No;)o=l.N,a.push(l),qe(l),l=o;a.push(l),Ie(l);var f,s=a.length;for(f=1;f<s;++f)l=a[f],c=a[f-1],We(l.edge,c.site,l.site,i);c=a[0],l=a[s-1],l.edge=$e(c.site,l.site,null,i),Ye(c),Ye(l)}function De(n){for(var t,e,r,i,u=n.x,o=n.y,a=Xa._;a;)if(r=Pe(a,o)-u,r>No)a=a.L;else{if(i=u-Ue(a,o),!(i>No)){r>-No?(t=a.P,e=a):i>-No?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Te(n);if(Xa.insert(t,c),t||e){if(t===e)return Ie(t),e=Te(t.site),Xa.insert(c,e),c.edge=e.edge=$e(t.site,c.site),Ye(t),void Ye(e);if(!e)return void(c.edge=$e(t.site,c.site));Ie(t),Ie(e);var l=t.site,f=l.x,s=l.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,x=v*v+d*d,M={x:(d*m-p*x)/y+f,y:(h*x-v*m)/y+s};We(e.edge,l,g,M),c.edge=$e(l,n,null,M),e.edge=$e(n,g,null,M),Ye(t),Ye(e)}}function Pe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var f=a-r,s=1/u-1/l,h=f/l;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*l)-c+l/2+i-u/2)))/s+r:(r+a)/2}function Ue(n,t){var e=n.N;if(e)return Pe(e,t);var r=n.site;return r.y===t?r.x:1/0}function je(n){this.site=n,this.edges=[]}function He(n){for(var t,e,r,i,u,o,a,c,l,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=Va,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,c=a.length,o=0;o<c;)f=a[o].end(),r=f.x,i=f.y,l=a[++o%c].start(),t=l.x,e=l.y,(io(r-t)>No||io(i-e)>No)&&(a.splice(o,0,new Je(Be(u.site,f,io(r-s)<No&&g-i>No?{x:s,y:io(t-s)<No?e:g}:io(i-g)<No&&h-r>No?{x:io(e-g)<No?t:h,y:g}:io(r-h)<No&&i-p>No?{x:h,y:io(t-h)<No?e:p}:io(i-p)<No&&r-s>No?{x:io(e-p)<No?t:s,y:p}:null),u.site,null)),++c)}function Fe(n,t){return t.angle-n.angle}function Oe(){Ke(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ye(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var o=i.x,a=i.y,c=r.x-o,l=r.y-a,f=u.x-o,s=u.y-a,h=2*(c*s-l*f);if(!(h>=-Eo)){var p=c*c+l*l,g=f*f+s*s,v=(s*p-l*g)/h,d=(c*g-f*p)/h,s=d+a,y=Ja.pop()||new Oe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,x=Ba._;x;)if(y.y<x.y||y.y===x.y&&y.x<=x.x){if(!x.L){m=x.P;break}x=x.L}else{if(!x.R){m=x;break}x=x.R}Ba.insert(m,y),m||($a=y)}}}}function Ie(n){var t=n.circle;t&&(t.P||($a=t.N),Ba.remove(t),Ja.push(t),Ke(t),n.circle=null)}function Ze(n){for(var t,e=Za,r=Ut(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!Ve(t,n)||!r(t)||io(t.a.x-t.b.x)<No&&io(t.a.y-t.b.y)<No)&&(t.a=t.b=null,e.splice(i,1))}function Ve(n,t){var e=n.b;if(e)return!0;var r,i,u=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],f=n.l,s=n.r,h=f.x,p=f.y,g=s.x,v=s.y,d=(h+g)/2,y=(p+v)/2;if(v===p){if(d<o||d>=a)return;if(h>g){if(u){if(u.y>=l)return}else u={x:d,y:c};e={x:d,y:l}}else{if(u){if(u.y<c)return}else u={x:d,y:l};e={x:d,y:c}}}else if(r=(h-g)/(v-p),i=y-r*d,r<-1||r>1)if(h>g){if(u){if(u.y>=l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else{if(u){if(u.y<c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else if(p<v){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.x<o)return}else u={x:a,y:r*a+i};e={x:o,y:r*o+i}}return n.a=u,n.b=e,!0}function Xe(n,t){this.l=n,this.r=t,this.a=this.b=null}function $e(n,t,e,r){var i=new Xe(n,t);return Za.push(i),e&&We(i,n,t,e),r&&We(i,t,n,r),Va[n.i].edges.push(new Je(i,n,t)),Va[t.i].edges.push(new Je(i,t,n)),i}function Be(n,t,e){var r=new Xe(n,null);return r.a=t,r.b=e,Za.push(r),r}function We(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Je(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Ge(){this._=null}function Ke(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function Qe(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function nr(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function tr(n){for(;n.L;)n=n.L;return n}function er(n,t){var e,r,i,u=n.sort(rr).pop();for(Za=[],Va=new Array(n.length),Xa=new Ge,Ba=new Ge;;)if(i=$a,u&&(!i||u.y<i.y||u.y===i.y&&u.x<i.x))u.x===e&&u.y===r||(Va[u.i]=new je(u),De(u),e=u.x,r=u.y),u=n.pop();else{if(!i)break;Re(i.arc)}t&&(Ze(t),He(t));var o={cells:Va,edges:Za};return Xa=Ba=Za=Va=null,o}function rr(n,t){return t.y-n.y||t.x-n.x}function ir(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function ur(n){return n.x}function or(n){return n.y}function ar(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function cr(n,t,e,r,i,u){if(!n(t,e,r,i,u)){var o=.5*(e+i),a=.5*(r+u),c=t.nodes;c[0]&&cr(n,c[0],e,r,o,a),c[1]&&cr(n,c[1],o,r,i,a),c[2]&&cr(n,c[2],e,a,o,u),c[3]&&cr(n,c[3],o,a,i,u)}}function lr(n,t){n=Zu.rgb(n),t=Zu.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return"#"+yn(Math.round(e+u*n))+yn(Math.round(r+o*n))+yn(Math.round(i+a*n))}}function fr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=pr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function sr(n,t){return t-=n=+n,function(e){return n+t*e}}function hr(n,t){var e,r,i,u=Ka.lastIndex=Qa.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=Ka.exec(n))&&(r=Qa.exec(t));)(i=r.index)>u&&(i=t.substring(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:sr(e,r)})),u=Qa.lastIndex;return u<t.length&&(i=t.substring(u),a[o]?a[o]+=i:a[++o]=i),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;r<t;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function pr(n,t){for(var e,r=Zu.interpolators.length;--r>=0&&!(e=Zu.interpolators[r](n,t)););return e}function gr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e<a;++e)r.push(pr(n[e],t[e]));for(;e<u;++e)i[e]=n[e];for(;e<o;++e)i[e]=t[e];return function(n){for(e=0;e<a;++e)i[e]=r[e](n);return i}}function vr(n){return function(t){return t<=0?0:t>=1?1:n(t)}}function dr(n){return function(t){return 1-n(1-t)}}function yr(n){return function(t){return.5*(t<.5?n(2*t):2-n(2-2*t))}}function mr(n){return n*n}function xr(n){return n*n*n}function Mr(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function _r(n){return function(t){return Math.pow(t,n)}}function br(n){return 1-Math.cos(n*ko)}function wr(n){return Math.pow(2,10*(n-1))}function Sr(n){return 1-Math.sqrt(1-n*n)}function kr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/So*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*So/t)}}function Nr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Er(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Ar(n,t){n=Zu.hcl(n),t=Zu.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return an(e+u*n,r+o*n,i+a*n)+""}}function Cr(n,t){n=Zu.hsl(n),t=Zu.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return un(e+u*n,r+o*n,i+a*n)+""}}function zr(n,t){n=Zu.lab(n),t=Zu.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return ln(e+u*n,r+o*n,i+a*n)+""}}function Lr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Tr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Rr(t),i=qr(t,e),u=Rr(Dr(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Co,this.translate=[n.e,n.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Co:0}function qr(n,t){return n[0]*t[0]+n[1]*t[1]}function Rr(n){var t=Math.sqrt(qr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Dr(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Pr(n,t){var e,r=[],i=[],u=Zu.transform(n),o=Zu.transform(t),a=u.translate,c=o.translate,l=u.rotate,f=o.rotate,s=u.skew,h=o.skew,p=u.scale,g=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),i.push({i:1,x:sr(a[0],c[0])},{i:3,x:sr(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=f?(l-f>180?f+=360:f-l>180&&(l+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:sr(l,f)})):f&&r.push(r.pop()+"rotate("+f+")"),s!=h?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:sr(s,h)}):h&&r.push(r.pop()+"skewX("+h+")"),p[0]!=g[0]||p[1]!=g[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:e-4,x:sr(p[0],g[0])},{i:e-2,x:sr(p[1],g[1])})):1==g[0]&&1==g[1]||r.push(r.pop()+"scale("+g+")"),e=i.length,function(n){for(var t,u=-1;++u<e;)r[(t=i[u]).i]=t.x(n);return r.join("")}}function Ur(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return(e-n)*t}}function jr(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return Math.max(0,Math.min(1,(e-n)*t))}}function Hr(n){for(var t=n.source,e=n.target,r=Or(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Fr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Or(n,t){if(n===t)return n;for(var e=Fr(n),r=Fr(t),i=e.pop(),u=r.pop(),o=null;i===u;)o=i,i=e.pop(),u=r.pop();return o}function Yr(n){n.fixed|=2}function Ir(n){n.fixed&=-7}function Zr(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Vr(n){n.fixed&=-5}function Xr(n,t,e){var r=0,i=0;if(n.charge=0,!n.leaf)for(var u,o=n.nodes,a=o.length,c=-1;++c<a;)u=o[c],null!=u&&(Xr(u,t,e),n.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,i+=l*n.point.y}n.cx=r/n.charge,n.cy=i/n.charge}function $r(n,t){return Zu.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=Qr,n}function Br(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function Wr(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++o<i;)e.push(u[o]);for(;null!=(n=r.pop());)t(n)}function Jr(n){return n.children}function Gr(n){return n.value}function Kr(n,t){return t.value-n.value}function Qr(n){return Zu.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ni(n){return n.x}function ti(n){return n.y}function ei(n,t,e){n.y0=t,n.y=e}function ri(n){return Zu.range(n.length)}function ii(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function ui(n){for(var t,e=1,r=0,i=n[0][1],u=n.length;e<u;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function oi(n){return n.reduce(ai,0)}function ai(n,t){return n+t[1]}function ci(n,t){return li(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function li(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function fi(n){return[Zu.min(n),Zu.max(n)]}function si(n,t){return n.value-t.value}function hi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function pi(n,t){n._pack_next=t,t._pack_prev=n}function gi(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function vi(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(l=e.length)){var e,r,i,u,o,a,c,l,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(di),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(i=e[1],i.x=i.r,i.y=0,t(i),l>2))for(u=e[2],xi(r,i,u),t(u),hi(r,u),r._pack_prev=u,hi(u,i),i=r._pack_next,o=3;o<l;o++){xi(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(gi(a,u)){g=1;break}if(1==g)for(c=r._pack_prev;c!==a._pack_prev&&!gi(c,u);c=c._pack_prev,d++);g?(v<d||v==d&&i.r<r.r?pi(r,i=a):pi(r=c,i),o--):(hi(r,u),i=u,t(u))}var y=(f+s)/2,m=(h+p)/2,x=0;for(o=0;o<l;o++)u=e[o],u.x-=y,u.y-=m,x=Math.max(x,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=x,e.forEach(yi)}}function di(n){n._pack_next=n._pack_prev=n}function yi(n){delete n._pack_next,delete n._pack_prev}function mi(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u<o;)mi(i[u],t,e,r)}function xi(n,t,e){var r=n.r+e.r,i=t.x-n.x,u=t.y-n.y;if(r&&(i||u)){var o=t.r+e.r,a=i*i+u*u;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*i+l*u,e.y=n.y+c*u-l*i}else e.x=n.x+r,e.y=n.y}function Mi(n,t){return n.parent==t.parent?1:2}function _i(n){var t=n.children;return t.length?t[0]:n.t}function bi(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function wi(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Si(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function ki(n,t,e){return n.a.parent===t.parent?n.a:e}function Ni(n){return 1+Zu.max(n,function(n){return n.y})}function Ei(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ai(n){var t=n.children;return t&&t.length?Ai(t[0]):n}function Ci(n){var t,e=n.children;return e&&(t=e.length)?Ci(e[t-1]):n}function zi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Li(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return i<0&&(e+=i/2,i=0),u<0&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Ti(n){var t=n[0],e=n[n.length-1];return t<e?[t,e]:[e,t]}function qi(n){return n.rangeExtent?n.rangeExtent():Ti(n.range())}function Ri(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Di(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return o<u&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function Pi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:fc}function Ui(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)i.push(e(n[o-1],n[o])),u.push(r(t[o-1],t[o]));return function(t){var e=Zu.bisect(n,t,1,a)-1;return u[e](i[e](t))}}function ji(n,t,e,r){function i(){var i=Math.min(n.length,t.length)>2?Ui:Ri,c=r?jr:Ur;return o=i(n,t,c,e),a=i(t,n,c,pr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Lr)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Yi(n,t)},u.tickFormat=function(t,e){return Ii(n,t,e)},u.nice=function(t){return Fi(n,t),i()},u.copy=function(){return ji(n,t,e,r)},i()}function Hi(n,t){return Zu.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Fi(n,t){return Di(n,Pi(Oi(n,t)[2]))}function Oi(n,t){null==t&&(t=10);var e=Ti(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Yi(n,t){return Zu.range.apply(Zu,Oi(n,t))}function Ii(n,t,e){var r=Oi(n,t);if(e){var i=Ko.exec(e);if(i.shift(),"s"===i[8]){var u=Zu.formatPrefix(Math.max(io(r[0]),io(r[1])));return i[7]||(i[7]="."+Zi(u.scale(r[2]))),i[8]="f",e=Zu.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+Vi(i[8],r)),e=i.join("")}else e=",."+Zi(r[2])+"f";return Zu.format(e)}function Zi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Vi(n,t){var e=Zi(t[2]);return n in sc?Math.abs(e-Zi(Math.max(io(t[0]),io(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Xi(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Di(r.map(i),e?Math:pc);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Ti(r),o=[],a=n[0],c=n[1],l=Math.floor(i(a)),f=Math.ceil(i(c)),s=t%1?2:t;if(isFinite(f-l)){if(e){for(;l<f;l++)for(var h=1;h<s;h++)o.push(u(l)*h);o.push(u(l))}else for(o.push(u(l));l++<f;)for(var h=s-1;h>0;h--)o.push(u(l)*h);for(l=0;o[l]<a;l++);for(f=o.length;o[f-1]>c;f--);o=o.slice(l,f)}return o},o.tickFormat=function(n,t){if(!arguments.length)return hc;arguments.length<2?t=hc:"function"!=typeof t&&(t=Zu.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/u(c(i(n)+r))<=a?t(n):""}},o.copy=function(){return Xi(n.copy(),t,e,r)},Hi(o,n)}function $i(n,t,e){function r(t){return n(i(t))}var i=Bi(t),u=Bi(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Yi(e,n)},r.tickFormat=function(n,t){return Ii(e,n,t)},r.nice=function(n){return r.domain(Fi(e,n))},r.exponent=function(o){return arguments.length?(i=Bi(t=o),u=Bi(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return $i(n.copy(),t,e)},Hi(r,n)}function Bi(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function Wi(n,t){function e(e){return u[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return Zu.range(n.length).map(function(n){return t+e*n})}var i,u,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new o;for(var u,a=-1,c=r.length;++a<c;)i.has(u=r[a])||i.set(u,n.push(u));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(u=n,a=0,t={t:"range",a:arguments},e):u},e.rangePoints=function(i,o){arguments.length<2&&(o=0);var c=i[0],l=i[1],f=(l-c)/(Math.max(1,n.length-1)+o);return u=r(n.length<2?(c+l)/2:c+f*o/2,f),a=0,t={t:"rangePoints",a:arguments},e},e.rangeBands=function(i,o,c){arguments.length<2&&(o=0),arguments.length<3&&(c=o);var l=i[1]<i[0],f=i[l-0],s=i[1-l],h=(s-f)/(n.length-o+2*c);return u=r(f+h*c,h),l&&u.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,o,c){arguments.length<2&&(o=0),arguments.length<3&&(c=o);var l=i[1]<i[0],f=i[l-0],s=i[1-l],h=Math.floor((s-f)/(n.length-o+2*c)),p=s-f-(n.length-o)*h;return u=r(f+Math.round(p/2),h),l&&u.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Ti(t.a[0])},e.copy=function(){return Wi(n,t)},e.domain(n)}function Ji(e,r){function i(){var n=0,t=r.length;for(o=[];++n<t;)o[n-1]=Zu.quantile(e,n/t);return u}function u(n){if(!isNaN(n=+n))return r[Zu.bisect(o,n)]}var o;return u.domain=function(r){return arguments.length?(e=r.filter(t).sort(n),i()):e},u.range=function(n){return arguments.length?(r=n,i()):r},u.quantiles=function(){return o},u.invertExtent=function(n){return n=r.indexOf(n),n<0?[NaN,NaN]:[n>0?o[n-1]:e[0],n<o.length?o[n]:e[e.length-1]]},u.copy=function(){return Ji(e,r)},i()}function Gi(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(u*(t-n))))]}function i(){return u=e.length/(t-n),o=e.length-1,r}var u,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],i()):[n,t]},r.range=function(n){return arguments.length?(e=n,i()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=t<0?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return Gi(n,t,e)},i()}function Ki(n,t){function e(e){if(e<=e)return t[Zu.bisect(n,e)]}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Ki(n,t)},e}function Qi(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Yi(n,t)},t.tickFormat=function(t,e){return Ii(n,t,e)},t.copy=function(){return Qi(n)},t}function nu(n){return n.innerRadius}function tu(n){return n.outerRadius}function eu(n){return n.startAngle}function ru(n){return n.endAngle}function iu(n){function t(t){function o(){l.push("M",u(n(f),a))}for(var c,l=[],f=[],s=-1,h=t.length,p=wn(e),g=wn(r);++s<h;)i.call(this,c=t[s],s)?f.push([+p.call(this,c,s),+g.call(this,c,s)]):f.length&&(o(),f=[]);return f.length&&o(),l.length?l.join(""):null}var e=Se,r=ke,i=St,u=uu,o=u.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(i=n,t):i},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?u=n:(u=Mc.get(n)||uu).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function uu(n){return n.join("L")}function ou(n){return uu(n)+"Z"}function au(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function cu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function lu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function fu(n,t){return n.length<4?uu(n):n[1]+pu(n.slice(1,n.length-1),gu(n,t))}function su(n,t){return n.length<3?uu(n):n[0]+pu((n.push(n[0]),n),gu([n[n.length-2]].concat(n,[n[1]]),t))}function hu(n,t){return n.length<3?uu(n):n[0]+pu(n,gu(n,t))}function pu(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return uu(n);var e=n.length!=t.length,r="",i=n[0],u=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(u[0]-2*o[0]/3)+","+(u[1]-2*o[1]/3)+","+u[0]+","+u[1],i=n[1],c=2),t.length>1){a=t[1],u=n[c],c++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var l=2;l<t.length;l++,c++)u=n[c],a=t[l],r+="S"+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1]}if(e){var f=n[c];r+="Q"+(u[0]+2*a[0]/3)+","+(u[1]+2*a[1]/3)+","+f[0]+","+f[1]}return r}function gu(n,t){for(var e,r=[],i=(1-t)/2,u=n[0],o=n[1],a=1,c=n.length;++a<c;)e=u,u=o,o=n[a],r.push([i*(o[0]-e[0]),i*(o[1]-e[1])]);return r}function vu(n){if(n.length<3)return uu(n);var t=1,e=n.length,r=n[0],i=r[0],u=r[1],o=[i,i,i,(r=n[1])[0]],a=[u,u,u,r[1]],c=[i,",",u,"L",xu(wc,o),",",xu(wc,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),Mu(c,o,a);return n.pop(),c.push("L",r),c.join("")}function du(n){if(n.length<4)return uu(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(xu(wc,u)+","+xu(wc,o)),--r;++r<i;)t=n[r],u.shift(),u.push(t[0]),o.shift(),o.push(t[1]),Mu(e,u,o);return e.join("")}function yu(n){for(var t,e,r=-1,i=n.length,u=i+4,o=[],a=[];++r<4;)e=n[r%i],o.push(e[0]),a.push(e[1]);for(t=[xu(wc,o),",",xu(wc,a)],--r;++r<u;)e=n[r%i],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Mu(t,o,a);return t.join("")}function mu(n,t){var e=n.length-1;if(e)for(var r,i,u=n[0][0],o=n[0][1],a=n[e][0]-u,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],i=l/e,r[0]=t*r[0]+(1-t)*(u+i*a),r[1]=t*r[1]+(1-t)*(o+i*c);return vu(n)}function xu(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Mu(n,t,e){n.push("C",xu(_c,t),",",xu(_c,e),",",xu(bc,t),",",xu(bc,e),",",xu(wc,t),",",xu(wc,e))}function _u(n,t){return(t[1]-n[1])/(t[0]-n[0])}function bu(n){for(var t=0,e=n.length-1,r=[],i=n[0],u=n[1],o=r[0]=_u(i,u);++t<e;)r[t]=(o+(o=_u(i=u,u=n[t+1])))/2;return r[t]=o,r}function wu(n){for(var t,e,r,i,u=[],o=bu(n),a=-1,c=n.length-1;++a<c;)t=_u(n[a],n[a+1]),io(t)<No?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,i=e*e+r*r,i>9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=c;)i=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Su(n){return n.length<3?uu(n):n[0]+pu(n,wu(n))}function ku(n){for(var t,e,r,i=-1,u=n.length;++i<u;)t=n[i],e=t[0],r=t[1]+mc,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Nu(n){function t(t){function c(){v.push("M",a(n(y),s),f,l(n(d.reverse()),s),"Z")}for(var h,p,g,v=[],d=[],y=[],m=-1,x=t.length,M=wn(e),_=wn(i),b=e===r?function(){return p}:wn(r),w=i===u?function(){return g}:wn(u);++m<x;)o.call(this,h=t[m],m)?(d.push([p=+M.call(this,h,m),g=+_.call(this,h,m)]),y.push([+b.call(this,h,m),+w.call(this,h,m)])):d.length&&(c(),d=[],y=[]);return d.length&&c(),v.length?v.join(""):null}var e=Se,r=Se,i=0,u=ke,o=St,a=uu,c=a.key,l=a,f="L",s=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=u=n,t):u},t.y0=function(n){return arguments.length?(i=n,t):i},t.y1=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=Mc.get(n)||uu).key,l=a.reverse||a,f=a.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(s=n,t):s},t}function Eu(n){return n.radius}function Au(n){return[n.x,n.y]}function Cu(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]+mc;return[e*Math.cos(r),e*Math.sin(r)]}}function zu(){return 64}function Lu(){return"circle"}function Tu(n){var t=Math.sqrt(n/wo);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function qu(n,t){return lo(n,Cc),n.id=t,n}function Ru(n,t,e,r){var i=n.id;return P(n,"function"==typeof e?function(n,u,o){n.__transition__[i].tween.set(t,r(e.call(n,n.__data__,u,o)))}:(e=r(e),function(n){n.__transition__[i].tween.set(t,e)}))}function Du(n){return null==n&&(n=""),function(){this.textContent=n}}function Pu(n,t,e,r){var i=n.__transition__||(n.__transition__={active:0,count:0}),u=i[e];if(!u){var a=r.time;u=i[e]={tween:new o,time:a,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,Zu.timer(function(r){function o(r){return i.active>e?l():(i.active=e,u.event&&u.event.start.call(n,f,t),u.tween.forEach(function(e,r){(r=r.call(n,f,t))&&v.push(r)}),void Zu.timer(function(){return g.c=c(r||1)?St:c,1},0,a))}function c(r){if(i.active!==e)return l();for(var o=r/p,a=s(o),c=v.length;c>0;)v[--c].call(n,a);
|
|
return o>=1?(u.event&&u.event.end.call(n,f,t),l()):void 0}function l(){return--i.count?delete i[e]:delete n.__transition__,1}var f=n.__data__,s=u.ease,h=u.delay,p=u.duration,g=Wo,v=[];return g.t=h+a,h<=r?o(r-h):void(g.c=o)},0,a)}}function Uu(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function ju(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Hu(n){return n.toISOString()}function Fu(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=Zu.bisect(jc,i);return u==jc.length?[t.year,Oi(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/jc[u-1]<jc[u]/i?u-1:u]:[Oc,Oi(n,e)[2]]}return r.invert=function(t){return Ou(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ou)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ou(+e+1),t).length}var u=r.domain(),o=Ti(u),a=null==n?i(o,10):"number"==typeof n&&i(o,n);return a&&(n=a[0],t=a[1]),r.domain(Di(u,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ou(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ou(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ti(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],Ou(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Fu(n.copy(),t,e)},Hi(r,n)}function Ou(n){return new Date(n)}function Yu(n){return JSON.parse(n.responseText)}function Iu(n){var t=$u.createRange();return t.selectNode($u.body),t.createContextualFragment(n.responseText)}var Zu={version:"3.4.11"};Date.now||(Date.now=function(){return+new Date});var Vu=[].slice,Xu=function(n){return Vu.call(n)},$u=document,Bu=$u.documentElement,Wu=window;try{Xu(Bu.childNodes)[0].nodeType}catch(Ju){Xu=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{$u.createElement("div").style.setProperty("opacity",0,"")}catch(Gu){var Ku=Wu.Element.prototype,Qu=Ku.setAttribute,no=Ku.setAttributeNS,to=Wu.CSSStyleDeclaration.prototype,eo=to.setProperty;Ku.setAttribute=function(n,t){Qu.call(this,n,t+"")},Ku.setAttributeNS=function(n,t,e){no.call(this,n,t,e+"")},to.setProperty=function(n,t,e){eo.call(this,n,t+"",e)}}Zu.ascending=n,Zu.descending=function(n,t){return t<n?-1:t>n?1:t>=n?0:NaN},Zu.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u&&!(null!=(e=n[i])&&e<=e);)e=void 0;for(;++i<u;)null!=(r=n[i])&&e>r&&(e=r)}else{for(;++i<u&&!(null!=(e=t.call(n,n[i],i))&&e<=e);)e=void 0;for(;++i<u;)null!=(r=t.call(n,n[i],i))&&e>r&&(e=r)}return e},Zu.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u&&!(null!=(e=n[i])&&e<=e);)e=void 0;for(;++i<u;)null!=(r=n[i])&&r>e&&(e=r)}else{for(;++i<u&&!(null!=(e=t.call(n,n[i],i))&&e<=e);)e=void 0;for(;++i<u;)null!=(r=t.call(n,n[i],i))&&r>e&&(e=r)}return e},Zu.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u<o&&!(null!=(e=i=n[u])&&e<=e);)e=i=void 0;for(;++u<o;)null!=(r=n[u])&&(e>r&&(e=r),i<r&&(i=r))}else{for(;++u<o&&!(null!=(e=i=t.call(n,n[u],u))&&e<=e);)e=void 0;for(;++u<o;)null!=(r=t.call(n,n[u],u))&&(e>r&&(e=r),i<r&&(i=r))}return[e,i]},Zu.sum=function(n,t){var e,r=0,i=n.length,u=-1;if(1===arguments.length)for(;++u<i;)isNaN(e=+n[u])||(r+=e);else for(;++u<i;)isNaN(e=+t.call(n,n[u],u))||(r+=e);return r},Zu.mean=function(n,e){var r,i=0,u=n.length,o=-1,a=u;if(1===arguments.length)for(;++o<u;)t(r=n[o])?i+=r:--a;else for(;++o<u;)t(r=e.call(n,n[o],o))?i+=r:--a;return a?i/a:void 0},Zu.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],u=e-r;return u?i+u*(n[r]-i):i},Zu.median=function(e,r){return arguments.length>1&&(e=e.map(r)),e=e.filter(t),e.length?Zu.quantile(e.sort(n),.5):void 0};var ro=e(n);Zu.bisectLeft=ro.left,Zu.bisect=Zu.bisectRight=ro.right,Zu.bisector=function(t){return e(1===t.length?function(e,r){return n(t(e),r)}:t)},Zu.shuffle=function(n){for(var t,e,r=n.length;r;)e=Math.random()*r--|0,t=n[r],n[r]=n[e],n[e]=t;return n},Zu.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Zu.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(r<0?0:r);e<r;)u[e]=[t=i,i=n[++e]];return u},Zu.zip=function(){if(!(i=arguments.length))return[];for(var n=-1,t=Zu.min(arguments,r),e=new Array(t);++n<t;)for(var i,u=-1,o=e[n]=new Array(i);++u<i;)o[u]=arguments[u][n];return e},Zu.transpose=function(n){return Zu.zip.apply(Zu,n)},Zu.keys=function(n){var t=[];for(var e in n)t.push(e);return t},Zu.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},Zu.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},Zu.merge=function(n){for(var t,e,r,i=n.length,u=-1,o=0;++u<i;)o+=n[u].length;for(e=new Array(o);--i>=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var io=Math.abs;Zu.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],o=i(io(e)),a=-1;if(n*=o,t*=o,e*=o,e<0)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},Zu.map=function(n){var t=new o;if(n instanceof o)n.forEach(function(n,e){t.set(n,e)});else for(var e in n)t.set(e,n[e]);return t},u(o,{has:a,get:function(n){return this[uo+n]},set:function(n,t){return this[uo+n]=t},remove:c,keys:l,values:function(){var n=[];return this.forEach(function(t,e){n.push(e)}),n},entries:function(){var n=[];return this.forEach(function(t,e){n.push({key:t,value:e})}),n},size:f,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===oo&&n.call(this,t.substring(1),this[t])}});var uo="\0",oo=uo.charCodeAt(0);Zu.nest=function(){function n(t,a,c){if(c>=u.length)return r?r.call(i,a):e?a.sort(e):a;for(var l,f,s,h,p=-1,g=a.length,v=u[c++],d=new o;++p<g;)(h=d.get(l=v(f=a[p])))?h.push(f):d.set(l,[f]);return t?(f=t(),s=function(e,r){f.set(e,n(t,r,c))}):(f={},s=function(e,r){f[e]=n(t,r,c)}),d.forEach(s),f}function t(n,e){if(e>=u.length)return n;var r=[],i=a[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],a=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(Zu.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return a[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},Zu.set=function(n){var t=new h;if(n)for(var e=0,r=n.length;e<r;++e)t.add(n[e]);return t},u(h,{has:a,add:function(n){return this[uo+n]=!0,n},remove:function(n){return n=uo+n,n in this&&delete this[n]},values:l,size:f,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===oo&&n.call(this,t.substring(1))}}),Zu.behavior={},Zu.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=p(n,t,t[e]);return n};var ao=["webkit","ms","moz","Moz","o","O"];Zu.dispatch=function(){for(var n=new d,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=y(n);return n},d.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.substring(e+1),n=n.substring(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Zu.event=null,Zu.requote=function(n){return n.replace(co,"\\$&")};var co=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,lo={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},fo=function(n,t){return t.querySelector(n)},so=function(n,t){return t.querySelectorAll(n)},ho=Bu.matches||Bu[g(Bu,"matchesSelector")],po=function(n,t){return ho.call(n,t)};"function"==typeof Sizzle&&(fo=function(n,t){return Sizzle(n,t)[0]||null},so=Sizzle,po=Sizzle.matchesSelector),Zu.selection=function(){return mo};var go=Zu.selection.prototype=[];go.select=function(n){var t,e,r,i,u=[];n=b(n);for(var o=-1,a=this.length;++o<a;){u.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(i=r[c])?(t.push(e=n.call(i,i.__data__,c,o)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return _(u)},go.selectAll=function(n){var t,e,r=[];n=w(n);for(var i=-1,u=this.length;++i<u;)for(var o=this[i],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=Xu(n.call(e,e.__data__,a,i))),t.parentNode=e);return _(r)};var vo={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/"};Zu.ns={prefix:vo,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.substring(0,t),n=n.substring(t+1)),vo.hasOwnProperty(e)?{space:vo[e],local:n}:n}},go.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=Zu.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(S(t,n[t]));return this}return this.each(S(n,t))},go.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=E(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!N(n[i]).test(t))return!1;return!0}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},go.style=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){r<2&&(t="");for(e in n)this.each(z(e,n[e],t));return this}if(r<2)return Wu.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(z(n,t,e))},go.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(L(t,n[t]));return this}return this.each(L(n,t))},go.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},go.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},go.append=function(n){return n=T(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},go.insert=function(n,t){return n=T(n),t=b(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},go.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},go.data=function(n,t){function e(n,e){var r,i,u,a=n.length,s=e.length,h=Math.min(a,s),p=new Array(s),g=new Array(s),v=new Array(a);if(t){var d,y=new o,m=new o,x=[];for(r=-1;++r<a;)d=t.call(i=n[r],i.__data__,r),y.has(d)?v[r]=i:y.set(d,i),x.push(d);for(r=-1;++r<s;)d=t.call(e,u=e[r],r),(i=y.get(d))?(p[r]=i,i.__data__=u):m.has(d)||(g[r]=q(u)),m.set(d,u),y.remove(d);for(r=-1;++r<a;)y.has(x[r])&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],u=e[r],i?(i.__data__=u,p[r]=i):g[r]=q(u);for(;r<s;++r)g[r]=q(e[r]);for(;r<a;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,c.push(g),l.push(p),f.push(v)}var r,i,u=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++u<a;)(i=r[u])&&(n[u]=i.__data__);return n}var c=U([]),l=_([]),f=_([]);if("function"==typeof n)for(;++u<a;)e(r=this[u],n.call(r,r.parentNode.__data__,u));else for(;++u<a;)e(r=this[u],n);return l.enter=function(){return c},l.exit=function(){return f},l},go.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},go.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=R(n));for(var u=0,o=this.length;u<o;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,c=e.length;a<c;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return _(i)},go.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},go.sort=function(n){n=D.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},go.each=function(n){return P(this,function(t,e,r){n.call(t,t.__data__,e,r)})},go.call=function(n){var t=Xu(arguments);return n.apply(t[0]=this,t),this},go.empty=function(){return!this.node()},go.node=function(){for(var n=0,t=this.length;n<t;n++)for(var e=this[n],r=0,i=e.length;r<i;r++){var u=e[r];if(u)return u}return null},go.size=function(){var n=0;return this.each(function(){++n}),n};var yo=[];Zu.selection.enter=U,Zu.selection.enter.prototype=yo,yo.append=go.append,yo.empty=go.empty,yo.node=go.node,yo.call=go.call,yo.size=go.size,yo.select=function(n){for(var t,e,r,i,u,o=[],a=-1,c=this.length;++a<c;){r=(i=this[a]).update,o.push(t=[]),t.parentNode=i.parentNode;for(var l=-1,f=i.length;++l<f;)(u=i[l])?(t.push(r[l]=e=n.call(i.parentNode,u.__data__,l,a)),e.__data__=u.__data__):t.push(null)}return _(o)},yo.insert=function(n,t){return arguments.length<2&&(t=j(this)),go.insert.call(this,n,t)},go.transition=function(){for(var n,t,e=kc||++zc,r=[],i=Nc||{time:Date.now(),ease:Mr,delay:0,duration:250},u=-1,o=this.length;++u<o;){r.push(n=[]);for(var a=this[u],c=-1,l=a.length;++c<l;)(t=a[c])&&Pu(t,c,e,i),n.push(t)}return qu(r,e)},go.interrupt=function(){return this.each(H)},Zu.select=function(n){var t=["string"==typeof n?fo(n,$u):n];return t.parentNode=Bu,_([t])},Zu.selectAll=function(n){var t=Xu("string"==typeof n?so(n,$u):n);return t.parentNode=Bu,_([t])};var mo=Zu.select(Bu);go.on=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){r<2&&(t=!1);for(e in n)this.each(F(e,n[e],t));return this}if(r<2)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(F(n,t,e))};var xo=Zu.map({mouseenter:"mouseover",mouseleave:"mouseout"});xo.forEach(function(n){"on"+n in $u&&xo.remove(n)});var Mo="onselectstart"in $u?null:g(Bu.style,"userSelect"),_o=0;Zu.mouse=function(n){return Z(n,x())};var bo=/WebKit/.test(Wu.navigator.userAgent)?-1:0;Zu.touches=function(n,t){return arguments.length<2&&(t=x().touches),t?Xu(t).map(function(t){var e=Z(n,t);return e.identifier=t.identifier,e}):[]},Zu.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",u)}function t(n,t,i,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-x[0],e=r[1]-x[1],g|=n|e,x=r,p({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g&&Zu.event.target===s),p({type:"dragend"}))}var l,f=this,s=Zu.event.target,h=f.parentNode,p=e.of(f,arguments),g=0,v=n(),d=".drag"+(null==v?"":"-"+v),y=Zu.select(i()).on(u+d,a).on(o+d,c),m=I(),x=t(h,v);r?(l=r.apply(f,arguments),l=[l.x-x[0],l.y-x[1]]):l=[0,0],p({type:"dragstart"})}}var e=M(n,"drag","dragstart","dragend"),r=null,i=t(v,Zu.mouse,$,"mousemove","mouseup"),u=t(V,Zu.touch,X,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},Zu.rebind(n,e,"on")};var wo=Math.PI,So=2*wo,ko=wo/2,No=1e-6,Eo=No*No,Ao=wo/180,Co=180/wo,zo=Math.SQRT2,Lo=2,To=4;Zu.interpolateZoom=function(n,t){function e(n){var t=n*m;if(y){var e=Q(v),o=u/(Lo*h)*(e*nn(zo*t+v)-K(v));return[r+o*l,i+o*f,u*e/Q(zo*t+v)]}return[r+n*l,i+n*f,u*Math.exp(zo*t)]}var r=n[0],i=n[1],u=n[2],o=t[0],a=t[1],c=t[2],l=o-r,f=a-i,s=l*l+f*f,h=Math.sqrt(s),p=(c*c-u*u+To*s)/(2*u*Lo*h),g=(c*c-u*u-To*s)/(2*c*Lo*h),v=Math.log(Math.sqrt(p*p+1)-p),d=Math.log(Math.sqrt(g*g+1)-g),y=d-v,m=(y||Math.log(c/u))/zo;return e.duration=1e3*m,e},Zu.behavior.zoom=function(){function n(n){n.on(E,l).on(Do+".zoom",s).on("dblclick.zoom",h).on(z,f)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function e(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function r(n){S.k=Math.max(N[0],Math.min(N[1],n))}function i(n,t){t=e(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function u(){_&&_.domain(x.range().map(function(n){return(n-S.x)/S.k}).map(x.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){u(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function l(){function n(){f=1,i(Zu.mouse(r),h),a(l)}function e(){s.on(A,null).on(C,null),p(f&&Zu.event.target===u),c(l)}var r=this,u=Zu.event.target,l=L.of(r,arguments),f=0,s=Zu.select(Wu).on(A,n).on(C,e),h=t(Zu.mouse(r)),p=I();H.call(r),o(l)}function f(){function n(){var n=Zu.touches(p);return h=S.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function e(){var t=Zu.event.target;Zu.select(t).on(M,u).on(_,s),b.push(t);for(var e=Zu.event.changedTouches,o=0,c=e.length;o<c;++o)v[e[o].identifier]=null;var l=n(),f=Date.now();if(1===l.length){if(f-y<500){var h=l[0],p=v[h.identifier];r(2*S.k),i(h,p),m(),a(g)}y=f}else if(l.length>1){var h=l[0],x=l[1],w=h[0]-x[0],k=h[1]-x[1];d=w*w+k*k}}function u(){for(var n,t,e,u,o=Zu.touches(p),c=0,l=o.length;c<l;++c,u=null)if(e=o[c],u=v[e.identifier]){if(t)break;n=e,t=u}if(u){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=d&&Math.sqrt(f/d);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+u[0])/2,(t[1]+u[1])/2],r(s*h)}y=null,i(n,t),a(g)}function s(){if(Zu.event.touches.length){for(var t=Zu.event.changedTouches,e=0,r=t.length;e<r;++e)delete v[t[e].identifier];for(var i in v)return void n()}Zu.selectAll(b).on(x,null),w.on(E,l).on(z,f),k(),c(g)}var h,p=this,g=L.of(p,arguments),v={},d=0,x=".zoom-"+Zu.event.changedTouches[0].identifier,M="touchmove"+x,_="touchend"+x,b=[],w=Zu.select(p).on(E,null).on(z,e),k=I();H.call(p),e(),o(g)}function s(){var n=L.of(this,arguments);d?clearTimeout(d):(p=t(g=v||Zu.mouse(this)),H.call(this),o(n)),d=setTimeout(function(){d=null,c(n)},50),m(),r(Math.pow(2,.002*qo())*S.k),i(g,p),a(n)}function h(){var n=L.of(this,arguments),e=Zu.mouse(this),u=t(e),l=Math.log(S.k)/Math.LN2;o(n),r(Math.pow(2,Zu.event.shiftKey?Math.ceil(l)-1:Math.floor(l)+1)),i(e,u),a(n),c(n)}var p,g,v,d,y,x,_,b,w,S={x:0,y:0,k:1},k=[960,500],N=Ro,E="mousedown.zoom",A="mousemove.zoom",C="mouseup.zoom",z="touchstart.zoom",L=M(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=L.of(this,arguments),t=S;kc?Zu.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],i=e/2,u=r/2,o=Zu.interpolateZoom([(i-S.x)/S.k,(u-S.y)/S.k,e/S.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),c=e/r[2];this.__chart__=S={x:i-r[0]*c,y:u-r[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},u(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},u(),n):S.k},n.scaleExtent=function(t){return arguments.length?(N=null==t?Ro:[+t[0],+t[1]],n):N},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,x=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},Zu.rebind(n,L,"on")};var qo,Ro=[0,1/0],Do="onwheel"in $u?(qo=function(){return-Zu.event.deltaY*(Zu.event.deltaMode?120:1)},"wheel"):"onmousewheel"in $u?(qo=function(){return Zu.event.wheelDelta},"mousewheel"):(qo=function(){return-Zu.event.detail},"MozMousePixelScroll");Zu.color=en,en.prototype.toString=function(){return this.rgb()+""},Zu.hsl=rn;var Po=rn.prototype=new en;Po.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new rn(this.h,this.s,this.l/n)},Po.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new rn(this.h,this.s,n*this.l)},Po.rgb=function(){return un(this.h,this.s,this.l)},Zu.hcl=on;var Uo=on.prototype=new en;Uo.brighter=function(n){return new on(this.h,this.c,Math.min(100,this.l+jo*(arguments.length?n:1)))},Uo.darker=function(n){return new on(this.h,this.c,Math.max(0,this.l-jo*(arguments.length?n:1)))},Uo.rgb=function(){return an(this.h,this.c,this.l).rgb()},Zu.lab=cn;var jo=18,Ho=.95047,Fo=1,Oo=1.08883,Yo=cn.prototype=new en;Yo.brighter=function(n){return new cn(Math.min(100,this.l+jo*(arguments.length?n:1)),this.a,this.b)},Yo.darker=function(n){return new cn(Math.max(0,this.l-jo*(arguments.length?n:1)),this.a,this.b)},Yo.rgb=function(){return ln(this.l,this.a,this.b)},Zu.rgb=gn;var Io=gn.prototype=new en;Io.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&t<i&&(t=i),e&&e<i&&(e=i),r&&r<i&&(r=i),new gn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new gn(i,i,i)},Io.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new gn(n*this.r,n*this.g,n*this.b)},Io.hsl=function(){return xn(this.r,this.g,this.b)},Io.toString=function(){return"#"+yn(this.r)+yn(this.g)+yn(this.b)};var Zo=Zu.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});Zo.forEach(function(n,t){Zo.set(n,vn(t))}),Zu.functor=wn,Zu.xhr=kn(Sn),Zu.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Nn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=l)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}f=e+2;var r=n.charCodeAt(e+1);return 13===r?(i=!0,10===n.charCodeAt(e+2)&&++f):10===r&&(i=!0),n.substring(t+1,e).replace(/""/g,'"')}for(;f<l;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==c)continue;return n.substring(t,f-a)}return n.substring(t)}for(var r,i,u={},o={},a=[],l=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&!(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new h,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(u).join("\n")},e},Zu.csv=Zu.dsv(",","text/csv"),Zu.tsv=Zu.dsv("\t","text/tab-separated-values"),Zu.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=x().changedTouches),t)for(var r,i=0,u=t.length;i<u;++i)if((r=t[i]).identifier===e)return Z(n,r)};var Vo,Xo,$o,Bo,Wo,Jo=Wu[g(Wu,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Zu.timer=function(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i=e+t,u={c:n,t:i,f:!1,n:null};Xo?Xo.n=u:Vo=u,Xo=u,$o||(Bo=clearTimeout(Bo),$o=1,Jo(An))},Zu.timer.flush=function(){Cn(),zn()},Zu.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Go=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Tn);Zu.formatPrefix=function(n,t){var e=0;return n&&(n<0&&(n*=-1),t&&(n=Zu.round(n,Ln(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Go[8+e/3]};var Ko=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Qo=Zu.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Zu.round(n,Ln(n,t))).toFixed(Math.max(0,Math.min(20,Ln(n*(1+1e-15),t))))}}),na=Zu.time={},ta=Date;Dn.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(){ea.setUTCDate.apply(this._,arguments)},setDay:function(){ea.setUTCDay.apply(this._,arguments)},setFullYear:function(){ea.setUTCFullYear.apply(this._,arguments)},setHours:function(){ea.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ea.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ea.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ea.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ea.setUTCSeconds.apply(this._,arguments)},setTime:function(){ea.setTime.apply(this._,arguments)}};var ea=Date.prototype;na.year=Pn(function(n){return n=na.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),na.years=na.year.range,na.years.utc=na.year.utc.range,na.day=Pn(function(n){var t=new ta(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),na.days=na.day.range,na.days.utc=na.day.utc.range,na.dayOfYear=function(n){var t=na.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=na[n]=Pn(function(n){return(n=na.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=na.year(n).getDay();return Math.floor((na.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});na[n+"s"]=e.range,na[n+"s"].utc=e.utc.range,na[n+"OfYear"]=function(n){var e=na.year(n).getDay();return Math.floor((na.dayOfYear(n)+(e+t)%7)/7)}}),na.week=na.sunday,na.weeks=na.sunday.range,na.weeks.utc=na.sunday.utc.range,na.weekOfYear=na.sundayOfYear;var ra={"-":"",_:" ",0:"0"},ia=/^\s*\d+/,ua=/^%/;Zu.locale=function(n){return{numberFormat:qn(n),timeFormat:jn(n)}};var oa=Zu.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Zu.format=oa.numberFormat,Zu.geo={},ut.prototype={s:0,t:0,add:function(n){ot(n,this.t,aa),ot(aa.s,this.s,this),this.s?this.t+=aa.t:this.s=aa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var aa=new ut;Zu.geo.stream=function(n,t){n&&ca.hasOwnProperty(n.type)?ca[n.type](n,t):at(n,t)};var ca={Feature:function(n,t){at(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)at(e[r].geometry,t)}},la={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){ct(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)ct(e[r],t,0)},Polygon:function(n,t){lt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)lt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)at(e[r],t)}};Zu.geo.area=function(n){return fa=0,Zu.geo.stream(n,ha),fa};var fa,sa=new ut,ha={sphere:function(){fa+=4*wo},point:v,lineStart:v,lineEnd:v,polygonStart:function(){sa.reset(),ha.lineStart=ft},polygonEnd:function(){var n=2*sa;fa+=n<0?4*wo+n:n,ha.lineStart=ha.lineEnd=ha.point=v}};Zu.geo.bounds=function(){function n(n,t){x.push(M=[f=n,h=n]),t<s&&(s=t),t>p&&(p=t)}function t(t,e){var r=st([t*Ao,e*Ao]);if(y){var i=pt(y,r),u=[i[1],-i[0],0],o=pt(u,i);dt(o),o=yt(o);var c=t-g,l=c>0?1:-1,v=o[0]*Co*l,d=io(c)>180;if(d^(l*g<v&&v<l*t)){var m=o[1]*Co;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(l*g<v&&v<l*t)){var m=-o[1]*Co;m<s&&(s=m)}else e<s&&(s=e),e>p&&(p=e);d?t<g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(t<f&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){_.point=t}function r(){M[0]=f,M[1]=h,_.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=io(r)>180?r+(r>0?360:-360):r}else v=n,d=e;ha.point(n,e),t(n,e)}function u(){ha.lineStart()}function o(){i(v,d),ha.lineEnd(),io(m)>No&&(f=-(h=180)),M[0]=f,M[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var f,s,h,p,g,v,d,y,m,x,M,_={point:n,lineStart:e,lineEnd:r,polygonStart:function(){_.point=i,_.lineStart=u,_.lineEnd=o,m=0,ha.polygonStart()},polygonEnd:function(){ha.polygonEnd(),_.point=n,_.lineStart=e,_.lineEnd=r,sa<0?(f=-(h=180),s=-(p=90)):m>No?p=90:m<-No&&(s=-90),M[0]=f,M[1]=h}};return function(n){p=h=-(f=s=1/0),x=[],Zu.geo.stream(n,_);var t=x.length;if(t){x.sort(c);for(var e,r=1,i=x[0],u=[i];r<t;++r)e=x[r],l(e[0],i)||l(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);
|
|
for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];r<=t;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return x=M=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),Zu.geo.centroid=function(n){pa=ga=va=da=ya=ma=xa=Ma=_a=ba=wa=0,Zu.geo.stream(n,Sa);var t=_a,e=ba,r=wa,i=t*t+e*e+r*r;return i<Eo&&(t=ma,e=xa,r=Ma,ga<No&&(t=va,e=da,r=ya),i=t*t+e*e+r*r,i<Eo)?[NaN,NaN]:[Math.atan2(e,t)*Co,G(r/Math.sqrt(i))*Co]};var pa,ga,va,da,ya,ma,xa,Ma,_a,ba,wa,Sa={sphere:v,point:xt,lineStart:_t,lineEnd:bt,polygonStart:function(){Sa.lineStart=wt},polygonEnd:function(){Sa.lineStart=_t}},ka=At(St,qt,Dt,[-wo,-wo/2]),Na=1e9;Zu.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=jt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(Zu.geo.conicEqualArea=function(){return Ft(Ot)}).raw=Ot,Zu.geo.albers=function(){return Zu.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Zu.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=Zu.geo.albers(),o=Zu.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Zu.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?o:i>=.166&&i<.234&&r>=-.214&&r<-.115?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var l=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*l,s-.238*l],[f+.455*l,s+.238*l]]).stream(c).point,r=o.translate([f-.307*l,s+.201*l]).clipExtent([[f-.425*l+No,s+.12*l+No],[f-.214*l-No,s+.234*l-No]]).stream(c).point,i=a.translate([f-.205*l,s+.212*l]).clipExtent([[f-.214*l+No,s+.166*l+No],[f-.115*l-No,s+.234*l-No]]).stream(c).point,n},n.scale(1070)};var Ea,Aa,Ca,za,La,Ta,qa={point:v,lineStart:v,lineEnd:v,polygonStart:function(){Aa=0,qa.lineStart=Yt},polygonEnd:function(){qa.lineStart=qa.lineEnd=qa.point=v,Ea+=io(Aa/2)}},Ra={point:It,lineStart:v,lineEnd:v,polygonStart:v,polygonEnd:v},Da={point:Xt,lineStart:$t,lineEnd:Bt,polygonStart:function(){Da.lineStart=Wt},polygonEnd:function(){Da.point=Xt,Da.lineStart=$t,Da.lineEnd=Bt}};Zu.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),Zu.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Ea=0,Zu.geo.stream(n,i(qa)),Ea},n.centroid=function(n){return va=da=ya=ma=xa=Ma=_a=ba=wa=0,Zu.geo.stream(n,i(Da)),wa?[_a/wa,ba/wa]:Ma?[ma/Ma,xa/Ma]:ya?[va/ya,da/ya]:[NaN,NaN]},n.bounds=function(n){return La=Ta=-(Ca=za=1/0),Zu.geo.stream(n,i(Ra)),[[Ca,za],[La,Ta]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||Kt(n):Sn,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Zt:new Jt(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(Zu.geo.albersUsa()).context(null)},Zu.geo.transform=function(n){return{stream:function(t){var e=new Qt(t);for(var r in n)e[r]=n[r];return e}}},Qt.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Zu.geo.projection=te,Zu.geo.projectionMutator=ee,(Zu.geo.equirectangular=function(){return te(ie)}).raw=ie.invert=ie,Zu.geo.rotation=function(n){function t(t){return t=n(t[0]*Ao,t[1]*Ao),t[0]*=Co,t[1]*=Co,t}return n=oe(n[0]%360*Ao,n[1]*Ao,n.length>2?n[2]*Ao:0),t.invert=function(t){return t=n.invert(t[0]*Ao,t[1]*Ao),t[0]*=Co,t[1]*=Co,t},t},ue.invert=ie,Zu.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=oe(-n[0]*Ao,-n[1]*Ao,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Co,n[1]*=Co}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=fe((t=+r)*Ao,i*Ao),n):t},n.precision=function(r){return arguments.length?(e=fe(t*Ao,(i=+r)*Ao),n):i},n.angle(90)},Zu.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ao,i=n[1]*Ao,u=t[1]*Ao,o=Math.sin(r),a=Math.cos(r),c=Math.sin(i),l=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=l*f-c*s*a)*e),c*f+l*s*a)},Zu.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return Zu.range(Math.ceil(u/d)*d,i,d).map(h).concat(Zu.range(Math.ceil(l/y)*y,c,y).map(p)).concat(Zu.range(Math.ceil(r/g)*g,e,g).filter(function(n){return io(n%d)>No}).map(f)).concat(Zu.range(Math.ceil(a/v)*v,o,v).filter(function(n){return io(n%y)>No}).map(s))}var e,r,i,u,o,a,c,l,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(c).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],l=+t[0][1],c=+t[1][1],u>i&&(t=u,u=i,i=t),l>c&&(t=l,l=c,c=t),n.precision(m)):[[u,l],[i,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=he(a,o,90),s=pe(r,e,m),h=he(l,c,90),p=pe(u,i,m),n):m},n.majorExtent([[-180,-90+No],[180,90-No]]).minorExtent([[-180,-80-No],[180,80+No]])},Zu.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=ge,i=ve;return n.distance=function(){return Zu.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},Zu.geo.interpolate=function(n,t){return de(n[0]*Ao,n[1]*Ao,t[0]*Ao,t[1]*Ao)},Zu.geo.length=function(n){return Pa=0,Zu.geo.stream(n,Ua),Pa};var Pa,Ua={sphere:v,point:v,lineStart:ye,lineEnd:v,polygonStart:v,polygonEnd:v},ja=me(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Zu.geo.azimuthalEqualArea=function(){return te(ja)}).raw=ja;var Ha=me(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},Sn);(Zu.geo.azimuthalEquidistant=function(){return te(Ha)}).raw=Ha,(Zu.geo.conicConformal=function(){return Ft(xe)}).raw=xe,(Zu.geo.conicEquidistant=function(){return Ft(Me)}).raw=Me;var Fa=me(function(n){return 1/n},Math.atan);(Zu.geo.gnomonic=function(){return te(Fa)}).raw=Fa,_e.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ko]},(Zu.geo.mercator=function(){return be(_e)}).raw=_e;var Oa=me(function(){return 1},Math.asin);(Zu.geo.orthographic=function(){return te(Oa)}).raw=Oa;var Ya=me(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Zu.geo.stereographic=function(){return te(Ya)}).raw=Ya,we.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ko]},(Zu.geo.transverseMercator=function(){var n=be(we),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=we,Zu.geom={},Zu.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=wn(e),u=wn(r),o=n.length,a=[],c=[];for(t=0;t<o;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(Ee),t=0;t<o;t++)c.push([a[t][0],-a[t][1]]);var l=Ne(a),f=Ne(c),s=f[0]===l[0],h=f[f.length-1]===l[l.length-1],p=[];for(t=l.length-1;t>=0;--t)p.push(n[a[l[t]][2]]);for(t=+s;t<f.length-h;++t)p.push(n[a[f[t]][2]]);return p}var e=Se,r=ke;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},Zu.geom.polygon=function(n){return lo(n,Ia),n};var Ia=Zu.geom.polygon.prototype=[];Ia.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},Ia.centroid=function(n){var t,e,r=-1,i=this.length,u=0,o=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],u+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[u*n,o*n]},Ia.clip=function(n){for(var t,e,r,i,u,o,a=ze(n),c=-1,l=this.length-ze(this),f=this[l-1];++c<l;){for(t=n.slice(),n.length=0,i=this[c],u=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Ae(o,f,i)?(Ae(u,f,i)||n.push(Ce(u,o,f,i)),n.push(o)):Ae(u,f,i)&&n.push(Ce(u,o,f,i)),u=o;a&&n.push(n[0]),f=i}return n};var Za,Va,Xa,$a,Ba,Wa=[],Ja=[];je.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Fe),t.length},Je.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}},Ge.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=tr(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(Qe(this,e),n=e,e=n.U),e.C=!1,r.C=!0,nr(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(nr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Qe(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,u=n.L,o=n.R;if(e=u?o?tr(o):u:o,i?i.L===n?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=n.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=n.U,n=e.R,i.L=n,e.R=o,o.U=e):(e.U=i,i=e,n=e.R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,Qe(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,nr(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Qe(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,nr(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Qe(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,nr(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},Zu.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],i=a[0][1],u=a[1][0],o=a[1][1];return er(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,f=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=u&&l.y>=i&&l.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/No)*No,y:Math.round(o(n,t)/No)*No,i:t}})}var r=Se,i=ke,u=r,o=i,a=Ga;return n?t(n):(t.links=function(n){return er(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return er(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Fe),c=-1,l=a.length,f=a[l-1].edge,s=f.l===o?f.r:f.l;++c<l;)i=f,u=s,f=a[c].edge,s=f.l===o?f.r:f.l,r<u.i&&r<s.i&&ir(o,u,s)<0&&t.push([n[r],n[u.i],n[s.i]])}),t},t.x=function(n){return arguments.length?(u=wn(r=n),t):r},t.y=function(n){return arguments.length?(o=wn(i=n),t):i},t.clipExtent=function(n){return arguments.length?(a=null==n?Ga:n,t):a===Ga?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===Ga?null:a&&a[1]},t)};var Ga=[[-1e6,-1e6],[1e6,1e6]];Zu.geom.delaunay=function(n){return Zu.geom.voronoi().triangles(n)},Zu.geom.quadtree=function(n,t,e,r,i){function u(n){function u(n,t,e,r,i,u,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,f=n.y;if(null!=c)if(io(c-e)+io(f-r)<.01)l(n,t,e,r,i,u,o,a);else{var s=n.point;n.x=n.y=n.point=null,l(n,s,c,f,i,u,o,a),l(n,t,e,r,i,u,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,i,u,o,a)}function l(n,t,e,r,i,o,a,c){var l=.5*(i+a),f=.5*(o+c),s=e>=l,h=r>=f,p=(h<<1)+s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=ar()),s?i=l:a=l,h?o=f:c=f,u(n,t,e,r,i,o,a,c)}var f,s,h,p,g,v,d,y,m,x=wn(a),M=wn(c);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;p<g;++p)f=n[p],f.x<v&&(v=f.x),f.y<d&&(d=f.y),f.x>y&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;p<g;++p){var _=+x(f=n[p],p),b=+M(f,p);_<v&&(v=_),b<d&&(d=b),_>y&&(y=_),b>m&&(m=b),s.push(_),h.push(b)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=ar();if(k.add=function(n){u(k,n,+x(n,++p),+M(n,p),v,d,y,m)},k.visit=function(n){cr(n,k,v,d,y,m)},p=-1,null==t){for(;++p<g;)u(k,n[p],s[p],h[p],v,d,y,m);--p}else n.forEach(k.add);return s=h=n=f=null,k}var o,a=Se,c=ke;return(o=arguments.length)?(a=ur,c=or,3===o&&(i=e,r=t,e=t=0),u(n)):(u.x=function(n){return arguments.length?(a=n,u):a},u.y=function(n){return arguments.length?(c=n,u):c},u.extent=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),u):null==t?null:[[t,e],[r,i]]},u.size=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=e=0,r=+n[0],i=+n[1]),u):null==t?null:[r-t,i-e]},u)},Zu.interpolateRgb=lr,Zu.interpolateObject=fr,Zu.interpolateNumber=sr,Zu.interpolateString=hr;var Ka=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qa=new RegExp(Ka.source,"g");Zu.interpolate=pr,Zu.interpolators=[function(n,t){var e=typeof t;return("string"===e?Zo.has(t)||/^(#|rgb\(|hsl\()/.test(t)?lr:hr:t instanceof en?lr:Array.isArray(t)?gr:"object"===e&&isNaN(t)?fr:sr)(n,t)}],Zu.interpolateArray=gr;var nc=function(){return Sn},tc=Zu.map({linear:nc,poly:_r,quad:function(){return mr},cubic:function(){return xr},sin:function(){return br},exp:function(){return wr},circle:function(){return Sr},elastic:kr,back:Nr,bounce:function(){return Er}}),ec=Zu.map({"in":Sn,out:dr,"in-out":yr,"out-in":function(n){return yr(dr(n))}});Zu.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.substring(0,t):n,r=t>=0?n.substring(t+1):"in";return e=tc.get(e)||nc,r=ec.get(r)||Sn,vr(r(e.apply(null,Vu.call(arguments,1))))},Zu.interpolateHcl=Ar,Zu.interpolateHsl=Cr,Zu.interpolateLab=zr,Zu.interpolateRound=Lr,Zu.transform=function(n){var t=$u.createElementNS(Zu.ns.prefix.svg,"g");return(Zu.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Tr(e?e.matrix:rc)})(n)},Tr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rc={a:1,b:0,c:0,d:1,e:0,f:0};Zu.interpolateTransform=Pr,Zu.layout={},Zu.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Hr(n[e]));return t}},Zu.layout.chord=function(){function n(){var n,l,s,h,p,g={},v=[],d=Zu.range(u),y=[];for(e=[],r=[],n=0,h=-1;++h<u;){for(l=0,p=-1;++p<u;)l+=i[h][p];v.push(l),y.push(Zu.range(u)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&y.forEach(function(n,t){n.sort(function(n,e){return a(i[t][n],i[t][e])})}),n=(So-f*u)/n,l=0,h=-1;++h<u;){for(s=l,p=-1;++p<u;){var m=d[h],x=y[m][p],M=i[m][x],_=l,b=l+=M*n;g[m+"-"+x]={index:m,subindex:x,startAngle:_,endAngle:b,value:M}}r[m]={index:m,startAngle:s,endAngle:l,value:(l-s)/n},l+=f}for(h=-1;++h<u;)for(p=h-1;++p<u;){var w=g[h+"-"+p],S=g[p+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,i,u,o,a,c,l={},f=0;return l.matrix=function(n){return arguments.length?(u=(i=n)&&i.length,e=r=null,l):i},l.padding=function(n){return arguments.length?(f=n,e=r=null,l):f},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},Zu.layout.force=function(){function n(n){return function(t,e,r,i){if(t.point!==n){var u=t.cx-n.x,o=t.cy-n.y,a=i-e,c=u*u+o*o;if(a*a/d<c){if(c<g){var l=t.charge/c;n.px-=u*l,n.py-=o*l}return!0}if(t.point&&c&&c<g){var l=t.pointCharge/c;n.px-=u*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=Zu.event.x,n.py=Zu.event.y,a.resume()}var e,r,i,u,o,a={},c=Zu.dispatch("start","tick","end"),l=[1,1],f=.9,s=ic,h=uc,p=-30,g=oc,v=.1,d=.64,y=[],m=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,s,h,g,d,x,M,_=y.length,b=m.length;for(e=0;e<b;++e)a=m[e],s=a.source,h=a.target,x=h.x-s.x,M=h.y-s.y,(g=x*x+M*M)&&(g=r*u[e]*((g=Math.sqrt(g))-i[e])/g,x*=g,M*=g,h.x-=x*(d=s.weight/(h.weight+s.weight)),h.y-=M*d,s.x+=x*(d=1-d),s.y+=M*d);if((d=r*v)&&(x=l[0]/2,M=l[1]/2,e=-1,d))for(;++e<_;)a=y[e],a.x+=(x-a.x)*d,a.y+=(M-a.y)*d;if(p)for(Xr(t=Zu.geom.quadtree(y),r,o),e=-1;++e<_;)(a=y[e]).fixed||t.visit(n(a));for(e=-1;++e<_;)a=y[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*f,a.y-=(a.py-(a.py=a.y))*f);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(y=n,a):y},a.links=function(n){return arguments.length?(m=n,a):m},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(s="function"==typeof n?n:+n,a):s},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(f=+n,a):f},a.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,a):p},a.chargeDistance=function(n){return arguments.length?(g=n*n,a):Math.sqrt(g)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),Zu.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;a<c;++a)e[a]=[];for(a=0;a<l;++a){var i=m[a];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var u,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(u=o[a][n]))return u;return Math.random()*r}var t,e,r,c=y.length,f=m.length,g=l[0],v=l[1];for(t=0;t<c;++t)(r=y[t]).index=t,r.weight=0;for(t=0;t<f;++t)r=m[t],"number"==typeof r.source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<c;++t)r=y[t],isNaN(r.x)&&(r.x=n("x",g)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof s)for(t=0;t<f;++t)i[t]=+s.call(this,m[t],t);else for(t=0;t<f;++t)i[t]=s;if(u=[],"function"==typeof h)for(t=0;t<f;++t)u[t]=+h.call(this,m[t],t);else for(t=0;t<f;++t)u[t]=h;if(o=[],"function"==typeof p)for(t=0;t<c;++t)o[t]=+p.call(this,y[t],t);else for(t=0;t<c;++t)o[t]=p;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=Zu.behavior.drag().origin(Sn).on("dragstart.force",Yr).on("drag.force",t).on("dragend.force",Ir)),arguments.length?void this.on("mouseover.force",Zr).on("mouseout.force",Vr).call(e):e},Zu.rebind(a,c,"on")};var ic=20,uc=1,oc=1/0;Zu.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(l=e.call(n,u,u.depth))&&(c=l.length)){for(var c,l,f;--c>=0;)o.push(f=l[c]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=l}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return Wr(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=Kr,e=Jr,r=Gr;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Br(t,function(n){n.children&&(n.value=0)}),Wr(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},Zu.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=u[l],e,c=a.value*r,i),e+=c}}function t(n){var e=n.children,r=0;if(e&&(i=e.length))for(var i,u=-1;++u<i;)r=Math.max(r,t(e[u]));return 1+r}function e(e,u){var o=r.call(this,e,u);return n(o[0],0,i[0],i[1]/t(o[0])),o}var r=Zu.layout.hierarchy(),i=[1,1];return e.size=function(n){return arguments.length?(i=n,e):i},$r(e,r)},Zu.layout.pie=function(){function n(u){var o=u.map(function(e,r){return+t.call(n,e,r)}),a=+("function"==typeof r?r.apply(this,arguments):r),c=(("function"==typeof i?i.apply(this,arguments):i)-a)/Zu.sum(o),l=Zu.range(u.length);null!=e&&l.sort(e===ac?function(n,t){return o[t]-o[n]}:function(n,t){return e(u[n],u[t])});var f=[];return l.forEach(function(n){var t;f[n]={data:u[n],value:t=o[n],startAngle:a,endAngle:a+=t*c}}),f}var t=Number,e=ac,r=0,i=So;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n};var ac={};Zu.layout.stack=function(){function n(a,c){var l=a.map(function(e,r){return t.call(n,e,r)}),f=l.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,c);l=Zu.permute(l,s),f=Zu.permute(f,s);var h,p,g,v=r.call(n,f,c),d=l.length,y=l[0].length;for(p=0;p<y;++p)for(i.call(n,l[0][p],g=v[p],f[0][p][1]),h=1;h<d;++h)i.call(n,l[h][p],g+=f[h-1][p][1],f[h][p][1]);return a}var t=Sn,e=ri,r=ii,i=ei,u=ni,o=ti;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:cc.get(t)||ri,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:lc.get(t)||ii,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var cc=Zu.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(ui),u=n.map(oi),o=Zu.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,c=0,l=[],f=[];for(t=0;t<r;++t)e=o[t],a<c?(a+=u[e],l.push(e)):(c+=u[e],f.push(e));return f.reverse().concat(l)},reverse:function(n){return Zu.range(n.length).reverse()},"default":ri}),lc=Zu.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,c=[];for(e=0;e<u;++e){for(t=0,r=0;t<i;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;e<u;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,i,u,o,a,c,l,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=c=l=0,e=1;e<h;++e){for(t=0,i=0;t<f;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];t<f;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);r<t;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=c-=i?u/i*a:0,c<l&&(l=c)}for(e=0;e<h;++e)p[e]-=l;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;e<u;++e){for(t=0,r=0;t<i;t++)r+=n[t][e][1];if(r)for(t=0;t<i;t++)n[t][e][1]/=r;else for(t=0;t<i;t++)n[t][e][1]=o}for(e=0;e<u;++e)a[e]=0;return a},zero:ii});Zu.layout.histogram=function(){function n(n,u){for(var o,a,c=[],l=n.map(e,this),f=r.call(this,l,u),s=i.call(this,f,l,u),u=-1,h=l.length,p=s.length-1,g=t?1:1/h;++u<p;)o=c[u]=[],o.dx=s[u+1]-(o.x=s[u]),o.y=0;if(p>0)for(u=-1;++u<h;)a=l[u],a>=f[0]&&a<=f[1]&&(o=c[Zu.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return c}var t=!0,e=Number,r=fi,i=ci;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=wn(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return li(n,t)}:wn(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},Zu.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],c=i[0],l=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Wr(a,function(n){n.r=+f(n.value)}),Wr(a,vi),r){var s=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;Wr(a,function(n){n.r+=s}),Wr(a,vi),Wr(a,function(n){n.r-=s})}return mi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=Zu.layout.hierarchy().sort(si),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},$r(n,e)},Zu.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(Wr(h,e),h.parent.m=-h.z,Br(h,r),l)Br(s,u);else{var p=s,g=s,v=s;Br(s,function(n){n.x<p.x&&(p=n),n.x>g.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=c[0]/(g.x+a(g,p)/2+d),m=c[1]/(v.depth||1);Br(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;o<a;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Si(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,c=i.parent.children[0],l=i.m,f=u.m,s=o.m,h=c.m;o=bi(o),i=_i(i),o&&i;)c=_i(c),u=bi(u),u.a=n,r=o.z+s-i.z-l+a(o._,i._),r>0&&(wi(ki(o,n,e),n,r),l+=r,f+=r),s+=o.m,l+=i.m,h+=c.m,f+=u.m;o&&!bi(u)&&(u.t=o,u.m+=s-f),i&&!_i(c)&&(c.t=i,c.m+=l-h,e=n)}return e}function u(n){n.x*=c[0],n.y=n.depth*c[1]}var o=Zu.layout.hierarchy().sort(null).value(null),a=Mi,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?u:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:u,n):l?c:null},$r(n,o)},Zu.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),c=a[0],l=0;Wr(c,function(n){var t=n.children;t&&t.length?(n.x=Ei(t),n.y=Ni(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var f=Ai(c),s=Ci(c),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return Wr(c,i?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=Zu.layout.hierarchy().sort(null).value(null),e=Mi,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},$r(n,t)},Zu.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i<u;)r=(e=n[i]).value*(t<0?0:t),e.area=isNaN(r)||r<=0?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,c,l=s(e),f=[],h=u.slice(),g=1/0,v="slice"===p?l.dx:"dice"===p?l.dy:"slice-dice"===p?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),f.area=0;(c=h.length)>0;)f.push(o=h[c-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,l,!1),v=Math.min(l.dx,l.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,l,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;u=a.pop();)c.push(u),c.area+=u.area,null!=u.z&&(i(c,u.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(e<u&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,l=e.y,f=t?c(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++u<o;)i=n[u],i.x=a,i.y=l,i.dy=f,a+=i.dx=Math.min(e.x+e.dx-a,f?c(i.area/f):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=f,e.dy-=f}else{for((r||f>e.dx)&&(f=e.dx);++u<o;)i=n[u],i.x=a,i.y=l,i.dx=f,l+=i.dy=Math.min(e.y+e.dy-l,f?c(i.area/f):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=f,e.dx-=f}}function u(r){var i=o||a(r),u=i[0];return u.x=0,u.y=0,u.dx=l[0],u.dy=l[1],o&&a.revalue(u),n([u],u.dx*u.dy/u.value),(o?e:t)(u),h&&(o=i),i}var o,a=Zu.layout.hierarchy(),c=Math.round,l=[1,1],f=null,s=zi,h=!1,p="squarify",g=.5*(1+Math.sqrt(5));return u.size=function(n){return arguments.length?(l=n,u):l},u.padding=function(n){function t(t){var e=n.call(u,t,t.depth);return null==e?zi(t):Li(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Li(t,n)}if(!arguments.length)return f;var r;return s=null==(f=n)?zi:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,u},u.round=function(n){return arguments.length?(c=n?Math.round:Number,u):c!=Number},u.sticky=function(n){return arguments.length?(h=n,o=null,u):h},u.ratio=function(n){return arguments.length?(g=n,u):g},u.mode=function(n){return arguments.length?(p=n+"",u):p},$r(u,a)},Zu.random={normal:function(n,t){var e=arguments.length;return e<2&&(t=1),e<1&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=Zu.random.normal.apply(Zu,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Zu.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;e<n;e++)t+=Math.random();return t}}},Zu.scale={};var fc={floor:Sn,ceil:Sn};Zu.scale.linear=function(){return ji([0,1],[0,1],pr,!1)};var sc={s:1,g:1,p:1,r:1,e:1};Zu.scale.log=function(){return Xi(Zu.scale.linear().domain([0,1]),10,!0,[1,10])};var hc=Zu.format(".0e"),pc={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};Zu.scale.pow=function(){return $i(Zu.scale.linear(),1,[0,1])},Zu.scale.sqrt=function(){return Zu.scale.pow().exponent(.5)},Zu.scale.ordinal=function(){return Wi([],{t:"range",a:[[]]})},Zu.scale.category10=function(){return Zu.scale.ordinal().range(gc)},Zu.scale.category20=function(){return Zu.scale.ordinal().range(vc)},Zu.scale.category20b=function(){return Zu.scale.ordinal().range(dc)},Zu.scale.category20c=function(){return Zu.scale.ordinal().range(yc)};var gc=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(dn),vc=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(dn),dc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(dn),yc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(dn);Zu.scale.quantile=function(){return Ji([],[])},Zu.scale.quantize=function(){return Gi(0,1,[0,1])},Zu.scale.threshold=function(){return Ki([.5],[0,1])},Zu.scale.identity=function(){return Qi([0,1])},Zu.svg={},Zu.svg.arc=function(){
|
|
function n(){var n=t.apply(this,arguments),u=e.apply(this,arguments),o=r.apply(this,arguments)+mc,a=i.apply(this,arguments)+mc,c=(a<o&&(c=o,o=a,a=c),a-o),l=c<wo?"0":"1",f=Math.cos(o),s=Math.sin(o),h=Math.cos(a),p=Math.sin(a);return c>=xc?n?"M0,"+u+"A"+u+","+u+" 0 1,1 0,"+-u+"A"+u+","+u+" 0 1,1 0,"+u+"M0,"+n+"A"+n+","+n+" 0 1,0 0,"+-n+"A"+n+","+n+" 0 1,0 0,"+n+"Z":"M0,"+u+"A"+u+","+u+" 0 1,1 0,"+-u+"A"+u+","+u+" 0 1,1 0,"+u+"Z":n?"M"+u*f+","+u*s+"A"+u+","+u+" 0 "+l+",1 "+u*h+","+u*p+"L"+n*h+","+n*p+"A"+n+","+n+" 0 "+l+",0 "+n*f+","+n*s+"Z":"M"+u*f+","+u*s+"A"+u+","+u+" 0 "+l+",1 "+u*h+","+u*p+"L0,0Z"}var t=nu,e=tu,r=eu,i=ru;return n.innerRadius=function(e){return arguments.length?(t=wn(e),n):t},n.outerRadius=function(t){return arguments.length?(e=wn(t),n):e},n.startAngle=function(t){return arguments.length?(r=wn(t),n):r},n.endAngle=function(t){return arguments.length?(i=wn(t),n):i},n.centroid=function(){var n=(t.apply(this,arguments)+e.apply(this,arguments))/2,u=(r.apply(this,arguments)+i.apply(this,arguments))/2+mc;return[Math.cos(u)*n,Math.sin(u)*n]},n};var mc=-ko,xc=So-No;Zu.svg.line=function(){return iu(Sn)};var Mc=Zu.map({linear:uu,"linear-closed":ou,step:au,"step-before":cu,"step-after":lu,basis:vu,"basis-open":du,"basis-closed":yu,bundle:mu,cardinal:hu,"cardinal-open":fu,"cardinal-closed":su,monotone:Su});Mc.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var _c=[0,2/3,1/3,0],bc=[0,1/3,2/3,0],wc=[0,1/6,2/3,1/6];Zu.svg.line.radial=function(){var n=iu(ku);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},cu.reverse=lu,lu.reverse=cu,Zu.svg.area=function(){return Nu(Sn)},Zu.svg.area.radial=function(){var n=Nu(ku);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},Zu.svg.chord=function(){function n(n,a){var c=t(this,u,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?i(c.r,c.p1,c.r,c.p0):i(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+i(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=c.call(n,i,r)+mc,f=l.call(n,i,r)+mc;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>wo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=ge,o=ve,a=Eu,c=eu,l=ru;return n.radius=function(t){return arguments.length?(a=wn(t),n):a},n.source=function(t){return arguments.length?(u=wn(t),n):u},n.target=function(t){return arguments.length?(o=wn(t),n):o},n.startAngle=function(t){return arguments.length?(c=wn(t),n):c},n.endAngle=function(t){return arguments.length?(l=wn(t),n):l},n},Zu.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,c=[u,{x:u.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=ge,e=ve,r=Au;return n.source=function(e){return arguments.length?(t=wn(e),n):t},n.target=function(t){return arguments.length?(e=wn(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},Zu.svg.diagonal.radial=function(){var n=Zu.svg.diagonal(),t=Au,e=n.projection;return n.projection=function(n){return arguments.length?e(Cu(t=n)):t},n},Zu.svg.symbol=function(){function n(n,r){return(Sc.get(t.call(this,n,r))||Tu)(e.call(this,n,r))}var t=Lu,e=zu;return n.type=function(e){return arguments.length?(t=wn(e),n):t},n.size=function(t){return arguments.length?(e=wn(t),n):e},n};var Sc=Zu.map({circle:Tu,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Ac)),e=t*Ac;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ec),e=t*Ec/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ec),e=t*Ec/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});Zu.svg.symbolTypes=Sc.keys();var kc,Nc,Ec=Math.sqrt(3),Ac=Math.tan(30*Ao),Cc=[],zc=0;Cc.call=go.call,Cc.empty=go.empty,Cc.node=go.node,Cc.size=go.size,Zu.transition=function(n){return arguments.length?kc?n.transition():n:mo.transition()},Zu.transition.prototype=Cc,Cc.select=function(n){var t,e,r,i=this.id,u=[];n=b(n);for(var o=-1,a=this.length;++o<a;){u.push(t=[]);for(var c=this[o],l=-1,f=c.length;++l<f;)(r=c[l])&&(e=n.call(r,r.__data__,l,o))?("__data__"in r&&(e.__data__=r.__data__),Pu(e,l,i,r.__transition__[i]),t.push(e)):t.push(null)}return qu(u,i)},Cc.selectAll=function(n){var t,e,r,i,u,o=this.id,a=[];n=w(n);for(var c=-1,l=this.length;++c<l;)for(var f=this[c],s=-1,h=f.length;++s<h;)if(r=f[s]){u=r.__transition__[o],e=n.call(r,r.__data__,s,c),a.push(t=[]);for(var p=-1,g=e.length;++p<g;)(i=e[p])&&Pu(i,p,o,u),t.push(i)}return qu(a,o)},Cc.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=R(n));for(var u=0,o=this.length;u<o;u++){i.push(t=[]);for(var e=this[u],a=0,c=e.length;a<c;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return qu(i,this.id)},Cc.tween=function(n,t){var e=this.id;return arguments.length<2?this.node().__transition__[e].tween.get(n):P(this,null==t?function(t){t.__transition__[e].tween.remove(n)}:function(r){r.__transition__[e].tween.set(n,t)})},Cc.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Pr:pr,a=Zu.ns.qualify(n);return Ru(this,"attr."+n,t,a.local?u:i)},Cc.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=Zu.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Cc.style=function(n,t,e){function r(){this.style.removeProperty(n)}function i(t){return null==t?r:(t+="",function(){var r,i=Wu.getComputedStyle(this,null).getPropertyValue(n);return i!==t&&(r=pr(i,t),function(t){this.style.setProperty(n,r(t),e)})})}var u=arguments.length;if(u<3){if("string"!=typeof n){u<2&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Ru(this,"style."+n,t,i)},Cc.styleTween=function(n,t,e){function r(r,i){var u=t.call(this,r,i,Wu.getComputedStyle(this,null).getPropertyValue(n));return u&&function(t){this.style.setProperty(n,u(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Cc.text=function(n){return Ru(this,"text",n,Du)},Cc.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},Cc.ease=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof n&&(n=Zu.ease.apply(Zu,arguments)),P(this,function(e){e.__transition__[t].ease=n}))},Cc.delay=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].delay:P(this,"function"==typeof n?function(e,r,i){e.__transition__[t].delay=+n.call(e,e.__data__,r,i)}:(n=+n,function(e){e.__transition__[t].delay=n}))},Cc.duration=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].duration:P(this,"function"==typeof n?function(e,r,i){e.__transition__[t].duration=Math.max(1,n.call(e,e.__data__,r,i))}:(n=Math.max(1,n),function(e){e.__transition__[t].duration=n}))},Cc.each=function(n,t){var e=this.id;if(arguments.length<2){var r=Nc,i=kc;kc=e,P(this,function(t,r,i){Nc=t.__transition__[e],n.call(t,t.__data__,r,i)}),Nc=r,kc=i}else P(this,function(r){var i=r.__transition__[e];(i.event||(i.event=Zu.dispatch("start","end"))).on(n,t)});return this},Cc.transition=function(){for(var n,t,e,r,i=this.id,u=++zc,o=[],a=0,c=this.length;a<c;a++){o.push(n=[]);for(var t=this[a],l=0,f=t.length;l<f;l++)(e=t[l])&&(r=Object.create(e.__transition__[i]),r.delay+=r.duration,Pu(e,l,u,r)),n.push(e)}return qu(o,u)},Zu.svg.axis=function(){function n(n){n.each(function(){var n,l=Zu.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==c?s.ticks?s.ticks.apply(s,a):s.domain():c,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):Sn:t,g=l.selectAll(".tick").data(h,s),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",No),d=Zu.transition(g.exit()).style("opacity",No).remove(),y=Zu.transition(g.order()).style("opacity",1),m=qi(s),x=l.selectAll(".domain").data([0]),M=(x.enter().append("path").attr("class","domain"),Zu.transition(x));v.append("line"),v.append("text");var _=v.select("line"),b=y.select("line"),w=g.select("text").text(p),S=v.select("text"),k=y.select("text");switch(r){case"bottom":n=Uu,_.attr("y2",i),S.attr("y",Math.max(i,0)+o),b.attr("x2",0).attr("y2",i),k.attr("x",0).attr("y",Math.max(i,0)+o),w.attr("dy",".71em").style("text-anchor","middle"),M.attr("d","M"+m[0]+","+u+"V0H"+m[1]+"V"+u);break;case"top":n=Uu,_.attr("y2",-i),S.attr("y",-(Math.max(i,0)+o)),b.attr("x2",0).attr("y2",-i),k.attr("x",0).attr("y",-(Math.max(i,0)+o)),w.attr("dy","0em").style("text-anchor","middle"),M.attr("d","M"+m[0]+","+-u+"V0H"+m[1]+"V"+-u);break;case"left":n=ju,_.attr("x2",-i),S.attr("x",-(Math.max(i,0)+o)),b.attr("x2",-i).attr("y2",0),k.attr("x",-(Math.max(i,0)+o)).attr("y",0),w.attr("dy",".32em").style("text-anchor","end"),M.attr("d","M"+-u+","+m[0]+"H0V"+m[1]+"H"+-u);break;case"right":n=ju,_.attr("x2",i),S.attr("x",Math.max(i,0)+o),b.attr("x2",i).attr("y2",0),k.attr("x",Math.max(i,0)+o).attr("y",0),w.attr("dy",".32em").style("text-anchor","start"),M.attr("d","M"+u+","+m[0]+"H0V"+m[1]+"H"+u)}if(s.rangeBand){var N=s,E=N.rangeBand()/2;f=s=function(n){return N(n)+E}}else f.rangeBand?f=s:d.call(n,s);v.call(n,f),y.call(n,s)})}var t,e=Zu.scale.linear(),r=Lc,i=6,u=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Tc?t+"":Lc,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Lc="bottom",Tc={top:1,right:1,bottom:1,left:1};Zu.svg.brush=function(){function n(u){u.each(function(){var u=Zu.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=u.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),u.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=u.selectAll(".resize").data(g,Sn);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return qc[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var f,s=Zu.transition(u),h=Zu.transition(o);c&&(f=qi(c),h.attr("x",f[0]).attr("width",f[1]-f[0]),e(s)),l&&(f=qi(l),h.attr("y",f[0]).attr("height",f[1]-f[0]),r(s)),t(s)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+s[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function r(n){n.select(".extent").attr("y",s[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function i(){function i(){32==Zu.event.keyCode&&(A||(x=null,z[0]-=f[1],z[1]-=s[1],A=2),m())}function g(){32==Zu.event.keyCode&&2==A&&(z[0]+=f[1],z[1]+=s[1],A=0,m())}function v(){var n=Zu.mouse(_),i=!1;M&&(n[0]+=M[0],n[1]+=M[1]),A||(Zu.event.altKey?(x||(x=[(f[0]+f[1])/2,(s[0]+s[1])/2]),z[0]=f[+(n[0]<x[0])],z[1]=s[+(n[1]<x[1])]):x=null),N&&d(n,c,0)&&(e(S),i=!0),E&&d(n,l,1)&&(r(S),i=!0),i&&(t(S),w({type:"brush",mode:A?"move":"resize"}))}function d(n,t,e){var r,i,a=qi(t),c=a[0],l=a[1],g=z[e],v=e?s:f,d=v[1]-v[0];if(A&&(c-=g,l-=d+g),r=(e?p:h)?Math.max(c,Math.min(l,n[e])):n[e],A?i=(r+=g)+d:(x&&(g=Math.max(c,Math.min(l,2*x[e]-r))),g<r?(i=r,r=g):i=g),v[0]!=r||v[1]!=i)return e?o=null:u=null,v[0]=r,v[1]=i,!0}function y(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),Zu.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var x,M,_=this,b=Zu.select(Zu.event.target),w=a.of(_,arguments),S=Zu.select(_),k=b.datum(),N=!/^(n|s)$/.test(k)&&c,E=!/^(e|w)$/.test(k)&&l,A=b.classed("extent"),C=I(),z=Zu.mouse(_),L=Zu.select(Wu).on("keydown.brush",i).on("keyup.brush",g);if(Zu.event.changedTouches?L.on("touchmove.brush",v).on("touchend.brush",y):L.on("mousemove.brush",v).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),A)z[0]=f[0]-z[0],z[1]=s[0]-z[1];else if(k){var T=+/w$/.test(k),q=+/^n/.test(k);M=[f[1-T]-z[0],s[1-q]-z[1]],z[0]=f[T],z[1]=s[q]}else Zu.event.altKey&&(x=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Zu.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),v()}var u,o,a=M(n,"brushstart","brush","brushend"),c=null,l=null,f=[0,0],s=[0,0],h=!0,p=!0,g=Rc[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:f,y:s,i:u,j:o},e=this.__chart__||t;this.__chart__=t,kc?Zu.select(this).transition().each("start.brush",function(){u=e.i,o=e.j,f=e.x,s=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=gr(f,t.x),r=gr(s,t.y);return u=o=null,function(i){f=t.x=e(i),s=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){u=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,g=Rc[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,g=Rc[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],p=!!t[1]):c?h=!!t:l&&(p=!!t),n):c&&l?[h,p]:c?h:l?p:null},n.extent=function(t){var e,r,i,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),u=[e,r],c.invert&&(e=c(e),r=c(r)),r<e&&(h=e,e=r,r=h),e==f[0]&&r==f[1]||(f=[e,r])),l&&(i=t[0],a=t[1],c&&(i=i[1],a=a[1]),o=[i,a],l.invert&&(i=l(i),a=l(a)),a<i&&(h=i,i=a,a=h),i==s[0]&&a==s[1]||(s=[i,a])),n):(c&&(u?(e=u[0],r=u[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),r<e&&(h=e,e=r,r=h))),l&&(o?(i=o[0],a=o[1]):(i=s[0],a=s[1],l.invert&&(i=l.invert(i),a=l.invert(a)),a<i&&(h=i,i=a,a=h))),c&&l?[[e,i],[r,a]]:c?[e,r]:l&&[i,a])},n.clear=function(){return n.empty()||(f=[0,0],s=[0,0],u=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!l&&s[0]==s[1]},Zu.rebind(n,a,"on")};var qc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Rc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Dc=na.format=oa.timeFormat,Pc=Dc.utc,Uc=Pc("%Y-%m-%dT%H:%M:%S.%LZ");Dc.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Hu:Uc,Hu.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Hu.toString=Uc.toString,na.second=Pn(function(n){return new ta(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),na.seconds=na.second.range,na.seconds.utc=na.second.utc.range,na.minute=Pn(function(n){return new ta(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),na.minutes=na.minute.range,na.minutes.utc=na.minute.utc.range,na.hour=Pn(function(n){var t=n.getTimezoneOffset()/60;return new ta(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),na.hours=na.hour.range,na.hours.utc=na.hour.utc.range,na.month=Pn(function(n){return n=na.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),na.months=na.month.range,na.months.utc=na.month.utc.range;var jc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Hc=[[na.second,1],[na.second,5],[na.second,15],[na.second,30],[na.minute,1],[na.minute,5],[na.minute,15],[na.minute,30],[na.hour,1],[na.hour,3],[na.hour,6],[na.hour,12],[na.day,1],[na.day,2],[na.week,1],[na.month,1],[na.month,3],[na.year,1]],Fc=Dc.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",St]]),Oc={range:function(n,t,e){return Zu.range(Math.ceil(n/e)*e,+t,e).map(Ou)},floor:Sn,ceil:Sn};Hc.year=na.year,na.scale=function(){return Fu(Zu.scale.linear(),Hc,Fc)};var Yc=Hc.map(function(n){return[n[0].utc,n[1]]}),Ic=Pc.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",St]]);Yc.year=na.year.utc,na.scale.utc=function(){return Fu(Zu.scale.linear(),Yc,Ic)},Zu.text=kn(function(n){return n.responseText}),Zu.json=function(n,t){return Nn(n,"application/json",Yu,t)},Zu.html=function(n,t){return Nn(n,"text/html",Iu,t)},Zu.xml=kn(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(Zu):"object"==typeof module&&module.exports&&(module.exports=Zu),this.d3=Zu}();
|
|
//# sourceMappingURL=d3.min.js.map
|