UNPKG

react-animated-web

Version:

React animated chart library by using D3.js

1 lines 119 kB
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=82)}({0:function(t,e,n){t.exports=n(80)()},1:function(t,e){t.exports=require("react")},80:function(t,e,n){"use strict";var r=n(81);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,a,o){if(o!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},81:function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},82:function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r);a.right,a.left;var o=Array.prototype;o.slice,o.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Array.prototype.slice;var u={value:function(){}};function s(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new c(r)}function c(t){this._=t}function l(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function f(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function h(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=u,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}c.prototype=s.prototype={constructor:c,on:function(t,e){var n,r=this._,i=l(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=h(r[n],t.name,e);else if(null==e)for(n in r)r[n]=h(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=f(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new c(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var g=s;function d(){}var p=function(t){return null==t?d:function(){return this.querySelector(t)}};function v(){return[]}var y=function(t){return null==t?v:function(){return this.querySelectorAll(t)}},m=function(t){return function(){return this.matches(t)}},w=function(t){return new Array(t.length)};function x(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}x.prototype={constructor:x,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var _="$";function b(t,e,n,r,i,a){for(var o,u=0,s=e.length,c=a.length;u<c;++u)(o=e[u])?(o.__data__=a[u],r[u]=o):n[u]=new x(t,a[u]);for(;u<s;++u)(o=e[u])&&(i[u]=o)}function M(t,e,n,r,i,a,o){var u,s,c,l={},f=e.length,h=a.length,g=new Array(f);for(u=0;u<f;++u)(s=e[u])&&(g[u]=c=_+o.call(s,s.__data__,u,e),c in l?i[u]=s:l[c]=s);for(u=0;u<h;++u)(s=l[c=_+o.call(t,a[u],u,a)])?(r[u]=s,s.__data__=a[u],l[c]=null):n[u]=new x(t,a[u]);for(u=0;u<f;++u)(s=e[u])&&l[g[u]]===s&&(i[u]=s)}function C(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var k="http://www.w3.org/1999/xhtml",T={svg:"http://www.w3.org/2000/svg",xhtml:k,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},A=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),T.hasOwnProperty(e)?{space:T[e],local:t}:t};function N(t){return function(){this.removeAttribute(t)}}function S(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U(t,e){return function(){this.setAttribute(t,e)}}function D(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function L(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var R=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function P(t){return function(){this.style.removeProperty(t)}}function j(t,e,n){return function(){this.style.setProperty(t,e,n)}}function z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function q(t,e){return t.style.getPropertyValue(e)||R(t).getComputedStyle(t,null).getPropertyValue(e)}function O(t){return function(){delete this[t]}}function F(t,e){return function(){this[t]=e}}function I(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Y(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new B(t)}function B(t){this._node=t,this._names=Y(t.getAttribute("class")||"")}function X(t,e){for(var n=H(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function V(t,e){for(var n=H(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $(t){return function(){X(this,t)}}function Z(t){return function(){V(this,t)}}function G(t,e){return function(){(e.apply(this,arguments)?X:V)(this,t)}}B.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function W(){this.textContent=""}function J(t){return function(){this.textContent=t}}function K(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Q(){this.innerHTML=""}function tt(t){return function(){this.innerHTML=t}}function et(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function nt(){this.nextSibling&&this.parentNode.appendChild(this)}function rt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function it(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===k&&e.documentElement.namespaceURI===k?e.createElement(t):e.createElementNS(n,t)}}function at(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ot=function(t){var e=A(t);return(e.local?at:it)(e)};function ut(){return null}function st(){var t=this.parentNode;t&&t.removeChild(this)}function ct(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var ft={},ht=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ft={mouseenter:"mouseover",mouseleave:"mouseout"}));function gt(t,e,n){return t=dt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function dt(t,e,n){return function(r){var i=ht;ht=r;try{t.call(this,this.__data__,e,n)}finally{ht=i}}}function pt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function vt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function yt(t,e,n){var r=ft.hasOwnProperty(t.type)?gt:dt;return function(i,a,o){var u,s=this.__on,c=r(e,a,o);if(s)for(var l=0,f=s.length;l<f;++l)if((u=s[l]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},s?s.push(u):this.__on=[u]}}function mt(t,e,n,r){var i=ht;t.sourceEvent=ht,ht=t;try{return e.apply(n,r)}finally{ht=i}}function wt(t,e,n){var r=R(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function xt(t,e){return function(){return wt(this,t,e)}}function _t(t,e){return function(){return wt(this,t,e.apply(this,arguments))}}var bt=[null];function Mt(t,e){this._groups=t,this._parents=e}function Ct(){return new Mt([[document.documentElement]],bt)}Mt.prototype=Ct.prototype={constructor:Mt,select:function(t){"function"!=typeof t&&(t=p(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,u=e[i],s=u.length,c=r[i]=new Array(s),l=0;l<s;++l)(a=u[l])&&(o=t.call(a,a.__data__,l,u))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new Mt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,u=e[a],s=u.length,c=0;c<s;++c)(o=u[c])&&(r.push(t.call(o,o.__data__,c,u)),i.push(o));return new Mt(r,i)},filter:function(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],u=o.length,s=r[i]=[],c=0;c<u;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&s.push(a);return new Mt(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each((function(t){d[++l]=t})),d;var n,r=e?M:b,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,u=new Array(o),s=new Array(o),c=new Array(o),l=0;l<o;++l){var f=i[l],h=a[l],g=h.length,d=t.call(f,f&&f.__data__,l,i),p=d.length,v=s[l]=new Array(p),y=u[l]=new Array(p);r(f,h,v,y,c[l]=new Array(g),d,e);for(var m,w,x=0,_=0;x<p;++x)if(m=v[x]){for(x>=_&&(_=x+1);!(w=y[_])&&++_<p;);m._next=w||null}}return(u=new Mt(u,i))._enter=s,u._exit=c,u},enter:function(){return new Mt(this._enter||this._groups.map(w),this._parents)},exit:function(){return new Mt(this._exit||this._groups.map(w),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s,c=e[u],l=n[u],f=c.length,h=o[u]=new Array(f),g=0;g<f;++g)(s=c[g]||l[g])&&(h[g]=s);for(;u<r;++u)o[u]=e[u];return new Mt(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=C);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,u=n[a],s=u.length,c=i[a]=new Array(s),l=0;l<s;++l)(o=u[l])&&(c[l]=o);c.sort(e)}return new Mt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,u=a.length;o<u;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=A(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?S:N:"function"==typeof e?n.local?L:E:n.local?D:U)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?P:"function"==typeof e?z:j)(t,e,null==n?"":n)):q(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?O:"function"==typeof e?I:F)(t,e)):this.node()[t]},classed:function(t,e){var n=Y(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?G:e?$:Z)(n,e))},text:function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?K:J)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Q:("function"==typeof t?et:tt)(t)):this.node().innerHTML},raise:function(){return this.each(nt)},lower:function(){return this.each(rt)},append:function(t){var e="function"==typeof t?t:ot(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ot(t),r=null==e?ut:"function"==typeof e?e:p(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(st)},clone:function(t){return this.select(t?lt:ct)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=pt(t+""),o=a.length;if(!(arguments.length<2)){for(u=e?yt:vt,null==n&&(n=!1),r=0;r<o;++r)this.each(u(a[r],e,n));return this}var u=this.node().__on;if(u)for(var s,c=0,l=u.length;c<l;++c)for(r=0,s=u[c];r<o;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?_t:xt)(t,e))}};var kt=Ct,Tt=function(t){return"string"==typeof t?new Mt([[document.querySelector(t)]],[document.documentElement]):new Mt([[t]],bt)};function At(){ht.stopImmediatePropagation()}var Nt=function(){ht.preventDefault(),ht.stopImmediatePropagation()},St=function(t){var e=t.document.documentElement,n=Tt(t).on("dragstart.drag",Nt,!0);"onselectstart"in e?n.on("selectstart.drag",Nt,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Ut(t,e){var n=t.document.documentElement,r=Tt(t).on("dragstart.drag",null);e&&(r.on("click.drag",Nt,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Dt=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Et(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Lt(){}var Rt="\\s*([+-]?\\d+)\\s*",Pt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zt=/^#([0-9a-f]{3,8})$/,qt=new RegExp("^rgb\\("+[Rt,Rt,Rt]+"\\)$"),Ot=new RegExp("^rgb\\("+[jt,jt,jt]+"\\)$"),Ft=new RegExp("^rgba\\("+[Rt,Rt,Rt,Pt]+"\\)$"),It=new RegExp("^rgba\\("+[jt,jt,jt,Pt]+"\\)$"),Yt=new RegExp("^hsl\\("+[Pt,jt,jt]+"\\)$"),Ht=new RegExp("^hsla\\("+[Pt,jt,jt,Pt]+"\\)$"),Bt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Xt(){return this.rgb().formatHex()}function Vt(){return this.rgb().formatRgb()}function $t(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=zt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Zt(e):3===n?new Jt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Jt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Jt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=qt.exec(t))?new Jt(e[1],e[2],e[3],1):(e=Ot.exec(t))?new Jt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ft.exec(t))?Gt(e[1],e[2],e[3],e[4]):(e=It.exec(t))?Gt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Yt.exec(t))?ee(e[1],e[2]/100,e[3]/100,1):(e=Ht.exec(t))?ee(e[1],e[2]/100,e[3]/100,e[4]):Bt.hasOwnProperty(t)?Zt(Bt[t]):"transparent"===t?new Jt(NaN,NaN,NaN,0):null}function Zt(t){return new Jt(t>>16&255,t>>8&255,255&t,1)}function Gt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Jt(t,e,n,r)}function Wt(t,e,n,r){return 1===arguments.length?((i=t)instanceof Lt||(i=$t(i)),i?new Jt((i=i.rgb()).r,i.g,i.b,i.opacity):new Jt):new Jt(t,e,n,null==r?1:r);var i}function Jt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Kt(){return"#"+te(this.r)+te(this.g)+te(this.b)}function Qt(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function te(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ee(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ie(t,e,n,r)}function ne(t){if(t instanceof ie)return new ie(t.h,t.s,t.l,t.opacity);if(t instanceof Lt||(t=$t(t)),!t)return new ie;if(t instanceof ie)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(o=e===a?(n-r)/u+6*(n<r):n===a?(r-e)/u+2:(e-n)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new ie(o,u,s,t.opacity)}function re(t,e,n,r){return 1===arguments.length?ne(t):new ie(t,e,n,null==r?1:r)}function ie(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ae(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function oe(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Dt(Lt,$t,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Xt,formatHex:Xt,formatHsl:function(){return ne(this).formatHsl()},formatRgb:Vt,toString:Vt}),Dt(Jt,Wt,Et(Lt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Jt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Jt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Kt,formatHex:Kt,formatRgb:Qt,toString:Qt})),Dt(ie,re,Et(Lt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ie(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ie(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Jt(ae(t>=240?t-240:t+120,i,r),ae(t,i,r),ae(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var ue=function(t){return function(){return t}};function se(t,e){return function(n){return t+n*e}}function ce(t){return 1==(t=+t)?le:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ue(isNaN(e)?n:e)}}function le(t,e){var n=e-t;return n?se(t,n):ue(isNaN(t)?e:t)}var fe=function t(e){var n=ce(e);function r(t,e){var r=n((t=Wt(t)).r,(e=Wt(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=le(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function he(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),u=new Array(i);for(n=0;n<i;++n)r=Wt(e[n]),a[n]=r.r||0,o[n]=r.g||0,u[n]=r.b||0;return a=t(a),o=t(o),u=t(u),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=u(t),r+""}}}he((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=r<e-1?t[r+2]:2*a-i;return oe((n-r/e)*e,o,i,a,u)}})),he((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],u=t[(r+2)%e];return oe((n-r/e)*e,i,a,o,u)}}));var ge=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},de=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pe=new RegExp(de.source,"g");var ve,ye,me=function(t,e){var n,r,i,a=de.lastIndex=pe.lastIndex=0,o=-1,u=[],s=[];for(t+="",e+="";(n=de.exec(t))&&(r=pe.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:ge(n,r)})),a=pe.lastIndex;return a<e.length&&(i=e.slice(a),u[o]?u[o]+=i:u[++o]=i),u.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})},we=function(){for(var t,e=ht;t=e.sourceEvent;)e=t;return e},xe=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},_e=function(t,e,n){arguments.length<3&&(n=e,e=we().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return xe(t,r);return null},be=function(t){var e=we();return e.changedTouches&&(e=e.changedTouches[0]),xe(t,e)},Me=0,Ce=0,ke=0,Te=1e3,Ae=0,Ne=0,Se=0,Ue="object"==typeof performance&&performance.now?performance:Date,De="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ee(){return Ne||(De(Le),Ne=Ue.now()+Se)}function Le(){Ne=0}function Re(){this._call=this._time=this._next=null}function Pe(t,e,n){var r=new Re;return r.restart(t,e,n),r}function je(){Ne=(Ae=Ue.now())+Se,Me=Ce=0;try{!function(){Ee(),++Me;for(var t,e=ve;e;)(t=Ne-e._time)>=0&&e._call.call(null,t),e=e._next;--Me}()}finally{Me=0,function(){var t,e,n=ve,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ve=e);ye=t,qe(r)}(),Ne=0}}function ze(){var t=Ue.now(),e=t-Ae;e>Te&&(Se-=e,Ae=t)}function qe(t){Me||(Ce&&(Ce=clearTimeout(Ce)),t-Ne>24?(t<1/0&&(Ce=setTimeout(je,t-Ue.now()-Se)),ke&&(ke=clearInterval(ke))):(ke||(Ae=Ue.now(),ke=setInterval(ze,Te)),Me=1,De(je)))}Re.prototype=Pe.prototype={constructor:Re,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ee():+n)+(null==e?0:+e),this._next||ye===this||(ye?ye._next=this:ve=this,ye=this),this._call=t,this._time=n,qe()},stop:function(){this._call&&(this._call=null,this._time=1/0,qe())}};var Oe=function(t,e,n){var r=new Re;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Fe=g("start","end","cancel","interrupt"),Ie=[],Ye=0,He=1,Be=2,Xe=3,Ve=4,$e=5,Ze=6,Ge=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(s){var c,l,f,h;if(n.state!==He)return u();for(c in i)if((h=i[c]).name===n.name){if(h.state===Xe)return Oe(a);h.state===Ve?(h.state=Ze,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=Ze,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(Oe((function(){n.state===Xe&&(n.state=Ve,n.timer.restart(o,n.delay,n.time),o(s))})),n.state=Be,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Be){for(n.state=Xe,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=$e,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===$e&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=Ze,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Pe((function(t){n.state=He,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Fe,tween:Ie,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ye})};function We(t,e){var n=Ke(t,e);if(n.state>Ye)throw new Error("too late; already scheduled");return n}function Je(t,e){var n=Ke(t,e);if(n.state>Xe)throw new Error("too late; already running");return n}function Ke(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var Qe,tn,en,nn,rn=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>Be&&n.state<$e,n.state=Ze,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},an=180/Math.PI,on={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},un=function(t,e,n,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*an,skewX:Math.atan(s)*an,scaleX:o,scaleY:u}};function sn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var u=[],s=[];return a=t(a),o=t(o),function(t,r,i,a,o,u){if(t!==i||r!==a){var s=o.push("translate(",null,e,null,n);u.push({i:s-4,x:ge(t,i)},{i:s-2,x:ge(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,u,s),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ge(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,u,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ge(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,u,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:ge(t,n)},{i:u-2,x:ge(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,s),a=o=null,function(t){for(var e,n=-1,r=s.length;++n<r;)u[(e=s[n]).i]=e.x(t);return u.join("")}}}var cn=sn((function(t){return"none"===t?on:(Qe||(Qe=document.createElement("DIV"),tn=document.documentElement,en=document.defaultView),Qe.style.transform=t,t=en.getComputedStyle(tn.appendChild(Qe),null).getPropertyValue("transform"),tn.removeChild(Qe),t=t.slice(7,-1).split(","),un(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ln=sn((function(t){return null==t?on:(nn||(nn=document.createElementNS("http://www.w3.org/2000/svg","g")),nn.setAttribute("transform",t),(t=nn.transform.baseVal.consolidate())?(t=t.matrix,un(t.a,t.b,t.c,t.d,t.e,t.f)):on)}),", ",")",")");function fn(t,e){var n,r;return function(){var i=Je(this,t),a=i.tween;if(a!==n)for(var o=0,u=(r=n=a).length;o<u;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function hn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Je(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:e,value:n},s=0,c=i.length;s<c;++s)if(i[s].name===e){i[s]=u;break}s===c&&i.push(u)}a.tween=i}}function gn(t,e,n){var r=t._id;return t.each((function(){var t=Je(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Ke(t,r).value[e]}}var dn=function(t,e){var n;return("number"==typeof e?ge:e instanceof $t?fe:(n=$t(e))?(e=n,fe):me)(t,e)};function pn(t){return function(){this.removeAttribute(t)}}function vn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function yn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function mn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function wn(t,e,n){var r,i,a;return function(){var o,u,s=n(this);if(null!=s)return(o=this.getAttribute(t))===(u=s+"")?null:o===r&&u===i?a:(i=u,a=e(r=o,s));this.removeAttribute(t)}}function xn(t,e,n){var r,i,a;return function(){var o,u,s=n(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:o===r&&u===i?a:(i=u,a=e(r=o,s));this.removeAttributeNS(t.space,t.local)}}function _n(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function bn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function Mn(t,e){return function(){We(this,t).delay=+e.apply(this,arguments)}}function Cn(t,e){return e=+e,function(){We(this,t).delay=e}}function kn(t,e){return function(){Je(this,t).duration=+e.apply(this,arguments)}}function Tn(t,e){return e=+e,function(){Je(this,t).duration=e}}function An(t,e){if("function"!=typeof e)throw new Error;return function(){Je(this,t).ease=e}}function Nn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?We:Je;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}var Sn=kt.prototype.constructor;function Un(t){return function(){this.style.removeProperty(t)}}function Dn(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}function En(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}var Ln=0;function Rn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Pn(){return++Ln}var jn=kt.prototype;Rn.prototype=function(t){return kt().transition(t)}.prototype={constructor:Rn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=p(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var u,s,c=r[o],l=c.length,f=a[o]=new Array(l),h=0;h<l;++h)(u=c[h])&&(s=t.call(u,u.__data__,h,c))&&("__data__"in u&&(s.__data__=u.__data__),f[h]=s,Ge(f[h],e,n,h,f,Ke(u,n)));return new Rn(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=y(t));for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u)for(var s,c=r[u],l=c.length,f=0;f<l;++f)if(s=c[f]){for(var h,g=t.call(s,s.__data__,f,c),d=Ke(s,n),p=0,v=g.length;p<v;++p)(h=g[p])&&Ge(h,e,n,p,g,d);a.push(g),o.push(s)}return new Rn(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],u=o.length,s=r[i]=[],c=0;c<u;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&s.push(a);return new Rn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s,c=e[u],l=n[u],f=c.length,h=o[u]=new Array(f),g=0;g<f;++g)(s=c[g]||l[g])&&(h[g]=s);for(;u<r;++u)o[u]=e[u];return new Rn(o,this._parents,this._name,this._id)},selection:function(){return new Sn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Pn(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,u=r[a],s=u.length,c=0;c<s;++c)if(o=u[c]){var l=Ke(o,e);Ge(o,t,n,c,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Rn(r,this._parents,t,n)},call:jn.call,nodes:jn.nodes,node:jn.node,size:jn.size,empty:jn.empty,each:jn.each,on:function(t,e){var n=this._id;return arguments.length<2?Ke(this.node(),n).on.on(t):this.each(Nn(n,t,e))},attr:function(t,e){var n=A(t),r="transform"===n?ln:dn;return this.attrTween(t,"function"==typeof e?(n.local?xn:wn)(n,r,gn(this,"attr."+t,e)):null==e?(n.local?vn:pn)(n):(n.local?mn:yn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=A(t);return this.tween(n,(r.local?_n:bn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?cn:dn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=q(this,t),o=(this.style.removeProperty(t),q(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Un(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=q(this,t),u=n(this),s=u+"";return null==u&&(this.style.removeProperty(t),s=u=q(this,t)),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}(t,r,gn(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,u="end."+o;return function(){var s=Je(this,t),c=s.on,l=null==s.value[o]?a||(a=Un(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(u,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=q(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Dn(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(gn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,En(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Ke(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?fn:hn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mn:Cn)(e,t)):Ke(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?kn:Tn)(e,t)):Ke(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(An(e,t)):Ke(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var u={value:o},s={value:function(){0==--i&&a()}};n.each((function(){var n=Je(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),n.on=e}))}))}};var zn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function qn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return zn.time=Ee(),zn;return n}kt.prototype.interrupt=function(t){return this.each((function(){rn(this,t)}))},kt.prototype.transition=function(t){var e,n;t instanceof Rn?(e=t._id,t=t._name):(e=Pn(),(n=zn).time=Ee(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,u=r[a],s=u.length,c=0;c<s;++c)(o=u[c])&&Ge(o,t,e,c,u,n||qn(o,e));return new Rn(r,this._parents,t,e)};function On(t){return[+t[0],+t[1]]}function Fn(t){return[On(t[0]),On(t[1])]}["w","e"].map(In),["n","s"].map(In),["n","w","e","s","nw","ne","sw","se"].map(In);function In(t){return{type:t}}Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Yn=Math.PI,Hn=2*Yn,Bn=Hn-1e-6;function Xn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Vn(){return new Xn}Xn.prototype=Vn.prototype={constructor:Xn,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,u=n-t,s=r-e,c=a-t,l=o-e,f=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(l*u-s*c)>1e-6&&i){var h=n-a,g=r-o,d=u*u+s*s,p=h*h+g*g,v=Math.sqrt(d),y=Math.sqrt(f),m=i*Math.tan((Yn-Math.acos((d+f-p)/(2*v*y)))/2),w=m/y,x=m/v;Math.abs(w-1)>1e-6&&(this._+="L"+(t+w*c)+","+(e+w*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*g)+","+(this._x1=t+x*u)+","+(this._y1=e+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),u=n*Math.sin(r),s=t+o,c=e+u,l=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+c:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+s+","+c),n&&(f<0&&(f=f%Hn+Hn),f>Bn?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-u)+"A"+n+","+n+",0,1,"+l+","+(this._x1=s)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Yn)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function $n(){}function Zn(t,e){var n=new $n;if(t instanceof $n)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}$n.prototype=Zn.prototype={constructor:$n,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Gn=Zn;function Wn(){}var Jn=Gn.prototype;function Kn(t,e){var n=new Wn;if(t instanceof Wn)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}Wn.prototype=Kn.prototype={constructor:Wn,has:Jn.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Jn.remove,clear:Jn.clear,values:Jn.keys,size:Jn.size,empty:Jn.empty,each:Jn.each};Array.prototype.slice;var Qn=function(t){return function(){return t}};function tr(t,e,n,r,i,a,o,u,s,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=u,this.dy=s,this._=c}function er(){return!ht.ctrlKey&&!ht.button}function nr(){return this.parentNode}function rr(t){return null==t?{x:ht.x,y:ht.y}:t}function ir(){return navigator.maxTouchPoints||"ontouchstart"in this}tr.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ar=function(){var t,e,n,r,i=er,a=nr,o=rr,u=ir,s={},c=g("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=x("mouse",a.apply(this,arguments),be,this,arguments);o&&(Tt(ht.view).on("mousemove.drag",p,!0).on("mouseup.drag",v,!0),St(ht.view),At(),n=!1,t=ht.clientX,e=ht.clientY,o("start"))}}function p(){if(Nt(),!n){var r=ht.clientX-t,i=ht.clientY-e;n=r*r+i*i>f}s.mouse("drag")}function v(){Tt(ht.view).on("mousemove.drag mouseup.drag",null),Ut(ht.view,n),Nt(),s.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=ht.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=x(n[t].identifier,r,_e,this,arguments))&&(At(),e("start"))}}function m(){var t,e,n=ht.changedTouches,r=n.length;for(t=0;t<r;++t)(e=s[n[t].identifier])&&(Nt(),e("drag"))}function w(){var t,e,n=ht.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=s[n[t].identifier])&&(At(),e("end"))}function x(t,e,n,r,i){var a,u,f,g=n(e,t),d=c.copy();if(mt(new tr(h,"beforestart",a,t,l,g[0],g[1],0,0,d),(function(){return null!=(ht.subject=a=o.apply(r,i))&&(u=a.x-g[0]||0,f=a.y-g[1]||0,!0)})))return function o(c){var p,v=g;switch(c){case"start":s[t]=o,p=l++;break;case"end":delete s[t],--l;case"drag":g=n(e,t),p=l}mt(new tr(h,c,a,t,p,g[0]+u,g[1]+f,g[0]-v[0],g[1]-v[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:Qn(!!t),h):i},h.container=function(t){return arguments.length?(a="function"==typeof t?t:Qn(t),h):a},h.subject=function(t){return arguments.length?(o="function"==typeof t?t:Qn(t),h):o},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:Qn(!!t),h):u},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h};function or(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ur={},sr={},cr=34,lr=10,fr=13;function hr(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function gr(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function dr(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function pr(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+dr(-e,6):e>9999?"+"+dr(e,6):dr(e,4))+"-"+dr(t.getUTCMonth()+1,2)+"-"+dr(t.getUTCDate(),2)+(a?"T"+dr(n,2)+":"+dr(r,2)+":"+dr(i,2)+"."+dr(a,3)+"Z":i?"T"+dr(n,2)+":"+dr(r,2)+":"+dr(i,2)+"Z":r||n?"T"+dr(n,2)+":"+dr(r,2)+"Z":"")}var vr=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,u=0,s=a<=0,c=!1;function l(){if(s)return sr;if(c)return c=!1,ur;var e,r,i=o;if(t.charCodeAt(i)===cr){for(;o++<a&&t.charCodeAt(o)!==cr||t.charCodeAt(++o)===cr;);return(e=o)>=a?s=!0:(r=t.charCodeAt(o++))===lr?c=!0:r===fr&&(c=!0,t.charCodeAt(o)===lr&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===lr)c=!0;else if(r===fr)c=!0,t.charCodeAt(o)===lr&&++o;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===lr&&--a,t.charCodeAt(a-1)===fr&&--a;(r=l())!==sr;){for(var f=[];r!==ur&&r!==sr;)f.push(r),r=l();e&&null==(f=e(f,u++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?pr(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=hr(t);return function(r,i){return e(n(r),i,t)}}(t,e):hr(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=gr(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=gr(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},yr=vr(","),mr=yr.parse,wr=(yr.parseRows,yr.format,yr.formatBody,yr.formatRows,yr.formatRow,yr.formatValue,vr("\t")),xr=wr.parse;wr.parseRows,wr.format,wr.formatBody,wr.formatRows,wr.formatRow,wr.formatValue;function _r(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var br=function(t,e){return fetch(t,e).then(_r)};function Mr(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),br(e,n).then((function(e){return t(e,r)}))}}Mr(mr),Mr(xr);function Cr(t){return function(e,n){return br(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}Cr("application/xml"),Cr("text/html"),Cr("image/svg+xml");var kr=function(t,e){var n;function r(){var r,i,a=n.length,o=0,u=0;for(r=0;r<a;++r)o+=(i=n[r]).x,u+=i.y;for(o=o/a-t,u=u/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=u}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},Tr=function(t){return function(){return t}},Ar=function(){return 1e-6*(Math.random()-.5)};function Nr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,u,s,c,l,f,h,g=t._root,d={data:r},p=t._x0,v=t._y0,y=t._x1,m=t._y1;if(!g)return t._root=d,t;for(;g.length;)if((c=e>=(a=(p+y)/2))?p=a:y=a,(l=n>=(o=(v+m)/2))?v=o:m=o,i=g,!(g=g[f=l<<1|c]))return i[f]=d,t;if(u=+t._x.call(null,g.data),s=+t._y.call(null,g.data),e===u&&n===s)return d.next=g,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(p+y)/2))?p=a:y=a,(l=n>=(o=(v+m)/2))?v=o:m=o}while((f=l<<1|c)==(h=(s>=o)<<1|u>=a));return i[h]=g,i[f]=d,t}var Sr=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Ur(t){return t[0]}function Dr(t){return t[1]}function Er(t,e,n){var r=new Lr(null==e?Ur:e,null==n?Dr:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Lr(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Rr(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Pr=Er.prototype=Lr.prototype;function jr(t){return t.x+t.vx}function zr(t){return t.y+t.vy}Pr.copy=function(){var t,e,n=new Lr(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Rr(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<