Files
coriolis/d3.min.js
Cmdr McDonald 82725e1c5a Fixes
2017-04-25 12:10:44 +01:00

3 lines
92 KiB
JavaScript

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){return function(n,e){return Ri(t(n),e)}}function e(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Wi?10:o>=Ji?5:o>=Gi?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Wi?10:o>=Ji?5:o>=Gi?2:1)}function r(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Wi?i*=10:o>=Ji?i*=5:o>=Gi&&(i*=2),n<t?-i:i}function i(t){return"translate("+t+",0)"}function o(t){return"translate(0,"+t+")"}function u(t){var n=t.bandwidth()/2;return t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function a(){return!this.__axis}function s(t,n){function e(e){var i=null==c?n.ticks?n.ticks.apply(n,s):n.domain():c,o=null==l?n.tickFormat?n.tickFormat.apply(n,s):to:l,v=Math.max(h,0)+p,y=n.range(),m=y[0]+.5,w=y[y.length-1]+.5,x=(n.bandwidth?u:to)(n.copy()),M=e.selection?e.selection():e,b=M.selectAll(".domain").data([null]),A=M.selectAll(".tick").data(i,n).order(),T=A.exit(),N=A.enter().append("g").attr("class","tick"),C=A.select("line"),k=A.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),A=A.merge(N),C=C.merge(N.append("line").attr("stroke","#000").attr(r+"2",d*h).attr(_+"1",.5).attr(_+"2",.5)),k=k.merge(N.append("text").attr("fill","#000").attr(r,d*v).attr(_,.5).attr("dy",t===no?"0em":t===ro?"0.71em":"0.32em")),e!==M&&(b=b.transition(e),A=A.transition(e),C=C.transition(e),k=k.transition(e),T=T.transition(e).attr("opacity",oo).attr("transform",function(t){return isFinite(t=x(t))?g(t):this.getAttribute("transform")}),N.attr("opacity",oo).attr("transform",function(t){var n=this.parentNode.__axis;return g(n&&isFinite(n=n(t))?n:x(t))})),T.remove(),b.attr("d",t===io||t==eo?"M"+d*f+","+m+"H0.5V"+w+"H"+d*f:"M"+m+","+d*f+"V0.5H"+w+"V"+d*f),A.attr("opacity",1).attr("transform",function(t){return g(x(t))}),C.attr(r+"2",d*h),k.attr(r,d*v).text(o),M.filter(a).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===eo?"start":t===io?"end":"middle"),M.each(function(){this.__axis=x})}var r,s=[],c=null,l=null,h=6,f=6,p=3,d=t===no||t===io?-1:1,_=t===io||t===eo?(r="x","y"):(r="y","x"),g=t===no||t===ro?i:o;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return s=Ki.call(arguments),e},e.tickArguments=function(t){return arguments.length?(s=null==t?[]:Ki.call(t),e):s.slice()},e.tickValues=function(t){return arguments.length?(c=null==t?null:Ki.call(t),e):c&&c.slice()},e.tickFormat=function(t){return arguments.length?(l=t,e):l},e.tickSize=function(t){return arguments.length?(h=f=+t,e):h},e.tickSizeInner=function(t){return arguments.length?(h=+t,e):h},e.tickSizeOuter=function(t){return arguments.length?(f=+t,e):f},e.tickPadding=function(t){return arguments.length?(p=+t,e):p},e}function c(t){return s(no,t)}function l(t){return s(ro,t)}function h(t){return s(io,t)}function f(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new p(r)}function p(t){this._=t}function d(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function _(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function g(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=uo,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function v(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===ao&&n.documentElement.namespaceURI===ao?n.createElement(t):n.createElementNS(e,t)}}function y(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function m(t,n,e){return t=w(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function w(t,n,e){return function(r){var i=vo;vo=r;try{t.call(this,this.__data__,n,e)}finally{vo=i}}}function x(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function M(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function b(t,n,e){var r=go.hasOwnProperty(t.type)?m:w;return function(i,o,u){var a,s=this.__on,c=r(n,o,u);if(s)for(var l=0,h=s.length;l<h;++l)if((a=s[l]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=c,a.capture=e),void(a.value=n);this.addEventListener(t.type,c,e),a={type:t.type,name:t.name,value:n,listener:c,capture:e},s?s.push(a):this.__on=[a]}}function A(){}function T(){return[]}function N(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function C(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;a<c;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new N(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function k(t,n,e,r,i,o,u){var a,s,c,l={},h=n.length,f=o.length,p=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(p[a]=c=Co+u.call(s,s.__data__,a,n),c in l?i[a]=s:l[c]=s);for(a=0;a<f;++a)c=Co+u.call(t,o[a],a,o),(s=l[c])?(r[a]=s,s.__data__=o[a],l[c]=null):e[a]=new N(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&l[p[a]]===s&&(i[a]=s)}function S(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function E(t){return function(){this.removeAttribute(t)}}function U(t){return function(){this.removeAttributeNS(t.space,t.local)}}function D(t,n){return function(){this.setAttribute(t,n)}}function P(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function F(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function L(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function H(t){return function(){this.style.removeProperty(t)}}function O(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Y(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function q(t){return function(){delete this[t]}}function z(t,n){return function(){this[t]=n}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function I(t){return t.trim().split(/^|\s+/)}function $(t){return t.classList||new X(t)}function X(t){this._node=t,this._names=I(t.getAttribute("class")||"")}function R(t,n){for(var e=$(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function B(t,n){for(var e=$(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function V(t){return function(){R(this,t)}}function Z(t){return function(){B(this,t)}}function W(t,n){return function(){(n.apply(this,arguments)?R:B)(this,t)}}function J(){this.textContent=""}function G(t){return function(){this.textContent=t}}function Q(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function K(){this.innerHTML=""}function tt(t){return function(){this.innerHTML=t}}function nt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function et(){this.nextSibling&&this.parentNode.appendChild(this)}function rt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function it(){return null}function ot(){var t=this.parentNode;t&&t.removeChild(this)}function ut(t,n,e){var r=zo(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function at(t,n){return function(){return ut(this,t,n)}}function st(t,n){return function(){return ut(this,t,n.apply(this,arguments))}}function ct(t,n){this._groups=t,this._parents=n}function lt(){return new ct([[document.documentElement]],Ko)}function ht(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function ft(){}function pt(t){var n;return t=(t+"").trim().toLowerCase(),(n=iu.exec(t))?(n=parseInt(n[1],16),new yt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=ou.exec(t))?dt(parseInt(n[1],16)):(n=uu.exec(t))?new yt(n[1],n[2],n[3],1):(n=au.exec(t))?new yt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=su.exec(t))?_t(n[1],n[2],n[3],n[4]):(n=cu.exec(t))?_t(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=lu.exec(t))?mt(n[1],n[2]/100,n[3]/100,1):(n=hu.exec(t))?mt(n[1],n[2]/100,n[3]/100,n[4]):fu.hasOwnProperty(t)?dt(fu[t]):"transparent"===t?new yt(NaN,NaN,NaN,0):null}function dt(t){return new yt(t>>16&255,t>>8&255,255&t,1)}function _t(t,n,e,r){return r<=0&&(t=n=e=NaN),new yt(t,n,e,r)}function gt(t){return t instanceof ft||(t=pt(t)),t?(t=t.rgb(),new yt(t.r,t.g,t.b,t.opacity)):new yt}function vt(t,n,e,r){return 1===arguments.length?gt(t):new yt(t,n,e,null==r?1:r)}function yt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function mt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Mt(t,n,e,r)}function wt(t){if(t instanceof Mt)return new Mt(t.h,t.s,t.l,t.opacity);if(t instanceof ft||(t=pt(t)),!t)return new Mt;if(t instanceof Mt)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new Mt(u,a,s,t.opacity)}function xt(t,n,e,r){return 1===arguments.length?wt(t):new Mt(t,n,e,null==r?1:r)}function Mt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function bt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function At(t){if(t instanceof Nt)return new Nt(t.l,t.a,t.b,t.opacity);if(t instanceof Pt){var n=t.h*pu;return new Nt(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof yt||(t=gt(t));var e=Et(t.r),r=Et(t.g),i=Et(t.b),o=Ct((.4124564*e+.3575761*r+.1804375*i)/_u),u=Ct((.2126729*e+.7151522*r+.072175*i)/gu);return new Nt(116*u-16,500*(o-u),200*(u-Ct((.0193339*e+.119192*r+.9503041*i)/vu)),t.opacity)}function Tt(t,n,e,r){return 1===arguments.length?At(t):new Nt(t,n,e,null==r?1:r)}function Nt(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Ct(t){return t>xu?Math.pow(t,1/3):t/wu+yu}function kt(t){return t>mu?t*t*t:wu*(t-yu)}function St(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ut(t){if(t instanceof Pt)return new Pt(t.h,t.c,t.l,t.opacity);t instanceof Nt||(t=At(t));var n=Math.atan2(t.b,t.a)*du;return new Pt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Dt(t,n,e,r){return 1===arguments.length?Ut(t):new Pt(t,n,e,null==r?1:r)}function Pt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Ft(t){if(t instanceof Ht)return new Ht(t.h,t.s,t.l,t.opacity);t instanceof yt||(t=gt(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Su*r+Cu*n-ku*e)/(Su+Cu-ku),o=r-i,u=(Nu*(e-i)-Au*o)/Tu,a=Math.sqrt(u*u+o*o)/(Nu*i*(1-i)),s=a?Math.atan2(u,o)*du-120:NaN;return new Ht(s<0?s+360:s,a,i,t.opacity)}function Lt(t,n,e,r){return 1===arguments.length?Ft(t):new Ht(t,n,e,null==r?1:r)}function Ht(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ot(t,n){return function(e){return t+e*n}}function Yt(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function qt(t,n){var e=n-t;return e?Ot(t,e>180||e<-180?e-360*Math.round(e/360):e):Fu(isNaN(t)?n:t)}function zt(t){return 1==(t=+t)?jt:function(n,e){return e-n?Yt(n,e,t):Fu(isNaN(n)?e:n)}}function jt(t,n){var e=n-t;return e?Ot(t,e):Fu(isNaN(t)?n:t)}function It(t){return function(){return t}}function $t(t){return function(n){return t(n)+""}}function Xt(t){return"none"===t?Bu:(Eu||(Eu=document.createElement("DIV"),Uu=document.documentElement,Du=document.defaultView),Eu.style.transform=t,t=Du.getComputedStyle(Uu.appendChild(Eu),null).getPropertyValue("transform"),Uu.removeChild(Eu),t=t.slice(7,-1).split(","),Vu(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function Rt(t){return null==t?Bu:(Pu||(Pu=document.createElementNS("http://www.w3.org/2000/svg","g")),Pu.setAttribute("transform",t),(t=Pu.transform.baseVal.consolidate())?(t=t.matrix,Vu(t.a,t.b,t.c,t.d,t.e,t.f)):Bu)}function Bt(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function o(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:Yu(t,i)},{i:s-2,x:Yu(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}function u(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Yu(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function a(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Yu(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function s(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Yu(t,e)},{i:a-2,x:Yu(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),u(n.rotate,e.rotate,r,i),a(n.skewX,e.skewX,r,i),s(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e<o;)r[(n=i[e]).i]=n.x(t);return r.join("")}}}function Vt(t){return function n(e){function r(n,r){var i=t((n=Lt(n)).h,(r=Lt(r)).h),o=jt(n.s,r.s),u=jt(n.l,r.l),a=jt(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}function Zt(){return ia||(aa(Wt),ia=ua.now()+oa)}function Wt(){ia=0}function Jt(){this._call=this._time=this._next=null}function Gt(t,n,e){var r=new Jt;return r.restart(t,n,e),r}function Qt(){Zt(),++Ku;for(var t,n=Ju;n;)(t=ia-n._time)>=0&&n._call.call(null,t),n=n._next;--Ku}function Kt(){ia=(ra=ua.now())+oa,Ku=ta=0;try{Qt()}finally{Ku=0,nn(),ia=0}}function tn(){var t=ua.now(),n=t-ra;n>ea&&(oa-=n,ra=t)}function nn(){for(var t,n,e=Ju,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ju=n);Gu=t,en(r)}function en(t){if(!Ku){ta&&(ta=clearTimeout(ta));var n=t-ia;n>24?(t<1/0&&(ta=setTimeout(Kt,n)),na&&(na=clearInterval(na))):(na||(ra=ia,na=setInterval(tn,ea)),Ku=1,aa(Kt))}}function rn(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>ha)throw new Error("too late");return e}function on(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>pa)throw new Error("too late");return e}function un(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function an(t,n,e){function r(t){e.state=fa,e.timer.restart(i,e.delay,e.time),e.delay<=t&&i(t-e.delay)}function i(r){var c,l,h,f;if(e.state!==fa)return u();for(c in s)if(f=s[c],f.name===e.name){if(f.state===da)return sa(i);f.state===_a?(f.state=va,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[c]):+c<n&&(f.state=va,f.timer.stop(),delete s[c])}if(sa(function(){e.state===da&&(e.state=_a,e.timer.restart(o,e.delay,e.time),o(r))}),e.state=pa,e.on.call("start",t,t.__data__,e.index,e.group),e.state===pa){for(e.state=da,a=new Array(h=e.tween.length),c=0,l=-1;c<h;++c)(f=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(a[++l]=f);a.length=l+1}}function o(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=ga,1),i=-1,o=a.length;++i<o;)a[i].call(null,r);e.state===ga&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){e.state=va,e.timer.stop(),delete s[n];for(var r in s)return;delete t.__transition}var a,s=t.__transition;s[n]=e,e.timer=Gt(r,0,e.time)}function sn(t,n){var e,r;return function(){var i=on(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function cn(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=on(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,c=i.length;s<c;++s)if(i[s].name===n){i[s]=a;break}s===c&&i.push(a)}o.tween=i}}function ln(t,n,e){var r=t._id;return t.each(function(){var t=on(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return un(t,r).value[n]}}function hn(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pn(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function dn(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function _n(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttribute(t):(u=this.getAttribute(t),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function gn(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function vn(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function yn(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function mn(t,n){return function(){rn(this,t).delay=+n.apply(this,arguments)}}function wn(t,n){return n=+n,function(){rn(this,t).delay=n}}function xn(t,n){return function(){on(this,t).duration=+n.apply(this,arguments)}}function Mn(t,n){return n=+n,function(){on(this,t).duration=n}}function bn(t,n){if("function"!=typeof n)throw new Error;return function(){on(this,t).ease=n}}function An(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function Tn(t,n,e){var r,i,o=An(n)?rn:on;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function Nn(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Cn(t,n){var e,r,i;return function(){var o=zo(this).getComputedStyle(this,null),u=o.getPropertyValue(t),a=(this.style.removeProperty(t),o.getPropertyValue(t));return u===a?null:u===e&&a===r?i:i=n(e=u,r=a)}}function kn(t){return function(){this.style.removeProperty(t)}}function Sn(t,n,e){var r,i;return function(){var o=zo(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===r?i:i=n(r=o,e)}}function En(t,n,e){var r,i,o;return function(){var u=zo(this).getComputedStyle(this,null),a=u.getPropertyValue(t),s=e(this);return null==s&&(this.style.removeProperty(t),s=u.getPropertyValue(t)),a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function Un(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function Dn(t){return function(){this.textContent=t}}function Pn(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function Fn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Ln(t){return lt().transition(t)}function Hn(){return++za}function On(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function Yn(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return $a.time=Zt(),$a;return e}function qn(t){return{type:t}}function zn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function jn(){return new zn}function In(){}function $n(t,n){var e=new In;if(t instanceof In)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function Xn(){}function Rn(t,n){var e=new Xn;if(t instanceof Xn)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}function Bn(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Vn(t,n){var e=Bn(t);return function(r,i){return n(e(r),i,t)}}function Zn(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function Wn(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,s,c,l,h,f,p=t._root,d={data:r},_=t._x0,g=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=n>=(o=(_+v)/2))?_=o:v=o,(l=e>=(u=(g+y)/2))?g=u:y=u,i=p,!(p=p[h=l<<1|c]))return i[h]=d,t;if(a=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===a&&e===s)return d.next=p,i?i[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(c=n>=(o=(_+v)/2))?_=o:v=o,(l=e>=(u=(g+y)/2))?g=u:y=u}while((h=l<<1|c)==(f=(s>=u)<<1|a>=o));return i[f]=p,i[h]=d,t}function Jn(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),s=1/0,c=1/0,l=-1/0,h=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(u[e]=r,a[e]=i,r<s&&(s=r),r>l&&(l=r),i<c&&(c=i),i>h&&(h=i));for(l<s&&(s=this._x0,l=this._x1),h<c&&(c=this._y0,h=this._y1),this.cover(s,c).cover(l,h),e=0;e<o;++e)Wn(this,u[e],a[e],t[e]);return this}function Gn(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function Qn(t){return t[0]}function Kn(t){return t[1]}function te(t,n,e){var r=new ne(null==n?Qn:n,null==e?Kn:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ne(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function ee(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function re(t){return new ie(t)}function ie(t){if(!(n=bs.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],s=!!n[7],c=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(s=!0,l="g"):Ms[l]||(l=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=a,this.comma=s,this.precision=c,this.type=l}function oe(){this.reset()}function ue(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}function ae(t){return t>1?0:t<-1?Ls:Math.acos(t)}function se(t){return t>1?Hs:t<-1?-Hs:Math.asin(t)}function ce(t){return function(n,e){var r=qs(n),i=qs(e),o=t(r*i);return[o*i*zs(n),o*zs(e)]}}function le(t){return function(n,e){var r=js(n*n+e*e),i=t(r),o=zs(i),u=qs(i);return[Ys(n*o,r*u),se(r&&e*o/r)]}}function he(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function fe(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function pe(t,n){var e,r,i,o,u,a=new ye(t),s=+t.value&&(a.value=t.value),c=[a];for(null==n&&(n=_e);e=c.pop();)if(s&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)c.push(r=e.children[o]=new ye(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(ve)}function de(){return pe(this).eachBefore(ge)}function _e(t){return t.children}function ge(t){t.data=t.data.data}function ve(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function ye(t){this.data=t,this.depth=this.height=0,this.parent=null}function me(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function we(t){if(!t._start)try{xe(t)}catch(n){if(t._tasks[t._ended+t._active-1])be(t,n);else if(!t._data)throw n}}function xe(t){for(;t._start=t._waiting&&t._active<t._size;){var n=t._ended+t._active,e=t._tasks[n],r=e.length-1,i=e[r];e[r]=Me(t,n),--t._waiting,++t._active,e=i.apply(null,e),t._tasks[n]&&(t._tasks[n]=e||Ks)}}function Me(t,n){return function(e,r){t._tasks[n]&&(--t._active,++t._ended,t._tasks[n]=null,null==t._error&&(null!=e?be(t,e):(t._data[n]=r,t._waiting?we(t):Ae(t))))}}function be(t,n){var e,r=t._tasks.length;for(t._error=n,t._data=void 0,t._waiting=NaN;--r>=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,Ae(t)}function Ae(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function Te(t){return function(n,e){t(null==n?e:null)}}function Ne(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Ce(t,n){return function(e){return t(e.responseText,n)}}function ke(t){function n(n){var o=n+"",u=e.get(o);if(!u){if(i!==uc)return i;e.set(o,u=r.push(n))}return t[(u-1)%t.length]}var e=$n(),r=[],i=uc;return t=null==t?[]:oc.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=$n();for(var i,o,u=-1,a=t.length;++u<a;)e.has(o=(i=t[u])+"")||e.set(o,r.push(i));return n},n.range=function(e){return arguments.length?(t=oc.call(e),n):t.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return ke().domain(r).range(t).unknown(i)},n}function Se(){function t(){var t=i().length,r=u[1]<u[0],h=u[r-0],f=u[1-r];n=(f-h)/Math.max(1,t-s+2*c),a&&(n=Math.floor(n)),h+=(f-h-n*(t-s))*l,e=n*(1-s),a&&(h=Math.round(h),e=Math.round(e));var p=Zi(t).map(function(t){return h+n*t});return o(r?p.reverse():p)}var n,e,r=ke().unknown(void 0),i=r.domain,o=r.range,u=[0,1],a=!1,s=0,c=0,l=.5;return delete r.unknown,r.domain=function(n){return arguments.length?(i(n),t()):i()},r.range=function(n){return arguments.length?(u=[+n[0],+n[1]],t()):u.slice()},r.rangeRound=function(n){return u=[+n[0],+n[1]],a=!0,t()},r.bandwidth=function(){return e},r.step=function(){return n},r.round=function(n){return arguments.length?(a=!!n,t()):a},r.padding=function(n){return arguments.length?(s=c=Math.max(0,Math.min(1,n)),t()):s},r.paddingInner=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),t()):s},r.paddingOuter=function(n){return arguments.length?(c=Math.max(0,Math.min(1,n)),t()):c},r.align=function(n){return arguments.length?(l=Math.max(0,Math.min(1,n)),t()):l},r.copy=function(){return Se().domain(i()).range(u).round(a).paddingInner(s).paddingOuter(c).align(l)},t()}function Ee(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:ac(n)}function Ue(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}function De(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}function Pe(t,n,e,r){var i=t[0],o=t[1],u=n[0],a=n[1];return o<i?(i=e(o,i),u=r(a,u)):(i=e(i,o),u=r(u,a)),function(t){return u(i(t))}}function Fe(t,n,e,r){var i=Math.min(t.length,n.length)-1,o=new Array(i),u=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<i;)o[a]=e(t[a],t[a+1]),u[a]=r(n[a],n[a+1]);return function(n){var e=Vi(t,n,1,i)-1;return u[e](o[e](n))}}function Le(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function He(t,n){function e(){return i=Math.min(a.length,s.length)>2?Fe:Pe,o=u=null,r}function r(n){return(o||(o=i(a,s,l?Ue(t):t,c)))(+n)}var i,o,u,a=cc,s=cc,c=$u,l=!1;return r.invert=function(t){return(u||(u=i(s,a,Ee,l?De(n):n)))(+t)},r.domain=function(t){return arguments.length?(a=ic.call(t,sc),e()):a.slice()},r.range=function(t){return arguments.length?(s=oc.call(t),e()):s.slice()},r.rangeRound=function(t){return s=oc.call(t),c=Xu,e()},r.clamp=function(t){return arguments.length?(l=!!t,e()):l},r.interpolate=function(t){return arguments.length?(c=t,e()):c},e()}function Oe(t){var n=t.domain;return t.ticks=function(t){var e=n();return Qi(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return lc(n(),t,e)},t.nice=function(e){var i=n(),o=i.length-1,u=null==e?10:e,a=i[0],s=i[o],c=r(a,s,u);return c&&(c=r(Math.floor(a/c)*c,Math.ceil(s/c)*c,u),i[0]=Math.floor(a/c)*c,i[o]=Math.ceil(s/c)*c,n(i)),t},t}function Ye(){var t=He(Ee,Yu);return t.copy=function(){return Le(t,Ye())},Oe(t)}function qe(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var u=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return u;do{u.push(new Date(+e))}while(n(e,o),t(e),e<r);return u},i.filter=function(e){return qe(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return hc.setTime(+n),fc.setTime(+r),t(hc),t(fc),Math.floor(e(hc,fc))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}function ze(t){return qe(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*dc)/_c})}function je(t){return qe(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/_c})}function Ie(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function $e(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xe(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Re(t){function n(t,n){return function(e){var r,i,o,u=[],a=-1,s=0,c=t.length;for(e instanceof Date||(e=new Date(+e));++a<c;)37===t.charCodeAt(a)&&(u.push(t.slice(s,a)),null!=(i=Sc[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),u.push(r),s=a+1);return u.push(t.slice(s,a)),u.join("")}}function e(t,n){return function(e){var i=Xe(1900);if(r(i,t,e+="",0)!=e.length)return null;if("p"in i&&(i.H=i.H%12+12*i.p),"W"in i||"U"in i){"w"in i||(i.w="W"in i?1:0);var o="Z"in i?$e(Xe(i.y)).getUTCDay():n(Xe(i.y)).getDay();i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7}return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,$e(i)):n(i)}}function r(t,n,e,r){for(var i,o,u=0,a=n.length,s=e.length;u<a;){if(r>=s)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=I[i in Sc?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=E.exec(n.slice(e));return r?(t.p=U[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=F.exec(n.slice(e));return r?(t.w=L[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=D.exec(n.slice(e));return r?(t.w=P[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=Y.exec(n.slice(e));return r?(t.m=q[r[0].toLowerCase()],e+r[0].length):-1}function s(t,n,e){var r=H.exec(n.slice(e));return r?(t.m=O[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){return r(t,M,n,e)}function l(t,n,e){return r(t,b,n,e)}function h(t,n,e){return r(t,A,n,e)}function f(t){return C[t.getDay()]}function p(t){return N[t.getDay()]}function d(t){return S[t.getMonth()]}function _(t){return k[t.getMonth()]}function g(t){return T[+(t.getHours()>=12)]}function v(t){return C[t.getUTCDay()]}function y(t){return N[t.getUTCDay()]}function m(t){return S[t.getUTCMonth()]}function w(t){return k[t.getUTCMonth()]}function x(t){return T[+(t.getUTCHours()>=12)]}var M=t.dateTime,b=t.date,A=t.time,T=t.periods,N=t.days,C=t.shortDays,k=t.months,S=t.shortMonths,E=Ze(T),U=We(T),D=Ze(N),P=We(N),F=Ze(C),L=We(C),H=Ze(k),O=We(k),Y=Ze(S),q=We(S),z={a:f,A:p,b:d,B:_,c:null,d:lr,e:lr,H:hr,I:fr,j:pr,L:dr,m:_r,M:gr,p:g,S:vr,U:yr,w:mr,W:wr,x:null,X:null,y:xr,Y:Mr,Z:br,"%":Yr},j={a:v,A:y,b:m,B:w,c:null,d:Ar,e:Ar,H:Tr,I:Nr,j:Cr,L:kr,m:Sr,M:Er,p:x,S:Ur,U:Dr,w:Pr,W:Fr,x:null,X:null,y:Lr,Y:Hr,Z:Or,"%":Yr},I={a:o,A:u,b:a,B:s,c:c,d:rr,e:rr,H:or,I:or,j:ir,L:sr,m:er,M:ur,p:i,S:ar,U:Ge,w:Je,W:Qe,x:l,X:h,y:tr,Y:Ke,Z:nr,"%":cr};return z.x=n(b,z),z.X=n(A,z),z.c=n(M,z),j.x=n(b,j),j.X=n(A,j),j.c=n(M,j),{format:function(t){var e=n(t+="",z);return e.toString=function(){return t},e},
parse:function(t){var n=e(t+="",Ie);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",j);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,$e);return n.toString=function(){return t},n}}}function Be(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function Ve(t){return t.replace(Dc,"\\$&")}function Ze(t){return new RegExp("^(?:"+t.map(Ve).join("|")+")","i")}function We(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function Je(t,n,e){var r=Ec.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Ge(t,n,e){var r=Ec.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function Qe(t,n,e){var r=Ec.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function Ke(t,n,e){var r=Ec.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function tr(t,n,e){var r=Ec.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function nr(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function er(t,n,e){var r=Ec.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function rr(t,n,e){var r=Ec.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function ir(t,n,e){var r=Ec.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function or(t,n,e){var r=Ec.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ur(t,n,e){var r=Ec.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ar(t,n,e){var r=Ec.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function sr(t,n,e){var r=Ec.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function cr(t,n,e){var r=Uc.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function lr(t,n){return Be(t.getDate(),n,2)}function hr(t,n){return Be(t.getHours(),n,2)}function fr(t,n){return Be(t.getHours()%12||12,n,2)}function pr(t,n){return Be(1+gc.count(mc(t),t),n,3)}function dr(t,n){return Be(t.getMilliseconds(),n,3)}function _r(t,n){return Be(t.getMonth()+1,n,2)}function gr(t,n){return Be(t.getMinutes(),n,2)}function vr(t,n){return Be(t.getSeconds(),n,2)}function yr(t,n){return Be(vc.count(mc(t),t),n,2)}function mr(t){return t.getDay()}function wr(t,n){return Be(yc.count(mc(t),t),n,2)}function xr(t,n){return Be(t.getFullYear()%100,n,2)}function Mr(t,n){return Be(t.getFullYear()%1e4,n,4)}function br(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Be(n/60|0,"0",2)+Be(n%60,"0",2)}function Ar(t,n){return Be(t.getUTCDate(),n,2)}function Tr(t,n){return Be(t.getUTCHours(),n,2)}function Nr(t,n){return Be(t.getUTCHours()%12||12,n,2)}function Cr(t,n){return Be(1+wc.count(bc(t),t),n,3)}function kr(t,n){return Be(t.getUTCMilliseconds(),n,3)}function Sr(t,n){return Be(t.getUTCMonth()+1,n,2)}function Er(t,n){return Be(t.getUTCMinutes(),n,2)}function Ur(t,n){return Be(t.getUTCSeconds(),n,2)}function Dr(t,n){return Be(xc.count(bc(t),t),n,2)}function Pr(t){return t.getUTCDay()}function Fr(t,n){return Be(Mc.count(bc(t),t),n,2)}function Lr(t,n){return Be(t.getUTCFullYear()%100,n,2)}function Hr(t,n){return Be(t.getUTCFullYear()%1e4,n,4)}function Or(){return"+0000"}function Yr(){return"%"}function qr(t){return t.toISOString()}function zr(t){var n=new Date(t);return isNaN(n)?null:n}function jr(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Fc&&n.documentElement.namespaceURI===Fc?n.createElement(t):n.createElementNS(e,t)}}function Ir(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function $r(t,n,e){return t=Xr(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Xr(t,n,e){return function(r){var i=$c;$c=r;try{t.call(this,this.__data__,n,e)}finally{$c=i}}}function Rr(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function Br(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function Vr(t,n,e){var r=Ic.hasOwnProperty(t.type)?$r:Xr;return function(i,o,u){var a,s=this.__on,c=r(n,o,u);if(s)for(var l=0,h=s.length;l<h;++l)if((a=s[l]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=c,a.capture=e),void(a.value=n);this.addEventListener(t.type,c,e),a={type:t.type,name:t.name,value:n,listener:c,capture:e},s?s.push(a):this.__on=[a]}}function Zr(){}function Wr(){return[]}function Jr(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function Gr(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;a<c;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new Jr(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function Qr(t,n,e,r,i,o,u){var a,s,c,l={},h=n.length,f=o.length,p=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(p[a]=c=Kc+u.call(s,s.__data__,a,n),c in l?i[a]=s:l[c]=s);for(a=0;a<f;++a)c=Kc+u.call(t,o[a],a,o),(s=l[c])?(r[a]=s,s.__data__=o[a],l[c]=null):e[a]=new Jr(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&l[p[a]]===s&&(i[a]=s)}function Kr(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function ti(t){return function(){this.removeAttribute(t)}}function ni(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ei(t,n){return function(){this.setAttribute(t,n)}}function ri(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ii(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function oi(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function ui(t){return function(){this.style.removeProperty(t)}}function ai(t,n,e){return function(){this.style.setProperty(t,n,e)}}function si(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function ci(t){return function(){delete this[t]}}function li(t,n){return function(){this[t]=n}}function hi(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function fi(t){return t.trim().split(/^|\s+/)}function pi(t){return t.classList||new di(t)}function di(t){this._node=t,this._names=fi(t.getAttribute("class")||"")}function _i(t,n){for(var e=pi(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function gi(t,n){for(var e=pi(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function vi(t){return function(){_i(this,t)}}function yi(t){return function(){gi(this,t)}}function mi(t,n){return function(){(n.apply(this,arguments)?_i:gi)(this,t)}}function wi(){this.textContent=""}function xi(t){return function(){this.textContent=t}}function Mi(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function bi(){this.innerHTML=""}function Ai(t){return function(){this.innerHTML=t}}function Ti(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ni(){this.nextSibling&&this.parentNode.appendChild(this)}function Ci(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ki(){return null}function Si(){var t=this.parentNode;t&&t.removeChild(this)}function Ei(t,n,e){var r=fl(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Ui(t,n){return function(){return Ei(this,t,n)}}function Di(t,n){return function(){return Ei(this,t,n.apply(this,arguments))}}function Pi(t,n){this._groups=t,this._parents=n}function Fi(){return new Pi([[document.documentElement]],Tl)}function Li(t){this._context=t}function Hi(t){return t[0]}function Oi(t){return t[1]}function Yi(t){return t<0?-1:1}function qi(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(Yi(o)+Yi(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function zi(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function ji(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function Ii(t){this._context=t}function $i(t){this._context=new Xi(t)}function Xi(t){this._context=t}var Ri=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},Bi=function(t){return 1===t.length&&(t=n(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}(Ri),Vi=Bi.right,Zi=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o},Wi=Math.sqrt(50),Ji=Math.sqrt(10),Gi=Math.sqrt(2),Qi=function(t,n,r){var i,o,u,a=n<t,s=-1;if(a&&(i=t,t=n,n=i),0===(u=e(t,n,r))||!isFinite(u))return[];if(u>0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++s<i;)o[s]=(t+s)*u;else for(t=Math.floor(t*u),n=Math.ceil(n*u),o=new Array(i=Math.ceil(t-n+1));++s<i;)o[s]=(t-s)/u;return a&&o.reverse(),o},Ki=Array.prototype.slice,to=function(t){return t},no=1,eo=2,ro=3,io=4,oo=1e-6,uo={value:function(){}};p.prototype=f.prototype={constructor:p,on:function(t,n){var e,r=this._,i=d(t+"",r),o=-1,u=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=g(r[e],t.name,n);else if(null==n)for(e in r)r[e]=g(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=_(r[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new p(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],o=0,e=r.length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var ao="http://www.w3.org/1999/xhtml",so={svg:"http://www.w3.org/2000/svg",xhtml:ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},co=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),so.hasOwnProperty(n)?{space:so[n],local:t}:t},lo=function(t){var n=co(t);return(n.local?y:v)(n)},ho=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var fo=document.documentElement;if(!fo.matches){var po=fo.webkitMatchesSelector||fo.msMatchesSelector||fo.mozMatchesSelector||fo.oMatchesSelector;ho=function(t){return function(){return po.call(this,t)}}}}var _o=ho,go={},vo=null;if("undefined"!=typeof document){"onmouseenter"in document.documentElement||(go={mouseenter:"mouseover",mouseleave:"mouseout"})}var yo=function(t,n,e){var r,i,o=x(t+""),u=o.length;{if(!(arguments.length<2)){for(a=n?b:M,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,c=0,l=a.length;c<l;++c)for(r=0,s=a[c];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value}},mo=function(t){return null==t?A:function(){return this.querySelector(t)}},wo=function(t){"function"!=typeof t&&(t=mo(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,c=r[i]=new Array(s),l=0;l<s;++l)(o=a[l])&&(u=t.call(o,o.__data__,l,a))&&("__data__"in o&&(u.__data__=o.__data__),c[l]=u);return new ct(r,this._parents)},xo=function(t){return null==t?T:function(){return this.querySelectorAll(t)}},Mo=function(t){"function"!=typeof t&&(t=xo(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new ct(r,i)},bo=function(t){"function"!=typeof t&&(t=_o(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],c=0;c<a;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&s.push(o);return new ct(r,this._parents)},Ao=function(t){return new Array(t.length)},To=function(){return new ct(this._enter||this._groups.map(Ao),this._parents)};N.prototype={constructor:N,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var No=function(t){return function(){return t}},Co="$",ko=function(t,n){if(!t)return p=new Array(this.size()),c=-1,this.each(function(t){p[++c]=t}),p;var e=n?k:C,r=this._parents,i=this._groups;"function"!=typeof t&&(t=No(t));for(var o=i.length,u=new Array(o),a=new Array(o),s=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=t.call(l,l&&l.__data__,c,r),d=p.length,_=a[c]=new Array(d),g=u[c]=new Array(d);e(l,h,_,g,s[c]=new Array(f),p,n);for(var v,y,m=0,w=0;m<d;++m)if(v=_[m]){for(m>=w&&(w=m+1);!(y=g[w])&&++w<d;);v._next=y||null}}return u=new ct(u,r),u._enter=a,u._exit=s,u},So=function(){return new ct(this._exit||this._groups.map(Ao),this._parents)},Eo=function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,c=n[a],l=e[a],h=c.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new ct(u,this._parents)},Uo=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},Do=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=S);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,c=i[o]=new Array(s),l=0;l<s;++l)(u=a[l])&&(c[l]=u);c.sort(n)}return new ct(i,this._parents).order()},Po=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},Fo=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},Lo=function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},Ho=function(){var t=0;return this.each(function(){++t}),t},Oo=function(){return!this.node()},Yo=function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},qo=function(t,n){var e=co(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?U:E:"function"==typeof n?e.local?L:F:e.local?P:D)(e,n))},zo=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},jo=function(t,n,e){var r;return arguments.length>1?this.each((null==n?H:"function"==typeof n?Y:O)(t,n,null==e?"":e)):zo(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},Io=function(t,n){return arguments.length>1?this.each((null==n?q:"function"==typeof n?j:z)(t,n)):this.node()[t]};X.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var $o=function(t,n){var e=I(t+"");if(arguments.length<2){for(var r=$(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?W:n?V:Z)(e,n))},Xo=function(t){return arguments.length?this.each(null==t?J:("function"==typeof t?Q:G)(t)):this.node().textContent},Ro=function(t){return arguments.length?this.each(null==t?K:("function"==typeof t?nt:tt)(t)):this.node().innerHTML},Bo=function(){return this.each(et)},Vo=function(){return this.each(rt)},Zo=function(t){var n="function"==typeof t?t:lo(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},Wo=function(t,n){var e="function"==typeof t?t:lo(t),r=null==n?it:"function"==typeof n?n:mo(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},Jo=function(){return this.each(ot)},Go=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},Qo=function(t,n){return this.each(("function"==typeof n?st:at)(t,n))},Ko=[null];ct.prototype=lt.prototype={constructor:ct,select:wo,selectAll:Mo,filter:bo,data:ko,enter:To,exit:So,merge:Eo,order:Uo,sort:Do,call:Po,nodes:Fo,node:Lo,size:Ho,empty:Oo,each:Yo,attr:qo,style:jo,property:Io,classed:$o,text:Xo,html:Ro,raise:Bo,lower:Vo,append:Zo,insert:Wo,remove:Jo,datum:Go,on:yo,dispatch:Qo};var tu=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},nu="\\s*([+-]?\\d+)\\s*",eu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ru="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iu=/^#([0-9a-f]{3})$/,ou=/^#([0-9a-f]{6})$/,uu=new RegExp("^rgb\\("+[nu,nu,nu]+"\\)$"),au=new RegExp("^rgb\\("+[ru,ru,ru]+"\\)$"),su=new RegExp("^rgba\\("+[nu,nu,nu,eu]+"\\)$"),cu=new RegExp("^rgba\\("+[ru,ru,ru,eu]+"\\)$"),lu=new RegExp("^hsl\\("+[eu,ru,ru]+"\\)$"),hu=new RegExp("^hsla\\("+[eu,ru,ru,eu]+"\\)$"),fu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,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};tu(ft,pt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),tu(yt,vt,ht(ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),tu(Mt,xt,ht(ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Mt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Mt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new yt(bt(t>=240?t-240:t+120,i,r),bt(t,i,r),bt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var pu=Math.PI/180,du=180/Math.PI,_u=.95047,gu=1,vu=1.08883,yu=4/29,mu=6/29,wu=3*mu*mu,xu=mu*mu*mu;tu(Nt,Tt,ht(ft,{brighter:function(t){return new Nt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Nt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=gu*kt(t),n=_u*kt(n),e=vu*kt(e),new yt(St(3.2404542*n-1.5371385*t-.4985314*e),St(-.969266*n+1.8760108*t+.041556*e),St(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),tu(Pt,Dt,ht(ft,{brighter:function(t){return new Pt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Pt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return At(this).rgb()}}));var Mu=-.14861,bu=1.78277,Au=-.29227,Tu=-.90649,Nu=1.97294,Cu=Nu*Tu,ku=Nu*bu,Su=bu*Au-Tu*Mu;tu(Ht,Lt,ht(ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ht(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ht(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*pu,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new yt(255*(n+e*(Mu*r+bu*i)),255*(n+e*(Au*r+Tu*i)),255*(n+e*(Nu*r)),this.opacity)}}));var Eu,Uu,Du,Pu,Fu=function(t){return function(){return t}},Lu=function t(n){function e(t,n){var e=r((t=vt(t)).r,(n=vt(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),u=jt(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}var r=zt(n);return e.gamma=t,e}(1),Hu=function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(r),u=new Array(r);for(e=0;e<i;++e)o[e]=$u(t[e],n[e]);for(;e<r;++e)u[e]=n[e];return function(t){for(e=0;e<i;++e)u[e]=o[e](t);return u}},Ou=function(t,n){var e=new Date;return t=+t,n-=t,function(r){return e.setTime(t+n*r),e}},Yu=function(t,n){return t=+t,n-=t,function(e){return t+n*e}},qu=function(t,n){var e,r={},i={};null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={});for(e in n)e in t?r[e]=$u(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},zu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ju=new RegExp(zu.source,"g"),Iu=function(t,n){var e,r,i,o=zu.lastIndex=ju.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=zu.exec(t))&&(r=ju.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:Yu(e,r)})),o=ju.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?$t(s[0].x):It(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})},$u=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?Fu(n):("number"===r?Yu:"string"===r?(e=pt(n))?(n=e,Lu):Iu:n instanceof pt?Lu:n instanceof Date?Ou:Array.isArray(n)?Hu:isNaN(n)?qu:Yu)(t,n)},Xu=function(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}},Ru=180/Math.PI,Bu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Vu=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Ru,skewX:Math.atan(s)*Ru,scaleX:u,scaleY:a}},Zu=Bt(Xt,"px, ","px)","deg)"),Wu=Bt(Rt,", ",")",")");Vt(qt);var Ju,Gu,Qu=Vt(jt),Ku=0,ta=0,na=0,ea=1e3,ra=0,ia=0,oa=0,ua="object"==typeof performance&&performance.now?performance:Date,aa="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};Jt.prototype=Gt.prototype={constructor:Jt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Zt():+e)+(null==n?0:+n),this._next||Gu===this||(Gu?Gu._next=this:Ju=this,Gu=this),this._call=t,this._time=e,en()},stop:function(){this._call&&(this._call=null,this._time=1/0,en())}};var sa=function(t,n,e){var r=new Jt;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},ca=f("start","end","interrupt"),la=[],ha=0,fa=1,pa=2,da=3,_a=4,ga=5,va=6,ya=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};an(t,e,{name:n,index:r,group:i,on:ca,tween:la,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ha})},ma=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>pa&&e.state<ga,e.state=va,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},wa=function(t){return this.each(function(){ma(this,t)})},xa=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=un(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?sn:cn)(e,t,n))},Ma=function(t,n){var e;return("number"==typeof n?Yu:n instanceof pt?Lu:(e=pt(n))?(n=e,Lu):Iu)(t,n)},ba=function(t,n){var e=co(t),r="transform"===e?Wu:Ma;return this.attrTween(t,"function"==typeof n?(e.local?gn:_n)(e,r,ln(this,"attr."+t,n)):null==n?(e.local?fn:hn)(e):(e.local?dn:pn)(e,r,n+""))},Aa=function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=co(t);return this.tween(e,(r.local?vn:yn)(r,n))},Ta=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?mn:wn)(n,t)):un(this.node(),n).delay},Na=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?xn:Mn)(n,t)):un(this.node(),n).duration},Ca=function(t){var n=this._id;return arguments.length?this.each(bn(n,t)):un(this.node(),n).ease},ka=function(t){"function"!=typeof t&&(t=_o(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],c=0;c<a;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&s.push(o);return new Fn(r,this._parents,this._name,this._id)},Sa=function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,c=n[a],l=e[a],h=c.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new Fn(u,this._parents,this._name,this._id)},Ea=function(t,n){var e=this._id;return arguments.length<2?un(this.node(),e).on.on(t):this.each(Tn(e,t,n))},Ua=function(){return this.on("end.remove",Nn(this._id))},Da=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=mo(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,s,c=r[u],l=c.length,h=o[u]=new Array(l),f=0;f<l;++f)(a=c[f])&&(s=t.call(a,a.__data__,f,c))&&("__data__"in a&&(s.__data__=a.__data__),h[f]=s,ya(h[f],n,e,f,h,un(a,e)));return new Fn(o,this._parents,n,e)},Pa=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=xo(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,c=r[a],l=c.length,h=0;h<l;++h)if(s=c[h]){for(var f,p=t.call(s,s.__data__,h,c),d=un(s,e),_=0,g=p.length;_<g;++_)(f=p[_])&&ya(f,n,e,_,p,d);o.push(p),u.push(s)}return new Fn(o,u,n,e)},Fa=lt.prototype.constructor,La=function(){return new Fa(this._groups,this._parents)},Ha=function(t,n,e){var r="transform"==(t+="")?Zu:Ma;return null==n?this.styleTween(t,Cn(t,r)).on("end.style."+t,kn(t)):this.styleTween(t,"function"==typeof n?En(t,r,ln(this,"style."+t,n)):Sn(t,r,n+""),e)},Oa=function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Un(t,n,null==e?"":e))},Ya=function(t){return this.tween("text","function"==typeof t?Pn(ln(this,"text",t)):Dn(null==t?"":t+""))},qa=function(){for(var t=this._name,n=this._id,e=Hn(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,c=0;c<s;++c)if(u=a[c]){var l=un(u,n);ya(u,t,e,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Fn(r,this._parents,t,e)},za=0,ja=lt.prototype;Fn.prototype=Ln.prototype={constructor:Fn,select:Da,selectAll:Pa,filter:ka,merge:Sa,selection:La,transition:qa,call:ja.call,nodes:ja.nodes,node:ja.node,size:ja.size,empty:ja.empty,each:ja.each,on:Ea,attr:ba,attrTween:Aa,style:Ha,styleTween:Oa,text:Ya,remove:Ua,tween:xa,delay:Ta,duration:Na,ease:Ca};var Ia=(function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),2*Math.PI),$a=(function t(n,e){function r(t){return n*Math.pow(2,10*--t)*Math.sin((i-t)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Ia);return r.amplitude=function(n){return t(n,e*Ia)},r.period=function(e){return t(n,e)},r}(1,.3),function t(n,e){function r(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Ia);return r.amplitude=function(n){return t(n,e*Ia)},r.period=function(e){return t(n,e)},r}(1,.3),function t(n,e){function r(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((i-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((i+t)/e))/2}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Ia);return r.amplitude=function(n){return t(n,e*Ia)},r.period=function(e){return t(n,e)},r}(1,.3),{time:null,delay:0,duration:250,ease:On}),Xa=function(t){var n,e;t instanceof Fn?(n=t._id,t=t._name):(n=Hn(),(e=$a).time=Zt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,c=0;c<s;++c)(u=a[c])&&ya(u,t,n,c,a,e||Yn(u,n));return new Fn(r,this._parents,t,n)};lt.prototype.interrupt=wa,lt.prototype.transition=Xa;var Ra=(["e","w"].map(qn),["n","s"].map(qn),["n","e","s","w","nw","ne","se","sw"].map(qn),Math.PI,Math.max,Math.PI),Ba=2*Ra,Va=Ba-1e-6;zn.prototype=jn.prototype={constructor:zn,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)
},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,u=this._y1,a=e-t,s=r-n,c=o-t,l=u-n,h=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(h>1e-6)if(Math.abs(l*a-s*c)>1e-6&&i){var f=e-o,p=r-u,d=a*a+s*s,_=f*f+p*p,g=Math.sqrt(d),v=Math.sqrt(h),y=i*Math.tan((Ra-Math.acos((d+h-_)/(2*g*v)))/2),m=y/v,w=y/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*c)+","+(n+m*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*p)+","+(this._x1=t+w*a)+","+(this._y1=n+w*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,e=+e;var u=e*Math.cos(r),a=e*Math.sin(r),s=t+u,c=n+a,l=1^o,h=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+s+","+c:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+s+","+c),e&&(h<0&&(h=h%Ba+Ba),h>Va?this._+="A"+e+","+e+",0,1,"+l+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+l+","+(this._x1=s)+","+(this._y1=c):h>1e-6&&(this._+="A"+e+","+e+",0,"+ +(h>=Ra)+","+l+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};In.prototype=$n.prototype={constructor:In,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var Za=$n.prototype;Xn.prototype=Rn.prototype={constructor:Xn,has:Za.has,add:function(t){return t+="",this["$"+t]=t,this},remove:Za.remove,clear:Za.clear,values:Za.keys,size:Za.size,empty:Za.empty,each:Za.each};var Wa=function(t){function n(t,n){var r,i,o=e(t,function(t,e){if(r)return r(t,e-1);i=t,r=n?Vn(t,n):Bn(t)});return o.columns=i,o}function e(t,n){function e(){if(l>=c)return u;if(i)return i=!1,o;var n,e=l;if(34===t.charCodeAt(e)){for(var r=e;r++<c;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return l=r+2,n=t.charCodeAt(r+1),13===n?(i=!0,10===t.charCodeAt(r+2)&&++l):10===n&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;l<c;){var a=1;if(10===(n=t.charCodeAt(l++)))i=!0;else if(13===n)i=!0,10===t.charCodeAt(l)&&(++l,++a);else if(n!==s)continue;return t.slice(e,l-a)}return t.slice(e)}for(var r,i,o={},u={},a=[],c=t.length,l=0,h=0;(r=e())!==u;){for(var f=[];r!==o&&r!==u;)f.push(r),r=e();n&&null==(f=n(f,h++))||a.push(f)}return a}function r(n,e){return null==e&&(e=Zn(n)),[e.map(u).join(t)].concat(n.map(function(n){return e.map(function(t){return u(n[t])}).join(t)})).join("\n")}function i(t){return t.map(o).join("\n")}function o(n){return n.map(u).join(t)}function u(t){return null==t?"":a.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),s=t.charCodeAt(0);return{parse:n,parseRows:e,format:r,formatRows:i}},Ja=Wa(","),Ga=Ja.parse,Qa=Wa("\t"),Ka=Qa.parse,ts=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Wn(this.cover(n,e),n,e,t)},ns=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{if(!(e>t||t>i||r>n||n>o))return this;var u,a,s=i-e,c=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{u=new Array(4),u[a]=c,c=u}while(s*=2,i=e+s,o=r+s,t>i||n>o);break;case 1:do{u=new Array(4),u[a]=c,c=u}while(s*=2,e=i-s,o=r+s,e>t||n>o);break;case 2:do{u=new Array(4),u[a]=c,c=u}while(s*=2,i=e+s,r=o-s,t>i||r>n);break;case 3:do{u=new Array(4),u[a]=c,c=u}while(s*=2,e=i-s,r=o-s,e>t||r>n)}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},es=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},rs=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},is=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i},os=function(t,n,e){var r,i,o,u,a,s,c,l=this._x0,h=this._y0,f=this._x1,p=this._y1,d=[],_=this._root;for(_&&d.push(new is(_,l,h,f,p)),null==e?e=1/0:(l=t-e,h=n-e,f=t+e,p=n+e,e*=e);s=d.pop();)if(!(!(_=s.node)||(i=s.x0)>f||(o=s.y0)>p||(u=s.x1)<l||(a=s.y1)<h))if(_.length){var g=(i+u)/2,v=(o+a)/2;d.push(new is(_[3],g,v,u,a),new is(_[2],i,v,g,a),new is(_[1],g,o,u,v),new is(_[0],i,o,g,v)),(c=(n>=v)<<1|t>=g)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=s)}else{var y=t-+this._x.call(null,_.data),m=n-+this._y.call(null,_.data),w=y*y+m*m;if(w<e){var x=Math.sqrt(e=w);l=t-x,h=n-x,f=t+x,p=n+x,r=_.data}}return r},us=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,i,o,u,a,s,c,l,h,f,p=this._root,d=this._x0,_=this._y0,g=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(a=(d+g)/2))?d=a:g=a,(l=u>=(s=(_+v)/2))?_=s:v=s,n=p,!(p=p[h=l<<1|c]))return this;if(!p.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,f=h)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[h]=i:delete n[h],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[f]=p:this._root=p),this):(this._root=i,this)},as=function(){return this._root},ss=function(){var t=0;return this.visit(function(n){if(!n.length)do{++t}while(n=n.next)}),t},cs=function(t){var n,e,r,i,o,u,a=[],s=this._root;for(s&&a.push(new is(s,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(s=n.node,r=n.x0,i=n.y0,o=n.x1,u=n.y1)&&s.length){var c=(r+o)/2,l=(i+u)/2;(e=s[3])&&a.push(new is(e,c,l,o,u)),(e=s[2])&&a.push(new is(e,r,l,c,u)),(e=s[1])&&a.push(new is(e,c,i,o,l)),(e=s[0])&&a.push(new is(e,r,i,c,l))}return this},ls=function(t){var n,e=[],r=[];for(this._root&&e.push(new is(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,u=n.x0,a=n.y0,s=n.x1,c=n.y1,l=(u+s)/2,h=(a+c)/2;(o=i[0])&&e.push(new is(o,u,a,l,h)),(o=i[1])&&e.push(new is(o,l,a,s,h)),(o=i[2])&&e.push(new is(o,u,h,l,c)),(o=i[3])&&e.push(new is(o,l,h,s,c))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},hs=function(t){return arguments.length?(this._x=t,this):this._x},fs=function(t){return arguments.length?(this._y=t,this):this._y},ps=te.prototype=ne.prototype;ps.copy=function(){var t,n,e=new ne(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=ee(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=ee(n));return e},ps.add=ts,ps.addAll=Jn,ps.cover=ns,ps.data=es,ps.extent=rs,ps.find=os,ps.remove=us,ps.removeAll=Gn,ps.root=as,ps.size=ss,ps.visit=cs,ps.visitAfter=ls,ps.x=hs,ps.y=fs;var ds,_s=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},gs=function(t){return t=_s(Math.abs(t)),t?t[1]:NaN},vs=function(t,n){return function(e,r){for(var i=e.length,o=[],u=0,a=t[0],s=0;i>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),o.push(e.substring(i-=a,i+a)),!((s+=a+1)>r));)a=t[u=(u+1)%t.length];return o.reverse().join(n)}},ys=function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}},ms=function(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},ws=function(t,n){var e=_s(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(ds=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+_s(t,Math.max(0,n+o-1))[0]},xs=function(t,n){var e=_s(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Ms={"":ms,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return xs(100*t,n)},r:xs,s:ws,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},bs=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;re.prototype=ie.prototype,ie.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var As,Ts,Ns,Cs=function(t){return t},ks=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ss=function(t){function n(t){function n(t){var n,i,a,l=g,w=v;if("c"===_)w=y(t)+w,t="";else{t=+t;var x=t<0;if(t=y(Math.abs(t),d),x&&0==+t&&(x=!1),l=(x?"("===c?c:"-":"-"===c||"("===c?"":c)+l,w=w+("s"===_?ks[8+ds/3]:"")+(x&&"("===c?")":""),m)for(n=-1,i=t.length;++n<i;)if(48>(a=t.charCodeAt(n))||a>57){w=(46===a?o+t.slice(n+1):t.slice(n))+w,t=t.slice(0,n);break}}p&&!h&&(t=r(t,1/0));var M=l.length+t.length+w.length,b=M<f?new Array(f-M+1).join(e):"";switch(p&&h&&(t=r(b+t,b.length?f-w.length:1/0),b=""),s){case"<":t=l+t+w+b;break;case"=":t=l+b+t+w;break;case"^":t=b.slice(0,M=b.length>>1)+l+t+w+b.slice(M);break;default:t=b+l+t+w}return u(t)}t=re(t);var e=t.fill,s=t.align,c=t.sign,l=t.symbol,h=t.zero,f=t.width,p=t.comma,d=t.precision,_=t.type,g="$"===l?i[0]:"#"===l&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",v="$"===l?i[1]:/[%p]/.test(_)?a:"",y=Ms[_],m=!_||/[defgprs%]/.test(_);return d=null==d?_?6:12:/[gprs]/.test(_)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=re(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(gs(e)/3))),o=Math.pow(10,-i),u=ks[8+i/3];return function(t){return r(o*t)+u}}var r=t.grouping&&t.thousands?vs(t.grouping,t.thousands):Cs,i=t.currency,o=t.decimal,u=t.numerals?ys(t.numerals):Cs,a=t.percent||"%";return{format:n,formatPrefix:e}};!function(t){As=Ss(t),Ts=As.format,Ns=As.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Es=function(t){return Math.max(0,-gs(Math.abs(t)))},Us=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(gs(n)/3)))-gs(Math.abs(t)))},Ds=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,gs(n)-gs(t))+1},Ps=function(){return new oe};oe.prototype={constructor:oe,reset:function(){this.s=this.t=0},add:function(t){ue(Fs,t,this.t),ue(this,Fs.s,this.s),this.s?this.t+=Fs.t:this.s=Fs.t},valueOf:function(){return this.s}};var Fs=new oe,Ls=Math.PI,Hs=Ls/2,Os=Ls/180,Ys=(Math.abs,Math.atan,Math.atan2),qs=Math.cos,zs=Math.sin,js=Math.sqrt;Ps(),Ps(),Ps(),Ps(),Ps(),Ps(),Ps(),Ps();qs(30*Os);ce(function(t){return js(2/(1+t))}).invert=le(function(t){return 2*se(t/2)}),ce(function(t){return(t=ae(t))&&t/zs(t)}).invert=le(function(t){return t});var Is=function(){return this.eachAfter(he)},$s=function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)u.push(e[r])}while(u.length);return this},Xs=function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},Rs=function(t){for(var n,e,r,i=this,o=[i],u=[];i=o.pop();)if(u.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=u.pop();)t(i);return this},Bs=function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},Vs=function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},Zs=function(t){for(var n=this,e=fe(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},Ws=function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},Js=function(){var t=[];return this.each(function(n){t.push(n)}),t},Gs=function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},Qs=function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n};ye.prototype=pe.prototype={constructor:ye,count:Is,each:$s,eachAfter:Rs,eachBefore:Xs,sum:Bs,sort:Vs,path:Zs,ancestors:Ws,descendants:Js,leaves:Gs,links:Qs,copy:de};me.prototype=Object.create(ye.prototype);var Ks={},tc=function(t,n){function e(t){var n,e=c.status;if(!e&&Ne(c)||e>=200&&e<300||304===e){if(o)try{n=o.call(r,c)}catch(t){return void a.call("error",r,t)}else n=c;a.call("load",r,n)}else a.call("error",r,t)}var r,i,o,u,a=f("beforesend","progress","load","error"),s=$n(),c=new XMLHttpRequest,l=null,h=null,p=0;if("undefined"==typeof XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=e:c.onreadystatechange=function(t){c.readyState>3&&e(t)},c.onprogress=function(t){a.call("progress",r,t)},r={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==n?s.remove(t):s.set(t,n+""),r)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",r):i},responseType:function(t){return arguments.length?(u=t,r):u},timeout:function(t){return arguments.length?(p=+t,r):p},user:function(t){return arguments.length<1?l:(l=null==t?null:t+"",r)},password:function(t){return arguments.length<1?h:(h=null==t?null:t+"",r)},response:function(t){return o=t,r},get:function(t,n){return r.send("GET",t,n)},post:function(t,n){return r.send("POST",t,n)},send:function(n,e,o){return c.open(n,t,!0,l,h),null==i||s.has("accept")||s.set("accept",i+",*/*"),c.setRequestHeader&&s.each(function(t,n){c.setRequestHeader(n,t)}),null!=i&&c.overrideMimeType&&c.overrideMimeType(i),null!=u&&(c.responseType=u),p>0&&(c.timeout=p),null==o&&"function"==typeof e&&(o=e,e=null),null!=o&&1===o.length&&(o=Te(o)),null!=o&&r.on("error",o).on("load",function(t){o(null,t)}),a.call("beforesend",r,c),c.send(null==e?null:e),r},abort:function(){return c.abort(),r},on:function(){var t=a.on.apply(a,arguments);return t===a?r:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return r.get(n)}return r},nc=function(t,n){return function(e,r){var i=tc(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}};nc("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),nc("application/json",function(t){return JSON.parse(t.responseText)}),nc("text/plain",function(t){return t.responseText}),nc("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});var ec=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=tc(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(Ce(n,r=t)):r},o.row(r),i?o.get(i):o}};ec("text/csv",Ga),ec("text/tab-separated-values",Ka);var rc=Array.prototype,ic=rc.map,oc=rc.slice,uc={name:"implicit"},ac=function(t){return function(){return t}},sc=function(t){return+t},cc=[0,1],lc=function(t,n,e){var i,o=t[0],u=t[t.length-1],a=r(o,u,null==n?10:n);switch(e=re(null==e?",f":e),e.type){case"s":var s=Math.max(Math.abs(o),Math.abs(u));return null!=e.precision||isNaN(i=Us(a,s))||(e.precision=i),Ns(e,s);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=Ds(a,Math.max(Math.abs(o),Math.abs(u))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Es(a))||(e.precision=i-2*("%"===e.type))}return Ts(e)},hc=new Date,fc=new Date,pc=qe(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});pc.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qe(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):pc:null};var dc=6e4,_c=6048e5,gc=(qe(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),qe(function(t){t.setTime(Math.floor(t/dc)*dc)},function(t,n){t.setTime(+t+n*dc)},function(t,n){return(n-t)/dc},function(t){return t.getMinutes()}),qe(function(t){var n=t.getTimezoneOffset()*dc%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),qe(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*dc)/864e5},function(t){return t.getDate()-1})),vc=ze(0),yc=ze(1),mc=(ze(2),ze(3),ze(4),ze(5),ze(6),qe(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),qe(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()}));mc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qe(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var wc=(qe(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*dc)},function(t,n){return(n-t)/dc},function(t){return t.getUTCMinutes()}),qe(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),qe(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1})),xc=je(0),Mc=je(1),bc=(je(2),je(3),je(4),je(5),je(6),qe(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),qe(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()}));bc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qe(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var Ac,Tc,Nc,Cc,kc,Sc={"-":"",_:" ",0:"0"},Ec=/^\s*\d+/,Uc=/^%/,Dc=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;!function(t){Ac=Re(t),Tc=Ac.format,Nc=Ac.parse,Cc=Ac.utcFormat,kc=Ac.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Pc=(Date.prototype.toISOString||Cc("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||kc("%Y-%m-%dT%H:%M:%S.%LZ"),function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})});Pc("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Pc("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Pc("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Pc("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Qu(Lt(300,.5,0),Lt(-240,.5,1));var Fc=(Qu(Lt(-100,.75,.35),Lt(80,1.5,.8)),Qu(Lt(260,.75,.35),Lt(80,1.5,.8)),Lt(),"http://www.w3.org/1999/xhtml"),Lc={svg:"http://www.w3.org/2000/svg",xhtml:Fc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Hc=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Lc.hasOwnProperty(n)?{space:Lc[n],local:t}:t},Oc=function(t){var n=Hc(t);return(n.local?Ir:jr)(n)},Yc=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var qc=document.documentElement;if(!qc.matches){var zc=qc.webkitMatchesSelector||qc.msMatchesSelector||qc.mozMatchesSelector||qc.oMatchesSelector;Yc=function(t){return function(){return zc.call(this,t)}}}}var jc=Yc,Ic={},$c=null;if("undefined"!=typeof document){"onmouseenter"in document.documentElement||(Ic={mouseenter:"mouseover",mouseleave:"mouseout"})}var Xc=function(t,n,e){var r,i,o=Rr(t+""),u=o.length;{if(!(arguments.length<2)){for(a=n?Vr:Br,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,c=0,l=a.length;c<l;++c)for(r=0,s=a[c];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value}},Rc=function(t){return null==t?Zr:function(){return this.querySelector(t)}},Bc=function(t){"function"!=typeof t&&(t=Rc(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,c=r[i]=new Array(s),l=0;l<s;++l)(o=a[l])&&(u=t.call(o,o.__data__,l,a))&&("__data__"in o&&(u.__data__=o.__data__),c[l]=u);return new Pi(r,this._parents)},Vc=function(t){return null==t?Wr:function(){return this.querySelectorAll(t)}},Zc=function(t){"function"!=typeof t&&(t=Vc(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Pi(r,i)},Wc=function(t){"function"!=typeof t&&(t=jc(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],c=0;c<a;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&s.push(o);return new Pi(r,this._parents)},Jc=function(t){return new Array(t.length)},Gc=function(){return new Pi(this._enter||this._groups.map(Jc),this._parents)};Jr.prototype={constructor:Jr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Qc=function(t){return function(){return t}},Kc="$",tl=function(t,n){if(!t)return p=new Array(this.size()),c=-1,this.each(function(t){p[++c]=t}),p;var e=n?Qr:Gr,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Qc(t));for(var o=i.length,u=new Array(o),a=new Array(o),s=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=t.call(l,l&&l.__data__,c,r),d=p.length,_=a[c]=new Array(d),g=u[c]=new Array(d);e(l,h,_,g,s[c]=new Array(f),p,n);for(var v,y,m=0,w=0;m<d;++m)if(v=_[m]){for(m>=w&&(w=m+1);!(y=g[w])&&++w<d;);v._next=y||null}}return u=new Pi(u,r),u._enter=a,u._exit=s,u},nl=function(){return new Pi(this._exit||this._groups.map(Jc),this._parents)},el=function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,c=n[a],l=e[a],h=c.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new Pi(u,this._parents)},rl=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},il=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Kr);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,c=i[o]=new Array(s),l=0;l<s;++l)(u=a[l])&&(c[l]=u);c.sort(n)}return new Pi(i,this._parents).order()},ol=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},ul=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},al=function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},sl=function(){var t=0;return this.each(function(){++t}),t},cl=function(){return!this.node()},ll=function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},hl=function(t,n){var e=Hc(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?ni:ti:"function"==typeof n?e.local?oi:ii:e.local?ri:ei)(e,n))},fl=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},pl=function(t,n,e){var r;return arguments.length>1?this.each((null==n?ui:"function"==typeof n?si:ai)(t,n,null==e?"":e)):fl(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},dl=function(t,n){return arguments.length>1?this.each((null==n?ci:"function"==typeof n?hi:li)(t,n)):this.node()[t]};di.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var _l=function(t,n){var e=fi(t+"");if(arguments.length<2){for(var r=pi(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?mi:n?vi:yi)(e,n))},gl=function(t){return arguments.length?this.each(null==t?wi:("function"==typeof t?Mi:xi)(t)):this.node().textContent},vl=function(t){return arguments.length?this.each(null==t?bi:("function"==typeof t?Ti:Ai)(t)):this.node().innerHTML},yl=function(){return this.each(Ni)},ml=function(){return this.each(Ci)},wl=function(t){var n="function"==typeof t?t:Oc(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},xl=function(t,n){var e="function"==typeof t?t:Oc(t),r=null==n?ki:"function"==typeof n?n:Rc(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},Ml=function(){return this.each(Si)},bl=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},Al=function(t,n){return this.each(("function"==typeof n?Di:Ui)(t,n))},Tl=[null];Pi.prototype=Fi.prototype={constructor:Pi,select:Bc,selectAll:Zc,filter:Wc,data:tl,enter:Gc,exit:nl,merge:el,order:rl,sort:il,call:ol,nodes:ul,node:al,size:sl,empty:cl,each:ll,attr:hl,style:pl,property:dl,classed:_l,text:gl,html:vl,raise:yl,lower:ml,append:wl,insert:xl,remove:Ml,datum:bl,on:Xc,dispatch:Al};var Nl=function(t){return"string"==typeof t?new Pi([[document.querySelector(t)]],[document.documentElement]):new Pi([[t]],Tl)},Cl=function(t){return function(){return t}};Li.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var kl=function(t){return new Li(t)},Sl=function(){function t(t){var a,s,c,l=t.length,h=!1;for(null==i&&(u=o(c=jn())),a=0;a<=l;++a)!(a<l&&r(s=t[a],a,t))===h&&((h=!h)?u.lineStart():u.lineEnd()),h&&u.point(+n(s,a,t),+e(s,a,t));if(c)return u=null,c+""||null}var n=Hi,e=Oi,r=Cl(!0),i=null,o=kl,u=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:Cl(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:Cl(+n),t):e},t.defined=function(n){return arguments.length?(r="function"==typeof n?n:Cl(!!n),t):r},t.curve=function(n){return arguments.length?(o=n,null!=i&&(u=o(i)),t):o},t.context=function(n){return arguments.length?(null==n?i=u=null:u=o(i=n),t):i},t};Ii.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ji(this,this._t0,zi(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,ji(this,zi(this,e=qi(this,t,n)),e);break;default:ji(this,this._t0,e=qi(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},($i.prototype=Object.create(Ii.prototype)).point=function(t,n){Ii.prototype.point.call(this,n,t)},Xi.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}};t.axisBottom=l,t.axisLeft=h,t.axisTop=c,t.formatLocale=Ss,t.line=Sl,t.scaleBand=Se,t.scaleLinear=Ye,t.scaleOrdinal=ke,t.select=Nl,Object.defineProperty(t,"__esModule",{value:!0})});