This repository has been archived by the owner on Jun 17, 2023. It is now read-only.
/
d3.v4.0.0-alpha.46.min.js
7 lines (7 loc) · 174 KB
/
d3.v4.0.0-alpha.46.min.js
1
2
3
4
5
6
7
// https://d3js.org Version 4.0.0-alpha.46. Copyright 2016 Mike Bostock.
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function e(t){return 1===t.length&&(t=r(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);i>r;){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);i>r;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}function r(t){return function(e,r){return n(t(e),r)}}function i(t,n){return t>n?-1:n>t?1:n>=t?0:NaN}function o(t){return null===t?NaN:+t}function a(t,n){var e,r,i=t.length,a=0,u=0,c=-1,s=0;if(null==n)for(;++c<i;)isNaN(e=o(t[c]))||(r=e-a,a+=r/++s,u+=r*(e-a));else for(;++c<i;)isNaN(e=o(n(t[c],c,t)))||(r=e-a,a+=r/++s,u+=r*(e-a));return s>1?u/(s-1):void 0}function u(t,n){var e=a(t,n);return e?Math.sqrt(e):e}function c(t,n){var e,r,i,o=-1,a=t.length;if(null==n){for(;++o<a;)if(null!=(r=t[o])&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=t[o])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=n(t[o],o,t))&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=n(t[o],o,t))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]}function s(t){return function(){return t}}function f(t){return t}function h(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):3>i?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}function l(t,n,e){var r=d(t,n,e);return h(Math.ceil(t/r)*r,Math.floor(n/r)*r+r/2,r)}function d(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>=Hh?i*=10:o>=Xh?i*=5:o>=jh&&(i*=2),t>n?-i:i}function p(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function _(){function t(t){var i,o,a=t.length,u=new Array(a);for(i=0;a>i;++i)u[i]=n(t[i],i,t);var c=e(u),s=c[0],f=c[1],h=r(u,s,f);Array.isArray(h)||(h=l(s,f,h));for(var d=h.length;h[0]<=s;)h.shift(),--d;for(;h[d-1]>=f;)h.pop(),--d;var p,_=new Array(d+1);for(i=0;d>=i;++i)p=_[i]=[],p.x0=i>0?h[i-1]:s,p.x1=d>i?h[i]:f;for(i=0;a>i;++i)o=u[i],o>=s&&f>=o&&_[Oh(h,o,0,d)].push(t[i]);return _}var n=f,e=c,r=p;return t.value=function(e){return arguments.length?(n="function"==typeof e?e:s(e),t):n},t.domain=function(n){return arguments.length?(e="function"==typeof n?n:s([n[0],n[1]]),t):e},t.thresholds=function(n){return arguments.length?(r="function"==typeof n?n:s(Array.isArray(n)?Yh.call(n):n),t):r},t}function y(t,n,e){if(null==e&&(e=o),r=t.length){if((n=+n)<=0||2>r)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),u=+e(t[a],a,t),c=+e(t[a+1],a+1,t);return u+(c-u)*(i-a)}}function v(t,e,r){return t=Bh.call(t,o).sort(n),Math.ceil((r-e)/(2*(y(t,.75)-y(t,.25))*Math.pow(t.length,-1/3)))}function g(t,n,e){return Math.ceil((e-n)/(3.5*u(t)*Math.pow(t.length,-1/3)))}function m(t,n){var e,r,i=-1,o=t.length;if(null==n){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<o;)if(null!=(r=n(t[i],i,t))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n(t[i],i,t))&&r>e&&(e=r)}return e}function x(t,n){var e,r=0,i=t.length,a=-1,u=i;if(null==n)for(;++a<i;)isNaN(e=o(t[a]))?--u:r+=e;else for(;++a<i;)isNaN(e=o(n(t[a],a,t)))?--u:r+=e;return u?r/u:void 0}function b(t,e){var r,i=[],a=t.length,u=-1;if(null==e)for(;++u<a;)isNaN(r=o(t[u]))||i.push(r);else for(;++u<a;)isNaN(r=o(e(t[u],u,t)))||i.push(r);return y(i.sort(n),.5)}function w(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--a]=r[n];return e}function M(t,n){var e,r,i=-1,o=t.length;if(null==n){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<o;)if(null!=(r=n(t[i],i,t))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n(t[i],i,t))&&e>r&&(e=r)}return e}function k(t){for(var n=0,e=t.length-1,r=t[0],i=new Array(0>e?0:e);e>n;)i[n]=[r,r=t[++n]];return i}function T(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r}function N(t,e){if(r=t.length){var r,i,o=0,a=0,u=t[a];for(e||(e=n);++o<r;)(e(i=t[o],u)<0||0!==e(u,u))&&(u=i,a=o);return 0===e(u,u)?a:void 0}}function A(t,n,e){for(var r,i,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t}function C(t,n){var e,r=0,i=t.length,o=-1;if(null==n)for(;++o<i;)(e=+t[o])&&(r+=e);else for(;++o<i;)(e=+n(t[o],o,t))&&(r+=e);return r}function S(t){if(!(i=t.length))return[];for(var n=-1,e=M(t,E),r=new Array(e);++n<e;)for(var i,o=-1,a=r[n]=new Array(i);++o<i;)a[o]=t[o][n];return r}function E(t){return t.length}function z(){return S(arguments)}function P(){}function L(t,n){var e=new P;if(t instanceof P)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 a in t)e.set(a,t[a]);return e}function q(){function t(n,i,a,u){if(i>=o.length)return null!=r?r(n):null!=e?n.sort(e):n;for(var c,s,f,h=-1,l=n.length,d=o[i++],p=L(),_=a();++h<l;)(f=p.get(c=d(s=n[h])+""))?f.push(s):p.set(c,[s]);return p.each(function(n,e){u(_,e,t(n,i,a,u))}),_}function n(t,e){if(++e>o.length)return t;var i,u=a[e-1];return null!=r&&e>=o.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:n(t,e)})})),null!=u?i.sort(function(t,n){return u(t.key,n.key)}):i}var e,r,i,o=[],a=[];return i={object:function(n){return t(n,0,U,R)},map:function(n){return t(n,0,D,O)},entries:function(e){return n(t(e,0,D,O),0)},key:function(t){return o.push(t),i},sortKeys:function(t){return a[o.length-1]=t,i},sortValues:function(t){return e=t,i},rollup:function(t){return r=t,i}}}function U(){return{}}function R(t,n,e){t[n]=e}function D(){return L()}function O(t,n,e){t.set(n,e)}function I(){}function F(t,n){var e=new I;if(t instanceof I)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}function Y(t){var n=[];for(var e in t)n.push(e);return n}function B(t){var n=[];for(var e in t)n.push(t[e]);return n}function H(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n}function X(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return Math.random()*n+t}}function j(t,n){var e,r;return t=null==t?0:+t,n=null==n?1:+n,function(){var i;if(null!=e)i=e,e=null;else do e=2*Math.random()-1,i=2*Math.random()-1,r=e*e+i*i;while(!r||r>1);return t+n*i*Math.sqrt(-2*Math.log(r)/r)}}function V(){var t=j.apply(this,arguments);return function(){return Math.exp(t())}}function W(t){return function(){for(var n=0,e=0;t>e;++e)n+=Math.random();return n}}function $(t){var n=W(t);return function(){return n()/t}}function Z(t){return function(){return-Math.log(1-Math.random())/t}}function J(t){return+t}function Q(t){return t*t}function G(t){return t*(2-t)}function K(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function tt(t){return t*t*t}function nt(t){return--t*t*t+1}function et(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function rt(t){return 1-Math.cos(t*Kh)}function it(t){return Math.sin(t*Kh)}function ot(t){return(1-Math.cos(Gh*t))/2}function at(t){return Math.pow(2,10*t-10)}function ut(t){return 1-Math.pow(2,-10*t)}function ct(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function st(t){return 1-Math.sqrt(1-t*t)}function ft(t){return Math.sqrt(1- --t*t)}function ht(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function lt(t){return 1-dt(1-t)}function dt(t){return(t=+t)<tl?sl*t*t:el>t?sl*(t-=nl)*t+rl:ol>t?sl*(t-=il)*t+al:sl*(t-=ul)*t+cl}function pt(t){return((t*=2)<=1?1-dt(1-t):dt(t-1)+1)/2}function _t(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2}function yt(t){for(var n,e,r=-1,i=t.length,o=0,a=0,u=t[i-1],c=0;++r<i;)n=u,u=t[r],c+=e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return c*=3,[o/c,a/c]}function vt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function gt(t,n){return t[0]-n[0]||t[1]-n[1]}function mt(t){for(var n=t.length,e=[0,1],r=2,i=2;n>i;++i){for(;r>1&&vt(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function xt(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;e>n;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(gt),n=0;e>n;++n)i[n]=[r[n][0],-r[n][1]];var o=mt(r),a=mt(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],s=[];for(n=o.length-1;n>=0;--n)s.push(t[r[o[n]][2]]);for(n=+u;n<a.length-c;++n)s.push(t[r[a[n]][2]]);return s}function bt(t,n){for(var e,r,i=t.length,o=t[i-1],a=n[0],u=n[1],c=o[0],s=o[1],f=!1,h=0;i>h;++h)o=t[h],e=o[0],r=o[1],r>u!=s>u&&(c-e)*(u-r)/(s-r)+e>a&&(f=!f),c=e,s=r;return f}function wt(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r<i;)n=a,e=u,o=t[r],a=o[0],u=o[1],n-=a,e-=u,c+=Math.sqrt(n*n+e*e);return c}function Mt(){this._x0=this._y0=this._x1=this._y1=null,this._=[]}function kt(){return new Mt}function Tt(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Nt(this.cover(n,e),n,e,t)}function Nt(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,c,s,f,h,l,d=t._root,p={data:r},_=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((s=n>=(o=(_+v)/2))?_=o:v=o,(f=e>=(a=(y+g)/2))?y=a:g=a,i=d,!(d=d[h=f<<1|s]))return i[h]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[h]=p:t._root=p,t;do i=i?i[h]=new Array(4):t._root=new Array(4),(s=n>=(o=(_+v)/2))?_=o:v=o,(f=e>=(a=(y+g)/2))?y=a:g=a;while((h=f<<1|s)===(l=(c>=a)<<1|u>=o));return i[l]=d,i[h]=p,t}function At(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,s=1/0,f=-(1/0),h=-(1/0);for(e=0;o>e;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(a[e]=r,u[e]=i,c>r&&(c=r),r>f&&(f=r),s>i&&(s=i),i>h&&(h=i));for(c>f&&(c=this._x0,f=this._x1),s>h&&(s=this._y0,h=this._y1),this.cover(c,s).cover(f,h),e=0;o>e;++e)Nt(this,a[e],u[e],t[e]);return this}function Ct(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{if(!(e>t||t>i||r>n||n>o))return this;var a,u,c=i-e,s=this._root;switch(u=((r+o)/2>n)<<1|(e+i)/2>t){case 0:do a=new Array(4),a[u]=s,s=a;while(c*=2,i=e+c,o=r+c,t>i||n>o);break;case 1:do a=new Array(4),a[u]=s,s=a;while(c*=2,e=i-c,o=r+c,e>t||n>o);break;case 2:do a=new Array(4),a[u]=s,s=a;while(c*=2,i=e+c,r=o-c,t>i||r>n);break;case 3:do a=new Array(4),a[u]=s,s=a;while(c*=2,e=i-c,r=o-c,e>t||r>n)}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this}function St(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t}function Et(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]]}function zt(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Pt(t,n,e){var r,i,o,a,u,c,s,f=this._x0,h=this._y0,l=this._x1,d=this._y1,p=[],_=this._root;for(_&&p.push(new zt(_,f,h,l,d)),null==e?e=1/0:(f=t-e,h=n-e,l=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(_=c.node)||(i=c.x0)>l||(o=c.y0)>d||(a=c.x1)<f||(u=c.y1)<h))if(_.length){var y=(i+a)/2,v=(o+u)/2;p.push(new zt(_[3],y,v,a,u),new zt(_[2],i,v,y,u),new zt(_[1],y,o,a,v),new zt(_[0],i,o,y,v)),(s=(n>=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-s],p[p.length-1-s]=c)}else{var g=t-+this._x.call(null,_.data),m=n-+this._y.call(null,_.data),x=g*g+m*m;if(e>x){var b=Math.sqrt(e=x);f=t-b,h=n-b,l=t+b,d=n+b,r=_.data}}return r}function Lt(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,c,s,f,h,l,d=this._root,p=this._x0,_=this._y0,y=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((s=o>=(u=(p+y)/2))?p=u:y=u,(f=a>=(c=(_+v)/2))?_=c:v=c,n=d,!(d=d[h=f<<1|s]))return this;if(!d.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,l=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[h]=i:delete n[h],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[l]=d:this._root=d),this):(this._root=i,this)}function qt(t){for(var n=0,e=t.length;e>n;++n)this.remove(t[n]);return this}function Ut(){return this._root}function Rt(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t}function Dt(t){var n,e,r,i,o,a,u=[],c=this._root;for(c&&u.push(new zt(c,this._x0,this._y0,this._x1,this._y1));n=u.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,a=n.y1)&&c.length){var s=(r+o)/2,f=(i+a)/2;(e=c[3])&&u.push(new zt(e,s,f,o,a)),(e=c[2])&&u.push(new zt(e,r,f,s,a)),(e=c[1])&&u.push(new zt(e,s,i,o,f)),(e=c[0])&&u.push(new zt(e,r,i,s,f))}return this}function Ot(t){var n,e=[],r=[];for(this._root&&e.push(new zt(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,c=n.x1,s=n.y1,f=(a+c)/2,h=(u+s)/2;(o=i[0])&&e.push(new zt(o,a,u,f,h)),(o=i[1])&&e.push(new zt(o,f,u,c,h)),(o=i[2])&&e.push(new zt(o,a,h,f,s)),(o=i[3])&&e.push(new zt(o,f,h,c,s))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this}function It(t){return t[0]}function Ft(t){return arguments.length?(this._x=t,this):this._x}function Yt(t){return t[1]}function Bt(t){return arguments.length?(this._y=t,this):this._y}function Ht(t,n,e){var r=new Xt(null==n?It:n,null==e?Yt:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Xt(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 jt(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function Vt(t){if(!(t>=1))throw new Error;this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function Wt(t){if(!t._start)try{$t(t)}catch(n){t._tasks[t._ended+t._active-1]&&Jt(t,n)}}function $t(t){for(;t._start=t._waiting&&t._active<t._size;){var n=t._ended+t._active,e=t._tasks[n],r=e.length-1,i=e[r];e[r]=Zt(t,n),--t._waiting,++t._active,e=i.apply(null,e),t._tasks[n]&&(t._tasks[n]=e||Nl)}}function Zt(t,n){return function(e,r){t._tasks[n]&&(--t._active,++t._ended,t._tasks[n]=null,null==t._error&&(null!=e?Jt(t,e):(t._data[n]=r,t._waiting?Wt(t):Qt(t))))}}function Jt(t,n){var e,r=t._tasks.length;for(t._error=n,t._data=void 0,t._waiting=NaN;--r>=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,Qt(t)}function Qt(t){!t._active&&t._call&&t._call(t._error,t._data)}function Gt(t){return new Vt(arguments.length?+t:1/0)}function Kt(t){return function(){return t}}function tn(t){return t.innerRadius}function nn(t){return t.outerRadius}function en(t){return t.startAngle}function rn(t){return t.endAngle}function on(t){return t&&t.padAngle}function an(t){return t>=1?Sl:-1>=t?-Sl:Math.asin(t)}function un(t,n,e,r,i,o,a,u){var c=e-t,s=r-n,f=a-i,h=u-o,l=(f*(n-o)-h*(t-i))/(h*c-f*s);return[t+l*c,n+l*s]}function cn(t,n,e,r,i,o,a){var u=t-e,c=n-r,s=(a?o:-o)/Math.sqrt(u*u+c*c),f=s*c,h=-s*u,l=t+f,d=n+h,p=e+f,_=r+h,y=(l+p)/2,v=(d+_)/2,g=p-l,m=_-d,x=g*g+m*m,b=i-o,w=l*_-p*d,M=(0>m?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),k=(w*m-g*M)/x,T=(-w*g-m*M)/x,N=(w*m+g*M)/x,A=(-w*g+m*M)/x,C=k-y,S=T-v,E=N-y,z=A-v;return C*C+S*S>E*E+z*z&&(k=N,T=A),{cx:k,cy:T,x01:-f,y01:-h,x11:k*(i/b-1),y11:T*(i/b-1)}}function sn(){function t(){var t,s,f=+n.apply(this,arguments),h=+e.apply(this,arguments),l=o.apply(this,arguments)-Sl,d=a.apply(this,arguments)-Sl,p=Math.abs(d-l),_=d>l;if(c||(c=t=kt()),f>h&&(s=h,h=f,f=s),h>Al)if(p>El-Al)c.moveTo(h*Math.cos(l),h*Math.sin(l)),c.arc(0,0,h,l,d,!_),f>Al&&(c.moveTo(f*Math.cos(d),f*Math.sin(d)),c.arc(0,0,f,d,l,_));else{var y,v,g=l,m=d,x=l,b=d,w=p,M=p,k=u.apply(this,arguments)/2,T=k>Al&&(i?+i.apply(this,arguments):Math.sqrt(f*f+h*h)),N=Math.min(Math.abs(h-f)/2,+r.apply(this,arguments)),A=N,C=N;if(T>Al){var S=an(T/f*Math.sin(k)),E=an(T/h*Math.sin(k));(w-=2*S)>Al?(S*=_?1:-1,x+=S,b-=S):(w=0,x=b=(l+d)/2),(M-=2*E)>Al?(E*=_?1:-1,g+=E,m-=E):(M=0,g=m=(l+d)/2)}var z=h*Math.cos(g),P=h*Math.sin(g),L=f*Math.cos(b),q=f*Math.sin(b);if(N>Al){var U=h*Math.cos(m),R=h*Math.sin(m),D=f*Math.cos(x),O=f*Math.sin(x);if(Cl>p){var I=w>Al?un(z,P,D,O,U,R,L,q):[L,q],F=z-I[0],Y=P-I[1],B=U-I[0],H=R-I[1],X=1/Math.sin(Math.acos((F*B+Y*H)/(Math.sqrt(F*F+Y*Y)*Math.sqrt(B*B+H*H)))/2),j=Math.sqrt(I[0]*I[0]+I[1]*I[1]);A=Math.min(N,(f-j)/(X-1)),C=Math.min(N,(h-j)/(X+1))}}M>Al?C>Al?(y=cn(D,O,z,P,h,C,_),v=cn(U,R,L,q,h,C,_),c.moveTo(y.cx+y.x01,y.cy+y.y01),N>C?c.arc(y.cx,y.cy,C,Math.atan2(y.y01,y.x01),Math.atan2(v.y01,v.x01),!_):(c.arc(y.cx,y.cy,C,Math.atan2(y.y01,y.x01),Math.atan2(y.y11,y.x11),!_),c.arc(0,0,h,Math.atan2(y.cy+y.y11,y.cx+y.x11),Math.atan2(v.cy+v.y11,v.cx+v.x11),!_),c.arc(v.cx,v.cy,C,Math.atan2(v.y11,v.x11),Math.atan2(v.y01,v.x01),!_))):(c.moveTo(z,P),c.arc(0,0,h,g,m,!_)):c.moveTo(z,P),f>Al&&w>Al?A>Al?(y=cn(L,q,U,R,f,-A,_),v=cn(z,P,D,O,f,-A,_),c.lineTo(y.cx+y.x01,y.cy+y.y01),N>A?c.arc(y.cx,y.cy,A,Math.atan2(y.y01,y.x01),Math.atan2(v.y01,v.x01),!_):(c.arc(y.cx,y.cy,A,Math.atan2(y.y01,y.x01),Math.atan2(y.y11,y.x11),!_),c.arc(0,0,f,Math.atan2(y.cy+y.y11,y.cx+y.x11),Math.atan2(v.cy+v.y11,v.cx+v.x11),_),c.arc(v.cx,v.cy,A,Math.atan2(v.y11,v.x11),Math.atan2(v.y01,v.x01),!_))):c.arc(0,0,f,b,x,_):c.lineTo(L,q)}else c.moveTo(0,0);return c.closePath(),t?(c=null,t+""||null):void 0}var n=tn,e=nn,r=Kt(0),i=null,o=en,a=rn,u=on,c=null;return t.centroid=function(){var t=(+n.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Cl/2;return[Math.cos(r)*t,Math.sin(r)*t]},t.innerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Kt(+e),t):n},t.outerRadius=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),t):e},t.cornerRadius=function(n){return arguments.length?(r="function"==typeof n?n:Kt(+n),t):r},t.padRadius=function(n){return arguments.length?(i=null==n?null:"function"==typeof n?n:Kt(+n),t):i},t.startAngle=function(n){return arguments.length?(o="function"==typeof n?n:Kt(+n),t):o},t.endAngle=function(n){return arguments.length?(a="function"==typeof n?n:Kt(+n),t):a},t.padAngle=function(n){return arguments.length?(u="function"==typeof n?n:Kt(+n),t):u},t.context=function(n){return arguments.length?(c=null==n?null:n,t):c},t}function fn(t){this._context=t}function hn(t){return new fn(t)}function ln(t){return t[0]}function dn(t){return t[1]}function pn(){function t(t){var u,c,s,f=t.length,h=!1;for(null==i&&(a=o(s=kt())),u=0;f>=u;++u)!(f>u&&r(c=t[u],u,t))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+n(c,u,t),+e(c,u,t));return s?(a=null,s+""||null):void 0}var n=ln,e=dn,r=Kt(!0),i=null,o=hn,a=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:Kt(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),t):e},t.defined=function(n){return arguments.length?(r="function"==typeof n?n:Kt(!!n),t):r},t.curve=function(n){return arguments.length?(o=n,null!=i&&(a=o(i)),t):o},t.context=function(n){return arguments.length?(null==n?i=a=null:a=o(i=n),t):i},t}function _n(){function t(t){var n,f,h,l,d,p=t.length,_=!1,y=new Array(p),v=new Array(p);for(null==u&&(s=c(d=kt())),n=0;p>=n;++n){if(!(p>n&&a(l=t[n],n,t))===_)if(_=!_)f=n,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=n-1;h>=f;--h)s.point(y[h],v[h]);s.lineEnd(),s.areaEnd()}_&&(y[n]=+e(l,n,t),v[n]=+i(l,n,t),s.point(r?+r(l,n,t):y[n],o?+o(l,n,t):v[n]))}return d?(s=null,d+""||null):void 0}function n(){return pn().defined(a).curve(c).context(u)}var e=ln,r=null,i=Kt(0),o=dn,a=Kt(!0),u=null,c=hn,s=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),r=null,t):e},t.x0=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),t):e},t.x1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:Kt(+n),t):r},t.y=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),o=null,t):i},t.y0=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),t):i},t.y1=function(n){return arguments.length?(o=null==n?null:"function"==typeof n?n:Kt(+n),t):o},t.lineX0=t.lineY0=function(){return n().x(e).y(i)},t.lineY1=function(){return n().x(e).y(o)},t.lineX1=function(){return n().x(r).y(i)},t.defined=function(n){return arguments.length?(a="function"==typeof n?n:Kt(!!n),t):a},t.curve=function(n){return arguments.length?(c=n,null!=u&&(s=c(u)),t):c},t.context=function(n){return arguments.length?(null==n?u=s=null:s=c(u=n),t):u},t}function yn(t,n){return t>n?-1:n>t?1:n>=t?0:NaN}function vn(t){return t}function gn(){function t(t){var u,c,s,f,h,l=t.length,d=0,p=new Array(l),_=new Array(l),y=+i.apply(this,arguments),v=Math.min(El,Math.max(-El,o.apply(this,arguments)-y)),g=Math.min(Math.abs(v)/l,a.apply(this,arguments)),m=g*(0>v?-1:1);for(u=0;l>u;++u)(h=_[p[u]=u]=+n(t[u],u,t))>0&&(d+=h);for(null!=e?p.sort(function(t,n){return e(_[t],_[n])}):null!=r&&p.sort(function(n,e){return r(t[n],t[e])}),u=0,s=d?(v-l*m)/d:0;l>u;++u,y=f)c=p[u],h=_[c],f=y+(h>0?h*s:0)+m,_[c]={data:t[c],index:u,value:h,startAngle:y,endAngle:f,padAngle:g};return _}var n=vn,e=yn,r=null,i=Kt(0),o=Kt(El),a=Kt(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:Kt(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,r=null,t):e},t.sort=function(n){return arguments.length?(r=n,e=null,t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:Kt(+n),t):o},t.padAngle=function(n){return arguments.length?(a="function"==typeof n?n:Kt(+n),t):a},t}function mn(t){this._curve=t}function xn(t){function n(n){return new mn(t(n))}return n._curve=t,n}function bn(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(xn(t)):n()._curve},t}function wn(){return bn(pn().curve(zl))}function Mn(){var t=_n().curve(zl),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return bn(e())},delete t.lineX0,t.lineEndAngle=function(){return bn(r())},delete t.lineX1,t.lineInnerRadius=function(){return bn(i())},delete t.lineY0,t.lineOuterRadius=function(){return bn(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(xn(t)):n()._curve},t}function kn(){function t(){var t;return r||(r=t=kt()),n.apply(this,arguments).draw(r,+e.apply(this,arguments)),t?(r=null,t+""||null):void 0}var n=Kt(Pl),e=Kt(64),r=null;return t.type=function(e){return arguments.length?(n="function"==typeof e?e:Kt(e),t):n},t.size=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),t):e},t.context=function(n){return arguments.length?(r=null==n?null:n,t):r},t}function Tn(){}function Nn(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 An(t){this._context=t}function Cn(t){return new An(t)}function Sn(t){this._context=t}function En(t){return new Sn(t)}function zn(t){this._context=t}function Pn(t){return new zn(t)}function Ln(t,n){this._basis=new An(t),this._beta=n}function qn(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 Un(t,n){this._context=t,this._k=(1-n)/6}function Rn(t,n){this._context=t,this._k=(1-n)/6}function Dn(t,n){this._context=t,this._k=(1-n)/6}function On(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Al){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Al){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,a=(a*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function In(t,n){this._context=t,this._alpha=n}function Fn(t,n){this._context=t,this._alpha=n}function Yn(t,n){this._context=t,this._alpha=n}function Bn(t){this._context=t}function Hn(t){return new Bn(t)}function Xn(t){return 0>t?-1:1}function jn(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||0>i&&-0),a=(e-t._y1)/(i||0>r&&-0),u=(o*i+a*r)/(r+i);return(Xn(o)+Xn(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function Vn(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Wn(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function $n(t){this._context=t}function Zn(t){this._context=new Jn(t)}function Jn(t){this._context=t}function Qn(t){return new $n(t)}function Gn(t){return new Zn(t)}function Kn(t){this._context=t}function te(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;r-1>n;++n)i[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],n=1;r>n;++n)e=i[n]/o[n-1],o[n]-=e,a[n]-=e*a[n-1];for(i[r-1]=a[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;r-1>n;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function ne(t){return new Kn(t)}function ee(t,n){this._context=t,this._t=n}function re(t){return new ee(t,.5)}function ie(t){return new ee(t,0)}function oe(t){return new ee(t,1)}function ae(t,n){if((r=t.length)>1)for(var e,r,i=1,o=t[n[0]],a=o.length;r>i;++i){e=o,o=t[n[i]];for(var u=0;a>u;++u)o[u][1]+=o[u][0]=isNaN(e[u][1])?e[u][0]:e[u][1]}}function ue(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e}function ce(t,n){return t[n]}function se(){function t(t){var o,a,u=n.apply(this,arguments),c=t.length,s=u.length,f=new Array(s);for(o=0;s>o;++o){for(var h,l=u[o],d=f[o]=new Array(c),p=0;c>p;++p)d[p]=h=[0,+i(t[p],l,p,t)],h.data=t[p];d.key=l}for(o=0,a=e(f);s>o;++o)f[a[o]].index=o;return r(f,a),f}var n=Kt([]),e=ue,r=ae,i=ce;return t.keys=function(e){return arguments.length?(n="function"==typeof e?e:Kt(id.call(e)),t):n},t.value=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),t):i},t.order=function(n){return arguments.length?(e=null==n?ue:"function"==typeof n?n:Kt(id.call(n)),t):e},t.offset=function(n){return arguments.length?(r=null==n?ae:n,t):r},t}function fe(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;a>o;++o){for(i=e=0;r>e;++e)i+=t[e][o][1]||0;if(i)for(e=0;r>e;++e)t[e][o][1]/=i}ae(t,n)}}function he(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;o>r;++r){for(var a=0,u=0;e>a;++a)u+=t[a][r][1]||0;i[r][1]+=i[r][0]=-u/2}ae(t,n)}}function le(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;r>a;++a){for(var u=0,c=0,s=0;i>u;++u){for(var f=t[n[u]],h=f[a][1]||0,l=f[a-1][1]||0,d=(h-l)/2,p=0;u>p;++p){var _=t[n[p]],y=_[a][1]||0,v=_[a-1][1]||0;d+=y-v}c+=h,s+=d*h}e[a-1][1]+=e[a-1][0]=o,c&&(o-=s/c)}e[a-1][1]+=e[a-1][0]=o,ae(t,n)}}function de(t){var n=t.map(pe);return ue(t).sort(function(t,e){return n[t]-n[e]})}function pe(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}function _e(t){return de(t).reverse()}function ye(t){var n,e,r=t.length,i=t.map(pe),o=ue(t).sort(function(t,n){return i[n]-i[t]}),a=0,u=0,c=[],s=[];for(n=0;r>n;++n)e=o[n],u>a?(a+=i[e],c.push(e)):(u+=i[e],s.push(e));return s.reverse().concat(c)}function ve(t){return ue(t).reverse()}function ge(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function me(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function xe(){}function be(t){var n;return t=(t+"").trim().toLowerCase(),(n=ud.exec(t))?(n=parseInt(n[1],16),new Ne(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=cd.exec(t))?we(parseInt(n[1],16)):(n=sd.exec(t))?new Ne(n[1],n[2],n[3],1):(n=fd.exec(t))?new Ne(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=hd.exec(t))?Me(n[1],n[2],n[3],n[4]):(n=ld.exec(t))?Me(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=dd.exec(t))?Ae(n[1],n[2]/100,n[3]/100,1):(n=pd.exec(t))?Ae(n[1],n[2]/100,n[3]/100,n[4]):_d.hasOwnProperty(t)?we(_d[t]):"transparent"===t?new Ne(NaN,NaN,NaN,0):null}function we(t){return new Ne(t>>16&255,t>>8&255,255&t,1)}function Me(t,n,e,r){return 0>=r&&(t=n=e=NaN),new Ne(t,n,e,r)}function ke(t){return t instanceof xe||(t=be(t)),t?(t=t.rgb(),new Ne(t.r,t.g,t.b,t.opacity)):new Ne}function Te(t,n,e,r){return 1===arguments.length?ke(t):new Ne(t,n,e,null==r?1:r)}function Ne(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ae(t,n,e,r){return 0>=r?t=n=e=NaN:0>=e||e>=1?t=n=NaN:0>=n&&(t=NaN),new Ee(t,n,e,r)}function Ce(t){if(t instanceof Ee)return new Ee(t.h,t.s,t.l,t.opacity);if(t instanceof xe||(t=be(t)),!t)return new Ee;if(t instanceof Ee)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(r>e):e===o?(r-n)/u+2:(n-e)/u+4,u/=.5>c?o+i:2-o-i,a*=60):u=c>0&&1>c?0:a,new Ee(a,u,c,t.opacity)}function Se(t,n,e,r){return 1===arguments.length?Ce(t):new Ee(t,n,e,null==r?1:r)}function Ee(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ze(t,n,e){return 255*(60>t?n+(e-n)*t/60:180>t?e:240>t?n+(e-n)*(240-t)/60:n)}function Pe(t){if(t instanceof qe)return new qe(t.l,t.a,t.b,t.opacity);if(t instanceof Ye){var n=t.h*yd;return new qe(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Ne||(t=ke(t));var e=Oe(t.r),r=Oe(t.g),i=Oe(t.b),o=Ue((.4124564*e+.3575761*r+.1804375*i)/md),a=Ue((.2126729*e+.7151522*r+.072175*i)/xd),u=Ue((.0193339*e+.119192*r+.9503041*i)/bd);return new qe(116*a-16,500*(o-a),200*(a-u),t.opacity)}function Le(t,n,e,r){return 1===arguments.length?Pe(t):new qe(t,n,e,null==r?1:r)}function qe(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Ue(t){return t>Td?Math.pow(t,1/3):t/kd+wd}function Re(t){return t>Md?t*t*t:kd*(t-wd)}function De(t){return 255*(.0031308>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ie(t){if(t instanceof Ye)return new Ye(t.h,t.c,t.l,t.opacity);t instanceof qe||(t=Pe(t));var n=Math.atan2(t.b,t.a)*vd;return new Ye(0>n?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Fe(t,n,e,r){return 1===arguments.length?Ie(t):new Ye(t,n,e,null==r?1:r)}function Ye(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Be(t){if(t instanceof Xe)return new Xe(t.h,t.s,t.l,t.opacity);t instanceof Ne||(t=ke(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Ld*r+zd*n-Pd*e)/(Ld+zd-Pd),o=r-i,a=(Ed*(e-i)-Cd*o)/Sd,u=Math.sqrt(a*a+o*o)/(Ed*i*(1-i)),c=u?Math.atan2(a,o)*vd-120:NaN;return new Xe(0>c?c+360:c,u,i,t.opacity)}function He(t,n,e,r){return 1===arguments.length?Be(t):new Xe(t,n,e,null==r?1:r)}function Xe(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function je(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function Ve(t){var n=t.length-1;return function(e){var r=0>=e?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=n-1>r?t[r+2]:2*o-i;return je((e-r/n)*n,a,i,o,u)}}function We(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return je((e-r/n)*n,i,o,a,u)}}function $e(t){return function(){return t}}function Ze(t,n){return function(e){return t+e*n}}function Je(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Qe(t,n){var e=n-t;return e?Ze(t,e>180||-180>e?e-360*Math.round(e/360):e):$e(isNaN(t)?n:t)}function Ge(t){return 1===(t=+t)?Ke:function(n,e){return e-n?Je(n,e,t):$e(isNaN(n)?e:n)}}function Ke(t,n){var e=n-t;return e?Ze(t,e):$e(isNaN(t)?n:t)}function tr(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;i>e;++e)r=Te(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function nr(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(r),a=new Array(r);
for(e=0;i>e;++e)o[e]=ur(t[e],n[e]);for(;r>e;++e)a[e]=n[e];return function(t){for(e=0;i>e;++e)a[e]=o[e](t);return a}}function er(t,n){return t=+t,n-=t,function(e){return t+n*e}}function rr(t,n){var e,r={},i={};null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={});for(e in n)e in t?r[e]=ur(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}function ir(t){return function(){return t}}function or(t){return function(n){return t(n)+""}}function ar(t,n){var e,r,i,o=Yd.lastIndex=Bd.lastIndex=0,a=-1,u=[],c=[];for(t+="",n+="";(e=Yd.exec(t))&&(r=Bd.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:er(e,r)})),o=Bd.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?c[0]?or(c[0].x):ir(n):(n=c.length,function(t){for(var e,r=0;n>r;++r)u[(e=c[r]).i]=e.x(t);return u.join("")})}function ur(t,n){var e,r=typeof n;return null==n||"boolean"===r?$e(n):("number"===r?er:"string"===r?(e=be(n))?(n=e,Od):ar:n instanceof be?Od:Array.isArray(n)?nr:rr)(t,n)}function cr(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}}function sr(t,n,e,r,i,o){if(t*r===n*e)return null;var a=Math.sqrt(t*t+n*n);t/=a,n/=a;var u=t*e+n*r;e-=t*u,r-=n*u;var c=Math.sqrt(e*e+r*r);return e/=c,r/=c,u/=c,n*e>t*r&&(t=-t,n=-n,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Hd,skewX:Math.atan(u)*Hd,scaleX:a,scaleY:c}}function fr(t){if("none"===t)return Xd;qd||(qd=document.createElement("DIV"),Ud=document.documentElement,Rd=document.defaultView),qd.style.transform=t,t=Rd.getComputedStyle(Ud.appendChild(qd),null).getPropertyValue("transform"),Ud.removeChild(qd);var n=t.slice(7,-1).split(",");return sr(+n[0],+n[1],+n[2],+n[3],+n[4],+n[5])}function hr(t){Dd||(Dd=document.createElementNS("http://www.w3.org/2000/svg","g")),Dd.setAttribute("transform",null==t?"":t);var n=Dd.transform.baseVal.consolidate().matrix;return sr(n.a,n.b,n.c,n.d,n.e,n.f)}function lr(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function o(t,r,i,o,a,u){if(t!==i||r!==o){var c=a.push("translate(",null,n,null,e);u.push({i:c-4,x:er(t,i)},{i:c-2,x:er(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}function a(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:er(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function u(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:er(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function c(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:er(t,e)},{i:u-2,x:er(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),a(n.rotate,e.rotate,r,i),u(n.skewX,e.skewX,r,i),c(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e<o;)r[(n=i[e]).i]=n.x(t);return r.join("")}}}function dr(t){return((t=Math.exp(t))+1/t)/2}function pr(t){return((t=Math.exp(t))-1/t)/2}function _r(t){return((t=Math.exp(2*t))-1)/(t+1)}function yr(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],c=n[1],s=n[2],f=u-i,h=c-o,l=f*f+h*h;if(Jd>l)r=Math.log(s/a)/Wd,e=function(t){return[i+t*f,o+t*h,a*Math.exp(Wd*t*r)]};else{var d=Math.sqrt(l),p=(s*s-a*a+Zd*l)/(2*a*$d*d),_=(s*s-a*a-Zd*l)/(2*s*$d*d),y=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(_*_+1)-_);r=(v-y)/Wd,e=function(t){var n=t*r,e=dr(y),u=a/($d*d)*(e*_r(Wd*n+y)-pr(y));return[i+u*f,o+u*h,a*e/dr(Wd*n+y)]}}return e.duration=1e3*r,e}function vr(t){return function(n,e){var r=t((n=Se(n)).h,(e=Se(e)).h),i=Ke(n.s,e.s),o=Ke(n.l,e.l),a=Ke(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+""}}}function gr(t,n){var e=Ke((t=Le(t)).l,(n=Le(n)).l),r=Ke(t.a,n.a),i=Ke(t.b,n.b),o=Ke(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function mr(t){return function(n,e){var r=t((n=Fe(n)).h,(e=Fe(e)).h),i=Ke(n.c,e.c),o=Ke(n.l,e.l),a=Ke(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+""}}}function xr(t){return function n(e){function r(n,r){var i=t((n=He(n)).h,(r=He(r)).h),o=Ke(n.s,r.s),a=Ke(n.l,r.l),u=Ke(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}function br(t,n){for(var e=new Array(n),r=0;n>r;++r)e[r]=t(r/(n-1));return e}function wr(){for(var t,n=0,e=arguments.length,r={};e>n;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new Mr(r)}function Mr(t){this._=t}function kr(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function Tr(t,n){for(var e,r=0,i=t.length;i>r;++r)if((e=t[r]).name===n)return e.value}function Nr(t,n,e){for(var r=0,i=t.length;i>r;++r)if(t[r].name===n){t[r]=rp,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function Ar(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Cr(t,n){var e=Ar(t);return function(r,i){return n(e(r),i,t)}}function Sr(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 Er(t){function n(t,n){var r,i,o=e(t,function(t,e){return r?r(t,e-1):(i=t,void(r=n?Cr(t,n):Ar(t)))});return o.columns=i,o}function e(t,n){function e(){if(f>=s)return a;if(i)return i=!1,o;var n,e=f;if(34===t.charCodeAt(e)){for(var r=e;r++<s;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return f=r+2,n=t.charCodeAt(r+1),13===n?(i=!0,10===t.charCodeAt(r+2)&&++f):10===n&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;s>f;){var u=1;if(n=t.charCodeAt(f++),10===n)i=!0;else if(13===n)i=!0,10===t.charCodeAt(f)&&(++f,++u);else if(n!==c)continue;return t.slice(e,f-u)}return t.slice(e)}for(var r,i,o={},a={},u=[],s=t.length,f=0,h=0;(r=e())!==a;){for(var l=[];r!==o&&r!==a;)l.push(r),r=e();n&&null==(l=n(l,h++))||u.push(l)}return u}function r(n,e){return null==e&&(e=Sr(n)),[e.map(a).join(t)].concat(n.map(function(n){return e.map(function(t){return a(n[t])}).join(t)})).join("\n")}function i(t){return t.map(o).join("\n")}function o(n){return n.map(a).join(t)}function a(t){return null==t?"":u.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),c=t.charCodeAt(0);return{parse:n,parseRows:e,format:r,formatRows:i}}function zr(t,n){function e(t){var n,e=s.status;if(!e&&Lr(s)||e>=200&&300>e||304===e){if(o)try{n=o.call(r,s)}catch(i){return void u.call("error",r,i)}else n=s;u.call("load",r,n)}else u.call("error",r,t)}var r,i,o,a,u=wr("beforesend","progress","load","error"),c=L(),s=new XMLHttpRequest,f=null,h=null,l=0;return"undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=e:s.onreadystatechange=function(t){s.readyState>3&&e(t)},s.onprogress=function(t){u.call("progress",r,t)},r={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?c.get(t):(null==n?c.remove(t):c.set(t,n+""),r)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",r):i},responseType:function(t){return arguments.length?(a=t,r):a},timeout:function(t){return arguments.length?(l=+t,r):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",r)},password:function(t){return arguments.length<1?h:(h=null==t?null:t+"",r)},response:function(t){return o=t,r},get:function(t,n){return r.send("GET",t,n)},post:function(t,n){return r.send("POST",t,n)},send:function(n,e,o){return o||"function"!=typeof e||(o=e,e=null),o&&1===o.length&&(o=Pr(o)),s.open(n,t,!0,f,h),null==i||c.has("accept")||c.set("accept",i+",*/*"),s.setRequestHeader&&c.each(function(t,n){s.setRequestHeader(n,t)}),null!=i&&s.overrideMimeType&&s.overrideMimeType(i),null!=a&&(s.responseType=a),l>0&&(s.timeout=l),o&&r.on("error",o).on("load",function(t){o(null,t)}),u.call("beforesend",r,s),s.send(null==e?null:e),r},abort:function(){return s.abort(),r},on:function(){var t=u.on.apply(u,arguments);return t===u?r:t}},n?r.get(n):r}function Pr(t){return function(n,e){t(null==n?e:null)}}function Lr(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function qr(t,n){return function(e,r){var i=zr(e).mimeType(t).response(n);return r?i.get(r):i}}function Ur(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=zr(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(Rr(n,r=t)):r},o.row(r),i?o.get(i):o}}function Rr(t,n){return function(e){return t(e.responseText,n)}}function Dr(){return Ap||(Ep(Or),Ap=Sp.now()+Cp)}function Or(){Ap=0}function Ir(){this._call=this._time=this._next=null}function Fr(t,n,e){var r=new Ir;return r.restart(t,n,e),r}function Yr(){Dr(),++wp;for(var t,n=ip;n;)(t=Ap-n._time)>=0&&n._call.call(null,t),n=n._next;--wp}function Br(t){Ap=(Np=t||Sp.now())+Cp,wp=Mp=0;try{Yr()}finally{wp=0,Xr(),Ap=0}}function Hr(){var t=Sp.now(),n=t-Np;n>Tp&&(Cp-=n,Np=t)}function Xr(){for(var t,n,e=ip,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ip=n);op=t,jr(r)}function jr(t){if(!wp){Mp&&(Mp=clearTimeout(Mp));var n=t-Ap;n>24?(1/0>t&&(Mp=setTimeout(Br,n)),kp&&(kp=clearInterval(kp))):(kp||(kp=setInterval(Hr,Tp)),wp=1,Ep(Br))}}function Vr(t,n,e){var r=new Ir;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}function Wr(t,n,e){var r=new Ir,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?Dr():+e,r.restart(function o(a){a+=i,r.restart(o,i+=n,e),t(a)},n,e),r)}function $r(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 e-t>t-n?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 a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(r>e&&o>0))return a;do a.push(new Date(+e));while(n(e,o),t(e),r>e);return a},i.filter=function(e){return $r(function(n){for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return zp.setTime(+n),Pp.setTime(+r),t(zp),t(Pp),Math.floor(e(zp,Pp))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t===0}:function(n){return i.count(0,n)%t===0}):i:null}),i}function Zr(t){return $r(function(n){n.setHours(0,0,0,0),n.setDate(n.getDate()-(n.getDay()+7-t)%7)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Dp)/Fp})}function Jr(t){return $r(function(n){n.setUTCHours(0,0,0,0),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/Fp})}function Qr(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)]}function Gr(t){return t=Qr(Math.abs(t)),t?t[1]:NaN}function Kr(t,n){return function(e,r){for(var i=e.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}}function ti(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,o=-1;r>i;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}function ni(t,n){var e=Qr(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(qp=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Qr(t,Math.max(0,n+o-1))[0]}function ei(t,n){var e=Qr(t,n);if(!e)return t+"";var r=e[0],i=e[1];return 0>i?"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")}function ri(t){return new ii(t)}function ii(t){if(!(n=O_.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",a=!!n[5],u=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),f=n[9]||"";"n"===f?(c=!0,f="g"):D_[f]||(f=""),(a||"0"===e&&"="===r)&&(a=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=a,this.width=u,this.comma=c,this.precision=s,this.type=f}function oi(t){return t}function ai(t){function n(t){function n(t){var n,i,c,g=p,m=_;if("c"===d)m=y(t)+m,t="";else{t=+t;var x=(0>t||0>1/t)&&(t*=-1,!0);if(t=y(t,l),x)for(n=-1,i=t.length,x=!1;++n<i;)if(c=t.charCodeAt(n),c>48&&58>c||"x"===d&&c>96&&103>c||"X"===d&&c>64&&71>c){x=!0;break}if(g=(x?"("===u?u:"-":"-"===u||"("===u?"":u)+g,m=m+("s"===d?I_[8+qp/3]:"")+(x&&"("===u?")":""),v)for(n=-1,i=t.length;++n<i;)if(c=t.charCodeAt(n),48>c||c>57){m=(46===c?o+t.slice(n+1):t.slice(n))+m,t=t.slice(0,n);break}}h&&!s&&(t=r(t,1/0));var b=g.length+t.length+m.length,w=f>b?new Array(f-b+1).join(e):"";switch(h&&s&&(t=r(w+t,w.length?f-m.length:1/0),w=""),a){case"<":return g+t+m+w;case"=":return g+w+t+m;case"^":return w.slice(0,b=w.length>>1)+g+t+m+w.slice(b)}return w+g+t+m}t=ri(t);var e=t.fill,a=t.align,u=t.sign,c=t.symbol,s=t.zero,f=t.width,h=t.comma,l=t.precision,d=t.type,p="$"===c?i[0]:"#"===c&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",_="$"===c?i[1]:/[%p]/.test(d)?"%":"",y=D_[d],v=!d||/[defgprs%]/.test(d);return l=null==l?d?6:12:/[gprs]/.test(d)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=ri(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Gr(e)/3))),o=Math.pow(10,-i),a=I_[8+i/3];return function(t){return r(o*t)+a}}var r=t.grouping&&t.thousands?Kr(t.grouping,t.thousands):oi,i=t.currency,o=t.decimal;return{format:n,formatPrefix:e}}function ui(t){return Math.max(0,-Gr(Math.abs(t)))}function ci(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Gr(n)/3)))-Gr(Math.abs(t)))}function si(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Gr(n)-Gr(t))+1}function fi(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 li(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function di(t){function n(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++u<s;)37===t.charCodeAt(u)&&(a.push(t.slice(c,u)),null!=(i=$_[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),a.push(r),c=u+1);return a.push(t.slice(c,u)),a.join("")}}function e(t,n){return function(e){var i=li(1900),o=r(i,t,e+="",0);if(o!=e.length)return null;if("p"in i&&(i.H=i.H%12+12*i.p),"W"in i||"U"in i){"w"in i||(i.w="W"in i?1:0);var a="Z"in i?hi(li(i.y)).getUTCDay():n(li(i.y)).getDay();i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7}return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,hi(i)):n(i)}}function r(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;u>a;){if(r>=c)return-1;if(i=n.charCodeAt(a++),37===i){if(i=n.charAt(a++),o=B[i in $_?n.charAt(a++):i],!o||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=E.exec(n.slice(e));return r?(t.p=z[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=q.exec(n.slice(e));return r?(t.w=U[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=P.exec(n.slice(e));return r?(t.w=L[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=O.exec(n.slice(e));return r?(t.m=I[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){var r=R.exec(n.slice(e));return r?(t.m=D[r[0].toLowerCase()],e+r[0].length):-1}function s(t,n,e){return r(t,w,n,e)}function f(t,n,e){return r(t,M,n,e)}function h(t,n,e){return r(t,k,n,e)}function l(t){return A[t.getDay()]}function d(t){return N[t.getDay()]}function p(t){return S[t.getMonth()]}function _(t){return C[t.getMonth()]}function y(t){return T[+(t.getHours()>=12)]}function v(t){return A[t.getUTCDay()]}function g(t){return N[t.getUTCDay()]}function m(t){return S[t.getUTCMonth()]}function x(t){return C[t.getUTCMonth()]}function b(t){return T[+(t.getUTCHours()>=12)]}var w=t.dateTime,M=t.date,k=t.time,T=t.periods,N=t.days,A=t.shortDays,C=t.months,S=t.shortMonths,E=yi(T),z=vi(T),P=yi(N),L=vi(N),q=yi(A),U=vi(A),R=yi(C),D=vi(C),O=yi(S),I=vi(S),F={a:l,A:d,b:p,B:_,c:null,d:Pi,e:Pi,H:Li,I:qi,j:Ui,L:Ri,m:Di,M:Oi,p:y,S:Ii,U:Fi,w:Yi,W:Bi,x:null,X:null,y:Hi,Y:Xi,Z:ji,"%":ao},Y={a:v,A:g,b:m,B:x,c:null,d:Vi,e:Vi,H:Wi,I:$i,j:Zi,L:Ji,m:Qi,M:Gi,p:b,S:Ki,U:to,w:no,W:eo,x:null,X:null,y:ro,Y:io,Z:oo,"%":ao},B={a:o,A:a,b:u,B:c,c:s,d:Ti,e:Ti,H:Ai,I:Ai,j:Ni,L:Ei,m:ki,M:Ci,p:i,S:Si,U:mi,w:gi,W:xi,x:f,X:h,y:wi,Y:bi,Z:Mi,"%":zi};return F.x=n(M,F),F.X=n(k,F),F.c=n(w,F),Y.x=n(M,Y),Y.X=n(k,Y),Y.c=n(w,Y),{format:function(t){var e=n(t+="",F);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",fi);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",Y);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,hi);return n.toString=function(){return t},n}}}function pi(t,n,e){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(e>o?new Array(e-o+1).join(n)+i:i)}function _i(t){return t.replace(Q_,"\\$&")}function yi(t){return new RegExp("^(?:"+t.map(_i).join("|")+")","i")}function vi(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function gi(t,n,e){var r=Z_.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function mi(t,n,e){var r=Z_.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function xi(t,n,e){var r=Z_.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function bi(t,n,e){var r=Z_.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function wi(t,n,e){var r=Z_.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Mi(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 ki(t,n,e){var r=Z_.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Ti(t,n,e){var r=Z_.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Ni(t,n,e){var r=Z_.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Ai(t,n,e){var r=Z_.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Ci(t,n,e){var r=Z_.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Si(t,n,e){var r=Z_.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Ei(t,n,e){var r=Z_.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function zi(t,n,e){var r=J_.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Pi(t,n){return pi(t.getDate(),n,2)}function Li(t,n){return pi(t.getHours(),n,2)}function qi(t,n){return pi(t.getHours()%12||12,n,2)}function Ui(t,n){return pi(1+Wp.count(h_(t),t),n,3)}function Ri(t,n){return pi(t.getMilliseconds(),n,3)}function Di(t,n){return pi(t.getMonth()+1,n,2)}function Oi(t,n){return pi(t.getMinutes(),n,2)}function Ii(t,n){return pi(t.getSeconds(),n,2)}function Fi(t,n){return pi(Zp.count(h_(t),t),n,2)}function Yi(t){return t.getDay()}function Bi(t,n){return pi(Jp.count(h_(t),t),n,2)}function Hi(t,n){return pi(t.getFullYear()%100,n,2)}function Xi(t,n){return pi(t.getFullYear()%1e4,n,4)}function ji(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+pi(n/60|0,"0",2)+pi(n%60,"0",2)}function Vi(t,n){return pi(t.getUTCDate(),n,2)}function Wi(t,n){return pi(t.getUTCHours(),n,2)}function $i(t,n){return pi(t.getUTCHours()%12||12,n,2)}function Zi(t,n){return pi(1+v_.count(U_(t),t),n,3)}function Ji(t,n){return pi(t.getUTCMilliseconds(),n,3)}function Qi(t,n){return pi(t.getUTCMonth()+1,n,2)}function Gi(t,n){return pi(t.getUTCMinutes(),n,2)}function Ki(t,n){return pi(t.getUTCSeconds(),n,2)}function to(t,n){return pi(m_.count(U_(t),t),n,2)}function no(t){return t.getUTCDay()}function eo(t,n){return pi(x_.count(U_(t),t),n,2)}function ro(t,n){return pi(t.getUTCFullYear()%100,n,2)}function io(t,n){return pi(t.getUTCFullYear()%1e4,n,4)}function oo(){return"+0000"}function ao(){return"%"}function uo(t){return t.toISOString()}function co(t){var n=new Date(t);return isNaN(n)?null:n}function so(t){function n(n){var o=n+"",a=e.get(o);if(!a){if(i!==iy)return i;e.set(o,a=r.push(n))}return t[(a-1)%t.length]}var e=L(),r=[],i=iy;return t=null==t?[]:ry.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=L();for(var i,o,a=-1,u=t.length;++a<u;)e.has(o=(i=t[a])+"")||e.set(o,r.push(i));return n},n.range=function(e){return arguments.length?(t=ry.call(e),n):t.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return so().domain(r).range(t).unknown(i)},n}function fo(){function t(){var t=i().length,r=a[1]<a[0],l=a[r-0],d=a[1-r];n=(d-l)/Math.max(1,t-c+2*s),u&&(n=Math.floor(n)),l+=(d-l-n*(t-c))*f,e=n*(1-c),u&&(l=Math.round(l),e=Math.round(e));var p=h(t).map(function(t){return l+n*t});return o(r?p.reverse():p)}var n,e,r=so().unknown(void 0),i=r.domain,o=r.range,a=[0,1],u=!1,c=0,s=0,f=.5;return delete r.unknown,r.domain=function(n){return arguments.length?(i(n),t()):i()},r.range=function(n){return arguments.length?(a=[+n[0],+n[1]],t()):a.slice()},r.rangeRound=function(n){return a=[+n[0],+n[1]],u=!0,t()},r.bandwidth=function(){return e},r.step=function(){return n},r.round=function(n){return arguments.length?(u=!!n,t()):u},r.padding=function(n){return arguments.length?(c=s=Math.max(0,Math.min(1,n)),t()):c},r.paddingInner=function(n){return arguments.length?(c=Math.max(0,Math.min(1,n)),t()):c},r.paddingOuter=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),t()):s},r.align=function(n){return arguments.length?(f=Math.max(0,Math.min(1,n)),t()):f},r.copy=function(){return fo().domain(i()).range(a).round(u).paddingInner(c).paddingOuter(s).align(f)},t()}function ho(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return ho(n())},t}function lo(){return ho(fo().paddingInner(1))}function po(t){return function(){return t}}function _o(t){return+t}function yo(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:po(n)}function vo(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return n>=t?0:t>=e?1:r(t)}}}function go(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return 0>=t?n:t>=1?e:r(t)}}}function mo(t,n,e,r){var i=t[0],o=t[1],a=n[0],u=n[1];return i>o?(i=e(o,i),a=r(u,a)):(i=e(i,o),a=r(a,u)),function(t){return a(i(t))}}function xo(t,n,e,r){var i=Math.min(t.length,n.length)-1,o=new Array(i),a=new Array(i),u=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<i;)o[u]=e(t[u],t[u+1]),a[u]=r(n[u],n[u+1]);return function(n){var e=Oh(t,n,1,i)-1;return a[e](o[e](n))}}function bo(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function wo(t,n){function e(){return i=Math.min(u.length,c.length)>2?xo:mo,o=a=null,r}function r(n){return(o||(o=i(u,c,f?vo(t):t,s)))(+n)}var i,o,a,u=oy,c=oy,s=ur,f=!1;return r.invert=function(t){return(a||(a=i(c,u,yo,f?go(n):n)))(+t)},r.domain=function(t){return arguments.length?(u=ey.call(t,_o),e()):u.slice()},r.range=function(t){return arguments.length?(c=ry.call(t),e()):c.slice()},r.rangeRound=function(t){return c=ry.call(t),s=cr,e()},r.clamp=function(t){return arguments.length?(f=!!t,e()):f},r.interpolate=function(t){return arguments.length?(s=t,e()):s},e()}function Mo(t,n,e){var r,i=t[0],o=t[t.length-1],a=d(i,o,null==n?10:n);switch(e=ri(null==e?",f":e),e.type){case"s":var u=Math.max(Math.abs(i),Math.abs(o));return null!=e.precision||isNaN(r=ci(a,u))||(e.precision=r),B_(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=si(a,Math.max(Math.abs(i),Math.abs(o))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=ui(a))||(e.precision=r-2*("%"===e.type))}return Y_(e)}function ko(t){var n=t.domain;return t.ticks=function(t){var e=n();return l(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Mo(n(),t,e)},t.nice=function(e){var r=n(),i=r.length-1,o=null==e?10:e,a=r[0],u=r[i],c=d(a,u,o);return c&&(c=d(Math.floor(a/c)*c,Math.ceil(u/c)*c,o),r[0]=Math.floor(a/c)*c,r[i]=Math.ceil(u/c)*c,n(r)),t},t}function To(){var t=wo(yo,er);return t.copy=function(){return bo(t,To())},ko(t)}function No(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=ey.call(e,_o),t):n.slice()},t.copy=function(){return No().domain(n)},ko(t)}function Ao(t,n){t=t.slice();var e,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function Co(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:po(n)}function So(t,n){return 0>t?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function Eo(t){return isFinite(t)?+("1e"+t):0>t?0:t}function zo(t){return 10===t?Eo:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function Po(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function Lo(t){return function(n){return-t(-n)}}function qo(){function t(){return i=Po(r),o=zo(r),e()[0]<0&&(i=Lo(i),o=Lo(o)),n}var n=wo(Co,So).domain([1,10]),e=n.domain,r=10,i=Po(10),o=zo(10);return n.base=function(n){return arguments.length?(r=+n,t()):r},n.domain=function(n){return arguments.length?(e(n),t()):e()},n.ticks=function(t){var n,a=e(),u=a[0],c=a[a.length-1];(n=u>c)&&(d=u,u=c,c=d);var s,f,h,d=i(u),p=i(c),_=null==t?10:+t,y=[];if(!(r%1)&&_>p-d){if(d=Math.round(d)-1,p=Math.round(p)+1,u>0){for(;p>d;++d)for(f=1,s=o(d);r>f;++f)if(h=s*f,!(u>h)){if(h>c)break;y.push(h)}}else for(;p>d;++d)for(f=r-1,s=o(d);f>=1;--f)if(h=s*f,!(u>h)){if(h>c)break;y.push(h)}n&&y.reverse()}else y=l(d,p,Math.min(p-d,_)).map(o);return y},n.tickFormat=function(t,e){if(null==e&&(e=10===r?".0e":","),"function"!=typeof e&&(e=Y_(e)),t===1/0)return e;null==t&&(t=10);var a=Math.max(1,r*t/n.ticks().length);return function(t){var n=t/o(Math.round(i(t)));return r-.5>n*r&&(n*=r),a>=n?e(t):""}},n.nice=function(){return e(Ao(e(),{floor:function(t){return o(Math.floor(i(t)))},ceil:function(t){return o(Math.ceil(i(t)))}}))},n.copy=function(){return bo(n,qo().base(r))},n}function Uo(t,n){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}function Ro(){function t(t,n){return(n=Uo(n,e)-(t=Uo(t,e)))?function(r){return(Uo(r,e)-t)/n}:po(n)}function n(t,n){return n=Uo(n,e)-(t=Uo(t,e)),function(r){return Uo(t+n*r,1/e)}}var e=1,r=wo(t,n),i=r.domain;return r.exponent=function(t){return arguments.length?(e=+t,i(i())):e},r.copy=function(){return bo(r,Ro().exponent(e))},ko(r)}function Do(){return Ro().exponent(.5)}function Oo(){function t(){var t=0,n=Math.max(1,i.length);for(o=new Array(n-1);++t<n;)o[t-1]=y(r,t/n);return e}function e(t){return isNaN(t=+t)?void 0:i[Oh(o,t)]}var r=[],i=[],o=[];return e.invertExtent=function(t){var n=i.indexOf(t);return 0>n?[NaN,NaN]:[n>0?o[n-1]:r[0],n<o.length?o[n]:r[r.length-1]]},e.domain=function(e){if(!arguments.length)return r.slice();r=[];for(var i,o=0,a=e.length;a>o;++o)i=e[o],null==i||isNaN(i=+i)||r.push(i);return r.sort(n),t()},e.range=function(n){return arguments.length?(i=ry.call(n),t()):i.slice()},e.quantiles=function(){return o.slice()},e.copy=function(){return Oo().domain(r).range(i)},e}function Io(){function t(t){return t>=t?a[Oh(o,t,0,i)]:void 0}function n(){var n=-1;for(o=new Array(i);++n<i;)o[n]=((n+1)*r-(n-i)*e)/(i+1);return t}var e=0,r=1,i=1,o=[.5],a=[0,1];return t.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n()):[e,r]},t.range=function(t){return arguments.length?(i=(a=ry.call(t)).length-1,n()):a.slice()},t.invertExtent=function(t){var n=a.indexOf(t);return 0>n?[NaN,NaN]:1>n?[e,o[0]]:n>=i?[o[i-1],r]:[o[n-1],o[n]]},t.copy=function(){return Io().domain([e,r]).range(a)},ko(t)}function Fo(){function t(t){return t>=t?e[Oh(n,t,0,r)]:void 0}var n=[.5],e=[0,1],r=1;return t.domain=function(i){return arguments.length?(n=ry.call(i),r=Math.min(n.length,e.length-1),t):n.slice()},t.range=function(i){return arguments.length?(e=ry.call(i),r=Math.min(n.length,e.length-1),t):e.slice()},t.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},t.copy=function(){return Fo().domain(n).range(e)},t}function Yo(t){return new Date(t)}function Bo(t,n,r,i,o,a,u,c,s){function f(e){return(u(e)<e?y:a(e)<e?v:o(e)<e?g:i(e)<e?m:n(e)<e?r(e)<e?x:b:t(e)<e?w:M)(e)}function h(n,r,i,o){if(null==n&&(n=10),"number"==typeof n){var a=Math.abs(i-r)/n,u=e(function(t){return t[2]}).right(k,a);u===k.length?(o=d(r/ly,i/ly,n),n=t):u?(u=k[a/k[u-1][2]<k[u][2]/a?u-1:u],o=u[1],n=u[0]):(o=d(r,i,n),n=c)}return null==o?n:n.every(o)}var l=wo(yo,er),p=l.invert,_=l.domain,y=s(".%L"),v=s(":%S"),g=s("%I:%M"),m=s("%I %p"),x=s("%a %d"),b=s("%b %d"),w=s("%B"),M=s("%Y"),k=[[u,1,ay],[u,5,5*ay],[u,15,15*ay],[u,30,30*ay],[a,1,uy],[a,5,5*uy],[a,15,15*uy],[a,30,30*uy],[o,1,cy],[o,3,3*cy],[o,6,6*cy],[o,12,12*cy],[i,1,sy],[i,2,2*sy],[r,1,fy],[n,1,hy],[n,3,3*hy],[t,1,ly]];return l.invert=function(t){return new Date(p(t))},l.domain=function(t){return arguments.length?_(t):_().map(Yo)},l.ticks=function(t,n){var e,r=_(),i=r[0],o=r[r.length-1],a=i>o;return a&&(e=i,i=o,o=e),e=h(t,i,o,n),e=e?e.range(i,o+1):[],a?e.reverse():e},l.tickFormat=function(t,n){return null==n?f:s(n)},l.nice=function(t,n){var e=_();return(t=h(t,e[0],e[e.length-1],n))?_(Ao(e,t)):l},l.copy=function(){return bo(l,Bo(t,n,r,i,o,a,u,c,s))},l}function Ho(){return Bo(h_,s_,Zp,Wp,jp,Hp,Yp,Lp,X_).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}function Xo(){return Bo(U_,L_,m_,v_,__,d_,Yp,Lp,V_).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}function jo(t){return t.match(/.{6}/g).map(function(t){return"#"+t})}function Vo(){return ep(He(300,.5,0),He(-240,.5,1))}function Wo(t){(0>t||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return my.h=360*t-100,my.s=1.5-1.5*n,my.l=.8-.9*n,my+""}function $o(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Zo(t){function n(n){var o=(n-e)/(r-e);return t(i?Math.max(0,Math.min(1,o)):o)}var e=0,r=1,i=!1;return n.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n):[e,r]},n.clamp=function(t){return arguments.length?(i=!!t,n):i},n.copy=function(){return Zo(t).domain([e,r]).clamp(i)},ko(n)}function Jo(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ty.hasOwnProperty(n)?{space:Ty[n],local:t}:t}function Qo(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===ky&&n.documentElement.namespaceURI===ky?n.createElement(t):n.createElementNS(e,t)}}function Go(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ko(t){var n=Jo(t);return(n.local?Go:Qo)(n)}function ta(){return new na}function na(){this._="@"+(++Ny).toString(36)}function ea(t,n,e){return t=ra(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function ra(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 ia(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function oa(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;o>r;++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 aa(t,n,e){var r=zy.hasOwnProperty(t.type)?ea:ra;return function(i,o,a){var u,c=this.__on,s=r(n,o,a);if(c)for(var f=0,h=c.length;h>f;++f)if((u=c[f]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=s,u.capture=e),
void(u.value=n);this.addEventListener(t.type,s,e),u={type:t.type,name:t.name,value:n,listener:s,capture:e},c?c.push(u):this.__on=[u]}}function ua(t,n,e){var r,i,o=ia(t+""),a=o.length;{if(!(arguments.length<2)){for(u=n?aa:oa,null==e&&(e=!1),r=0;a>r;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var c,s=0,f=u.length;f>s;++s)for(r=0,c=u[s];a>r;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value}}function ca(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}}function sa(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function fa(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function ha(t){var n=sa();return n.changedTouches&&(n=n.changedTouches[0]),fa(t,n)}function la(t){return function(){return this.querySelector(t)}}function da(t){"function"!=typeof t&&(t=la(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,a,u=n[i],c=u.length,s=r[i]=new Array(c),f=0;c>f;++f)(o=u[f])&&(a=t.call(o,o.__data__,f,u))&&("__data__"in o&&(a.__data__=o.__data__),s[f]=a);return new Cu(r,this._parents)}function pa(t){return function(){return this.querySelectorAll(t)}}function _a(t){"function"!=typeof t&&(t=pa(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;e>o;++o)for(var a,u=n[o],c=u.length,s=0;c>s;++s)(a=u[s])&&(r.push(t.call(a,a.__data__,s,u)),i.push(a));return new Cu(r,i)}function ya(t){"function"!=typeof t&&(t=Ey(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,a=n[i],u=a.length,c=r[i]=new Array(u),s=0;u>s;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&(c[s]=o);return new Cu(r,this._parents)}function va(t){return function(){return t}}function ga(t,n,e,r,i,o){for(var a,u=0,c=n.length,s=o.length;s>u;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new ba(t,o[u]);for(;c>u;++u)(a=n[u])&&(i[u]=a)}function ma(t,n,e,r,i,o,a){var u,c,s,f={},h=n.length,l=o.length,d=new Array(h);for(u=0;h>u;++u)(c=n[u])&&(d[u]=s=Ly+a.call(c,c.__data__,u,n),s in f?i[u]=c:f[s]=c);for(u=0;l>u;++u)s=Ly+a.call(t,o[u],u,o),(c=f[s])?(r[u]=c,c.__data__=o[u],f[s]=null):e[u]=new ba(t,o[u]);for(u=0;h>u;++u)(c=n[u])&&f[d[u]]===c&&(i[u]=c)}function xa(t,n){if(!t)return d=new Array(this.size()),s=-1,this.each(function(t){d[++s]=t}),d;var e=n?ma:ga,r=this._parents,i=this._groups;"function"!=typeof t&&(t=va(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;o>s;++s){var f=r[s],h=i[s],l=h.length,d=t.call(f,f&&f.__data__,s,r),p=d.length,_=u[s]=new Array(p),y=a[s]=new Array(p),v=c[s]=new Array(l);e(f,h,_,y,v,d,n);for(var g,m,x=0,b=0;p>x;++x)if(g=_[x]){for(x>=b&&(b=x+1);!(m=y[b])&&++b<p;);g._next=m||null}}return a=new Cu(a,r),a._enter=u,a._exit=c,a}function ba(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function wa(t){return new Array(t.length)}function Ma(){return new Cu(this._enter||this._groups.map(wa),this._parents)}function ka(){return new Cu(this._exit||this._groups.map(wa),this._parents)}function Ta(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;o>u;++u)for(var c,s=n[u],f=e[u],h=s.length,l=a[u]=new Array(h),d=0;h>d;++d)(c=s[d]||f[d])&&(l[d]=c);for(;r>u;++u)a[u]=n[u];return new Cu(a,this._parents)}function Na(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this}function Aa(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Ca);for(var e=this._groups,r=e.length,i=new Array(r),o=0;r>o;++o){for(var a,u=e[o],c=u.length,s=i[o]=new Array(c),f=0;c>f;++f)(a=u[f])&&(s[f]=a);s.sort(n)}return new Cu(i,this._parents).order()}function Ca(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function Sa(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ea(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function za(){for(var t=this._groups,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,o=r.length;o>i;++i){var a=r[i];if(a)return a}return null}function Pa(){var t=0;return this.each(function(){++t}),t}function La(){return!this.node()}function qa(t){for(var n=this._groups,e=0,r=n.length;r>e;++e)for(var i,o=n[e],a=0,u=o.length;u>a;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this}function Ua(t){return function(){this.removeAttribute(t)}}function Ra(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Da(t,n){return function(){this.setAttribute(t,n)}}function Oa(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ia(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Fa(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 Ya(t,n){var e=Jo(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?Ra:Ua:"function"==typeof n?e.local?Fa:Ia:e.local?Oa:Da)(e,n))}function Ba(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ha(t){return function(){this.style.removeProperty(t)}}function Xa(t,n,e){return function(){this.style.setProperty(t,n,e)}}function ja(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function Va(t,n,e){var r;return arguments.length>1?this.each((null==n?Ha:"function"==typeof n?ja:Xa)(t,n,null==e?"":e)):Ba(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function Wa(t){return function(){delete this[t]}}function $a(t,n){return function(){this[t]=n}}function Za(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Ja(t,n){return arguments.length>1?this.each((null==n?Wa:"function"==typeof n?Za:$a)(t,n)):this.node()[t]}function Qa(t){return t.trim().split(/^|\s+/)}function Ga(t){return t.classList||new Ka(t)}function Ka(t){this._node=t,this._names=Qa(t.getAttribute("class")||"")}function tu(t,n){for(var e=Ga(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function nu(t,n){for(var e=Ga(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function eu(t){return function(){tu(this,t)}}function ru(t){return function(){nu(this,t)}}function iu(t,n){return function(){(n.apply(this,arguments)?tu:nu)(this,t)}}function ou(t,n){var e=Qa(t+"");if(arguments.length<2){for(var r=Ga(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?iu:n?eu:ru)(e,n))}function au(){this.textContent=""}function uu(t){return function(){this.textContent=t}}function cu(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function su(t){return arguments.length?this.each(null==t?au:("function"==typeof t?cu:uu)(t)):this.node().textContent}function fu(){this.innerHTML=""}function hu(t){return function(){this.innerHTML=t}}function lu(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function du(t){return arguments.length?this.each(null==t?fu:("function"==typeof t?lu:hu)(t)):this.node().innerHTML}function pu(){this.nextSibling&&this.parentNode.appendChild(this)}function _u(){return this.each(pu)}function yu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vu(){return this.each(yu)}function gu(t){var n="function"==typeof t?t:Ko(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function mu(){return null}function xu(t,n){var e="function"==typeof t?t:Ko(t),r=null==n?mu:"function"==typeof n?n:la(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function bu(){var t=this.parentNode;t&&t.removeChild(this)}function wu(){return this.each(bu)}function Mu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ku(t,n,e){var r=Ba(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Tu(t,n){return function(){return ku(this,t,n)}}function Nu(t,n){return function(){return ku(this,t,n.apply(this,arguments))}}function Au(t,n){return this.each(("function"==typeof n?Nu:Tu)(t,n))}function Cu(t,n){this._groups=t,this._parents=n}function Su(){return new Cu([[document.documentElement]],qy)}function Eu(t){return"string"==typeof t?new Cu([[document.querySelector(t)]],[document.documentElement]):new Cu([[t]],qy)}function zu(t){return"string"==typeof t?new Cu([document.querySelectorAll(t)],[document.documentElement]):new Cu([t],qy)}function Pu(t,n,e){arguments.length<3&&(e=n,n=sa().changedTouches);for(var r,i=0,o=n?n.length:0;o>i;++i)if((r=n[i]).identifier===e)return fa(t,r);return null}function Lu(t,n){null==n&&(n=sa().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=fa(t,n[e]);return i}function qu(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};Ou(t,e,{name:n,index:r,group:i,on:Uy,tween:Ry,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Dy})}function Uu(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Dy)throw new Error("too late");return e}function Ru(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Iy)throw new Error("too late");return e}function Du(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function Ou(t,n,e){function r(t){e.state=Oy,e.delay<=t?i(t-e.delay):e.timer.restart(i,e.delay,e.time)}function i(r){var i,c,s,f;for(i in u)f=u[i],f.name===e.name&&(f.state===Fy?(f.state=By,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete u[i]):n>+i&&(f.state=By,f.timer.stop(),delete u[i]));if(Vr(function(){e.state===Fy&&(e.timer.restart(o,e.delay,e.time),o(r))}),e.state=Iy,e.on.call("start",t,t.__data__,e.index,e.group),e.state===Iy){for(e.state=Fy,a=new Array(s=e.tween.length),i=0,c=-1;s>i;++i)(f=e.tween[i].value.call(t,t.__data__,e.index,e.group))&&(a[++c]=f);a.length=c+1}}function o(r){for(var i=r<e.duration?e.ease.call(null,r/e.duration):(e.state=Yy,1),o=-1,c=a.length;++o<c;)a[o].call(null,i);if(e.state===Yy){e.state=By,e.timer.stop(),e.on.call("end",t,t.__data__,e.index,e.group);for(o in u)if(+o!==n)return void delete u[n];delete t.__transition}}var a,u=t.__transition;u[n]=e,e.timer=Fr(r,0,e.time)}function Iu(t,n){var e,r,i,o=t.__transition,a=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state===Fy,e.state=By,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function Fu(t){return this.each(function(){Iu(this,t)})}function Yu(t,n){var e,r;return function(){var i=Ru(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;u>a;++a)if(r[a].name===n){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Bu(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Ru(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,s=i.length;s>c;++c)if(i[c].name===n){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function Hu(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Du(this.node(),e).tween,o=0,a=i.length;a>o;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Yu:Bu)(e,t,n))}function Xu(t,n,e){var r=t._id;return t.each(function(){var t=Ru(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return Du(t,r).value[n]}}function ju(t,n){var e;return("number"==typeof n?er:n instanceof be?Od:(e=be(n))?(n=e,Od):ar)(t,n)}function Vu(t){return function(){this.removeAttribute(t)}}function Wu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $u(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Zu(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function Ju(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttribute(t):(a=this.getAttribute(t),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function Qu(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function Gu(t,n){var e=Jo(t),r="transform"===e?Vd:ju;return this.attrTween(t,"function"==typeof n?(e.local?Qu:Ju)(e,r,Xu(this,"attr."+t,n)):null==n?(e.local?Wu:Vu)(e):(e.local?Zu:$u)(e,r,n))}function Ku(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function tc(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function nc(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Jo(t);return this.tween(e,(r.local?Ku:tc)(r,n))}function ec(t,n){return function(){Uu(this,t).delay=+n.apply(this,arguments)}}function rc(t,n){return n=+n,function(){Uu(this,t).delay=n}}function ic(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?ec:rc)(n,t)):Du(this.node(),n).delay}function oc(t,n){return function(){Ru(this,t).duration=+n.apply(this,arguments)}}function ac(t,n){return n=+n,function(){Ru(this,t).duration=n}}function uc(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?oc:ac)(n,t)):Du(this.node(),n).duration}function cc(t,n){if("function"!=typeof n)throw new Error;return function(){Ru(this,t).ease=n}}function sc(t){var n=this._id;return arguments.length?this.each(cc(n,t)):Du(this.node(),n).ease}function fc(t){"function"!=typeof t&&(t=Ey(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,a=n[i],u=a.length,c=r[i]=new Array(u),s=0;u>s;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&(c[s]=o);return new zc(r,this._parents,this._name,this._id)}function hc(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),a=new Array(r),u=0;o>u;++u)for(var c,s=n[u],f=e[u],h=s.length,l=a[u]=new Array(h),d=0;h>d;++d)(c=s[d]||f[d])&&(l[d]=c);for(;r>u;++u)a[u]=n[u];return new zc(a,this._parents,this._name,this._id)}function lc(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function dc(t,n,e){var r,i,o=lc(n)?Uu:Ru;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}function pc(t,n){var e=this._id;return arguments.length<2?Du(this.node(),e).on.on(t):this.each(dc(e,t,n))}function _c(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function yc(){return this.on("end.remove",_c(this._id))}function vc(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=la(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;i>a;++a)for(var u,c,s=r[a],f=s.length,h=o[a]=new Array(f),l=0;f>l;++l)(u=s[l])&&(c=t.call(u,u.__data__,l,s))&&("__data__"in u&&(c.__data__=u.__data__),h[l]=c,qu(h[l],n,e,l,h,Du(u,e)));return new zc(o,this._parents,n,e)}function gc(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=pa(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;i>u;++u)for(var c,s=r[u],f=s.length,h=0;f>h;++h)if(c=s[h]){for(var l,d=t.call(c,c.__data__,h,s),p=Du(c,e),_=0,y=d.length;y>_;++_)(l=d[_])&&qu(l,n,e,_,d,p);o.push(d),a.push(c)}return new zc(o,a,n,e)}function mc(){return new Hy(this._groups,this._parents)}function xc(t,n){var e,r,i;return function(){var o=Ba(this).getComputedStyle(this,null),a=o.getPropertyValue(t),u=(this.style.removeProperty(t),o.getPropertyValue(t));return a===u?null:a===e&&u===r?i:i=n(e=a,r=u)}}function bc(t){return function(){this.style.removeProperty(t)}}function wc(t,n,e){var r,i;return function(){var o=Ba(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Mc(t,n,e){var r,i,o;return function(){var a=Ba(this).getComputedStyle(this,null),u=a.getPropertyValue(t),c=e(this);return null==c&&(this.style.removeProperty(t),c=a.getPropertyValue(t)),u===c?null:u===r&&c===i?o:o=n(r=u,i=c)}}function kc(t,n,e){var r="transform"==(t+="")?jd:ju;return null==n?this.styleTween(t,xc(t,r)).on("end.style."+t,bc(t)):this.styleTween(t,"function"==typeof n?Mc(t,r,Xu(this,"style."+t,n)):wc(t,r,n),e)}function Tc(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function Nc(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,Tc(t,n,null==e?"":e))}function Ac(t){return function(){this.textContent=t}}function Cc(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function Sc(t){return this.tween("text","function"==typeof t?Cc(Xu(this,"text",t)):Ac(null==t?"":t+""))}function Ec(){for(var t=this._name,n=this._id,e=Lc(),r=this._groups,i=r.length,o=0;i>o;++o)for(var a,u=r[o],c=u.length,s=0;c>s;++s)if(a=u[s]){var f=Du(a,n);qu(a,t,e,s,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new zc(r,this._parents,t,e)}function zc(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Pc(t){return Su().transition(t)}function Lc(){return++Xy}function qc(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Vy.time=Dr(),Vy;return e}function Uc(t){var n,e;t instanceof zc?(n=t._id,t=t._name):(n=Lc(),(e=Vy).time=Dr(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;i>o;++o)for(var a,u=r[o],c=u.length,s=0;c>s;++s)(a=u[s])&&qu(a,t,n,s,u,e||qc(a,n));return new zc(r,this._parents,t,n)}function Rc(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>Oy&&e.name===n)return new zc([[t]],Wy,n,+r)}return null}function Dc(t){return t}function Oc(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function Ic(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function Fc(t){var n=t.bandwidth()/2;return function(e){return t(e)+n}}function Yc(){return!this.__axis}function Bc(t,n){function e(e){var s,f=null==i?n.ticks?n.ticks.apply(n,r):n.domain():i,h=null==o?n.tickFormat?n.tickFormat.apply(n,r):Dc:o,l=Math.max(a,0)+c,d=t===Zy||t===Qy?Oc:Ic,p=n.range(),_=p[0]+.5,y=p[p.length-1]+.5,v=(n.bandwidth?Fc:Dc)(n.copy()),g=e.selection?e.selection():e,m=g.selectAll(".domain").data([null]),x=g.selectAll(".tick").data(f,n).order(),b=x.exit(),w=x.enter().append("g",".domain").attr("class","tick"),M=x.select("line"),k=x.select("text"),T=t===Zy||t===Gy?-1:1,N=t===Gy||t===Jy?(s="x","y"):(s="y","x");m=m.merge(m.enter().append("path").attr("class","domain").attr("stroke","#000")),x=x.merge(w),M=M.merge(w.append("line").attr("stroke","#000").attr(s+"2",T*a).attr(N+"1",.5).attr(N+"2",.5)),k=k.merge(w.append("text").attr("fill","#000").attr(s,T*l).attr(N,.5).attr("dy",t===Zy?"0em":t===Qy?".71em":".32em")),e!==g&&(m=m.transition(e),x=x.transition(e),M=M.transition(e),k=k.transition(e),b=b.transition(e).attr("opacity",Ky).attr("transform",function(t){return d(v,this.parentNode.__axis||v,t)}),w.attr("opacity",Ky).attr("transform",function(t){return d(this.parentNode.__axis||v,v,t)})),b.remove(),m.attr("d",t===Gy||t==Jy?"M"+T*u+","+_+"H0.5V"+y+"H"+T*u:"M"+_+","+T*u+"V0.5H"+y+"V"+T*u),x.attr("opacity",1).attr("transform",function(t){return d(v,v,t)}),M.attr(s+"2",T*a),k.attr(s,T*l).text(h),g.filter(Yc).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Jy?"start":t===Gy?"end":"middle"),g.each(function(){this.__axis=v})}var r=[],i=null,o=null,a=6,u=6,c=3;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return r=$y.call(arguments),e},e.tickArguments=function(t){return arguments.length?(r=null==t?[]:$y.call(t),e):r.slice()},e.tickValues=function(t){return arguments.length?(i=null==t?null:$y.call(t),e):i&&i.slice()},e.tickFormat=function(t){return arguments.length?(o=t,e):o},e.tickSize=function(t){return arguments.length?(a=u=+t,e):a},e.tickSizeInner=function(t){return arguments.length?(a=+t,e):a},e.tickSizeOuter=function(t){return arguments.length?(u=+t,e):u},e.tickPadding=function(t){return arguments.length?(c=+t,e):c},e}function Hc(t){return Bc(Zy,t)}function Xc(t){return Bc(Jy,t)}function jc(t){return Bc(Qy,t)}function Vc(t){return Bc(Gy,t)}function Wc(t,n){return t.parent===n.parent?1:2}function $c(t){return t.reduce(Zc,0)/t.length}function Zc(t,n){return t+n.x}function Jc(t){return 1+t.reduce(Qc,0)}function Qc(t,n){return Math.max(t,n.y)}function Gc(t){for(var n;n=t.children;)t=n[0];return t}function Kc(t){for(var n;n=t.children;)t=n[n.length-1];return t}function ts(){function t(t){var o,a=0;t.eachAfter(function(t){var e=t.children;e?(t.x=$c(e),t.y=Jc(e)):(t.x=o?a+=n(t,o):0,t.y=0,o=t)});var u=Gc(t),c=Kc(t),s=u.x-n(u,c)/2,f=c.x+n(c,u)/2;return t.eachAfter(i?function(n){n.x=(n.x-t.x)*e,n.y=(t.y-n.y)*r}:function(n){n.x=(n.x-s)/(f-s)*e,n.y=(1-(t.y?n.y/t.y:1))*r})}var n=Wc,e=1,r=1,i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(n){return arguments.length?(i=!1,e=+n[0],r=+n[1],t):i?null:[e,r]},t.nodeSize=function(n){return arguments.length?(i=!0,e=+n[0],r=+n[1],t):i?[e,r]:null},t}function ns(t){var n,e,r,i,o=this,a=[o];do for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;i>r;++r)a.push(e[r]);while(a.length);return this}function es(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this}function rs(t){for(var n,e,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),n=i.children)for(e=0,r=n.length;r>e;++e)o.push(n[e]);for(;i=a.pop();)t(i);return this}function is(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})}function os(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function as(t){for(var n=this,e=us(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r}function us(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function cs(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function ss(){var t=[];return this.each(function(n){t.push(n)}),t}function fs(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function hs(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n}function ls(t,n){var e,r,i,o,a,u=new vs(t),c=+t.value&&(u.value=t.value),s=[u];for(null==n&&(n=ps);e=s.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)s.push(r=e.children[o]=new vs(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(ys)}function ds(){return ls(this).eachBefore(_s)}function ps(t){return t.children}function _s(t){t.data=t.data.data}function ys(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function vs(t){this.data=t,this.depth=this.height=0,this.parent=null}function gs(t){this._=t,this.next=null}function ms(t){for(var n,e=(t=t.slice()).length,r=null,i=r;e;){var o=new gs(t[e-1]);i=i?i.next=o:r=o,t[n]=t[--e]}return{head:r,tail:i}}function xs(t){return ws(ms(t),[])}function bs(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r-n.r;return i*i+1e-6>e*e+r*r}function ws(t,n){var e,r,i,o=null,a=t.head;switch(n.length){case 1:e=Ms(n[0]);break;case 2:e=ks(n[0],n[1]);break;case 3:e=Ts(n[0],n[1],n[2])}for(;a;)i=a._,r=a.next,e&&bs(e,i)?o=a:(o?(t.tail=o,o.next=null):t.head=t.tail=null,n.push(i),e=ws(t,n),n.pop(),t.head?(a.next=t.head,t.head=a):(a.next=null,t.head=t.tail=a),o=t.tail,o.next=r),a=r;return t.tail=o,e}function Ms(t){return{x:t.x,y:t.y,r:t.r}}function ks(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,c=o-e,s=a-r,f=u-i,h=Math.sqrt(c*c+s*s);return{x:(e+o+c/h*f)/2,y:(r+a+s/h*f)/2,r:(h+i+u)/2}}function Ts(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,c=n.r,s=e.x,f=e.y,h=e.r,l=2*(r-a),d=2*(i-u),p=2*(c-o),_=r*r+i*i-o*o-a*a-u*u+c*c,y=2*(r-s),v=2*(i-f),g=2*(h-o),m=r*r+i*i-o*o-s*s-f*f+h*h,x=y*d-l*v,b=(d*m-v*_)/x-r,w=(v*p-d*g)/x,M=(y*_-l*m)/x-i,k=(l*g-y*p)/x,T=w*w+k*k-1,N=2*(b*w+M*k+o),A=b*b+M*M-o*o,C=(-N-Math.sqrt(N*N-4*T*A))/(2*T);return{x:b+w*C+r,y:M+k*C+i,r:C}}function Ns(t,n,e){var r=t.x,i=t.y,o=n.r+e.r,a=t.r+e.r,u=n.x-r,c=n.y-i,s=u*u+c*c;if(s){var f=.5+((a*=a)-(o*=o))/(2*s),h=Math.sqrt(Math.max(0,2*o*(a+s)-(a-=s)*a-o*o))/(2*s);e.x=r+f*u+h*c,e.y=i+f*c-h*u}else e.x=r+a,e.y=i}function As(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i>e*e+r*r}function Cs(t,n,e){var r=t.x-n,i=t.y-e;return r*r+i*i}function Ss(t){this._=t,this.next=null,this.previous=null}function Es(t){if(!(i=t.length))return 0;var n,e,r,i;if(n=t[0],n.x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Ns(e,n,r=t[2]);var o,a,u,c,s,f,h,l=n.r*n.r,d=e.r*e.r,p=r.r*r.r,_=l+d+p,y=l*n.x+d*e.x+p*r.x,v=l*n.y+d*e.y+p*r.y;n=new Ss(n),e=new Ss(e),r=new Ss(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;i>u;++u){if(Ns(n._,e._,r=t[u]),r=new Ss(r),(s=n.previous)===(c=e.next)){if(As(c._,r._)){n=e,e=c,--u;continue t}}else{f=c._.r,h=s._.r;do if(h>=f){if(As(c._,r._)){e=c,n.next=e,e.previous=n,--u;continue t}c=c.next,f+=c._.r}else{if(As(s._,r._)){n=s,n.next=e,e.previous=n,--u;continue t}s=s.previous,h+=s._.r}while(c!==s.next)}for(r.previous=n,r.next=e,n.next=e.previous=e=r,_+=p=r._.r*r._.r,y+=p*r._.x,v+=p*r._.y,l=Cs(n._,o=y/_,a=v/_);(r=r.next)!==e;)(p=Cs(r._,o,a))<l&&(n=r,l=p);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=xs(n),u=0;i>u;++u)n=t[u],n.x-=r.x,n.y-=r.y;return r.r}function zs(t){return Es(t),t}function Ps(t){return null==t?null:Ls(t)}function Ls(t){if("function"!=typeof t)throw new Error;return t}function qs(){return 0}function Us(t){return function(){return t}}function Rs(t){return Math.sqrt(t.value)}function Ds(){function t(t){return t.x=e/2,t.y=r/2,n?t.eachBefore(Os(n)).eachAfter(Is(i,.5)).eachBefore(Fs(1)):t.eachBefore(Os(Rs)).eachAfter(Is(qs,1)).eachAfter(Is(i,t.r/Math.min(e,r))).eachBefore(Fs(Math.min(e,r)/(2*t.r))),t}var n=null,e=1,r=1,i=qs;return t.radius=function(e){return arguments.length?(n=Ps(e),t):n},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i="function"==typeof n?n:Us(+n),t):i},t}function Os(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function Is(t,n){return function(e){if(r=e.children){var r,i,o,a=r.length,u=t(e)*n||0;if(u)for(i=0;a>i;++i)r[i].r+=u;if(o=Es(r),u)for(i=0;a>i;++i)r[i].r-=u;e.r=o+u}}}function Fs(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function Ys(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Bs(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,s=t.value&&(r-n)/t.value;++u<c;)o=a[u],o.y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*s}function Hs(){function t(t){var a=t.height+1;return t.x0=t.y0=i,t.x1=e,t.y1=r/a,t.eachBefore(n(r,a)),o&&t.eachBefore(Ys),t}function n(t,n){return function(e){e.children&&Bs(e,e.x0,t*(e.depth+1)/n,e.x1,t*(e.depth+2)/n);var r=e.x0,o=e.y0,a=e.x1-i,u=e.y1-i;r>a&&(r=a=(r+a)/2),o>u&&(o=u=(o+u)/2),e.x0=r,e.y0=o,e.x1=a,e.y1=u}}var e=1,r=1,i=0,o=!1;return t.round=function(n){return arguments.length?(o=!!n,t):o},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i=+n,t):i},t}function Xs(t){return t.id}function js(t){return t.parentId}function Vs(){function t(t){var r,i,o,a,u,c,s,f=t.length,h=new Array(f),l={};for(i=0;f>i;++i)r=t[i],u=h[i]=new vs(r),null!=(c=n(r,i,t))&&(c+="")&&(s=tv+(u.id=c),l[s]=s in l?ev:u);for(i=0;f>i;++i)if(u=h[i],c=e(t[i],i,t),null!=c&&(c+="")){if(a=l[tv+c],!a)throw new Error("missing: "+c);if(a===ev)throw new Error("ambiguous: "+c);a.children?a.children.push(u):a.children=[u],u.parent=a}else{if(o)throw new Error("multiple roots");o=u}if(!o)throw new Error("no root");if(o.parent=nv,o.eachBefore(function(t){t.depth=t.parent.depth+1,--f}).eachBefore(ys),o.parent=null,f>0)throw new Error("cycle");return o}var n=Xs,e=js;return t.id=function(e){return arguments.length?(n=Ls(e),t):n},t.parentId=function(n){return arguments.length?(e=Ls(n),t):e},t}function Ws(t,n){return t.parent===n.parent?1:2}function $s(t){var n=t.children;return n?n[0]:t.t}function Zs(t){var n=t.children;return n?n[n.length-1]:t.t}function Js(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Qs(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)n=i[o],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Gs(t,n,e){return t.a.parent===n.parent?t.a:e}function Ks(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function tf(t){for(var n,e,r,i,o,a=new Ks(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new Ks(r[i],i)),e.parent=n;return(a.parent=new Ks(null,0)).children=[a],a}function nf(){function t(t){var r=tf(t);if(r.eachAfter(n),r.parent.m=-r.z,r.eachBefore(e),c)t.eachBefore(i);else{var s=t,f=t,h=t;t.eachBefore(function(t){t.x<s.x&&(s=t),t.x>f.x&&(f=t),t.depth>h.depth&&(h=t)});var l=s===f?1:o(s,f)/2,d=l-s.x,p=a/(f.x+l+d),_=u/(h.depth||1);t.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*_})}return t}function n(t){var n=t.children,e=t.parent.children,i=t.i?e[t.i-1]:null;if(n){Qs(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||e[0])}function e(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,n,e){if(n){for(var r,i=t,a=t,u=n,c=i.parent.children[0],s=i.m,f=a.m,h=u.m,l=c.m;u=Zs(u),i=$s(i),u&&i;)c=$s(c),a=Zs(a),a.a=t,r=u.z+h-i.z-s+o(u._,i._),r>0&&(Js(Gs(u,t,e),t,r),s+=r,f+=r),h+=u.m,s+=i.m,l+=c.m,f+=a.m;u&&!Zs(a)&&(a.t=u,a.m+=h-f),i&&!$s(c)&&(c.t=i,c.m+=s-l,e=t)}return e}function i(t){t.x*=a,t.y=t.depth*u}var o=Ws,a=1,u=1,c=null;return t.separation=function(n){return arguments.length?(o=n,t):o},t.size=function(n){return arguments.length?(c=!1,a=+n[0],u=+n[1],t):c?null:[a,u]},t.nodeSize=function(n){return arguments.length?(c=!0,a=+n[0],u=+n[1],t):c?[a,u]:null},t}function ef(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,s=t.value&&(i-e)/t.value;++u<c;)o=a[u],o.x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*s}function rf(t,n,e,r,i,o){for(var a,u,c,s,f,h,l,d,p,_,y,v,g=[],m=n.children,x=0,b=m.length,w=n.value;b>x;){for(s=i-e,f=o-r,l=d=h=m[x].value,y=Math.max(f/s,s/f)/(w*t),v=h*h*y,_=Math.max(d/v,v/l),c=x+1;b>c;++c){if(h+=u=m[c].value,l>u&&(l=u),u>d&&(d=u),v=h*h*y,p=Math.max(d/v,v/l),p>_){h-=u;break}_=p}g.push(a={value:h,dice:f>s,children:m.slice(x,c)}),a.dice?Bs(a,e,r,i,w?r+=f*h/w:o):ef(a,e,r,w?e+=s*h/w:i,o),w-=h,x=c}return g}function of(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(n),a=[0],r&&t.eachBefore(Ys),t}function n(t){var n=a[t.depth],r=t.x0+n,i=t.y0+n,o=t.x1-n,l=t.y1-n;r>o&&(r=o=(r+o)/2),i>l&&(i=l=(i+l)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=l,t.children&&(n=a[t.depth+1]=u(t)/2,r+=h(t)-n,i+=c(t)-n,o-=s(t)-n,l-=f(t)-n,r>o&&(r=o=(r+o)/2),i>l&&(i=l=(i+l)/2),e(t,r,i,o,l))}var e=iv,r=!1,i=1,o=1,a=[0],u=qs,c=qs,s=qs,f=qs,h=qs;return t.round=function(n){return arguments.length?(r=!!n,t):r},t.size=function(n){return arguments.length?(i=+n[0],o=+n[1],t):[i,o]},t.tile=function(n){return arguments.length?(e=Ls(n),t):e},t.padding=function(n){return arguments.length?t.paddingInner(n).paddingOuter(n):t.paddingInner()},t.paddingInner=function(n){return arguments.length?(u="function"==typeof n?n:Us(+n),
t):u},t.paddingOuter=function(n){return arguments.length?t.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n):t.paddingTop()},t.paddingTop=function(n){return arguments.length?(c="function"==typeof n?n:Us(+n),t):c},t.paddingRight=function(n){return arguments.length?(s="function"==typeof n?n:Us(+n),t):s},t.paddingBottom=function(n){return arguments.length?(f="function"==typeof n?n:Us(+n),t):f},t.paddingLeft=function(n){return arguments.length?(h="function"==typeof n?n:Us(+n),t):h},t}function af(t,n,e,r,i){function o(t,n,e,r,i,a,u){if(t>=n-1){var s=c[t];return s.x0=r,s.y0=i,s.x1=a,s.y1=u,void 0}for(var h=f[t],l=e/2+h,d=t+1,p=n-1;p>d;){var _=d+p>>>1;f[_]<l?d=_+1:p=_}var y=f[d]-h,v=e-y;if(u-i>a-r){var g=(i*v+u*y)/e;o(t,d,y,r,i,a,g),o(d,n,v,r,g,a,u)}else{var m=(r*v+a*y)/e;o(t,d,y,r,i,m,u),o(d,n,v,m,i,a,u)}}var a,u,c=t.children,s=c.length,f=new Array(s+1);for(f[0]=u=a=0;s>a;++a)f[a+1]=u+=c[a].value;o(0,s,t.value,n,e,r,i)}function uf(t,n,e,r,i){(1&t.depth?ef:Bs)(t,n,e,r,i)}function cf(t,n){function e(){var e,i,o=r.length,a=0,u=0;for(e=0;o>e;++e)i=r[e],a+=i.x,u+=i.y;for(a=a/o-t,u=u/o-n,e=0;o>e;++e)i=r[e],i.x-=a,i.y-=u}var r;return null==t&&(t=0),null==n&&(n=0),e.initialize=function(t){r=t},e.x=function(n){return arguments.length?(t=+n,e):t},e.y=function(t){return arguments.length?(n=+t,e):n},e}function sf(t){return function(){return t}}function ff(){return 1e-6*(Math.random()-.5)}function hf(t){return t.x+t.vx}function lf(t){return t.y+t.vy}function df(t){function n(){function t(t,e,r,i,a){var u=t.data,d=t.r,p=h+d;{if(!u)return e>s+p||s-p>i||r>f+p||f-p>a;if(u.index>n){var _=s-u.x-u.vx,y=f-u.y-u.vy,v=_*_+y*y;p*p>v&&(0===_&&(_=ff(),v+=_*_),0===y&&(y=ff(),v+=y*y),v=(p-(v=Math.sqrt(v)))/v*o,c.vx+=(_*=v)*(p=(d*=d)/(l+d)),c.vy+=(y*=v)*p,u.vx-=_*(p=1-p),u.vy-=y*p)}}}for(var n,u,c,s,f,h,l,d=r.length,p=0;a>p;++p)for(u=Ht(r,hf,lf).visitAfter(e),n=0;d>n;++n)c=r[n],h=i[n],l=h*h,s=c.x+c.vx,f=c.y+c.vy,u.visit(t)}function e(t){if(t.data)return t.r=i[t.data.index];for(var n=t.r=0;4>n;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}var r,i,o=1,a=1;return"function"!=typeof t&&(t=sf(null==t?1:+t)),n.initialize=function(n){var e,o=(r=n).length;for(i=new Array(o),e=0;o>e;++e)i[e]=+t(r[e],e,r)},n.iterations=function(t){return arguments.length?(a=+t,n):a},n.strength=function(t){return arguments.length?(o=+t,n):o},n.radius=function(e){return arguments.length?(t="function"==typeof e?e:sf(+e),n):t},n}function pf(t,n){return n}function _f(t){function n(t){return 1/Math.min(s[t.source.index],s[t.target.index])}function e(n){for(var e=0,r=t.length;p>e;++e)for(var i,o,c,s,h,l,d,_=0;r>_;++_)i=t[_],o=i.source,c=i.target,s=c.x+c.vx-o.x-o.vx||ff(),h=c.y+c.vy-o.y-o.vy||ff(),l=Math.sqrt(s*s+h*h),l=(l-u[_])/l*n*a[_],s*=l,h*=l,c.vx-=s*(d=f[_]),c.vy-=h*d,o.vx+=s*(d=1-d),o.vy+=h*d}function r(){if(c){var n,e,r=c.length,l=t.length,d=L(c,h);for(n=0,s=new Array(r);r>n;++n)s[n]=0;for(n=0;l>n;++n)e=t[n],e.index=n,"object"!=typeof e.source&&(e.source=d.get(e.source)),"object"!=typeof e.target&&(e.target=d.get(e.target)),++s[e.source.index],++s[e.target.index];for(n=0,f=new Array(l);l>n;++n)e=t[n],f[n]=s[e.source.index]/(s[e.source.index]+s[e.target.index]);a=new Array(l),i(),u=new Array(l),o()}}function i(){if(c)for(var n=0,e=t.length;e>n;++n)a[n]=+l(t[n],n,t)}function o(){if(c)for(var n=0,e=t.length;e>n;++n)u[n]=+d(t[n],n,t)}var a,u,c,s,f,h=pf,l=n,d=sf(30),p=1;return null==t&&(t=[]),e.initialize=function(t){c=t,r()},e.links=function(n){return arguments.length?(t=n,r(),e):t},e.id=function(t){return arguments.length?(h=t,e):h},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(l="function"==typeof t?t:sf(+t),i(),e):l},e.distance=function(t){return arguments.length?(d="function"==typeof t?t:sf(+t),o(),e):d},e}function yf(t){return t.x}function vf(t){return t.y}function gf(t){function n(){e(),p.call("tick",o),u>a&&(d.stop(),p.call("end",o))}function e(){var n,e,r,i=t.length;for(a+=(s-a)*c,h.each(function(t){t(a)}),n=0;i>n;++n)e=t[n],e.x+=e.vx*=f,e.y+=e.vy*=f;for(n in l)r=l[n],e=t[n],e.x=r.x,e.y=r.y,e.vx=e.vy=0}function r(){for(var n,e=0,r=t.length;r>e;++e){if(n=t[e],n.index=e,isNaN(n.x)||isNaN(n.y)){var i=av*Math.sqrt(e),o=e*uv;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function i(n){return n.initialize&&n.initialize(t),n}var o,a=1,u=.001,c=1-Math.pow(u,1/300),s=0,f=.6,h=L(),l={},d=Fr(n),p=wr("tick","end");return null==t&&(t=[]),r(),o={tick:e,restart:function(){return d.restart(n),o},stop:function(){return d.stop(),o},nodes:function(n){return arguments.length?(t=n,r(),h.each(i),o):t},alpha:function(t){return arguments.length?(a=+t,o):a},alphaMin:function(t){return arguments.length?(u=+t,o):u},alphaDecay:function(t){return arguments.length?(c=+t,o):+c},alphaTarget:function(t){return arguments.length?(s=+t,o):s},drag:function(t){return arguments.length?(f=1-t,o):1-f},force:function(t,n){return arguments.length>1?(null==n?h.remove(t):h.set(t,i(n)),o):h.get(t)},fix:function(t,n,e){return l[t.index]={x:null==n?t.x:+n,y:null==e?t.y:+e},o},unfix:function(t){return delete l[t.index],o},unfixAll:function(){return l={},o},find:function(n,e,r){var i,o,a,u,c,s=0,f=t.length;for(null==r?r=1/0:r*=r,s=0;f>s;++s)u=t[s],i=n-u.x,o=e-u.y,a=i*i+o*o,r>a&&(c=u,r=a);return c},on:function(t,n){return arguments.length>1?(p.on(t,n),o):p.on(t)}}}function mf(){function t(t){var n,u=i.length,c=Ht(i,yf,vf).visitAfter(e);for(a=t,n=0;u>n;++n)o=i[n],c.visit(r)}function n(){if(i){var t,n=i.length;for(u=new Array(n),t=0;n>t;++t)u[t]=+c(i[t],t,i)}}function e(t){var n,e,r,i,o,a=0;if(t.length){for(r=i=o=0;4>o;++o)(n=t[o])&&(e=n.value)&&(a+=e,r+=e*n.x,i+=e*n.y);t.x=r/a,t.y=i/a}else{n=t,n.x=n.data.x,n.y=n.data.y;do a+=u[n.data.index];while(n=n.next)}t.value=a}function r(t,n,e,r){if(!t.value)return!0;var i=t.x-o.x,c=t.y-o.y,l=r-n,d=i*i+c*c;if(d>l*l/h)return f>d&&(0===i&&(i=ff(),d+=i*i),0===c&&(c=ff(),d+=c*c),s>d&&(d=Math.sqrt(s*d)),o.vx+=i*t.value*a/d,o.vy+=c*t.value*a/d),!0;if(!(t.length||d>=f)){(t.data!==o||t.next)&&(0===i&&(i=ff(),d+=i*i),0===c&&(c=ff(),d+=c*c),s>d&&(d=Math.sqrt(s*d)));do t.data!==o&&(l=u[t.data.index]*a/d,o.vx+=i*l,o.vy+=c*l);while(t=t.next)}}var i,o,a,u,c=sf(-30),s=1,f=1/0,h=.81;return t.initialize=function(t){i=t,n()},t.strength=function(e){return arguments.length?(c="function"==typeof e?e:sf(+e),n(),t):c},t.distanceMin=function(n){return arguments.length?(s=n*n,t):Math.sqrt(s)},t.distanceMax=function(n){return arguments.length?(f=n*n,t):Math.sqrt(f)},t.theta=function(n){return arguments.length?(h=n*n,t):Math.sqrt(h)},t}function xf(t){function n(t){for(var n,e=0,a=r.length;a>e;++e)n=r[e],n.vx+=(o[e]-n.x)*i[e]*t}function e(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;e>n;++n)i[n]=isNaN(o[n]=+t(r[n],n,r))?0:+a(r[n],n,r)}}var r,i,o,a=sf(.1);return"function"!=typeof t&&(t=sf(null==t?0:+t)),n.initialize=function(t){r=t,e()},n.strength=function(t){return arguments.length?(a="function"==typeof t?t:sf(+t),e(),n):a},n.x=function(r){return arguments.length?(t="function"==typeof r?r:sf(+r),e(),n):t},n}function bf(t){function n(t){for(var n,e=0,a=r.length;a>e;++e)n=r[e],n.vy+=(o[e]-n.y)*i[e]*t}function e(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;e>n;++n)i[n]=isNaN(o[n]=+t(r[n],n,r))?0:+a(r[n],n,r)}}var r,i,o,a=sf(.1);return"function"!=typeof t&&(t=sf(null==t?0:+t)),n.initialize=function(t){r=t,e()},n.strength=function(t){return arguments.length?(a="function"==typeof t?t:sf(+t),e(),n):a},n.y=function(r){return arguments.length?(t="function"==typeof r?r:sf(+r),e(),n):t},n}function wf(){t.event.stopImmediatePropagation()}function Mf(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function kf(t){var n=t.document.documentElement,e=Eu(t).on("dragstart.drag",Mf,!0);"onselectstart"in n?e.on("selectstart.drag",Mf,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Tf(t,n){var e=t.document.documentElement,r=Eu(t).on("dragstart.drag",null);n&&(r.on("click.drag",Mf,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function Nf(t){return function(){return t}}function Af(t,n,e,r,i,o,a,u,c,s){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=c,this._=s}function Cf(){return!t.event.button}function Sf(){return this.parentNode}function Ef(n){return null==n?{x:t.event.x,y:t.event.y}:n}function zf(){function n(t){t.on("mousedown.drag",e).on("touchstart.drag",o).on("touchmove.drag",a).on("touchend.drag touchcancel.drag",u).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!f&&h.apply(this,arguments)){var n=c("mouse",l.apply(this,arguments),ha,this,arguments);n&&(Eu(t.event.view).on("mousemove.drag",r,!0).on("mouseup.drag",i,!0),kf(t.event.view),wf(),s=!1,n("start"))}}function r(){Mf(),s=!0,p.mouse("drag")}function i(){Eu(t.event.view).on("mousemove.drag mouseup.drag",null),Tf(t.event.view,s),Mf(),p.mouse("end")}function o(){if(h.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=l.apply(this,arguments),o=r.length;for(n=0;o>n;++n)(e=c(r[n].identifier,i,Pu,this,arguments))&&(wf(),e("start"))}}function a(){var n,e,r=t.event.changedTouches,i=r.length;for(n=0;i>n;++n)(e=p[r[n].identifier])&&(Mf(),e("drag"))}function u(){var n,e,r=t.event.changedTouches,i=r.length;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),n=0;i>n;++n)(e=p[r[n].identifier])&&(wf(),e("end"))}function c(e,r,i,o,a){var u,c,s,f=i(r,e),h=_.copy();if(ca(new Af(n,"beforestart",u,e,y,f[0],f[1],0,0,h),function(){return null==(t.event.subject=u=d.apply(o,a))?!1:(c=u.x-f[0]||0,s=u.y-f[1]||0,!0)}))return function l(t){var d,_=f;switch(t){case"start":p[e]=l,d=y++;break;case"end":delete p[e],--y;case"drag":f=i(r,e),d=y}ca(new Af(n,t,u,e,d,f[0]+c,f[1]+s,f[0]-_[0],f[1]-_[1],h),h.apply,h,[t,o,a])}}var s,f,h=Cf,l=Sf,d=Ef,p={},_=wr("start","drag","end"),y=0;return n.filter=function(t){return arguments.length?(h="function"==typeof t?t:Nf(!!t),n):h},n.container=function(t){return arguments.length?(l="function"==typeof t?t:Nf(t),n):l},n.subject=function(t){return arguments.length?(d="function"==typeof t?t:Nf(t),n):d},n.on=function(){var t=_.on.apply(_,arguments);return t===_?n:t},n}function Pf(t){return function(){return t}}function Lf(t){return t[0]}function qf(t){return t[1]}function Uf(){this._=null}function Rf(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Df(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Of(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function If(t){for(;t.L;)t=t.L;return t}function Ff(t,n,e,r){var i=[null,null],o=lv.push(i)-1;return i.left=t,i.right=n,e&&Bf(i,t,n,e),r&&Bf(i,n,t,r),fv[t.index].halfedges.push(o),fv[n.index].halfedges.push(o),i}function Yf(t,n,e){var r=[n,e];return r.left=t,r}function Bf(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function Hf(t,n,e,r,i){var o,a,u=t[0],c=t[1],s=u[0],f=u[1],h=c[0],l=c[1],d=0,p=1,_=h-s,y=l-f;if(a=n-s,_||!(a>0)){if(a/=_,0>_){if(d>a)return;p>a&&(p=a)}else if(_>0){if(a>p)return;a>d&&(d=a)}if(a=r-s,_||!(0>a)){if(a/=_,0>_){if(a>p)return;a>d&&(d=a)}else if(_>0){if(d>a)return;p>a&&(p=a)}if(a=e-f,y||!(a>0)){if(a/=y,0>y){if(d>a)return;p>a&&(p=a)}else if(y>0){if(a>p)return;a>d&&(d=a)}if(a=i-f,y||!(0>a)){if(a/=y,0>y){if(a>p)return;a>d&&(d=a)}else if(y>0){if(d>a)return;p>a&&(p=a)}return d>0||1>p?(o=t.left,a=t.right,d>0&&(u=[s+d*_,f+d*y]),1>p&&(c=[s+p*_,f+p*y]),t=[u,c],t.left=o,t.right=a,t):t}}}}}function Xf(t,n,e,r,i){var o=t[1];if(o)return t;var a,u,c=t[0],s=t.left,f=t.right,h=s[0],l=s[1],d=f[0],p=f[1],_=(h+d)/2,y=(l+p)/2;if(p===l){if(n>_||_>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[_,e];o=[_,i]}else{if(c){if(c[1]<e)return}else c=[_,i];o=[_,e]}}else if(a=(h-d)/(p-l),u=y-a*_,-1>a||a>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(e-u)/a,e];o=[(i-u)/a,i]}else{if(c){if(c[1]<e)return}else c=[(i-u)/a,i];o=[(e-u)/a,e]}else if(p>l){if(c){if(c[0]>=r)return}else c=[n,a*n+u];o=[r,a*r+u]}else{if(c){if(c[0]<n)return}else c=[r,a*r+u];o=[n,a*n+u]}return t=[c,o],t.left=s,t.right=f,t}function jf(t,n,e,r){for(var i,o=lv.length,a=new Array(o);o--;)(i=Xf(lv[o],t,n,e,r))&&(i=Hf(i,t,n,e,r))&&(Math.abs(i[0][0]-i[1][0])>_v||Math.abs(i[0][1]-i[1][1])>_v)&&(a[o]=i);return a}function Vf(t){return fv[t.index]={site:t,halfedges:[]}}function Wf(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function $f(t,n){return n[+(n.left!==t.site)]}function Zf(t,n){return n[+(n.left===t.site)]}function Jf(){for(var t,n,e,r,i=0,o=fv.length;o>i;++i)if((t=fv[i])&&(r=(n=t.halfedges).length)){var a=new Array(r),u=new Array(r);for(e=0;r>e;++e)a[e]=e,u[e]=Wf(t,lv[n[e]]);for(a.sort(function(t,n){return u[n]-u[t]}),e=0;r>e;++e)u[e]=n[a[e]];for(e=0;r>e;++e)n[e]=u[e]}}function Qf(t,n,e,r,i){for(var o,a,u,c,s,f,h,l,d,p,_=fv.length;_--;)if(o=fv[_]){for(u=o.halfedges,a=u.length;a--;)t[u[a]]||u.splice(a,1);for(a=0,c=u.length;c>a;)l=Zf(o,t[u[a]]),d=l[0],p=l[1],s=$f(o,t[u[++a%c]]),f=s[0],h=s[1],(Math.abs(d-f)>_v||Math.abs(p-h)>_v)&&(u.splice(a,0,t.push(Yf(o.site,l,Math.abs(d-n)<_v&&i-p>_v?[n,Math.abs(f-n)<_v?h:i]:Math.abs(p-i)<_v&&r-d>_v?[Math.abs(h-i)<_v?f:r,i]:Math.abs(d-r)<_v&&p-e>_v?[r,Math.abs(f-r)<_v?h:e]:Math.abs(p-e)<_v&&d-n>_v?[Math.abs(h-e)<_v?f:n,e]:null))-1),++c)}}function Gf(){Rf(this),this.x=this.y=this.arc=this.site=this.cy=null}function Kf(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i[0],u=i[1],c=r[0]-a,s=r[1]-u,f=o[0]-a,h=o[1]-u,l=2*(c*h-s*f);if(!(l>=-yv)){var d=c*c+s*s,p=f*f+h*h,_=(h*d-s*p)/l,y=(c*p-f*d)/l,v=dv.pop()||new Gf;v.arc=t,v.site=i,v.x=_+a,v.y=(v.cy=y+u)+Math.sqrt(_*_+y*y),t.circle=v;for(var g=null,m=hv._;m;)if(v.y<m.y||v.y===m.y&&v.x<=m.x){if(!m.L){g=m.P;break}m=m.L}else{if(!m.R){g=m;break}m=m.R}hv.insert(g,v),g||(cv=v)}}}}function th(t){var n=t.circle;n&&(n.P||(cv=n.N),hv.remove(n),dv.push(n),Rf(n),t.circle=null)}function nh(){Rf(this),this.edge=this.site=this.circle=null}function eh(t){var n=pv.pop()||new nh;return n.site=t,n}function rh(t){th(t),sv.remove(t),pv.push(t),Rf(t)}function ih(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],o=t.P,a=t.N,u=[t];rh(t);for(var c=o;c.circle&&Math.abs(e-c.circle.x)<_v&&Math.abs(r-c.circle.cy)<_v;)o=c.P,u.unshift(c),rh(c),c=o;u.unshift(c),th(c);for(var s=a;s.circle&&Math.abs(e-s.circle.x)<_v&&Math.abs(r-s.circle.cy)<_v;)a=s.N,u.push(s),rh(s),s=a;u.push(s),th(s);var f,h=u.length;for(f=1;h>f;++f)s=u[f],c=u[f-1],Bf(s.edge,c.site,s.site,i);c=u[0],s=u[h-1],s.edge=Ff(c.site,s.site,null,i),Kf(c),Kf(s)}function oh(t){for(var n,e,r,i,o=t[0],a=t[1],u=sv._;u;)if(r=ah(u,a)-o,r>_v)u=u.L;else{if(i=o-uh(u,a),!(i>_v)){r>-_v?(n=u.P,e=u):i>-_v?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}Vf(t);var c=eh(t);if(sv.insert(n,c),n||e){if(n===e)return th(n),e=eh(n.site),sv.insert(c,e),c.edge=e.edge=Ff(n.site,c.site),Kf(n),void Kf(e);if(!e)return void(c.edge=Ff(n.site,c.site));th(n),th(e);var s=n.site,f=s[0],h=s[1],l=t[0]-f,d=t[1]-h,p=e.site,_=p[0]-f,y=p[1]-h,v=2*(l*y-d*_),g=l*l+d*d,m=_*_+y*y,x=[(y*g-d*m)/v+f,(l*m-_*g)/v+h];Bf(e.edge,s,p,x),c.edge=Ff(s,t,null,x),e.edge=Ff(t,p,null,x),Kf(n),Kf(e)}}function ah(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var a=t.P;if(!a)return-(1/0);e=a.site;var u=e[0],c=e[1],s=c-n;if(!s)return u;var f=u-r,h=1/o-1/s,l=f/s;return h?(-l+Math.sqrt(l*l-2*h*(f*f/(-2*s)-c+s/2+i-o/2)))/h+r:(r+u)/2}function uh(t,n){var e=t.N;if(e)return ah(e,n);var r=t.site;return r[1]===n?r[0]:1/0}function ch(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function sh(t,n){return n[1]-t[1]||n[0]-t[0]}function fh(t,n){var e,r,i,o=t.sort(sh).pop();for(lv=[],fv=new Array(t.length),sv=new Uf,hv=new Uf;;)if(i=cv,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===e&&o[1]===r||(oh(o),e=o[0],r=o[1]),o=t.pop();else{if(!i)break;ih(i.arc)}if(Jf(),n){var a=n[0][0],u=n[0][1],c=n[1][0],s=n[1][1];this.extent=[[a,u],[c,s]],this.cellEdges=jf(a,u,c,s),Qf(this.cellEdges,a,u,c,s)}else this.cellEdges=lv;this.cells=fv,this.edges=lv,sv=hv=lv=fv=null}function hh(){function t(t){return new fh(t.map(function(r,i){var o=[Math.round(n(r,i,t)/_v)*_v,Math.round(e(r,i,t)/_v)*_v];return o.index=i,o.data=r,o}),r)}var n=Lf,e=qf,r=null;return t.polygons=function(n){return t(n).polygons()},t.links=function(n){return t(n).links()},t.triangles=function(n){return t(n).triangles()},t.x=function(e){return arguments.length?(n="function"==typeof e?e:Pf(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:Pf(+n),t):e},t.extent=function(n){return arguments.length?(r=null==n?null:[[+n[0][0],+n[0][1]],[+n[1][0],+n[1][1]]],t):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},t.size=function(n){return arguments.length?(r=null==n?null:[[0,0],[+n[0],+n[1]]],t):r&&[r[1][0],r[1][1]]},t}function lh(t){return function(){return t}}function dh(t,n,e){this.target=t,this.type=n,this.transform=e}function ph(t,n,e){this.k=t,this.x=n,this.y=e}function _h(t){return t.__zoom||vv}function yh(){t.event.stopImmediatePropagation()}function vh(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function gh(){return!t.event.button}function mh(){var t=this.ownerSVGElement;return[[0,0],t?[t.width.baseVal.value,t.height.baseVal.value]:[this.clientWidth,this.clientHeight]]}function xh(){return this.__zoom||vv}function bh(){function n(t){t.on("wheel.zoom",s).on("mousedown.zoom",f).on("dblclick.zoom",h).on("touchstart.zoom",l).on("touchmove.zoom",d).on("touchend.zoom touchcancel.zoom",p).style("-webkit-tap-highlight-color","rgba(0,0,0,0)").property("__zoom",xh)}function e(t,n){return n=Math.max(M,Math.min(k,n)),n===t.k?t:new ph(n,t.x,t.y)}function r(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ph(t.k,r,i)}function i(t,n){var e=Math.min(0,t.invertX(n[0][0])-T)||Math.max(0,t.invertX(n[1][0])-N),r=Math.min(0,t.invertY(n[0][1])-A)||Math.max(0,t.invertY(n[1][1])-C);return e||r?t.translate(e,r):t}function o(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function a(t,n,e){t.on("start.zoom",function(){u(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){u(this,arguments).end()}).tween("zoom",function(){var t=this,r=arguments,i=u(t,r),a=w.apply(t,r),c=e||o(a),s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),f=t.__zoom,h="function"==typeof n?n.apply(t,r):n,l=yr(f.invert(c).concat(s/f.k),h.invert(c).concat(s/h.k));return function(t){if(1===t)t=h;else{var n=l(t),e=s/n[2];t=new ph(e,c[0]-n[0]*e,c[1]-n[1]*e)}i.zoom(null,t)}})}function u(t,n){for(var e,r=0,i=E.length;i>r;++r)if((e=E[r]).that===t)return e;return new c(t,n)}function c(t,n){this.that=t,this.args=n,this.index=-1,this.active=0}function s(){function n(){x=null,o.end()}if(b.apply(this,arguments)){var o=u(this,arguments),a=this.__zoom,c=Math.max(M,Math.min(k,a.k*Math.pow(2,-t.event.deltaY*(t.event.deltaMode?120:1)/500)));if(x){var s=ha(this);y[0]===s[0]&&y[1]===s[1]||(v=a.invert(y=s)),clearTimeout(x)}else{if(a.k===c)return;o.extent=w.apply(this,arguments),v=a.invert(y=ha(this)),Iu(this),o.start()}vh(),x=setTimeout(n,L),o.zoom("mouse",i(r(e(a,c),y,v),o.extent))}}function f(){function n(){vh(),_=!0,o.zoom("mouse",i(r(o.that.__zoom,y=ha(o.that),v),o.extent))}function e(){a.on("mousemove.zoom mouseup.zoom",null),Tf(t.event.view,_),vh(),o.end()}if(!m&&b.apply(this,arguments)){var o=u(this,arguments),a=Eu(t.event.view).on("mousemove.zoom",n,!0).on("mouseup.zoom",e,!0);kf(t.event.view),yh(),_=!1,o.extent=w.apply(this,arguments),v=this.__zoom.invert(y=ha(this)),Iu(this),o.start()}}function h(){if(b.apply(this,arguments)){var o=this.__zoom,u=ha(this),c=o.invert(u),s=o.k*(t.event.shiftKey?.5:2),f=i(r(e(o,s),u,c),w.apply(this,arguments));vh(),S>0?Eu(this).transition().duration(S).call(a,f,u):Eu(this).call(n.transform,f)}}function l(){if(b.apply(this,arguments)){var n,e,r,i=u(this,arguments),o=t.event.changedTouches,a=o.length;for(yh(),n=0;a>n;++n)e=o[n],r=Pu(this,o,e.identifier),r=[r,this.__zoom.invert(r),e.identifier],i.touch0?i.touch1||(i.touch1=r):i.touch0=r;return g&&(g=clearTimeout(g),!i.touch1)?(i.end(),h.apply(this,arguments)):void(t.event.touches.length===a&&(g=setTimeout(function(){g=null},P),Iu(this),i.extent=w.apply(this,arguments),i.start()))}}function d(){var n,o,a,c,s=u(this,arguments),f=t.event.changedTouches,h=f.length;for(vh(),g&&(g=clearTimeout(g)),n=0;h>n;++n)o=f[n],a=Pu(this,f,o.identifier),s.touch0&&s.touch0[2]===o.identifier?s.touch0[0]=a:s.touch1&&s.touch1[2]===o.identifier&&(s.touch1[0]=a);if(o=s.that.__zoom,s.touch1){var l=s.touch0[0],d=s.touch0[1],p=s.touch1[0],_=s.touch1[1],y=(y=p[0]-l[0])*y+(y=p[1]-l[1])*y,v=(v=_[0]-d[0])*v+(v=_[1]-d[1])*v;o=e(o,Math.sqrt(y/v)),a=[(l[0]+p[0])/2,(l[1]+p[1])/2],c=[(d[0]+_[0])/2,(d[1]+_[1])/2]}else{if(!s.touch0)return;a=s.touch0[0],c=s.touch0[1]}s.zoom("touch",i(r(o,a,c),s.extent))}function p(){var n,e,r=u(this,arguments),i=t.event.changedTouches,o=i.length;for(yh(),m&&clearTimeout(m),m=setTimeout(function(){m=null},P),n=0;o>n;++n)e=i[n],r.touch0&&r.touch0[2]===e.identifier?delete r.touch0:r.touch1&&r.touch1[2]===e.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0||r.end()}var _,y,v,g,m,x,b=gh,w=mh,M=0,k=1/0,T=-k,N=k,A=T,C=N,S=250,E=[],z=wr("start","zoom","end"),P=500,L=150;return n.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",xh),t!==e?a(t,n):e.interrupt().each(function(){u(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},n.scaleBy=function(t,e){n.scaleTo(t,function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n})},n.scaleTo=function(t,a){n.transform(t,function(){var t=w.apply(this,arguments),n=this.__zoom,u=o(t),c=n.invert(u),s="function"==typeof a?a.apply(this,arguments):a;return i(r(e(n,s),u,c),t)})},n.translateBy=function(t,e,r){n.transform(t,function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),w.apply(this,arguments))})},c.prototype={start:function(){return 1===++this.active&&(this.index=E.push(this)-1,this.emit("start")),this},zoom:function(t,n){return y&&"mouse"!==t&&(v=n.invert(y)),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0===--this.active&&(E.splice(this.index,1),y=v=null,this.index=-1,this.emit("end")),this},emit:function(t){ca(new dh(n,t,this.that.__zoom),z.apply,z,[t,this.that,this.args])}},n.filter=function(t){return arguments.length?(b="function"==typeof t?t:lh(!!t),n):b},n.extent=function(t){return arguments.length?(w="function"==typeof t?t:lh([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),n):w},n.scaleExtent=function(t){return arguments.length?(M=+t[0],k=+t[1],n):[M,k]},n.translateExtent=function(t){return arguments.length?(T=+t[0][0],N=+t[1][0],A=+t[0][1],C=+t[1][1],n):[[T,A],[N,C]]},n.duration=function(t){return arguments.length?(S=+t,n):S},n.on=function(){var t=z.on.apply(z,arguments);return t===z?n:t},n}function wh(t){return function(){return t}}function Mh(t,n,e){this.target=t,this.type=n,this.selection=e}function kh(){t.event.stopImmediatePropagation()}function Th(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function Nh(t){return{type:t}}function Ah(){return!t.event.button}function Ch(){var t=this.ownerSVGElement;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Sh(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Eh(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function zh(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ph(){return Uh(wv)}function Lh(){return Uh(Mv)}function qh(){return Uh(kv)}function Uh(n){function e(t){var e=t.property("__brush",u).selectAll(".overlay").data([Nh("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Tv.overlay).merge(e).each(function(){var t=Sh(this).extent;Eu(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),t.selectAll(".selection").data([Nh("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Tv.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=t.selectAll(".handle").data(n.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Tv[t.type]}),t.each(r).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",a)}function r(){var t=Eu(this),n=Sh(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?n[1][0]-l/2:n[0][0]-l/2}).attr("y",function(t){return"s"===t.type[0]?n[1][1]-l/2:n[0][1]-l/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+l:l}).attr("height",function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+l:l})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function i(t,n){return t.__brush.emitter||new o(t,n)}function o(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function a(){function e(){var t=ha(k);!R||w||M||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?M=!0:w=!0),O=t,b=!0,Th(),o()}function o(){var t;switch(m=O[0]-D[0],x=O[1]-D[1],N){case mv:case gv:A&&(m=Math.max(P-h,Math.min(q-_,m)),l=h+m,y=_+m),C&&(x=Math.max(L-d,Math.min(U-v,x)),p=d+x,g=v+x);break;case xv:0>A?(m=Math.max(P-h,Math.min(q-h,m)),l=h+m,y=_):A>0&&(m=Math.max(P-_,Math.min(q-_,m)),l=h,y=_+m),0>C?(x=Math.max(L-d,Math.min(U-d,x)),p=d+x,g=v):C>0&&(x=Math.max(L-v,Math.min(U-v,x)),p=d,g=v+x);break;case bv:A&&(l=Math.max(P,Math.min(q,h-m*A)),y=Math.max(P,Math.min(q,_+m*A))),C&&(p=Math.max(L,Math.min(U,d-x*C)),g=Math.max(L,Math.min(U,v+x*C)))}l>y&&(A*=-1,t=h,h=_,_=t,t=l,l=y,y=t,T in Nv&&Y.attr("cursor",Tv[T=Nv[T]])),p>g&&(C*=-1,t=d,d=v,v=t,t=p,p=g,g=t,T in Av&&Y.attr("cursor",Tv[T=Av[T]])),w&&(l=z[0][0],y=z[1][0]),M&&(p=z[0][1],g=z[1][1]),z[0][0]===l&&z[0][1]===p&&z[1][0]===y&&z[1][1]===g||(z[0][0]=l,z[0][1]=p,z[1][0]=y,z[1][1]=g,r.call(k),I.brush())}function a(){if(kh(),t.event.touches){if(t.event.touches.length)return;c&&clearTimeout(c),c=setTimeout(function(){c=null},500),F.on("touchmove.brush touchend.brush touchcancel.brush",null)}else Tf(t.event.view,b),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);F.attr("pointer-events","all"),Y.attr("cursor",Tv.overlay),Eh(z)&&(S.selection=null,r.call(k)),I.end()}function u(){switch(t.event.keyCode){case 16:R=A&&C;break;case 18:N===xv&&(A&&(_=y-m*A,h=l+m*A),C&&(v=g-x*C,d=p+x*C),N=bv,o());break;case 32:N!==xv&&N!==bv||(0>A?_=y-m:A>0&&(h=l-m),0>C?v=g-x:C>0&&(d=p-x),N=mv,Y.attr("cursor",Tv.selection),o());break;default:return}Th()}function s(){switch(t.event.keyCode){case 16:R&&(w=M=R=!1,o());break;case 18:N===bv&&(0>A?_=y:A>0&&(h=l),0>C?v=g:C>0&&(d=p),N=xv,o());break;case 32:N===mv&&(t.event.altKey?(A&&(_=y-m*A,h=l+m*A),C&&(v=g-x*C,d=p+x*C),N=bv):(0>A?_=y:A>0&&(h=l),0>C?v=g:C>0&&(d=p),N=xv),Y.attr("cursor",Tv[T]),o());break;default:return}Th()}if(t.event.touches){if(t.event.changedTouches.length<t.event.touches.length)return Th()}else if(c)return;if(f.apply(this,arguments)){var h,l,d,p,_,y,v,g,m,x,b,w,M,k=this,T=t.event.target.__data__.type,N="selection"===(t.event.metaKey?T="overlay":T)?gv:t.event.altKey?bv:xv,A=n===Mv?null:Cv[T],C=n===wv?null:Sv[T],S=Sh(k),E=S.extent,z=S.selection,P=E[0][0],L=E[0][1],q=E[1][0],U=E[1][1],R=A&&C&&t.event.shiftKey,D=ha(k),O=D,I=i(k,arguments).beforestart();"overlay"===T?S.selection=z=[[h=n===Mv?P:D[0],d=n===wv?L:D[1]],[_=n===Mv?q:h,v=n===wv?U:d]]:(h=z[0][0],d=z[0][1],_=z[1][0],v=z[1][1]),l=h,p=d,y=_,g=v;var F=Eu(k).attr("pointer-events","none"),Y=F.selectAll(".overlay").attr("cursor",Tv[T]);if(t.event.touches)F.on("touchmove.brush",e,!0).on("touchend.brush touchcancel.brush",a,!0);else{var B=Eu(t.event.view).on("keydown.brush",u,!0).on("keyup.brush",s,!0).on("mousemove.brush",e,!0).on("mouseup.brush",a,!0);kf(t.event.view)}kh(),Iu(k),r.call(k),I.start()}}function u(){var t=this.__brush||{selection:null};return t.extent=s.apply(this,arguments),t.dim=n,t}var c,s=Ch,f=Ah,h=wr(e,"start","brush","end"),l=6;return e.move=function(t,e){t.selection?t.on("start.brush",function(){i(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){i(this,arguments).end()}).tween("brush",function(){function t(t){a.selection=1===t&&Eh(s)?null:f(t),r.call(o),u.brush()}var o=this,a=o.__brush,u=i(o,arguments),c=a.selection,s=n.input("function"==typeof e?e.apply(this,arguments):e,a.extent),f=ur(c,s);return c&&s?t:t(1)}):t.each(function(){var t=this,o=arguments,a=t.__brush,u=n.input("function"==typeof e?e.apply(t,o):e,a.extent),c=i(t,o).beforestart();Iu(t),a.selection=null==u||Eh(u)?null:u,r.call(t),c.start().brush().end()})},o.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0===--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){ca(new Mh(e,t,n.output(this.state.selection)),h.apply,h,[t,this.that,this.args])}},e.extent=function(t){return arguments.length?(s="function"==typeof t?t:wh([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),e):s},e.filter=function(t){return arguments.length?(f="function"==typeof t?t:wh(!!t),e):f},e.handleSize=function(t){return arguments.length?(l=+t,e):l},e.on=function(){var t=h.on.apply(h,arguments);return t===h?e:t},e}var Rh="4.0.0-alpha.46",Dh=e(n),Oh=Dh.right,Ih=Dh.left,Fh=Array.prototype,Yh=Fh.slice,Bh=Fh.map,Hh=Math.sqrt(50),Xh=Math.sqrt(10),jh=Math.sqrt(2),Vh="$";P.prototype=L.prototype={constructor:P,has:function(t){return Vh+t in this},get:function(t){return this[Vh+t]},set:function(t,n){return this[Vh+t]=n,this},remove:function(t){var n=Vh+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===Vh&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===Vh&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===Vh&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===Vh&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===Vh&&++t;return t},empty:function(){for(var t in this)if(t[0]===Vh)return!1;return!0},each:function(t){for(var n in this)n[0]===Vh&&t(this[n],n.slice(1),this)}};var Wh=L.prototype;I.prototype=F.prototype={constructor:I,has:Wh.has,add:function(t){return t+="",this[Vh+t]=t,this},remove:Wh.remove,clear:Wh.clear,values:Wh.keys,size:Wh.size,empty:Wh.empty,each:Wh.each};var $h=3,Zh=function Ev(t){function n(n){return Math.pow(n,t)}return t=+t,n.exponent=Ev,n}($h),Jh=function zv(t){function n(n){return 1-Math.pow(1-n,t)}return t=+t,n.exponent=zv,n}($h),Qh=function Pv(t){function n(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return t=+t,n.exponent=Pv,n}($h),Gh=Math.PI,Kh=Gh/2,tl=4/11,nl=6/11,el=8/11,rl=.75,il=9/11,ol=10/11,al=.9375,ul=21/22,cl=63/64,sl=1/tl/tl,fl=1.70158,hl=function Lv(t){function n(n){return n*n*((t+1)*n-t)}return t=+t,n.overshoot=Lv,n}(fl),ll=function qv(t){function n(n){return--n*n*((t+1)*n+t)+1}return t=+t,n.overshoot=qv,n}(fl),dl=function Uv(t){function n(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return t=+t,n.overshoot=Uv,n}(fl),pl=2*Math.PI,_l=1,yl=.3,vl=function Rv(t,n){function e(e){
return t*Math.pow(2,10*--e)*Math.sin((r-e)/n)}var r=Math.asin(1/(t=Math.max(1,t)))*(n/=pl);return e.amplitude=function(t){return Rv(t,n*pl)},e.period=function(n){return Rv(t,n)},e}(_l,yl),gl=function Dv(t,n){function e(e){return 1-t*Math.pow(2,-10*(e=+e))*Math.sin((e+r)/n)}var r=Math.asin(1/(t=Math.max(1,t)))*(n/=pl);return e.amplitude=function(t){return Dv(t,n*pl)},e.period=function(n){return Dv(t,n)},e}(_l,yl),ml=function Ov(t,n){function e(e){return((e=2*e-1)<0?t*Math.pow(2,10*e)*Math.sin((r-e)/n):2-t*Math.pow(2,-10*e)*Math.sin((r+e)/n))/2}var r=Math.asin(1/(t=Math.max(1,t)))*(n/=pl);return e.amplitude=function(t){return Ov(t,n*pl)},e.period=function(n){return Ov(t,n)},e}(_l,yl),xl=Math.PI,bl=2*xl,wl=1e-6,Ml=bl-wl;Mt.prototype=kt.prototype={constructor:Mt,moveTo:function(t,n){this._.push("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._.push("Z"))},lineTo:function(t,n){this._.push("L",this._x1=+t,",",this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._.push("Q",+t,",",+n,",",this._x1=+e,",",this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._.push("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,a=this._y1,u=e-t,c=r-n,s=o-t,f=a-n,h=s*s+f*f;if(0>i)throw new Error("negative radius: "+i);if(null===this._x1)this._.push("M",this._x1=t,",",this._y1=n);else if(h>wl)if(Math.abs(f*u-c*s)>wl&&i){var l=e-o,d=r-a,p=u*u+c*c,_=l*l+d*d,y=Math.sqrt(p),v=Math.sqrt(h),g=i*Math.tan((xl-Math.acos((p+h-_)/(2*y*v)))/2),m=g/v,x=g/y;Math.abs(m-1)>wl&&this._.push("L",t+m*s,",",n+m*f),this._.push("A",i,",",i,",0,0,",+(f*l>s*d),",",this._x1=t+x*u,",",this._y1=n+x*c)}else this._.push("L",this._x1=t,",",this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,e=+e;var a=e*Math.cos(r),u=e*Math.sin(r),c=t+a,s=n+u,f=1^o,h=o?r-i:i-r;if(0>e)throw new Error("negative radius: "+e);null===this._x1?this._.push("M",c,",",s):(Math.abs(this._x1-c)>wl||Math.abs(this._y1-s)>wl)&&this._.push("L",c,",",s),e&&(h>Ml?this._.push("A",e,",",e,",0,1,",f,",",t-a,",",n-u,"A",e,",",e,",0,1,",f,",",this._x1=c,",",this._y1=s):(0>h&&(h=h%bl+bl),this._.push("A",e,",",e,",0,",+(h>=xl),",",f,",",this._x1=t+e*Math.cos(i),",",this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+n,"h",+e,"v",+r,"h",-e,"Z")},toString:function(){return this._.join("")}};var kl=Ht.prototype=Xt.prototype;kl.copy=function(){var t,n,e=new Xt(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=jt(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;4>i;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=jt(n));return e},kl.add=Tt,kl.addAll=At,kl.cover=Ct,kl.data=St,kl.extent=Et,kl.find=Pt,kl.remove=Lt,kl.removeAll=qt,kl.root=Ut,kl.size=Rt,kl.visit=Dt,kl.visitAfter=Ot,kl.x=Ft,kl.y=Bt;var Tl=[].slice,Nl={};Vt.prototype=Gt.prototype={constructor:Vt,defer:function(t){if("function"!=typeof t||this._call)throw new Error;if(null!=this._error)return this;var n=Tl.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),Wt(this),this},abort:function(){return null==this._error&&Jt(this,new Error("abort")),this},await:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=function(n,e){t.apply(null,[n].concat(e))},Qt(this),this},awaitAll:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=t,Qt(this),this}};var Al=1e-12,Cl=Math.PI,Sl=Cl/2,El=2*Cl;fn.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 zl=xn(hn);mn.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))}};var Pl={draw:function(t,n){var e=Math.sqrt(n/Cl);t.moveTo(e,0),t.arc(0,0,e,0,El)}},Ll={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},ql=Math.sqrt(1/3),Ul=2*ql,Rl={draw:function(t,n){var e=Math.sqrt(n/Ul),r=e*ql;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Dl=.8908130915292852,Ol=Math.sin(Cl/10)/Math.sin(7*Cl/10),Il=Math.sin(El/10)*Ol,Fl=-Math.cos(El/10)*Ol,Yl={draw:function(t,n){var e=Math.sqrt(n*Dl),r=Il*e,i=Fl*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;5>o;++o){var a=El*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},Bl={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Hl=Math.sqrt(3),Xl={draw:function(t,n){var e=-Math.sqrt(n/(3*Hl));t.moveTo(0,2*e),t.lineTo(-Hl*e,-e),t.lineTo(Hl*e,-e),t.closePath()}},jl=-.5,Vl=Math.sqrt(3)/2,Wl=1/Math.sqrt(12),$l=3*(Wl/2+1),Zl={draw:function(t,n){var e=Math.sqrt(n/$l),r=e/2,i=e*Wl,o=r,a=e*Wl+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(jl*r-Vl*i,Vl*r+jl*i),t.lineTo(jl*o-Vl*a,Vl*o+jl*a),t.lineTo(jl*u-Vl*c,Vl*u+jl*c),t.lineTo(jl*r+Vl*i,jl*i-Vl*r),t.lineTo(jl*o+Vl*a,jl*a-Vl*o),t.lineTo(jl*u+Vl*c,jl*c-Vl*u),t.closePath()}},Jl=[Pl,Ll,Rl,Bl,Yl,Xl,Zl];An.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:Nn(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:Nn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Sn.prototype={areaStart:Tn,areaEnd:Tn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Nn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},zn.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(){(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;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Nn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Ln.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],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Ql=function Iv(t){function n(n){return 1===t?new An(n):new Ln(n,t)}return n.beta=function(t){return Iv(+t)},n}(.85);Un.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:qn(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:qn(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 Gl=function Fv(t){function n(n){return new Un(n,t)}return n.tension=function(t){return Fv(+t)},n}(0);Rn.prototype={areaStart:Tn,areaEnd:Tn,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:qn(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 Kl=function Yv(t){function n(n){return new Rn(n,t)}return n.tension=function(t){return Yv(+t)},n}(0);Dn.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:qn(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 td=function Bv(t){function n(n){return new Dn(n,t)}return n.tension=function(t){return Bv(+t)},n}(0);In.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,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:On(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}};var nd=function Hv(t){function n(n){return t?new In(n,t):new Un(n,0)}return n.alpha=function(t){return Hv(+t)},n}(.5);Fn.prototype={areaStart:Tn,areaEnd:Tn,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:On(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}};var ed=function Xv(t){function n(n){return t?new Fn(n,t):new Rn(n,0)}return n.alpha=function(t){return Xv(+t)},n}(.5);Yn.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:On(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}};var rd=function jv(t){function n(n){return t?new Yn(n,t):new Dn(n,0)}return n.alpha=function(t){return jv(+t)},n}(.5);Bn.prototype={areaStart:Tn,areaEnd:Tn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},$n.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:Wn(this,this._t0,Vn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Wn(this,Vn(this,e=jn(this,t,n)),e);break;default:Wn(this,this._t0,e=jn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Zn.prototype=Object.create($n.prototype)).point=function(t,n){$n.prototype.point.call(this,n,t)},Jn.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)}},Kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=te(t),i=te(n),o=0,a=1;e>a;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,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:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var id=Array.prototype.slice,od=.7,ad=1/od,ud=/^#([0-9a-f]{3})$/,cd=/^#([0-9a-f]{6})$/,sd=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,fd=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,hd=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,ld=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,dd=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,pd=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,_d={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};ge(xe,be,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),ge(Ne,Te,me(xe,{brighter:function(t){return t=null==t?ad:Math.pow(ad,t),new Ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?od:Math.pow(od,t),new Ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),ge(Ee,Se,me(xe,{brighter:function(t){return t=null==t?ad:Math.pow(ad,t),new Ee(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?od:Math.pow(od,t),new Ee(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+(.5>e?e:1-e)*n,i=2*e-r;return new Ne(ze(t>=240?t-240:t+120,i,r),ze(t,i,r),ze(120>t?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 yd=Math.PI/180,vd=180/Math.PI,gd=18,md=.95047,xd=1,bd=1.08883,wd=4/29,Md=6/29,kd=3*Md*Md,Td=Md*Md*Md;ge(qe,Le,me(xe,{brighter:function(t){return new qe(this.l+gd*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new qe(this.l-gd*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=xd*Re(t),n=md*Re(n),e=bd*Re(e),new Ne(De(3.2404542*n-1.5371385*t-.4985314*e),De(-.969266*n+1.8760108*t+.041556*e),De(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),ge(Ye,Fe,me(xe,{brighter:function(t){return new Ye(this.h,this.c,this.l+gd*(null==t?1:t),this.opacity)},darker:function(t){return new Ye(this.h,this.c,this.l-gd*(null==t?1:t),this.opacity)},rgb:function(){return Pe(this).rgb()}}));var Nd=-.14861,Ad=1.78277,Cd=-.29227,Sd=-.90649,Ed=1.97294,zd=Ed*Sd,Pd=Ed*Ad,Ld=Ad*Cd-Sd*Nd;ge(Xe,He,me(xe,{brighter:function(t){return t=null==t?ad:Math.pow(ad,t),new Xe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?od:Math.pow(od,t),new Xe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*yd,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Ne(255*(n+e*(Nd*r+Ad*i)),255*(n+e*(Cd*r+Sd*i)),255*(n+e*(Ed*r)),this.opacity)}}));var qd,Ud,Rd,Dd,Od=function Vv(t){function n(t,n){var r=e((t=Te(t)).r,(n=Te(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=e(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}var e=Ge(t);return n.gamma=Vv,n}(1),Id=tr(Ve),Fd=tr(We),Yd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bd=new RegExp(Yd.source,"g"),Hd=180/Math.PI,Xd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},jd=lr(fr,"px, ","px)","deg)"),Vd=lr(hr,", ",")",")"),Wd=Math.SQRT2,$d=2,Zd=4,Jd=1e-12,Qd=vr(Qe),Gd=vr(Ke),Kd=mr(Qe),tp=mr(Ke),np=xr(Qe),ep=xr(Ke),rp={value:function(){}};Mr.prototype=wr.prototype={constructor:Mr,on:function(t,n){var e,r=this._,i=kr(t+"",r),o=-1,a=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=Nr(r[e],t.name,n);else if(null==n)for(e in r)r[e]=Nr(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=Tr(r[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Mr(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;e>o;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],o=0,e=r.length;e>o;++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;o>i;++i)r[i].value.apply(n,e)}};var ip,op,ap=Er(","),up=ap.parse,cp=ap.parseRows,sp=ap.format,fp=ap.formatRows,hp=Er(" "),lp=hp.parse,dp=hp.parseRows,pp=hp.format,_p=hp.formatRows,yp=qr("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),vp=qr("application/json",function(t){return JSON.parse(t.responseText)}),gp=qr("text/plain",function(t){return t.responseText}),mp=qr("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n}),xp=Ur("text/csv",up),bp=Ur("text/tab-separated-values",lp),wp=0,Mp=0,kp=0,Tp=1e3,Np=0,Ap=0,Cp=0,Sp="object"==typeof performance?performance:Date,Ep="function"==typeof requestAnimationFrame?Sp===Date?function(t){requestAnimationFrame(function(){t(Sp.now())})}:requestAnimationFrame:function(t){setTimeout(t,17)};Ir.prototype=Fr.prototype={constructor:Ir,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Dr():+e)+(null==n?0:+n),this._next||op===this||(op?op._next=this:ip=this,op=this),this._call=t,this._time=e,jr()},stop:function(){this._call&&(this._call=null,this._time=1/0,jr())}};var zp=new Date,Pp=new Date,Lp=$r(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Lp.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?$r(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):Lp:null};var qp,Up=Lp.range,Rp=1e3,Dp=6e4,Op=36e5,Ip=864e5,Fp=6048e5,Yp=$r(function(t){t.setTime(Math.floor(t/Rp)*Rp)},function(t,n){t.setTime(+t+n*Rp)},function(t,n){return(n-t)/Rp},function(t){return t.getUTCSeconds()}),Bp=Yp.range,Hp=$r(function(t){t.setTime(Math.floor(t/Dp)*Dp)},function(t,n){t.setTime(+t+n*Dp)},function(t,n){return(n-t)/Dp},function(t){return t.getMinutes()}),Xp=Hp.range,jp=$r(function(t){var n=t.getTimezoneOffset()*Dp%Op;0>n&&(n+=Op),t.setTime(Math.floor((+t-n)/Op)*Op+n)},function(t,n){t.setTime(+t+n*Op)},function(t,n){return(n-t)/Op},function(t){return t.getHours()}),Vp=jp.range,Wp=$r(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())*Dp)/Ip},function(t){return t.getDate()-1}),$p=Wp.range,Zp=Zr(0),Jp=Zr(1),Qp=Zr(2),Gp=Zr(3),Kp=Zr(4),t_=Zr(5),n_=Zr(6),e_=Zp.range,r_=Jp.range,i_=Qp.range,o_=Gp.range,a_=Kp.range,u_=t_.range,c_=n_.range,s_=$r(function(t){t.setHours(0,0,0,0),t.setDate(1)},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()}),f_=s_.range,h_=$r(function(t){t.setHours(0,0,0,0),t.setMonth(0,1)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()}),l_=h_.range,d_=$r(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Dp)},function(t,n){return(n-t)/Dp},function(t){return t.getUTCMinutes()}),p_=d_.range,__=$r(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Op)},function(t,n){return(n-t)/Op},function(t){return t.getUTCHours()}),y_=__.range,v_=$r(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Ip},function(t){return t.getUTCDate()-1}),g_=v_.range,m_=Jr(0),x_=Jr(1),b_=Jr(2),w_=Jr(3),M_=Jr(4),k_=Jr(5),T_=Jr(6),N_=m_.range,A_=x_.range,C_=b_.range,S_=w_.range,E_=M_.range,z_=k_.range,P_=T_.range,L_=$r(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(1)},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()}),q_=L_.range,U_=$r(function(t){t.setUTCHours(0,0,0,0),t.setUTCMonth(0,1)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()}),R_=U_.range,D_={"":ti,"%":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 ei(100*t,n)},r:ei,s:ni,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},O_=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;ii.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var I_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],F_=ai({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Y_=F_.format,B_=F_.formatPrefix,H_=di({dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),X_=H_.format,j_=H_.parse,V_=H_.utcFormat,W_=H_.utcParse,$_={"-":"",_:" ",0:"0"},Z_=/^\s*\d+/,J_=/^%/,Q_=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G_="%Y-%m-%dT%H:%M:%S.%LZ",K_=Date.prototype.toISOString?uo:V_(G_),ty=+new Date("2000-01-01T00:00:00.000Z")?co:W_(G_),ny=Array.prototype,ey=ny.map,ry=ny.slice,iy={name:"implicit"},oy=[0,1],ay=1e3,uy=60*ay,cy=60*uy,sy=24*cy,fy=7*sy,hy=30*sy,ly=365*sy,dy=jo("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),py=jo("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),_y=jo("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),yy=jo("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),vy=ep(He(-100,.75,.35),He(80,1.5,.8)),gy=ep(He(260,.75,.35),He(80,1.5,.8)),my=He(),xy=$o(jo("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),by=$o(jo("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),wy=$o(jo("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),My=$o(jo("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ky="http://www.w3.org/1999/xhtml",Ty={
svg:"http://www.w3.org/2000/svg",xhtml:ky,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ny=0;na.prototype=ta.prototype={constructor:na,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Ay=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Cy=document.documentElement;if(!Cy.matches){var Sy=Cy.webkitMatchesSelector||Cy.msMatchesSelector||Cy.mozMatchesSelector||Cy.oMatchesSelector;Ay=function(t){return function(){return Sy.call(this,t)}}}}var Ey=Ay,zy={};if(t.event=null,"undefined"!=typeof document){var Py=document.documentElement;"onmouseenter"in Py||(zy={mouseenter:"mouseover",mouseleave:"mouseout"})}var Ly="$";ba.prototype={constructor:ba,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)}},Ka.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var qy=[null];Cu.prototype=Su.prototype={constructor:Cu,select:da,selectAll:_a,filter:ya,data:xa,enter:Ma,exit:ka,merge:Ta,order:Na,sort:Aa,call:Sa,nodes:Ea,node:za,size:Pa,empty:La,each:qa,attr:Ya,style:Va,property:Ja,classed:ou,text:su,html:du,raise:_u,lower:vu,append:gu,insert:xu,remove:wu,datum:Mu,on:ua,dispatch:Au};var Uy=wr("start","end","interrupt"),Ry=[],Dy=0,Oy=1,Iy=2,Fy=3,Yy=4,By=5,Hy=Su.prototype.constructor,Xy=0,jy=Su.prototype;zc.prototype=Pc.prototype={constructor:zc,select:vc,selectAll:gc,filter:fc,merge:hc,selection:mc,transition:Ec,call:jy.call,nodes:jy.nodes,node:jy.node,size:jy.size,empty:jy.empty,each:jy.each,on:pc,attr:Gu,attrTween:nc,style:kc,styleTween:Nc,text:Sc,remove:yc,tween:Hu,delay:ic,duration:uc,ease:sc};var Vy={time:null,delay:0,duration:250,ease:et};Su.prototype.interrupt=Fu,Su.prototype.transition=Uc;var Wy=[null],$y=Array.prototype.slice,Zy=1,Jy=2,Qy=3,Gy=4,Ky=1e-6;vs.prototype=ls.prototype={constructor:vs,each:ns,eachAfter:rs,eachBefore:es,sum:is,sort:os,path:as,ancestors:cs,descendants:ss,leaves:fs,links:hs,copy:ds};var tv="$",nv={depth:-1},ev={};Ks.prototype=Object.create(vs.prototype);var rv=(1+Math.sqrt(5))/2,iv=function Wv(t){function n(n,e,r,i,o){rf(t,n,e,r,i,o)}return n.ratio=function(t){return Wv((t=+t)>1?t:1)},n}(rv),ov=function $v(t){function n(n,e,r,i,o){if((a=n._squarify)&&a.ratio===t)for(var a,u,c,s,f,h=-1,l=a.length,d=n.value;++h<l;){for(u=a[h],c=u.children,s=u.value=0,f=c.length;f>s;++s)u.value+=c[s].value;u.dice?Bs(u,e,r,i,r+=(o-r)*u.value/d):ef(u,e,r,e+=(i-e)*u.value/d,o),d-=u.value}else n._squarify=a=rf(t,n,e,r,i,o),a.ratio=t}return n.ratio=function(t){return $v((t=+t)>1?t:1)},n}(rv),av=10,uv=Math.PI*(3-Math.sqrt(5));Af.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t},Uf.prototype={constructor:Uf,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=If(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Df(this,e),t=e,e=t.U),e.C=!1,r.C=!0,Of(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Of(this,e),t=e,e=t.U),e.C=!1,r.C=!0,Df(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?If(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,Df(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Of(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Df(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,Of(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Df(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Of(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var cv,sv,fv,hv,lv,dv=[],pv=[],_v=1e-6,yv=1e-12;fh.prototype={constructor:fh,polygons:function(){var t=this.cells,n=this.cellEdges,e=this.extent,r=e[0][0],i=e[0][1],o=e[1][0],a=e[1][1],u=new Array(t.length);return t.forEach(function(t,e){var c,s=t.site,f=t.halfedges;if(f.length)c=f.map(function(e){return $f(t,n[e])});else{if(!(s[0]>=r&&s[0]<=o&&s[1]>=i&&s[1]<=a))return;c=[[r,a],[o,a],[o,i],[r,i]]}u[e]=c,c.data=s.data}),u},triangles:function(){var t=[],n=this.edges;return this.cells.forEach(function(e,r){for(var i,o=e.site,a=e.halfedges,u=-1,c=a.length,s=n[a[c-1]],f=s.left===o?s.right:s.left;++u<c;)i=f,s=n[a[u]],f=s.left===o?s.right:s.left,r<i.index&&r<f.index&&ch(o,i,f)<0&&t.push([o.data,i.data,f.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})}},ph.prototype={constructor:ph,scale:function(t){return 1===t?this:new ph(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ph(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vv=new ph(1,0,0);_h.prototype=ph.prototype;var gv={name:"drag"},mv={name:"space"},xv={name:"handle"},bv={name:"center"},wv={name:"x",handles:["e","w"].map(Nh),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Mv={name:"y",handles:["n","s"].map(Nh),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},kv={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Nh),input:function(t){return t},output:function(t){return t}},Tv={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Nv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Av={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Cv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Sv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};t.version=Rh,t.bisect=Oh,t.bisectRight=Oh,t.bisectLeft=Ih,t.ascending=n,t.bisector=e,t.descending=i,t.deviation=u,t.extent=c,t.histogram=_,t.thresholdFreedmanDiaconis=v,t.thresholdScott=g,t.thresholdSturges=p,t.max=m,t.mean=x,t.median=b,t.merge=w,t.min=M,t.pairs=k,t.permute=T,t.quantile=y,t.range=h,t.scan=N,t.shuffle=A,t.sum=C,t.ticks=l,t.tickStep=d,t.transpose=S,t.variance=a,t.zip=z,t.entries=H,t.keys=Y,t.values=B,t.map=L,t.set=F,t.nest=q,t.randomUniform=X,t.randomNormal=j,t.randomLogNormal=V,t.randomBates=$,t.randomIrwinHall=W,t.randomExponential=Z,t.easeLinear=J,t.easeQuad=K,t.easeQuadIn=Q,t.easeQuadOut=G,t.easeQuadInOut=K,t.easeCubic=et,t.easeCubicIn=tt,t.easeCubicOut=nt,t.easeCubicInOut=et,t.easePoly=Qh,t.easePolyIn=Zh,t.easePolyOut=Jh,t.easePolyInOut=Qh,t.easeSin=ot,t.easeSinIn=rt,t.easeSinOut=it,t.easeSinInOut=ot,t.easeExp=ct,t.easeExpIn=at,t.easeExpOut=ut,t.easeExpInOut=ct,t.easeCircle=ht,t.easeCircleIn=st,t.easeCircleOut=ft,t.easeCircleInOut=ht,t.easeBounce=dt,t.easeBounceIn=lt,t.easeBounceOut=dt,t.easeBounceInOut=pt,t.easeBack=dl,t.easeBackIn=hl,t.easeBackOut=ll,t.easeBackInOut=dl,t.easeElastic=gl,t.easeElasticIn=vl,t.easeElasticOut=gl,t.easeElasticInOut=ml,t.polygonArea=_t,t.polygonCentroid=yt,t.polygonHull=xt,t.polygonContains=bt,t.polygonLength=wt,t.path=kt,t.quadtree=Ht,t.queue=Gt,t.arc=sn,t.area=_n,t.line=pn,t.pie=gn,t.radialArea=Mn,t.radialLine=wn,t.symbol=kn,t.symbols=Jl,t.symbolCircle=Pl,t.symbolCross=Ll,t.symbolDiamond=Rl,t.symbolSquare=Bl,t.symbolStar=Yl,t.symbolTriangle=Xl,t.symbolWye=Zl,t.curveBasisClosed=En,t.curveBasisOpen=Pn,t.curveBasis=Cn,t.curveBundle=Ql,t.curveCardinalClosed=Kl,t.curveCardinalOpen=td,t.curveCardinal=Gl,t.curveCatmullRomClosed=ed,t.curveCatmullRomOpen=rd,t.curveCatmullRom=nd,t.curveLinearClosed=Hn,t.curveLinear=hn,t.curveMonotoneX=Qn,t.curveMonotoneY=Gn,t.curveNatural=ne,t.curveStep=re,t.curveStepAfter=oe,t.curveStepBefore=ie,t.stack=se,t.stackOffsetExpand=fe,t.stackOffsetNone=ae,t.stackOffsetSilhouette=he,t.stackOffsetWiggle=le,t.stackOrderAscending=de,t.stackOrderDescending=_e,t.stackOrderInsideOut=ye,t.stackOrderNone=ue,t.stackOrderReverse=ve,t.color=be,t.rgb=Te,t.hsl=Se,t.lab=Le,t.hcl=Fe,t.cubehelix=He,t.interpolate=ur,t.interpolateArray=nr,t.interpolateNumber=er,t.interpolateObject=rr,t.interpolateRound=cr,t.interpolateString=ar,t.interpolateTransformCss=jd,t.interpolateTransformSvg=Vd,t.interpolateZoom=yr,t.interpolateRgb=Od,t.interpolateRgbBasis=Id,t.interpolateRgbBasisClosed=Fd,t.interpolateHsl=Qd,t.interpolateHslLong=Gd,t.interpolateLab=gr,t.interpolateHcl=Kd,t.interpolateHclLong=tp,t.interpolateCubehelix=np,t.interpolateCubehelixLong=ep,t.interpolateBasis=Ve,t.interpolateBasisClosed=We,t.quantize=br,t.dispatch=wr,t.dsvFormat=Er,t.csvParse=up,t.csvParseRows=cp,t.csvFormat=sp,t.csvFormatRows=fp,t.tsvParse=lp,t.tsvParseRows=dp,t.tsvFormat=pp,t.tsvFormatRows=_p,t.request=zr,t.html=yp,t.json=vp,t.text=gp,t.xml=mp,t.csv=xp,t.tsv=bp,t.now=Dr,t.timer=Fr,t.timerFlush=Yr,t.timeout=Vr,t.interval=Wr,t.timeInterval=$r,t.timeMillisecond=Lp,t.timeMilliseconds=Up,t.timeSecond=Yp,t.timeSeconds=Bp,t.timeMinute=Hp,t.timeMinutes=Xp,t.timeHour=jp,t.timeHours=Vp,t.timeDay=Wp,t.timeDays=$p,t.timeWeek=Zp,t.timeWeeks=e_,t.timeSunday=Zp,t.timeSundays=e_,t.timeMonday=Jp,t.timeMondays=r_,t.timeTuesday=Qp,t.timeTuesdays=i_,t.timeWednesday=Gp,t.timeWednesdays=o_,t.timeThursday=Kp,t.timeThursdays=a_,t.timeFriday=t_,t.timeFridays=u_,t.timeSaturday=n_,t.timeSaturdays=c_,t.timeMonth=s_,t.timeMonths=f_,t.timeYear=h_,t.timeYears=l_,t.utcMillisecond=Lp,t.utcMilliseconds=Up,t.utcSecond=Yp,t.utcSeconds=Bp,t.utcMinute=d_,t.utcMinutes=p_,t.utcHour=__,t.utcHours=y_,t.utcDay=v_,t.utcDays=g_,t.utcWeek=m_,t.utcWeeks=N_,t.utcSunday=m_,t.utcSundays=N_,t.utcMonday=x_,t.utcMondays=A_,t.utcTuesday=b_,t.utcTuesdays=C_,t.utcWednesday=w_,t.utcWednesdays=S_,t.utcThursday=M_,t.utcThursdays=E_,t.utcFriday=k_,t.utcFridays=z_,t.utcSaturday=T_,t.utcSaturdays=P_,t.utcMonth=L_,t.utcMonths=q_,t.utcYear=U_,t.utcYears=R_,t.format=Y_,t.formatPrefix=B_,t.formatLocale=ai,t.formatSpecifier=ri,t.precisionFixed=ui,t.precisionPrefix=ci,t.precisionRound=si,t.timeFormat=X_,t.timeParse=j_,t.utcFormat=V_,t.utcParse=W_,t.isoFormat=K_,t.isoParse=ty,t.timeFormatLocale=di,t.scaleBand=fo,t.scalePoint=lo,t.scaleIdentity=No,t.scaleLinear=To,t.scaleLog=qo,t.scaleOrdinal=so,t.scaleImplicit=iy,t.scalePow=Ro,t.scaleSqrt=Do,t.scaleQuantile=Oo,t.scaleQuantize=Io,t.scaleThreshold=Fo,t.scaleTime=Ho,t.scaleUtc=Xo,t.schemeCategory10=dy,t.schemeCategory20b=py,t.schemeCategory20c=_y,t.schemeCategory20=yy,t.scaleSequential=Zo,t.interpolateCubehelixDefault=Vo,t.interpolateRainbow=Wo,t.interpolateWarm=vy,t.interpolateCool=gy,t.interpolateViridis=xy,t.interpolateMagma=by,t.interpolateInferno=wy,t.interpolatePlasma=My,t.creator=Ko,t.customEvent=ca,t.local=ta,t.matcher=Ey,t.mouse=ha,t.namespace=Jo,t.namespaces=Ty,t.select=Eu,t.selectAll=zu,t.selection=Su,t.selector=la,t.selectorAll=pa,t.touch=Pu,t.touches=Lu,t.window=Ba,t.active=Rc,t.interrupt=Iu,t.transition=Pc,t.axisTop=Hc,t.axisRight=Xc,t.axisBottom=jc,t.axisLeft=Vc,t.cluster=ts,t.hierarchy=ls,t.pack=Ds,t.packSiblings=zs,t.packEnclose=xs,t.partition=Hs,t.stratify=Vs,t.tree=nf,t.treemap=of,t.treemapBinary=af,t.treemapDice=Bs,t.treemapSlice=ef,t.treemapSliceDice=uf,t.treemapSquarify=iv,t.treemapResquarify=ov,t.forceCenter=cf,t.forceCollide=df,t.forceLink=_f,t.forceManyBody=mf,t.forceSimulation=gf,t.forceX=xf,t.forceY=bf,t.drag=zf,t.dragDisable=kf,t.dragEnable=Tf,t.voronoi=hh,t.zoom=bh,t.zoomIdentity=vv,t.zoomTransform=_h,t.brush=qh,t.brushX=Ph,t.brushY=Lh,t.brushSelection=zh,Object.defineProperty(t,"__esModule",{value:!0})});