text: !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";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},r=function(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t};var i=function(t){var e=r(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}})(e)};function o(){}var u=function(t){return null==t?o:function(){return this.querySelector(t)}};function a(){return[]}var s=function(t){return null==t?a:function(){return this.querySelectorAll(t)}},c=function(t){return function(){return this.matches(t)}},l=function(t){return new Array(t.length)};function h(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}h.prototype={constructor:h,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 f="$";function _(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 h(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function p(t,n,e,r,i,o,u){var a,s,c,l={},_=n.length,p=o.length,y=new Array(_);for(a=0;a<_;++a)(s=n[a])&&(y[a]=c=f+u.call(s,s.__data__,a,n),c in l?i[a]=s:l[c]=s);for(a=0;a<p;++a)(s=l[c=f+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],l[c]=null):e[a]=new h(t,o[a]);for(a=0;a<_;++a)(s=n[a])&&l[y[a]]===s&&(i[a]=s)}function y(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var v=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function g(t,n){return t.style.getPropertyValue(n)||v(t).getComputedStyle(t,null).getPropertyValue(n)}function d(t){return t.trim().split(/^|\s+/)}function x(t){return t.classList||new m(t)}function m(t){this._node=t,this._names=d(t.getAttribute("class")||"")}function w(t,n){for(var e=x(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function M(t,n){for(var e=x(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}m.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}};function b(){this.textContent=""}function T(){this.innerHTML=""}function N(){this.nextSibling&&this.parentNode.appendChild(this)}function k(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function A(){return null}function C(){var t=this.parentNode;t&&t.removeChild(this)}function S(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function E(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var D={};(t.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(D={mouseenter:"mouseover",mouseleave:"mouseout"}));function U(t,n,e){return t=F(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function F(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function P(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 Y(t,n,e){var r=D.hasOwnProperty(t.type)?U:F;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 q(t,n,e){var r=v(t),i=r.CustomEvent;"function"==typeof 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)}var L=[null];function H(t,n){this._groups=t,this._parents=n}function j(){return new H([[document.documentElement]],L)}H.prototype=j.prototype={constructor:H,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,s=n[i],c=s.length,l=r[i]=new Array(c),h=0;h<c;++h)(o=s[h])&&(a=t.call(o,o.__data__,h,s))&&("__data__"in o&&(a.__data__=o.__data__),l[h]=a);return new H(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],c=a.length,l=0;l<c;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new H(r,i)},filter:function(t){"function"!=typeof t&&(t=c(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]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new H(r,this._parents)},data:function(t,n){if(!t)return v=new Array(this.size()),l=-1,this.each(function(t){v[++l]=t}),v;var e,r=n?p:_,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),c=new Array(u),l=0;l<u;++l){var h=i[l],f=o[l],y=f.length,v=t.call(h,h&&h.__data__,l,i),g=v.length,d=s[l]=new Array(g),x=a[l]=new Array(g);r(h,f,d,x,c[l]=new Array(y),v,n);for(var m,w,M=0,b=0;M<g;++M)if(m=d[M]){for(M>=b&&(b=M+1);!(w=x[b])&&++b<g;);m._next=w||null}}return(a=new H(a,i))._enter=s,a._exit=c,a},enter:function(){return new H(this._enter||this._groups.map(l),this._parents)},exit:function(){return new H(this._exit||this._groups.map(l),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge: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),_=0;_<h;++_)(s=c[_]||l[_])&&(f[_]=s);for(;a<r;++a)u[a]=n[a];return new H(u,this._parents)},order: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&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=y);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 H(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node: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},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each: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},attr:function(t,n){var e=r(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(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(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):g(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=d(t+"");if(arguments.length<2){for(var r=x(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?w:M)(this,t)}}:n?function(t){return function(){w(this,t)}}:function(t){return function(){M(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?b:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?T:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(N)},lower:function(){return this.each(k)},append:function(t){var n="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:i(t),r=null==n?A:"function"==typeof n?n:u(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(C)},clone:function(t){return this.select(t?E:S)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(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}})}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?Y:P,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},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return q(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return q(this,t,n)}})(t,n))}};var z=function(t){return"string"==typeof t?new H([[document.querySelector(t)]],[document.documentElement]):new H([[t]],L)},O=function(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e},X=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())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},R={value:function(){}};function I(){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 $(r)}function $(t){this._=t}function V(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function Z(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=R,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}$.prototype=I.prototype={constructor:$,on:function(t,n){var e,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),u=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++u<a;)if(e=(t=o[u]).type)i[e]=Z(i[e],t.name,n);else if(null==n)for(e in i)i[e]=Z(i[e],t.name,null);return this}for(;++u<a;)if((e=(t=o[u]).type)&&(e=V(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new $(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(o=0,e=(r=this._[t]).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 B,W,Q=0,J=0,G=0,K=1e3,tt=0,nt=0,et=0,rt="object"==typeof performance&&performance.now?performance:Date,it="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ot(){return nt||(it(ut),nt=rt.now()+et)}function ut(){nt=0}function at(){this._call=this._time=this._next=null}function st(t,n,e){var r=new at;return r.restart(t,n,e),r}function ct(){nt=(tt=rt.now())+et,Q=J=0;try{!function(){ot(),++Q;for(var t,n=B;n;)(t=nt-n._time)>=0&&n._call.call(null,t),n=n._next;--Q}()}finally{Q=0,function(){var t,n,e=B,r=1/0;for(;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:B=n);W=t,ht(r)}(),nt=0}}function lt(){var t=rt.now(),n=t-tt;n>K&&(et-=n,tt=t)}function ht(t){Q||(J&&(J=clearTimeout(J)),t-nt>24?(t<1/0&&(J=setTimeout(ct,t-rt.now()-et)),G&&(G=clearInterval(G))):(G||(tt=rt.now(),G=setInterval(lt,K)),Q=1,it(ct)))}at.prototype=st.prototype={constructor:at,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ot():+e)+(null==n?0:+n),this._next||W===this||(W?W._next=this:B=this,W=this),this._call=t,this._time=e,ht()},stop:function(){this._call&&(this._call=null,this._time=1/0,ht())}};var ft=function(t,n,e){var r=new at;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},_t=I("start","end","cancel","interrupt"),pt=[],yt=0,vt=1,gt=2,dt=3,xt=4,mt=5,wt=6,Mt=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var c,l,h,f;if(e.state!==vt)return a();for(c in i)if((f=i[c]).name===e.name){if(f.state===dt)return ft(o);f.state===xt?(f.state=wt,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<n&&(f.state=wt,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(ft(function(){e.state===dt&&(e.state=xt,e.timer.restart(u,e.delay,e.time),u(s))}),e.state=gt,e.on.call("start",t,t.__data__,e.index,e.group),e.state===gt){for(e.state=dt,r=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))&&(r[++l]=f);r.length=l+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=mt,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);e.state===mt&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=wt,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=st(function(t){e.state=vt,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)},0,e.time)}(t,e,{name:n,index:r,group:i,on:_t,tween:pt,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:yt})};function bt(t,n){var e=Nt(t,n);if(e.state>yt)throw new Error("too late; already scheduled");return e}function Tt(t,n){var e=Nt(t,n);if(e.state>dt)throw new Error("too late; already running");return e}function Nt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var kt=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function At(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Ct(){}var St="\\s*([+-]?\\d+)\\s*",Et="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ut=/^#([0-9a-f]{3})$/,Ft=/^#([0-9a-f]{6})$/,Pt=new RegExp("^rgb\\("+[St,St,St]+"\\)$"),Yt=new RegExp("^rgb\\("+[Dt,Dt,Dt]+"\\)$"),qt=new RegExp("^rgba\\("+[St,St,St,Et]+"\\)$"),Lt=new RegExp("^rgba\\("+[Dt,Dt,Dt,Et]+"\\)$"),Ht=new RegExp("^hsl\\("+[Et,Dt,Dt]+"\\)$"),jt=new RegExp("^hsla\\("+[Et,Dt,Dt,Et]+"\\)$"),zt={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};function Ot(t){var n;return t=(t+"").trim().toLowerCase(),(n=Ut.exec(t))?new Vt((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Ft.exec(t))?Xt(parseInt(n[1],16)):(n=Pt.exec(t))?new Vt(n[1],n[2],n[3],1):(n=Yt.exec(t))?new Vt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=qt.exec(t))?Rt(n[1],n[2],n[3],n[4]):(n=Lt.exec(t))?Rt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Ht.exec(t))?Bt(n[1],n[2]/100,n[3]/100,1):(n=jt.exec(t))?Bt(n[1],n[2]/100,n[3]/100,n[4]):zt.hasOwnProperty(t)?Xt(zt[t]):"transparent"===t?new Vt(NaN,NaN,NaN,0):null}function Xt(t){return new Vt(t>>16&255,t>>8&255,255&t,1)}function Rt(t,n,e,r){return r<=0&&(t=n=e=NaN),new Vt(t,n,e,r)}function It(t){return t instanceof Ct||(t=Ot(t)),t?new Vt((t=t.rgb()).r,t.g,t.b,t.opacity):new Vt}function $t(t,n,e,r){return 1===arguments.length?It(t):new Vt(t,n,e,null==r?1:r)}function Vt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Zt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Bt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Wt(t,n,e,r)}function Wt(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)}kt(Ct,Ot,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),kt(Vt,$t,At(Ct,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Vt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Vt(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},hex:function(){return"#"+Zt(this.r)+Zt(this.g)+Zt(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(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+")")}})),kt(Wt,function(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Wt)return new Wt(t.h,t.s,t.l,t.opacity);if(t instanceof Ct||(t=Ot(t)),!t)return new Wt;if(t instanceof Wt)return t;var n=(t=t.rgb()).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 Wt(u,a,s,t.opacity)}(t):new Wt(t,n,e,null==r?1:r)},At(Ct,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Wt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Wt(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 Vt(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 Jt=Math.PI/180,Gt=180/Math.PI,Kt=.96422,tn=1,nn=.82521,en=4/29,rn=6/29,on=3*rn*rn,un=rn*rn*rn;function an(t){if(t instanceof sn)return new sn(t.l,t.a,t.b,t.opacity);if(t instanceof _n){if(isNaN(t.h))return new sn(t.l,0,0,t.opacity);var n=t.h*Jt;return new sn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Vt||(t=It(t));var e,r,i=fn(t.r),o=fn(t.g),u=fn(t.b),a=cn((.2225045*i+.7168786*o+.0606169*u)/tn);return i===o&&o===u?e=r=a:(e=cn((.4360747*i+.3850649*o+.1430804*u)/Kt),r=cn((.0139322*i+.0971045*o+.7141733*u)/nn)),new sn(116*a-16,500*(e-a),200*(a-r),t.opacity)}function sn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function cn(t){return t>un?Math.pow(t,1/3):t/on+en}function ln(t){return t>rn?t*t*t:on*(t-en)}function hn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function fn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _n(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}kt(sn,function(t,n,e,r){return 1===arguments.length?an(t):new sn(t,n,e,null==r?1:r)},At(Ct,{brighter:function(t){return new sn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new sn(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 new Vt(hn(3.1338561*(n=Kt*ln(n))-1.6168667*(t=tn*ln(t))-.4906146*(e=nn*ln(e))),hn(-.9787684*n+1.9161415*t+.033454*e),hn(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),kt(_n,function(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof _n)return new _n(t.h,t.c,t.l,t.opacity);if(t instanceof sn||(t=an(t)),0===t.a&&0===t.b)return new _n(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Gt;return new _n(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new _n(t,n,e,null==r?1:r)},At(Ct,{brighter:function(t){return new _n(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new _n(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return an(this).rgb()}}));var pn=-.14861,yn=1.78277,vn=-.29227,gn=-.90649,dn=1.97294,xn=dn*gn,mn=dn*yn,wn=yn*vn-gn*pn;function Mn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof bn)return new bn(t.h,t.s,t.l,t.opacity);t instanceof Vt||(t=It(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(wn*r+xn*n-mn*e)/(wn+xn-mn),o=r-i,u=(dn*(e-i)-vn*o)/gn,a=Math.sqrt(u*u+o*o)/(dn*i*(1-i)),s=a?Math.atan2(u,o)*Gt-120:NaN;return new bn(s<0?s+360:s,a,i,t.opacity)}(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}kt(bn,Mn,At(Ct,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new bn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new bn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Jt,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Vt(255*(n+e*(pn*r+yn*i)),255*(n+e*(vn*r+gn*i)),255*(n+e*(dn*r)),this.opacity)}}));var Tn=function(t){return function(){return t}};function Nn(t,n){return function(e){return t+e*n}}function kn(t){return 1==(t=+t)?An:function(n,e){return e-n?function(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)}}(n,e,t):Tn(isNaN(n)?e:n)}}function An(t,n){var e=n-t;return e?Nn(t,e):Tn(isNaN(t)?n:t)}var Cn=function t(n){var e=kn(n);function r(t,n){var r=e((t=$t(t)).r,(n=$t(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=An(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1),Sn=function(t,n){return n-=t=+t,function(e){return t+n*e}},En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dn=new RegExp(En.source,"g");var Un,Fn,Pn,Yn,qn=function(t,n){var e,r,i,o=En.lastIndex=Dn.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=En.exec(t))&&(r=Dn.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:Sn(e,r)})),o=Dn.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(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("")})},Ln=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?Tn(n):("number"===r?Sn:"string"===r?(e=Ot(n))?(n=e,Cn):qn:n instanceof Ot?Cn:n instanceof Date?function(t,n){var e=new Date;return n-=t=+t,function(r){return e.setTime(t+n*r),e}}:Array.isArray(n)?function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),u=new Array(r);for(e=0;e<i;++e)o[e]=Ln(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}}:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?function(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Ln(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}:Sn)(t,n)},Hn=function(t,n){return n-=t=+t,function(e){return Math.round(t+n*e)}},jn=180/Math.PI,zn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},On=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)*jn,skewX:Math.atan(s)*jn,scaleX:u,scaleY:a}};function Xn(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(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:Sn(t,i)},{i:s-2,x:Sn(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(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:Sn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Sn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(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:Sn(t,e)},{i:a-2,x:Sn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var Rn=Xn(function(t){return"none"===t?zn:(Un||(Un=document.createElement("DIV"),Fn=document.documentElement,Pn=document.defaultView),Un.style.transform=t,t=Pn.getComputedStyle(Fn.appendChild(Un),null).getPropertyValue("transform"),Fn.removeChild(Un),t=t.slice(7,-1).split(","),On(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),In=Xn(function(t){return null==t?zn:(Yn||(Yn=document.createElementNS("http://www.w3.org/2000/svg","g")),Yn.setAttribute("transform",t),(t=Yn.transform.baseVal.consolidate())?(t=t.matrix,On(t.a,t.b,t.c,t.d,t.e,t.f)):zn)},", ",")",")");Math.SQRT2;function $n(t){return function n(e){function r(n,r){var i=t((n=Mn(n)).h,(r=Mn(r)).h),o=An(n.s,r.s),u=An(n.l,r.l),a=An(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)}$n(function(t,n){var e=n-t;return e?Nn(t,e>180||e<-180?e-360*Math.round(e/360):e):Tn(isNaN(t)?n:t)});$n(An);function Vn(t,n,e){var r=t._id;return t.each(function(){var t=Tt(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return Nt(t,r).value[n]}}var Zn=function(t,n){var e;return("number"==typeof n?Sn:n instanceof Ot?Cn:(e=Ot(n))?(n=e,Cn):qn)(t,n)};var Bn=j.prototype.constructor;function Wn(t){return function(){this.style.removeProperty(t)}}var Qn=0;function Jn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Gn(){return++Qn}var Kn=j.prototype;Jn.prototype=function(t){return j().transition(t)}.prototype={constructor:Jn,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,c,l=r[a],h=l.length,f=o[a]=new Array(h),_=0;_<h;++_)(s=l[_])&&(c=t.call(s,s.__data__,_,l))&&("__data__"in s&&(c.__data__=s.__data__),f[_]=c,Mt(f[_],n,e,_,f,Nt(s,e)));return new Jn(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=s(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var c,l=r[a],h=l.length,f=0;f<h;++f)if(c=l[f]){for(var _,p=t.call(c,c.__data__,f,l),y=Nt(c,e),v=0,g=p.length;v<g;++v)(_=p[v])&&Mt(_,n,e,v,p,y);o.push(p),u.push(c)}return new Jn(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=c(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]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new Jn(r,this._parents,this._name,this._id)},merge: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),_=0;_<h;++_)(s=c[_]||l[_])&&(f[_]=s);for(;a<r;++a)u[a]=n[a];return new Jn(u,this._parents,this._name,this._id)},selection:function(){return new Bn(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Gn(),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=Nt(u,n);Mt(u,t,e,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Jn(r,this._parents,t,e)},call:Kn.call,nodes:Kn.nodes,node:Kn.node,size:Kn.size,empty:Kn.empty,each:Kn.each,on:function(t,n){var e=this._id;return arguments.length<2?Nt(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?bt:Tt;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=r(t),i="transform"===e?In:Zn;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}})(e,i,Vn(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}})(e,i,n))},attrTween: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 i=r(t);return this.tween(e,(i.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n(e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n(e))}}(t,i)),e}return i._value=n,i})(i,n))},style:function(t,n,e){var r="transform"==(t+="")?Rn:Zn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=g(this,t),u=(this.style.removeProperty(t),g(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,Wn(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=g(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=g(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,Vn(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=Tt(this,t),c=s.on,l=null==s.value[u]?o||(o=Wn(n)):void 0;c===e&&i===l||(r=(e=c).copy()).on(a,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=g(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween: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,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n(r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Vn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Nt(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?function(t,n){var e,r;return function(){var i=Tt(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}:function(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Tt(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}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){bt(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){bt(this,t).delay=n}})(n,t)):Nt(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){Tt(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){Tt(this,t).duration=n}})(n,t)):Nt(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){Tt(this,t).ease=n}}(n,t)):Nt(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each(function(){var e=Tt(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n})})}};(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);var te=2*Math.PI,ne=(function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=te);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*te)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=te);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*te)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=te);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*te)},i.period=function(e){return t(n,e)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function ee(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return ne.time=ot(),ne;return e}j.prototype.interrupt=function(t){return this.each(function(){!function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>gt&&e.state<mt,e.state=wt,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}(this,t)})},j.prototype.transition=function(t){var n,e;t instanceof Jn?(n=t._id,t=t._name):(n=Gn(),(e=ne).time=ot(),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])&&Mt(u,t,n,c,a,e||ee(u,n));return new Jn(r,this._parents,t,n)};function re(){}function ie(t,n){var e=new re;if(t instanceof re)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}re.prototype=ie.prototype={constructor:re,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)}};function oe(){return{}}function ue(t,n,e){t[n]=e}function ae(){return ie()}function se(t,n,e){t.set(n,e)}function ce(){}var le=ie.prototype;ce.prototype=function(t,n){var e=new ce;if(t instanceof ce)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}.prototype={constructor:ce,has:le.has,add:function(t){return this["$"+(t+="")]=t,this},remove:le.remove,clear:le.clear,values:le.keys,size:le.size,empty:le.empty,each:le.each};var he=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},fe=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return he(n(t),e)}),{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}}};fe(he).right;var _e=function(t){return t};function pe(t,n,...e){return function t(r,i){if(i>=e.length)return n(r);const o=function(t,n){const e=new Map;let r=-1;for(const i of t){const o=n(i,++r,t),u=e.get(o);u?u.push(i):e.set(o,[i])}return e}(r,e[i]);return new Map(Array.from(o,([n,e])=>[n,t(e,i+1)]))}(t,0)}var ye=Array.prototype;ye.slice,ye.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var ve={},ge={},de=34,xe=10,me=13;function we(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Me(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 be(t,n){var e=t+"",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function Te(t){var n,e=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((n=t.getUTCFullYear())<0?"-"+be(-n,6):n>9999?"+"+be(n,6):be(n,4))+"-"+be(t.getUTCMonth()+1,2)+"-"+be(t.getUTCDate(),2)+(o?"T"+be(e,2)+":"+be(r,2)+":"+be(i,2)+"."+be(o,3)+"Z":i?"T"+be(e,2)+":"+be(r,2)+":"+be(i,2)+"Z":r||e?"T"+be(e,2)+":"+be(r,2)+"Z":"")}var Ne=function(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,u=0,a=0,s=o<=0,c=!1;function l(){if(s)return ge;if(c)return c=!1,ve;var n,r,i=u;if(t.charCodeAt(i)===de){for(;u++<o&&t.charCodeAt(u)!==de||t.charCodeAt(++u)===de;);return(n=u)>=o?s=!0:(r=t.charCodeAt(u++))===xe?c=!0:r===me&&(c=!0,t.charCodeAt(u)===xe&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u<o;){if((r=t.charCodeAt(n=u++))===xe)c=!0;else if(r===me)c=!0,t.charCodeAt(u)===xe&&++u;else if(r!==e)continue;return t.slice(i,n)}return s=!0,t.slice(i,o)}for(t.charCodeAt(o-1)===xe&&--o,t.charCodeAt(o-1)===me&&--o;(r=l())!==ge;){for(var h=[];r!==ve&&r!==ge;)h.push(r),r=l();n&&null==(h=n(h,a++))||i.push(h)}return i}function i(n,e){return n.map(function(n){return e.map(function(t){return u(n[t])}).join(t)})}function o(n){return n.map(u).join(t)}function u(t){return null==t?"":t instanceof Date?Te(t):n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,i,o=r(t,function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=we(t);return function(r,i){return n(e(r),i,t)}}(t,n):we(t)});return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=Me(n)),[e.map(u).join(t)].concat(i(n,e)).join("\n")},formatBody:function(t,n){return null==n&&(n=Me(t)),i(t,n).join("\n")},formatRows:function(t){return t.map(o).join("\n")}}},ke=Ne(",").parse,Ae=Ne("\t").parse;function Ce(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var Se=Math.PI,Ee=2*Se,De=Ee-1e-6;function Ue(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Fe(){return new Ue}Ue.prototype=Fe.prototype={constructor:Ue,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,_=r-u,p=a*a+s*s,y=f*f+_*_,v=Math.sqrt(p),g=Math.sqrt(h),d=i*Math.tan((Se-Math.acos((p+h-y)/(2*v*g)))/2),x=d/g,m=d/v;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*c)+","+(n+x*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*_)+","+(this._x1=t+m*a)+","+(this._y1=n+m*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n;var u=(e=+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%Ee+Ee),h>De?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>=Se)+","+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._}};var Pe=function(t){return function(){return t}},Ye=Math.abs,qe=Math.atan2,Le=Math.cos,He=Math.max,je=Math.min,ze=Math.sin,Oe=Math.sqrt,Xe=1e-12,Re=Math.PI,Ie=Re/2,$e=2*Re;function Ve(t){return t>=1?Ie:t<=-1?-Ie:Math.asin(t)}function Ze(t){return t.innerRadius}function Be(t){return t.outerRadius}function We(t){return t.startAngle}function Qe(t){return t.endAngle}function Je(t){return t&&t.padAngle}function Ge(t,n,e,r,i,o,u){var a=t-e,s=n-r,c=(u?o:-o)/Oe(a*a+s*s),l=c*s,h=-c*a,f=t+l,_=n+h,p=e+l,y=r+h,v=(f+p)/2,g=(_+y)/2,d=p-f,x=y-_,m=d*d+x*x,w=i-o,M=f*y-p*_,b=(x<0?-1:1)*Oe(He(0,w*w*m-M*M)),T=(M*x-d*b)/m,N=(-M*d-x*b)/m,k=(M*x+d*b)/m,A=(-M*d+x*b)/m,C=T-v,S=N-g,E=k-v,D=A-g;return C*C+S*S>E*E+D*D&&(T=k,N=A),{cx:T,cy:N,x01:-l,y01:-h,x11:T*(i/w-1),y11:N*(i/w-1)}}function Ke(t){this._context=t}Ke.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 tr=function(t){return new Ke(t)};function nr(t){return t[0]}function er(t){return t[1]}var rr=function(){var t=nr,n=er,e=Pe(!0),r=null,i=tr,o=null;function u(u){var a,s,c,l=u.length,h=!1;for(null==r&&(o=i(c=Fe())),a=0;a<=l;++a)!(a<l&&e(s=u[a],a,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(s,a,u),+n(s,a,u));if(c)return o=null,c+""||null}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Pe(+n),u):t},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Pe(+t),u):n},u.defined=function(t){return arguments.length?(e="function"==typeof t?t:Pe(!!t),u):e},u.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),u):i},u.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),u):r},u};or(tr);function ir(t){this._curve=t}function or(t){function n(n){return new ir(t(n))}return n._curve=t,n}ir.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};Array.prototype.slice;var ur=function(){};function ar(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function sr(t){this._context=t}function cr(t,n){this._basis=new sr(t),this._beta=n}function lr(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function hr(t,n){this._context=t,this._k=(1-n)/6}sr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ar(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ar(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},cr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,s=-1;++s<=e;)r=s/e,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*u),this._beta*n[s]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}},function t(n){function e(t){return 1===n?new sr(t):new cr(t,n)}return e.beta=function(n){return t(+n)},e}(.85),hr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:lr(this,this._x1,this._y1)}(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,this._x1=t,this._y1=n;break;case 2:this._point=3;default:lr(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var fr=function t(n){function e(t){return new hr(t,n)}return e.tension=function(n){return t(+n)},e}(0);function _r(t,n){this._context=t,this._k=(1-n)/6}function pr(t,n){this._context=t,this._k=(1-n)/6}function yr(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>Xe){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>Xe){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-n*t._l12_2a)/l,u=(u*c+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function vr(t,n){this._context=t,this._alpha=n}function gr(t,n){this._context=t,this._alpha=n}function dr(t,n){this._context=t,this._alpha=n}function xr(t){return t<0?-1:1}function mr(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(xr(o)+xr(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function wr(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Mr(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 br(t){this._context=t}function Tr(t){this._context=t}_r.prototype={areaStart:ur,areaEnd:ur,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:lr(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(t){return new _r(t,n)}return e.tension=function(n){return t(+n)},e}(0),pr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:lr(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(t){return new pr(t,n)}return e.tension=function(n){return t(+n)},e}(0),vr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}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;default:yr(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(t){return n?new vr(t,n):new hr(t,0)}return e.alpha=function(n){return t(+n)},e}(.5),gr.prototype={areaStart:ur,areaEnd:ur,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:yr(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(t){return n?new gr(t,n):new _r(t,0)}return e.alpha=function(n){return t(+n)},e}(.5),dr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yr(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(t){return n?new dr(t,n):new pr(t,0)}return e.alpha=function(n){return t(+n)},e}(.5),br.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:Mr(this,this._t0,wr(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(n=+n,(t=+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,Mr(this,wr(this,e=mr(this,t,n)),e);break;default:Mr(this,this._t0,e=mr(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(function(t){this._context=new Tr(t)}.prototype=Object.create(br.prototype)).point=function(t,n){br.prototype.point.call(this,n,t)},Tr.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)}};var Nr=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},kr=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return Nr(n(t),e)}),{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}}};var Ar=kr(Nr).right;var Cr=Array.prototype,Sr=(Cr.slice,Cr.map,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}),Er=Math.sqrt(50),Dr=Math.sqrt(10),Ur=Math.sqrt(2),Fr=function(t,n,e){var r,i,o,u,a=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(u=Pr(t,n,e))||!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));++a<i;)o[a]=(t+a)*u;else for(t=Math.floor(t*u),n=Math.ceil(n*u),o=new Array(i=Math.ceil(t-n+1));++a<i;)o[a]=(t-a)/u;return r&&o.reverse(),o};function Pr(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>=Er?10:o>=Dr?5:o>=Ur?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Er?10:o>=Dr?5:o>=Ur?2:1)}function Yr(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>=Er?i*=10:o>=Dr?i*=5:o>=Ur&&(i*=2),n<t?-i:i}function qr(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Lr=Array.prototype,Hr=Lr.map,jr=Lr.slice,zr={name:"implicit"};function Or(){var t=ie(),n=[],e=[],r=zr;function i(i){var o=i+"",u=t.get(o);if(!u){if(r!==zr)return r;t.set(o,u=n.push(i))}return e[(u-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=ie();for(var r,o,u=-1,a=e.length;++u<a;)t.has(o=(r=e[u])+"")||t.set(o,n.push(r));return i},i.range=function(t){return arguments.length?(e=jr.call(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Or(n,e).unknown(r)},qr.apply(i,arguments),i}var Xr=function(t){return function(){return t}},Rr=function(t){return+t},Ir=[0,1];function $r(t){return t}function Vr(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:Xr(isNaN(n)?NaN:.5)}function Zr(t){var n,e=t[0],r=t[t.length-1];return e>r&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function Br(t,n,e){var r=t[0],i=t[1],o=n[0],u=n[1];return i<r?(r=Vr(i,r),o=e(u,o)):(r=Vr(r,i),o=e(o,u)),function(t){return o(r(t))}}function Wr(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),u=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<r;)i[u]=Vr(t[u],t[u+1]),o[u]=e(n[u],n[u+1]);return function(n){var e=Ar(t,n,1,r)-1;return o[e](i[e](n))}}function Qr(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Jr(){var t,n,e,r,i,o,u=Ir,a=Ir,s=Ln,c=$r;function l(){return r=Math.min(u.length,a.length)>2?Wr:Br,i=o=null,h}function h(n){return isNaN(n=+n)?e:(i||(i=r(u.map(t),a,s)))(t(c(n)))}return h.invert=function(e){return c(n((o||(o=r(a,u.map(t),Sn)))(e)))},h.domain=function(t){return arguments.length?(u=Hr.call(t,Rr),c===$r||(c=Zr(u)),l()):u.slice()},h.range=function(t){return arguments.length?(a=jr.call(t),l()):a.slice()},h.rangeRound=function(t){return a=jr.call(t),s=Hn,l()},h.clamp=function(t){return arguments.length?(c=t?Zr(u):$r,h):c!==$r},h.interpolate=function(t){return arguments.length?(s=t,l()):s},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,r){return t=e,n=r,l()}}function Gr(t,n){return Jr()(t,n)}var Kr=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)]},ti=function(t){return(t=Kr(Math.abs(t)))?t[1]:NaN},ni=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ei(t){return new ri(t)}function ri(t){if(!(n=ni.exec(t)))throw new Error("invalid format: "+t);var n;this.fill=n[1]||" ",this.align=n[2]||">",this.sign=n[3]||"-",this.symbol=n[4]||"",this.zero=!!n[5],this.width=n[6]&&+n[6],this.comma=!!n[7],this.precision=n[8]&&+n[8].slice(1),this.trim=!!n[9],this.type=n[10]||""}ei.prototype=ri.prototype,ri.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.trim?"~":"")+this.type};var ii,oi,ui,ai=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(n+1):t},si=function(t,n){var e=Kr(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")},ci={"%":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 si(100*t,n)},r:si,s:function(t,n){var e=Kr(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(ii=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")+Kr(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},li=function(t){return t},hi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];oi=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,o=[],u=0,a=n[0],s=0;i>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),o.push(t.substring(i-=a,i+a)),!((s+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}):li,i=t.currency,o=t.decimal,u=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(t.numerals):li,a=t.percent||"%";function s(t){var n=(t=ei(t)).fill,e=t.align,s=t.sign,c=t.symbol,l=t.zero,h=t.width,f=t.comma,_=t.precision,p=t.trim,y=t.type;"n"===y?(f=!0,y="g"):ci[y]||(null==_&&(_=12),p=!0,y="g"),(l||"0"===n&&"="===e)&&(l=!0,n="0",e="=");var v="$"===c?i[0]:"#"===c&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",g="$"===c?i[1]:/[%p]/.test(y)?a:"",d=ci[y],x=/[defgprs%]/.test(y);function m(t){var i,a,c,m=v,w=g;if("c"===y)w=d(t)+w,t="";else{var M=(t=+t)<0;if(t=d(Math.abs(t),_),p&&(t=ai(t)),M&&0==+t&&(M=!1),m=(M?"("===s?s:"-":"-"===s||"("===s?"":s)+m,w=("s"===y?hi[8+ii/3]:"")+w+(M&&"("===s?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}f&&!l&&(t=r(t,1/0));var b=m.length+t.length+w.length,T=b<h?new Array(h-b+1).join(n):"";switch(f&&l&&(t=r(T+t,T.length?h-w.length:1/0),T=""),e){case"<":t=m+t+w+T;break;case"=":t=m+T+t+w;break;case"^":t=T.slice(0,b=T.length>>1)+m+t+w+T.slice(b);break;default:t=T+m+t+w}return u(t)}return _=null==_?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),m.toString=function(){return t+""},m}return{format:s,formatPrefix:function(t,n){var e=s(((t=ei(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ti(n)/3))),i=Math.pow(10,-r),o=hi[8+r/3];return function(t){return e(i*t)+o}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),t.format=oi.format,ui=oi.formatPrefix;var fi=function(n,e,r,i){var o,u=Yr(n,e,r);switch((i=ei(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ti(n)/3)))-ti(Math.abs(t)))}(u,a))||(i.precision=o),ui(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,ti(n)-ti(t))+1}(u,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=function(t){return Math.max(0,-ti(Math.abs(t)))}(u))||(i.precision=o-2*("%"===i.type))}return t.format(i)};function _i(t){var n=t.domain;return t.ticks=function(t){var e=n();return Fr(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return fi(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,u=i.length-1,a=i[o],s=i[u];return s<a&&(r=a,a=s,s=r,r=o,o=u,u=r),(r=Pr(a,s,e))>0?r=Pr(a=Math.floor(a/r)*r,s=Math.ceil(s/r)*r,e):r<0&&(r=Pr(a=Math.ceil(a*r)/r,s=Math.floor(s*r)/r,e)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(s/r)*r,n(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(s*r)/r,n(i)),t},t}var pi=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),t[r]=n.floor(o),t[i]=n.ceil(u),t};var yi=new Date,vi=new Date;function gi(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,a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u<e&&e<r);return a},i.filter=function(e){return gi(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return yi.setTime(+n),vi.setTime(+r),t(yi),t(vi),Math.floor(e(yi,vi))},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}var di=gi(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});di.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?gi(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):di:null};var xi=6e4,mi=6048e5,wi=gi(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),Mi=gi(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*xi)},function(t,n){return(n-t)/xi},function(t){return t.getMinutes()}),bi=gi(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*xi)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),Ti=gi(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())*xi)/864e5},function(t){return t.getDate()-1});function Ni(t){return gi(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())*xi)/mi})}var ki=Ni(0),Ai=Ni(1),Ci=(Ni(2),Ni(3),Ni(4)),Si=(Ni(5),Ni(6),gi(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()})),Ei=gi(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()});Ei.every=function(t){return isFinite(t=Math.floor(t))&&t>0?gi(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};gi(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*xi)},function(t,n){return(n-t)/xi},function(t){return t.getUTCMinutes()}),gi(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()});var Di=gi(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});function Ui(t){return gi(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)/mi})}var Fi=Ui(0),Pi=Ui(1),Yi=(Ui(2),Ui(3),Ui(4)),qi=(Ui(5),Ui(6),gi(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()}),gi(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()}));function Li(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 Hi(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 ji(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}qi.every=function(t){return isFinite(t=Math.floor(t))&&t>0?gi(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 zi,Oi,Xi,Ri={"-":"",_:" ",0:"0"},Ii=/^\s*\d+/,$i=/^%/,Vi=/[\\^$*+?|[\]().{}]/g;function Zi(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 Bi(t){return t.replace(Vi,"\\$&")}function Wi(t){return new RegExp("^(?:"+t.map(Bi).join("|")+")","i")}function Qi(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function Ji(t,n,e){var r=Ii.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Gi(t,n,e){var r=Ii.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function Ki(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function to(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function no(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function eo(t,n,e){var r=Ii.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function ro(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function io(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 oo(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function uo(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function ao(t,n,e){var r=Ii.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function so(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function co(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function lo(t,n,e){var r=Ii.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function ho(t,n,e){var r=Ii.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function fo(t,n,e){var r=Ii.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function _o(t,n,e){var r=$i.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function po(t,n,e){var r=Ii.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function yo(t,n,e){var r=Ii.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function vo(t,n){return Zi(t.getDate(),n,2)}function go(t,n){return Zi(t.getHours(),n,2)}function xo(t,n){return Zi(t.getHours()%12||12,n,2)}function mo(t,n){return Zi(1+Ti.count(Ei(t),t),n,3)}function wo(t,n){return Zi(t.getMilliseconds(),n,3)}function Mo(t,n){return wo(t,n)+"000"}function bo(t,n){return Zi(t.getMonth()+1,n,2)}function To(t,n){return Zi(t.getMinutes(),n,2)}function No(t,n){return Zi(t.getSeconds(),n,2)}function ko(t){var n=t.getDay();return 0===n?7:n}function Ao(t,n){return Zi(ki.count(Ei(t),t),n,2)}function Co(t,n){var e=t.getDay();return t=e>=4||0===e?Ci(t):Ci.ceil(t),Zi(Ci.count(Ei(t),t)+(4===Ei(t).getDay()),n,2)}function So(t){return t.getDay()}function Eo(t,n){return Zi(Ai.count(Ei(t),t),n,2)}function Do(t,n){return Zi(t.getFullYear()%100,n,2)}function Uo(t,n){return Zi(t.getFullYear()%1e4,n,4)}function Fo(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Zi(n/60|0,"0",2)+Zi(n%60,"0",2)}function Po(t,n){return Zi(t.getUTCDate(),n,2)}function Yo(t,n){return Zi(t.getUTCHours(),n,2)}function qo(t,n){return Zi(t.getUTCHours()%12||12,n,2)}function Lo(t,n){return Zi(1+Di.count(qi(t),t),n,3)}function Ho(t,n){return Zi(t.getUTCMilliseconds(),n,3)}function jo(t,n){return Ho(t,n)+"000"}function zo(t,n){return Zi(t.getUTCMonth()+1,n,2)}function Oo(t,n){return Zi(t.getUTCMinutes(),n,2)}function Xo(t,n){return Zi(t.getUTCSeconds(),n,2)}function Ro(t){var n=t.getUTCDay();return 0===n?7:n}function Io(t,n){return Zi(Fi.count(qi(t),t),n,2)}function $o(t,n){var e=t.getUTCDay();return t=e>=4||0===e?Yi(t):Yi.ceil(t),Zi(Yi.count(qi(t),t)+(4===qi(t).getUTCDay()),n,2)}function Vo(t){return t.getUTCDay()}function Zo(t,n){return Zi(Pi.count(qi(t),t),n,2)}function Bo(t,n){return Zi(t.getUTCFullYear()%100,n,2)}function Wo(t,n){return Zi(t.getUTCFullYear()%1e4,n,4)}function Qo(){return"+0000"}function Jo(){return"%"}function Go(t){return+t}function Ko(t){return Math.floor(+t/1e3)}!function(n){zi=function(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,s=t.shortMonths,c=Wi(i),l=Qi(i),h=Wi(o),f=Qi(o),_=Wi(u),p=Qi(u),y=Wi(a),v=Qi(a),g=Wi(s),d=Qi(s),x={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:vo,e:vo,f:Mo,H:go,I:xo,j:mo,L:wo,m:bo,M:To,p:function(t){return i[+(t.getHours()>=12)]},Q:Go,s:Ko,S:No,u:ko,U:Ao,V:Co,w:So,W:Eo,x:null,X:null,y:Do,Y:Uo,Z:Fo,"%":Jo},m={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Po,e:Po,f:jo,H:Yo,I:qo,j:Lo,L:Ho,m:zo,M:Oo,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Go,s:Ko,S:Xo,u:Ro,U:Io,V:$o,w:Vo,W:Zo,x:null,X:null,y:Bo,Y:Wo,Z:Qo,"%":Jo},w={a:function(t,n,e){var r=_.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=h.exec(n.slice(e));return r?(t.w=f[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=d[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=v[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:uo,e:uo,f:fo,H:so,I:so,j:ao,L:ho,m:oo,M:co,p:function(t,n,e){var r=c.exec(n.slice(e));return r?(t.p=l[r[0].toLowerCase()],e+r[0].length):-1},Q:po,s:yo,S:lo,u:Gi,U:Ki,V:to,w:Ji,W:no,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:ro,Y:eo,Z:io,"%":_o};function M(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=Ri[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 b(t,n){return function(e){var r,i,o=ji(1900);if(T(o,t,e+="",0)!=e.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=(r=Hi(ji(o.y))).getUTCDay())>4||0===i?Pi.ceil(r):Pi(r),r=Di.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(i=(r=n(ji(o.y))).getDay())>4||0===i?Ai.ceil(r):Ai(r),r=Ti.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Hi(ji(o.y)).getUTCDay():n(ji(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Hi(o)):n(o)}}function T(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=w[i in Ri?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return x.x=M(e,x),x.X=M(r,x),x.c=M(n,x),m.x=M(e,m),m.X=M(r,m),m.c=M(n,m),{format:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},parse:function(t){var n=b(t+="",Li);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=b(t,Hi);return n.toString=function(){return t},n}}}(n),t.timeFormat=zi.format,zi.parse,Oi=zi.utcFormat,Xi=zi.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"]});Date.prototype.toISOString||Oi("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||Xi("%Y-%m-%dT%H:%M:%S.%LZ");var tu=1e3,nu=60*tu,eu=60*nu,ru=24*eu,iu=7*ru,ou=30*ru,uu=365*ru;function au(t){return new Date(t)}function su(t){return t instanceof Date?+t:+new Date(+t)}var cu=Array.prototype.slice,lu=function(t){return t},hu=1,fu=2,_u=3,pu=4,yu=1e-6;function vu(t){return"translate("+(t+.5)+",0)"}function gu(t){return"translate(0,"+(t+.5)+")"}function du(){return!this.__axis}function xu(t,n){var e=[],r=null,i=null,o=6,u=6,a=3,s=t===hu||t===pu?-1:1,c=t===pu||t===fu?"x":"y",l=t===hu||t===_u?vu:gu;function h(h){var f=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,_=null==i?n.tickFormat?n.tickFormat.apply(n,e):lu:i,p=Math.max(o,0)+a,y=n.range(),v=+y[0]+.5,g=+y[y.length-1]+.5,d=(n.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}:function(t){return function(n){return+t(n)}})(n.copy()),x=h.selection?h.selection():h,m=x.selectAll(".domain").data([null]),w=x.selectAll(".tick").data(f,n).order(),M=w.exit(),b=w.enter().append("g").attr("class","tick"),T=w.select("line"),N=w.select("text");m=m.merge(m.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(b),T=T.merge(b.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),N=N.merge(b.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",t===hu?"0em":t===_u?"0.71em":"0.32em")),h!==x&&(m=m.transition(h),w=w.transition(h),T=T.transition(h),N=N.transition(h),M=M.transition(h).attr("opacity",yu).attr("transform",function(t){return isFinite(t=d(t))?l(t):this.getAttribute("transform")}),b.attr("opacity",yu).attr("transform",function(t){var n=this.parentNode.__axis;return l(n&&isFinite(n=n(t))?n:d(t))})),M.remove(),m.attr("d",t===pu||t==fu?u?"M"+s*u+","+v+"H0.5V"+g+"H"+s*u:"M0.5,"+v+"V"+g:u?"M"+v+","+s*u+"V0.5H"+g+"V"+s*u:"M"+v+",0.5H"+g),w.attr("opacity",1).attr("transform",function(t){return l(d(t))}),T.attr(c+"2",s*o),N.attr(c,s*p).text(_),x.filter(du).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===fu?"start":t===pu?"end":"middle"),x.each(function(){this.__axis=d})}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=cu.call(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:cu.call(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:cu.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=u=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(u=+t,h):u},h.tickPadding=function(t){return arguments.length?(a=+t,h):a},h}var mu=function(t,n){var e,r,i,o,u=I("beforesend","progress","load","error"),a=ie(),s=new XMLHttpRequest,c=null,l=null,h=0;function f(t){var n,r=s.status;if(!r&&function(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}(s)||r>=200&&r<300||304===r){if(i)try{n=i.call(e,s)}catch(t){return void u.call("error",e,t)}else n=s;u.call("load",e,n)}else u.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=f:s.onreadystatechange=function(t){s.readyState>3&&f(t)},s.onprogress=function(t){u.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a.get(t):(null==n?a.remove(t):a.set(t,n+""),e)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",e):r},responseType:function(t){return arguments.length?(o=t,e):o},timeout:function(t){return arguments.length?(h=+t,e):h},user:function(t){return arguments.length<1?c:(c=null==t?null:t+"",e)},password:function(t){return arguments.length<1?l:(l=null==t?null:t+"",e)},response:function(t){return i=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,i,f){return s.open(n,t,!0,c,l),null==r||a.has("accept")||a.set("accept",r+",*/*"),s.setRequestHeader&&a.each(function(t,n){s.setRequestHeader(n,t)}),null!=r&&s.overrideMimeType&&s.overrideMimeType(r),null!=o&&(s.responseType=o),h>0&&(s.timeout=h),null==f&&"function"==typeof i&&(f=i,i=null),null!=f&&1===f.length&&(f=function(t){return function(n,e){t(null==n?e:null)}}(f)),null!=f&&e.on("error",f).on("load",function(t){f(null,t)}),u.call("beforesend",e,s),s.send(null==i?null:i),e},abort:function(){return s.abort(),e},on:function(){var t=u.on.apply(u,arguments);return t===u?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e};var wu=function(t,n){return function(e,r){var i=mu(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}};wu("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),wu("application/json",function(t){return JSON.parse(t.responseText)}),wu("text/plain",function(t){return t.responseText}),wu("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});var Mu=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=mu(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},o.row(r),i?o.get(i):o}};var bu=Mu("text/csv",ke);Mu("text/tab-separated-values",Ae);function Tu(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,s,c,l,h,f,_=t._root,p={data:r},y=t._x0,v=t._y0,g=t._x1,d=t._y1;if(!_)return t._root=p,t;for(;_.length;)if((c=n>=(o=(y+g)/2))?y=o:g=o,(l=e>=(u=(v+d)/2))?v=u:d=u,i=_,!(_=_[h=l<<1|c]))return i[h]=p,t;if(a=+t._x.call(null,_.data),s=+t._y.call(null,_.data),n===a&&e===s)return p.next=_,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(c=n>=(o=(y+g)/2))?y=o:g=o,(l=e>=(u=(v+d)/2))?v=u:d=u}while((h=l<<1|c)==(f=(s>=u)<<1|a>=o));return i[f]=_,i[h]=p,t}var Nu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function ku(t){return t[0]}function Au(t){return t[1]}function Cu(t,n,e){var r=new Su(null==n?ku:n,null==e?Au:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Su(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 Eu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Du=Cu.prototype=Su.prototype;Du.copy=function(){var t,n,e=new Su(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=Eu(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]=Eu(n));return e},Du.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Tu(this.cover(n,e),n,e,t)},Du.addAll=function(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));if(s>l||c>h)return this;for(this.cover(s,c).cover(l,h),e=0;e<o;++e)Tu(this,u[e],a[e],t[e]);return this},Du.cover=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{for(var u,a,s=i-e,c=this._root;e>t||t>=i||r>n||n>=o;)switch(a=(n<r)<<1|t<e,(u=new Array(4))[a]=c,c=u,s*=2,a){case 0:i=e+s,o=r+s;break;case 1:e=i-s,o=r+s;break;case 2:i=e+s,r=o-s;break;case 3:e=i-s,r=o-s}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Du.data=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},Du.extent=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]]},Du.find=function(t,n,e){var r,i,o,u,a,s,c,l=this._x0,h=this._y0,f=this._x1,_=this._y1,p=[],y=this._root;for(y&&p.push(new Nu(y,l,h,f,_)),null==e?e=1/0:(l=t-e,h=n-e,f=t+e,_=n+e,e*=e);s=p.pop();)if(!(!(y=s.node)||(i=s.x0)>f||(o=s.y0)>_||(u=s.x1)<l||(a=s.y1)<h))if(y.length){var v=(i+u)/2,g=(o+a)/2;p.push(new Nu(y[3],v,g,u,a),new Nu(y[2],i,g,v,a),new Nu(y[1],v,o,u,g),new Nu(y[0],i,o,v,g)),(c=(n>=g)<<1|t>=v)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=s)}else{var d=t-+this._x.call(null,y.data),x=n-+this._y.call(null,y.data),m=d*d+x*x;if(m<e){var w=Math.sqrt(e=m);l=t-w,h=n-w,f=t+w,_=n+w,r=y.data}}return r},Du.remove=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,_=this._root,p=this._x0,y=this._y0,v=this._x1,g=this._y1;if(!_)return this;if(_.length)for(;;){if((c=o>=(a=(p+v)/2))?p=a:v=a,(l=u>=(s=(y+g)/2))?y=s:g=s,n=_,!(_=_[h=l<<1|c]))return this;if(!_.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,f=h)}for(;_.data!==t;)if(r=_,!(_=_.next))return this;return(i=_.next)&&delete _.next,r?(i?r.next=i:delete r.next,this):n?(i?n[h]=i:delete n[h],(_=n[0]||n[1]||n[2]||n[3])&&_===(n[3]||n[2]||n[1]||n[0])&&!_.length&&(e?e[f]=_:this._root=_),this):(this._root=i,this)},Du.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Du.root=function(){return this._root},Du.size=function(){var t=0;return this.visit(function(n){if(!n.length)do{++t}while(n=n.next)}),t},Du.visit=function(t){var n,e,r,i,o,u,a=[],s=this._root;for(s&&a.push(new Nu(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 Nu(e,c,l,o,u)),(e=s[2])&&a.push(new Nu(e,r,l,c,u)),(e=s[1])&&a.push(new Nu(e,c,i,o,l)),(e=s[0])&&a.push(new Nu(e,r,i,c,l))}return this},Du.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Nu(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 Nu(o,u,a,l,h)),(o=i[1])&&e.push(new Nu(o,l,a,s,h)),(o=i[2])&&e.push(new Nu(o,u,h,l,c)),(o=i[3])&&e.push(new Nu(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},Du.x=function(t){return arguments.length?(this._x=t,this):this._x},Du.y=function(t){return arguments.length?(this._y=t,this):this._y};var Uu=function(t){return function(){return t}},Fu=function(){return 1e-6*(Math.random()-.5)};function Pu(t){return t.x+t.vx}function Yu(t){return t.y+t.vy}function qu(t){return t.x}function Lu(t){return t.y}var Hu=10,ju=Math.PI*(3-Math.sqrt(5));t.select=z,t.selectAll=function(t){return"string"==typeof t?new H([document.querySelectorAll(t)],[document.documentElement]):new H([null==t?[]:t],L)},t.mouse=function(t){var n=O();return n.changedTouches&&(n=n.changedTouches[0]),X(t,n)},t.dispatch=I,t.nest=function(){var t,n,e,r=[],i=[];function o(e,i,u,a){if(i>=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var s,c,l,h=-1,f=e.length,_=r[i++],p=ie(),y=u();++h<f;)(l=p.get(s=_(c=e[h])+""))?l.push(c):p.set(s,[c]);return p.each(function(t,n){a(y,n,o(t,i,u,a))}),y}return e={object:function(t){return o(t,0,oe,ue)},map:function(t){return o(t,0,ae,se)},entries:function(t){return function t(e,o){if(++o>r.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each(function(n,e){u.push({key:e,values:t(n,o)})})),null!=a?u.sort(function(t,n){return a(t.key,n.key)}):u}(o(t,0,ae,se),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}},t.min=function(t,n){let e;if(void 0===n)for(let n of t)null!=n&&n>=n&&(void 0===e||e>n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&(void 0===e||e>i)&&(e=i)}return e},t.max=function(t,n){let e;if(void 0===n)for(let n of t)null!=n&&n>=n&&(void 0===e||e<n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&(void 0===e||e<i)&&(e=i)}return e},t.bisector=fe,t.range=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},t.group=function(t,...n){return pe(t,_e,...n)},t.json=function(t,n){return fetch(t,n).then(Ce)},t.line=rr,t.curveCardinal=fr,t.arc=function(){var t=Ze,n=Be,e=Pe(0),r=null,i=We,o=Qe,u=Je,a=null;function s(){var s,c,l,h=+t.apply(this,arguments),f=+n.apply(this,arguments),_=i.apply(this,arguments)-Ie,p=o.apply(this,arguments)-Ie,y=Ye(p-_),v=p>_;if(a||(a=s=Fe()),f<h&&(c=f,f=h,h=c),f>Xe)if(y>$e-Xe)a.moveTo(f*Le(_),f*ze(_)),a.arc(0,0,f,_,p,!v),h>Xe&&(a.moveTo(h*Le(p),h*ze(p)),a.arc(0,0,h,p,_,v));else{var g,d,x=_,m=p,w=_,M=p,b=y,T=y,N=u.apply(this,arguments)/2,k=N>Xe&&(r?+r.apply(this,arguments):Oe(h*h+f*f)),A=je(Ye(f-h)/2,+e.apply(this,arguments)),C=A,S=A;if(k>Xe){var E=Ve(k/h*ze(N)),D=Ve(k/f*ze(N));(b-=2*E)>Xe?(w+=E*=v?1:-1,M-=E):(b=0,w=M=(_+p)/2),(T-=2*D)>Xe?(x+=D*=v?1:-1,m-=D):(T=0,x=m=(_+p)/2)}var U=f*Le(x),F=f*ze(x),P=h*Le(M),Y=h*ze(M);if(A>Xe){var q,L=f*Le(m),H=f*ze(m),j=h*Le(w),z=h*ze(w);if(y<Re&&(q=function(t,n,e,r,i,o,u,a){var s=e-t,c=r-n,l=u-i,h=a-o,f=h*s-l*c;if(!(f*f<Xe))return[t+(f=(l*(n-o)-h*(t-i))/f)*s,n+f*c]}(U,F,j,z,L,H,P,Y))){var O=U-q[0],X=F-q[1],R=L-q[0],I=H-q[1],$=1/ze(((l=(O*R+X*I)/(Oe(O*O+X*X)*Oe(R*R+I*I)))>1?0:l<-1?Re:Math.acos(l))/2),V=Oe(q[0]*q[0]+q[1]*q[1]);C=je(A,(h-V)/($-1)),S=je(A,(f-V)/($+1))}}T>Xe?S>Xe?(g=Ge(j,z,U,F,f,S,v),d=Ge(L,H,P,Y,f,S,v),a.moveTo(g.cx+g.x01,g.cy+g.y01),S<A?a.arc(g.cx,g.cy,S,qe(g.y01,g.x01),qe(d.y01,d.x01),!v):(a.arc(g.cx,g.cy,S,qe(g.y01,g.x01),qe(g.y11,g.x11),!v),a.arc(0,0,f,qe(g.cy+g.y11,g.cx+g.x11),qe(d.cy+d.y11,d.cx+d.x11),!v),a.arc(d.cx,d.cy,S,qe(d.y11,d.x11),qe(d.y01,d.x01),!v))):(a.moveTo(U,F),a.arc(0,0,f,x,m,!v)):a.moveTo(U,F),h>Xe&&b>Xe?C>Xe?(g=Ge(P,Y,L,H,h,-C,v),d=Ge(U,F,j,z,h,-C,v),a.lineTo(g.cx+g.x01,g.cy+g.y01),C<A?a.arc(g.cx,g.cy,C,qe(g.y01,g.x01),qe(d.y01,d.x01),!v):(a.arc(g.cx,g.cy,C,qe(g.y01,g.x01),qe(g.y11,g.x11),!v),a.arc(0,0,h,qe(g.cy+g.y11,g.cx+g.x11),qe(d.cy+d.y11,d.cx+d.x11),v),a.arc(d.cx,d.cy,C,qe(d.y11,d.x11),qe(d.y01,d.x01),!v))):a.arc(0,0,h,M,w,v):a.lineTo(P,Y)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Re/2;return[Le(r)*e,ze(r)*e]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:Pe(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Pe(+t),s):n},s.cornerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Pe(+t),s):e},s.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Pe(+t),s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pe(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Pe(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:Pe(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s},t.curveLinear=tr,t.area=function(){var t=nr,n=null,e=Pe(0),r=er,i=Pe(!0),o=null,u=tr,a=null;function s(s){var c,l,h,f,_,p=s.length,y=!1,v=new Array(p),g=new Array(p);for(null==o&&(a=u(_=Fe())),c=0;c<=p;++c){if(!(c<p&&i(f=s[c],c,s))===y)if(y=!y)l=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=c-1;h>=l;--h)a.point(v[h],g[h]);a.lineEnd(),a.areaEnd()}y&&(v[c]=+t(f,c,s),g[c]=+e(f,c,s),a.point(n?+n(f,c,s):v[c],r?+r(f,c,s):g[c]))}if(_)return a=null,_+""||null}function c(){return rr().defined(i).curve(u).context(o)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:Pe(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:Pe(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Pe(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Pe(+t),r=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:Pe(+t),s):e},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Pe(+t),s):r},s.lineX0=s.lineY0=function(){return c().x(t).y(e)},s.lineY1=function(){return c().x(t).y(r)},s.lineX1=function(){return c().x(n).y(e)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:Pe(!!t),s):i},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s},t.scaleTime=function(){return qr.apply(function t(n,e,r,i,o,u,a,s,c){var l=Gr($r,$r),h=l.invert,f=l.domain,_=c(".%L"),p=c(":%S"),y=c("%I:%M"),v=c("%I %p"),g=c("%a %d"),d=c("%b %d"),x=c("%B"),m=c("%Y"),w=[[a,1,tu],[a,5,5*tu],[a,15,15*tu],[a,30,30*tu],[u,1,nu],[u,5,5*nu],[u,15,15*nu],[u,30,30*nu],[o,1,eu],[o,3,3*eu],[o,6,6*eu],[o,12,12*eu],[i,1,ru],[i,2,2*ru],[r,1,iu],[e,1,ou],[e,3,3*ou],[n,1,uu]];function M(t){return(a(t)<t?_:u(t)<t?p:o(t)<t?y:i(t)<t?v:e(t)<t?r(t)<t?g:d:n(t)<t?x:m)(t)}function b(t,e,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-e)/t,u=kr(function(t){return t[2]}).right(w,o);u===w.length?(i=Yr(e/uu,r/uu,t),t=n):u?(i=(u=w[o/w[u-1][2]<w[u][2]/o?u-1:u])[1],t=u[0]):(i=Math.max(Yr(e,r,t),1),t=s)}return null==i?t:t.every(i)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Hr.call(t,su)):f().map(au)},l.ticks=function(t,n){var e,r=f(),i=r[0],o=r[r.length-1],u=o<i;return u&&(e=i,i=o,o=e),e=(e=b(t,i,o,n))?e.range(i,o+1):[],u?e.reverse():e},l.tickFormat=function(t,n){return null==n?M:c(n)},l.nice=function(t,n){var e=f();return(t=b(t,e[0],e[e.length-1],n))?f(pi(e,t)):l},l.copy=function(){return Qr(l,t(n,e,r,i,o,u,a,s,c))},l}(Ei,Si,ki,Ti,bi,Mi,wi,di,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleLinear=function t(){var n=Gr($r,$r);return n.copy=function(){return Qr(n,t())},qr.apply(n,arguments),_i(n)},t.scaleOrdinal=Or,t.scaleBand=function t(){var n,e,r=Or().unknown(void 0),i=r.domain,o=r.range,u=[0,1],a=!1,s=0,c=0,l=.5;function h(){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 _=Sr(t).map(function(t){return h+n*t});return o(r?_.reverse():_)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),h()):i()},r.range=function(t){return arguments.length?(u=[+t[0],+t[1]],h()):u.slice()},r.rangeRound=function(t){return u=[+t[0],+t[1]],a=!0,h()},r.bandwidth=function(){return e},r.step=function(){return n},r.round=function(t){return arguments.length?(a=!!t,h()):a},r.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),h()):s},r.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),h()):s},r.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},r.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),h()):l},r.copy=function(){return t(i(),u).round(a).paddingInner(s).paddingOuter(c).align(l)},qr.apply(h(),arguments)},t.axisBottom=function(t){return xu(_u,t)},t.axisLeft=function(t){return xu(pu,t)},t.csv=bu,t.forceSimulation=function(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),o=0,u=.6,a=new Map,s=st(l),c=I("tick","end");function l(){h(),c.call("tick",n),e<r&&(s.stop(),c.call("end",n))}function h(r){var s,c,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(e+=(o-e)*i,a.forEach(function(t){t(e)}),s=0;s<l;++s)null==(c=t[s]).fx?c.x+=c.vx*=u:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=u:(c.y=c.fy,c.vy=0);return n}function f(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,isNaN(n.fx)||(n.x=n.fx),isNaN(n.fy)||(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var i=Hu*Math.sqrt(e),o=e*ju;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function _(n){return n.initialize&&n.initialize(t),n}return null==t&&(t=[]),f(),n={tick:h,restart:function(){return s.restart(l),n},stop:function(){return s.stop(),n},nodes:function(e){return arguments.length?(t=e,f(),a.forEach(_),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(u=1-t,n):1-u},force:function(t,e){return arguments.length>1?(null==e?a.delete(t):a.set(t,_(e)),n):a.get(t)},find:function(n,e,r){var i,o,u,a,s,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)(u=(i=n-(a=t[c]).x)*i+(o=e-a.y)*o)<r&&(s=a,r=u);return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}},t.forceManyBody=function(){var t,n,e,r,i=Uu(-30),o=1,u=1/0,a=.81;function s(r){var i,o=t.length,u=Cu(t,qu,Lu).visitAfter(l);for(e=r,i=0;i<o;++i)n=t[i],u.visit(h)}function c(){if(t){var n,e,o=t.length;for(r=new Array(o),n=0;n<o;++n)e=t[n],r[e.index]=+i(e,n,t)}}function l(t){var n,e,i,o,u,a=0,s=0;if(t.length){for(i=o=u=0;u<4;++u)(n=t[u])&&(e=Math.abs(n.value))&&(a+=n.value,s+=e,i+=e*n.x,o+=e*n.y);t.x=i/s,t.y=o/s}else{(n=t).x=n.data.x,n.y=n.data.y;do{a+=r[n.data.index]}while(n=n.next)}t.value=a}function h(t,i,s,c){if(!t.value)return!0;var l=t.x-n.x,h=t.y-n.y,f=c-i,_=l*l+h*h;if(f*f/a<_)return _<u&&(0===l&&(_+=(l=Fu())*l),0===h&&(_+=(h=Fu())*h),_<o&&(_=Math.sqrt(o*_)),n.vx+=l*t.value*e/_,n.vy+=h*t.value*e/_),!0;if(!(t.length||_>=u)){(t.data!==n||t.next)&&(0===l&&(_+=(l=Fu())*l),0===h&&(_+=(h=Fu())*h),_<o&&(_=Math.sqrt(o*_)));do{t.data!==n&&(f=r[t.data.index]*e/_,n.vx+=l*f,n.vy+=h*f)}while(t=t.next)}}return s.initialize=function(n){t=n,c()},s.strength=function(t){return arguments.length?(i="function"==typeof t?t:Uu(+t),c(),s):i},s.distanceMin=function(t){return arguments.length?(o=t*t,s):Math.sqrt(o)},s.distanceMax=function(t){return arguments.length?(u=t*t,s):Math.sqrt(u)},s.theta=function(t){return arguments.length?(a=t*t,s):Math.sqrt(a)},s},t.forceX=function(t){var n,e,r,i=Uu(.1);function o(t){for(var i,o=0,u=n.length;o<u;++o)(i=n[o]).vx+=(r[o]-i.x)*e[o]*t}function u(){if(n){var o,u=n.length;for(e=new Array(u),r=new Array(u),o=0;o<u;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return"function"!=typeof t&&(t=Uu(null==t?0:+t)),o.initialize=function(t){n=t,u()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Uu(+t),u(),o):i},o.x=function(n){return arguments.length?(t="function"==typeof n?n:Uu(+n),u(),o):t},o},t.forceY=function(t){var n,e,r,i=Uu(.1);function o(t){for(var i,o=0,u=n.length;o<u;++o)(i=n[o]).vy+=(r[o]-i.y)*e[o]*t}function u(){if(n){var o,u=n.length;for(e=new Array(u),r=new Array(u),o=0;o<u;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return"function"!=typeof t&&(t=Uu(null==t?0:+t)),o.initialize=function(t){n=t,u()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Uu(+t),u(),o):i},o.y=function(n){return arguments.length?(t="function"==typeof n?n:Uu(+n),u(),o):t},o},t.forceCollide=function(t){var n,e,r=1,i=1;function o(){for(var t,o,a,s,c,l,h,f=n.length,_=0;_<i;++_)for(o=Cu(n,Pu,Yu).visitAfter(u),t=0;t<f;++t)a=n[t],l=e[a.index],h=l*l,s=a.x+a.vx,c=a.y+a.vy,o.visit(p);function p(t,n,e,i,o){var u=t.data,f=t.r,_=l+f;if(!u)return n>s+_||i<s-_||e>c+_||o<c-_;if(u.index>a.index){var p=s-u.x-u.vx,y=c-u.y-u.vy,v=p*p+y*y;v<_*_&&(0===p&&(v+=(p=Fu())*p),0===y&&(v+=(y=Fu())*y),v=(_-(v=Math.sqrt(v)))/v*r,a.vx+=(p*=v)*(_=(f*=f)/(h+f)),a.vy+=(y*=v)*_,u.vx-=p*(_=1-_),u.vy-=y*_)}}}function u(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function a(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r<o;++r)i=n[r],e[i.index]=+t(i,r,n)}}return"function"!=typeof t&&(t=Uu(null==t?1:+t)),o.initialize=function(t){n=t,a()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(n){return arguments.length?(t="function"==typeof n?n:Uu(+n),a(),o):t},o},t.forceCenter=function(t,n){var e;function r(){var r,i,o=e.length,u=0,a=0;for(r=0;r<o;++r)u+=(i=e[r]).x,a+=i.y;for(u=u/o-t,a=a/o-n,r=0;r<o;++r)(i=e[r]).x-=u,i.y-=a}return null==t&&(t=0),null==n&&(n=0),r.initialize=function(t){e=t},r.x=function(n){return arguments.length?(t=+n,r):t},r.y=function(t){return arguments.length?(n=+t,r):n},r},t.easeLinear=function(t){return+t},Object.defineProperty(t,"__esModule",{value:!0})});