UNPKG

85.8 kBJavaScriptView Raw
1!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 Er(t(n),e)}}function e(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Zr?i*=10:a>=Wr?i*=5:a>=Jr&&(i*=2),n<t?-i:i}function r(t){return t.length}function i(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function a(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function u(t){var n=t.bandwidth()/2;return t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function o(){return!this.__axis}function c(t,n){function e(e){var d,p=null==c?n.ticks?n.ticks.apply(n,r):n.domain():c,g=null==f?n.tickFormat?n.tickFormat.apply(n,r):bi:f,b=Math.max(l,0)+h,v=t===vi||t===yi?i:a,m=n.range(),y=m[0]+.5,w=m[m.length-1]+.5,_=(n.bandwidth?u:bi)(n.copy()),M=e.selection?e.selection():e,x=M.selectAll(".domain").data([null]),A=M.selectAll(".tick").data(p,n).order(),k=A.exit(),N=A.enter().append("g").attr("class","tick"),T=A.select("line"),C=A.select("text"),S=t===vi||t===wi?-1:1,D=t===wi||t===mi?(d="x","y"):(d="y","x");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),A=A.merge(N),T=T.merge(N.append("line").attr("stroke","#000").attr(d+"2",S*l).attr(D+"1",.5).attr(D+"2",.5)),C=C.merge(N.append("text").attr("fill","#000").attr(d,S*b).attr(D,.5).attr("dy",t===vi?"0em":t===yi?"0.71em":"0.32em")),e!==M&&(x=x.transition(e),A=A.transition(e),T=T.transition(e),C=C.transition(e),k=k.transition(e).attr("opacity",_i).attr("transform",function(t){return v(_,this.parentNode.__axis||_,t)}),N.attr("opacity",_i).attr("transform",function(t){return v(this.parentNode.__axis||_,_,t)})),k.remove(),x.attr("d",t===wi||t==mi?"M"+S*s+","+y+"H0.5V"+w+"H"+S*s:"M"+y+","+S*s+"V0.5H"+w+"V"+S*s),A.attr("opacity",1).attr("transform",function(t){return v(_,_,t)}),T.attr(d+"2",S*l),C.attr(d,S*b).text(g),M.filter(o).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===mi?"start":t===wi?"end":"middle"),M.each(function(){this.__axis=_})}var r=[],c=null,f=null,l=6,s=6,h=3;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return r=gi.call(arguments),e},e.tickArguments=function(t){return arguments.length?(r=null==t?[]:gi.call(t),e):r.slice()},e.tickValues=function(t){return arguments.length?(c=null==t?null:gi.call(t),e):c&&c.slice()},e.tickFormat=function(t){return arguments.length?(f=t,e):f},e.tickSize=function(t){return arguments.length?(l=s=+t,e):l},e.tickSizeInner=function(t){return arguments.length?(l=+t,e):l},e.tickSizeOuter=function(t){return arguments.length?(s=+t,e):s},e.tickPadding=function(t){return arguments.length?(h=+t,e):h},e}function f(t){return c(vi,t)}function l(t){return c(mi,t)}function s(t){return c(yi,t)}function h(t){return c(wi,t)}function d(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Mi&&n.documentElement.namespaceURI===Mi?n.createElement(t):n.createElementNS(e,t)}}function p(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function g(){return new b}function b(){this._="@"+(++Ni).toString(36)}function v(t,n,e){return t=m(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function m(n,e,r){return function(i){var a=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=a}}}function y(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 w(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,a=n.length;r<a;++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 _(t,n,e){var r=Ui.hasOwnProperty(t.type)?v:m;return function(i,a,u){var o,c=this.__on,f=r(n,a,u);if(c)for(var l=0,s=c.length;l<s;++l)if((o=c[l]).type===t.type&&o.name===t.name)return this.removeEventListener(o.type,o.listener,o.capture),this.addEventListener(o.type,o.listener=f,o.capture=e),void(o.value=n);this.addEventListener(t.type,f,e),o={type:t.type,name:t.name,value:n,listener:f,capture:e},c?c.push(o):this.__on=[o]}}function M(n,e,r,i){var a=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=a}}function x(){}function A(){return[]}function k(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function N(t,n,e,r,i,a){for(var u,o=0,c=n.length,f=a.length;o<f;++o)(u=n[o])?(u.__data__=a[o],r[o]=u):e[o]=new k(t,a[o]);for(;o<c;++o)(u=n[o])&&(i[o]=u)}function T(t,n,e,r,i,a,u){var o,c,f,l={},s=n.length,h=a.length,d=new Array(s);for(o=0;o<s;++o)(c=n[o])&&(d[o]=f=Ri+u.call(c,c.__data__,o,n),f in l?i[o]=c:l[f]=c);for(o=0;o<h;++o)f=Ri+u.call(t,a[o],o,a),(c=l[f])?(r[o]=c,c.__data__=a[o],l[f]=null):e[o]=new k(t,a[o]);for(o=0;o<s;++o)(c=n[o])&&l[d[o]]===c&&(i[o]=c)}function C(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function S(t){return function(){this.removeAttribute(t)}}function D(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U(t,n){return function(){this.setAttribute(t,n)}}function E(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 Y(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 P(t){return function(){this.style.removeProperty(t)}}function H(t,n,e){return function(){this.style.setProperty(t,n,e)}}function L(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function O(t){return function(){delete this[t]}}function I(t,n){return function(){this[t]=n}}function q(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function z(t){return t.trim().split(/^|\s+/)}function X(t){return t.classList||new j(t)}function j(t){this._node=t,this._names=z(t.getAttribute("class")||"")}function V(t,n){for(var e=X(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function R(t,n){for(var e=X(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function $(t){return function(){V(this,t)}}function B(t){return function(){R(this,t)}}function Z(t,n){return function(){(n.apply(this,arguments)?V:R)(this,t)}}function W(){this.textContent=""}function J(t){return function(){this.textContent=t}}function G(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Q(){this.innerHTML=""}function K(t){return function(){this.innerHTML=t}}function tt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function nt(){this.nextSibling&&this.parentNode.appendChild(this)}function et(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rt(){return null}function it(){var t=this.parentNode;t&&t.removeChild(this)}function at(t,n,e){var r=ia(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 ut(t,n){return function(){return at(this,t,n)}}function ot(t,n){return function(){return at(this,t,n.apply(this,arguments))}}function ct(t,n){this._groups=t,this._parents=n}function ft(){return new ct([[document.documentElement]],va)}function lt(){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 st(r)}function st(t){this._=t}function ht(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 dt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function pt(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Ma,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function gt(){return Da||(Fa(bt),Da=Ea.now()+Ua)}function bt(){Da=0}function vt(){this._call=this._time=this._next=null}function mt(t,n,e){var r=new vt;return r.restart(t,n,e),r}function yt(){gt(),++ka;for(var t,n=xa;n;)(t=Da-n._time)>=0&&n._call.call(null,t),n=n._next;--ka}function wt(){Da=(Sa=Ea.now())+Ua,ka=Na=0;try{yt()}finally{ka=0,Mt(),Da=0}}function _t(){var t=Ea.now(),n=t-Sa;n>Ca&&(Ua-=n,Sa=t)}function Mt(){for(var t,n,e=xa,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:xa=n);Aa=t,xt(r)}function xt(t){if(!ka){Na&&(Na=clearTimeout(Na));var n=t-Da;n>24?(t<1/0&&(Na=setTimeout(wt,n)),Ta&&(Ta=clearInterval(Ta))):(Ta||(Ta=setInterval(_t,Ca)),ka=1,Fa(wt))}}function At(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Oa)throw new Error("too late");return e}function kt(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>qa)throw new Error("too late");return e}function Nt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function Tt(t,n,e){function r(t){e.state=Ia,e.timer.restart(i,e.delay,e.time),e.delay<=t&&i(t-e.delay)}function i(r){var f,l,s,h;if(e.state!==Ia)return u();for(f in c)if(h=c[f],h.name===e.name){if(h.state===za)return Ya(i);h.state===Xa?(h.state=Va,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete c[f]):+f<n&&(h.state=Va,h.timer.stop(),delete c[f])}if(Ya(function(){e.state===za&&(e.state=Xa,e.timer.restart(a,e.delay,e.time),a(r))}),e.state=qa,e.on.call("start",t,t.__data__,e.index,e.group),e.state===qa){for(e.state=za,o=new Array(s=e.tween.length),f=0,l=-1;f<s;++f)(h=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(o[++l]=h);o.length=l+1}}function a(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=ja,1),i=-1,a=o.length;++i<a;)o[i].call(null,r);e.state===ja&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){e.state=Va,e.timer.stop(),delete c[n];for(var r in c)return;delete t.__transition}var o,c=t.__transition;c[n]=e,e.timer=mt(r,0,e.time)}function Ct(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function St(){}function Dt(t){var n;return t=(t+"").trim().toLowerCase(),(n=tu.exec(t))?(n=parseInt(n[1],16),new Pt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=nu.exec(t))?Ut(parseInt(n[1],16)):(n=eu.exec(t))?new Pt(n[1],n[2],n[3],1):(n=ru.exec(t))?new Pt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=iu.exec(t))?Et(n[1],n[2],n[3],n[4]):(n=au.exec(t))?Et(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=uu.exec(t))?Ht(n[1],n[2]/100,n[3]/100,1):(n=ou.exec(t))?Ht(n[1],n[2]/100,n[3]/100,n[4]):cu.hasOwnProperty(t)?Ut(cu[t]):"transparent"===t?new Pt(NaN,NaN,NaN,0):null}function Ut(t){return new Pt(t>>16&255,t>>8&255,255&t,1)}function Et(t,n,e,r){return r<=0&&(t=n=e=NaN),new Pt(t,n,e,r)}function Ft(t){return t instanceof St||(t=Dt(t)),t?(t=t.rgb(),new Pt(t.r,t.g,t.b,t.opacity)):new Pt}function Yt(t,n,e,r){return 1===arguments.length?Ft(t):new Pt(t,n,e,null==r?1:r)}function Pt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ht(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new It(t,n,e,r)}function Lt(t){if(t instanceof It)return new It(t.h,t.s,t.l,t.opacity);if(t instanceof St||(t=Dt(t)),!t)return new It;if(t instanceof It)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),u=NaN,o=a-i,c=(a+i)/2;return o?(u=n===a?(e-r)/o+6*(e<r):e===a?(r-n)/o+2:(n-e)/o+4,o/=c<.5?a+i:2-a-i,u*=60):o=c>0&&c<1?0:u,new It(u,o,c,t.opacity)}function Ot(t,n,e,r){return 1===arguments.length?Lt(t):new It(t,n,e,null==r?1:r)}function It(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qt(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 zt(t){if(t instanceof jt)return new jt(t.l,t.a,t.b,t.opacity);if(t instanceof Jt){var n=t.h*fu;return new jt(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Pt||(t=Ft(t));var e=Bt(t.r),r=Bt(t.g),i=Bt(t.b),a=Vt((.4124564*e+.3575761*r+.1804375*i)/hu),u=Vt((.2126729*e+.7151522*r+.072175*i)/du),o=Vt((.0193339*e+.119192*r+.9503041*i)/pu);return new jt(116*u-16,500*(a-u),200*(u-o),t.opacity)}function Xt(t,n,e,r){return 1===arguments.length?zt(t):new jt(t,n,e,null==r?1:r)}function jt(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Vt(t){return t>mu?Math.pow(t,1/3):t/vu+gu}function Rt(t){return t>bu?t*t*t:vu*(t-gu)}function $t(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Bt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Zt(t){if(t instanceof Jt)return new Jt(t.h,t.c,t.l,t.opacity);t instanceof jt||(t=zt(t));var n=Math.atan2(t.b,t.a)*lu;return new Jt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Wt(t,n,e,r){return 1===arguments.length?Zt(t):new Jt(t,n,e,null==r?1:r)}function Jt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Gt(t){if(t instanceof Kt)return new Kt(t.h,t.s,t.l,t.opacity);t instanceof Pt||(t=Ft(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Nu*r+Au*n-ku*e)/(Nu+Au-ku),a=r-i,u=(xu*(e-i)-_u*a)/Mu,o=Math.sqrt(u*u+a*a)/(xu*i*(1-i)),c=o?Math.atan2(u,a)*lu-120:NaN;return new Kt(c<0?c+360:c,o,i,t.opacity)}function Qt(t,n,e,r){return 1===arguments.length?Gt(t):new Kt(t,n,e,null==r?1:r)}function Kt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function tn(t,n){return function(e){return t+e*n}}function nn(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 en(t,n){var e=n-t;return e?tn(t,e>180||e<-180?e-360*Math.round(e/360):e):Uu(isNaN(t)?n:t)}function rn(t){return 1===(t=+t)?an:function(n,e){return e-n?nn(n,e,t):Uu(isNaN(n)?e:n)}}function an(t,n){var e=n-t;return e?tn(t,e):Uu(isNaN(t)?n:t)}function un(t){return function(){return t}}function on(t){return function(n){return t(n)+""}}function cn(t){return"none"===t?ju:(Tu||(Tu=document.createElement("DIV"),Cu=document.documentElement,Su=document.defaultView),Tu.style.transform=t,t=Su.getComputedStyle(Cu.appendChild(Tu),null).getPropertyValue("transform"),Cu.removeChild(Tu),t=t.slice(7,-1).split(","),Vu(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function fn(t){return null==t?ju:(Du||(Du=document.createElementNS("http://www.w3.org/2000/svg","g")),Du.setAttribute("transform",t),(t=Du.transform.baseVal.consolidate())?(t=t.matrix,Vu(t.a,t.b,t.c,t.d,t.e,t.f)):ju)}function ln(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function a(t,r,i,a,u,o){if(t!==i||r!==a){var c=u.push("translate(",null,n,null,e);o.push({i:c-4,x:Pu(t,i)},{i:c-2,x:Pu(r,a)})}else(i||a)&&u.push("translate("+i+n+a+e)}function u(t,n,e,a){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),a.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Pu(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function o(t,n,e,a){t!==n?a.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Pu(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function c(t,n,e,r,a,u){if(t!==e||n!==r){var o=a.push(i(a)+"scale(",null,",",null,")");u.push({i:o-4,x:Pu(t,e)},{i:o-2,x:Pu(n,r)})}else 1===e&&1===r||a.push(i(a)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),a(n.translateX,n.translateY,e.translateX,e.translateY,r,i),u(n.rotate,e.rotate,r,i),o(n.skewX,e.skewX,r,i),c(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,a=i.length;++e<a;)r[(n=i[e]).i]=n.x(t);return r.join("")}}}function sn(t){return function n(e){function r(n,r){var i=t((n=Qt(n)).h,(r=Qt(r)).h),a=an(n.s,r.s),u=an(n.l,r.l),o=an(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=a(t),n.l=u(Math.pow(t,e)),n.opacity=o(t),n+""}}return e=+e,r.gamma=n,r}(1)}function hn(t,n){var e,r;return function(){var i=kt(this,t),a=i.tween;if(a!==e){r=e=a;for(var u=0,o=r.length;u<o;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function dn(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var a=kt(this,t),u=a.tween;if(u!==r){i=(r=u).slice();for(var o={name:n,value:e},c=0,f=i.length;c<f;++c)if(i[c].name===n){i[c]=o;break}c===f&&i.push(o)}a.tween=i}}function pn(t,n,e){var r=t._id;return t.each(function(){var t=kt(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return Nt(t,r).value[n]}}function gn(t){return function(){this.removeAttribute(t)}}function bn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vn(t,n,e){var r,i;return function(){var a=this.getAttribute(t);return a===e?null:a===r?i:i=n(r=a,e)}}function mn(t,n,e){var r,i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===e?null:a===r?i:i=n(r=a,e)}}function yn(t,n,e){var r,i,a;return function(){var u,o=e(this);return null==o?void this.removeAttribute(t):(u=this.getAttribute(t),u===o?null:u===r&&o===i?a:a=n(r=u,i=o))}}function wn(t,n,e){var r,i,a;return function(){var u,o=e(this);return null==o?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===o?null:u===r&&o===i?a:a=n(r=u,i=o))}}function _n(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 Mn(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 xn(t,n){return function(){At(this,t).delay=+n.apply(this,arguments)}}function An(t,n){return n=+n,function(){At(this,t).delay=n}}function kn(t,n){return function(){kt(this,t).duration=+n.apply(this,arguments)}}function Nn(t,n){return n=+n,function(){kt(this,t).duration=n}}function Tn(t,n){if("function"!=typeof n)throw new Error;return function(){kt(this,t).ease=n}}function Cn(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 Sn(t,n,e){var r,i,a=Cn(n)?At:kt;return function(){var u=a(this,t),o=u.on;o!==r&&(i=(r=o).copy()).on(n,e),u.on=i}}function Dn(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Un(t,n){var e,r,i;return function(){var a=ia(this).getComputedStyle(this,null),u=a.getPropertyValue(t),o=(this.style.removeProperty(t),a.getPropertyValue(t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}function En(t){return function(){this.style.removeProperty(t)}}function Fn(t,n,e){var r,i;return function(){var a=ia(this).getComputedStyle(this,null).getPropertyValue(t);return a===e?null:a===r?i:i=n(r=a,e)}}function Yn(t,n,e){var r,i,a;return function(){var u=ia(this).getComputedStyle(this,null),o=u.getPropertyValue(t),c=e(this);return null==c&&(this.style.removeProperty(t),c=u.getPropertyValue(t)),o===c?null:o===r&&c===i?a:a=n(r=o,i=c)}}function Pn(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 Hn(t){return function(){this.textContent=t}}function Ln(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function On(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function In(t){return ft().transition(t)}function qn(){return++po}function zn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function Xn(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return _o.time=gt(),_o;return e}function jn(){}function Vn(t,n){var e=new jn;if(t instanceof jn)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==n)for(;++i<a;)e.set(i,t[i]);else for(;++i<a;)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 Rn(){}function $n(t,n){var e=new Rn;if(t instanceof Rn)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){function n(n){var a=n+"",u=e.get(a);if(!u){if(i!==Uo)return i;e.set(a,u=r.push(n))}return t[(u-1)%t.length]}var e=Vn(),r=[],i=Uo;return t=null==t?[]:Do.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=Vn();for(var i,a,u=-1,o=t.length;++u<o;)e.has(a=(i=t[u])+"")||e.set(a,r.push(i));return n},n.range=function(e){return arguments.length?(t=Do.call(e),n):t.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return Bn().domain(r).range(t).unknown(i)},n}function Zn(){function t(){var t=i().length,r=u[1]<u[0],s=u[r-0],h=u[1-r];n=(h-s)/Math.max(1,t-c+2*f),o&&(n=Math.floor(n)),s+=(h-s-n*(t-c))*l,e=n*(1-c),o&&(s=Math.round(s),e=Math.round(e));var d=Br(t).map(function(t){return s+n*t});return a(r?d.reverse():d)}var n,e,r=Bn().unknown(void 0),i=r.domain,a=r.range,u=[0,1],o=!1,c=0,f=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]],o=!0,t()},r.bandwidth=function(){return e},r.step=function(){return n},r.round=function(n){return arguments.length?(o=!!n,t()):o},r.padding=function(n){return arguments.length?(c=f=Math.max(0,Math.min(1,n)),t()):c},r.paddingInner=function(n){return arguments.length?(c=Math.max(0,Math.min(1,n)),t()):c},r.paddingOuter=function(n){return arguments.length?(f=Math.max(0,Math.min(1,n)),t()):f},r.align=function(n){return arguments.length?(l=Math.max(0,Math.min(1,n)),t()):l},r.copy=function(){return Zn().domain(i()).range(u).round(o).paddingInner(c).paddingOuter(f).align(l)},t()}function Wn(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Wn(n())},t}function Jn(){return Wn(Zn().paddingInner(1))}function Gn(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:Eo(n)}function Qn(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 Kn(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 te(t,n,e,r){var i=t[0],a=t[1],u=n[0],o=n[1];return a<i?(i=e(a,i),u=r(o,u)):(i=e(i,a),u=r(u,o)),function(t){return u(i(t))}}function ne(t,n,e,r){var i=Math.min(t.length,n.length)-1,a=new Array(i),u=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<i;)a[o]=e(t[o],t[o+1]),u[o]=r(n[o],n[o+1]);return function(n){var e=Pr(t,n,1,i)-1;return u[e](a[e](n))}}function ee(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function re(t,n){function e(){return i=Math.min(o.length,c.length)>2?ne:te,a=u=null,r}function r(n){return(a||(a=i(o,c,l?Qn(t):t,f)))(+n)}var i,a,u,o=Yo,c=Yo,f=qu,l=!1;return r.invert=function(t){return(u||(u=i(c,o,Gn,l?Kn(n):n)))(+t)},r.domain=function(t){return arguments.length?(o=So.call(t,Fo),e()):o.slice()},r.range=function(t){return arguments.length?(c=Do.call(t),e()):c.slice()},r.rangeRound=function(t){return c=Do.call(t),f=zu,e()},r.clamp=function(t){return arguments.length?(l=!!t,e()):l},r.interpolate=function(t){return arguments.length?(f=t,e()):f},e()}function ie(t){if(!(n=Xo.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",a=n[4]||"",u=!!n[5],o=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(c=!0,l="g"):zo[l]||(l=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=a,this.zero=u,this.width=o,this.comma=c,this.precision=f,this.type=l}function ae(t){return t}function ue(t){return Vo=Zo(t),Ro=Vo.format,$o=Vo.formatPrefix,Vo}function oe(t){var n=t.domain;return t.ticks=function(t){var e=n();return Gr(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Qo(n(),t,e)},t.nice=function(r){var i=n(),a=i.length-1,u=null==r?10:r,o=i[0],c=i[a],f=e(o,c,u);return f&&(f=e(Math.floor(o/f)*f,Math.ceil(c/f)*f,u),i[0]=Math.floor(o/f)*f,i[a]=Math.ceil(c/f)*f,n(i)),t},t}function ce(){var t=re(Gn,Pu);return t.copy=function(){return ee(t,ce())},oe(t)}function fe(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=So.call(e,Fo),t):n.slice()},t.copy=function(){return fe().domain(n)},oe(t)}function le(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:Eo(n)}function se(t,n){return t<0?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function he(t){return isFinite(t)?+("1e"+t):t<0?0:t}function de(t){return 10===t?he:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function pe(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function ge(t){return function(n){return-t(-n)}}function be(){function t(){return i=pe(r),a=de(r),e()[0]<0&&(i=ge(i),a=ge(a)),n}var n=re(le,se).domain([1,10]),e=n.domain,r=10,i=pe(10),a=de(10);return n.base=function(n){return arguments.length?(r=+n,t()):r},n.domain=function(n){return arguments.length?(e(n),t()):e()},n.ticks=function(t){var n,u=e(),o=u[0],c=u[u.length-1];(n=c<o)&&(h=o,o=c,c=h);var f,l,s,h=i(o),d=i(c),p=null==t?10:+t,g=[];if(!(r%1)&&d-h<p){if(h=Math.round(h)-1,d=Math.round(d)+1,o>0){for(;h<d;++h)for(l=1,f=a(h);l<r;++l)if(s=f*l,!(s<o)){if(s>c)break;g.push(s)}}else for(;h<d;++h)for(l=r-1,f=a(h);l>=1;--l)if(s=f*l,!(s<o)){if(s>c)break;g.push(s)}}else g=Gr(h,d,Math.min(d-h,p)).map(a);return n?g.reverse():g},n.tickFormat=function(t,e){if(null==e&&(e=10===r?".0e":","),"function"!=typeof e&&(e=Ro(e)),t===1/0)return e;null==t&&(t=10);var u=Math.max(1,r*t/n.ticks().length);return function(t){var n=t/a(Math.round(i(t)));return n*r<r-.5&&(n*=r),n<=u?e(t):""}},n.nice=function(){return e(Ko(e(),{floor:function(t){return a(Math.floor(i(t)))},ceil:function(t){return a(Math.ceil(i(t)))}}))},n.copy=function(){return ee(n,be().base(r))},n}function ve(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function me(){function t(t,n){return(n=ve(n,e)-(t=ve(t,e)))?function(r){return(ve(r,e)-t)/n}:Eo(n)}function n(t,n){return n=ve(n,e)-(t=ve(t,e)),function(r){return ve(t+n*r,1/e)}}var e=1,r=re(t,n),i=r.domain;return r.exponent=function(t){return arguments.length?(e=+t,i(i())):e},r.copy=function(){return ee(r,me().exponent(e))},oe(r)}function ye(){return me().exponent(.5)}function we(){function t(){var t=0,a=Math.max(1,r.length);for(i=new Array(a-1);++t<a;)i[t-1]=ti(e,t/a);return n}function n(t){if(!isNaN(t=+t))return r[Pr(i,t)]}var e=[],r=[],i=[];return n.invertExtent=function(t){var n=r.indexOf(t);return n<0?[NaN,NaN]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},n.domain=function(n){if(!arguments.length)return e.slice();e=[];for(var r,i=0,a=n.length;i<a;++i)r=n[i],null==r||isNaN(r=+r)||e.push(r);return e.sort(Er),t()},n.range=function(n){return arguments.length?(r=Do.call(n),t()):r.slice()},n.quantiles=function(){return i.slice()},n.copy=function(){return we().domain(e).range(r)},n}function _e(){function t(t){if(t<=t)return u[Pr(a,t,0,i)]}function n(){var n=-1;for(a=new Array(i);++n<i;)a[n]=((n+1)*r-(n-i)*e)/(i+1);return t}var e=0,r=1,i=1,a=[.5],u=[0,1];return t.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n()):[e,r]},t.range=function(t){return arguments.length?(i=(u=Do.call(t)).length-1,n()):u.slice()},t.invertExtent=function(t){var n=u.indexOf(t);return n<0?[NaN,NaN]:n<1?[e,a[0]]:n>=i?[a[i-1],r]:[a[n-1],a[n]]},t.copy=function(){return _e().domain([e,r]).range(u)},oe(t)}function Me(){function t(t){if(t<=t)return e[Pr(n,t,0,r)]}var n=[.5],e=[0,1],r=1;return t.domain=function(i){return arguments.length?(n=Do.call(i),r=Math.min(n.length,e.length-1),t):n.slice()},t.range=function(i){return arguments.length?(e=Do.call(i),r=Math.min(n.length,e.length-1),t):e.slice()},t.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},t.copy=function(){return Me().domain(n).range(e)},t}function xe(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,a){var u=[];if(e=i.ceil(e),a=null==a?1:Math.floor(a),!(e<r&&a>0))return u;do u.push(new Date(+e));while(n(e,a),t(e),e<r);return u},i.filter=function(e){return xe(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 tc.setTime(+n),nc.setTime(+r),t(tc),t(nc),Math.floor(e(tc,nc))},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 Ae(t){return xe(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())*ic)/oc})}function ke(t){return xe(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)/oc})}function Ne(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 Te(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 Ce(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Se(t){function n(t,n){return function(e){var r,i,a,u=[],o=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++o<f;)37===t.charCodeAt(o)&&(u.push(t.slice(c,o)),null!=(i=Cc[r=t.charAt(++o)])?r=t.charAt(++o):i="e"===r?" ":"0",(a=n[r])&&(r=a(e,i)),u.push(r),c=o+1);return u.push(t.slice(c,o)),u.join("")}}function e(t,n){return function(e){var i=Ce(1900),a=r(i,t,e+="",0);if(a!=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 u="Z"in i?Te(Ce(i.y)).getUTCDay():n(Ce(i.y)).getDay();i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(u+5)%7:i.w+7*i.U-(u+6)%7}return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Te(i)):n(i)}}function r(t,n,e,r){for(var i,a,u=0,o=n.length,c=e.length;u<o;){if(r>=c)return-1;if(i=n.charCodeAt(u++),37===i){if(i=n.charAt(u++),a=X[i in Cc?n.charAt(u++):i],!a||(r=a(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=D.exec(n.slice(e));return r?(t.p=U[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=Y.exec(n.slice(e));return r?(t.w=P[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=E.exec(n.slice(e));return r?(t.w=F[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=O.exec(n.slice(e));return r?(t.m=I[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){var r=H.exec(n.slice(e));return r?(t.m=L[r[0].toLowerCase()],e+r[0].length):-1}function f(t,n,e){return r(t,M,n,e)}function l(t,n,e){return r(t,x,n,e)}function s(t,n,e){return r(t,A,n,e)}function h(t){return T[t.getDay()]}function d(t){return N[t.getDay()]}function p(t){return S[t.getMonth()]}function g(t){return C[t.getMonth()]}function b(t){return k[+(t.getHours()>=12)]}function v(t){return T[t.getUTCDay()]}function m(t){return N[t.getUTCDay()]}function y(t){return S[t.getUTCMonth()]}function w(t){return C[t.getUTCMonth()]}function _(t){return k[+(t.getUTCHours()>=12)]}var M=t.dateTime,x=t.date,A=t.time,k=t.periods,N=t.days,T=t.shortDays,C=t.months,S=t.shortMonths,D=Ee(k),U=Fe(k),E=Ee(N),F=Fe(N),Y=Ee(T),P=Fe(T),H=Ee(C),L=Fe(C),O=Ee(S),I=Fe(S),q={a:h,A:d,b:p,B:g,c:null,d:Ze,e:Ze,H:We,I:Je,j:Ge,L:Qe,m:Ke,M:tr,p:b,S:nr,U:er,w:rr,W:ir,x:null,X:null,y:ar,Y:ur,Z:or,"%":Mr},z={a:v,A:m,b:y,B:w,c:null,d:cr,e:cr,H:fr,I:lr,j:sr,L:hr,m:dr,M:pr,p:_,S:gr,U:br,w:vr,W:mr,x:null,X:null,y:yr,Y:wr,Z:_r,"%":Mr},X={a:a,A:u,b:o,B:c,c:f,d:ze,e:ze,H:je,I:je,j:Xe,L:$e,m:qe,M:Ve,p:i,S:Re,U:Pe,w:Ye,W:He,x:l,X:s,y:Oe,Y:Le,Z:Ie,"%":Be};return q.x=n(x,q),q.X=n(A,q),q.c=n(M,q),z.x=n(x,z),z.X=n(A,z),z.c=n(M,z),{format:function(t){
2var e=n(t+="",q);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",Ne);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",z);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,Te);return n.toString=function(){return t},n}}}function De(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<e?new Array(e-a+1).join(n)+i:i)}function Ue(t){return t.replace(Uc,"\\$&")}function Ee(t){return new RegExp("^(?:"+t.map(Ue).join("|")+")","i")}function Fe(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function Ye(t,n,e){var r=Sc.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Pe(t,n,e){var r=Sc.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function He(t,n,e){var r=Sc.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function Le(t,n,e){var r=Sc.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Oe(t,n,e){var r=Sc.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Ie(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 qe(t,n,e){var r=Sc.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function ze(t,n,e){var r=Sc.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Xe(t,n,e){var r=Sc.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function je(t,n,e){var r=Sc.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Ve(t,n,e){var r=Sc.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Re(t,n,e){var r=Sc.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function $e(t,n,e){var r=Sc.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Be(t,n,e){var r=Dc.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Ze(t,n){return De(t.getDate(),n,2)}function We(t,n){return De(t.getHours(),n,2)}function Je(t,n){return De(t.getHours()%12||12,n,2)}function Ge(t,n){return De(1+sc.count(gc(t),t),n,3)}function Qe(t,n){return De(t.getMilliseconds(),n,3)}function Ke(t,n){return De(t.getMonth()+1,n,2)}function tr(t,n){return De(t.getMinutes(),n,2)}function nr(t,n){return De(t.getSeconds(),n,2)}function er(t,n){return De(hc.count(gc(t),t),n,2)}function rr(t){return t.getDay()}function ir(t,n){return De(dc.count(gc(t),t),n,2)}function ar(t,n){return De(t.getFullYear()%100,n,2)}function ur(t,n){return De(t.getFullYear()%1e4,n,4)}function or(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+De(n/60|0,"0",2)+De(n%60,"0",2)}function cr(t,n){return De(t.getUTCDate(),n,2)}function fr(t,n){return De(t.getUTCHours(),n,2)}function lr(t,n){return De(t.getUTCHours()%12||12,n,2)}function sr(t,n){return De(1+mc.count(Mc(t),t),n,3)}function hr(t,n){return De(t.getUTCMilliseconds(),n,3)}function dr(t,n){return De(t.getUTCMonth()+1,n,2)}function pr(t,n){return De(t.getUTCMinutes(),n,2)}function gr(t,n){return De(t.getUTCSeconds(),n,2)}function br(t,n){return De(yc.count(Mc(t),t),n,2)}function vr(t){return t.getUTCDay()}function mr(t,n){return De(wc.count(Mc(t),t),n,2)}function yr(t,n){return De(t.getUTCFullYear()%100,n,2)}function wr(t,n){return De(t.getUTCFullYear()%1e4,n,4)}function _r(){return"+0000"}function Mr(){return"%"}function xr(t){return xc=Se(t),Ac=xc.format,kc=xc.parse,Nc=xc.utcFormat,Tc=xc.utcParse,xc}function Ar(t){return t.toISOString()}function kr(t){var n=new Date(t);return isNaN(n)?null:n}function Nr(t){return new Date(t)}function Tr(t){return t instanceof Date?+t:+new Date(+t)}function Cr(t,n,r,i,a,u,o,c,f){function l(e){return(o(e)<e?g:u(e)<e?b:a(e)<e?v:i(e)<e?m:n(e)<e?r(e)<e?y:w:t(e)<e?_:M)(e)}function s(n,r,i,a){if(null==n&&(n=10),"number"==typeof n){var u=Math.abs(i-r)/n,o=Fr(function(t){return t[2]}).right(x,u);o===x.length?(a=e(r/Ic,i/Ic,n),n=t):o?(o=x[u/x[o-1][2]<x[o][2]/u?o-1:o],a=o[1],n=o[0]):(a=e(r,i,n),n=c)}return null==a?n:n.every(a)}var h=re(Gn,Pu),d=h.invert,p=h.domain,g=f(".%L"),b=f(":%S"),v=f("%I:%M"),m=f("%I %p"),y=f("%a %d"),w=f("%b %d"),_=f("%B"),M=f("%Y"),x=[[o,1,Fc],[o,5,5*Fc],[o,15,15*Fc],[o,30,30*Fc],[u,1,Yc],[u,5,5*Yc],[u,15,15*Yc],[u,30,30*Yc],[a,1,Pc],[a,3,3*Pc],[a,6,6*Pc],[a,12,12*Pc],[i,1,Hc],[i,2,2*Hc],[r,1,Lc],[n,1,Oc],[n,3,3*Oc],[t,1,Ic]];return h.invert=function(t){return new Date(d(t))},h.domain=function(t){return arguments.length?p(So.call(t,Tr)):p().map(Nr)},h.ticks=function(t,n){var e,r=p(),i=r[0],a=r[r.length-1],u=a<i;return u&&(e=i,i=a,a=e),e=s(t,i,a,n),e=e?e.range(i,a+1):[],u?e.reverse():e},h.tickFormat=function(t,n){return null==n?l:f(n)},h.nice=function(t,n){var e=p();return(t=s(t,e[0],e[e.length-1],n))?p(Ko(e,t)):h},h.copy=function(){return ee(h,Cr(t,n,r,i,a,u,o,c,f))},h}function Sr(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Dr(t){function n(n){var a=(n-e)/(r-e);return t(i?Math.max(0,Math.min(1,a)):a)}var e=0,r=1,i=!1;return n.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n):[e,r]},n.clamp=function(t){return arguments.length?(i=!!t,n):i},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Dr(t).domain([e,r]).clamp(i)},oe(n)}function Ur(){function t(t){return function(n){return"translate("+t(n)+",0)"}}function n(t){var n=t(0);return function(e){return Math.abs(t(e)-n)}}function e(e){e.each(function(e,r){var h=u.call(this,e,r).slice().sort(d3.descending),d=o.call(this,e,r).slice().sort(d3.descending),p=c.call(this,e,r).slice().sort(d3.descending),g=d3.select(this),b=d3.scaleLinear().domain([0,Math.max(h[0],d[0],p[0])]).range(i?[f,0]:[0,f]),v=this.__chart__||d3.scaleLinear().domain([0,1/0]).range(b.range());this.__chart__=b;var m=n(v),y=n(b),w=g.selectAll("rect.range").data(h);w.enter().append("rect").attr("class",function(t,n){return"range s"+n}).attr("width",m).attr("height",l).attr("x",i?v:0).transition().duration(a).attr("width",y).attr("x",i?b:0),w.transition().duration(a).attr("x",i?b:0).attr("width",y).attr("height",l);var _=g.selectAll("rect.measure").data(p);_.enter().append("rect").attr("class",function(t,n){return"measure s"+n}).attr("width",m).attr("height",l/3).attr("x",i?v:0).attr("y",l/3).transition().duration(a).attr("width",y).attr("x",i?b:0),_.transition().duration(a).attr("width",y).attr("height",l/3).attr("x",i?b:0).attr("y",l/3);var M=g.selectAll("line.marker").data(d);M.enter().append("line").attr("class","marker").attr("x1",v).attr("x2",v).attr("y1",l/6).attr("y2",5*l/6).transition().duration(a).attr("x1",b).attr("x2",b),M.transition().duration(a).attr("x1",b).attr("x2",b).attr("y1",l/6).attr("y2",5*l/6);var x=s||b.tickFormat(8),A=g.selectAll("g.tick").data(b.ticks(8),function(t){return this.textContent||x(t)}),k=A.enter().append("g").attr("class","tick").attr("transform",t(v)).style("opacity",1e-6);k.append("line").attr("y1",l).attr("y2",7*l/6),k.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*l/6).text(x),k.transition().duration(a).attr("transform",t(b)).style("opacity",1);var N=A.transition().duration(a).attr("transform",t(b)).style("opacity",1);N.select("line").attr("y1",l).attr("y2",7*l/6),N.select("text").attr("y",7*l/6),A.exit().transition().duration(a).attr("transform",t(b)).style("opacity",1e-6).remove()}),d3.timerFlush()}var r="left",i=!1,a=0,u=function(t){return t.ranges},o=function(t){return t.markers},c=function(t){return t.measures},f=380,l=30,s=null;return e.orient=function(t){return arguments.length?(r=t,i="right"===r||"bottom"===r,e):r},e.ranges=function(t){return arguments.length?(u=t,e):u},e.markers=function(t){return arguments.length?(o=t,e):o},e.measures=function(t){return arguments.length?(c=t,e):c},e.width=function(t){return arguments.length?(f=t,e):f},e.height=function(t){return arguments.length?(l=t,e):l},e.tickFormat=function(t){return arguments.length?(s=t,e):s},e.duration=function(t){return arguments.length?(a=t,e):a},e}var Er=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},Fr=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 a=r+i>>>1;t(n[a],e)<0?r=a+1:i=a}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var a=r+i>>>1;t(n[a],e)>0?i=a:r=a+1}return r}}},Yr=Fr(Er),Pr=Yr.right,Hr=Yr.left,Lr=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},Or=function(t){return null===t?NaN:+t},Ir=function(t,n){var e,r,i=t.length,a=0,u=0,o=-1,c=0;if(null==n)for(;++o<i;)isNaN(e=Or(t[o]))||(r=e-a,a+=r/++c,u+=r*(e-a));else for(;++o<i;)isNaN(e=Or(n(t[o],o,t)))||(r=e-a,a+=r/++c,u+=r*(e-a));if(c>1)return u/(c-1)},qr=function(t,n){var e=Ir(t,n);return e?Math.sqrt(e):e},zr=function(t,n){var e,r,i,a=-1,u=t.length;if(null==n){for(;++a<u;)if(null!=(r=t[a])&&r>=r){e=i=r;break}for(;++a<u;)null!=(r=t[a])&&(e>r&&(e=r),i<r&&(i=r))}else{for(;++a<u;)if(null!=(r=n(t[a],a,t))&&r>=r){e=i=r;break}for(;++a<u;)null!=(r=n(t[a],a,t))&&(e>r&&(e=r),i<r&&(i=r))}return[e,i]},Xr=Array.prototype,jr=Xr.slice,Vr=Xr.map,Rr=function(t){return function(){return t}},$r=function(t){return t},Br=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)),a=new Array(i);++r<i;)a[r]=t+r*e;return a},Zr=Math.sqrt(50),Wr=Math.sqrt(10),Jr=Math.sqrt(2),Gr=function(t,n,r){var i=e(t,n,r);return Br(Math.ceil(t/i)*i,Math.floor(n/i)*i+i/2,i)},Qr=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},Kr=function(){function t(t){var i,a,u=t.length,o=new Array(u);for(i=0;i<u;++i)o[i]=n(t[i],i,t);var c=e(o),f=c[0],l=c[1],s=r(o,f,l);Array.isArray(s)||(s=Gr(f,l,s));for(var h=s.length;s[0]<=f;)s.shift(),--h;for(;s[h-1]>=l;)s.pop(),--h;var d,p=new Array(h+1);for(i=0;i<=h;++i)d=p[i]=[],d.x0=i>0?s[i-1]:f,d.x1=i<h?s[i]:l;for(i=0;i<u;++i)a=o[i],f<=a&&a<=l&&p[Pr(s,a,0,h)].push(t[i]);return p}var n=$r,e=zr,r=Qr;return t.value=function(e){return arguments.length?(n="function"==typeof e?e:Rr(e),t):n},t.domain=function(n){return arguments.length?(e="function"==typeof n?n:Rr([n[0],n[1]]),t):e},t.thresholds=function(n){return arguments.length?(r="function"==typeof n?n:Rr(Array.isArray(n)?jr.call(n):n),t):r},t},ti=function(t,n,e){if(null==e&&(e=Or),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),u=+e(t[a],a,t),o=+e(t[a+1],a+1,t);return u+(o-u)*(i-a)}},ni=function(t,n,e){return t=Vr.call(t,Or).sort(Er),Math.ceil((e-n)/(2*(ti(t,.75)-ti(t,.25))*Math.pow(t.length,-1/3)))},ei=function(t,n,e){return Math.ceil((e-n)/(3.5*qr(t)*Math.pow(t.length,-1/3)))},ri=function(t,n){var e,r,i=-1,a=t.length;if(null==n){for(;++i<a;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<a;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<a;)if(null!=(r=n(t[i],i,t))&&r>=r){e=r;break}for(;++i<a;)null!=(r=n(t[i],i,t))&&r>e&&(e=r)}return e},ii=function(t,n){var e,r=0,i=t.length,a=-1,u=i;if(null==n)for(;++a<i;)isNaN(e=Or(t[a]))?--u:r+=e;else for(;++a<i;)isNaN(e=Or(n(t[a],a,t)))?--u:r+=e;if(u)return r/u},ai=function(t,n){var e,r=[],i=t.length,a=-1;if(null==n)for(;++a<i;)isNaN(e=Or(t[a]))||r.push(e);else for(;++a<i;)isNaN(e=Or(n(t[a],a,t)))||r.push(e);return ti(r.sort(Er),.5)},ui=function(t){for(var n,e,r,i=t.length,a=-1,u=0;++a<i;)u+=t[a].length;for(e=new Array(u);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--u]=r[n];return e},oi=function(t,n){var e,r,i=-1,a=t.length;if(null==n){for(;++i<a;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<a;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<a;)if(null!=(r=n(t[i],i,t))&&r>=r){e=r;break}for(;++i<a;)null!=(r=n(t[i],i,t))&&e>r&&(e=r)}return e},ci=function(t){for(var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);n<e;)i[n]=[r,r=t[++n]];return i},fi=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},li=function(t,n){if(e=t.length){var e,r,i=0,a=0,u=t[a];for(n||(n=Er);++i<e;)(n(r=t[i],u)<0||0!==n(u,u))&&(u=r,a=i);return 0===n(u,u)?a:void 0}},si=function(t,n,e){for(var r,i,a=(null==e?t.length:e)-(n=null==n?0:+n);a;)i=Math.random()*a--|0,r=t[a+n],t[a+n]=t[i+n],t[i+n]=r;return t},hi=function(t,n){var e,r=0,i=t.length,a=-1;if(null==n)for(;++a<i;)(e=+t[a])&&(r+=e);else for(;++a<i;)(e=+n(t[a],a,t))&&(r+=e);return r},di=function(t){if(!(a=t.length))return[];for(var n=-1,e=oi(t,r),i=new Array(e);++n<e;)for(var a,u=-1,o=i[n]=new Array(a);++u<a;)o[u]=t[u][n];return i},pi=function(){return di(arguments)},gi=Array.prototype.slice,bi=function(t){return t},vi=1,mi=2,yi=3,wi=4,_i=1e-6,Mi="http://www.w3.org/1999/xhtml",xi={svg:"http://www.w3.org/2000/svg",xhtml:Mi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ai=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),xi.hasOwnProperty(n)?{space:xi[n],local:t}:t},ki=function(t){var n=Ai(t);return(n.local?p:d)(n)},Ni=0;b.prototype=g.prototype={constructor:b,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Ti=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Ci=document.documentElement;if(!Ci.matches){var Si=Ci.webkitMatchesSelector||Ci.msMatchesSelector||Ci.mozMatchesSelector||Ci.oMatchesSelector;Ti=function(t){return function(){return Si.call(this,t)}}}}var Di=Ti,Ui={};if(t.event=null,"undefined"!=typeof document){var Ei=document.documentElement;"onmouseenter"in Ei||(Ui={mouseenter:"mouseover",mouseleave:"mouseout"})}var Fi=function(t,n,e){var r,i,a=y(t+""),u=a.length;{if(!(arguments.length<2)){for(o=n?_:w,null==e&&(e=!1),r=0;r<u;++r)this.each(o(a[r],n,e));return this}var o=this.node().__on;if(o)for(var c,f=0,l=o.length;f<l;++f)for(r=0,c=o[f];r<u;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value}},Yi=function(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e},Pi=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},Hi=function(t){var n=Yi();return n.changedTouches&&(n=n.changedTouches[0]),Pi(t,n)},Li=function(t){return null==t?x:function(){return this.querySelector(t)}},Oi=function(t){"function"!=typeof t&&(t=Li(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var a,u,o=n[i],c=o.length,f=r[i]=new Array(c),l=0;l<c;++l)(a=o[l])&&(u=t.call(a,a.__data__,l,o))&&("__data__"in a&&(u.__data__=a.__data__),f[l]=u);return new ct(r,this._parents)},Ii=function(t){return null==t?A:function(){return this.querySelectorAll(t)}},qi=function(t){"function"!=typeof t&&(t=Ii(t));for(var n=this._groups,e=n.length,r=[],i=[],a=0;a<e;++a)for(var u,o=n[a],c=o.length,f=0;f<c;++f)(u=o[f])&&(r.push(t.call(u,u.__data__,f,o)),i.push(u));return new ct(r,i)},zi=function(t){"function"!=typeof t&&(t=Di(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var a,u=n[i],o=u.length,c=r[i]=[],f=0;f<o;++f)(a=u[f])&&t.call(a,a.__data__,f,u)&&c.push(a);return new ct(r,this._parents)},Xi=function(t){return new Array(t.length)},ji=function(){return new ct(this._enter||this._groups.map(Xi),this._parents)};k.prototype={constructor:k,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 Vi=function(t){return function(){return t}},Ri="$",$i=function(t,n){if(!t)return d=new Array(this.size()),f=-1,this.each(function(t){d[++f]=t}),d;var e=n?T:N,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Vi(t));for(var a=i.length,u=new Array(a),o=new Array(a),c=new Array(a),f=0;f<a;++f){var l=r[f],s=i[f],h=s.length,d=t.call(l,l&&l.__data__,f,r),p=d.length,g=o[f]=new Array(p),b=u[f]=new Array(p),v=c[f]=new Array(h);e(l,s,g,b,v,d,n);for(var m,y,w=0,_=0;w<p;++w)if(m=g[w]){for(w>=_&&(_=w+1);!(y=b[_])&&++_<p;);m._next=y||null}}return u=new ct(u,r),u._enter=o,u._exit=c,u},Bi=function(){return new ct(this._exit||this._groups.map(Xi),this._parents)},Zi=function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,a=Math.min(r,i),u=new Array(r),o=0;o<a;++o)for(var c,f=n[o],l=e[o],s=f.length,h=u[o]=new Array(s),d=0;d<s;++d)(c=f[d]||l[d])&&(h[d]=c);for(;o<r;++o)u[o]=n[o];return new ct(u,this._parents)},Wi=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],a=i.length-1,u=i[a];--a>=0;)(r=i[a])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},Ji=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=C);for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a){for(var u,o=e[a],c=o.length,f=i[a]=new Array(c),l=0;l<c;++l)(u=o[l])&&(f[l]=u);f.sort(n)}return new ct(i,this._parents).order()},Gi=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},Qi=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},Ki=function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,a=r.length;i<a;++i){var u=r[i];if(u)return u}return null},ta=function(){var t=0;return this.each(function(){++t}),t},na=function(){return!this.node()},ea=function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,a=n[e],u=0,o=a.length;u<o;++u)(i=a[u])&&t.call(i,i.__data__,u,a);return this},ra=function(t,n){var e=Ai(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?D:S:"function"==typeof n?e.local?Y:F:e.local?E:U)(e,n))},ia=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},aa=function(t,n,e){var r;return arguments.length>1?this.each((null==n?P:"function"==typeof n?L:H)(t,n,null==e?"":e)):ia(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},ua=function(t,n){return arguments.length>1?this.each((null==n?O:"function"==typeof n?q:I)(t,n)):this.node()[t]};j.prototype={add:function(t){var n=this._names.indexOf(t);n<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 oa=function(t,n){var e=z(t+"");if(arguments.length<2){for(var r=X(this.node()),i=-1,a=e.length;++i<a;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?Z:n?$:B)(e,n))},ca=function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?G:J)(t)):this.node().textContent},fa=function(t){return arguments.length?this.each(null==t?Q:("function"==typeof t?tt:K)(t)):this.node().innerHTML},la=function(){return this.each(nt)},sa=function(){return this.each(et)},ha=function(t){var n="function"==typeof t?t:ki(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},da=function(t,n){var e="function"==typeof t?t:ki(t),r=null==n?rt:"function"==typeof n?n:Li(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},pa=function(){return this.each(it)},ga=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},ba=function(t,n){return this.each(("function"==typeof n?ot:ut)(t,n))},va=[null];ct.prototype=ft.prototype={constructor:ct,select:Oi,selectAll:qi,filter:zi,data:$i,enter:ji,exit:Bi,merge:Zi,order:Wi,sort:Ji,call:Gi,nodes:Qi,node:Ki,size:ta,empty:na,each:ea,attr:ra,style:aa,property:ua,classed:oa,text:ca,html:fa,raise:la,lower:sa,append:ha,insert:da,remove:pa,datum:ga,on:Fi,dispatch:ba};var ma=function(t){return"string"==typeof t?new ct([[document.querySelector(t)]],[document.documentElement]):new ct([[t]],va)},ya=function(t){return"string"==typeof t?new ct([document.querySelectorAll(t)],[document.documentElement]):new ct([null==t?[]:t],va)},wa=function(t,n,e){arguments.length<3&&(e=n,n=Yi().changedTouches);for(var r,i=0,a=n?n.length:0;i<a;++i)if((r=n[i]).identifier===e)return Pi(t,r);return null},_a=function(t,n){null==n&&(n=Yi().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=Pi(t,n[e]);return i},Ma={value:function(){}};st.prototype=lt.prototype={constructor:st,on:function(t,n){var e,r=this._,i=ht(t+"",r),a=-1,u=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++a<u;)if(e=(t=i[a]).type)r[e]=pt(r[e],t.name,n);else if(null==n)for(e in r)r[e]=pt(r[e],t.name,null);return this}for(;++a<u;)if((e=(t=i[a]).type)&&(e=dt(r[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new st(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),a=0;a<e;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],a=0,e=r.length;a<e;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(n,e)}};var xa,Aa,ka=0,Na=0,Ta=0,Ca=1e3,Sa=0,Da=0,Ua=0,Ea="object"==typeof performance&&performance.now?performance:Date,Fa="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};vt.prototype=mt.prototype={constructor:vt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?gt():+e)+(null==n?0:+n),this._next||Aa===this||(Aa?Aa._next=this:xa=this,Aa=this),this._call=t,this._time=e,xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,xt())}};var Ya=function(t,n,e){var r=new vt;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},Pa=function(t,n,e){var r=new vt,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?gt():+e,r.restart(function a(u){u+=i,r.restart(a,i+=n,e),t(u)},n,e),r)},Ha=lt("start","end","interrupt"),La=[],Oa=0,Ia=1,qa=2,za=3,Xa=4,ja=5,Va=6,Ra=function(t,n,e,r,i,a){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};Tt(t,e,{name:n,index:r,group:i,on:Ha,tween:La,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Oa})},$a=function(t,n){var e,r,i,a=t.__transition,u=!0;if(a){n=null==n?null:n+"";for(i in a)(e=a[i]).name===n?(r=e.state>qa&&e.state<ja,e.state=Va,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete a[i]):u=!1;u&&delete t.__transition}},Ba=function(t){return this.each(function(){$a(this,t)})},Za=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},Wa=.7,Ja=1/Wa,Ga="\\s*([+-]?\\d+)\\s*",Qa="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ka="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tu=/^#([0-9a-f]{3})$/,nu=/^#([0-9a-f]{6})$/,eu=new RegExp("^rgb\\("+[Ga,Ga,Ga]+"\\)$"),ru=new RegExp("^rgb\\("+[Ka,Ka,Ka]+"\\)$"),iu=new RegExp("^rgba\\("+[Ga,Ga,Ga,Qa]+"\\)$"),au=new RegExp("^rgba\\("+[Ka,Ka,Ka,Qa]+"\\)$"),uu=new RegExp("^hsl\\("+[Qa,Ka,Ka]+"\\)$"),ou=new RegExp("^hsla\\("+[Qa,Ka,Ka,Qa]+"\\)$"),cu={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};Za(St,Dt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Za(Pt,Yt,Ct(St,{brighter:function(t){return t=null==t?Ja:Math.pow(Ja,t),new Pt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Wa:Math.pow(Wa,t),new Pt(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+")")}})),Za(It,Ot,Ct(St,{brighter:function(t){return t=null==t?Ja:Math.pow(Ja,t),new It(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Wa:Math.pow(Wa,t),new It(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 Pt(qt(t>=240?t-240:t+120,i,r),qt(t,i,r),qt(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 fu=Math.PI/180,lu=180/Math.PI,su=18,hu=.95047,du=1,pu=1.08883,gu=4/29,bu=6/29,vu=3*bu*bu,mu=bu*bu*bu;Za(jt,Xt,Ct(St,{brighter:function(t){return new jt(this.l+su*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new jt(this.l-su*(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=du*Rt(t),n=hu*Rt(n),e=pu*Rt(e),new Pt($t(3.2404542*n-1.5371385*t-.4985314*e),$t(-.969266*n+1.8760108*t+.041556*e),$t(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Za(Jt,Wt,Ct(St,{brighter:function(t){return new Jt(this.h,this.c,this.l+su*(null==t?1:t),this.opacity)},darker:function(t){return new Jt(this.h,this.c,this.l-su*(null==t?1:t),this.opacity)},rgb:function(){return zt(this).rgb()}}));var yu=-.14861,wu=1.78277,_u=-.29227,Mu=-.90649,xu=1.97294,Au=xu*Mu,ku=xu*wu,Nu=wu*_u-Mu*yu;Za(Kt,Qt,Ct(St,{brighter:function(t){return t=null==t?Ja:Math.pow(Ja,t),new Kt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Wa:Math.pow(Wa,t),new Kt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*fu,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Pt(255*(n+e*(yu*r+wu*i)),255*(n+e*(_u*r+Mu*i)),255*(n+e*(xu*r)),this.opacity)}}));var Tu,Cu,Su,Du,Uu=function(t){return function(){return t}},Eu=function t(n){function e(t,n){var e=r((t=Yt(t)).r,(n=Yt(n)).r),i=r(t.g,n.g),a=r(t.b,n.b),u=r(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=a(n),t.opacity=u(n),t+""}}var r=rn(n);return e.gamma=t,e}(1),Fu=function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,a=new Array(r),u=new Array(r);for(e=0;e<i;++e)a[e]=qu(t[e],n[e]);for(;e<r;++e)u[e]=n[e];return function(t){for(e=0;e<i;++e)u[e]=a[e](t);return u}},Yu=function(t,n){var e=new Date;return t=+t,n-=t,function(r){return e.setTime(t+n*r),e}},Pu=function(t,n){return t=+t,n-=t,function(e){return t+n*e}},Hu=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]=qu(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},Lu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ou=new RegExp(Lu.source,"g"),Iu=function(t,n){var e,r,i,a=Lu.lastIndex=Ou.lastIndex=0,u=-1,o=[],c=[];for(t+="",n+="";(e=Lu.exec(t))&&(r=Ou.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[u]?o[u]+=i:o[++u]=i),(e=e[0])===(r=r[0])?o[u]?o[u]+=r:o[++u]=r:(o[++u]=null,c.push({i:u,x:Pu(e,r)})),a=Ou.lastIndex;return a<n.length&&(i=n.slice(a),o[u]?o[u]+=i:o[++u]=i),o.length<2?c[0]?on(c[0].x):un(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)o[(e=c[r]).i]=e.x(t);return o.join("")})},qu=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?Uu(n):("number"===r?Pu:"string"===r?(e=Dt(n))?(n=e,Eu):Iu:n instanceof Dt?Eu:n instanceof Date?Yu:Array.isArray(n)?Fu:isNaN(n)?Hu:Pu)(t,n)},zu=function(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}},Xu=180/Math.PI,ju={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Vu=function(t,n,e,r,i,a){var u,o,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(o=Math.sqrt(e*e+r*r))&&(e/=o,r/=o,c/=o),t*r<n*e&&(t=-t,n=-n,c=-c,u=-u),{translateX:i,translateY:a,rotate:Math.atan2(n,t)*Xu,skewX:Math.atan(c)*Xu,scaleX:u,scaleY:o}},Ru=ln(cn,"px, ","px)","deg)"),$u=ln(fn,", ",")",")");sn(en);var Bu=sn(an),Zu=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Nt(this.node(),e).tween,a=0,u=i.length;a<u;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==n?hn:dn)(e,t,n))},Wu=function(t,n){var e;return("number"==typeof n?Pu:n instanceof Dt?Eu:(e=Dt(n))?(n=e,Eu):Iu)(t,n)},Ju=function(t,n){var e=Ai(t),r="transform"===e?$u:Wu;return this.attrTween(t,"function"==typeof n?(e.local?wn:yn)(e,r,pn(this,"attr."+t,n)):null==n?(e.local?bn:gn)(e):(e.local?mn:vn)(e,r,n))},Gu=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=Ai(t);return this.tween(e,(r.local?_n:Mn)(r,n))},Qu=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?xn:An)(n,t)):Nt(this.node(),n).delay},Ku=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?kn:Nn)(n,t)):Nt(this.node(),n).duration},to=function(t){var n=this._id;return arguments.length?this.each(Tn(n,t)):Nt(this.node(),n).ease},no=function(t){"function"!=typeof t&&(t=Di(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var a,u=n[i],o=u.length,c=r[i]=[],f=0;f<o;++f)(a=u[f])&&t.call(a,a.__data__,f,u)&&c.push(a);return new On(r,this._parents,this._name,this._id)},eo=function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,a=Math.min(r,i),u=new Array(r),o=0;o<a;++o)for(var c,f=n[o],l=e[o],s=f.length,h=u[o]=new Array(s),d=0;d<s;++d)(c=f[d]||l[d])&&(h[d]=c);
3for(;o<r;++o)u[o]=n[o];return new On(u,this._parents,this._name,this._id)},ro=function(t,n){var e=this._id;return arguments.length<2?Nt(this.node(),e).on.on(t):this.each(Sn(e,t,n))},io=function(){return this.on("end.remove",Dn(this._id))},ao=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Li(t));for(var r=this._groups,i=r.length,a=new Array(i),u=0;u<i;++u)for(var o,c,f=r[u],l=f.length,s=a[u]=new Array(l),h=0;h<l;++h)(o=f[h])&&(c=t.call(o,o.__data__,h,f))&&("__data__"in o&&(c.__data__=o.__data__),s[h]=c,Ra(s[h],n,e,h,s,Nt(o,e)));return new On(a,this._parents,n,e)},uo=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Ii(t));for(var r=this._groups,i=r.length,a=[],u=[],o=0;o<i;++o)for(var c,f=r[o],l=f.length,s=0;s<l;++s)if(c=f[s]){for(var h,d=t.call(c,c.__data__,s,f),p=Nt(c,e),g=0,b=d.length;g<b;++g)(h=d[g])&&Ra(h,n,e,g,d,p);a.push(d),u.push(c)}return new On(a,u,n,e)},oo=ft.prototype.constructor,co=function(){return new oo(this._groups,this._parents)},fo=function(t,n,e){var r="transform"==(t+="")?Ru:Wu;return null==n?this.styleTween(t,Un(t,r)).on("end.style."+t,En(t)):this.styleTween(t,"function"==typeof n?Yn(t,r,pn(this,"style."+t,n)):Fn(t,r,n),e)},lo=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,Pn(t,n,null==e?"":e))},so=function(t){return this.tween("text","function"==typeof t?Ln(pn(this,"text",t)):Hn(null==t?"":t+""))},ho=function(){for(var t=this._name,n=this._id,e=qn(),r=this._groups,i=r.length,a=0;a<i;++a)for(var u,o=r[a],c=o.length,f=0;f<c;++f)if(u=o[f]){var l=Nt(u,n);Ra(u,t,e,f,o,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new On(r,this._parents,t,e)},po=0,go=ft.prototype;On.prototype=In.prototype={constructor:On,select:ao,selectAll:uo,filter:no,merge:eo,selection:co,transition:ho,call:go.call,nodes:go.nodes,node:go.node,size:go.size,empty:go.empty,each:go.each,on:ro,attr:Ju,attrTween:Gu,style:fo,styleTween:lo,text:so,remove:io,tween:Zu,delay:Qu,duration:Ku,ease:to};var bo=3,vo=(function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(bo),function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(bo),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}(bo),1.70158),mo=(function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(vo),function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(vo),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}(vo),2*Math.PI),yo=1,wo=.3,_o=(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/=mo);return r.amplitude=function(n){return t(n,e*mo)},r.period=function(e){return t(n,e)},r}(yo,wo),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/=mo);return r.amplitude=function(n){return t(n,e*mo)},r.period=function(e){return t(n,e)},r}(yo,wo),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/=mo);return r.amplitude=function(n){return t(n,e*mo)},r.period=function(e){return t(n,e)},r}(yo,wo),{time:null,delay:0,duration:250,ease:zn}),Mo=function(t){var n,e;t instanceof On?(n=t._id,t=t._name):(n=qn(),(e=_o).time=gt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var u,o=r[a],c=o.length,f=0;f<c;++f)(u=o[f])&&Ra(u,t,n,f,o,e||Xn(u,n));return new On(r,this._parents,t,n)};ft.prototype.interrupt=Ba,ft.prototype.transition=Mo;var xo=[null],Ao=function(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>Ia&&e.name===n)return new On([[t]],xo,n,+r)}return null},ko="$";jn.prototype=Vn.prototype={constructor:jn,has:function(t){return ko+t in this},get:function(t){return this[ko+t]},set:function(t,n){return this[ko+t]=n,this},remove:function(t){var n=ko+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===ko&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===ko&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===ko&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===ko&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===ko&&++t;return t},empty:function(){for(var t in this)if(t[0]===ko)return!1;return!0},each:function(t){for(var n in this)n[0]===ko&&t(this[n],n.slice(1),this)}};var No=Vn.prototype;Rn.prototype=$n.prototype={constructor:Rn,has:No.has,add:function(t){return t+="",this[ko+t]=t,this},remove:No.remove,clear:No.clear,values:No.keys,size:No.size,empty:No.empty,each:No.each};var To,Co=Array.prototype,So=Co.map,Do=Co.slice,Uo={name:"implicit"},Eo=function(t){return function(){return t}},Fo=function(t){return+t},Yo=[0,1],Po=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)]},Ho=function(t){return t=Po(Math.abs(t)),t?t[1]:NaN},Lo=function(t,n){return function(e,r){for(var i=e.length,a=[],u=0,o=t[0],c=0;i>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),a.push(e.substring(i-=o,i+o)),!((c+=o+1)>r));)o=t[u=(u+1)%t.length];return a.reverse().join(n)}},Oo=function(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,a=-1;i<r;++i)switch(t[i]){case".":a=e=i;break;case"0":0===a&&(a=i),e=i;break;case"e":break t;default:a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(e+1):t},Io=function(t,n){var e=Po(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(To=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return a===u?r:a>u?r+new Array(a-u+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Po(t,Math.max(0,n+a-1))[0]},qo=function(t,n){var e=Po(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")},zo={"":Oo,"%":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 qo(100*t,n)},r:qo,s:Io,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Xo=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i,jo=function(t){return new ie(t)};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 Vo,Ro,$o,Bo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Zo=function(t){function n(t){function n(t){var n,i,c,m=p,y=g;if("c"===d)y=b(t)+y,t="";else{t=+t;var w=(t<0||1/t<0)&&(t*=-1,!0);if(t=b(t,h),w)for(n=-1,i=t.length,w=!1;++n<i;)if(c=t.charCodeAt(n),48<c&&c<58||"x"===d&&96<c&&c<103||"X"===d&&64<c&&c<71){w=!0;break}if(m=(w?"("===o?o:"-":"-"===o||"("===o?"":o)+m,y=y+("s"===d?Bo[8+To/3]:"")+(w&&"("===o?")":""),v)for(n=-1,i=t.length;++n<i;)if(c=t.charCodeAt(n),48>c||c>57){y=(46===c?a+t.slice(n+1):t.slice(n))+y,t=t.slice(0,n);break}}s&&!f&&(t=r(t,1/0));var _=m.length+t.length+y.length,M=_<l?new Array(l-_+1).join(e):"";switch(s&&f&&(t=r(M+t,M.length?l-y.length:1/0),M=""),u){case"<":return m+t+y+M;case"=":return m+M+t+y;case"^":return M.slice(0,_=M.length>>1)+m+t+y+M.slice(_)}return M+m+t+y}t=jo(t);var e=t.fill,u=t.align,o=t.sign,c=t.symbol,f=t.zero,l=t.width,s=t.comma,h=t.precision,d=t.type,p="$"===c?i[0]:"#"===c&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",g="$"===c?i[1]:/[%p]/.test(d)?"%":"",b=zo[d],v=!d||/[defgprs%]/.test(d);return h=null==h?d?6:12:/[gprs]/.test(d)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=jo(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Ho(e)/3))),a=Math.pow(10,-i),u=Bo[8+i/3];return function(t){return r(a*t)+u}}var r=t.grouping&&t.thousands?Lo(t.grouping,t.thousands):ae,i=t.currency,a=t.decimal;return{format:n,formatPrefix:e}};ue({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Wo=function(t){return Math.max(0,-Ho(Math.abs(t)))},Jo=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ho(n)/3)))-Ho(Math.abs(t)))},Go=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Ho(n)-Ho(t))+1},Qo=function(t,n,r){var i,a=t[0],u=t[t.length-1],o=e(a,u,null==n?10:n);switch(r=jo(null==r?",f":r),r.type){case"s":var c=Math.max(Math.abs(a),Math.abs(u));return null!=r.precision||isNaN(i=Jo(o,c))||(r.precision=i),$o(r,c);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Go(o,Math.max(Math.abs(a),Math.abs(u))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Wo(o))||(r.precision=i-2*("%"===r.type))}return Ro(r)},Ko=function(t,n){t=t.slice();var e,r=0,i=t.length-1,a=t[r],u=t[i];return u<a&&(e=r,r=i,i=e,e=a,a=u,u=e),t[r]=n.floor(a),t[i]=n.ceil(u),t},tc=new Date,nc=new Date,ec=xe(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});ec.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?xe(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):ec:null};var rc=1e3,ic=6e4,ac=36e5,uc=864e5,oc=6048e5,cc=xe(function(t){t.setTime(Math.floor(t/rc)*rc)},function(t,n){t.setTime(+t+n*rc)},function(t,n){return(n-t)/rc},function(t){return t.getUTCSeconds()}),fc=xe(function(t){t.setTime(Math.floor(t/ic)*ic)},function(t,n){t.setTime(+t+n*ic)},function(t,n){return(n-t)/ic},function(t){return t.getMinutes()}),lc=xe(function(t){var n=t.getTimezoneOffset()*ic%ac;n<0&&(n+=ac),t.setTime(Math.floor((+t-n)/ac)*ac+n)},function(t,n){t.setTime(+t+n*ac)},function(t,n){return(n-t)/ac},function(t){return t.getHours()}),sc=xe(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())*ic)/uc},function(t){return t.getDate()-1}),hc=Ae(0),dc=Ae(1),pc=(Ae(2),Ae(3),Ae(4),Ae(5),Ae(6),xe(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()})),gc=xe(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()});gc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?xe(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 bc=xe(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*ic)},function(t,n){return(n-t)/ic},function(t){return t.getUTCMinutes()}),vc=xe(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*ac)},function(t,n){return(n-t)/ac},function(t){return t.getUTCHours()}),mc=xe(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/uc},function(t){return t.getUTCDate()-1}),yc=ke(0),wc=ke(1),_c=(ke(2),ke(3),ke(4),ke(5),ke(6),xe(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()})),Mc=xe(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()});Mc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?xe(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 xc,Ac,kc,Nc,Tc,Cc={"-":"",_:" ",0:"0"},Sc=/^\s*\d+/,Dc=/^%/,Uc=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;xr({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 Ec="%Y-%m-%dT%H:%M:%S.%LZ",Fc=(Date.prototype.toISOString?Ar:Nc(Ec),+new Date("2000-01-01T00:00:00.000Z")?kr:Tc(Ec),1e3),Yc=60*Fc,Pc=60*Yc,Hc=24*Pc,Lc=7*Hc,Oc=30*Hc,Ic=365*Hc,qc=function(){return Cr(gc,pc,hc,sc,lc,fc,cc,ec,Ac).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},zc=function(){return Cr(Mc,_c,yc,mc,vc,bc,cc,ec,Nc).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},Xc=function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})},jc=Xc("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Vc=Xc("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Rc=Xc("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),$c=Xc("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Bc=Bu(Qt(300,.5,0),Qt(-240,.5,1)),Zc=Bu(Qt(-100,.75,.35),Qt(80,1.5,.8)),Wc=Bu(Qt(260,.75,.35),Qt(80,1.5,.8)),Jc=Qt(),Gc=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Jc.h=360*t-100,Jc.s=1.5-1.5*n,Jc.l=.8-.9*n,Jc+""},Qc=Sr(Xc("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Kc=Sr(Xc("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),tf=Sr(Xc("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nf=Sr(Xc("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ef="1.0.0";t.bullet=Ur,t.version=ef,t.bisect=Pr,t.bisectRight=Pr,t.bisectLeft=Hr,t.ascending=Er,t.bisector=Fr,t.descending=Lr,t.deviation=qr,t.extent=zr,t.histogram=Kr,t.thresholdFreedmanDiaconis=ni,t.thresholdScott=ei,t.thresholdSturges=Qr,t.max=ri,t.mean=ii,t.median=ai,t.merge=ui,t.min=oi,t.pairs=ci,t.permute=fi,t.quantile=ti,t.range=Br,t.scan=li,t.shuffle=si,t.sum=hi,t.ticks=Gr,t.tickStep=e,t.transpose=di,t.variance=Ir,t.zip=pi,t.axisTop=f,t.axisRight=l,t.axisBottom=s,t.axisLeft=h,t.creator=ki,t.local=g,t.matcher=Di,t.mouse=Hi,t.namespace=Ai,t.namespaces=xi,t.select=ma,t.selectAll=ya,t.selection=ft,t.selector=Li,t.selectorAll=Ii,t.touch=wa,t.touches=_a,t.window=ia,t.customEvent=M,t.transition=In,t.active=Ao,t.interrupt=$a,t.now=gt,t.timer=mt,t.timerFlush=yt,t.timeout=Ya,t.interval=Pa,t.scaleBand=Zn,t.scalePoint=Jn,t.scaleIdentity=fe,t.scaleLinear=ce,t.scaleLog=be,t.scaleOrdinal=Bn,t.scaleImplicit=Uo,t.scalePow=me,t.scaleSqrt=ye,t.scaleQuantile=we,t.scaleQuantize=_e,t.scaleThreshold=Me,t.scaleTime=qc,t.scaleUtc=zc,t.schemeCategory10=jc,t.schemeCategory20b=Vc,t.schemeCategory20c=Rc,t.schemeCategory20=$c,t.interpolateCubehelixDefault=Bc,t.interpolateRainbow=Gc,t.interpolateWarm=Zc,t.interpolateCool=Wc,t.interpolateViridis=Qc,t.interpolateMagma=Kc,t.interpolateInferno=tf,t.interpolatePlasma=nf,t.scaleSequential=Dr,Object.defineProperty(t,"__esModule",{value:!0})});
\No newline at end of file